diff --git a/.editorconfig b/.editorconfig index 1298c6500..28f1abd3a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -24,7 +24,7 @@ indent_size = 2 [*.js] indent_style = space -indent_size = 4 +indent_size = 2 [Makefile] indent_style = tab diff --git a/.eslintrc b/.eslintrc index fa2c16614..4302886d7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,28 +1,51 @@ root: true extends: + - eslint-config-airbnb-base - eslint:recommended parserOptions: - ecmaVersion: 2015 + ecmaVersion: 2020 env: browser: true - jquery: true es6: true + jquery: true node: true globals: Clipboard: false CodeMirror: false + Dropzone: false emojify: false + hljs: false SimpleMDE: false - Vue: false - Dropzone: false u2fApi: false - hljs: false + Vue: false rules: - no-unused-vars: [error, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, ignoreRestSiblings: true}] - prefer-const: [2, {destructuring: all}] + camelcase: [0] + comma-dangle: [2, only-multiline] + consistent-return: [0] + default-case: [0] + func-names: [0] + max-len: [0] + newline-per-chained-call: [0] + arrow-body-style: [0] + no-alert: [0] + no-continue: [0] + no-mixed-operators: [0] + no-multi-assign: [0] + no-new: [0] + no-param-reassign: [0] + no-plusplus: [0] + no-restricted-syntax: [0] + no-shadow: [0] + no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, ignoreRestSiblings: true}] + no-use-before-define: [0] no-var: [2] + one-var-declaration-per-line: [0] + one-var: [0] + prefer-const: [2, {destructuring: all}] + prefer-destructuring: [0] + radix: [2, as-needed] diff --git a/package-lock.json b/package-lock.json index f5a95b575..5f7211a01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,94 +12,250 @@ } }, "@babel/core": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.5.tgz", - "integrity": "sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.2.tgz", + "integrity": "sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ==", "dev": true, "requires": { "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helpers": "^7.5.5", - "@babel/parser": "^7.5.5", - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5", - "convert-source-map": "^1.1.0", + "@babel/generator": "^7.7.2", + "@babel/helpers": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.7.2", + "convert-source-map": "^1.7.0", "debug": "^4.1.0", "json5": "^2.1.0", "lodash": "^4.17.13", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } } }, "@babel/generator": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.2.tgz", + "integrity": "sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ==", "dev": true, "requires": { - "@babel/types": "^7.5.5", + "@babel/types": "^7.7.2", "jsesc": "^2.5.1", "lodash": "^4.17.13", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "source-map": "^0.5.0" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.0.tgz", + "integrity": "sha512-k50CQxMlYTYo+GGyUGFwpxKVtxVJi9yh61sXZji3zYHccK9RYliZGSTOgci85T+r+0VFN2nWbGM04PIqwfrpMg==", + "dev": true, + "requires": { + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.7.0.tgz", + "integrity": "sha512-Cd8r8zs4RKDwMG/92lpZcnn5WPQ3LAMQbCw42oqUh4s7vsSN5ANUZjMel0OOnxDLq57hoDDbai+ryygYfCTOsw==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.7.0", + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-call-delegate": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.7.0.tgz", + "integrity": "sha512-Su0Mdq7uSSWGZayGMMQ+z6lnL00mMCnGAbO/R0ZO9odIdB/WNU/VfQKqMQU0fdIsxQYbRjDM4BixIa93SQIpvw==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.7.2.tgz", + "integrity": "sha512-pAil/ZixjTlrzNpjx+l/C/wJk002Wo7XbbZ8oujH/AoJ3Juv0iN/UTcPUHXKMFLqsfS0Hy6Aow8M31brUYBlQQ==", + "dev": true, + "requires": { + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.6.0" + } + }, + "@babel/helper-define-map": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.7.0.tgz", + "integrity": "sha512-kPKWPb0dMpZi+ov1hJiwse9dWweZsz3V9rP4KdytnX1E7z3cTNmFGglwklzFPuqIcHLIY3bgKSs4vkwXXdflQA==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.7.0", + "@babel/types": "^7.7.0", + "lodash": "^4.17.13" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.7.0.tgz", + "integrity": "sha512-CDs26w2shdD1urNUAji2RJXyBFCaR+iBEGnFz3l7maizMkQe3saVw9WtjG1tz8CwbjvlFnaSLVhgnu1SWaherg==", + "dev": true, + "requires": { + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz", + "integrity": "sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-get-function-arity": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-get-function-arity": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz", + "integrity": "sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw==", + "dev": true, + "requires": { + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.0.tgz", + "integrity": "sha512-LUe/92NqsDAkJjjCEWkNe+/PcpnisvnqdlRe19FahVapa4jndeuJ+FBiTX1rcAKWKcJGE+C3Q3tuEuxkSmCEiQ==", + "dev": true, + "requires": { + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.0.tgz", + "integrity": "sha512-QaCZLO2RtBcmvO/ekOLp8p7R5X2JriKRizeDpm5ChATAFWrrYDcDxPuCIBXKyBjY+i1vYSdcUTMIb8psfxHDPA==", + "dev": true, + "requires": { + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.0.tgz", + "integrity": "sha512-Dv3hLKIC1jyfTkClvyEkYP2OlkzNvWs5+Q8WgPbxM5LMeorons7iPP91JM+DU7tRbhqA1ZeooPaMFvQrn23RHw==", + "dev": true, + "requires": { + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-module-transforms": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.7.0.tgz", + "integrity": "sha512-rXEefBuheUYQyX4WjV19tuknrJFwyKw0HgzRwbkyTbB+Dshlq7eqkWbyjzToLrMZk/5wKVKdWFluiAsVkHXvuQ==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.7.0", + "@babel/helper-simple-access": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0", + "lodash": "^4.17.13" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.0.tgz", + "integrity": "sha512-48TeqmbazjNU/65niiiJIJRc5JozB8acui1OS7bSd6PgxfuovWsvjfWSzlgx+gPFdVveNzUdpdIg5l56Pl5jqg==", + "dev": true, + "requires": { + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-plugin-utils": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", + "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", + "dev": true + }, + "@babel/helper-regex": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz", + "integrity": "sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==", + "dev": true, + "requires": { + "lodash": "^4.17.13" + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.0.tgz", + "integrity": "sha512-pHx7RN8X0UNHPB/fnuDnRXVZ316ZigkO8y8D835JlZ2SSdFKb6yH9MIYRU4fy/KPe5sPHDFOPvf8QLdbAGGiyw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.7.0", + "@babel/helper-wrap-function": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-replace-supers": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.7.0.tgz", + "integrity": "sha512-5ALYEul5V8xNdxEeWvRsBzLMxQksT7MaStpxjJf9KsnLxpAKBtfw5NeMKZJSYDa0lKdOcy0g+JT/f5mPSulUgg==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.7.0", + "@babel/helper-optimise-call-expression": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-simple-access": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.7.0.tgz", + "integrity": "sha512-AJ7IZD7Eem3zZRuj5JtzFAptBw7pMlS3y8Qv09vaBWoFsle0d1kAn5Wq6Q9MyBXITPOKnxwkZKoAm4bopmv26g==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz", + "integrity": "sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA==", "dev": true, "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-wrap-function": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.7.0.tgz", + "integrity": "sha512-sd4QjeMgQqzshSjecZjOp8uKfUtnpmCyQhKQrVJBBgeHAB/0FPi33h3AbVlVp07qQtMD4QgYSzaMI7VwncNK/w==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helpers": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.5.tgz", - "integrity": "sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.0.tgz", + "integrity": "sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g==", "dev": true, "requires": { - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5" + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/highlight": { @@ -114,43 +270,523 @@ } }, "@babel/parser": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz", - "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.3.tgz", + "integrity": "sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A==", "dev": true }, - "@babel/template": { + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.0.tgz", + "integrity": "sha512-ot/EZVvf3mXtZq0Pd0+tSOfGWMizqmOohXmNZg6LNFjHOV+wOPv7BvVYh8oPR8LhpIP3ye8nNooKL50YRWxpYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.7.0", + "@babel/plugin-syntax-async-generators": "^7.2.0" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.0.tgz", + "integrity": "sha512-7poL3Xi+QFPC7sGAzEIbXUyYzGJwbc2+gSD0AkiC5k52kH2cqHdqxm5hNFfLW3cRSTcx9bN0Fl7/6zWcLLnKAQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", + "integrity": "sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-json-strings": "^7.2.0" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz", + "integrity": "sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.0.tgz", + "integrity": "sha512-mk34H+hp7kRBWJOOAR0ZMGCydgKMD4iN9TpDRp3IIcbunltxEY89XSimc6WbtSLCDrwcdy/EEw7h5CFCzxTchw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", + "integrity": "sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz", + "integrity": "sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz", + "integrity": "sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", + "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.7.0.tgz", + "integrity": "sha512-hi8FUNiFIY1fnUI2n1ViB1DR0R4QeK4iHcTlW6aJkrPoTdb8Rf1EMQ6GT3f67DDkYyWgew9DFoOZ6gOoEsdzTA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", + "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.0.tgz", + "integrity": "sha512-vLI2EFLVvRBL3d8roAMqtVY0Bm9C1QzLkdS57hiKrjUBSqsQYrBsMCeOg/0KK7B0eK9V71J5mWcha9yyoI2tZw==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.7.0" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz", + "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz", + "integrity": "sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "lodash": "^4.17.13" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.0.tgz", + "integrity": "sha512-/b3cKIZwGeUesZheU9jNYcwrEA7f/Bo4IdPmvp7oHgvks2majB5BoT5byAql44fiNQYOPzhk2w8DbgfuafkMoA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.7.0", + "@babel/helper-define-map": "^7.7.0", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-optimise-call-expression": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz", + "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.6.0.tgz", + "integrity": "sha512-2bGIS5P1v4+sWTCnKNDZDxbGvEqi0ijeqM/YqHtVGrvG2y0ySgnEEhXErvE9dA0bnIzY9bIzdFK0jFA46ASIIQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.0.tgz", + "integrity": "sha512-3QQlF7hSBnSuM1hQ0pS3pmAbWLax/uGNCbPBND9y+oJ4Y776jsyujG2k0Sn2Aj2a0QwVOiOFL5QVPA7spjvzSA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz", + "integrity": "sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz", + "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-for-of": { "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", - "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz", + "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.0.tgz", + "integrity": "sha512-P5HKu0d9+CzZxP5jcrWdpe7ZlFDe24bmqP6a6X8BHEBl/eizAsY8K6LX8LASZL0Jxdjm5eEfzp+FIrxCm/p8bA==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz", + "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz", + "integrity": "sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz", + "integrity": "sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0", + "babel-plugin-dynamic-import-node": "^2.3.0" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.0.tgz", + "integrity": "sha512-KEMyWNNWnjOom8vR/1+d+Ocz/mILZG/eyHHO06OuBQ2aNhxT62fr4y6fGOplRx+CxCSp3IFwesL8WdINfY/3kg==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-simple-access": "^7.7.0", + "babel-plugin-dynamic-import-node": "^2.3.0" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.7.0.tgz", + "integrity": "sha512-ZAuFgYjJzDNv77AjXRqzQGlQl4HdUM6j296ee4fwKVZfhDR9LAGxfvXjBkb06gNETPnN0sLqRm9Gxg4wZH6dXg==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0", + "babel-plugin-dynamic-import-node": "^2.3.0" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.7.0.tgz", + "integrity": "sha512-u7eBA03zmUswQ9LQ7Qw0/ieC1pcAkbp5OQatbWUzY1PaBccvuJXUkYzoN1g7cqp7dbTu6Dp9bXyalBvD04AANA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.7.0.tgz", + "integrity": "sha512-+SicSJoKouPctL+j1pqktRVCgy+xAch1hWWTMy13j0IflnyNjaoskj+DwRQFimHbLqO3sq2oN2CXMvXq3Bgapg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.7.0" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz", + "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz", + "integrity": "sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.5.5" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz", + "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==", + "dev": true, + "requires": { + "@babel/helper-call-delegate": "^7.4.4", + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz", + "integrity": "sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.0.tgz", + "integrity": "sha512-AXmvnC+0wuj/cFkkS/HFHIojxH3ffSXE+ttulrqWjZZRaUOonfJc60e1wSNT4rV8tIunvu/R3wCp71/tLAa9xg==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.0" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz", + "integrity": "sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", + "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.6.2.tgz", + "integrity": "sha512-DpSvPFryKdK1x+EDJYCy28nmAaIMdxmhot62jAXF/o99iA33Zj2Lmcp3vDmz+MUh0LNYVPvfj5iC3feb3/+PFg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz", + "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.0.0" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz", + "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", + "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.0.tgz", + "integrity": "sha512-RrThb0gdrNwFAqEAAx9OWgtx6ICK69x7i9tCnMdVrxQwSDp/Abu9DXFU5Hh16VP33Rmxh04+NGW28NsIkFvFKA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/preset-env": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.7.1.tgz", + "integrity": "sha512-/93SWhi3PxcVTDpSqC+Dp4YxUu3qZ4m7I76k0w73wYfn7bGVuRIO4QUz95aJksbS+AD1/mT1Ie7rbkT0wSplaA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.7.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-async-generator-functions": "^7.7.0", + "@babel/plugin-proposal-dynamic-import": "^7.7.0", + "@babel/plugin-proposal-json-strings": "^7.2.0", + "@babel/plugin-proposal-object-rest-spread": "^7.6.2", + "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.7.0", + "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", + "@babel/plugin-syntax-json-strings": "^7.2.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", + "@babel/plugin-syntax-top-level-await": "^7.7.0", + "@babel/plugin-transform-arrow-functions": "^7.2.0", + "@babel/plugin-transform-async-to-generator": "^7.7.0", + "@babel/plugin-transform-block-scoped-functions": "^7.2.0", + "@babel/plugin-transform-block-scoping": "^7.6.3", + "@babel/plugin-transform-classes": "^7.7.0", + "@babel/plugin-transform-computed-properties": "^7.2.0", + "@babel/plugin-transform-destructuring": "^7.6.0", + "@babel/plugin-transform-dotall-regex": "^7.7.0", + "@babel/plugin-transform-duplicate-keys": "^7.5.0", + "@babel/plugin-transform-exponentiation-operator": "^7.2.0", + "@babel/plugin-transform-for-of": "^7.4.4", + "@babel/plugin-transform-function-name": "^7.7.0", + "@babel/plugin-transform-literals": "^7.2.0", + "@babel/plugin-transform-member-expression-literals": "^7.2.0", + "@babel/plugin-transform-modules-amd": "^7.5.0", + "@babel/plugin-transform-modules-commonjs": "^7.7.0", + "@babel/plugin-transform-modules-systemjs": "^7.7.0", + "@babel/plugin-transform-modules-umd": "^7.7.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.7.0", + "@babel/plugin-transform-new-target": "^7.4.4", + "@babel/plugin-transform-object-super": "^7.5.5", + "@babel/plugin-transform-parameters": "^7.4.4", + "@babel/plugin-transform-property-literals": "^7.2.0", + "@babel/plugin-transform-regenerator": "^7.7.0", + "@babel/plugin-transform-reserved-words": "^7.2.0", + "@babel/plugin-transform-shorthand-properties": "^7.2.0", + "@babel/plugin-transform-spread": "^7.6.2", + "@babel/plugin-transform-sticky-regex": "^7.2.0", + "@babel/plugin-transform-template-literals": "^7.4.4", + "@babel/plugin-transform-typeof-symbol": "^7.2.0", + "@babel/plugin-transform-unicode-regex": "^7.7.0", + "@babel/types": "^7.7.1", + "browserslist": "^4.6.0", + "core-js-compat": "^3.1.1", + "invariant": "^2.2.2", + "js-levenshtein": "^1.1.3", + "semver": "^5.5.0" + } + }, + "@babel/template": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.0.tgz", + "integrity": "sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4" + "@babel/parser": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/traverse": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz", - "integrity": "sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.2.tgz", + "integrity": "sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw==", "dev": true, "requires": { "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.5.5", - "@babel/types": "^7.5.5", + "@babel/generator": "^7.7.2", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/types": "^7.7.2", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", - "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.2.tgz", + "integrity": "sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -198,9 +834,9 @@ "dev": true }, "@types/node": { - "version": "12.7.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.3.tgz", - "integrity": "sha512-3SiLAIBkDWDg6vFo0+5YJyHPWU9uwu40Qe+v+0MH8wRKYBimHvvAOyk3EzMrD/TrIlLYfXrqDqrg913PynrMJQ==", + "version": "12.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", + "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==", "dev": true }, "@types/unist": { @@ -221,19 +857,19 @@ } }, "@types/vfile-message": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/vfile-message/-/vfile-message-1.0.1.tgz", - "integrity": "sha512-mlGER3Aqmq7bqR1tTTIVHq8KSAFFRyGbrxuM8C/H82g6k7r2fS+IMEkIu3D7JHzG10NvPdR8DNx0jr0pwpp4dA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/vfile-message/-/vfile-message-2.0.0.tgz", + "integrity": "sha512-GpTIuDpb9u4zIO165fUy9+fXcULdD8HFRNli04GehoMVbeNq7D6OBnqSmg3lxZnC+UvgUhEWKxdKiwYUkGltIw==", "dev": true, "requires": { - "@types/node": "*", - "@types/unist": "*" + "vfile-message": "*" } }, "@webassemblyjs/ast": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", + "dev": true, "requires": { "@webassemblyjs/helper-module-context": "1.8.5", "@webassemblyjs/helper-wasm-bytecode": "1.8.5", @@ -243,22 +879,26 @@ "@webassemblyjs/floating-point-hex-parser": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", - "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==" + "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", + "dev": true }, "@webassemblyjs/helper-api-error": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", - "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==" + "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", + "dev": true }, "@webassemblyjs/helper-buffer": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", - "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==" + "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", + "dev": true }, "@webassemblyjs/helper-code-frame": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", + "dev": true, "requires": { "@webassemblyjs/wast-printer": "1.8.5" } @@ -266,12 +906,14 @@ "@webassemblyjs/helper-fsm": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", - "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==" + "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", + "dev": true }, "@webassemblyjs/helper-module-context": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "mamacro": "^0.0.3" @@ -280,12 +922,14 @@ "@webassemblyjs/helper-wasm-bytecode": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", - "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==" + "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", + "dev": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-buffer": "1.8.5", @@ -297,6 +941,7 @@ "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", + "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } @@ -305,6 +950,7 @@ "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", + "dev": true, "requires": { "@xtuc/long": "4.2.2" } @@ -312,12 +958,14 @@ "@webassemblyjs/utf8": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", - "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==" + "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", + "dev": true }, "@webassemblyjs/wasm-edit": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-buffer": "1.8.5", @@ -333,6 +981,7 @@ "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-wasm-bytecode": "1.8.5", @@ -345,6 +994,7 @@ "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-buffer": "1.8.5", @@ -356,6 +1006,7 @@ "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-api-error": "1.8.5", @@ -369,6 +1020,7 @@ "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/floating-point-hex-parser": "1.8.5", @@ -382,6 +1034,7 @@ "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/wast-parser": "1.8.5", @@ -391,23 +1044,25 @@ "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true }, "@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true }, "acorn": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.0.0.tgz", - "integrity": "sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", "dev": true }, "acorn-jsx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", - "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", "dev": true }, "agent-base": { @@ -428,10 +1083,29 @@ "humanize-ms": "^1.2.1" } }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "dependencies": { + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + } + } + }, "ajv": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", @@ -442,12 +1116,14 @@ "ajv-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==" + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true }, "ajv-keywords": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", - "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==" + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "dev": true }, "amdefine": { "version": "1.0.1", @@ -456,15 +1132,18 @@ "dev": true }, "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.2.1.tgz", + "integrity": "sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==", + "dev": true, + "requires": { + "type-fest": "^0.5.2" + } }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { @@ -480,6 +1159,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" @@ -489,6 +1169,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, "requires": { "remove-trailing-separator": "^1.0.1" } @@ -498,7 +1179,8 @@ "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true }, "argparse": { "version": "1.0.10", @@ -512,17 +1194,20 @@ "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true }, "array-find-index": { "version": "1.0.2", @@ -548,7 +1233,8 @@ "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true }, "arrify": { "version": "1.0.1", @@ -577,6 +1263,7 @@ "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -587,6 +1274,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, "requires": { "object-assign": "^4.1.1", "util": "0.10.3" @@ -595,12 +1283,14 @@ "inherits": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true }, "util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, "requires": { "inherits": "2.0.1" } @@ -617,7 +1307,8 @@ "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true }, "astral-regex": { "version": "1.0.0", @@ -628,7 +1319,8 @@ "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true }, "asynckit": { "version": "0.4.0", @@ -640,21 +1332,22 @@ "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true }, "autoprefixer": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.1.tgz", - "integrity": "sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw==", + "version": "9.7.1", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.1.tgz", + "integrity": "sha512-w3b5y1PXWlhYulevrTJ0lizkQ5CyqfeU6BIRDbuhsMupstHQOeb1Ur80tcB1zxSu7AwyY/qCQ7Vvqklh31ZBFw==", "dev": true, "requires": { - "browserslist": "^4.6.3", - "caniuse-lite": "^1.0.30000980", + "browserslist": "^4.7.2", + "caniuse-lite": "^1.0.30001006", "chalk": "^2.4.2", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.17", - "postcss-value-parser": "^4.0.0" + "postcss": "^7.0.21", + "postcss-value-parser": "^4.0.2" } }, "aws-sign2": { @@ -671,6 +1364,27 @@ "dev": true, "optional": true }, + "babel-loader": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.6.tgz", + "integrity": "sha512-4BmWKtBOBm13uoUwd08UwjZlaw3O9GWf456R9j+5YykFZ6LUIjIKLc0zEZf+hauxPOJs96C8k6FvYD09vWzhYw==", + "dev": true, + "requires": { + "find-cache-dir": "^2.0.0", + "loader-utils": "^1.0.2", + "mkdirp": "^0.5.1", + "pify": "^4.0.1" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", + "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, "bail": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.4.tgz", @@ -680,12 +1394,14 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", @@ -700,6 +1416,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -708,6 +1425,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -716,6 +1434,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -724,6 +1443,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -735,7 +1455,8 @@ "base64-js": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "dev": true }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -750,27 +1471,32 @@ "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true }, "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true }, "bluebird": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", - "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==" + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", + "integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==", + "dev": true }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -780,6 +1506,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", @@ -797,6 +1524,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -806,12 +1534,14 @@ "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -825,6 +1555,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, "requires": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -835,6 +1566,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", @@ -846,6 +1578,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" @@ -855,6 +1588,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, "requires": { "bn.js": "^4.1.1", "browserify-rsa": "^4.0.0", @@ -869,25 +1603,27 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, "requires": { "pako": "~1.0.5" } }, "browserslist": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.0.tgz", - "integrity": "sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.2.tgz", + "integrity": "sha512-uZavT/gZXJd2UTi9Ov7/Z340WOSQ3+m1iBVRUknf+okKxonL9P83S3ctiBDtuRmRu8PiCHjqyueqQ9HYlJhxiw==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000989", - "electron-to-chromium": "^1.3.247", - "node-releases": "^1.1.29" + "caniuse-lite": "^1.0.30001004", + "electron-to-chromium": "^1.3.295", + "node-releases": "^1.1.38" } }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4", @@ -897,44 +1633,63 @@ "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true }, "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true }, "cacache": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", - "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", + "integrity": "sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==", + "dev": true, "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", + "chownr": "^1.1.2", "figgy-pudding": "^3.5.1", + "fs-minipass": "^2.0.0", "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", + "graceful-fs": "^4.2.2", + "infer-owner": "^1.0.4", "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", + "minipass": "^3.0.0", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", + "p-map": "^3.0.0", "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" + "rimraf": "^2.7.1", + "ssri": "^7.0.0", + "unique-filename": "^1.1.1" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", @@ -1011,9 +1766,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000989", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz", - "integrity": "sha512-vrMcvSuMz16YY6GSVZ0dWDTJP8jqk3iFQ/Aq5iqblPwxSVVZI+zxDyTX0VPqtQsDnfdrBDcsmhgTEOh5R8Lbpw==", + "version": "1.0.30001009", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001009.tgz", + "integrity": "sha512-M3rEqHN6SaVjgo4bIik7HsGcWXsi+lI9WA0p51RPMFx5gXfduyOXWJrc0R4xBkSK1pgNf4CNgy5M+6H+WiEP8g==", "dev": true }, "caseless": { @@ -1074,6 +1829,7 @@ "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, "requires": { "anymatch": "^2.0.0", "async-each": "^1.0.1", @@ -1093,6 +1849,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, "requires": { "is-glob": "^3.1.0", "path-dirname": "^1.0.0" @@ -1102,6 +1859,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, "requires": { "is-extglob": "^2.1.0" } @@ -1111,14 +1869,16 @@ } }, "chownr": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz", - "integrity": "sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A==" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", + "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==", + "dev": true }, "chrome-trace-event": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", + "dev": true, "requires": { "tslib": "^1.9.0" } @@ -1127,6 +1887,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -1136,6 +1897,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", @@ -1147,6 +1909,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -1174,13 +1937,19 @@ } } }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "^3.1.0" } }, "cli-width": { @@ -1200,6 +1969,28 @@ "wrap-ansi": "^2.0.0" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -1242,6 +2033,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" @@ -1284,22 +2076,26 @@ "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, "requires": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", @@ -1307,37 +2103,37 @@ "typedarray": "^0.0.6" } }, + "confusing-browser-globals": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz", + "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==" + }, "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true }, "constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true }, "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "safe-buffer": "~5.1.1" } }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, "requires": { "aproba": "^1.1.1", "fs-write-stream-atomic": "^1.0.8", @@ -1350,12 +2146,32 @@ "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js-compat": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.4.1.tgz", + "integrity": "sha512-YdeJI26gLc0CQJ9asLE5obEgBz2I0+CIgnoTbS2T0d5IPQw/OCgCIFR527RmpduxjrB3gSEHoGOCTq9sigOyfw==", + "dev": true, + "requires": { + "browserslist": "^4.7.2", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "cosmiconfig": { "version": "5.2.1", @@ -1391,6 +2207,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, "requires": { "bn.js": "^4.1.0", "elliptic": "^6.0.0" @@ -1400,6 +2217,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -1412,6 +2230,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -1438,6 +2257,7 @@ "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, "requires": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -1462,9 +2282,10 @@ } }, "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true }, "dashdash": { "version": "1.14.1", @@ -1512,7 +2333,8 @@ "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true }, "deep-extend": { "version": "0.6.0", @@ -1526,10 +2348,19 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" @@ -1539,6 +2370,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1547,6 +2379,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1555,6 +2388,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1577,9 +2411,10 @@ "dev": true }, "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -1595,6 +2430,7 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, "requires": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", @@ -1620,9 +2456,9 @@ } }, "dom-serializer": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz", - "integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", "dev": true, "requires": { "domelementtype": "^2.0.1", @@ -1646,7 +2482,8 @@ "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true }, "domelementtype": { "version": "1.3.1", @@ -1686,6 +2523,7 @@ "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, "requires": { "end-of-stream": "^1.0.0", "inherits": "^2.0.1", @@ -1705,15 +2543,16 @@ } }, "electron-to-chromium": { - "version": "1.3.249", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.249.tgz", - "integrity": "sha512-BSNKVkF67cfgwCOJD3/eyIFi001+8mRoazPJYZRpxxtabToCDCef1vhZMDjA6CPfAdgOI0QMOiGLELgJVYP76Q==", + "version": "1.3.306", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.306.tgz", + "integrity": "sha512-frDqXvrIROoYvikSKTIKbHbzO6M3/qC6kCIt/1FOa9kALe++c4VAJnwjSFvf1tYLEUsP2n9XZ4XSCyqc3l7A/A==", "dev": true }, "elliptic": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", + "dev": true, "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -1725,41 +2564,57 @@ } }, "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", "dev": true, + "optional": true, "requires": { "iconv-lite": "~0.4.13" } }, "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, "requires": { "once": "^1.4.0" } }, "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz", + "integrity": "sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA==", + "dev": true, "requires": { "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", + "memory-fs": "^0.5.0", "tapable": "^1.0.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + } } }, "entities": { @@ -1778,6 +2633,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, "requires": { "prr": "~1.0.1" } @@ -1791,6 +2647,33 @@ "is-arrayish": "^0.2.1" } }, + "es-abstract": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", + "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", + "requires": { + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.0", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-inspect": "^1.6.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.1.0", + "string.prototype.trimright": "^2.1.0" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", @@ -1813,9 +2696,9 @@ "dev": true }, "eslint": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.3.0.tgz", - "integrity": "sha512-ZvZTKaqDue+N8Y9g0kp6UPZtS4FSY3qARxBs7p4f0H0iof381XHduqVerFWtK8DPtKmemqbqCFENWSQgPR/Gow==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.6.0.tgz", + "integrity": "sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1825,9 +2708,9 @@ "debug": "^4.0.1", "doctrine": "^3.0.0", "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.2", + "eslint-utils": "^1.4.3", "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.1", + "espree": "^6.1.2", "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -1837,7 +2720,7 @@ "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.4.1", + "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", @@ -1865,6 +2748,16 @@ } } }, + "eslint-config-airbnb-base": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.0.0.tgz", + "integrity": "sha512-2IDHobw97upExLmsebhtfoD3NAKhV4H0CJWP3Uprd/uk+cHuWYOczPVxQ8PxLFUAw7o3Th1RAU8u1DoUpr+cMA==", + "requires": { + "confusing-browser-globals": "^1.0.7", + "object.assign": "^4.1.0", + "object.entries": "^1.1.0" + } + }, "eslint-scope": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", @@ -1876,12 +2769,12 @@ } }, "eslint-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", - "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.0.0" + "eslint-visitor-keys": "^1.1.0" } }, "eslint-visitor-keys": { @@ -1891,13 +2784,13 @@ "dev": true }, "espree": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.1.tgz", - "integrity": "sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", + "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", "dev": true, "requires": { - "acorn": "^7.0.0", - "acorn-jsx": "^5.0.2", + "acorn": "^7.1.0", + "acorn-jsx": "^5.1.0", "eslint-visitor-keys": "^1.1.0" } }, @@ -1920,6 +2813,7 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, "requires": { "estraverse": "^4.1.0" } @@ -1927,7 +2821,8 @@ "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true }, "esutils": { "version": "2.0.3", @@ -1938,12 +2833,14 @@ "events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==" + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "dev": true }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -1977,6 +2874,7 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", @@ -1991,6 +2889,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -1999,6 +2898,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -2007,6 +2907,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -2014,7 +2915,8 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -2037,6 +2939,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -2046,6 +2949,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -2067,6 +2971,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", @@ -2082,6 +2987,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -2090,6 +2996,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -2098,6 +3005,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -2106,6 +3014,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -2114,6 +3023,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -2132,7 +3042,8 @@ "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true }, "fast-glob": { "version": "2.2.7", @@ -2174,7 +3085,8 @@ "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -2185,12 +3097,13 @@ "figgy-pudding": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==" + "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "dev": true }, "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", + "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" @@ -2209,6 +3122,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", @@ -2220,6 +3134,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -2230,6 +3145,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, "requires": { "commondir": "^1.0.1", "make-dir": "^2.0.0", @@ -2240,6 +3156,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -2277,6 +3194,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, "requires": { "inherits": "^2.0.3", "readable-stream": "^2.3.6" @@ -2285,7 +3203,8 @@ "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true }, "forever-agent": { "version": "0.6.1", @@ -2310,6 +3229,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, "requires": { "map-cache": "^0.2.2" } @@ -2318,6 +3238,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, "requires": { "inherits": "^2.0.1", "readable-stream": "^2.0.0" @@ -2334,10 +3255,20 @@ "universalify": "^0.1.0" } }, + "fs-minipass": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.0.0.tgz", + "integrity": "sha512-40Qz+LFXmd9tzYVnnBmZvFfvAADfUA14TXPK1s7IfElJTIZ97rA8w4Kin7Wt5JBrC3ShnnFJO/5vPjPEeJIq9A==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, "requires": { "graceful-fs": "^4.1.2", "iferr": "^0.1.5", @@ -2348,12 +3279,14 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, "optional": true, "requires": { "nan": "^2.12.1", @@ -2363,21 +3296,25 @@ "abbrev": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", "bundled": true, + "dev": true, "optional": true }, "aproba": { "version": "1.2.0", "bundled": true, + "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "delegates": "^1.0.0", @@ -2387,11 +3324,13 @@ "balanced-match": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "dev": true, "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -2401,31 +3340,37 @@ "chownr": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, + "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "debug": { "version": "4.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ms": "^2.1.1" @@ -2434,21 +3379,25 @@ "deep-extend": { "version": "0.6.0", "bundled": true, + "dev": true, "optional": true }, "delegates": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", "bundled": true, + "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.2.1" @@ -2457,11 +3406,13 @@ "fs.realpath": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, + "dev": true, "optional": true, "requires": { "aproba": "^1.0.3", @@ -2477,6 +3428,7 @@ "glob": { "version": "7.1.3", "bundled": true, + "dev": true, "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -2490,11 +3442,13 @@ "has-unicode": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", "bundled": true, + "dev": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -2503,6 +3457,7 @@ "ignore-walk": { "version": "3.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "minimatch": "^3.0.4" @@ -2511,6 +3466,7 @@ "inflight": { "version": "1.0.6", "bundled": true, + "dev": true, "optional": true, "requires": { "once": "^1.3.0", @@ -2520,16 +3476,19 @@ "inherits": { "version": "2.0.3", "bundled": true, + "dev": true, "optional": true }, "ini": { "version": "1.3.5", "bundled": true, + "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -2538,11 +3497,13 @@ "isarray": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", "bundled": true, + "dev": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" @@ -2551,11 +3512,13 @@ "minimist": { "version": "0.0.8", "bundled": true, + "dev": true, "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -2565,6 +3528,7 @@ "minizlib": { "version": "1.2.1", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.2.1" @@ -2573,6 +3537,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "dev": true, "optional": true, "requires": { "minimist": "0.0.8" @@ -2581,11 +3546,13 @@ "ms": { "version": "2.1.1", "bundled": true, + "dev": true, "optional": true }, "needle": { "version": "2.3.0", "bundled": true, + "dev": true, "optional": true, "requires": { "debug": "^4.1.0", @@ -2596,6 +3563,7 @@ "node-pre-gyp": { "version": "0.12.0", "bundled": true, + "dev": true, "optional": true, "requires": { "detect-libc": "^1.0.2", @@ -2613,6 +3581,7 @@ "nopt": { "version": "4.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "abbrev": "1", @@ -2622,11 +3591,13 @@ "npm-bundled": { "version": "1.0.6", "bundled": true, + "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -2636,6 +3607,7 @@ "npmlog": { "version": "4.1.2", "bundled": true, + "dev": true, "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -2647,16 +3619,19 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", "bundled": true, + "dev": true, "optional": true }, "once": { "version": "1.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "wrappy": "1" @@ -2665,16 +3640,19 @@ "os-homedir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -2684,16 +3662,19 @@ "path-is-absolute": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", "bundled": true, + "dev": true, "optional": true }, "rc": { "version": "1.2.8", "bundled": true, + "dev": true, "optional": true, "requires": { "deep-extend": "^0.6.0", @@ -2705,6 +3686,7 @@ "minimist": { "version": "1.2.0", "bundled": true, + "dev": true, "optional": true } } @@ -2712,6 +3694,7 @@ "readable-stream": { "version": "2.3.6", "bundled": true, + "dev": true, "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -2726,6 +3709,7 @@ "rimraf": { "version": "2.6.3", "bundled": true, + "dev": true, "optional": true, "requires": { "glob": "^7.1.3" @@ -2734,36 +3718,43 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, + "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "sax": { "version": "1.2.4", "bundled": true, + "dev": true, "optional": true }, "semver": { "version": "5.7.0", "bundled": true, + "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", "bundled": true, + "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", "bundled": true, + "dev": true, "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -2774,6 +3765,7 @@ "string_decoder": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -2782,6 +3774,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -2790,11 +3783,13 @@ "strip-json-comments": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "tar": { "version": "4.4.8", "bundled": true, + "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", @@ -2809,11 +3804,13 @@ "util-deprecate": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -2822,15 +3819,22 @@ "wrappy": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, + "dev": true, "optional": true } } }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -2861,7 +3865,8 @@ "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true }, "getpass": { "version": "0.1.7", @@ -2874,9 +3879,10 @@ } }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2887,9 +3893,9 @@ } }, "glob-parent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", - "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -2967,9 +3973,10 @@ } }, "graceful-fs": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", - "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==" + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true }, "graceful-readlink": { "version": "1.0.1", @@ -2995,16 +4002,30 @@ "har-schema": "^2.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", @@ -3015,6 +4036,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" @@ -3024,6 +4046,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3034,6 +4057,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -3043,6 +4067,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -3052,6 +4077,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -3068,9 +4094,9 @@ } }, "hosted-git-info": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.4.tgz", - "integrity": "sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ==", + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", "dev": true }, "html-tags": { @@ -3154,12 +4180,13 @@ "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true }, "https-proxy-agent": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz", - "integrity": "sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", "dev": true, "requires": { "agent-base": "^4.3.0", @@ -3198,12 +4225,14 @@ "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true }, "iferr": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true }, "ignore": { "version": "4.0.6", @@ -3228,9 +4257,9 @@ } }, "import-fresh": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", - "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -3273,7 +4302,8 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true }, "indent-string": { "version": "3.2.0", @@ -3290,12 +4320,14 @@ "infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -3304,7 +4336,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "ini": { "version": "1.3.5", @@ -3313,22 +4346,22 @@ "dev": true }, "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz", + "integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==", "dev": true, "requires": { - "ansi-escapes": "^3.2.0", + "ansi-escapes": "^4.2.1", "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", + "cli-cursor": "^3.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", "run-async": "^2.2.0", "rxjs": "^6.4.0", - "string-width": "^2.1.0", + "string-width": "^4.1.0", "strip-ansi": "^5.1.0", "through": "^2.3.6" } @@ -3339,6 +4372,15 @@ "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", @@ -3355,6 +4397,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -3363,6 +4406,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3401,6 +4445,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, "requires": { "binary-extensions": "^1.0.0" } @@ -3408,12 +4453,19 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -3422,12 +4474,18 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } } } }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, "is-decimal": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.3.tgz", @@ -3438,6 +4496,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", @@ -3447,7 +4506,8 @@ "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true } } }, @@ -3460,23 +4520,26 @@ "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -3491,6 +4554,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -3499,6 +4563,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3521,6 +4586,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, "requires": { "isobject": "^3.0.1" } @@ -3531,6 +4597,14 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "^1.0.1" + } + }, "is-regexp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz", @@ -3543,6 +4617,14 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-symbol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "requires": { + "has-symbols": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -3559,7 +4641,8 @@ "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true }, "is-word-character": { "version": "1.0.3", @@ -3570,12 +4653,14 @@ "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, "isexe": { "version": "2.0.0", @@ -3586,7 +4671,8 @@ "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true }, "isstream": { "version": "0.1.2", @@ -3595,6 +4681,12 @@ "dev": true, "optional": true }, + "js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3627,7 +4719,8 @@ "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true }, "json-schema": { "version": "0.2.3", @@ -3639,7 +4732,8 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -3655,20 +4749,12 @@ "optional": true }, "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", + "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", "dev": true, "requires": { "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } } }, "jsonfile": { @@ -3696,12 +4782,13 @@ "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true }, "known-css-properties": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.14.0.tgz", - "integrity": "sha512-P+0a/gBzLgVlCnK8I7VcD0yuYJscmWn66wH9tlKsQnmVdg689tLEmziwB9PuazZYLkcm07fvWOKCJJqI55sD5Q==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.16.0.tgz", + "integrity": "sha512-0g5vDDPvNnQk7WM/aE92dTDxXJoOE0biiIcUb3qkn/F6h/ZQZPlZIbE2XSXH2vFPfphkgCxuR2vH6HHnobEOaQ==", "dev": true }, "lcid": { @@ -3728,6 +4815,15 @@ "promise": "^7.1.1", "request": "^2.83.0", "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } } }, "less-plugin-clean-css": { @@ -3778,12 +4874,14 @@ "loader-runner": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==" + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true }, "loader-utils": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, "requires": { "big.js": "^5.2.2", "emojis-list": "^2.0.0", @@ -3794,14 +4892,10 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, "requires": { "minimist": "^1.2.0" } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } }, @@ -3809,6 +4903,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -3835,6 +4930,15 @@ "integrity": "sha512-9lz5IVdpwsKLMzQi0MQ+oD9EA0mIGcWYP7jXMTZVXP8D42PwuAk+M/HBFYQoxt1G5OR8m7aSIgb1UymfWGBWEw==", "dev": true }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -3849,6 +4953,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, "requires": { "yallist": "^3.0.2" } @@ -3857,34 +4962,39 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, "requires": { "pify": "^4.0.1", "semver": "^5.6.0" } }, "make-fetch-happen": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.0.tgz", - "integrity": "sha512-nFr/vpL1Jc60etMVKeaLOqfGjMMb3tAHFVJWxHOFCFS04Zmd7kGlMxo0l1tzfhoQje0/UPnd0X8OeGUiXXnfPA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-6.0.0.tgz", + "integrity": "sha512-0c4s/5ktozfRWPvii/Bang+an/YCPzkTRFSzEC6uBMTUp02ZskNGgNFm0rmmMLYlFN5OvW7HruLIDSS2fjQjOA==", "dev": true, "requires": { "agentkeepalive": "^3.4.1", - "cacache": "^12.0.0", + "cacache": "^13.0.1", "http-cache-semantics": "^3.8.1", "http-proxy-agent": "^2.1.0", "https-proxy-agent": "^2.2.1", "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "node-fetch-npm": "^2.0.2", + "minipass": "^3.0.0", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.1.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", "promise-retry": "^1.1.1", "socks-proxy-agent": "^4.0.0", - "ssri": "^6.0.0" + "ssri": "^7.0.1" } }, "mamacro": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==" + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true }, "map-age-cleaner": { "version": "0.1.3", @@ -3898,7 +5008,8 @@ "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true }, "map-obj": { "version": "2.0.0", @@ -3910,6 +5021,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, "requires": { "object-visit": "^1.0.0" } @@ -3936,6 +5048,7 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -3943,9 +5056,9 @@ } }, "mdast-util-compact": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.3.tgz", - "integrity": "sha512-nRiU5GpNy62rZppDKbLwhhtw5DXoFMqw9UNZFmlPsNaQCZ//WLjGKUwWMdJrUH+Se7UvtO2gXtAMe0g/N+eI5w==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.4.tgz", + "integrity": "sha512-3YDMQHI5vRiS2uygEFYaqckibpJtKq5Sj2c8JioeOQBU6INpKbdWzfyLqFFnDwEcEnRFIdMsguzs5pC1Jp4Isg==", "dev": true, "requires": { "unist-util-visit": "^1.1.0" @@ -3960,20 +5073,13 @@ "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", "p-is-promise": "^2.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - } } }, "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, "requires": { "errno": "^0.1.3", "readable-stream": "^2.0.1" @@ -4014,15 +5120,16 @@ } }, "merge2": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.4.tgz", - "integrity": "sha512-FYE8xI+6pjFOhokZu0We3S5NKCirLbCzSh2Usf3qEyr4X8U+0jNg9P8RZ4qz+V2UoECLVwSyzU3LxXBaLGtD3A==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", + "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", "dev": true }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -4043,6 +5150,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -4056,50 +5164,54 @@ "optional": true }, "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "version": "1.42.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz", + "integrity": "sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==", "dev": true, "optional": true }, "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "version": "2.1.25", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz", + "integrity": "sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==", "dev": true, "optional": true, "requires": { - "mime-db": "1.40.0" + "mime-db": "1.42.0" } }, "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true }, "minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true }, "minimist-options": { "version": "3.0.2", @@ -4111,10 +5223,95 @@ "is-plain-obj": "^1.1.0" } }, + "minipass": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", + "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-fetch": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.2.1.tgz", + "integrity": "sha512-ssHt0dkljEDaKmTgQ04DQgx2ag6G2gMPxA5hpcsoeTbfDgRf2fC2gNSRc6kISjD7ckCpHwwQvXxuTBK8402fXg==", + "dev": true, + "requires": { + "encoding": "^0.1.12", + "minipass": "^3.1.0", + "minipass-pipeline": "^1.2.2", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" + } + }, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-pipeline": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz", + "integrity": "sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minizlib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.0.tgz", + "integrity": "sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA==", + "dev": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, "requires": { "concat-stream": "^1.5.0", "duplexify": "^3.4.2", @@ -4132,6 +5329,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -4141,6 +5339,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -4151,14 +5350,24 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, "requires": { "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } } }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, "requires": { "aproba": "^1.1.1", "copy-concurrently": "^1.0.0", @@ -4175,21 +5384,23 @@ "dev": true }, "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, "nan": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true, "optional": true }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -4213,7 +5424,8 @@ "neo-async": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true }, "nice-try": { "version": "1.0.5", @@ -4221,21 +5433,11 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, - "node-fetch-npm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", - "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", - "dev": true, - "requires": { - "encoding": "^0.1.11", - "json-parse-better-errors": "^1.0.0", - "safe-buffer": "^5.1.1" - } - }, "node-libs-browser": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, "requires": { "assert": "^1.1.1", "browserify-zlib": "^0.2.0", @@ -4265,17 +5467,26 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true } } }, "node-releases": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.29.tgz", - "integrity": "sha512-R5bDhzh6I+tpi/9i2hrrvGJ3yKPYzlVOORDkXhnZuwi5D3q1I5w4vYy24PJXTcLk9Q0kws9TO77T75bcK8/ysQ==", + "version": "1.1.40", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.40.tgz", + "integrity": "sha512-r4LPcC5b/bS8BdtWH1fbeK88ib/wg9aqmg6/s3ngNLn2Ewkn/8J6Iw3P9RTlfIAdSdvYvQl2thCY5Y+qTAQ2iQ==", "dev": true, "requires": { - "semver": "^5.3.0" + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "normalize-package-data": { @@ -4293,7 +5504,8 @@ "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "normalize-range": { "version": "0.1.2", @@ -4338,12 +5550,14 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", @@ -4354,6 +5568,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -4362,24 +5577,59 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } } } }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, "requires": { "isobject": "^3.0.0" } }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.entries": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", + "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, "requires": { "isobject": "^3.0.1" } @@ -4388,37 +5638,39 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } }, "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "^2.1.0" } }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "word-wrap": "~1.2.3" } }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true }, "os-locale": { "version": "3.1.0", @@ -4459,6 +5711,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, "requires": { "p-try": "^2.0.0" } @@ -4467,26 +5720,39 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, "requires": { "p-limit": "^2.0.0" } }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true }, "pako": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "dev": true }, "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dev": true, "requires": { - "cyclist": "~0.2.2", + "cyclist": "^1.0.1", "inherits": "^2.0.3", "readable-stream": "^2.1.5" } @@ -4504,6 +5770,7 @@ "version": "5.1.5", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "dev": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", @@ -4546,27 +5813,32 @@ "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true }, "path-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-key": { "version": "2.0.1", @@ -4601,6 +5873,7 @@ "version": "3.0.17", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -4617,20 +5890,22 @@ "optional": true }, "picomatch": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz", - "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz", + "integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==", "dev": true }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true }, "pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, "requires": { "find-up": "^3.0.0" } @@ -4638,12 +5913,13 @@ "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true }, "postcss": { - "version": "7.0.17", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", - "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", + "version": "7.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz", + "integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -4651,6 +5927,12 @@ "supports-color": "^6.1.0" }, "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -4763,13 +6045,13 @@ } }, "postcss-sass": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.5.tgz", - "integrity": "sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.4.2.tgz", + "integrity": "sha512-hcRgnd91OQ6Ot9R90PE/khUDCJHG8Uxxd3F7Y0+9VHjBiJgNv7sK5FxyHMCBtoLmmkzVbSj3M3OlqUfLJpq0CQ==", "dev": true, "requires": { - "gonzales-pe": "^4.2.3", - "postcss": "^7.0.1" + "gonzales-pe": "^4.2.4", + "postcss": "^7.0.21" } }, "postcss-scss": { @@ -4816,15 +6098,23 @@ "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true }, "progress": { "version": "2.0.3", @@ -4845,7 +6135,8 @@ "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true }, "promise-retry": { "version": "1.1.1", @@ -4860,12 +6151,13 @@ "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true }, "psl": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", - "integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz", + "integrity": "sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==", "dev": true, "optional": true }, @@ -4873,6 +6165,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", @@ -4886,6 +6179,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -4895,6 +6189,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, "requires": { "duplexify": "^3.6.0", "inherits": "^2.0.3", @@ -4905,6 +6200,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -4915,7 +6211,8 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "qs": { "version": "6.5.2", @@ -4927,12 +6224,14 @@ "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true }, "querystring-es3": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true }, "quick-lru": { "version": "1.1.0", @@ -4944,6 +6243,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "requires": { "safe-buffer": "^5.1.0" } @@ -4952,6 +6252,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, "requires": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" @@ -4969,12 +6270,6 @@ "strip-json-comments": "~2.0.1" }, "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -5070,6 +6365,7 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -5078,19 +6374,13 @@ "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } } }, "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, "requires": { "graceful-fs": "^4.1.11", "micromatch": "^3.1.10", @@ -5107,10 +6397,35 @@ "strip-indent": "^2.0.0" } }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", + "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-transform": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", + "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", + "dev": true, + "requires": { + "private": "^0.1.6" + } + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" @@ -5122,6 +6437,20 @@ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, + "regexpu-core": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz", + "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.1.0", + "regjsgen": "^0.5.0", + "regjsparser": "^0.6.0", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.1.0" + } + }, "registry-auth-token": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.0.0.tgz", @@ -5132,6 +6461,29 @@ "safe-buffer": "^5.0.1" } }, + "regjsgen": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", + "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", + "dev": true + }, + "regjsparser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", + "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, "remark": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/remark/-/remark-10.0.1.tgz", @@ -5191,17 +6543,20 @@ "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true }, "replace-ext": { "version": "1.0.0", @@ -5321,22 +6676,24 @@ "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true }, "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, "requires": { - "onetime": "^2.0.0", + "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true }, "retry": { "version": "0.10.1", @@ -5348,6 +6705,7 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, "requires": { "glob": "^7.1.3" } @@ -5356,6 +6714,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -5374,28 +6733,31 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, "requires": { "aproba": "^1.1.1" } }, "rxjs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", - "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", "dev": true, "requires": { "tslib": "^1.9.0" } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "safe-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, "requires": { "ret": "~0.1.10" } @@ -5410,6 +6772,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, "requires": { "ajv": "^6.1.0", "ajv-errors": "^1.0.0", @@ -5419,12 +6782,14 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true }, "serialize-javascript": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", - "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==" + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", + "dev": true }, "set-blocking": { "version": "2.0.0", @@ -5436,6 +6801,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -5447,6 +6813,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -5456,12 +6823,14 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -5503,18 +6872,27 @@ "ansi-styles": "^3.2.0", "astral-regex": "^1.0.0", "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } } }, "smart-buffer": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.2.tgz", - "integrity": "sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", + "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", "dev": true }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, "requires": { "base": "^0.11.1", "debug": "^2.2.0", @@ -5530,6 +6908,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -5538,6 +6917,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -5546,6 +6926,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -5553,12 +6934,8 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -5566,6 +6943,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", @@ -5576,6 +6954,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -5584,6 +6963,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -5592,6 +6972,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -5600,6 +6981,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -5612,6 +6994,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, "requires": { "kind-of": "^3.2.0" }, @@ -5620,6 +7003,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -5627,13 +7011,13 @@ } }, "socks": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.2.tgz", - "integrity": "sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", + "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", "dev": true, "requires": { - "ip": "^1.1.5", - "smart-buffer": "4.0.2" + "ip": "1.1.5", + "smart-buffer": "^4.1.0" } }, "socks-proxy-agent": { @@ -5660,17 +7044,20 @@ "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true }, "source-map-resolve": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, "requires": { "atob": "^2.1.1", "decode-uri-component": "^0.2.0", @@ -5683,15 +7070,25 @@ "version": "0.5.16", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true }, "spdx-correct": { "version": "3.1.0", @@ -5735,6 +7132,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, "requires": { "extend-shallow": "^3.0.0" } @@ -5764,11 +7162,13 @@ } }, "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", + "integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==", + "dev": true, "requires": { - "figgy-pudding": "^3.5.1" + "figgy-pudding": "^3.5.1", + "minipass": "^3.1.1" } }, "state-toggle": { @@ -5781,6 +7181,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" @@ -5790,6 +7191,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -5800,6 +7202,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" @@ -5809,6 +7212,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, "requires": { "end-of-stream": "^1.1.0", "stream-shift": "^1.0.0" @@ -5818,6 +7222,7 @@ "version": "2.8.3", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, "requires": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.1", @@ -5829,42 +7234,56 @@ "stream-shift": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" }, "dependencies": { "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^5.0.0" } } } }, + "string.prototype.trimleft": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", + "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", + "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, "requires": { "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } } }, "stringify-entities": { @@ -5927,9 +7346,9 @@ "dev": true }, "stylelint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-10.1.0.tgz", - "integrity": "sha512-OmlUXrgzEMLQYj1JPTpyZPR9G4bl0StidfHnGJEMpdiQ0JyTq0MPg1xkHk1/xVJ2rTPESyJCDWjG8Kbpoo7Kuw==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-11.1.1.tgz", + "integrity": "sha512-Vx6TAJsxG6qksiFvxQTKriQhp1CqUWdpTDITEkAjTR+l+8Af7qNlvrUDXfpuFJgXh/ayF8xdMSKE+SstcsPmMA==", "dev": true, "requires": { "autoprefixer": "^9.5.1", @@ -5947,29 +7366,28 @@ "ignore": "^5.0.6", "import-lazy": "^4.0.0", "imurmurhash": "^0.1.4", - "known-css-properties": "^0.14.0", + "known-css-properties": "^0.16.0", "leven": "^3.1.0", - "lodash": "^4.17.11", + "lodash": "^4.17.14", "log-symbols": "^3.0.0", "mathml-tag-names": "^2.1.0", "meow": "^5.0.0", "micromatch": "^4.0.0", "normalize-selector": "^0.2.0", - "pify": "^4.0.1", "postcss": "^7.0.14", "postcss-html": "^0.36.0", - "postcss-jsx": "^0.36.1", + "postcss-jsx": "^0.36.3", "postcss-less": "^3.1.4", "postcss-markdown": "^0.36.0", "postcss-media-query-parser": "^0.2.3", "postcss-reporter": "^6.0.1", "postcss-resolve-nested-selector": "^0.1.1", "postcss-safe-parser": "^4.0.1", - "postcss-sass": "^0.3.5", + "postcss-sass": "^0.4.1", "postcss-scss": "^2.0.0", "postcss-selector-parser": "^3.1.0", "postcss-syntax": "^0.36.2", - "postcss-value-parser": "^3.3.1", + "postcss-value-parser": "^4.0.2", "resolve-from": "^5.0.0", "signal-exit": "^3.0.2", "slash": "^3.0.0", @@ -5979,7 +7397,8 @@ "style-search": "^0.1.0", "sugarss": "^2.0.0", "svg-tags": "^1.0.0", - "table": "^5.2.3" + "table": "^5.2.3", + "v8-compile-cache": "^2.1.0" }, "dependencies": { "braces": { @@ -5991,12 +7410,6 @@ "fill-range": "^7.0.1" } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -6018,12 +7431,6 @@ "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", "dev": true }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -6049,12 +7456,6 @@ "picomatch": "^2.0.5" } }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -6067,17 +7468,6 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, - "string-width": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.1.0.tgz", - "integrity": "sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^5.2.0" - } - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -6090,18 +7480,18 @@ } }, "stylelint-config-recommended": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-2.2.0.tgz", - "integrity": "sha512-bZ+d4RiNEfmoR74KZtCKmsABdBJr4iXRiCso+6LtMJPw5rd/KnxUWTxht7TbafrTJK1YRjNgnN0iVZaJfc3xJA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz", + "integrity": "sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==", "dev": true }, "stylelint-config-standard": { - "version": "18.3.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-18.3.0.tgz", - "integrity": "sha512-Tdc/TFeddjjy64LvjPau9SsfVRexmTFqUhnMBrzz07J4p2dVQtmpncRF/o8yZn8ugA3Ut43E6o1GtjX80TFytw==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-19.0.0.tgz", + "integrity": "sha512-VvcODsL1PryzpYteWZo2YaA5vU/pWfjqBpOvmeA8iB2MteZ/ZhI1O4hnrWMidsS4vmEJpKtjdhLdfGJmmZm6Cg==", "dev": true, "requires": { - "stylelint-config-recommended": "^2.2.0" + "stylelint-config-recommended": "^3.0.0" } }, "sugarss": { @@ -6140,6 +7530,18 @@ "string-width": "^3.0.0" }, "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -6156,12 +7558,14 @@ "tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true }, "terser": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.10.tgz", - "integrity": "sha512-3xXfyqHzUr8WZ+UvvwUQ/uHNgDu3FsdTTAL5p9UAWxlnAsoIMlCM3BPuFSx5Kb4/Hr+/xnMf6rt1DhRpKYohhw==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.4.0.tgz", + "integrity": "sha512-oDG16n2WKm27JO8h4y/w3iqBGAOSCtq7k8dRmrn4Wf9NouL0b2WpMHGChFGZq4nFAQy1FsNJrVQHfurXOSTmOA==", + "dev": true, "requires": { "commander": "^2.20.0", "source-map": "~0.6.1", @@ -6171,7 +7575,14 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -6179,6 +7590,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz", "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==", + "dev": true, "requires": { "cacache": "^12.0.2", "find-cache-dir": "^2.1.0", @@ -6189,6 +7601,46 @@ "terser": "^4.1.2", "webpack-sources": "^1.4.0", "worker-farm": "^1.7.0" + }, + "dependencies": { + "cacache": { + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", + "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + } } }, "text-table": { @@ -6207,6 +7659,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, "requires": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" @@ -6216,6 +7669,7 @@ "version": "2.0.11", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", + "dev": true, "requires": { "setimmediate": "^1.0.4" } @@ -6232,7 +7686,8 @@ "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true }, "to-fast-properties": { "version": "2.0.0", @@ -6244,6 +7699,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -6252,6 +7708,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -6262,6 +7719,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", @@ -6273,6 +7731,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" @@ -6310,12 +7769,6 @@ "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", "dev": true }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, "trim-trailing-lines": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz", @@ -6331,12 +7784,14 @@ "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "dev": true }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true }, "tunnel-agent": { "version": "0.6.0", @@ -6364,10 +7819,17 @@ "prelude-ls": "~1.1.2" } }, + "type-fest": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", + "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==", + "dev": true + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true }, "unherit": { "version": "1.1.2", @@ -6379,6 +7841,34 @@ "xtend": "^4.0.1" } }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", + "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", + "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", + "dev": true + }, "unified": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/unified/-/unified-7.1.0.tgz", @@ -6399,6 +7889,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", @@ -6416,6 +7907,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, "requires": { "unique-slug": "^2.0.0" } @@ -6424,14 +7916,15 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dev": true, "requires": { "imurmurhash": "^0.1.4" } }, "unist-util-find-all-after": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.4.tgz", - "integrity": "sha512-CaxvMjTd+yF93BKLJvZnEfqdM7fgEACsIpQqz8vIj9CJnUb9VpyymFS3tg6TCtgrF7vfCJBF5jbT2Ox9CBRYRQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.5.tgz", + "integrity": "sha512-lWgIc3rrTMTlK1Y0hEuL+k+ApzFk78h+lsaa2gHf63Gp5Ww+mt11huDniuaoq1H+XMK2lIIjjPkncxXcDp3QDw==", "dev": true, "requires": { "unist-util-is": "^3.0.0" @@ -6444,19 +7937,22 @@ "dev": true }, "unist-util-remove-position": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.3.tgz", - "integrity": "sha512-CtszTlOjP2sBGYc2zcKA/CvNdTdEs3ozbiJ63IPBxh8iZg42SCCb8m04f8z2+V1aSk5a7BxbZKEdoDjadmBkWA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz", + "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==", "dev": true, "requires": { "unist-util-visit": "^1.1.0" } }, "unist-util-stringify-position": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz", - "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==", - "dev": true + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.2.tgz", + "integrity": "sha512-nK5n8OGhZ7ZgUwoUbL8uiVRwAbZyzBsB/Ddrlbu6jwwubFza4oe15KlyEaLNMXQW1svOQq4xesUeqA85YrIUQA==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } }, "unist-util-visit": { "version": "1.4.1", @@ -6486,6 +7982,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" @@ -6495,6 +7992,7 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", @@ -6505,6 +8003,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, "requires": { "isarray": "1.0.0" } @@ -6514,25 +8013,27 @@ "has-values": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true } } }, "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true }, "updates": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/updates/-/updates-8.5.3.tgz", - "integrity": "sha512-bREdpucNEtSULXu2PLfYmKnRD6E0lM16vbZNsgR39Ou7FqiUEyasA0o2Lrb3uHwZN3L2WhOjf+EjQl7NiOHhug==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/updates/-/updates-9.0.1.tgz", + "integrity": "sha512-uz2RvIYKH7DfjnZ1Km3L3w3qjaPhzPAwi4gHgDPT87YkymGk5bU7jIe12kOGtN3czGHLf6Z2ryZpsx2kETXaCQ==", "dev": true, "requires": { "chalk": "2.4.2", "find-up": "4.1.0", - "hosted-git-info": "3.0.0", - "make-fetch-happen": "5.0.0", + "hosted-git-info": "3.0.2", + "make-fetch-happen": "6.0.0", "minimist": "1.2.0", "rc": "1.2.8", "registry-auth-token": "4.0.0", @@ -6541,12 +8042,6 @@ "text-table": "0.2.0" }, "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -6558,20 +8053,14 @@ } }, "hosted-git-info": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.0.tgz", - "integrity": "sha512-zYSx1cP4MLsvKtTg8DF/PI6e6FHZ3wcawcTGsrLU2TM+UfD4jmSrn2wdQT16TFbH3lO4PIdjLG0E+cuYDgFD9g==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.2.tgz", + "integrity": "sha512-ezZMWtHXm7Eb7Rq4Mwnx2vs79WUx2QmRg3+ZqeGroKzfDO+EprOcgRPYghsOP9JuYBfK18VojmRTGCg8Ma+ktw==", "dev": true, "requires": { "lru-cache": "^5.1.1" } }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -6581,12 +8070,6 @@ "p-locate": "^4.1.0" } }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, "p-locate": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", @@ -6625,6 +8108,7 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, "requires": { "punycode": "^2.1.0" } @@ -6632,12 +8116,14 @@ "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, "requires": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -6646,19 +8132,22 @@ "punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true } } }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true }, "util": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, "requires": { "inherits": "2.0.3" }, @@ -6666,14 +8155,16 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true } } }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true }, "uuid": { "version": "3.3.3", @@ -6723,37 +8214,55 @@ }, "dependencies": { "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + }, + "unist-util-stringify-position": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz", + "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==", "dev": true + }, + "vfile-message": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz", + "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==", + "dev": true, + "requires": { + "unist-util-stringify-position": "^1.1.1" + } } } }, "vfile-location": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.5.tgz", - "integrity": "sha512-Pa1ey0OzYBkLPxPZI3d9E+S4BmvfVwNAAXrrqGbwTVXWaX2p9kM1zZ+n35UtVM06shmWKH4RPRN8KI80qE3wNQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz", + "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==", "dev": true }, "vfile-message": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz", - "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.2.tgz", + "integrity": "sha512-gNV2Y2fDvDOOqq8bEe7cF3DXU6QgV4uA9zMR2P8tix11l1r7zju3zry3wZ8sx+BEfuO6WQ7z2QzfWTvqHQiwsA==", "dev": true, "requires": { - "unist-util-stringify-position": "^1.1.1" + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" } }, "vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, "requires": { "chokidar": "^2.0.2", "graceful-fs": "^4.1.2", @@ -6764,6 +8273,7 @@ "version": "4.41.2", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.2.tgz", "integrity": "sha512-Zhw69edTGfbz9/8JJoyRQ/pq8FYUoY0diOXqW0T6yhgdhCv6wr0hra5DwwWexNRns2Z2+gsnrNcbe9hbGBgk/A==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-module-context": "1.8.5", @@ -6793,12 +8303,14 @@ "acorn": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", + "dev": true }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" @@ -6836,12 +8348,35 @@ "wrap-ansi": "^5.1.0" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "enhanced-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -6920,9 +8455,18 @@ "version": "1.4.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, "requires": { "source-list-map": "^2.0.0", "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "which": { @@ -6940,16 +8484,17 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "worker-farm": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, "requires": { "errno": "~0.1.7" } @@ -7004,7 +8549,8 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "write": { "version": "1.0.3", @@ -7024,17 +8570,20 @@ "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true }, "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true }, "yargs": { "version": "12.0.5", @@ -7054,6 +8603,39 @@ "which-module": "^2.0.0", "y18n": "^3.2.1 || ^4.0.0", "yargs-parser": "^11.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } }, "yargs-parser": { diff --git a/package.json b/package.json index 60764c880..469b5a2ea 100644 --- a/package.json +++ b/package.json @@ -5,14 +5,21 @@ "node": ">=8" }, "devDependencies": { - "autoprefixer": "9.6.1", - "eslint": "6.3.0", + "@babel/core": "7.7.2", + "@babel/preset-env": "7.7.1", + "autoprefixer": "9.7.1", + "babel-loader": "8.0.6", + "core-js": "3.4.1", + "eslint": "6.6.0", + "eslint-config-airbnb-base": "14.0.0", + "eslint-plugin-import": "2.18.2", "less": "3.10.3", "less-plugin-clean-css": "1.5.1", "postcss-cli": "6.1.3", - "stylelint": "10.1.0", - "stylelint-config-standard": "18.3.0", - "updates": "8.5.3", + "stylelint": "11.1.1", + "stylelint-config-standard": "19.0.0", + "terser-webpack-plugin": "2.2.1", + "updates": "9.0.1", "webpack": "4.41.2", "webpack-cli": "3.3.10" }, diff --git a/public/css/index.css b/public/css/index.css index 1a6032cf3..a6bed125e 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -73,7 +73,7 @@ a{cursor:pointer} .right.stackable.menu{margin-left:auto;display:flex;align-items:inherit;flex-direction:inherit} .ui.left{float:left} .ui.right{float:right} -.ui.button,.ui.menu .item{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto} +.ui.button,.ui.menu .item{-webkit-user-select:auto;-ms-user-select:auto;user-select:auto} .ui.container.fluid.padded{padding:0 10px 0 10px} .ui.form .ui.button{font-weight:400} .ui.floating.label{z-index:10} @@ -233,14 +233,14 @@ i.icons .icon:first-child{margin-right:0} i.icon.centerlock{top:1.5em} .ui.label>.detail .icons{margin-right:.25em} .ui.label>.detail .icons .icon{margin-right:0} -.lines-num{vertical-align:top;text-align:right!important;color:#999;background:#f5f5f5;width:1%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} +.lines-num{vertical-align:top;text-align:right!important;color:#999;background:#f5f5f5;width:1%;-webkit-user-select:none;-ms-user-select:none;user-select:none} .lines-num span:before{content:attr(data-line-number);line-height:20px!important;padding:0 10px;cursor:pointer;display:block} .lines-code,.lines-num{padding:0!important} .lines-code .hljs,.lines-code ol,.lines-code pre,.lines-num .hljs,.lines-num ol,.lines-num pre{background-color:#fff;margin:0;padding:0!important} .lines-code .hljs li,.lines-code ol li,.lines-code pre li,.lines-num .hljs li,.lines-num ol li,.lines-num pre li{display:block;width:100%} .lines-code .hljs li:before,.lines-code ol li:before,.lines-code pre li:before,.lines-num .hljs li:before,.lines-num ol li:before,.lines-num pre li:before{content:' '} -.lines-commit{vertical-align:top;color:#999;padding:0!important;background:#f5f5f5;width:1%;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none} -.lines-commit .blame-info{width:350px;max-width:350px;display:block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0 0 0 10px} +.lines-commit{vertical-align:top;color:#999;padding:0!important;background:#f5f5f5;width:1%;-ms-user-select:none;-webkit-user-select:none;user-select:none} +.lines-commit .blame-info{width:350px;max-width:350px;display:block;-webkit-user-select:none;-ms-user-select:none;user-select:none;padding:0 0 0 10px} .lines-commit .blame-info .blame-data{display:flex;font-family:-apple-system,BlinkMacSystemFont,system-ui,'Segoe UI',Roboto,Helvetica,Arial} .lines-commit .blame-info .blame-data .blame-message{flex-grow:2;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:20px} .lines-commit .blame-info .blame-data .blame-avatar,.lines-commit .blame-info .blame-data .blame-time{flex-shrink:0} @@ -333,7 +333,7 @@ i.icon.centerlock{top:1.5em} .repository.wiki.revisions .ui.container>.ui.stackable.grid>.header{margin-top:0} .repository.wiki.revisions .ui.container>.ui.stackable.grid>.header .sub.header{padding-left:52px;word-break:break-word} .file-revisions-btn{display:block;float:left;margin-bottom:2px!important;padding:11px!important;margin-right:10px!important} -.file-revisions-btn i{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} +.file-revisions-btn i{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none} .home .logo{max-width:220px} @media only screen and (max-width:767px){.home .hero h1{font-size:3.5em} .home .hero h2{font-size:2em} @@ -687,7 +687,7 @@ i.icon.centerlock{top:1.5em} .repository .diff-box .header .file{flex:1;color:#888;word-break:break-all} .repository .diff-box .header .button{margin:-5px 0 -5px 12px;padding:8px 10px;flex:0 0 auto} .repository .diff-file-box .header{background-color:#f7f7f7} -.repository .diff-file-box .file-body.file-code .lines-num{text-align:right;color:#a6a6a6;background:#fafafa;width:1%;min-width:50px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top} +.repository .diff-file-box .file-body.file-code .lines-num{text-align:right;color:#a6a6a6;background:#fafafa;width:1%;min-width:50px;-webkit-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top} .repository .diff-file-box .file-body.file-code .lines-num span.fold{display:block;text-align:center} .repository .diff-file-box .file-body.file-code .lines-num-old{border-right:1px solid #ddd} .repository .diff-file-box .code-diff{font-size:12px} @@ -698,7 +698,7 @@ i.icon.centerlock{top:1.5em} .repository .diff-file-box .code-diff tbody tr .removed-code{background-color:#f99} .repository .diff-file-box .code-diff tbody tr .added-code{background-color:#9f9} .repository .diff-file-box .code-diff tbody tr [data-line-num]::before{content:attr(data-line-num);text-align:right} -.repository .diff-file-box .code-diff tbody tr .lines-type-marker{width:10px;min-width:10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} +.repository .diff-file-box .code-diff tbody tr .lines-type-marker{width:10px;min-width:10px;-webkit-user-select:none;-ms-user-select:none;user-select:none} .repository .diff-file-box .code-diff tbody tr [data-type-marker]::before{content:attr(data-type-marker);text-align:right;display:inline-block} .repository .diff-file-box .code-diff-unified tbody tr.del-code td{background-color:#ffe0e0!important;border-color:#f1c0c0!important} .repository .diff-file-box .code-diff-unified tbody tr.add-code td{background-color:#d6fcd6!important;border-color:#c1e9c1!important} diff --git a/public/css/theme-arc-green.css b/public/css/theme-arc-green.css index 74a7c3ddc..6b28d5492 100644 --- a/public/css/theme-arc-green.css +++ b/public/css/theme-arc-green.css @@ -14,7 +14,7 @@ body{background:#383c4a;color:#9e9e9e} *{scrollbar-width:thin;scrollbar-color:#87ab63 rgba(255,255,255,.1)} ::-webkit-scrollbar{-webkit-appearance:none!important;width:10px!important;height:10px!important} ::-webkit-scrollbar-track{border-radius:0!important;background:rgba(255,255,255,.1)!important} -::-webkit-scrollbar-thumb{cursor:pointer!important;border-radius:5px!important;transition:color .2s ease!important;background:#87ab63!important} +::-webkit-scrollbar-thumb{cursor:pointer!important;border-radius:5px!important;-webkit-transition:color .2s ease!important;transition:color .2s ease!important;background:#87ab63!important} ::-webkit-scrollbar-thumb:window-inactive{background:#87ab63!important} ::-webkit-scrollbar-thumb:hover{background:#87ab63!important} a{color:#87ab63} diff --git a/public/js/index.js b/public/js/index.js index 3d2f0fe7a..2c4ce911f 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1,2 +1,2 @@ -!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function i(e){return jQuery("
").text(e).html()}let o,a,s,r,c;function l(e){const t=e.find(".tabular.menu");t.find(".item").tab(),t.find('.item[data-tab="'+t.data("preview")+'"]').click((function(){const n=$(this);$.post(n.data("url"),{_csrf:o,mode:"gfm",context:n.data("context"),text:e.find('.tab.segment[data-tab="'+t.data("write")+'"] textarea').val()},(function(n){const i=e.find('.tab.segment[data-tab="'+t.data("preview")+'"]');i.html(n),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})),k()}function d(){0!=$(".edit.form").length&&(function(e){const t=e.find(".tabular.menu");t.find(".item").tab();const n=t.find('.item[data-tab="'+t.data("preview")+'"]');n.length&&(s=n.data("preview-file-modes").split(","),n.click((function(){const n=$(this);$.post(n.data("url"),{_csrf:o,mode:"gfm",context:n.data("context"),text:e.find('.tab.segment[data-tab="'+t.data("write")+'"] textarea').val()},(function(n){const i=e.find('.tab.segment[data-tab="'+t.data("preview")+'"]');i.html(n),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})))}($(".edit.form")),function(e){const t=e.find(".tabular.menu");t.find(".item").tab(),t.find('.item[data-tab="'+t.data("diff")+'"]').click((function(){const n=$(this);$.post(n.data("url"),{_csrf:o,context:n.data("context"),content:e.find('.tab.segment[data-tab="'+t.data("write")+'"] textarea').val()},(function(n){const i=e.find('.tab.segment[data-tab="'+t.data("diff")+'"]');i.html(n),emojify.run(i[0])}))}))}($(".edit.form")))}function u(e,t,n,i){return new Promise((function(a){$.ajax({type:"POST",url:e,data:{_csrf:o,action:t,issue_ids:n,id:i},success:a})}))}function h(){window.location.reload()}function f(e){e.each((function(){const e=this;e.addEventListener("paste",(function(t){!function(e,t){if(!e.clipboardData)return;const n=e.clipboardData.items;if(void 0!==n)for(let i=0;i').val(i.uuid);$(".files").append(o)}))}))}),!1)}))}function p(){function e(e,t){const n=$(".ui."+t+".list"),i=n.find(".no-select"),o=$("."+e+" .menu");let a="update"==o.data("action");const s={};$("."+e).dropdown("setting","onHide",(function(){if(a="update"==o.data("action")){const e=[];Object.keys(s).forEach((function(t){const n=s[t],i=u(n["update-url"],n.action,n["issue-id"],t);e.push(i)})),Promise.all(e).then(h)}})),o.find(".item:not(.no-select)").click((function(){if("select-assignees-modify"==e)return $(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check")),u(o.data("update-url"),"",o.data("issue-id"),$(this).data("id")),o.data("action","update"),!1;$(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check"),a&&($(this).data("id")in s?delete s[$(this).data("id")]:s[$(this).data("id")]={"update-url":o.data("update-url"),action:"detach","issue-id":o.data("issue-id")})):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check"),a&&($(this).data("id")in s?delete s[$(this).data("id")]:s[$(this).data("id")]={"update-url":o.data("update-url"),action:"attach","issue-id":o.data("issue-id")}));const t=[];return $(this).parent().find(".item").each((function(){$(this).hasClass("checked")?(t.push($(this).data("id")),$($(this).data("id-selector")).removeClass("hide")):$($(this).data("id-selector")).addClass("hide")})),0==t.length?i.removeClass("hide"):i.addClass("hide"),$($(this).parent().data("id")).val(t.join(",")),!1})),o.find(".no-select.item").click((function(){(a||"select-assignees-modify"==e)&&u(o.data("update-url"),"clear",o.data("issue-id"),"").then(h),$(this).parent().find(".item").each((function(){$(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")})),n.find(".item").each((function(){$(this).addClass("hide")})),i.removeClass("hide"),$($(this).parent().data("id")).val("")}))}function t(e,t){const n=$(e+" .menu"),o=$(".ui"+e+".list"),a="update"==n.data("action");n.find(".item:not(.no-select)").click((function(){switch($(this).parent().find(".item").each((function(){$(this).removeClass("selected active")})),$(this).addClass("selected active"),a&&u(n.data("update-url"),"",n.data("issue-id"),$(this).data("id")).then(h),t){case"#milestone_id":o.find(".selected").html('').val(n.uuid);s.append(i)})),this.on("removedfile",(function(t){t.name in e&&($("#"+e[t.name].uuid).remove(),i.data("remove-url")&&i.data("csrf")&&!e[t.name].submitted&&$.post(i.data("remove-url"),{file:e[t.name].uuid,_csrf:i.data("csrf")}))})),this.on("submit",(function(){$.each(e,(function(t){e[t].submitted=!0}))})),this.on("reload",(function(){$.getJSON(t.data("attachment-url"),(function(t){const n=i.get(0).dropzone;n.removeAllFiles(!0),s.empty(),$.each(t,(function(){const t=i.data("upload-url")+"/"+this.uuid;n.emit("addedfile",this),n.emit("thumbnail",this,t),n.emit("complete",this),n.files.push(this),e[this.name]={submitted:!0,uuid:this.uuid},i.find("img[src='"+t+"']").css("max-width","100%");const o=$('').val(this.uuid);s.append(o)}))}))}))}}),i.get(0).dropzone.emit("reload")}const r=t.find(".ui.comment.form"),c=r.find(".tabular.menu");c.attr("data-write",t.data("write")),c.attr("data-preview",t.data("preview")),c.find(".write.item").attr("data-tab",t.data("write")),c.find(".preview.item").attr("data-tab",t.data("preview")),r.find(".write.segment").attr("data-tab",t.data("write")),r.find(".preview.segment").attr("data-tab",t.data("preview")),l(r),t.find(".cancel.button").click((function(){n.show(),t.hide(),i.get(0).dropzone.emit("reload")})),t.find(".save.button").click((function(){n.show(),t.hide();const r=s.find("[name=files]").map((function(){return $(this).val()})).get();$.post(t.data("update-url"),{_csrf:o,content:a.val(),context:t.data("context"),files:r},(function(t){0==t.length?n.html($("#no-content").html()):(n.html(t.content),emojify.run(n[0]),$("pre code",n[0]).each((function(){hljs.highlightBlock(this)})));const o=e.parent();o.find(".ui.small.images").length?""==t.attachments?o.find(".ui.small.images").parent().remove():o.find(".ui.small.images").html(t.attachments):""!=t.attachments&&(o.append('
'),o.find(".ui.small.images").html(t.attachments)),i.get(0).dropzone.emit("submit"),i.get(0).dropzone.emit("reload")}))}))}else a=e.find("textarea");return t.show(),n.hide(),0==a.val().length&&a.val(i.text()),a.focus(),!1})),$(".delete-comment").click((function(){const e=$(this);return confirm(e.data("locale"))&&$.post(e.data("url"),{_csrf:o}).success((function(){$("#"+e.data("comment-id")).remove()})),!1}));const i=$("#status-button");$("#comment-form .edit_area").keyup((function(){0==$(this).val().length?i.text(i.data("status")):i.text(i.data("status-and-comment"))})),i.click((function(){$("#status").val(i.data("status-val")),$("#comment-form").submit()}));const a=$(".merge-button > button");a.on("click",(function(e){e.preventDefault(),$("."+$(this).data("do")+"-fields").show(),$(this).parent().hide()})),$(".merge-button > .dropdown").dropdown({onChange:function(e,t,n){n.data("do")&&(a.find(".button-text").text(n.text()),a.data("do",n.data("do")))}}),$(".merge-cancel").on("click",(function(e){e.preventDefault(),$(this).closest(".form").hide(),a.parent().show()})),function e(t){let n="";t||(t=$(document),n=".reactions > "),t.find(n+"a.label").popup({position:"bottom left",metadata:{content:"title",title:"none"}}),t.find(".select-reaction > .menu > .item, "+n+"a.label").on("click",(function(t){const n=this;if(t.preventDefault(),$(this).hasClass("disabled"))return;const i=($(this).hasClass("item")?$(this).closest(".select-reaction").data("action-url"):$(this).data("action-url"))+"/"+($(this).hasClass("blue")?"unreact":"react");$.ajax({type:"POST",url:i,data:{_csrf:o,content:$(this).data("content")}}).done((function(t){if(t&&(t.html||t.empty)){const i=$(n).closest(".content");let o=i.find(".segment.reactions");if(!t.empty&&o.length>0&&o.remove(),!t.empty){o=$('
');const n=i.find(".segment.bottom:first");n.length>0?o.insertBefore(n):o.appendTo(i),o.html(t.html);const a=o.find(".has-emoji");for(let e=0;e0&&$(".diff-counter").each((function(){const e=$(this),t=e.find("span[data-line].add").data("line"),n=e.find("span[data-line].del").data("line"),i=parseFloat(t)/(parseFloat(t)+parseFloat(n))*100;e.find(".bar .add").css("width",i+"%")})),$("#repo-clone-ssh").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-https").removeClass("blue"),localStorage.setItem("repo-clone-protocol","ssh")})),$("#repo-clone-https").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-ssh").removeClass("blue"),localStorage.setItem("repo-clone-protocol","https")})),$("#repo-clone-url").click((function(){$(this).select()}));const t=$(".repository.compare.pull");t.length>0&&(e(".choose.branch .dropdown"),t.find("button.show-form").on("click",(function(e){e.preventDefault(),t.find(".pullrequest-form").show(),$(this).parent().hide()}))),$(".repository.settings.branches").length>0&&(e(".protected-branches .dropdown"),$(".enable-protection, .enable-whitelist").change((function(){this.checked?$($(this).data("target")).removeClass("disabled"):$($(this).data("target")).addClass("disabled")})))}function g(e){const t=Math.floor(Math.random()*Math.floor(1e6));return e.attr("data-write",e.attr("data-write")+t),e.attr("data-preview",e.attr("data-preview")+t),e.find(".item").each((function(){const e=$(this).attr("data-tab")+t;$(this).attr("data-tab",e)})),e.parent().find("*[data-tab='write']").attr("data-tab","write"+t),e.parent().find("*[data-tab='preview']").attr("data-tab","preview"+t),l(e.parent(".form")),t}function v(){$(".access-mode.menu .item").click((function(){const e=$(this).parent();$.post(e.data("url"),{_csrf:o,uid:e.data("uid"),mode:$(this).data("value")})}))}function b(){$(".js-quick-pull-choice-option").change((function(){"commit-to-new-branch"==$(this).val()?($(".quick-pull-branch-name").show(),$(".quick-pull-branch-name input").prop("required",!0)):($(".quick-pull-branch-name").hide(),$(".quick-pull-branch-name input").prop("required",!1)),$("#commit-button").text($(this).attr("button_text"))}));const e=$("#file-name");e.keyup((function(e){const t=$(".breadcrumb span.section"),n=$(".breadcrumb div.divider");let i,o;if(8==e.keyCode&&0==$(this).getCursorPosition()&&t.length>0&&(i=t.last().find("a").text(),$(this).val(i+$(this).val()),$(this)[0].setSelectionRange(i.length,i.length),t.last().remove(),n.last().remove()),191==e.keyCode){o=$(this).val().split("/");for(let e=0;e
'+i+"").insertBefore($(this)),$('
/
').insertBefore($(this))):$(this).val(i),$(this)[0].setSelectionRange(0,0)}o=[],$(".breadcrumb span.section").each((function(){const e=$(this);e.find("a").length?o.push(e.find("a").text()):o.push(e.text())})),$(this).val()&&o.push($(this).val()),$("#tree_path").val(o.join("/"))})).trigger("keyup");const t=$(".repository.editor textarea#edit_area");if(!t.length)return;const n=t.data("markdown-file-exts").split(","),i=t.data("line-wrap-extensions").split(",");e.on("keyup",(function(){const a=e.val();let l,d,u,h,f,p;u=h="";const m=/.+\.([^.]+)$/.exec(a);m&&(h="."+(u=m[1]));const g=CodeMirror.findModeByExtension(u),v=$("a[data-tab=preview]");if(g?(l=g.mode,d=g.mime,p=l):p=u,v.length&&p&&s&&s.length&&s.indexOf(p)>=0?(f=v.data("url"),v.data("url",f.replace(/(.*)\/.*/i,"$1/"+l)),v.show()):v.hide(),n.indexOf(h)>=0&&function(e){return c&&(c.toTextArea(),c=null),!!r||(r=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,previewRender:function(t,n){return setTimeout((function(){$.post(e.data("url"),{_csrf:o,mode:"gfm",context:e.data("context"),text:t},(function(e){n.innerHTML='
'+e+"
",emojify.run($(".editor-preview")[0])}))}),0),"Loading..."},toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]}),!0)}(t))return;if(!c&&!function(e){return r&&(r.toTextArea(),r=null),!!c||((c=CodeMirror.fromTextArea(e[0],{lineNumbers:!0})).on("change",(function(t,n){e.val(t.getValue())})),!0)}(t))return;l&&(c.setOption("mode",d),CodeMirror.autoLoadMode(c,l)),i.indexOf(h)>=0?c.setOption("lineWrapping",!0):c.setOption("lineWrapping",!1);let b=e.val();0!==b.length&&(b=(b=b.split("/"))[b.length-1],$.getJSON(e.data("ec-url-prefix")+b,(function(e){"tab"===e.indent_style?(c.setOption("indentWithTabs",!0),c.setOption("extraKeys",{})):(c.setOption("indentWithTabs",!1),c.setOption("extraKeys",{Tab:function(e){const t=Array(parseInt(e.getOption("indentUnit"))+1).join(" ");e.replaceSelection(t)}})),c.setOption("indentUnit",e.indent_size||4),c.setOption("tabSize",e.tab_width||4)})))})).trigger("keyup");const a=$("#commit-button"),l=$(".ui.edit.form");a.prop("disabled",!0),l.areYouSure({silent:!0,dirtyClass:"dirty-file",fieldSelector:":input:not(.commit-form-wrapper :input)",change:function(){const e=$(this).hasClass("dirty-file");a.prop("disabled",!e)}}),a.click((function(e){0===t.val().length&&($("#edit-empty-content-modal").modal({onApprove:function(){$(".edit.form").submit()}}).modal("show"),e.preventDefault())}))}function w(){$(".user.settings.profile").length>0&&$("#username").keyup((function(){const e=$("#name-change-prompt");$(this).val().toString().toLowerCase()!=$(this).data("name").toString().toLowerCase()?e.show():e.hide()}))}function k(){$(".ui.button").keypress((function(e){13!=e.keyCode&&32!=e.keyCode||$(this).click()}))}function _(){$(".code-view .linenums").length>0&&($(document).on("click",".lines-num span",(function(e){const t=$(this),n=t.parent().siblings(".lines-code").find("ol.linenums > li");T(n,n.filter("[rel="+t.attr("id")+"]"),e.shiftKey?n.filter(".active").eq(0):null),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()})),$(window).on("hashchange",(function(){let e=window.location.hash.match(/^#(L\d+)-(L\d+)$/);const t=$(".code-view ol.linenums > li");let n;if(e)return n=t.filter("."+e[1]),T(t,n,t.filter("."+e[2])),void $("html, body").scrollTop(n.offset().top-200);(e=window.location.hash.match(/^#(L|n)(\d+)$/))&&(n=t.filter(".L"+e[2]),T(t,n),$("html, body").scrollTop(n.offset().top-200))})).trigger("hashchange"))}function y(e){$.ajax({url:a+"/user/u2f/sign",type:"POST",headers:{"X-Csrf-Token":o},data:JSON.stringify(e),contentType:"application/json; charset=utf-8"}).done((function(e){window.location.replace(e)})).fail((function(){x(1)}))}function C(e){(function(e){if(!("errorCode"in e))return!1;if(0===e.errorCode)return!1;return x(e.errorCode),!0})(e)||$.ajax({url:a+"/user/settings/security/u2f/register",type:"POST",headers:{"X-Csrf-Token":o},data:JSON.stringify(e),contentType:"application/json; charset=utf-8",success:function(){h()},fail:function(){x(1)}})}function x(e){const t={browser:$("#unsupported-browser"),1:$("#u2f-error-1"),2:$("#u2f-error-2"),3:$("#u2f-error-3"),4:$("#u2f-error-4"),5:$(".u2f-error-5")};t[e].removeClass("hide");for(const n in t)n!=e&&t[n].addClass("hide");$("#u2f-error").modal("show")}function S(){$.post(a+"/user/settings/security/u2f/request_register",{_csrf:o,name:$("#nickname").val()}).success((function(e){$("#nickname").closest("div.field").removeClass("error"),$("#register-device").modal("show"),null===e.registeredKeys&&(e.registeredKeys=[]),u2fApi.register(e.appId,e.registerRequests,e.registeredKeys,30).then(C).catch((function(e){x(void 0!==e?e.metaData.code:1)}))})).fail((function(e){409===e.status&&$("#nickname").closest("div.field").addClass("error")}))}function q(e){history.pushState?history.pushState(null,null,e):location.hash=e}function T(e,t,n){if(e.removeClass("active"),n){let i,o=parseInt(t.attr("rel").substr(1)),a=parseInt(n.attr("rel").substr(1));if(o!=a){o>a&&(i=o,o=a,a=i);const t=[];for(let e=o;e<=a;e++)t.push(".L"+e);return e.filter(t.join(",")).addClass("active"),void q("#L"+o+"-L"+a)}}t.addClass("active"),q("#"+t.attr("rel"))}function L(){const e=$(this);let t="";e.attr("id")&&(t+="#"+e.attr("id"));const n=$(".delete.modal"+t);return n.find(".name").text(e.data("name")),n.modal({closable:!1,onApprove:function(){"form"!=e.data("type")?$.post(e.data("url"),{_csrf:o,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}function O(){const e=$(this);let t="";e.attr("id")&&(t+="#"+e.attr("id"));const n=$(".addall.modal"+t);return n.find(".name").text(e.data("name")),n.modal({closable:!1,onApprove:function(){"form"!=e.data("type")?$.post(e.data("url"),{_csrf:o,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}"undefined"!=typeof Dropzone&&(Dropzone.autoDiscover=!1),Array.from||(Array.from=function(){const e=Object.prototype.toString,t=function(t){return"function"==typeof t||"[object Function]"===e.call(t)},n=Math.pow(2,53)-1,i=function(e){const t=function(e){const t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t}(e);return Math.min(Math.max(t,0),n)};return function(e){const n=this,o=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");const a=arguments.length>1?arguments[1]:void 0;let s;if(void 0!==a){if(!t(a))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(s=arguments[2])}const r=i(o.length),c=t(n)?Object(new n(r)):new Array(r);let l,d=0;for(;d=0&&this.lastIndexOf(e)===t},$.fn.getCursorPosition=function(){const e=$(this).get(0);let t=0;if("selectionStart"in e)t=e.selectionStart;else if("selection"in document){e.focus();const n=document.selection.createRange(),i=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t=n.text.length-i}return t},$(document).ready((function(){if(o=$("meta[name=_csrf]").attr("content"),a=$("meta[name=_suburl]").attr("content"),$(".time-since").each((function(){$(this).addClass("poping up").attr("data-content",$(this).attr("title")).attr("data-variation","inverted tiny").attr("title","")})),$(".dropdown:not(.custom)").dropdown(),$(".jump.dropdown").dropdown({action:"hide",onShow:function(){$(".poping.up").popup("hide")}}),$(".slide.up.dropdown").dropdown({transition:"slide up"}),$(".upward.dropdown").dropdown({direction:"upward"}),$(".ui.accordion").accordion(),$(".ui.checkbox").checkbox(),$(".ui.progress").progress({showActivity:!1}),$(".poping.up").popup(),$(".top.menu .poping.up").popup({onShow:function(){if($(".top.menu .menu.transition").hasClass("visible"))return!1}}),$(".tabular.menu .item").tab(),$(".tabable.menu .item").tab(),$(".toggle.button").click((function(){$($(this).data("target")).slideToggle(100)})),$("tr[data-href]").click((function(){window.location=$(this).data("href")})),"undefined"!=typeof hljs){const e=[].slice.call(document.querySelectorAll("pre code")||[]);for(let t=0;t0){const t={};new Dropzone("#dropzone",{url:e.data("upload-url"),headers:{"X-Csrf-Token":o},maxFiles:e.data("max-file"),maxFilesize:e.data("max-size"),acceptedFiles:"*/*"===e.data("accepts")?null:e.data("accepts"),addRemoveLinks:!0,dictDefaultMessage:e.data("default-message"),dictInvalidFileType:e.data("invalid-input-type"),dictFileTooBig:e.data("file-too-big"),dictRemoveFile:e.data("remove-file"),init:function(){this.on("success",(function(e,n){t[e.name]=n.uuid;const i=$('').val(n.uuid);$(".files").append(i)})),this.on("removedfile",(function(n){n.name in t&&$("#"+t[n.name]).remove(),e.data("remove-url")&&e.data("csrf")&&$.post(e.data("remove-url"),{file:t[n.name],_csrf:e.data("csrf")})}))}})}emojify.setConfig({img_dir:a+"/vendor/plugins/emojify/images",ignore_emoticons:!0});const t=document.getElementsByClassName("has-emoji");for(let e=0;e0&&(i=n+"-"+e[n]),null==e[n]?e[n]=1:e[n]+=1,(t=t.wrap('
')).append('')}))})),$(".issue-checkbox").click((function(){$(".issue-checkbox").children("input:checked").length>0?($("#issue-filters").addClass("hide"),$("#issue-actions").removeClass("hide")):($("#issue-filters").removeClass("hide"),$("#issue-actions").addClass("hide"))})),$(".issue-action").click((function(){let e=this.dataset.action,t=this.dataset.elementId;const n=$(".issue-checkbox").children("input:checked").map((function(){return this.dataset.issueId})).get().join(),i=this.dataset.url;"0"===t&&"/assignee"===i.substr(-9)&&(t="",e="clear"),u(i,e,n,t).then((function(){"close"!==e&&"open"!==e||$('.issue-checkbox input[type="checkbox"]').each((function(e,t){t.checked=!1})),h()}))})),$('.issue-checkbox input[type="checkbox"]:checked').first().each((function(e,t){t.checked=!1,$(t).click()})),k(),$("#search-user-box").search({minCharacters:2,apiSettings:{url:a+"/api/v1/users/search?q={query}",onResponse:function(e){const t=[];return $.each(e.data,(function(e,n){let o=n.login;n.full_name&&n.full_name.length>0&&(o+=" ("+i(n.full_name)+")"),t.push({title:o,image:n.avatar_url})})),{results:t}}},searchFields:["login","full_name"],showNoResults:!1}),function(){const e=$("#search-team-box");e.search({minCharacters:2,apiSettings:{url:a+"/api/v1/orgs/"+e.data("org")+"/teams/search?q={query}",headers:{"X-Csrf-Token":o},onResponse:function(e){const t=[];return $.each(e.data,(function(e,n){const i=n.name+" ("+n.permission+" access)";t.push({title:i})})),{results:t}}},searchFields:["name","description"],showNoResults:!1})}(),function(){const e=$("#search-repo-box");e.search({minCharacters:2,apiSettings:{url:a+"/api/v1/repos/search?q={query}&uid="+e.data("uid"),onResponse:function(e){const t=[];return $.each(e.data,(function(e,n){t.push({title:n.full_name.split("/")[1],description:n.full_name})})),{results:t}}},searchFields:["full_name"],showNoResults:!1})}(),p(),0!=$(".install").length&&(""==$("#db_host").val()&&($("#db_host").val("127.0.0.1:3306"),$("#db_user").val("gitea"),$("#db_name").val("gitea")),$("#db_type").change((function(){const e=$(this).val();if("SQLite3"===e)return $("#sql_settings").hide(),$("#pgsql_settings").hide(),$("#mysql_settings").hide(),$("#sqlite_settings").show(),void("SQLite3"===e&&"data/gitea_tidb"==$("#db_path").val()&&$("#db_path").val("data/gitea.db"));const t={MySQL:"127.0.0.1:3306",PostgreSQL:"127.0.0.1:5432",MSSQL:"127.0.0.1:1433"};$("#sqlite_settings").hide(),$("#sql_settings").show(),$("#pgsql_settings").toggle("PostgreSQL"===e),$("#mysql_settings").toggle("MySQL"===e),$.each(t,(function(n,i){if($("#db_host").val()==i)return $("#db_host").val(t[e]),!1}))})),$("#offline-mode input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("check"),$("#federated-avatar-lookup").checkbox("uncheck"))})),$("#disable-gravatar input").change((function(){$(this).is(":checked")?$("#federated-avatar-lookup").checkbox("uncheck"):$("#offline-mode").checkbox("uncheck")})),$("#federated-avatar-lookup input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("uncheck"),$("#offline-mode").checkbox("uncheck"))})),$("#enable-openid-signin input").change((function(){$(this).is(":checked")?$("#disable-registration input").is(":checked")||$("#enable-openid-signup").checkbox("check"):$("#enable-openid-signup").checkbox("uncheck")})),$("#disable-registration input").change((function(){$(this).is(":checked")?($("#enable-captcha").checkbox("uncheck"),$("#enable-openid-signup").checkbox("uncheck")):$("#enable-openid-signup").checkbox("check")})),$("#enable-captcha input").change((function(){$(this).is(":checked")&&$("#disable-registration").checkbox("uncheck")}))),m(),function(){const e=function(){const e=$("#auth_username").val(),t=$("#clone_addr").val();!$("#mirror").is(":checked")&&null!=e&&e.length>0&&null!=t&&(t.startsWith("https://github.com")||t.startsWith("http://github.com"))?$("#migrate_items").show():$("#migrate_items").hide()};e(),$("#clone_addr").on("input",e),$("#auth_username").on("input",e),$("#mirror").on("change",e)}(),function(){const e=$(".repository.wiki textarea#edit_area");if(e.length>0){const t=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,previewRender:function(t,n){return setTimeout((function(){$.post(e.data("url"),{_csrf:o,mode:"gfm",context:e.data("context"),text:t},(function(e){n.innerHTML='
'+e+"
",emojify.run($(".editor-preview")[0])}))}),0),"Loading..."},renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|",{name:"code-inline",action:function(e){const t=e.codemirror,n=t.getSelection();if(t.replaceSelection("`"+n+"`"),!n){const e=t.getCursor();t.setCursor(e.line,e.ch-1)}t.focus()},className:"fa fa-angle-right",title:"Add Inline Code"},"code","quote","|",{name:"checkbox-empty",action:function(e){const t=e.codemirror;t.replaceSelection("\n- [ ] "+t.getSelection()),t.focus()},className:"fa fa-square-o",title:"Add Checkbox (empty)"},{name:"checkbox-checked",action:function(e){const t=e.codemirror;t.replaceSelection("\n- [x] "+t.getSelection()),t.focus()},className:"fa fa-check-square-o",title:"Add Checkbox (checked)"},"|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen"]});$(t.codemirror.getInputField()).addClass("js-quick-submit")}}(),d(),b(),0!=$(".organization").length&&$(".organization.settings.options").length>0&&$("#org_name").keyup((function(){const e=$("#org-name-change-prompt");$(this).val().toString().toLowerCase()!=$(this).data("org-name").toString().toLowerCase()?e.show():e.hide()})),function(){if(0==$(".new.webhook").length)return;$(".events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").show()})),$(".non-events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").hide()}));const e=function(){const e="POST"===$("#http_method").val();$("#content_type").parent().parent()[e?"show":"hide"]()};e(),$("#http_method").change((function(){e()})),$("#test-delivery").click((function(){const e=$(this);e.addClass("loading disabled"),$.post(e.data("link"),{_csrf:o}).done(setTimeout((function(){window.location.href=e.data("redirect")}),5e3))}))}(),function(){if(0!=$(".admin").length){if(($(".admin.new.user").length>0||$(".admin.edit.user").length>0)&&$("#login_type").change((function(){"0"==$(this).val().substring(0,1)?($("#login_name").removeAttr("required"),$(".non-local").hide(),$(".local").show(),$("#user_name").focus(),"required"==$(this).data("password")&&$("#password").attr("required","required")):($("#login_name").attr("required","required"),$(".non-local").show(),$(".local").hide(),$("#login_name").focus(),$("#password").removeAttr("required"))})),$(".admin.new.authentication").length>0&&($("#auth_type").change((function(){$(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size").hide(),$(".ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]").removeAttr("required"),$(".binddnrequired").removeClass("required");const i=$(this).val();switch(i){case"2":$(".ldap").show(),$(".binddnrequired input, .ldap div.required:not(.dldap) input").attr("required","required"),$(".binddnrequired").addClass("required");break;case"3":$(".smtp").show(),$(".has-tls").show(),$(".smtp div.required input, .has-tls").attr("required","required");break;case"4":$(".pam").show(),$(".pam input").attr("required","required");break;case"5":$(".dldap").show(),$(".dldap div.required:not(.ldap) input").attr("required","required");break;case"6":$(".oauth2").show(),$(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input").attr("required","required"),n()}"2"!=i&&"5"!=i||e(),"2"==i&&t()})),$("#auth_type").change(),$("#security_protocol").change(e),$("#use_paged_search").change(t),$("#oauth2_provider").change(n),$("#oauth2_use_custom_url").change(i)),$(".admin.edit.authentication").length>0){const o=$("#auth_type").val();"2"==o||"5"==o?($("#security_protocol").change(e),"2"==o&&$("#use_paged_search").change(t)):"6"==o&&($("#oauth2_provider").change(n),$("#oauth2_use_custom_url").change(i),n())}if($(".admin.notice")){const e=$("#detail-modal");$(".view-detail").click((function(){return e.find(".content p").text($(this).data("content")),e.modal("show"),!1}));const t=$(".select.table .ui.checkbox");$(".select.action").click((function(){switch($(this).data("action")){case"select-all":t.checkbox("check");break;case"deselect-all":t.checkbox("uncheck");break;case"inverse":t.checkbox("toggle")}})),$("#delete-selection").click((function(){const e=$(this);e.addClass("loading disabled");const n=[];t.each((function(){$(this).checkbox("is checked")&&n.push($(this).data("id"))})),$.post(e.data("link"),{_csrf:o,ids:n}).done((function(){window.location.href=e.data("redirect")}))}))}}function e(){$("#security_protocol").val()>0?$(".has-tls").show():$(".has-tls").hide()}function t(){$("#use_paged_search").prop("checked")?$(".search-page-size").show().find("input").attr("required","required"):$(".search-page-size").hide().find("input").removeAttr("required")}function n(){switch($(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url").hide(),$(".open_id_connect_auto_discovery_url input[required]").removeAttr("required"),$("#oauth2_provider").val()){case"github":case"gitlab":case"gitea":$(".oauth2_use_custom_url").show();break;case"openidConnect":$(".open_id_connect_auto_discovery_url input").attr("required","required"),$(".open_id_connect_auto_discovery_url").show()}i()}function i(){const e=$("#oauth2_provider").val();if($(".oauth2_use_custom_url_field").hide(),$(".oauth2_use_custom_url_field input[required]").removeAttr("required"),$("#oauth2_use_custom_url").is(":checked"))switch($("#oauth2_token_url").val()||$("#oauth2_token_url").val($("#"+e+"_token_url").val()),$("#oauth2_auth_url").val()||$("#oauth2_auth_url").val($("#"+e+"_auth_url").val()),$("#oauth2_profile_url").val()||$("#oauth2_profile_url").val($("#"+e+"_profile_url").val()),$("#oauth2_email_url").val()||$("#oauth2_email_url").val($("#"+e+"_email_url").val()),e){case"github":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url").show();break;case"gitea":case"gitlab":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url").show(),$("#oauth2_email_url").val("")}}}(),_(),function(){const e=document.getElementById("app");if(!e)return;Vue.component("repo-search",{delimiters:["${","}"],props:{searchLimit:{type:Number,default:10},suburl:{type:String,required:!0},uid:{type:Number,required:!0},organizations:{type:Array,default:[]},isOrganization:{type:Boolean,default:!0},canCreateOrganization:{type:Boolean,default:!1},organizationsTotalCount:{type:Number,default:0},moreReposLink:{type:String,default:""}},data:function(){return{tab:"repos",repos:[],reposTotalCount:0,reposFilter:"all",searchQuery:"",isLoading:!1,repoTypes:{all:{count:0,searchMode:""},forks:{count:0,searchMode:"fork"},mirrors:{count:0,searchMode:"mirror"},sources:{count:0,searchMode:"source"},collaborative:{count:0,searchMode:"collaborative"}}}},computed:{showMoreReposLink:function(){return this.repos.length>0&&this.repos.length'+t[e]+"
").insertBefore(i)}t.css("display","none"),n.show()}})).fail((function(t){if(422===t.status)if(t.responseJSON.invalidTopics.length>0){c.formatPrompt=t.responseJSON.message;const n=t.responseJSON.invalidTopics,i=s.children("a.ui.label");e.split(",").forEach((function(e,t){for(let o=0;o]*>?/gm,"");let i=!1;const o=[];if(s.find("div.label.visible.topic,a.label.visible").each((function(e,t){o.push(t.dataset.value)})),e.topics){let a=!1;for(let s=0;s0&&!i?(t.success=!0,t.results.unshift({description:n,"data-value":n})):n.length>0&&i&&t.results.sort((function(e,t){return e.description.toLowerCase()===n.toLowerCase()?-1:t.description.toLowerCase()===n.toLowerCase()?1:e.description>t.description?-1:e.description'+i(o.repository.full_name)+"",value:o.id})})),t},cache:!1},fullTextSearch:!0}),$(".menu a.label-filter-item").each((function(){$(this).click((function(e){if(e.altKey){e.preventDefault();const t=$(this).attr("href"),n="labels=(-?[0-9]+%2c)*("+$(this).data("label-id")+")(%2c-?[0-9]+)*&",i="labels=$1-$2$3&";window.location=t.replace(new RegExp(n),i)}}))})),$(".menu .ui.dropdown.label-filter").keydown((function(e){if(e.altKey&&13==e.keyCode){const e=$(".menu .ui.dropdown.label-filter .menu .item.selected");if(e.length>0){const t=$(e[0]),n=t.attr("href"),i="labels=(-?[0-9]+%2c)*("+t.data("label-id")+")(%2c-?[0-9]+)*&",o="labels=$1-$2$3&";window.location=n.replace(new RegExp(i),o)}}}))}(),$(".title_wip_desc > a").click((function(e){e.preventDefault();const t=$("#issue_title");t.focus();const n=t.val().trim().toUpperCase();for(const e in wipPrefixes)if(n.startsWith(wipPrefixes[e].toUpperCase()))return;t.val(wipPrefixes[0]+" "+t.val())})),$(".show-outdated").on("click",(function(e){e.preventDefault();const t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-"+t).removeClass("hide"),$("#code-preview-"+t).removeClass("hide"),$("#hide-outdated-"+t).removeClass("hide")})),$(".hide-outdated").on("click",(function(e){e.preventDefault();const t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-"+t).addClass("hide"),$("#code-preview-"+t).addClass("hide"),$("#show-outdated-"+t).removeClass("hide")})),$("button.comment-form-reply").on("click",(function(e){e.preventDefault(),$(this).hide();const t=$(this).parent().find(".comment-form");t.removeClass("hide"),g(t.find(".menu"))})),0!=$(".repository.pull.diff").length&&($(".diff-detail-box.ui.sticky").sticky(),$(".btn-review").on("click",(function(e){e.preventDefault(),$(this).closest(".dropdown").find(".menu").toggle("visible")})).closest(".dropdown").find(".link.close").on("click",(function(e){e.preventDefault(),$(this).closest(".menu").toggle("visible")})),$(".code-view .lines-code,.code-view .lines-num").on("mouseenter",(function(){const e=$(this).closest("td");$(this).closest("tr").addClass(e.hasClass("lines-num-old")||e.hasClass("lines-code-old")?"focus-lines-old":"focus-lines-new")})).on("mouseleave",(function(){$(this).closest("tr").removeClass("focus-lines-new focus-lines-old")})),$(".add-code-comment").on("click",(function(e){if($(e.target).hasClass("btn-add-single"))return;e.preventDefault();const t=$(this).closest(".code-diff").hasClass("code-diff-split"),n=$(this).data("side"),i=$(this).data("idx"),o=$(this).data("path"),a=$("#pull_review_add_comment").html(),s=$(this).closest("tr");let r=s.next();r.hasClass("add-comment")||(r=$(''+(t?'':'')+""),s.after(r));const c=r.find(".add-comment-"+n);let l=c.find(".comment-code-cloud");0===l.length&&(c.html(a),g((l=c.find(".comment-code-cloud")).find(".menu")),c.find("input[name='line']").val(i),c.find("input[name='side']").val("left"===n?"previous":"proposed"),c.find("input[name='path']").val(o)),l.find("textarea").focus()}))),function e(){const t=$("#repo_migrating");if($("#repo_migrating_failed").hide(),t){const n=t.attr("repo");if(void 0===n)return;$.ajax({type:"GET",url:a+"/"+n+"/status",data:{_csrf:o},complete:function(t){if(200==t.status&&t.responseJSON)return 0==t.responseJSON.status?void location.reload():void setTimeout((function(){e()}),2e3);$("#repo_migrating_progress").hide(),$("#repo_migrating_failed").show()}})}}(),function(){const e=$("#repo_template"),t=function(){const t=$("#template_units"),n=$("#non_template");""!==e.val()?(t.show(),n.hide()):(t.hide(),n.show())};e.change(t),t();const n=function(){$("#repo_template_search").dropdown({apiSettings:{url:a+"/api/v1/repos/search?q={query}&template=true&priority_owner_id="+$("#uid").val(),onResponse:function(e){const t={success:!0,results:[]};return t.results.push({name:"",value:""}),$.each(e.data,(function(e,n){t.results.push({name:i(n.full_name),value:n.id})})),t},cache:!1},fullTextSearch:!0})};$("#uid").change(n),n()}(),$("#repo-clone-url").length>0)switch(localStorage.getItem("repo-clone-protocol")){case"ssh":0===$("#repo-clone-ssh").click().length&&$("#repo-clone-https").click();break;default:$("#repo-clone-https").click()}const s={"div.user.settings":w,"div.repository.settings.collaboration":v};let r;for(r in s)if($(r).length>0){s[r]();break}const c=$("#clone_addr");c.change((function(){const e=$("#repo_name");c.val().length>0&&0===e.val().length&&e.val(c.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3])}))})),$((function(){0===$(".user.signin").length&&$("form:not(.ignore-dirty)").areYouSure(),$("#ssh-key-content").on("change paste keyup",(function(){const e=$(this).val().split(" "),t=$("#ssh-key-title");""===t.val()&&3===e.length&&""!==e[2]&&t.val(e[2])}))})),window.timeAddManual=function(){$(".mini.modal").modal({duration:200,onApprove:function(){$("#add_time_manual_form").submit()}}).modal("show")},window.toggleStopwatch=function(){$("#toggle_stopwatch_form").submit()},window.cancelStopwatch=function(){$("#cancel_stopwatch_form").submit()},window.initHeatmap=function(e,t,n){const i=document.getElementById(e);if(!i)return;(n=n||{}).contributions=n.contributions||"contributions",n.no_contributions=n.no_contributions||"No contributions";const o=["${","}"];Vue.component("activity-heatmap",{delimiters:o,props:{user:{type:String,required:!0},suburl:{type:String,required:!0},locale:{type:Object,required:!0}},data:function(){return{isLoading:!0,colorRange:[],endDate:null,values:[],totalContributions:0}},mounted:function(){this.colorRange=[this.getColor(0),this.getColor(1),this.getColor(2),this.getColor(3),this.getColor(4),this.getColor(5)],this.endDate=new Date,this.loadHeatmap(this.user)},methods:{loadHeatmap:function(e){const t=this;$.get(this.suburl+"/api/v1/users/"+e+"/heatmap",(function(e){const n=[];for(let i=0;i

total contributions in the last 12 months

'}),new Vue({delimiters:o,el:i,data:{suburl:document.querySelector("meta[name=_suburl]").content,heatmapUser:t,locale:n}})},$(".commit-button").click((function(e){e.preventDefault(),$(this).parent().find(".commit-body").toggle()})),window.toggleDeadlineForm=function(){$("#deadlineForm").fadeToggle(150)},window.setDeadline=function(){const e=$("#deadlineDate").val();window.updateDeadline(e)},window.updateDeadline=function(e){$("#deadline-err-invalid-date").hide(),$("#deadline-loader").addClass("loading");let t=null;if(""!==e){const n=Date.parse(e);if(isNaN(n))return $("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show(),!1;t=new Date(n)}$.ajax($("#update-issue-deadline-form").attr("action")+"/deadline",{data:JSON.stringify({due_date:t}),headers:{"X-Csrf-Token":o,"X-Remote":!0},contentType:"application/json",type:"POST",success:function(){h()},error:function(){$("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show()}})},window.deleteDependencyModal=function(e,t){$(".remove-dependency").modal({closable:!1,duration:200,onApprove:function(){$("#removeDependencyID").val(e),$("#dependencyType").val(t),$("#removeDependencyForm").submit()}}).modal("show")},window.cancelCodeComment=function(e){const t=$(e).closest("form");t.length>0&&t.hasClass("comment-form")?(t.addClass("hide"),t.parent().find("button.comment-form-reply").show()):t.closest(".comment-code-cloud").remove()},window.onOAuthLoginClick=function(){const e=$("#oauth2-login-loader"),t=$("#oauth2-login-navigator");t.hide(),e.removeClass("disabled"),setTimeout((function(){e.addClass("disabled"),t.show()}),5e3)}}]); +!function(e){var t={};function a(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(i,n,function(t){return e[t]}.bind(null,n));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t){function a(e){return jQuery("
").text(e).html()}var i,n,o,r,s;function c(e){var t=e.find(".tabular.menu");t.find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("preview"),'"]')).click((function(){var a=$(this);$.post(a.data("url"),{_csrf:i,mode:"gfm",context:a.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(a){var i=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));i.html(a),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})),w()}function l(){var e,t;0!==$(".edit.form").length&&(!function(e){var t=e.find(".tabular.menu");t.find(".item").tab();var a=t.find('.item[data-tab="'.concat(t.data("preview"),'"]'));a.length&&(o=a.data("preview-file-modes").split(","),a.click((function(){var a=$(this);$.post(a.data("url"),{_csrf:i,mode:"gfm",context:a.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(a){var i=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));i.html(a),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})))}($(".edit.form")),e=$(".edit.form"),(t=e.find(".tabular.menu")).find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("diff"),'"]')).click((function(){var a=$(this);$.post(a.data("url"),{_csrf:i,context:a.data("context"),content:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(a){var i=e.find('.tab.segment[data-tab="'.concat(t.data("diff"),'"]'));i.html(a),emojify.run(i[0])}))})))}function d(e,t,a,n){return new Promise((function(o){$.ajax({type:"POST",url:e,data:{_csrf:i,action:t,issue_ids:a,id:n},success:o})}))}function u(){window.location.reload()}function h(e){e.each((function(){var e=this;e.addEventListener("paste",(function(t){!function(e,t){if(e.clipboardData){var a=e.clipboardData.items;if(void 0!==a)for(var i=0;i')).val(i.uuid);$(".files").append(o)}))}))}),!1)}))}function f(){var e;0!==$(".comment.form").length&&((e=$(".ui.select-branch")).find(".reference-list-menu").find(".item:not(.no-select)").click((function(){var t=$(this).data("id");$($(this).data("id-selector")).val(t),e.find(".ui .branch-name").text(t)})),e.find(".reference.column").click((function(){return e.find(".scrolling.reference-list-menu").css("display","none"),e.find(".reference .text").removeClass("black"),$($(this).data("target")).css("display","block"),$(this).find(".text").addClass("black"),!1})),c($(".comment.form")),h($(".comment.form textarea")),t("select-label","labels"),t("select-assignees","assignees"),t("select-assignees-modify","assignees"),i(".select-milestone","#milestone_id"),i(".select-assignee","#assignee_id"));function t(e,t){var a=$(".ui.".concat(t,".list")),i=a.find(".no-select"),n=$(".".concat(e," .menu")),o="update"===n.data("action"),r={};$(".".concat(e)).dropdown("setting","onHide",(function(){if(o="update"===n.data("action")){var e=[];Object.keys(r).forEach((function(t){var a=r[t],i=d(a["update-url"],a.action,a["issue-id"],t);e.push(i)})),Promise.all(e).then(u)}})),n.find(".item:not(.no-select)").click((function(){if("select-assignees-modify"===e)return $(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check")),d(n.data("update-url"),"",n.data("issue-id"),$(this).data("id")),n.data("action","update"),!1;$(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":n.data("update-url"),action:"detach","issue-id":n.data("issue-id")})):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":n.data("update-url"),action:"attach","issue-id":n.data("issue-id")}));var t=[];return $(this).parent().find(".item").each((function(){$(this).hasClass("checked")?(t.push($(this).data("id")),$($(this).data("id-selector")).removeClass("hide")):$($(this).data("id-selector")).addClass("hide")})),0===t.length?i.removeClass("hide"):i.addClass("hide"),$($(this).parent().data("id")).val(t.join(",")),!1})),n.find(".no-select.item").click((function(){(o||"select-assignees-modify"===e)&&d(n.data("update-url"),"clear",n.data("issue-id"),"").then(u),$(this).parent().find(".item").each((function(){$(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")})),a.find(".item").each((function(){$(this).addClass("hide")})),i.removeClass("hide"),$($(this).parent().data("id")).val("")}))}function i(e,t){var i=$("".concat(e," .menu")),n=$(".ui".concat(e,".list")),o="update"===i.data("action");i.find(".item:not(.no-select)").click((function(){switch($(this).parent().find(".item").each((function(){$(this).removeClass("selected active")})),$(this).addClass("selected active"),o&&d(i.data("update-url"),"",i.data("issue-id"),$(this).data("id")).then(u),t){case"#milestone_id":n.find(".selected").html('')).val(t.uuid);s.append(a)})),this.on("removedfile",(function(e){e.name in l&&($("#".concat(l[e.name].uuid)).remove(),r.data("remove-url")&&r.data("csrf")&&!l[e.name].submitted&&$.post(r.data("remove-url"),{file:l[e.name].uuid,_csrf:r.data("csrf")}))})),this.on("submit",(function(){$.each(l,(function(e){l[e].submitted=!0}))})),this.on("reload",(function(){$.getJSON(a.data("attachment-url"),(function(e){var t=r.get(0).dropzone;t.removeAllFiles(!0),s.empty(),$.each(e,(function(){var e="".concat(r.data("upload-url"),"/").concat(this.uuid);t.emit("addedfile",this),t.emit("thumbnail",this,e),t.emit("complete",this),t.files.push(this),l[this.name]={submitted:!0,uuid:this.uuid},r.find("img[src='".concat(e,"']")).css("max-width","100%");var a=$('')).val(this.uuid);s.append(a)}))}))}))}}),r.get(0).dropzone.emit("reload")}var d=a.find(".ui.comment.form"),u=d.find(".tabular.menu");u.attr("data-write",a.data("write")),u.attr("data-preview",a.data("preview")),u.find(".write.item").attr("data-tab",a.data("write")),u.find(".preview.item").attr("data-tab",a.data("preview")),d.find(".write.segment").attr("data-tab",a.data("write")),d.find(".preview.segment").attr("data-tab",a.data("preview")),c(d),a.find(".cancel.button").click((function(){n.show(),a.hide(),r.get(0).dropzone.emit("reload")})),a.find(".save.button").click((function(){n.show(),a.hide();var o=s.find("[name=files]").map((function(){return $(this).val()})).get();$.post(a.data("update-url"),{_csrf:i,content:e.val(),context:a.data("context"),files:o},(function(e){0===e.length?n.html($("#no-content").html()):(n.html(e.content),emojify.run(n[0]),$("pre code",n[0]).each((function(){hljs.highlightBlock(this)})));var a=t.parent();a.find(".ui.small.images").length?""===e.attachments?a.find(".ui.small.images").parent().remove():a.find(".ui.small.images").html(e.attachments):""!==e.attachments&&(a.append('
'),a.find(".ui.small.images").html(e.attachments)),r.get(0).dropzone.emit("submit"),r.get(0).dropzone.emit("reload")}))}))}else e=t.find("textarea");return a.show(),n.hide(),0===e.val().length&&e.val(o.text()),e.focus(),!1})),$(".delete-comment").click((function(){var e=$(this);return window.confirm(e.data("locale"))&&$.post(e.data("url"),{_csrf:i}).success((function(){$("#".concat(e.data("comment-id"))).remove()})),!1}));var r=$("#status-button");$("#comment-form .edit_area").keyup((function(){0===$(this).val().length?r.text(r.data("status")):r.text(r.data("status-and-comment"))})),r.click((function(){$("#status").val(r.data("status-val")),$("#comment-form").submit()}));var s=$(".merge-button > button");s.on("click",(function(e){e.preventDefault(),$(".".concat($(this).data("do"),"-fields")).show(),$(this).parent().hide()})),$(".merge-button > .dropdown").dropdown({onChange:function(e,t,a){a.data("do")&&(s.find(".button-text").text(a.text()),s.data("do",a.data("do")))}}),$(".merge-cancel").on("click",(function(e){e.preventDefault(),$(this).closest(".form").hide(),s.parent().show()})),function e(t){var a="";t||(t=$(document),a=".reactions > "),t.find("".concat(a,"a.label")).popup({position:"bottom left",metadata:{content:"title",title:"none"}}),t.find(".select-reaction > .menu > .item, ".concat(a,"a.label")).on("click",(function(t){var a=this;if(t.preventDefault(),!$(this).hasClass("disabled")){var n=$(this).hasClass("item")?$(this).closest(".select-reaction").data("action-url"):$(this).data("action-url"),o="".concat(n,"/").concat($(this).hasClass("blue")?"unreact":"react");$.ajax({type:"POST",url:o,data:{_csrf:i,content:$(this).data("content")}}).done((function(t){if(t&&(t.html||t.empty)){var i=$(a).closest(".content"),n=i.find(".segment.reactions");if(!t.empty&&n.length>0&&n.remove(),!t.empty){n=$('
');var o=i.find(".segment.bottom:first");o.length>0?n.insertBefore(o):n.appendTo(i),n.html(t.html);for(var r=n.find(".has-emoji"),s=0;s0&&$(".diff-counter").each((function(){var e=$(this),t=e.find("span[data-line].add").data("line"),a=e.find("span[data-line].del").data("line"),i=parseFloat(t)/(parseFloat(t)+parseFloat(a))*100;e.find(".bar .add").css("width","".concat(i,"%"))})),$("#repo-clone-ssh").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-https").removeClass("blue"),localStorage.setItem("repo-clone-protocol","ssh")})),$("#repo-clone-https").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-ssh").removeClass("blue"),localStorage.setItem("repo-clone-protocol","https")})),$("#repo-clone-url").click((function(){$(this).select()}));var l=$(".repository.compare.pull");l.length>0&&(d(".choose.branch .dropdown"),l.find("button.show-form").on("click",(function(e){e.preventDefault(),l.find(".pullrequest-form").show(),$(this).parent().hide()}))),$(".repository.settings.branches").length>0&&(d(".protected-branches .dropdown"),$(".enable-protection, .enable-whitelist").change((function(){this.checked?$($(this).data("target")).removeClass("disabled"):$($(this).data("target")).addClass("disabled")})))}function d(e){var t=$(e);t.dropdown({fullTextSearch:!0,selectOnKeydown:!1,onChange:function(e,t,a){a.data("url")&&(window.location.href=a.data("url"))},message:{noResults:t.data("no-results")}})}}function m(e){var t=Math.floor(Math.random()*Math.floor(1e6));return e.attr("data-write",e.attr("data-write")+t),e.attr("data-preview",e.attr("data-preview")+t),e.find(".item").each((function(){var e=$(this).attr("data-tab")+t;$(this).attr("data-tab",e)})),e.parent().find("*[data-tab='write']").attr("data-tab","write".concat(t)),e.parent().find("*[data-tab='preview']").attr("data-tab","preview".concat(t)),c(e.parent(".form")),t}function v(){$(".access-mode.menu .item").click((function(){var e=$(this).parent();$.post(e.data("url"),{_csrf:i,uid:e.data("uid"),mode:$(this).data("value")})}))}function g(){$(".js-quick-pull-choice-option").change((function(){"commit-to-new-branch"===$(this).val()?($(".quick-pull-branch-name").show(),$(".quick-pull-branch-name input").prop("required",!0)):($(".quick-pull-branch-name").hide(),$(".quick-pull-branch-name input").prop("required",!1)),$("#commit-button").text($(this).attr("button_text"))}));var e=$("#file-name");e.keyup((function(e){var t,a,i=$(".breadcrumb span.section"),n=$(".breadcrumb div.divider");if(8===e.keyCode&&0===$(this).getCursorPosition()&&i.length>0&&(t=i.last().find("a").text(),$(this).val(t+$(this).val()),$(this)[0].setSelectionRange(t.length,t.length),i.last().remove(),n.last().remove()),191===e.keyCode){a=$(this).val().split("/");for(var o=0;o
'.concat(t,"")).insertBefore($(this)),$('
/
').insertBefore($(this))):$(this).val(t),$(this)[0].setSelectionRange(0,0)}a=[],$(".breadcrumb span.section").each((function(){var e=$(this);e.find("a").length?a.push(e.find("a").text()):a.push(e.text())})),$(this).val()&&a.push($(this).val()),$("#tree_path").val(a.join("/"))})).trigger("keyup");var t=$(".repository.editor textarea#edit_area");if(t.length){var a=t.data("markdown-file-exts").split(","),n=t.data("line-wrap-extensions").split(",");e.on("keyup",(function(){var c,l,d,u,h,f,p=e.val();d=u="";var m=/.+\.([^.]+)$/.exec(p);m&&(d=m[1],u=".".concat(d));var v=CodeMirror.findModeByExtension(d),g=$("a[data-tab=preview]");if(v?(c=v.mode,l=v.mime,f=c):f=d,g.length&&f&&o&&o.length&&o.indexOf(f)>=0?(h=g.data("url"),g.data("url",h.replace(/(.*)\/.*/i,"$1/".concat(c))),g.show()):g.hide(),!(a.indexOf(u)>=0&&function(e){return s&&(s.toTextArea(),s=null),!!r||(r=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,previewRender:function(t,a){return setTimeout((function(){$.post(e.data("url"),{_csrf:i,mode:"gfm",context:e.data("context"),text:t},(function(e){a.innerHTML='
'.concat(e,"
"),emojify.run($(".editor-preview")[0])}))}),0),"Loading..."},toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]}),!0)}(t))&&(s||function(e){return r&&(r.toTextArea(),r=null),!!s||((s=CodeMirror.fromTextArea(e[0],{lineNumbers:!0})).on("change",(function(t,a){e.val(t.getValue())})),!0)}(t))){c&&(s.setOption("mode",l),CodeMirror.autoLoadMode(s,c)),n.indexOf(u)>=0?s.setOption("lineWrapping",!0):s.setOption("lineWrapping",!1);var b=e.val();0!==b.length&&(b=(b=b.split("/"))[b.length-1],$.getJSON(e.data("ec-url-prefix")+b,(function(e){"tab"===e.indent_style?(s.setOption("indentWithTabs",!0),s.setOption("extraKeys",{})):(s.setOption("indentWithTabs",!1),s.setOption("extraKeys",{Tab:function(e){var t=Array(parseInt(e.getOption("indentUnit"))+1).join(" ");e.replaceSelection(t)}})),s.setOption("indentUnit",e.indent_size||4),s.setOption("tabSize",e.tab_width||4)})))}})).trigger("keyup");var c=$("#commit-button"),l=$(".ui.edit.form");c.prop("disabled",!0),l.areYouSure({silent:!0,dirtyClass:"dirty-file",fieldSelector:":input:not(.commit-form-wrapper :input)",change:function(){var e=$(this).hasClass("dirty-file");c.prop("disabled",!e)}}),c.click((function(e){0===t.val().length&&($("#edit-empty-content-modal").modal({onApprove:function(){$(".edit.form").submit()}}).modal("show"),e.preventDefault())}))}}function b(){$(".user.settings.profile").length>0&&$("#username").keyup((function(){var e=$("#name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("name").toString().toLowerCase()?e.show():e.hide()}))}function w(){$(".ui.button").keypress((function(e){13!==e.keyCode&&32!==e.keyCode||$(this).click()}))}function k(){$(".code-view .linenums").length>0&&($(document).on("click",".lines-num span",(function(e){var t=$(this),a=t.parent().siblings(".lines-code").find("ol.linenums > li");q(a,a.filter("[rel=".concat(t.attr("id"),"]")),e.shiftKey?a.filter(".active").eq(0):null),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()})),$(window).on("hashchange",(function(){var e,t=window.location.hash.match(/^#(L\d+)-(L\d+)$/),a=$(".code-view ol.linenums > li");if(t)return e=a.filter(".".concat(t[1])),q(a,e,a.filter(".".concat(t[2]))),void $("html, body").scrollTop(e.offset().top-200);(t=window.location.hash.match(/^#(L|n)(\d+)$/))&&(e=a.filter(".L".concat(t[2])),q(a,e),$("html, body").scrollTop(e.offset().top-200))})).trigger("hashchange"))}function _(e){$.ajax({url:"".concat(n,"/user/u2f/sign"),type:"POST",headers:{"X-Csrf-Token":i},data:JSON.stringify(e),contentType:"application/json; charset=utf-8"}).done((function(e){window.location.replace(e)})).fail((function(){C(1)}))}function y(e){(function(e){if(!("errorCode"in e))return!1;if(0===e.errorCode)return!1;return C(e.errorCode),!0})(e)||$.ajax({url:"".concat(n,"/user/settings/security/u2f/register"),type:"POST",headers:{"X-Csrf-Token":i},data:JSON.stringify(e),contentType:"application/json; charset=utf-8",success:function(){u()},fail:function(){C(1)}})}function C(e){var t={browser:$("#unsupported-browser"),1:$("#u2f-error-1"),2:$("#u2f-error-2"),3:$("#u2f-error-3"),4:$("#u2f-error-4"),5:$(".u2f-error-5")};t[e].removeClass("hide"),Object.keys(t).forEach((function(a){a!==e&&t[a].addClass("hide")})),$("#u2f-error").modal("show")}function x(){$.post("".concat(n,"/user/settings/security/u2f/request_register"),{_csrf:i,name:$("#nickname").val()}).success((function(e){$("#nickname").closest("div.field").removeClass("error"),$("#register-device").modal("show"),null===e.registeredKeys&&(e.registeredKeys=[]),u2fApi.register(e.appId,e.registerRequests,e.registeredKeys,30).then(y).catch((function(e){C(void 0!==e?e.metaData.code:1)}))})).fail((function(e){409===e.status&&$("#nickname").closest("div.field").addClass("error")}))}function S(e){window.history.pushState?window.history.pushState(null,null,e):window.location.hash=e}function q(e,t,a){if(e.removeClass("active"),a){var i,n=parseInt(t.attr("rel").substr(1)),o=parseInt(a.attr("rel").substr(1));if(n!==o){n>o&&(i=n,n=o,o=i);for(var r=[],s=n;s<=o;s++)r.push(".L".concat(s));return e.filter(r.join(",")).addClass("active"),void S("#L".concat(n,"-L").concat(o))}}t.addClass("active"),S("#".concat(t.attr("rel")))}function T(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var a=$(".delete.modal".concat(t));return a.find(".name").text(e.data("name")),a.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:i,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}function L(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var a=$(".addall.modal".concat(t));return a.find(".name").text(e.data("name")),a.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:i,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}"undefined"!=typeof Dropzone&&(Dropzone.autoDiscover=!1),$.fn.getCursorPosition=function(){var e=$(this).get(0),t=0;if("selectionStart"in e)t=e.selectionStart;else if("selection"in document){e.focus();var a=document.selection.createRange(),i=document.selection.createRange().text.length;a.moveStart("character",-e.value.length),t=a.text.length-i}return t},$(document).ready((function(){if(i=$("meta[name=_csrf]").attr("content"),n=$("meta[name=_suburl]").attr("content"),$(".time-since").each((function(){$(this).addClass("poping up").attr("data-content",$(this).attr("title")).attr("data-variation","inverted tiny").attr("title","")})),$(".dropdown:not(.custom)").dropdown(),$(".jump.dropdown").dropdown({action:"hide",onShow:function(){$(".poping.up").popup("hide")}}),$(".slide.up.dropdown").dropdown({transition:"slide up"}),$(".upward.dropdown").dropdown({direction:"upward"}),$(".ui.accordion").accordion(),$(".ui.checkbox").checkbox(),$(".ui.progress").progress({showActivity:!1}),$(".poping.up").popup(),$(".top.menu .poping.up").popup({onShow:function(){if($(".top.menu .menu.transition").hasClass("visible"))return!1}}),$(".tabular.menu .item").tab(),$(".tabable.menu .item").tab(),$(".toggle.button").click((function(){$($(this).data("target")).slideToggle(100)})),$("tr[data-href]").click((function(){window.location=$(this).data("href")})),"undefined"!=typeof hljs)for(var e=[].slice.call(document.querySelectorAll("pre code")||[]),t=0;t0){var r={};new Dropzone("#dropzone",{url:o.data("upload-url"),headers:{"X-Csrf-Token":i},maxFiles:o.data("max-file"),maxFilesize:o.data("max-size"),acceptedFiles:"*/*"===o.data("accepts")?null:o.data("accepts"),addRemoveLinks:!0,dictDefaultMessage:o.data("default-message"),dictInvalidFileType:o.data("invalid-input-type"),dictFileTooBig:o.data("file-too-big"),dictRemoveFile:o.data("remove-file"),init:function(){this.on("success",(function(e,t){r[e.name]=t.uuid;var a=$('')).val(t.uuid);$(".files").append(a)})),this.on("removedfile",(function(e){e.name in r&&$("#".concat(r[e.name])).remove(),o.data("remove-url")&&o.data("csrf")&&$.post(o.data("remove-url"),{file:r[e.name],_csrf:o.data("csrf")})}))}})}emojify.setConfig({img_dir:"".concat(n,"/vendor/plugins/emojify/images"),ignore_emoticons:!0});for(var s=document.getElementsByClassName("has-emoji"),c=0;c0&&(i="".concat(a,"-").concat(e[a])),void 0===e[a]?e[a]=1:e[a]+=1,(t=t.wrap('
'))).append(''))}))})),$(".issue-checkbox").click((function(){$(".issue-checkbox").children("input:checked").length>0?($("#issue-filters").addClass("hide"),$("#issue-actions").removeClass("hide")):($("#issue-filters").removeClass("hide"),$("#issue-actions").addClass("hide"))})),$(".issue-action").click((function(){var e=this.dataset.action,t=this.dataset.elementId,a=$(".issue-checkbox").children("input:checked").map((function(){return this.dataset.issueId})).get().join(),i=this.dataset.url;"0"===t&&"/assignee"===i.substr(-9)&&(t="",e="clear"),d(i,e,a,t).then((function(){"close"!==e&&"open"!==e||$('.issue-checkbox input[type="checkbox"]').each((function(e,t){t.checked=!1})),u()}))})),$('.issue-checkbox input[type="checkbox"]:checked').first().each((function(e,t){t.checked=!1,$(t).click()})),w(),$("#search-user-box").search({minCharacters:2,apiSettings:{url:"".concat(n,"/api/v1/users/search?q={query}"),onResponse:function(e){var t=[];return $.each(e.data,(function(e,i){var n=i.login;i.full_name&&i.full_name.length>0&&(n+=" (".concat(a(i.full_name),")")),t.push({title:n,image:i.avatar_url})})),{results:t}}},searchFields:["login","full_name"],showNoResults:!1}),(y=$("#search-team-box")).search({minCharacters:2,apiSettings:{url:"".concat(n,"/api/v1/orgs/").concat(y.data("org"),"/teams/search?q={query}"),headers:{"X-Csrf-Token":i},onResponse:function(e){var t=[];return $.each(e.data,(function(e,a){var i="".concat(a.name," (").concat(a.permission," access)");t.push({title:i})})),{results:t}}},searchFields:["name","description"],showNoResults:!1}),(S=$("#search-repo-box")).search({minCharacters:2,apiSettings:{url:"".concat(n,"/api/v1/repos/search?q={query}&uid=").concat(S.data("uid")),onResponse:function(e){var t=[];return $.each(e.data,(function(e,a){t.push({title:a.full_name.split("/")[1],description:a.full_name})})),{results:t}}},searchFields:["full_name"],showNoResults:!1}),f(),0!==$(".install").length&&(""===$("#db_host").val()&&($("#db_host").val("127.0.0.1:3306"),$("#db_user").val("gitea"),$("#db_name").val("gitea")),$("#db_type").change((function(){var e=$(this).val();if("SQLite3"===e)return $("#sql_settings").hide(),$("#pgsql_settings").hide(),$("#mysql_settings").hide(),$("#sqlite_settings").show(),void("SQLite3"===e&&"data/gitea_tidb"===$("#db_path").val()&&$("#db_path").val("data/gitea.db"));var t={MySQL:"127.0.0.1:3306",PostgreSQL:"127.0.0.1:5432",MSSQL:"127.0.0.1:1433"};$("#sqlite_settings").hide(),$("#sql_settings").show(),$("#pgsql_settings").toggle("PostgreSQL"===e),$("#mysql_settings").toggle("MySQL"===e),$.each(t,(function(a,i){if($("#db_host").val()===i)return $("#db_host").val(t[e]),!1}))})),$("#offline-mode input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("check"),$("#federated-avatar-lookup").checkbox("uncheck"))})),$("#disable-gravatar input").change((function(){$(this).is(":checked")?$("#federated-avatar-lookup").checkbox("uncheck"):$("#offline-mode").checkbox("uncheck")})),$("#federated-avatar-lookup input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("uncheck"),$("#offline-mode").checkbox("uncheck"))})),$("#enable-openid-signin input").change((function(){$(this).is(":checked")?$("#disable-registration input").is(":checked")||$("#enable-openid-signup").checkbox("check"):$("#enable-openid-signup").checkbox("uncheck")})),$("#disable-registration input").change((function(){$(this).is(":checked")?($("#enable-captcha").checkbox("uncheck"),$("#enable-openid-signup").checkbox("uncheck")):$("#enable-openid-signup").checkbox("check")})),$("#enable-captcha input").change((function(){$(this).is(":checked")&&$("#disable-registration").checkbox("uncheck")}))),p(),(q=function(){var e=$("#auth_username").val(),t=$("#clone_addr").val();!$("#mirror").is(":checked")&&e&&e.length>0&&void 0!==t&&(t.startsWith("https://github.com")||t.startsWith("http://github.com"))?$("#migrate_items").show():$("#migrate_items").hide()})(),$("#clone_addr").on("input",q),$("#auth_username").on("input",q),$("#mirror").on("change",q),function(){var e=$(".repository.wiki textarea#edit_area");if(e.length>0){var t=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,previewRender:function(t,a){return setTimeout((function(){$.post(e.data("url"),{_csrf:i,mode:"gfm",context:e.data("context"),text:t},(function(e){a.innerHTML='
'.concat(e,"
"),emojify.run($(".editor-preview")[0])}))}),0),"Loading..."},renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|",{name:"code-inline",action:function(e){var t=e.codemirror,a=t.getSelection();if(t.replaceSelection("`".concat(a,"`")),!a){var i=t.getCursor();t.setCursor(i.line,i.ch-1)}t.focus()},className:"fa fa-angle-right",title:"Add Inline Code"},"code","quote","|",{name:"checkbox-empty",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [ ] ".concat(t.getSelection())),t.focus()},className:"fa fa-square-o",title:"Add Checkbox (empty)"},{name:"checkbox-checked",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [x] ".concat(t.getSelection())),t.focus()},className:"fa fa-check-square-o",title:"Add Checkbox (checked)"},"|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen"]});$(t.codemirror.getInputField()).addClass("js-quick-submit")}}(),l(),g(),0!==$(".organization").length&&$(".organization.settings.options").length>0&&$("#org_name").keyup((function(){var e=$("#org-name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("org-name").toString().toLowerCase()?e.show():e.hide()})),function(){if(0!==$(".new.webhook").length){$(".events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").show()})),$(".non-events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").hide()}));var e=function(){var e="POST"===$("#http_method").val();$("#content_type").parent().parent()[e?"show":"hide"]()};e(),$("#http_method").change((function(){e()})),$("#test-delivery").click((function(){var e=$(this);e.addClass("loading disabled"),$.post(e.data("link"),{_csrf:i}).done(setTimeout((function(){window.location.href=e.data("redirect")}),5e3))}))}}(),function(){if(0!==$(".admin").length){if(($(".admin.new.user").length>0||$(".admin.edit.user").length>0)&&$("#login_type").change((function(){"0"===$(this).val().substring(0,1)?($("#login_name").removeAttr("required"),$(".non-local").hide(),$(".local").show(),$("#user_name").focus(),"required"===$(this).data("password")&&$("#password").attr("required","required")):($("#login_name").attr("required","required"),$(".non-local").show(),$(".local").hide(),$("#login_name").focus(),$("#password").removeAttr("required"))})),$(".admin.new.authentication").length>0&&($("#auth_type").change((function(){$(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size").hide(),$(".ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]").removeAttr("required"),$(".binddnrequired").removeClass("required");var e=$(this).val();switch(e){case"2":$(".ldap").show(),$(".binddnrequired input, .ldap div.required:not(.dldap) input").attr("required","required"),$(".binddnrequired").addClass("required");break;case"3":$(".smtp").show(),$(".has-tls").show(),$(".smtp div.required input, .has-tls").attr("required","required");break;case"4":$(".pam").show(),$(".pam input").attr("required","required");break;case"5":$(".dldap").show(),$(".dldap div.required:not(.ldap) input").attr("required","required");break;case"6":$(".oauth2").show(),$(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input").attr("required","required"),r()}"2"!==e&&"5"!==e||n(),"2"===e&&o()})),$("#auth_type").change(),$("#security_protocol").change(n),$("#use_paged_search").change(o),$("#oauth2_provider").change(r),$("#oauth2_use_custom_url").change(s)),$(".admin.edit.authentication").length>0){var e=$("#auth_type").val();"2"===e||"5"===e?($("#security_protocol").change(n),"2"===e&&$("#use_paged_search").change(o)):"6"===e&&($("#oauth2_provider").change(r),$("#oauth2_use_custom_url").change(s),r())}if($(".admin.notice")){var t=$("#detail-modal");$(".view-detail").click((function(){return t.find(".content p").text($(this).data("content")),t.modal("show"),!1}));var a=$(".select.table .ui.checkbox");$(".select.action").click((function(){switch($(this).data("action")){case"select-all":a.checkbox("check");break;case"deselect-all":a.checkbox("uncheck");break;case"inverse":a.checkbox("toggle")}})),$("#delete-selection").click((function(){var e=$(this);e.addClass("loading disabled");var t=[];a.each((function(){$(this).checkbox("is checked")&&t.push($(this).data("id"))})),$.post(e.data("link"),{_csrf:i,ids:t}).done((function(){window.location.href=e.data("redirect")}))}))}}function n(){$("#security_protocol").val()>0?$(".has-tls").show():$(".has-tls").hide()}function o(){$("#use_paged_search").prop("checked")?$(".search-page-size").show().find("input").attr("required","required"):$(".search-page-size").hide().find("input").removeAttr("required")}function r(){switch($(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url").hide(),$(".open_id_connect_auto_discovery_url input[required]").removeAttr("required"),$("#oauth2_provider").val()){case"github":case"gitlab":case"gitea":$(".oauth2_use_custom_url").show();break;case"openidConnect":$(".open_id_connect_auto_discovery_url input").attr("required","required"),$(".open_id_connect_auto_discovery_url").show()}s()}function s(){var e=$("#oauth2_provider").val();if($(".oauth2_use_custom_url_field").hide(),$(".oauth2_use_custom_url_field input[required]").removeAttr("required"),$("#oauth2_use_custom_url").is(":checked"))switch($("#oauth2_token_url").val()||$("#oauth2_token_url").val($("#".concat(e,"_token_url")).val()),$("#oauth2_auth_url").val()||$("#oauth2_auth_url").val($("#".concat(e,"_auth_url")).val()),$("#oauth2_profile_url").val()||$("#oauth2_profile_url").val($("#".concat(e,"_profile_url")).val()),$("#oauth2_email_url").val()||$("#oauth2_email_url").val($("#".concat(e,"_email_url")).val()),e){case"github":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url").show();break;case"gitea":case"gitlab":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url").show(),$("#oauth2_email_url").val("")}}}(),k(),function(){var e=document.getElementById("app");if(!e)return;Vue.component("repo-search",{delimiters:["${","}"],props:{searchLimit:{type:Number,default:10},suburl:{type:String,required:!0},uid:{type:Number,required:!0},organizations:{type:Array,default:[]},isOrganization:{type:Boolean,default:!0},canCreateOrganization:{type:Boolean,default:!1},organizationsTotalCount:{type:Number,default:0},moreReposLink:{type:String,default:""}},data:function(){return{tab:"repos",repos:[],reposTotalCount:0,reposFilter:"all",searchQuery:"",isLoading:!1,repoTypes:{all:{count:0,searchMode:""},forks:{count:0,searchMode:"fork"},mirrors:{count:0,searchMode:"mirror"},sources:{count:0,searchMode:"source"},collaborative:{count:0,searchMode:"collaborative"}}}},computed:{showMoreReposLink:function(){return this.repos.length>0&&this.repos.length'.concat(n[r],"
")).insertBefore(o);F.css("display","none"),R.show()}})).fail((function(t){if(422===t.status)if(t.responseJSON.invalidTopics.length>0){M.formatPrompt=t.responseJSON.message;var a=t.responseJSON.invalidTopics,i=z.children("a.ui.label");e.split(",").forEach((function(e,t){for(var n=0;n]*>?/gm,""),i=!1,n=[];if(z.find("div.label.visible.topic,a.label.visible").each((function(e,t){n.push(t.dataset.value)})),e.topics){for(var o=!1,r=0;r0&&!i?(t.success=!0,t.results.unshift({description:a,"data-value":a})):a.length>0&&i&&t.results.sort((function(e,t){return e.description.toLowerCase()===a.toLowerCase()?-1:t.description.toLowerCase()===a.toLowerCase()?1:e.description>t.description?-1:e.description').concat(a(n.repository.full_name),""),value:n.id})})),t},cache:!1},fullTextSearch:!0}),$(".menu a.label-filter-item").each((function(){$(this).click((function(e){if(e.altKey){e.preventDefault();var t=$(this).attr("href"),a=$(this).data("label-id"),i="labels=(-?[0-9]+%2c)*(".concat(a,")(%2c-?[0-9]+)*&");window.location=t.replace(new RegExp(i),"labels=$1-$2$3&")}}))})),$(".menu .ui.dropdown.label-filter").keydown((function(e){if(e.altKey&&13===e.keyCode){var t=$(".menu .ui.dropdown.label-filter .menu .item.selected");if(t.length>0){var a=$(t[0]),i=a.attr("href"),n=a.data("label-id"),o="labels=(-?[0-9]+%2c)*(".concat(n,")(%2c-?[0-9]+)*&");window.location=i.replace(new RegExp(o),"labels=$1-$2$3&")}}}))}(),$(".title_wip_desc > a").click((function(e){e.preventDefault();var t=$("#issue_title");t.focus();var a=t.val().trim().toUpperCase();for(var i in wipPrefixes)if(a.startsWith(wipPrefixes[i].toUpperCase()))return;t.val("".concat(wipPrefixes[0]," ").concat(t.val()))})),$(".show-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).removeClass("hide"),$("#code-preview-".concat(t)).removeClass("hide"),$("#hide-outdated-".concat(t)).removeClass("hide")})),$(".hide-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).addClass("hide"),$("#code-preview-".concat(t)).addClass("hide"),$("#show-outdated-".concat(t)).removeClass("hide")})),$("button.comment-form-reply").on("click",(function(e){e.preventDefault(),$(this).hide();var t=$(this).parent().find(".comment-form");t.removeClass("hide"),m(t.find(".menu"))})),0!==$(".repository.pull.diff").length&&($(".diff-detail-box.ui.sticky").sticky(),$(".btn-review").on("click",(function(e){e.preventDefault(),$(this).closest(".dropdown").find(".menu").toggle("visible")})).closest(".dropdown").find(".link.close").on("click",(function(e){e.preventDefault(),$(this).closest(".menu").toggle("visible")})),$(".code-view .lines-code,.code-view .lines-num").on("mouseenter",(function(){var e=$(this).closest("td");$(this).closest("tr").addClass(e.hasClass("lines-num-old")||e.hasClass("lines-code-old")?"focus-lines-old":"focus-lines-new")})).on("mouseleave",(function(){$(this).closest("tr").removeClass("focus-lines-new focus-lines-old")})),$(".add-code-comment").on("click",(function(e){if(!$(e.target).hasClass("btn-add-single")){e.preventDefault();var t=$(this).closest(".code-diff").hasClass("code-diff-split"),a=$(this).data("side"),i=$(this).data("idx"),n=$(this).data("path"),o=$("#pull_review_add_comment").html(),r=$(this).closest("tr"),s=r.next();s.hasClass("add-comment")||(s=$(''.concat(t?'':'',"")),r.after(s));var c=s.find(".add-comment-".concat(a)),l=c.find(".comment-code-cloud");0===l.length&&(c.html(o),m((l=c.find(".comment-code-cloud")).find(".menu")),c.find("input[name='line']").val(i),c.find("input[name='side']").val("left"===a?"previous":"proposed"),c.find("input[name='path']").val(n)),l.find("textarea").focus()}}))),function e(){var t=$("#repo_migrating");if($("#repo_migrating_failed").hide(),t){var a=t.attr("repo");if(void 0===a)return;$.ajax({type:"GET",url:"".concat(n,"/").concat(a,"/status"),data:{_csrf:i},complete:function(t){if(200===t.status&&t.responseJSON)return 0===t.responseJSON.status?void window.location.reload():void setTimeout((function(){e()}),2e3);$("#repo_migrating_progress").hide(),$("#repo_migrating_failed").show()}})}}(),function(){var e=$("#repo_template"),t=function(){var t=$("#template_units"),a=$("#non_template");""!==e.val()?(t.show(),a.hide()):(t.hide(),a.show())};e.change(t),t();var i=function(){$("#repo_template_search").dropdown({apiSettings:{url:"".concat(n,"/api/v1/repos/search?q={query}&template=true&priority_owner_id=").concat($("#uid").val()),onResponse:function(e){var t={success:!0,results:[]};return t.results.push({name:"",value:""}),$.each(e.data,(function(e,i){t.results.push({name:a(i.full_name),value:i.id})})),t},cache:!1},fullTextSearch:!0})};$("#uid").change(i),i()}(),$("#repo-clone-url").length>0)switch(localStorage.getItem("repo-clone-protocol")){case"ssh":0===$("#repo-clone-ssh").click().length&&$("#repo-clone-https").click();break;default:$("#repo-clone-https").click()}var J,V={"div.user.settings":b,"div.repository.settings.collaboration":v};for(J in V)if($(J).length>0){V[J]();break}var H=$("#clone_addr");H.change((function(){var e=$("#repo_name");H.val().length>0&&0===e.val().length&&e.val(H.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3])}))})),$((function(){0===$(".user.signin").length&&$("form:not(.ignore-dirty)").areYouSure(),$("#ssh-key-content").on("change paste keyup",(function(){var e=$(this).val().split(" "),t=$("#ssh-key-title");""===t.val()&&3===e.length&&""!==e[2]&&t.val(e[2])}))})),window.timeAddManual=function(){$(".mini.modal").modal({duration:200,onApprove:function(){$("#add_time_manual_form").submit()}}).modal("show")},window.toggleStopwatch=function(){$("#toggle_stopwatch_form").submit()},window.cancelStopwatch=function(){$("#cancel_stopwatch_form").submit()},window.initHeatmap=function(e,t,a){var i=document.getElementById(e);if(i){(a=a||{}).contributions=a.contributions||"contributions",a.no_contributions=a.no_contributions||"No contributions";var n=["${","}"];Vue.component("activity-heatmap",{delimiters:n,props:{user:{type:String,required:!0},suburl:{type:String,required:!0},locale:{type:Object,required:!0}},data:function(){return{isLoading:!0,colorRange:[],endDate:null,values:[],totalContributions:0}},mounted:function(){this.colorRange=[this.getColor(0),this.getColor(1),this.getColor(2),this.getColor(3),this.getColor(4),this.getColor(5)],this.endDate=new Date,this.loadHeatmap(this.user)},methods:{loadHeatmap:function(e){var t=this;$.get("".concat(this.suburl,"/api/v1/users/").concat(e,"/heatmap"),(function(e){for(var a=[],i=0;i

total contributions in the last 12 months

'}),new Vue({delimiters:n,el:i,data:{suburl:document.querySelector("meta[name=_suburl]").content,heatmapUser:t,locale:a}})}},$(".commit-button").click((function(e){e.preventDefault(),$(this).parent().find(".commit-body").toggle()})),window.toggleDeadlineForm=function(){$("#deadlineForm").fadeToggle(150)},window.setDeadline=function(){var e=$("#deadlineDate").val();window.updateDeadline(e)},window.updateDeadline=function(e){$("#deadline-err-invalid-date").hide(),$("#deadline-loader").addClass("loading");var t=null;if(""!==e){var a=Date.parse(e);if(Number.isNaN(a))return $("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show(),!1;t=new Date(a)}$.ajax("".concat($("#update-issue-deadline-form").attr("action"),"/deadline"),{data:JSON.stringify({due_date:t}),headers:{"X-Csrf-Token":i,"X-Remote":!0},contentType:"application/json",type:"POST",success:function(){u()},error:function(){$("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show()}})},window.deleteDependencyModal=function(e,t){$(".remove-dependency").modal({closable:!1,duration:200,onApprove:function(){$("#removeDependencyID").val(e),$("#dependencyType").val(t),$("#removeDependencyForm").submit()}}).modal("show")},window.cancelCodeComment=function(e){var t=$(e).closest("form");t.length>0&&t.hasClass("comment-form")?(t.addClass("hide"),t.parent().find("button.comment-form-reply").show()):t.closest(".comment-code-cloud").remove()},window.onOAuthLoginClick=function(){var e=$("#oauth2-login-loader"),t=$("#oauth2-login-navigator");t.hide(),e.removeClass("disabled"),setTimeout((function(){e.addClass("disabled"),t.show()}),5e3)}}]); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/js/index.js.map b/public/js/index.js.map index 2d346471e..99c04a800 100644 --- a/public/js/index.js.map +++ b/public/js/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./web_src/js/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","htmlEncode","text","jQuery","html","csrf","suburl","previewFileModes","simpleMDEditor","codeMirrorEditor","initCommentPreviewTab","$form","$tabMenu","find","tab","data","click","$this","$","this","post","val","$previewPanel","emojify","run","each","hljs","highlightBlock","buttonsClickOnEnter","initEditForm","length","$previewTab","split","initEditPreviewTab","$diffPreviewPanel","initEditDiffTab","updateIssuesMeta","url","action","issueIds","elementId","Promise","resolve","ajax","type","success","reload","window","location","initImagePaste","target","field","addEventListener","event","pasteEvent","callback","clipboardData","items","indexOf","blob","getAsFile","preventDefault","stopPropagation","retrieveImageFromClipboardAsBlob","img","substr","lastIndexOf","selectionStart","startPos","endPos","selectionEnd","substring","insertAtCursor","file","xhr","XMLHttpRequest","onload","status","responseText","open","setRequestHeader","formData","FormData","append","send","uploadFile","res","JSON","parse","oldval","newval","replace","replaceAndKeepCursor","uuid","input","initCommentForm","initListSubmits","selector","outerSelector","$list","$noSelect","$listMenu","hasLabelUpdateAction","labels","dropdown","promises","keys","forEach","label","promise","push","all","then","hasClass","removeClass","addClass","listIds","parent","join","selectItem","select_id","input_id","$menu","hasUpdateAction","$selectBranch","selectedValue","css","initBranchSelector","initRepository","initFilterSearchDropdown","$dropdown","fullTextSearch","selectOnKeydown","onChange","_text","_value","$choice","href","message","noResults","$data","searchTerm","canCreateBranch","menuVisible","active","branch","tag","selected","remove","Vue","delimiters","el","beforeMount","vm","$el","getAttribute","document","body","contains","set","watch","visible","focusSearchField","computed","filteredItems","filter","item","toLowerCase","showCreateNewBranch","showNoResults","methods","prev","getSelected","createNewBranch","$refs","newBranchForm","submit","nextTick","searchField","focus","j","getSelectedIndexInFiltered","scrollToActive","Array","isArray","cont","scrollContainer","offsetTop","scrollTop","clientHeight","keydown","keyCode","keyup","$prompt","toString","show","hide","change","checked","$newLabelPanel","minicolors","color_hex","modal","onApprove","$datepicker","datetimepicker","lang","inline","timepicker","startDate","formatDate","onSelectDate","ct","dateFormat","$issueTitle","$editInput","editTitleToggle","toggle","title","$segment","next","$editContentZone","$renderContent","$rawContent","$textarea","issuesTribute","attach","emojiTribute","$dropzone","$files","filenameDict","dropzone","headers","maxFiles","maxFilesize","acceptedFiles","addRemoveLinks","dictDefaultMessage","dictInvalidFileType","dictFileTooBig","dictRemoveFile","init","on","submitted","_csrf","getJSON","drop","removeAllFiles","empty","imgSrc","emit","files","$editContentForm","attr","$attachments","map","content","$content","attachments","confirm","$statusButton","$mergeButton","e","closest","initReactionSelector","reactions","popup","done","resp","react","insertBefore","appendTo","hasEmoji","$item","addLine","delLine","addPercent","parseFloat","localStorage","setItem","select","$repoComparePull","assingMenuAttributes","menu","id","Math","floor","random","initRepositoryCollaboration","initEditor","prop","$editFilename","$section","$divider","parts","getCursorPosition","last","setSelectionRange","element","trigger","$editArea","markdownFileExts","lineWrapExtensions","spec","extension","extWithDot","dataUrl","apiCall","exec","info","CodeMirror","findModeByExtension","previewLink","mime","toTextArea","SimpleMDE","autoDownloadFontAwesome","forceSync","renderingConfig","singleLineBreaks","indentWithTabs","tabSize","spellChecker","previewRender","plainText","preview","setTimeout","innerHTML","toolbar","setSimpleMDE","fromTextArea","lineNumbers","cm","_change","getValue","setCodeMirror","setOption","autoLoadMode","editorconfig","indent_style","Tab","spaces","parseInt","getOption","replaceSelection","indent_size","tab_width","$commitButton","$editForm","areYouSure","silent","dirtyClass","fieldSelector","dirty","initUserSettings","keypress","initCodeView","$select","siblings","selectRange","shiftKey","eq","getSelection","removeAllRanges","selection","hash","match","$first","offset","top","u2fSigned","stringify","contentType","fail","u2fError","u2fRegistered","errorCode","checkError","errorType","u2fErrors","1","2","3","4","5","u2fRegisterRequest","req","registeredKeys","u2fApi","register","appId","registerRequests","catch","reason","undefined","metaData","code","changeHash","history","pushState","$from","a","b","classes","showDeletePopup","dialog","closable","redirect","showAddAllPopup","Dropzone","autoDiscover","from","toStr","isCallable","fn","maxSafeInteger","pow","toLength","len","number","Number","isNaN","isFinite","abs","toInteger","min","max","arrayLike","C","TypeError","mapFn","arguments","T","A","kValue","k","assign","_varArgs","to","index","nextSource","nextKey","writable","configurable","String","endsWith","pattern","pos","Sel","createRange","SelLength","moveStart","ready","onShow","transition","direction","accordion","checkbox","progress","showActivity","slideToggle","nodes","slice","querySelectorAll","setConfig","img_dir","ignore_emoticons","getElementsByClassName","childNodes","nodeName","clipboard","Clipboard","clearSelection","setAttribute","node","encodeURIComponent","wrap","children","dataset","issueIDs","issueId","_","first","search","minCharacters","apiSettings","onResponse","response","_i","login","full_name","image","avatar_url","results","searchFields","$searchTeamBox","permission","searchTeams","$searchRepoBox","description","searchRepositories","dbType","dbDefaults","_type","defaultHost","is","toggleMigrations","authUserName","cloneAddr","startsWith","initMigration","simplemde","codemirror","cursorPos","getCursor","setCursor","line","ch","className","getInputField","initWikiForm","updateContentType","initWebhook","removeAttr","authType","onOAuth2Change","onSecurityProtocolChange","onUsePagedSearchChange","onOAuth2UseCustomURLChange","$detailModal","$checkboxes","ids","provider","initAdmin","getElementById","component","props","searchLimit","default","required","uid","organizations","isOrganization","Boolean","canCreateOrganization","organizationsTotalCount","moreReposLink","repos","reposTotalCount","reposFilter","searchQuery","isLoading","repoTypes","count","searchMode","showMoreReposLink","searchURL","repoTypeCount","mounted","searchRepos","self","changeTab","changeReposFilter","showRepo","repo","owner","mirror","fork","searchedMode","searchedURL","searchedQuery","result","_textStatus","request","getResponseHeader","always","repoClass","private","querySelector","initVueApp","ctrlKey","altKey","metaKey","isExpanded","initNavbarContentToggle","mgrBtn","editDiv","viewDiv","saveBtn","topicDropdown","topicForm","topicPrompts","hidePrompt","prompts","countPrompt","formatPrompt","getPrompts","topics","_data","responseJSON","topicArray","invalidTopics","topicLables","form","allowAdditions","forceSelection","fields","saveRemoteData","duration","variation","blue","basic","throttle","cache","formattedResponse","query","urlData","trim","found_query","current_topics","found","topic_name","unshift","sort","onLabelCreate","contents","replaceWith","onAdd","addedValue","_addedText","$addedChoice","settings","rules","validateTopic","_values","regExp","identifier","prompt","initTopicbar","ensureSupport","sign","challenge","err","allowMultiple","repolink","repoId","crossRepoSearch","issueSearchUrl","filteredResponse","currIssueId","issue","repository","regStr","newStr","RegExp","selectedItems","initIssueList","toUpperCase","wipPrefixes","sticky","isSplit","side","idx","path","tr","ntr","after","td","commentCloud","initRepoStatusChecker","migrating","repo_name","complete","$repoTemplate","checkTemplate","$templateUnits","$nonTemplate","changeOwner","_r","initTemplateSearch","getItem","routes","$cloneAddr","$repoName","arrays","$title","timeAddManual","toggleStopwatch","cancelStopwatch","initHeatmap","appElementId","heatmapUser","locale","contributions","no_contributions","vueDelimeters","user","colorRange","endDate","values","totalContributions","getColor","Date","loadHeatmap","userName","chartRawData","chartData","date","timestamp","createElement","appendChild","color","getComputedStyle","backgroundColor","removeChild","template","toggleDeadlineForm","fadeToggle","setDeadline","deadline","updateDeadline","deadlineString","realDeadline","newDate","error","deleteDependencyModal","cancelCodeComment","btn","onOAuthLoginClick","oauthLoader","oauthNav"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAG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,EAASvhB,SACX","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* globals wipPrefixes, issuesTribute, emojiTribute */\n/* exported timeAddManual, toggleStopwatch, cancelStopwatch, initHeatmap */\n/* exported toggleDeadlineForm, setDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */\n'use strict';\n\nfunction htmlEncode(text) {\n return jQuery('
').text(text).html()\n}\n\nlet csrf;\nlet suburl;\nlet previewFileModes;\nlet simpleMDEditor;\nlet codeMirrorEditor;\n\n// Disable Dropzone auto-discover because it's manually initialized\nif (typeof(Dropzone) !== \"undefined\") {\n Dropzone.autoDiscover = false;\n}\n\n// Polyfill for IE9+ support (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)\nif (!Array.from) {\n Array.from = (function () {\n const toStr = Object.prototype.toString;\n const isCallable = function (fn) {\n return typeof fn === 'function' || toStr.call(fn) === '[object Function]';\n };\n const toInteger = function (value) {\n const number = Number(value);\n if (isNaN(number)) { return 0; }\n if (number === 0 || !isFinite(number)) { return number; }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n };\n const maxSafeInteger = Math.pow(2, 53) - 1;\n const toLength = function (value) {\n const len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n };\n\n // The length property of the from method is 1.\n return function from(arrayLike/*, mapFn, thisArg */) {\n // 1. Let C be the this value.\n const C = this;\n\n // 2. Let items be ToObject(arrayLike).\n const items = Object(arrayLike);\n\n // 3. ReturnIfAbrupt(items).\n if (arrayLike == null) {\n throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");\n }\n\n // 4. If mapfn is undefined, then let mapping be false.\n const mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n let T;\n if (typeof mapFn !== 'undefined') {\n // 5. else\n // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError('Array.from: when provided, the second argument must be a function');\n }\n\n // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 2) {\n T = arguments[2];\n }\n }\n\n // 10. Let lenValue be Get(items, \"length\").\n // 11. Let len be ToLength(lenValue).\n const len = toLength(items.length);\n\n // 13. If IsConstructor(C) is true, then\n // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.\n // 14. a. Else, Let A be ArrayCreate(len).\n const A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n // 16. Let k be 0.\n let k = 0;\n // 17. Repeat, while k < len… (also steps a - h)\n let kValue;\n while (k < len) {\n kValue = items[k];\n if (mapFn) {\n A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);\n } else {\n A[k] = kValue;\n }\n k += 1;\n }\n // 18. Let putStatus be Put(A, \"length\", len, true).\n A.length = len;\n // 20. Return A.\n return A;\n };\n }());\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\nif (typeof Object.assign != 'function') {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n value: function assign(target, _varArgs) { // .length of function is 2\n 'use strict';\n if (target == null) { // TypeError if undefined or null\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n const to = Object(target);\n\n for (let index = 1; index < arguments.length; index++) {\n const nextSource = arguments[index];\n\n if (nextSource != null) { // Skip over if undefined or null\n for (const nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n}\n\nfunction initCommentPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find('.item[data-tab=\"' + $tabMenu.data('preview') + '\"]').click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n \"_csrf\": csrf,\n \"mode\": \"gfm\",\n \"context\": $this.data('context'),\n \"text\": $form.find('.tab.segment[data-tab=\"' + $tabMenu.data('write') + '\"] textarea').val()\n },\n function (data) {\n const $previewPanel = $form.find('.tab.segment[data-tab=\"' + $tabMenu.data('preview') + '\"]');\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n }\n );\n });\n\n buttonsClickOnEnter();\n}\n\nfunction initEditPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n const $previewTab = $tabMenu.find('.item[data-tab=\"' + $tabMenu.data('preview') + '\"]');\n if ($previewTab.length) {\n previewFileModes = $previewTab.data('preview-file-modes').split(',');\n $previewTab.click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n \"_csrf\": csrf,\n \"mode\": \"gfm\",\n \"context\": $this.data('context'),\n \"text\": $form.find('.tab.segment[data-tab=\"' + $tabMenu.data('write') + '\"] textarea').val()\n },\n function (data) {\n const $previewPanel = $form.find('.tab.segment[data-tab=\"' + $tabMenu.data('preview') + '\"]');\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n }\n );\n });\n }\n}\n\nfunction initEditDiffTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find('.item[data-tab=\"' + $tabMenu.data('diff') + '\"]').click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n \"_csrf\": csrf,\n \"context\": $this.data('context'),\n \"content\": $form.find('.tab.segment[data-tab=\"' + $tabMenu.data('write') + '\"] textarea').val()\n },\n function (data) {\n const $diffPreviewPanel = $form.find('.tab.segment[data-tab=\"' + $tabMenu.data('diff') + '\"]');\n $diffPreviewPanel.html(data);\n emojify.run($diffPreviewPanel[0]);\n }\n );\n });\n}\n\n\nfunction initEditForm() {\n if ($('.edit.form').length == 0) {\n return;\n }\n\n initEditPreviewTab($('.edit.form'));\n initEditDiffTab($('.edit.form'));\n}\n\nfunction initBranchSelector() {\n const $selectBranch = $('.ui.select-branch')\n const $branchMenu = $selectBranch.find('.reference-list-menu');\n $branchMenu.find('.item:not(.no-select)').click(function () {\n const selectedValue = $(this).data('id');\n $($(this).data('id-selector')).val(selectedValue);\n $selectBranch.find('.ui .branch-name').text(selectedValue);\n });\n $selectBranch.find('.reference.column').click(function () {\n $selectBranch.find('.scrolling.reference-list-menu').css('display', 'none');\n $selectBranch.find('.reference .text').removeClass('black');\n $($(this).data('target')).css('display', 'block');\n $(this).find('.text').addClass('black');\n return false;\n });\n}\n\nfunction updateIssuesMeta(url, action, issueIds, elementId) {\n return new Promise(function(resolve) {\n $.ajax({\n type: \"POST\",\n url: url,\n data: {\n \"_csrf\": csrf,\n \"action\": action,\n \"issue_ids\": issueIds,\n \"id\": elementId\n },\n success: resolve\n })\n })\n}\n\nfunction initRepoStatusChecker() {\n const migrating = $(\"#repo_migrating\");\n $('#repo_migrating_failed').hide();\n if (migrating) {\n const repo_name = migrating.attr('repo');\n if (typeof repo_name === 'undefined') {\n return\n }\n $.ajax({\n type: \"GET\",\n url: suburl +\"/\"+repo_name+\"/status\",\n data: {\n \"_csrf\": csrf,\n },\n complete: function(xhr) {\n if (xhr.status == 200) {\n if (xhr.responseJSON) {\n if (xhr.responseJSON[\"status\"] == 0) {\n location.reload();\n return\n }\n\n setTimeout(function () {\n initRepoStatusChecker()\n }, 2000);\n return\n }\n }\n $('#repo_migrating_progress').hide();\n $('#repo_migrating_failed').show();\n }\n })\n }\n}\n\nfunction initReactionSelector(parent) {\n let reactions = '';\n if (!parent) {\n parent = $(document);\n reactions = '.reactions > ';\n }\n\n parent.find(reactions + 'a.label').popup({'position': 'bottom left', 'metadata': {'content': 'title', 'title': 'none'}});\n\n parent.find('.select-reaction > .menu > .item, ' + reactions + 'a.label').on('click', function(e){\n const vm = this;\n e.preventDefault();\n\n if ($(this).hasClass('disabled')) return;\n\n const actionURL = $(this).hasClass('item') ?\n $(this).closest('.select-reaction').data('action-url') :\n $(this).data('action-url');\n const url = actionURL + '/' + ($(this).hasClass('blue') ? 'unreact' : 'react');\n $.ajax({\n type: 'POST',\n url: url,\n data: {\n '_csrf': csrf,\n 'content': $(this).data('content')\n }\n }).done(function(resp) {\n if (resp && (resp.html || resp.empty)) {\n const content = $(vm).closest('.content');\n let react = content.find('.segment.reactions');\n if (!resp.empty && react.length > 0) {\n react.remove();\n }\n if (!resp.empty) {\n react = $('
');\n const attachments = content.find('.segment.bottom:first');\n if (attachments.length > 0) {\n react.insertBefore(attachments);\n } else {\n react.appendTo(content);\n }\n react.html(resp.html);\n const hasEmoji = react.find('.has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji.get(i));\n }\n react.find('.dropdown').dropdown();\n initReactionSelector(react);\n }\n }\n });\n });\n}\n\nfunction insertAtCursor(field, value) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.substring(0, startPos)\n + value\n + field.value.substring(endPos, field.value.length);\n field.selectionStart = startPos + value.length;\n field.selectionEnd = startPos + value.length;\n } else {\n field.value += value;\n }\n}\n\nfunction replaceAndKeepCursor(field, oldval, newval) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.replace(oldval, newval);\n field.selectionStart = startPos + newval.length - oldval.length;\n field.selectionEnd = endPos + newval.length - oldval.length;\n } else {\n field.value = field.value.replace(oldval, newval);\n }\n}\n\nfunction retrieveImageFromClipboardAsBlob(pasteEvent, callback){\n if (!pasteEvent.clipboardData) {\n return;\n }\n\n const items = pasteEvent.clipboardData.items;\n if (typeof(items) === \"undefined\") {\n return;\n }\n\n for (let i = 0; i < items.length; i++) {\n if (items[i].type.indexOf(\"image\") === -1) continue;\n const blob = items[i].getAsFile();\n\n if (typeof(callback) === \"function\") {\n pasteEvent.preventDefault();\n pasteEvent.stopPropagation();\n callback(blob);\n }\n }\n}\n\nfunction uploadFile(file, callback) {\n const xhr = new XMLHttpRequest();\n\n xhr.onload = function() {\n if (xhr.status == 200) {\n callback(xhr.responseText);\n }\n };\n\n xhr.open(\"post\", suburl + \"/attachments\", true);\n xhr.setRequestHeader(\"X-Csrf-Token\", csrf);\n const formData = new FormData();\n formData.append('file', file, file.name);\n xhr.send(formData);\n}\n\nfunction reload() {\n window.location.reload();\n}\n\nfunction initImagePaste(target) {\n target.each(function() {\n const field = this;\n field.addEventListener('paste', function(event){\n retrieveImageFromClipboardAsBlob(event, function(img) {\n const name = img.name.substr(0, img.name.lastIndexOf('.'));\n insertAtCursor(field, '![' + name + ']()');\n uploadFile(img, function(res) {\n const data = JSON.parse(res);\n replaceAndKeepCursor(field, '![' + name + ']()', '![' + name + '](' + suburl + '/attachments/' + data.uuid + ')');\n const input = $('').val(data.uuid);\n $('.files').append(input);\n });\n });\n }, false);\n });\n}\n\nfunction initCommentForm() {\n if ($('.comment.form').length == 0) {\n return\n }\n\n initBranchSelector();\n initCommentPreviewTab($('.comment.form'));\n initImagePaste($('.comment.form textarea'));\n\n // Listsubmit\n function initListSubmits(selector, outerSelector) {\n const $list = $('.ui.' + outerSelector + '.list');\n const $noSelect = $list.find('.no-select');\n const $listMenu = $('.' + selector + ' .menu');\n let hasLabelUpdateAction = $listMenu.data('action') == 'update';\n const labels = {};\n\n $('.' + selector).dropdown('setting', 'onHide', function(){\n hasLabelUpdateAction = $listMenu.data('action') == 'update'; // Update the var\n if (hasLabelUpdateAction) {\n const promises = [];\n Object.keys(labels).forEach(function(elementId) {\n const label = labels[elementId];\n const promise = updateIssuesMeta(\n label[\"update-url\"],\n label[\"action\"],\n label[\"issue-id\"],\n elementId\n );\n promises.push(promise);\n });\n Promise.all(promises).then(reload);\n }\n });\n\n $listMenu.find('.item:not(.no-select)').click(function () {\n\n // we don't need the action attribute when updating assignees\n if (selector == 'select-assignees-modify') {\n\n // UI magic. We need to do this here, otherwise it would destroy the functionality of\n // adding/removing labels\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n }\n\n updateIssuesMeta(\n $listMenu.data('update-url'),\n \"\",\n $listMenu.data('issue-id'),\n $(this).data('id')\n );\n $listMenu.data('action', 'update'); // Update to reload the page when we updated items\n return false;\n }\n\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n \"update-url\": $listMenu.data('update-url'),\n \"action\": \"detach\",\n \"issue-id\": $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n \"update-url\": $listMenu.data('update-url'),\n \"action\": \"attach\",\n \"issue-id\": $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n }\n\n const listIds = [];\n $(this).parent().find('.item').each(function () {\n if ($(this).hasClass('checked')) {\n listIds.push($(this).data('id'));\n $($(this).data('id-selector')).removeClass('hide');\n } else {\n $($(this).data('id-selector')).addClass('hide');\n }\n });\n if (listIds.length == 0) {\n $noSelect.removeClass('hide');\n } else {\n $noSelect.addClass('hide');\n }\n $($(this).parent().data('id')).val(listIds.join(\",\"));\n return false;\n });\n $listMenu.find('.no-select.item').click(function () {\n if (hasLabelUpdateAction || selector == 'select-assignees-modify') {\n updateIssuesMeta(\n $listMenu.data('update-url'),\n \"clear\",\n $listMenu.data('issue-id'),\n \"\"\n ).then(reload);\n }\n\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n });\n\n $list.find('.item').each(function () {\n $(this).addClass('hide');\n });\n $noSelect.removeClass('hide');\n $($(this).parent().data('id')).val('');\n\n });\n }\n\n // Init labels and assignees\n initListSubmits('select-label', 'labels');\n initListSubmits('select-assignees', 'assignees');\n initListSubmits('select-assignees-modify', 'assignees');\n\n function selectItem(select_id, input_id) {\n const $menu = $(select_id + ' .menu');\n const $list = $('.ui' + select_id + '.list');\n const hasUpdateAction = $menu.data('action') == 'update';\n\n $menu.find('.item:not(.no-select)').click(function () {\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('selected active')\n });\n\n $(this).addClass('selected active');\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n \"\",\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n switch (input_id) {\n case '#milestone_id':\n $list.find('.selected').html('' +\n htmlEncode($(this).text()) + '');\n break;\n case '#assignee_id':\n $list.find('.selected').html('' +\n '' +\n htmlEncode($(this).text()) + '');\n }\n $('.ui' + select_id + '.list .no-select').addClass('hide');\n $(input_id).val($(this).data('id'));\n });\n $menu.find('.no-select.item').click(function () {\n $(this).parent().find('.item:not(.no-select)').each(function () {\n $(this).removeClass('selected active')\n });\n\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n \"\",\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n\n $list.find('.selected').html('');\n $list.find('.no-select').removeClass('hide');\n $(input_id).val('');\n });\n }\n\n // Milestone and assignee\n selectItem('.select-milestone', '#milestone_id');\n selectItem('.select-assignee', '#assignee_id');\n}\n\nfunction initInstall() {\n if ($('.install').length == 0) {\n return;\n }\n\n if ($('#db_host').val()==\"\") {\n $('#db_host').val(\"127.0.0.1:3306\");\n $('#db_user').val(\"gitea\");\n $('#db_name').val(\"gitea\");\n }\n\n // Database type change detection.\n $(\"#db_type\").change(function () {\n const sqliteDefault = 'data/gitea.db';\n const tidbDefault = 'data/gitea_tidb';\n\n const dbType = $(this).val();\n if (dbType === \"SQLite3\") {\n $('#sql_settings').hide();\n $('#pgsql_settings').hide();\n $('#mysql_settings').hide();\n $('#sqlite_settings').show();\n\n if (dbType === \"SQLite3\" && $('#db_path').val() == tidbDefault) {\n $('#db_path').val(sqliteDefault);\n }\n return;\n }\n\n const dbDefaults = {\n \"MySQL\": \"127.0.0.1:3306\",\n \"PostgreSQL\": \"127.0.0.1:5432\",\n \"MSSQL\": \"127.0.0.1:1433\"\n };\n\n $('#sqlite_settings').hide();\n $('#sql_settings').show();\n\n $('#pgsql_settings').toggle(dbType === \"PostgreSQL\");\n $('#mysql_settings').toggle(dbType === \"MySQL\");\n $.each(dbDefaults, function(_type, defaultHost) {\n if ($('#db_host').val() == defaultHost) {\n $('#db_host').val(dbDefaults[dbType]);\n return false;\n }\n });\n });\n\n // TODO: better handling of exclusive relations.\n $('#offline-mode input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('check');\n $('#federated-avatar-lookup').checkbox('uncheck');\n }\n });\n $('#disable-gravatar input').change(function () {\n if ($(this).is(':checked')) {\n $('#federated-avatar-lookup').checkbox('uncheck');\n } else {\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#federated-avatar-lookup input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('uncheck');\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#enable-openid-signin input').change(function () {\n if ($(this).is(':checked')) {\n if (!$('#disable-registration input').is(':checked')) {\n $('#enable-openid-signup').checkbox('check');\n }\n } else {\n $('#enable-openid-signup').checkbox('uncheck');\n }\n });\n $('#disable-registration input').change(function () {\n if ($(this).is(':checked')) {\n $('#enable-captcha').checkbox('uncheck');\n $('#enable-openid-signup').checkbox('uncheck');\n } else {\n $('#enable-openid-signup').checkbox('check');\n }\n });\n $('#enable-captcha input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-registration').checkbox('uncheck');\n }\n });\n}\n\nfunction initRepository() {\n if ($('.repository').length == 0) {\n return;\n }\n\n function initFilterSearchDropdown(selector) {\n const $dropdown = $(selector);\n $dropdown.dropdown({\n fullTextSearch: true,\n selectOnKeydown: false,\n onChange: function (_text, _value, $choice) {\n if ($choice.data('url')) {\n window.location.href = $choice.data('url');\n }\n },\n message: {noResults: $dropdown.data('no-results')}\n });\n }\n\n // File list and commits\n if ($('.repository.file.list').length > 0 ||\n ('.repository.commits').length > 0) {\n initFilterBranchTagDropdown('.choose.reference .dropdown');\n }\n\n // Wiki\n if ($('.repository.wiki.view').length > 0) {\n initFilterSearchDropdown('.choose.page .dropdown');\n }\n\n // Options\n if ($('.repository.settings.options').length > 0) {\n $('#repo_name').keyup(function () {\n const $prompt = $('#repo-name-change-prompt');\n if ($(this).val().toString().toLowerCase() != $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n\n // Enable or select internal/external wiki system and issue tracker.\n $('.enable-system').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).addClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).removeClass('disabled');\n }\n });\n $('.enable-system-radio').change(function () {\n if (this.value == 'false') {\n $($(this).data('target')).addClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled');\n } else if (this.value == 'true') {\n $($(this).data('target')).removeClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled');\n }\n });\n }\n\n // Labels\n if ($('.repository.labels').length > 0) {\n // Create label\n const $newLabelPanel = $('.new-label.segment');\n $('.new-label.button').click(function () {\n $newLabelPanel.show();\n });\n $('.new-label.segment .cancel').click(function () {\n $newLabelPanel.hide();\n });\n\n $('.color-picker').each(function () {\n $(this).minicolors();\n });\n $('.precolors .color').click(function () {\n const color_hex = $(this).data('color-hex');\n $('.color-picker').val(color_hex);\n $('.minicolors-swatch-color').css(\"background-color\", color_hex);\n });\n $('.edit-label-button').click(function () {\n $('#label-modal-id').val($(this).data('id'));\n $('.edit-label .new-label-input').val($(this).data('title'));\n $('.edit-label .new-label-desc-input').val($(this).data('description'));\n $('.edit-label .color-picker').val($(this).data('color'));\n $('.minicolors-swatch-color').css(\"background-color\", $(this).data('color'));\n $('.edit-label.modal').modal({\n onApprove: function () {\n $('.edit-label.form').submit();\n }\n }).modal('show');\n return false;\n });\n }\n\n // Milestones\n if ($('.repository.new.milestone').length > 0) {\n const $datepicker = $('.milestone.datepicker');\n $datepicker.datetimepicker({\n lang: $datepicker.data('lang'),\n inline: true,\n timepicker: false,\n startDate: $datepicker.data('start-date'),\n formatDate: 'Y-m-d',\n onSelectDate: function (ct) {\n $('#deadline').val(ct.dateFormat('Y-m-d'));\n }\n });\n $('#clear-date').click(function () {\n $('#deadline').val('');\n return false;\n });\n }\n\n // Issues\n if ($('.repository.view.issue').length > 0) {\n // Edit issue title\n const $issueTitle = $('#issue-title');\n const $editInput = $('#edit-title-input input');\n const editTitleToggle = function () {\n $issueTitle.toggle();\n $('.not-in-edit').toggle();\n $('#edit-title-input').toggle();\n $('.in-edit').toggle();\n $editInput.focus();\n return false;\n };\n $('#edit-title').click(editTitleToggle);\n $('#cancel-edit-title').click(editTitleToggle);\n $('#save-edit-title').click(editTitleToggle).click(function () {\n if ($editInput.val().length == 0 ||\n $editInput.val() == $issueTitle.text()) {\n $editInput.val($issueTitle.text());\n return false;\n }\n\n $.post($(this).data('update-url'), {\n \"_csrf\": csrf,\n \"title\": $editInput.val()\n },\n function (data) {\n $editInput.val(data.title);\n $issueTitle.text(data.title);\n reload();\n });\n return false;\n });\n\n // Edit issue or comment content\n $('.edit-content').click(function () {\n const $segment = $(this).parent().parent().parent().next();\n const $editContentZone = $segment.find('.edit-content-zone');\n const $renderContent = $segment.find('.render-content');\n const $rawContent = $segment.find('.raw-content');\n let $textarea;\n\n // Setup new form\n if ($editContentZone.html().length == 0) {\n $editContentZone.html($('#edit-content-form').html());\n $textarea = $editContentZone.find('textarea');\n issuesTribute.attach($textarea.get());\n emojiTribute.attach($textarea.get());\n\n const $dropzone = $editContentZone.find('.dropzone');\n $dropzone.data(\"saved\", false);\n const $files = $editContentZone.find('.comment-files');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n $dropzone.dropzone({\n url: $dropzone.data('upload-url'),\n headers: {\"X-Csrf-Token\": csrf},\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init: function () {\n this.on(\"success\", function (file, data) {\n filenameDict[file.name] = {\n \"uuid\": data.uuid,\n \"submitted\": false\n }\n const input = $('').val(data.uuid);\n $files.append(input);\n });\n this.on(\"removedfile\", function (file) {\n if (!(file.name in filenameDict)) {\n return;\n }\n $('#' + filenameDict[file.name].uuid).remove();\n if ($dropzone.data('remove-url') && $dropzone.data('csrf') && !filenameDict[file.name].submitted) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name].uuid,\n _csrf: $dropzone.data('csrf')\n });\n }\n });\n this.on(\"submit\", function () {\n $.each(filenameDict, function(name){\n filenameDict[name].submitted = true;\n });\n });\n this.on(\"reload\", function (){\n $.getJSON($editContentZone.data('attachment-url'), function(data){\n const drop = $dropzone.get(0).dropzone;\n drop.removeAllFiles(true);\n $files.empty();\n $.each(data, function(){\n const imgSrc = $dropzone.data('upload-url') + \"/\" + this.uuid;\n drop.emit(\"addedfile\", this);\n drop.emit(\"thumbnail\", this, imgSrc);\n drop.emit(\"complete\", this);\n drop.files.push(this);\n filenameDict[this.name] = {\n \"submitted\": true,\n \"uuid\": this.uuid\n }\n $dropzone.find(\"img[src='\" + imgSrc + \"']\").css(\"max-width\", \"100%\");\n const input = $('').val(this.uuid);\n $files.append(input);\n });\n });\n });\n }\n });\n $dropzone.get(0).dropzone.emit(\"reload\");\n }\n // Give new write/preview data-tab name to distinguish from others\n const $editContentForm = $editContentZone.find('.ui.comment.form');\n const $tabMenu = $editContentForm.find('.tabular.menu');\n $tabMenu.attr('data-write', $editContentZone.data('write'));\n $tabMenu.attr('data-preview', $editContentZone.data('preview'));\n $tabMenu.find('.write.item').attr('data-tab', $editContentZone.data('write'));\n $tabMenu.find('.preview.item').attr('data-tab', $editContentZone.data('preview'));\n $editContentForm.find('.write.segment').attr('data-tab', $editContentZone.data('write'));\n $editContentForm.find('.preview.segment').attr('data-tab', $editContentZone.data('preview'));\n\n initCommentPreviewTab($editContentForm);\n\n $editContentZone.find('.cancel.button').click(function () {\n $renderContent.show();\n $editContentZone.hide();\n $dropzone.get(0).dropzone.emit(\"reload\");\n });\n $editContentZone.find('.save.button').click(function () {\n $renderContent.show();\n $editContentZone.hide();\n const $attachments = $files.find(\"[name=files]\").map(function(){\n return $(this).val();\n }).get();\n $.post($editContentZone.data('update-url'), {\n \"_csrf\": csrf,\n \"content\": $textarea.val(),\n \"context\": $editContentZone.data('context'),\n \"files\": $attachments\n },\n function (data) {\n if (data.length == 0) {\n $renderContent.html($('#no-content').html());\n } else {\n $renderContent.html(data.content);\n emojify.run($renderContent[0]);\n $('pre code', $renderContent[0]).each(function () {\n hljs.highlightBlock(this);\n });\n }\n const $content = $segment.parent();\n if(!$content.find(\".ui.small.images\").length){\n if(data.attachments != \"\"){\n $content.append(\n '
' +\n '
' +\n '
' +\n '
'\n );\n $content.find(\".ui.small.images\").html(data.attachments);\n }\n } else if (data.attachments == \"\") {\n $content.find(\".ui.small.images\").parent().remove();\n } else {\n $content.find(\".ui.small.images\").html(data.attachments);\n }\n $dropzone.get(0).dropzone.emit(\"submit\");\n $dropzone.get(0).dropzone.emit(\"reload\");\n });\n });\n } else {\n $textarea = $segment.find('textarea');\n }\n\n // Show write/preview tab and copy raw content as needed\n $editContentZone.show();\n $renderContent.hide();\n if ($textarea.val().length == 0) {\n $textarea.val($rawContent.text());\n }\n $textarea.focus();\n return false;\n });\n\n // Delete comment\n $('.delete-comment').click(function () {\n const $this = $(this);\n if (confirm($this.data('locale'))) {\n $.post($this.data('url'), {\n \"_csrf\": csrf\n }).success(function () {\n $('#' + $this.data('comment-id')).remove();\n });\n }\n return false;\n });\n\n // Change status\n const $statusButton = $('#status-button');\n $('#comment-form .edit_area').keyup(function () {\n if ($(this).val().length == 0) {\n $statusButton.text($statusButton.data('status'))\n } else {\n $statusButton.text($statusButton.data('status-and-comment'))\n }\n });\n $statusButton.click(function () {\n $('#status').val($statusButton.data('status-val'));\n $('#comment-form').submit();\n });\n\n // Pull Request merge button\n const $mergeButton = $('.merge-button > button');\n $mergeButton.on('click', function(e) {\n e.preventDefault();\n $('.' + $(this).data('do') + '-fields').show();\n $(this).parent().hide();\n });\n $('.merge-button > .dropdown').dropdown({\n onChange: function (_text, _value, $choice) {\n if ($choice.data('do')) {\n $mergeButton.find('.button-text').text($choice.text());\n $mergeButton.data('do', $choice.data('do'));\n }\n }\n });\n $('.merge-cancel').on('click', function(e) {\n e.preventDefault();\n $(this).closest('.form').hide();\n $mergeButton.parent().show();\n });\n\n initReactionSelector();\n }\n\n // Diff\n if ($('.repository.diff').length > 0) {\n $('.diff-counter').each(function () {\n const $item = $(this);\n const addLine = $item.find('span[data-line].add').data(\"line\");\n const delLine = $item.find('span[data-line].del').data(\"line\");\n const addPercent = parseFloat(addLine) / (parseFloat(addLine) + parseFloat(delLine)) * 100;\n $item.find(\".bar .add\").css(\"width\", addPercent + \"%\");\n });\n }\n\n // Quick start and repository home\n $('#repo-clone-ssh').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-https').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'ssh');\n });\n $('#repo-clone-https').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-ssh').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'https');\n });\n $('#repo-clone-url').click(function () {\n $(this).select();\n });\n\n // Pull request\n const $repoComparePull = $('.repository.compare.pull');\n if ($repoComparePull.length > 0) {\n initFilterSearchDropdown('.choose.branch .dropdown');\n // show pull request form\n $repoComparePull.find('button.show-form').on('click', function(e) {\n e.preventDefault();\n $repoComparePull.find('.pullrequest-form').show();\n $(this).parent().hide();\n });\n }\n\n // Branches\n if ($('.repository.settings.branches').length > 0) {\n initFilterSearchDropdown('.protected-branches .dropdown');\n $('.enable-protection, .enable-whitelist').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n }\n });\n }\n}\n\nfunction initMigration() {\n const toggleMigrations = function() {\n const authUserName = $('#auth_username').val();\n const cloneAddr = $('#clone_addr').val();\n if (!$('#mirror').is(\":checked\") && (authUserName!=undefined && authUserName.length > 0)\n && (cloneAddr!=undefined && (cloneAddr.startsWith(\"https://github.com\") || cloneAddr.startsWith(\"http://github.com\")))) {\n $('#migrate_items').show();\n } else {\n $('#migrate_items').hide();\n }\n }\n\n toggleMigrations();\n\n $('#clone_addr').on('input', toggleMigrations)\n $('#auth_username').on('input', toggleMigrations)\n $('#mirror').on('change', toggleMigrations)\n}\n\nfunction initPullRequestReview() {\n $('.show-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass(\"hide\");\n $(\"#code-comments-\" + id).removeClass('hide');\n $(\"#code-preview-\" + id).removeClass('hide');\n $(\"#hide-outdated-\" + id).removeClass('hide');\n });\n\n $('.hide-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass(\"hide\");\n $(\"#code-comments-\" + id).addClass('hide');\n $(\"#code-preview-\" + id).addClass('hide');\n $(\"#show-outdated-\" + id).removeClass('hide');\n });\n\n $('button.comment-form-reply').on('click', function (e) {\n e.preventDefault();\n $(this).hide();\n const form = $(this).parent().find('.comment-form')\n form.removeClass('hide');\n assingMenuAttributes(form.find('.menu'));\n });\n // The following part is only for diff views\n if ($('.repository.pull.diff').length == 0) {\n return;\n }\n\n $('.diff-detail-box.ui.sticky').sticky();\n\n $('.btn-review').on('click', function(e) {\n e.preventDefault();\n $(this).closest('.dropdown').find('.menu').toggle('visible');\n }).closest('.dropdown').find('.link.close').on('click', function(e) {\n e.preventDefault();\n $(this).closest('.menu').toggle('visible');\n });\n\n $('.code-view .lines-code,.code-view .lines-num')\n .on('mouseenter', function() {\n const parent = $(this).closest('td');\n $(this).closest('tr').addClass(\n parent.hasClass('lines-num-old') || parent.hasClass('lines-code-old')\n ? 'focus-lines-old' : 'focus-lines-new'\n );\n })\n .on('mouseleave', function() {\n $(this).closest('tr').removeClass('focus-lines-new focus-lines-old');\n });\n $('.add-code-comment').on('click', function(e) {\n // https://github.com/go-gitea/gitea/issues/4745\n if ($(e.target).hasClass('btn-add-single')) {\n return;\n }\n e.preventDefault();\n const isSplit = $(this).closest('.code-diff').hasClass('code-diff-split');\n const side = $(this).data('side');\n const idx = $(this).data('idx');\n const path = $(this).data('path');\n const form = $('#pull_review_add_comment').html();\n const tr = $(this).closest('tr');\n let ntr = tr.next();\n if (!ntr.hasClass('add-comment')) {\n ntr = $(''\n + (isSplit ? ''\n : '')\n + '');\n tr.after(ntr);\n }\n const td = ntr.find('.add-comment-' + side);\n let commentCloud = td.find('.comment-code-cloud');\n if (commentCloud.length === 0) {\n td.html(form);\n commentCloud = td.find('.comment-code-cloud');\n assingMenuAttributes(commentCloud.find('.menu'));\n\n td.find(\"input[name='line']\").val(idx);\n td.find(\"input[name='side']\").val(side === \"left\" ? \"previous\":\"proposed\");\n td.find(\"input[name='path']\").val(path);\n }\n commentCloud.find('textarea').focus();\n });\n}\n\nfunction assingMenuAttributes(menu) {\n const id = Math.floor(Math.random() * Math.floor(1000000));\n menu.attr('data-write', menu.attr('data-write') + id);\n menu.attr('data-preview', menu.attr('data-preview') + id);\n menu.find('.item').each(function() {\n const tab = $(this).attr('data-tab') + id;\n $(this).attr('data-tab', tab);\n });\n menu.parent().find(\"*[data-tab='write']\").attr('data-tab', 'write' + id);\n menu.parent().find(\"*[data-tab='preview']\").attr('data-tab', 'preview' + id);\n initCommentPreviewTab(menu.parent(\".form\"));\n return id;\n}\n\nfunction initRepositoryCollaboration() {\n // Change collaborator access mode\n $('.access-mode.menu .item').click(function () {\n const $menu = $(this).parent();\n $.post($menu.data('url'), {\n \"_csrf\": csrf,\n \"uid\": $menu.data('uid'),\n \"mode\": $(this).data('value')\n })\n });\n}\n\nfunction initTeamSettings() {\n // Change team access mode\n $('.organization.new.team input[name=permission]').change(function () {\n const val = $('input[name=permission]:checked', '.organization.new.team').val()\n if (val === 'admin') {\n $('.organization.new.team .team-units').hide();\n } else {\n $('.organization.new.team .team-units').show();\n }\n });\n}\n\nfunction initWikiForm() {\n const $editArea = $('.repository.wiki textarea#edit_area');\n if ($editArea.length > 0) {\n const simplemde = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n previewRender: function (plainText, preview) { // Async method\n setTimeout(function () {\n // FIXME: still send render request when return back to edit mode\n $.post($editArea.data('url'), {\n \"_csrf\": csrf,\n \"mode\": \"gfm\",\n \"context\": $editArea.data('context'),\n \"text\": plainText\n },\n function (data) {\n preview.innerHTML = '
' + data + '
';\n emojify.run($('.editor-preview')[0]);\n }\n );\n }, 0);\n\n return \"Loading...\";\n },\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n toolbar: [\"bold\", \"italic\", \"strikethrough\", \"|\",\n \"heading-1\", \"heading-2\", \"heading-3\", \"heading-bigger\", \"heading-smaller\", \"|\",\n {\n name: \"code-inline\",\n action: function(e){\n const cm = e.codemirror;\n const selection = cm.getSelection();\n cm.replaceSelection(\"`\" + selection + \"`\");\n if (!selection) {\n const cursorPos = cm.getCursor();\n cm.setCursor(cursorPos.line, cursorPos.ch - 1);\n }\n cm.focus();\n },\n className: \"fa fa-angle-right\",\n title: \"Add Inline Code\",\n },\"code\", \"quote\", \"|\", {\n name: \"checkbox-empty\",\n action: function(e){\n const cm = e.codemirror;\n cm.replaceSelection(\"\\n- [ ] \" + cm.getSelection());\n cm.focus();\n },\n className: \"fa fa-square-o\",\n title: \"Add Checkbox (empty)\",\n },\n {\n name: \"checkbox-checked\",\n action: function(e){\n const cm = e.codemirror;\n cm.replaceSelection(\"\\n- [x] \" + cm.getSelection());\n cm.focus();\n },\n className: \"fa fa-check-square-o\",\n title: \"Add Checkbox (checked)\",\n }, \"|\",\n \"unordered-list\", \"ordered-list\", \"|\",\n \"link\", \"image\", \"table\", \"horizontal-rule\", \"|\",\n \"clean-block\", \"preview\", \"fullscreen\"]\n })\n $(simplemde.codemirror.getInputField()).addClass(\"js-quick-submit\");\n }\n}\n\n// For IE\nString.prototype.endsWith = function (pattern) {\n const d = this.length - pattern.length;\n return d >= 0 && this.lastIndexOf(pattern) === d;\n};\n\n// Adding function to get the cursor position in a text field to jQuery object.\n$.fn.getCursorPosition = function () {\n const el = $(this).get(0);\n let pos = 0;\n if ('selectionStart' in el) {\n pos = el.selectionStart;\n } else if ('selection' in document) {\n el.focus();\n const Sel = document.selection.createRange();\n const SelLength = document.selection.createRange().text.length;\n Sel.moveStart('character', -el.value.length);\n pos = Sel.text.length - SelLength;\n }\n return pos;\n}\n\nfunction setSimpleMDE($editArea) {\n if (codeMirrorEditor) {\n codeMirrorEditor.toTextArea();\n codeMirrorEditor = null;\n }\n\n if (simpleMDEditor) {\n return true;\n }\n\n simpleMDEditor = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n previewRender: function (plainText, preview) { // Async method\n setTimeout(function () {\n // FIXME: still send render request when return back to edit mode\n $.post($editArea.data('url'), {\n \"_csrf\": csrf,\n \"mode\": \"gfm\",\n \"context\": $editArea.data('context'),\n \"text\": plainText\n },\n function (data) {\n preview.innerHTML = '
' + data + '
';\n emojify.run($('.editor-preview')[0]);\n }\n );\n }, 0);\n\n return \"Loading...\";\n },\n toolbar: [\"bold\", \"italic\", \"strikethrough\", \"|\",\n \"heading-1\", \"heading-2\", \"heading-3\", \"heading-bigger\", \"heading-smaller\", \"|\",\n \"code\", \"quote\", \"|\",\n \"unordered-list\", \"ordered-list\", \"|\",\n \"link\", \"image\", \"table\", \"horizontal-rule\", \"|\",\n \"clean-block\", \"preview\", \"fullscreen\", \"side-by-side\"]\n });\n\n return true;\n}\n\nfunction setCodeMirror($editArea) {\n if (simpleMDEditor) {\n simpleMDEditor.toTextArea();\n simpleMDEditor = null;\n }\n\n if (codeMirrorEditor) {\n return true;\n }\n\n codeMirrorEditor = CodeMirror.fromTextArea($editArea[0], {\n lineNumbers: true\n });\n codeMirrorEditor.on(\"change\", function (cm, _change) {\n $editArea.val(cm.getValue());\n });\n\n return true;\n}\n\nfunction initEditor() {\n $('.js-quick-pull-choice-option').change(function () {\n if ($(this).val() == 'commit-to-new-branch') {\n $('.quick-pull-branch-name').show();\n $('.quick-pull-branch-name input').prop('required',true);\n } else {\n $('.quick-pull-branch-name').hide();\n $('.quick-pull-branch-name input').prop('required',false);\n }\n $('#commit-button').text($(this).attr('button_text'));\n });\n\n const $editFilename = $(\"#file-name\");\n $editFilename.keyup(function (e) {\n const $section = $('.breadcrumb span.section');\n const $divider = $('.breadcrumb div.divider');\n let value;\n let parts;\n\n if (e.keyCode == 8) {\n if ($(this).getCursorPosition() == 0) {\n if ($section.length > 0) {\n value = $section.last().find('a').text();\n $(this).val(value + $(this).val());\n $(this)[0].setSelectionRange(value.length, value.length);\n $section.last().remove();\n $divider.last().remove();\n }\n }\n }\n if (e.keyCode == 191) {\n parts = $(this).val().split('/');\n for (let i = 0; i < parts.length; ++i) {\n value = parts[i];\n if (i < parts.length - 1) {\n if (value.length) {\n $('' + value + '').insertBefore($(this));\n $('
/
').insertBefore($(this));\n }\n }\n else {\n $(this).val(value);\n }\n $(this)[0].setSelectionRange(0, 0);\n }\n }\n parts = [];\n $('.breadcrumb span.section').each(function () {\n const element = $(this);\n if (element.find('a').length) {\n parts.push(element.find('a').text());\n } else {\n parts.push(element.text());\n }\n });\n if ($(this).val())\n parts.push($(this).val());\n $('#tree_path').val(parts.join('/'));\n }).trigger('keyup');\n\n const $editArea = $('.repository.editor textarea#edit_area');\n if (!$editArea.length)\n return;\n\n const markdownFileExts = $editArea.data(\"markdown-file-exts\").split(\",\");\n const lineWrapExtensions = $editArea.data(\"line-wrap-extensions\").split(\",\");\n\n $editFilename.on(\"keyup\", function () {\n const val = $editFilename.val();\n let mode, spec, extension, extWithDot, dataUrl, apiCall;\n\n extension = extWithDot = \"\";\n const m = /.+\\.([^.]+)$/.exec(val);\n if (m) {\n extension = m[1];\n extWithDot = \".\" + extension;\n }\n\n const info = CodeMirror.findModeByExtension(extension);\n const previewLink = $('a[data-tab=preview]');\n if (info) {\n mode = info.mode;\n spec = info.mime;\n apiCall = mode;\n }\n else {\n apiCall = extension\n }\n\n if (previewLink.length && apiCall && previewFileModes && previewFileModes.length && previewFileModes.indexOf(apiCall) >= 0) {\n dataUrl = previewLink.data('url');\n previewLink.data('url', dataUrl.replace(/(.*)\\/.*/i, '$1/' + mode));\n previewLink.show();\n }\n else {\n previewLink.hide();\n }\n\n // If this file is a Markdown extensions, we will load that editor and return\n if (markdownFileExts.indexOf(extWithDot) >= 0) {\n if (setSimpleMDE($editArea)) {\n return;\n }\n }\n\n // Else we are going to use CodeMirror\n if (!codeMirrorEditor && !setCodeMirror($editArea)) {\n return;\n }\n\n if (mode) {\n codeMirrorEditor.setOption(\"mode\", spec);\n CodeMirror.autoLoadMode(codeMirrorEditor, mode);\n }\n\n if (lineWrapExtensions.indexOf(extWithDot) >= 0) {\n codeMirrorEditor.setOption(\"lineWrapping\", true);\n }\n else {\n codeMirrorEditor.setOption(\"lineWrapping\", false);\n }\n\n // get the filename without any folder\n let value = $editFilename.val();\n if (value.length === 0) {\n return;\n }\n value = value.split('/');\n value = value[value.length - 1];\n\n $.getJSON($editFilename.data('ec-url-prefix')+value, function(editorconfig) {\n if (editorconfig.indent_style === 'tab') {\n codeMirrorEditor.setOption(\"indentWithTabs\", true);\n codeMirrorEditor.setOption('extraKeys', {});\n } else {\n codeMirrorEditor.setOption(\"indentWithTabs\", false);\n // required because CodeMirror doesn't seems to use spaces correctly for {\"indentWithTabs\": false}:\n // - https://github.com/codemirror/CodeMirror/issues/988\n // - https://codemirror.net/doc/manual.html#keymaps\n codeMirrorEditor.setOption('extraKeys', {\n Tab: function(cm) {\n const spaces = Array(parseInt(cm.getOption(\"indentUnit\")) + 1).join(\" \");\n cm.replaceSelection(spaces);\n }\n });\n }\n codeMirrorEditor.setOption(\"indentUnit\", editorconfig.indent_size || 4);\n codeMirrorEditor.setOption(\"tabSize\", editorconfig.tab_width || 4);\n });\n }).trigger('keyup');\n\n // Using events from https://github.com/codedance/jquery.AreYouSure#advanced-usage\n // to enable or disable the commit button\n const $commitButton = $('#commit-button');\n const $editForm = $('.ui.edit.form');\n const dirtyFileClass = 'dirty-file';\n\n // Disabling the button at the start\n $commitButton.prop('disabled', true);\n\n // Registering a custom listener for the file path and the file content\n $editForm.areYouSure({\n silent: true,\n dirtyClass: dirtyFileClass,\n fieldSelector: ':input:not(.commit-form-wrapper :input)',\n change: function () {\n const dirty = $(this).hasClass(dirtyFileClass);\n $commitButton.prop('disabled', !dirty);\n }\n });\n\n $commitButton.click(function (event) {\n // A modal which asks if an empty file should be committed\n if ($editArea.val().length === 0) {\n $('#edit-empty-content-modal').modal({\n onApprove: function () {\n $('.edit.form').submit();\n }\n }).modal('show');\n event.preventDefault();\n }\n });\n}\n\nfunction initOrganization() {\n if ($('.organization').length == 0) {\n return;\n }\n\n // Options\n if ($('.organization.settings.options').length > 0) {\n $('#org_name').keyup(function () {\n const $prompt = $('#org-name-change-prompt');\n if ($(this).val().toString().toLowerCase() != $(this).data('org-name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initUserSettings() {\n // Options\n if ($('.user.settings.profile').length > 0) {\n $('#username').keyup(function () {\n const $prompt = $('#name-change-prompt');\n if ($(this).val().toString().toLowerCase() != $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initWebhook() {\n if ($('.new.webhook').length == 0) {\n return;\n }\n\n $('.events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').show();\n }\n });\n $('.non-events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').hide();\n }\n });\n\n const updateContentType = function () {\n const visible = $('#http_method').val() === 'POST';\n $('#content_type').parent().parent()[visible ? 'show' : 'hide']();\n };\n updateContentType();\n $('#http_method').change(function () {\n updateContentType();\n });\n\n // Test delivery\n $('#test-delivery').click(function () {\n const $this = $(this);\n $this.addClass('loading disabled');\n $.post($this.data('link'), {\n \"_csrf\": csrf\n }).done(\n setTimeout(function () {\n window.location.href = $this.data('redirect');\n }, 5000)\n )\n });\n}\n\nfunction initAdmin() {\n if ($('.admin').length == 0) {\n return;\n }\n\n // New user\n if ($('.admin.new.user').length > 0 ||\n $('.admin.edit.user').length > 0) {\n $('#login_type').change(function () {\n if ($(this).val().substring(0, 1) == '0') {\n $('#login_name').removeAttr('required');\n $('.non-local').hide();\n $('.local').show();\n $('#user_name').focus();\n\n if ($(this).data('password') == \"required\") {\n $('#password').attr('required', 'required');\n }\n\n } else {\n $('#login_name').attr('required', 'required');\n $('.non-local').show();\n $('.local').hide();\n $('#login_name').focus();\n\n $('#password').removeAttr('required');\n }\n });\n }\n\n function onSecurityProtocolChange() {\n if ($('#security_protocol').val() > 0) {\n $('.has-tls').show();\n } else {\n $('.has-tls').hide();\n }\n }\n\n function onUsePagedSearchChange() {\n if ($('#use_paged_search').prop('checked')) {\n $('.search-page-size').show()\n .find('input').attr('required', 'required');\n } else {\n $('.search-page-size').hide()\n .find('input').removeAttr('required');\n }\n }\n\n function onOAuth2Change() {\n $('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url').hide();\n $('.open_id_connect_auto_discovery_url input[required]').removeAttr('required');\n\n const provider = $('#oauth2_provider').val();\n switch (provider) {\n case 'github':\n case 'gitlab':\n case 'gitea':\n $('.oauth2_use_custom_url').show();\n break;\n case 'openidConnect':\n $('.open_id_connect_auto_discovery_url input').attr('required', 'required');\n $('.open_id_connect_auto_discovery_url').show();\n break;\n }\n onOAuth2UseCustomURLChange();\n }\n\n function onOAuth2UseCustomURLChange() {\n const provider = $('#oauth2_provider').val();\n $('.oauth2_use_custom_url_field').hide();\n $('.oauth2_use_custom_url_field input[required]').removeAttr('required');\n\n if ($('#oauth2_use_custom_url').is(':checked')) {\n if (!$('#oauth2_token_url').val()) {\n $('#oauth2_token_url').val($('#' + provider + '_token_url').val());\n }\n if (!$('#oauth2_auth_url').val()) {\n $('#oauth2_auth_url').val($('#' + provider + '_auth_url').val());\n }\n if (!$('#oauth2_profile_url').val()) {\n $('#oauth2_profile_url').val($('#' + provider + '_profile_url').val());\n }\n if (!$('#oauth2_email_url').val()) {\n $('#oauth2_email_url').val($('#' + provider + '_email_url').val());\n }\n switch (provider) {\n case 'github':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url').show();\n break;\n case 'gitea':\n case 'gitlab':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url').show();\n $('#oauth2_email_url').val('');\n break;\n }\n }\n }\n\n // New authentication\n if ($('.admin.new.authentication').length > 0) {\n $('#auth_type').change(function () {\n $('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size').hide();\n\n $('.ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]').removeAttr('required');\n $('.binddnrequired').removeClass(\"required\");\n\n const authType = $(this).val();\n switch (authType) {\n case '2': // LDAP\n $('.ldap').show();\n $('.binddnrequired input, .ldap div.required:not(.dldap) input').attr('required', 'required');\n $('.binddnrequired').addClass(\"required\");\n break;\n case '3': // SMTP\n $('.smtp').show();\n $('.has-tls').show();\n $('.smtp div.required input, .has-tls').attr('required', 'required');\n break;\n case '4': // PAM\n $('.pam').show();\n $('.pam input').attr('required', 'required');\n break;\n case '5': // LDAP\n $('.dldap').show();\n $('.dldap div.required:not(.ldap) input').attr('required', 'required');\n break;\n case '6': // OAuth2\n $('.oauth2').show();\n $('.oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input').attr('required', 'required');\n onOAuth2Change();\n break;\n }\n if (authType == '2' || authType == '5') {\n onSecurityProtocolChange()\n }\n if (authType == '2') {\n onUsePagedSearchChange();\n }\n });\n $('#auth_type').change();\n $('#security_protocol').change(onSecurityProtocolChange);\n $('#use_paged_search').change(onUsePagedSearchChange);\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n }\n // Edit authentication\n if ($('.admin.edit.authentication').length > 0) {\n const authType = $('#auth_type').val();\n if (authType == '2' || authType == '5') {\n $('#security_protocol').change(onSecurityProtocolChange);\n if (authType == '2') {\n $('#use_paged_search').change(onUsePagedSearchChange);\n }\n } else if (authType == '6') {\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n onOAuth2Change();\n }\n }\n\n // Notice\n if ($('.admin.notice')) {\n const $detailModal = $('#detail-modal');\n\n // Attach view detail modals\n $('.view-detail').click(function () {\n $detailModal.find('.content p').text($(this).data('content'));\n $detailModal.modal('show');\n return false;\n });\n\n // Select actions\n const $checkboxes = $('.select.table .ui.checkbox');\n $('.select.action').click(function () {\n switch ($(this).data('action')) {\n case 'select-all':\n $checkboxes.checkbox('check');\n break;\n case 'deselect-all':\n $checkboxes.checkbox('uncheck');\n break;\n case 'inverse':\n $checkboxes.checkbox('toggle');\n break;\n }\n });\n $('#delete-selection').click(function () {\n const $this = $(this);\n $this.addClass(\"loading disabled\");\n const ids = [];\n $checkboxes.each(function () {\n if ($(this).checkbox('is checked')) {\n ids.push($(this).data('id'));\n }\n });\n $.post($this.data('link'), {\n \"_csrf\": csrf,\n \"ids\": ids\n }).done(function () {\n window.location.href = $this.data('redirect');\n });\n });\n }\n}\n\nfunction buttonsClickOnEnter() {\n $('.ui.button').keypress(function (e) {\n if (e.keyCode == 13 || e.keyCode == 32) // enter key or space bar\n $(this).click();\n });\n}\n\nfunction searchUsers() {\n const $searchUserBox = $('#search-user-box');\n $searchUserBox.search({\n minCharacters: 2,\n apiSettings: {\n url: suburl + '/api/v1/users/search?q={query}',\n onResponse: function(response) {\n const items = [];\n $.each(response.data, function (_i, item) {\n let title = item.login;\n if (item.full_name && item.full_name.length > 0) {\n title += ' (' + htmlEncode(item.full_name) + ')';\n }\n items.push({\n title: title,\n image: item.avatar_url\n })\n });\n\n return { results: items }\n }\n },\n searchFields: ['login', 'full_name'],\n showNoResults: false\n });\n}\n\nfunction searchTeams() {\n const $searchTeamBox = $('#search-team-box');\n $searchTeamBox.search({\n minCharacters: 2,\n apiSettings: {\n url: suburl + '/api/v1/orgs/' + $searchTeamBox.data('org') + '/teams/search?q={query}',\n headers: {\"X-Csrf-Token\": csrf},\n onResponse: function(response) {\n const items = [];\n $.each(response.data, function (_i, item) {\n const title = item.name + ' (' + item.permission + ' access)';\n items.push({\n title: title,\n })\n });\n\n return { results: items }\n }\n },\n searchFields: ['name', 'description'],\n showNoResults: false\n });\n}\n\nfunction searchRepositories() {\n const $searchRepoBox = $('#search-repo-box');\n $searchRepoBox.search({\n minCharacters: 2,\n apiSettings: {\n url: suburl + '/api/v1/repos/search?q={query}&uid=' + $searchRepoBox.data('uid'),\n onResponse: function(response) {\n const items = [];\n $.each(response.data, function (_i, item) {\n items.push({\n title: item.full_name.split(\"/\")[1],\n description: item.full_name\n })\n });\n\n return { results: items }\n }\n },\n searchFields: ['full_name'],\n showNoResults: false\n });\n}\n\nfunction initCodeView() {\n if ($('.code-view .linenums').length > 0) {\n $(document).on('click', '.lines-num span', function (e) {\n const $select = $(this);\n const $list = $select.parent().siblings('.lines-code').find('ol.linenums > li');\n selectRange($list, $list.filter('[rel=' + $select.attr('id') + ']'), (e.shiftKey ? $list.filter('.active').eq(0) : null));\n deSelect();\n });\n\n $(window).on('hashchange', function () {\n let m = window.location.hash.match(/^#(L\\d+)-(L\\d+)$/);\n const $list = $('.code-view ol.linenums > li');\n let $first;\n if (m) {\n $first = $list.filter('.' + m[1]);\n selectRange($list, $first, $list.filter('.' + m[2]));\n $(\"html, body\").scrollTop($first.offset().top - 200);\n return;\n }\n m = window.location.hash.match(/^#(L|n)(\\d+)$/);\n if (m) {\n $first = $list.filter('.L' + m[2]);\n selectRange($list, $first);\n $(\"html, body\").scrollTop($first.offset().top - 200);\n }\n }).trigger('hashchange');\n }\n}\n\nfunction initU2FAuth() {\n if($('#wait-for-key').length === 0) {\n return\n }\n u2fApi.ensureSupport()\n .then(function () {\n $.getJSON(suburl + '/user/u2f/challenge').success(function(req) {\n u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30)\n .then(u2fSigned)\n .catch(function (err) {\n if(err === undefined) {\n u2fError(1);\n return\n }\n u2fError(err.metaData.code);\n });\n });\n }).catch(function () {\n // Fallback in case browser do not support U2F\n window.location.href = suburl + \"/user/two_factor\"\n })\n}\nfunction u2fSigned(resp) {\n $.ajax({\n url: suburl + '/user/u2f/sign',\n type: \"POST\",\n headers: {\"X-Csrf-Token\": csrf},\n data: JSON.stringify(resp),\n contentType: \"application/json; charset=utf-8\",\n }).done(function(res){\n window.location.replace(res);\n }).fail(function () {\n u2fError(1);\n });\n}\n\nfunction u2fRegistered(resp) {\n if (checkError(resp)) {\n return;\n }\n $.ajax({\n url: suburl + '/user/settings/security/u2f/register',\n type: \"POST\",\n headers: {\"X-Csrf-Token\": csrf},\n data: JSON.stringify(resp),\n contentType: \"application/json; charset=utf-8\",\n success: function(){\n reload();\n },\n fail: function () {\n u2fError(1);\n }\n });\n}\n\nfunction checkError(resp) {\n if (!('errorCode' in resp)) {\n return false;\n }\n if (resp.errorCode === 0) {\n return false;\n }\n u2fError(resp.errorCode);\n return true;\n}\n\n\nfunction u2fError(errorType) {\n const u2fErrors = {\n 'browser': $('#unsupported-browser'),\n 1: $('#u2f-error-1'),\n 2: $('#u2f-error-2'),\n 3: $('#u2f-error-3'),\n 4: $('#u2f-error-4'),\n 5: $('.u2f-error-5')\n };\n u2fErrors[errorType].removeClass('hide');\n for(const type in u2fErrors){\n if(type != errorType){\n u2fErrors[type].addClass('hide');\n }\n }\n $('#u2f-error').modal('show');\n}\n\nfunction initU2FRegister() {\n $('#register-device').modal({allowMultiple: false});\n $('#u2f-error').modal({allowMultiple: false});\n $('#register-security-key').on('click', function(e) {\n e.preventDefault();\n u2fApi.ensureSupport()\n .then(u2fRegisterRequest)\n .catch(function() {\n u2fError('browser');\n })\n })\n}\n\nfunction u2fRegisterRequest() {\n $.post(suburl + \"/user/settings/security/u2f/request_register\", {\n \"_csrf\": csrf,\n \"name\": $('#nickname').val()\n }).success(function(req) {\n $(\"#nickname\").closest(\"div.field\").removeClass(\"error\");\n $('#register-device').modal('show');\n if(req.registeredKeys === null) {\n req.registeredKeys = []\n }\n u2fApi.register(req.appId, req.registerRequests, req.registeredKeys, 30)\n .then(u2fRegistered)\n .catch(function (reason) {\n if(reason === undefined) {\n u2fError(1);\n return\n }\n u2fError(reason.metaData.code);\n });\n }).fail(function(xhr) {\n if(xhr.status === 409) {\n $(\"#nickname\").closest(\"div.field\").addClass(\"error\");\n }\n });\n}\n\nfunction initWipTitle() {\n $(\".title_wip_desc > a\").click(function (e) {\n e.preventDefault();\n\n const $issueTitle = $(\"#issue_title\");\n $issueTitle.focus();\n const value = $issueTitle.val().trim().toUpperCase();\n\n for (const i in wipPrefixes) {\n if (value.startsWith(wipPrefixes[i].toUpperCase())) {\n return;\n }\n }\n\n $issueTitle.val(wipPrefixes[0] + \" \" + $issueTitle.val());\n });\n}\n\nfunction initTemplateSearch() {\n const $repoTemplate = $(\"#repo_template\");\n const checkTemplate = function() {\n const $templateUnits = $(\"#template_units\");\n const $nonTemplate = $(\"#non_template\");\n if ($repoTemplate.val() !== \"\") {\n $templateUnits.show();\n $nonTemplate.hide();\n } else {\n $templateUnits.hide();\n $nonTemplate.show();\n }\n };\n $repoTemplate.change(checkTemplate);\n checkTemplate();\n\n const changeOwner = function() {\n $(\"#repo_template_search\")\n .dropdown({\n apiSettings: {\n url: suburl + '/api/v1/repos/search?q={query}&template=true&priority_owner_id=' + $(\"#uid\").val(),\n onResponse: function(response) {\n const filteredResponse = {'success': true, 'results': []};\n filteredResponse.results.push({\n 'name': '',\n 'value': ''\n });\n // Parse the response from the api to work with our dropdown\n $.each(response.data, function(_r, repo) {\n filteredResponse.results.push({\n 'name' : htmlEncode(repo.full_name) ,\n 'value' : repo.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n };\n $(\"#uid\").change(changeOwner);\n changeOwner();\n}\n\n$(document).ready(function () {\n csrf = $('meta[name=_csrf]').attr(\"content\");\n suburl = $('meta[name=_suburl]').attr(\"content\");\n\n // Show exact time\n $('.time-since').each(function () {\n $(this).addClass('poping up').attr('data-content', $(this).attr('title')).attr('data-variation', 'inverted tiny').attr('title', '');\n });\n\n // Semantic UI modules.\n $('.dropdown:not(.custom)').dropdown();\n $('.jump.dropdown').dropdown({\n action: 'hide',\n onShow: function () {\n $('.poping.up').popup('hide');\n }\n });\n $('.slide.up.dropdown').dropdown({\n transition: 'slide up'\n });\n $('.upward.dropdown').dropdown({\n direction: 'upward'\n });\n $('.ui.accordion').accordion();\n $('.ui.checkbox').checkbox();\n $('.ui.progress').progress({\n showActivity: false\n });\n $('.poping.up').popup();\n $('.top.menu .poping.up').popup({\n onShow: function () {\n if ($('.top.menu .menu.transition').hasClass('visible')) {\n return false;\n }\n }\n });\n $('.tabular.menu .item').tab();\n $('.tabable.menu .item').tab();\n\n $('.toggle.button').click(function () {\n $($(this).data('target')).slideToggle(100);\n });\n\n // make table element clickable like a link\n $('tr[data-href]').click(function() {\n window.location = $(this).data('href');\n });\n\n // Highlight JS\n if (typeof hljs != 'undefined') {\n const nodes = [].slice.call(document.querySelectorAll('pre code') || []);\n for (let i = 0; i < nodes.length; i++) {\n hljs.highlightBlock(nodes[i]);\n }\n }\n\n // Dropzone\n const $dropzone = $('#dropzone');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n\n new Dropzone(\"#dropzone\", {\n url: $dropzone.data('upload-url'),\n headers: {\"X-Csrf-Token\": csrf},\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init: function () {\n this.on(\"success\", function (file, data) {\n filenameDict[file.name] = data.uuid;\n const input = $('').val(data.uuid);\n $('.files').append(input);\n });\n this.on(\"removedfile\", function (file) {\n if (file.name in filenameDict) {\n $('#' + filenameDict[file.name]).remove();\n }\n if ($dropzone.data('remove-url') && $dropzone.data('csrf')) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name],\n _csrf: $dropzone.data('csrf')\n });\n }\n })\n },\n });\n }\n\n // Emojify\n emojify.setConfig({\n img_dir: suburl + '/vendor/plugins/emojify/images',\n ignore_emoticons: true\n });\n const hasEmoji = document.getElementsByClassName('has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji[i]);\n for (let j = 0; j < hasEmoji[i].childNodes.length; j++) {\n if (hasEmoji[i].childNodes[j].nodeName === \"A\") {\n emojify.run(hasEmoji[i].childNodes[j])\n }\n }\n }\n\n // Clipboard JS\n const clipboard = new Clipboard('.clipboard');\n clipboard.on('success', function (e) {\n e.clearSelection();\n\n $('#' + e.trigger.getAttribute('id')).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-success'))\n $('#' + e.trigger.getAttribute('id')).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'))\n });\n\n clipboard.on('error', function (e) {\n $('#' + e.trigger.getAttribute('id')).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-error'))\n $('#' + e.trigger.getAttribute('id')).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'))\n });\n\n // Helpers.\n $('.delete-button').click(showDeletePopup);\n $('.add-all-button').click(showAddAllPopup);\n\n $('.delete-branch-button').click(showDeletePopup);\n\n $('.undo-button').click(function() {\n const $this = $(this);\n $.post($this.data('url'), {\n \"_csrf\": csrf,\n \"id\": $this.data(\"id\")\n }).done(function(data) {\n window.location.href = data.redirect;\n });\n });\n $('.show-panel.button').click(function () {\n $($(this).data('panel')).show();\n });\n $('.show-modal.button').click(function () {\n $($(this).data('modal')).modal('show');\n });\n $('.delete-post.button').click(function () {\n const $this = $(this);\n $.post($this.data('request-url'), {\n \"_csrf\": csrf\n }).done(function () {\n window.location.href = $this.data('done-url');\n });\n });\n\n // Set anchor.\n $('.markdown').each(function () {\n const headers = {};\n $(this).find('h1, h2, h3, h4, h5, h6').each(function () {\n let node = $(this);\n const val = encodeURIComponent(node.text().toLowerCase().replace(/[^\\u00C0-\\u1FFF\\u2C00-\\uD7FF\\w\\- ]/g, '').replace(/[ ]/g, '-'));\n let name = val;\n if (headers[val] > 0) {\n name = val + '-' + headers[val];\n }\n if (headers[val] == undefined) {\n headers[val] = 1;\n } else {\n headers[val] += 1;\n }\n node = node.wrap('
');\n node.append('');\n });\n });\n\n $('.issue-checkbox').click(function() {\n const numChecked = $('.issue-checkbox').children('input:checked').length;\n if (numChecked > 0) {\n $('#issue-filters').addClass(\"hide\");\n $('#issue-actions').removeClass(\"hide\");\n } else {\n $('#issue-filters').removeClass(\"hide\");\n $('#issue-actions').addClass(\"hide\");\n }\n });\n\n $('.issue-action').click(function () {\n let action = this.dataset.action;\n let elementId = this.dataset.elementId;\n const issueIDs = $('.issue-checkbox').children('input:checked').map(function() {\n return this.dataset.issueId;\n }).get().join();\n const url = this.dataset.url;\n if (elementId === '0' && url.substr(-9) === '/assignee'){\n elementId = '';\n action = 'clear';\n }\n updateIssuesMeta(url, action, issueIDs, elementId).then(function() {\n // NOTICE: This reset of checkbox state targets Firefox caching behaviour, as the checkboxes stay checked after reload\n if (action === \"close\" || action === \"open\" ){\n //uncheck all checkboxes\n $('.issue-checkbox input[type=\"checkbox\"]').each(function(_,e){ e.checked = false; });\n }\n reload();\n });\n });\n\n // NOTICE: This event trigger targets Firefox caching behaviour, as the checkboxes stay checked after reload\n // trigger ckecked event, if checkboxes are checked on load\n $('.issue-checkbox input[type=\"checkbox\"]:checked').first().each(function(_,e) {\n e.checked = false;\n $(e).click();\n });\n\n buttonsClickOnEnter();\n searchUsers();\n searchTeams();\n searchRepositories();\n\n initCommentForm();\n initInstall();\n initRepository();\n initMigration();\n initWikiForm();\n initEditForm();\n initEditor();\n initOrganization();\n initWebhook();\n initAdmin();\n initCodeView();\n initVueApp();\n initTeamSettings();\n initCtrlEnterSubmit();\n initNavbarContentToggle();\n initTopicbar();\n initU2FAuth();\n initU2FRegister();\n initIssueList();\n initWipTitle();\n initPullRequestReview();\n initRepoStatusChecker();\n initTemplateSearch();\n\n // Repo clone url.\n if ($('#repo-clone-url').length > 0) {\n switch (localStorage.getItem('repo-clone-protocol')) {\n case 'ssh':\n if ($('#repo-clone-ssh').click().length === 0) {\n $('#repo-clone-https').click();\n }\n break;\n default:\n $('#repo-clone-https').click();\n break;\n }\n }\n\n const routes = {\n 'div.user.settings': initUserSettings,\n 'div.repository.settings.collaboration': initRepositoryCollaboration\n };\n\n let selector;\n for (selector in routes) {\n if ($(selector).length > 0) {\n routes[selector]();\n break;\n }\n }\n\n const $cloneAddr = $('#clone_addr');\n $cloneAddr.change(function() {\n const $repoName = $('#repo_name');\n if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank\n $repoName.val($cloneAddr.val().match(/^(.*\\/)?((.+?)(\\.git)?)$/)[3]);\n }\n });\n});\n\nfunction changeHash(hash) {\n if (history.pushState) {\n history.pushState(null, null, hash);\n }\n else {\n location.hash = hash;\n }\n}\n\nfunction deSelect() {\n if (window.getSelection) {\n window.getSelection().removeAllRanges();\n } else {\n document.selection.empty();\n }\n}\n\nfunction selectRange($list, $select, $from) {\n $list.removeClass('active');\n if ($from) {\n let a = parseInt($select.attr('rel').substr(1));\n let b = parseInt($from.attr('rel').substr(1));\n let c;\n if (a != b) {\n if (a > b) {\n c = a;\n a = b;\n b = c;\n }\n const classes = [];\n for (let i = a; i <= b; i++) {\n classes.push('.L' + i);\n }\n $list.filter(classes.join(',')).addClass('active');\n changeHash('#L' + a + '-' + 'L' + b);\n return\n }\n }\n $select.addClass('active');\n changeHash('#' + $select.attr('rel'));\n}\n\n$(function () {\n // Warn users that try to leave a page after entering data into a form.\n // Except on sign-in pages, and for forms marked as 'ignore-dirty'.\n if ($('.user.signin').length === 0) {\n $('form:not(.ignore-dirty)').areYouSure();\n }\n\n // Parse SSH Key\n $(\"#ssh-key-content\").on('change paste keyup',function(){\n const arrays = $(this).val().split(\" \");\n const $title = $(\"#ssh-key-title\")\n if ($title.val() === \"\" && arrays.length === 3 && arrays[2] !== \"\") {\n $title.val(arrays[2]);\n }\n });\n});\n\nfunction showDeletePopup() {\n const $this = $(this);\n let filter = \"\";\n if ($this.attr(\"id\")) {\n filter += \"#\" + $this.attr(\"id\")\n }\n\n const dialog = $('.delete.modal' + filter);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove: function() {\n if ($this.data('type') == \"form\") {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n \"_csrf\": csrf,\n \"id\": $this.data(\"id\")\n }).done(function(data) {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction showAddAllPopup() {\n const $this = $(this);\n let filter = \"\";\n if ($this.attr(\"id\")) {\n filter += \"#\" + $this.attr(\"id\")\n }\n\n const dialog = $('.addall.modal' + filter);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove: function() {\n if ($this.data('type') == \"form\") {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n \"_csrf\": csrf,\n \"id\": $this.data(\"id\")\n }).done(function(data) {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction initVueComponents(){\n const vueDelimeters = ['${', '}'];\n\n Vue.component('repo-search', {\n delimiters: vueDelimeters,\n\n props: {\n searchLimit: {\n type: Number,\n default: 10\n },\n suburl: {\n type: String,\n required: true\n },\n uid: {\n type: Number,\n required: true\n },\n organizations: {\n type: Array,\n default: []\n },\n isOrganization: {\n type: Boolean,\n default: true\n },\n canCreateOrganization: {\n type: Boolean,\n default: false\n },\n organizationsTotalCount: {\n type: Number,\n default: 0\n },\n moreReposLink: {\n type: String,\n default: ''\n }\n },\n\n data: function() {\n return {\n tab: 'repos',\n repos: [],\n reposTotalCount: 0,\n reposFilter: 'all',\n searchQuery: '',\n isLoading: false,\n repoTypes: {\n 'all': {\n count: 0,\n searchMode: '',\n },\n 'forks': {\n count: 0,\n searchMode: 'fork',\n },\n 'mirrors': {\n count: 0,\n searchMode: 'mirror',\n },\n 'sources': {\n count: 0,\n searchMode: 'source',\n },\n 'collaborative': {\n count: 0,\n searchMode: 'collaborative',\n },\n }\n }\n },\n\n computed: {\n showMoreReposLink: function() {\n return this.repos.length > 0 && this.repos.length < this.repoTypes[this.reposFilter].count;\n },\n searchURL: function() {\n return this.suburl + '/api/v1/repos/search?sort=updated&order=desc&uid=' + this.uid + '&q=' + this.searchQuery\n + '&limit=' + this.searchLimit + '&mode=' + this.repoTypes[this.reposFilter].searchMode\n + (this.reposFilter !== 'all' ? '&exclusive=1' : '');\n },\n repoTypeCount: function() {\n return this.repoTypes[this.reposFilter].count;\n }\n },\n\n mounted: function() {\n this.searchRepos(this.reposFilter);\n\n const self = this;\n Vue.nextTick(function() {\n self.$refs.search.focus();\n });\n },\n\n methods: {\n changeTab: function(t) {\n this.tab = t;\n },\n\n changeReposFilter: function(filter) {\n this.reposFilter = filter;\n this.repos = [];\n this.repoTypes[filter].count = 0;\n this.searchRepos(filter);\n },\n\n showRepo: function(repo, filter) {\n switch (filter) {\n case 'sources':\n return repo.owner.id == this.uid && !repo.mirror && !repo.fork;\n case 'forks':\n return repo.owner.id == this.uid && !repo.mirror && repo.fork;\n case 'mirrors':\n return repo.mirror;\n case 'collaborative':\n return repo.owner.id != this.uid && !repo.mirror;\n default:\n return true;\n }\n },\n\n searchRepos: function(reposFilter) {\n const self = this;\n\n this.isLoading = true;\n\n const searchedMode = this.repoTypes[reposFilter].searchMode;\n const searchedURL = this.searchURL;\n const searchedQuery = this.searchQuery;\n\n $.getJSON(searchedURL, function(result, _textStatus, request) {\n if (searchedURL == self.searchURL) {\n self.repos = result.data;\n const count = request.getResponseHeader('X-Total-Count');\n if (searchedQuery === '' && searchedMode === '') {\n self.reposTotalCount = count;\n }\n self.repoTypes[reposFilter].count = count;\n }\n }).always(function() {\n if (searchedURL == self.searchURL) {\n self.isLoading = false;\n }\n });\n },\n\n repoClass: function(repo) {\n if (repo.fork) {\n return 'octicon octicon-repo-forked';\n } else if (repo.mirror) {\n return 'octicon octicon-repo-clone';\n } else if (repo.private) {\n return 'octicon octicon-lock';\n } else {\n return 'octicon octicon-repo';\n }\n }\n }\n })\n}\n\nfunction initCtrlEnterSubmit() {\n $(\".js-quick-submit\").keydown(function(e) {\n if (((e.ctrlKey && !e.altKey) || e.metaKey) && (e.keyCode == 13 || e.keyCode == 10)) {\n $(this).closest(\"form\").submit();\n }\n });\n}\n\nfunction initVueApp() {\n const el = document.getElementById('app');\n if (!el) {\n return;\n }\n\n initVueComponents();\n\n new Vue({\n delimiters: ['${', '}'],\n el: el,\n\n data: {\n searchLimit: document.querySelector('meta[name=_search_limit]').content,\n suburl: document.querySelector('meta[name=_suburl]').content,\n uid: document.querySelector('meta[name=_context_uid]').content,\n },\n });\n}\n\nwindow.timeAddManual = function() {\n $('.mini.modal')\n .modal({\n duration: 200,\n onApprove: function() {\n $('#add_time_manual_form').submit();\n }\n }).modal('show')\n ;\n}\n\nwindow.toggleStopwatch = function() {\n $(\"#toggle_stopwatch_form\").submit();\n}\nwindow.cancelStopwatch = function() {\n $(\"#cancel_stopwatch_form\").submit();\n}\n\nwindow.initHeatmap = function(appElementId, heatmapUser, locale) {\n const el = document.getElementById(appElementId);\n if (!el) {\n return;\n }\n\n locale = locale || {};\n\n locale.contributions = locale.contributions || 'contributions';\n locale.no_contributions = locale.no_contributions || 'No contributions';\n\n const vueDelimeters = ['${', '}'];\n\n Vue.component('activity-heatmap', {\n delimiters: vueDelimeters,\n\n props: {\n user: {\n type: String,\n required: true\n },\n suburl: {\n type: String,\n required: true\n },\n locale: {\n type: Object,\n required: true\n }\n },\n\n data: function () {\n return {\n isLoading: true,\n colorRange: [],\n endDate: null,\n values: [],\n totalContributions: 0,\n };\n },\n\n mounted: function() {\n this.colorRange = [\n this.getColor(0),\n this.getColor(1),\n this.getColor(2),\n this.getColor(3),\n this.getColor(4),\n this.getColor(5)\n ];\n this.endDate = new Date();\n this.loadHeatmap(this.user);\n },\n\n methods: {\n loadHeatmap: function(userName) {\n const self = this;\n $.get(this.suburl + '/api/v1/users/' + userName + '/heatmap', function(chartRawData) {\n const chartData = [];\n for (let i = 0; i < chartRawData.length; i++) {\n self.totalContributions += chartRawData[i].contributions;\n chartData[i] = { date: new Date(chartRawData[i].timestamp * 1000), count: chartRawData[i].contributions };\n }\n self.values = chartData;\n self.isLoading = false;\n });\n },\n\n getColor: function(idx) {\n const el = document.createElement('div');\n el.className = 'heatmap-color-' + idx;\n document.body.appendChild(el);\n\n const color = getComputedStyle(el).backgroundColor;\n\n document.body.removeChild(el);\n\n return color;\n }\n },\n\n template: '

total contributions in the last 12 months

'\n });\n\n new Vue({\n delimiters: vueDelimeters,\n el: el,\n\n data: {\n suburl: document.querySelector('meta[name=_suburl]').content,\n heatmapUser: heatmapUser,\n locale: locale\n },\n });\n}\n\nfunction initFilterBranchTagDropdown(selector) {\n $(selector).each(function() {\n const $dropdown = $(this);\n const $data = $dropdown.find('.data');\n const data = {\n items: [],\n mode: $data.data('mode'),\n searchTerm: '',\n noResults: '',\n canCreateBranch: false,\n menuVisible: false,\n active: 0\n };\n $data.find('.item').each(function() {\n data.items.push({\n name: $(this).text(),\n url: $(this).data('url'),\n branch: $(this).hasClass('branch'),\n tag: $(this).hasClass('tag'),\n selected: $(this).hasClass('selected')\n });\n });\n $data.remove();\n new Vue({\n delimiters: ['${', '}'],\n el: this,\n data: data,\n\n beforeMount: function () {\n const vm = this;\n\n this.noResults = vm.$el.getAttribute('data-no-results');\n this.canCreateBranch = vm.$el.getAttribute('data-can-create-branch') === 'true';\n\n document.body.addEventListener('click', function(event) {\n if (vm.$el.contains(event.target)) {\n return;\n }\n if (vm.menuVisible) {\n Vue.set(vm, 'menuVisible', false);\n }\n });\n },\n\n watch: {\n menuVisible: function(visible) {\n if (visible) {\n this.focusSearchField();\n }\n }\n },\n\n computed: {\n filteredItems: function() {\n const vm = this;\n\n const items = vm.items.filter(function (item) {\n return ((vm.mode === 'branches' && item.branch)\n || (vm.mode === 'tags' && item.tag))\n && (!vm.searchTerm\n || item.name.toLowerCase().indexOf(vm.searchTerm.toLowerCase()) >= 0);\n });\n\n vm.active = (items.length === 0 && vm.showCreateNewBranch ? 0 : -1);\n\n return items;\n },\n showNoResults: function() {\n return this.filteredItems.length === 0\n && !this.showCreateNewBranch;\n },\n showCreateNewBranch: function() {\n const vm = this;\n if (!this.canCreateBranch || !vm.searchTerm || vm.mode === 'tags') {\n return false;\n }\n\n return vm.items.filter(function (item) {\n return item.name.toLowerCase() === vm.searchTerm.toLowerCase()\n }).length === 0;\n }\n },\n\n methods: {\n selectItem: function(item) {\n const prev = this.getSelected();\n if (prev !== null) {\n prev.selected = false;\n }\n item.selected = true;\n window.location.href = item.url;\n },\n createNewBranch: function() {\n if (!this.showCreateNewBranch) {\n return;\n }\n this.$refs.newBranchForm.submit();\n },\n focusSearchField: function() {\n const vm = this;\n Vue.nextTick(function() {\n vm.$refs.searchField.focus();\n });\n },\n getSelected: function() {\n for (let i = 0, j = this.items.length; i < j; ++i) {\n if (this.items[i].selected)\n return this.items[i];\n }\n return null;\n },\n getSelectedIndexInFiltered: function() {\n for (let i = 0, j = this.filteredItems.length; i < j; ++i) {\n if (this.filteredItems[i].selected)\n return i;\n }\n return -1;\n },\n scrollToActive: function() {\n let el = this.$refs['listItem' + this.active];\n if (!el || el.length === 0) {\n return;\n }\n if (Array.isArray(el)) {\n el = el[0];\n }\n\n const cont = this.$refs.scrollContainer;\n\n if (el.offsetTop < cont.scrollTop) {\n cont.scrollTop = el.offsetTop;\n }\n else if (el.offsetTop + el.clientHeight > cont.scrollTop + cont.clientHeight) {\n cont.scrollTop = el.offsetTop + el.clientHeight - cont.clientHeight;\n }\n },\n keydown: function(event) {\n const vm = this;\n if (event.keyCode === 40) {\n // arrow down\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active + (vm.showCreateNewBranch ? 0 : 1) >= vm.filteredItems.length) {\n return;\n }\n vm.active++;\n vm.scrollToActive();\n }\n if (event.keyCode === 38) {\n // arrow up\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active <= 0) {\n return;\n }\n vm.active--;\n vm.scrollToActive();\n }\n if (event.keyCode == 13) {\n // enter\n event.preventDefault();\n\n if (vm.active >= vm.filteredItems.length) {\n vm.createNewBranch();\n } else if (vm.active >= 0) {\n vm.selectItem(vm.filteredItems[vm.active]);\n }\n }\n if (event.keyCode == 27) {\n // escape\n event.preventDefault();\n vm.menuVisible = false;\n }\n }\n }\n });\n });\n}\n\n$(\".commit-button\").click(function(e) {\n e.preventDefault();\n $(this).parent().find('.commit-body').toggle();\n});\n\nfunction initNavbarContentToggle() {\n const content = $('#navbar');\n const toggle = $('#navbar-expand-toggle');\n let isExpanded = false;\n toggle.click(function() {\n isExpanded = !isExpanded;\n if (isExpanded) {\n content.addClass('shown');\n toggle.addClass('active');\n }\n else {\n content.removeClass('shown');\n toggle.removeClass('active');\n }\n });\n}\n\nfunction initTopicbar() {\n const mgrBtn = $(\"#manage_topic\");\n const editDiv = $(\"#topic_edit\");\n const viewDiv = $(\"#repo-topics\");\n const saveBtn = $(\"#save_topic\");\n const topicDropdown = $('#topic_edit .dropdown');\n const topicForm = $('#topic_edit.ui.form');\n const topicPrompts = getPrompts();\n\n mgrBtn.click(function() {\n viewDiv.hide();\n editDiv.css('display', ''); // show Semantic UI Grid\n });\n\n function getPrompts() {\n const hidePrompt = $(\"div.hide#validate_prompt\"),\n prompts = {\n countPrompt: hidePrompt.children('#count_prompt').text(),\n formatPrompt: hidePrompt.children('#format_prompt').text()\n };\n hidePrompt.remove();\n return prompts;\n }\n\n saveBtn.click(function() {\n const topics = $(\"input[name=topics]\").val();\n\n $.post(saveBtn.data('link'), {\n \"_csrf\": csrf,\n \"topics\": topics\n }, function(_data, _textStatus, xhr){\n if (xhr.responseJSON.status === 'ok') {\n viewDiv.children(\".topic\").remove();\n if (topics.length) {\n const topicArray = topics.split(\",\");\n\n const last = viewDiv.children(\"a\").last();\n for (let i=0; i < topicArray.length; i++) {\n $('
'+topicArray[i]+'
').insertBefore(last)\n }\n }\n editDiv.css('display', 'none');\n viewDiv.show();\n }\n }).fail(function(xhr){\n if (xhr.status === 422) {\n if (xhr.responseJSON.invalidTopics.length > 0) {\n topicPrompts.formatPrompt = xhr.responseJSON.message;\n\n const invalidTopics = xhr.responseJSON.invalidTopics,\n topicLables = topicDropdown.children('a.ui.label');\n\n topics.split(',').forEach(function(value, index) {\n for (let i=0; i < invalidTopics.length; i++) {\n if (invalidTopics[i] === value) {\n topicLables.eq(index).removeClass(\"green\").addClass(\"red\");\n }\n }\n });\n } else {\n topicPrompts.countPrompt = xhr.responseJSON.message;\n }\n }\n }).always(function() {\n topicForm.form('validate form');\n });\n });\n\n topicDropdown.dropdown({\n allowAdditions: true,\n forceSelection: false,\n fields: { name: \"description\", value: \"data-value\" },\n saveRemoteData: false,\n label: {\n transition : 'horizontal flip',\n duration : 200,\n variation : false,\n blue : true,\n basic: true,\n },\n className: {\n label: 'ui small label'\n },\n apiSettings: {\n url: suburl + '/api/v1/topics/search?q={query}',\n throttle: 500,\n cache: false,\n onResponse: function(res) {\n const formattedResponse = {\n success: false,\n results: [],\n };\n const stripTags = function (text) {\n return text.replace(/<[^>]*>?/gm, \"\");\n };\n\n const query = stripTags(this.urlData.query.trim());\n let found_query = false;\n const current_topics = [];\n topicDropdown.find('div.label.visible.topic,a.label.visible').each(function(_,e){ current_topics.push(e.dataset.value); });\n\n if (res.topics) {\n let found = false;\n for (let i=0;i < res.topics.length;i++) {\n // skip currently added tags\n if (current_topics.indexOf(res.topics[i].topic_name) != -1){\n continue;\n }\n\n if (res.topics[i].topic_name.toLowerCase() === query.toLowerCase()){\n found_query = true;\n }\n formattedResponse.results.push({\"description\": res.topics[i].topic_name, \"data-value\": res.topics[i].topic_name});\n found = true;\n }\n formattedResponse.success = found;\n }\n\n if (query.length > 0 && !found_query){\n formattedResponse.success = true;\n formattedResponse.results.unshift({\"description\": query, \"data-value\": query});\n } else if (query.length > 0 && found_query) {\n formattedResponse.results.sort(function(a, b){\n if (a.description.toLowerCase() === query.toLowerCase()) return -1;\n if (b.description.toLowerCase() === query.toLowerCase()) return 1;\n if (a.description > b.description) return -1;\n if (a.description < b.description) return 1;\n return 0;\n });\n }\n\n\n return formattedResponse;\n },\n },\n onLabelCreate: function(value) {\n value = value.toLowerCase().trim();\n this.attr(\"data-value\", value).contents().first().replaceWith(value);\n return $(this);\n },\n onAdd: function(addedValue, _addedText, $addedChoice) {\n addedValue = addedValue.toLowerCase().trim();\n $($addedChoice).attr('data-value', addedValue);\n $($addedChoice).attr('data-text', addedValue);\n }\n });\n\n $.fn.form.settings.rules.validateTopic = function(_values, regExp) {\n const topics = topicDropdown.children('a.ui.label'),\n status = topics.length === 0 || topics.last().attr(\"data-value\").match(regExp);\n if (!status) {\n topics.last().removeClass(\"green\").addClass(\"red\");\n }\n return status && topicDropdown.children('a.ui.label.red').length === 0;\n };\n\n topicForm.form({\n on: 'change',\n inline : true,\n fields: {\n topics: {\n identifier: 'topics',\n rules: [\n {\n type: 'validateTopic',\n value: /^[a-z0-9][a-z0-9-]{1,35}$/,\n prompt: topicPrompts.formatPrompt\n },\n {\n type: 'maxCount[25]',\n prompt: topicPrompts.countPrompt\n }\n ]\n },\n }\n });\n}\nwindow.toggleDeadlineForm = function() {\n $('#deadlineForm').fadeToggle(150);\n}\n\nwindow.setDeadline = function() {\n const deadline = $('#deadlineDate').val();\n window.updateDeadline(deadline);\n}\n\nwindow.updateDeadline = function(deadlineString) {\n $('#deadline-err-invalid-date').hide();\n $('#deadline-loader').addClass('loading');\n\n let realDeadline = null;\n if (deadlineString !== '') {\n\n const newDate = Date.parse(deadlineString)\n\n if (isNaN(newDate)) {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n return false;\n }\n realDeadline = new Date(newDate);\n }\n\n $.ajax($('#update-issue-deadline-form').attr('action') + '/deadline', {\n data: JSON.stringify({\n 'due_date': realDeadline,\n }),\n headers: {\n 'X-Csrf-Token': csrf,\n 'X-Remote': true,\n },\n contentType: 'application/json',\n type: 'POST',\n success: function () {\n reload();\n },\n error: function () {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n }\n });\n}\n\nwindow.deleteDependencyModal = function(id, type) {\n $('.remove-dependency')\n .modal({\n closable: false,\n duration: 200,\n onApprove: function () {\n $('#removeDependencyID').val(id);\n $('#dependencyType').val(type);\n $('#removeDependencyForm').submit();\n }\n }).modal('show')\n ;\n}\n\nfunction initIssueList() {\n const repolink = $('#repolink').val();\n const repoId = $('#repoId').val();\n const crossRepoSearch = $('#crossRepoSearch').val();\n let issueSearchUrl = suburl + '/api/v1/repos/' + repolink + '/issues?q={query}';\n if (crossRepoSearch === 'true') {\n issueSearchUrl = suburl + '/api/v1/repos/issues/search?q={query}&priority_repo_id=' + repoId;\n }\n $('#new-dependency-drop-list')\n .dropdown({\n apiSettings: {\n url: issueSearchUrl,\n onResponse: function(response) {\n const filteredResponse = {'success': true, 'results': []};\n const currIssueId = $('#new-dependency-drop-list').data('issue-id');\n // Parse the response from the api to work with our dropdown\n $.each(response, function(_i, issue) {\n // Don't list current issue in the dependency list.\n if(issue.id === currIssueId) {\n return;\n }\n filteredResponse.results.push({\n 'name' : '#' + issue.number + ' ' + htmlEncode(issue.title) +\n '
' + htmlEncode(issue.repository.full_name) + '
',\n 'value' : issue.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n\n $(\".menu a.label-filter-item\").each(function() {\n $(this).click(function(e) {\n if (e.altKey) {\n e.preventDefault();\n\n const href = $(this).attr(\"href\");\n const id = $(this).data(\"label-id\");\n\n const regStr = \"labels=(-?[0-9]+%2c)*(\" + id + \")(%2c-?[0-9]+)*&\";\n const newStr = \"labels=$1-$2$3&\";\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n });\n });\n\n $(\".menu .ui.dropdown.label-filter\").keydown(function(e) {\n if (e.altKey && e.keyCode == 13) {\n const selectedItems = $(\".menu .ui.dropdown.label-filter .menu .item.selected\");\n\n if (selectedItems.length > 0) {\n const item = $(selectedItems[0]);\n\n const href = item.attr(\"href\");\n const id = item.data(\"label-id\");\n\n const regStr = \"labels=(-?[0-9]+%2c)*(\" + id + \")(%2c-?[0-9]+)*&\";\n const newStr = \"labels=$1-$2$3&\";\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n }\n });\n}\nwindow.cancelCodeComment = function(btn) {\n const form = $(btn).closest(\"form\");\n if(form.length > 0 && form.hasClass('comment-form')) {\n form.addClass('hide');\n form.parent().find('button.comment-form-reply').show();\n } else {\n form.closest('.comment-code-cloud').remove()\n }\n}\nwindow.onOAuthLoginClick = function() {\n const oauthLoader = $('#oauth2-login-loader');\n const oauthNav = $('#oauth2-login-navigator');\n\n oauthNav.hide();\n oauthLoader.removeClass('disabled');\n\n setTimeout(function(){\n // recover previous content to let user try again\n // usually redirection will be performed before this action\n oauthLoader.addClass('disabled');\n oauthNav.show();\n },5000);\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./web_src/js/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","htmlEncode","text","jQuery","html","csrf","suburl","previewFileModes","simpleMDEditor","codeMirrorEditor","initCommentPreviewTab","$form","$tabMenu","find","tab","data","click","$this","$","this","post","_csrf","context","val","$previewPanel","emojify","run","each","hljs","highlightBlock","buttonsClickOnEnter","initEditForm","length","$previewTab","split","initEditPreviewTab","content","$diffPreviewPanel","updateIssuesMeta","url","action","issueIds","elementId","Promise","resolve","ajax","type","issue_ids","id","success","reload","window","location","initImagePaste","target","field","addEventListener","event","pasteEvent","callback","clipboardData","items","indexOf","blob","getAsFile","preventDefault","stopPropagation","retrieveImageFromClipboardAsBlob","img","substr","lastIndexOf","selectionStart","startPos","endPos","selectionEnd","substring","insertAtCursor","file","xhr","XMLHttpRequest","onload","status","responseText","open","setRequestHeader","formData","FormData","append","send","uploadFile","res","JSON","parse","oldval","newval","replace","replaceAndKeepCursor","uuid","input","initCommentForm","$selectBranch","selectedValue","css","removeClass","addClass","initListSubmits","selectItem","selector","outerSelector","$list","$noSelect","$listMenu","hasLabelUpdateAction","labels","dropdown","promises","keys","forEach","label","promise","push","all","then","hasClass","listIds","parent","join","select_id","input_id","$menu","hasUpdateAction","initRepository","$data","searchTerm","noResults","canCreateBranch","menuVisible","active","branch","tag","selected","remove","Vue","delimiters","el","beforeMount","vm","$el","getAttribute","document","body","contains","set","watch","visible","focusSearchField","computed","filteredItems","filter","item","toLowerCase","showCreateNewBranch","showNoResults","methods","prev","getSelected","href","createNewBranch","$refs","newBranchForm","submit","nextTick","searchField","focus","j","getSelectedIndexInFiltered","scrollToActive","Array","isArray","cont","scrollContainer","offsetTop","scrollTop","clientHeight","keydown","keyCode","initFilterSearchDropdown","keyup","$prompt","toString","show","hide","change","checked","$newLabelPanel","minicolors","color_hex","modal","onApprove","$datepicker","datetimepicker","lang","inline","timepicker","startDate","formatDate","onSelectDate","ct","dateFormat","$issueTitle","$editInput","editTitleToggle","toggle","title","$textarea","$segment","next","$editContentZone","$renderContent","$rawContent","issuesTribute","attach","emojiTribute","$dropzone","$files","filenameDict","dropzone","headers","maxFiles","maxFilesize","acceptedFiles","addRemoveLinks","dictDefaultMessage","dictInvalidFileType","dictFileTooBig","dictRemoveFile","init","on","submitted","getJSON","drop","removeAllFiles","empty","imgSrc","emit","files","$editContentForm","attr","$attachments","map","$content","attachments","confirm","$statusButton","$mergeButton","e","onChange","_text","_value","$choice","closest","initReactionSelector","reactions","popup","position","metadata","actionURL","done","resp","react","insertBefore","appendTo","hasEmoji","$item","addLine","delLine","addPercent","parseFloat","localStorage","setItem","select","$repoComparePull","$dropdown","fullTextSearch","selectOnKeydown","message","assingMenuAttributes","menu","Math","floor","random","initRepositoryCollaboration","uid","initEditor","prop","$editFilename","parts","$section","$divider","getCursorPosition","last","setSelectionRange","element","trigger","$editArea","markdownFileExts","lineWrapExtensions","spec","extension","extWithDot","dataUrl","apiCall","exec","info","CodeMirror","findModeByExtension","previewLink","mime","toTextArea","SimpleMDE","autoDownloadFontAwesome","forceSync","renderingConfig","singleLineBreaks","indentWithTabs","tabSize","spellChecker","previewRender","plainText","preview","setTimeout","innerHTML","toolbar","setSimpleMDE","fromTextArea","lineNumbers","cm","_change","getValue","setCodeMirror","setOption","autoLoadMode","editorconfig","indent_style","Tab","spaces","parseInt","getOption","replaceSelection","indent_size","tab_width","$commitButton","$editForm","areYouSure","silent","dirtyClass","fieldSelector","dirty","initUserSettings","keypress","initCodeView","$select","siblings","selectRange","shiftKey","eq","getSelection","removeAllRanges","selection","$first","hash","match","offset","top","u2fSigned","stringify","contentType","fail","u2fError","u2fRegistered","errorCode","checkError","errorType","u2fErrors","browser","1","2","3","4","5","u2fRegisterRequest","req","registeredKeys","u2fApi","register","appId","registerRequests","catch","reason","undefined","metaData","code","changeHash","history","pushState","$from","a","b","classes","showDeletePopup","dialog","closable","redirect","showAddAllPopup","Dropzone","autoDiscover","fn","pos","Sel","createRange","SelLength","moveStart","ready","onShow","transition","direction","accordion","checkbox","progress","showActivity","slideToggle","nodes","slice","querySelectorAll","setConfig","img_dir","ignore_emoticons","getElementsByClassName","childNodes","nodeName","$searchTeamBox","$searchRepoBox","toggleMigrations","isExpanded","mgrBtn","editDiv","viewDiv","saveBtn","topicDropdown","topicForm","topicPrompts","hidePrompt","prompts","clipboard","Clipboard","clearSelection","setAttribute","node","encodeURIComponent","wrap","children","dataset","issueIDs","issueId","_","first","search","minCharacters","apiSettings","onResponse","response","_i","login","full_name","image","avatar_url","results","searchFields","permission","description","dbType","dbDefaults","MySQL","PostgreSQL","MSSQL","_type","defaultHost","is","authUserName","cloneAddr","startsWith","simplemde","codemirror","cursorPos","getCursor","setCursor","line","ch","className","getInputField","initWikiForm","updateContentType","initWebhook","removeAttr","authType","onOAuth2Change","onSecurityProtocolChange","onUsePagedSearchChange","onOAuth2UseCustomURLChange","$detailModal","$checkboxes","ids","provider","initAdmin","getElementById","component","props","searchLimit","Number","default","String","required","organizations","isOrganization","Boolean","canCreateOrganization","organizationsTotalCount","moreReposLink","repos","reposTotalCount","reposFilter","searchQuery","isLoading","repoTypes","count","searchMode","forks","mirrors","sources","collaborative","showMoreReposLink","searchURL","repoTypeCount","mounted","searchRepos","self","changeTab","changeReposFilter","showRepo","repo","owner","mirror","fork","searchedMode","searchedURL","searchedQuery","result","_textStatus","request","getResponseHeader","always","repoClass","private","querySelector","initVueApp","ctrlKey","altKey","metaKey","countPrompt","formatPrompt","topics","_data","responseJSON","topicArray","invalidTopics","topicLables","index","form","allowAdditions","forceSelection","fields","saveRemoteData","duration","variation","blue","basic","throttle","cache","formattedResponse","query","urlData","trim","found_query","current_topics","found","topic_name","unshift","sort","onLabelCreate","contents","replaceWith","onAdd","addedValue","_addedText","$addedChoice","settings","rules","validateTopic","_values","regExp","identifier","prompt","ensureSupport","sign","challenge","err","allowMultiple","repolink","repoId","crossRepoSearch","issueSearchUrl","filteredResponse","currIssueId","issue","number","repository","regStr","RegExp","selectedItems","initIssueList","toUpperCase","wipPrefixes","sticky","isSplit","side","idx","path","tr","ntr","after","td","commentCloud","initRepoStatusChecker","migrating","repo_name","complete","$repoTemplate","checkTemplate","$templateUnits","$nonTemplate","changeOwner","_r","initTemplateSearch","getItem","routes","$cloneAddr","$repoName","arrays","$title","timeAddManual","toggleStopwatch","cancelStopwatch","initHeatmap","appElementId","heatmapUser","locale","contributions","no_contributions","vueDelimeters","user","colorRange","endDate","values","totalContributions","getColor","Date","loadHeatmap","userName","chartRawData","chartData","date","timestamp","createElement","appendChild","color","getComputedStyle","backgroundColor","removeChild","template","toggleDeadlineForm","fadeToggle","setDeadline","deadline","updateDeadline","deadlineString","realDeadline","newDate","isNaN","due_date","error","deleteDependencyModal","cancelCodeComment","btn","onOAuthLoginClick","oauthLoader","oauthNav"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,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BAA8B4K,WAKtC3I,OAAOyoB,sBAAwB,SAAU5oB,EAAIF,GAC3C5B,EAAE,sBACCmL,MAAM,CACLsN,UAAU,EACV2K,SAAU,IACVhY,UAHK,WAIHpL,EAAE,uBAAuBK,IAAIyB,GAC7B9B,EAAE,mBAAmBK,IAAIuB,GACzB5B,EAAE,yBAAyBwJ,YAE5B2B,MAAM,SAwEblJ,OAAO0oB,kBAAoB,SAAUC,GACnC,IAAM7H,EAAO/iB,EAAE4qB,GAAK1b,QAAQ,QACxB6T,EAAKjiB,OAAS,GAAKiiB,EAAKtc,SAAS,iBACnCsc,EAAKzd,SAAS,QACdyd,EAAKpc,SAAShH,KAAK,6BAA6BiL,QAEhDmY,EAAK7T,QAAQ,uBAAuBvH,UAGxC1F,OAAO4oB,kBAAoB,WACzB,IAAMC,EAAc9qB,EAAE,wBAChB+qB,EAAW/qB,EAAE,2BAEnB+qB,EAASlgB,OACTigB,EAAYzlB,YAAY,YAExBmO,YAAW,WAGTsX,EAAYxlB,SAAS,YACrBylB,EAASngB,SACR","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* globals wipPrefixes, issuesTribute, emojiTribute */\n/* exported timeAddManual, toggleStopwatch, cancelStopwatch, initHeatmap */\n/* exported toggleDeadlineForm, setDeadline, updateDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */\n\nfunction htmlEncode(text) {\n return jQuery('
').text(text).html();\n}\n\nlet csrf;\nlet suburl;\nlet previewFileModes;\nlet simpleMDEditor;\nlet codeMirrorEditor;\n\n// Disable Dropzone auto-discover because it's manually initialized\nif (typeof (Dropzone) !== 'undefined') {\n Dropzone.autoDiscover = false;\n}\n\nfunction initCommentPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('preview')}\"]`).click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $this.data('context'),\n text: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $previewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('preview')}\"]`);\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n });\n });\n\n buttonsClickOnEnter();\n}\n\nfunction initEditPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n const $previewTab = $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('preview')}\"]`);\n if ($previewTab.length) {\n previewFileModes = $previewTab.data('preview-file-modes').split(',');\n $previewTab.click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $this.data('context'),\n text: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $previewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('preview')}\"]`);\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n });\n });\n }\n}\n\nfunction initEditDiffTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('diff')}\"]`).click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n context: $this.data('context'),\n content: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $diffPreviewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('diff')}\"]`);\n $diffPreviewPanel.html(data);\n emojify.run($diffPreviewPanel[0]);\n });\n });\n}\n\n\nfunction initEditForm() {\n if ($('.edit.form').length === 0) {\n return;\n }\n\n initEditPreviewTab($('.edit.form'));\n initEditDiffTab($('.edit.form'));\n}\n\nfunction initBranchSelector() {\n const $selectBranch = $('.ui.select-branch');\n const $branchMenu = $selectBranch.find('.reference-list-menu');\n $branchMenu.find('.item:not(.no-select)').click(function () {\n const selectedValue = $(this).data('id');\n $($(this).data('id-selector')).val(selectedValue);\n $selectBranch.find('.ui .branch-name').text(selectedValue);\n });\n $selectBranch.find('.reference.column').click(function () {\n $selectBranch.find('.scrolling.reference-list-menu').css('display', 'none');\n $selectBranch.find('.reference .text').removeClass('black');\n $($(this).data('target')).css('display', 'block');\n $(this).find('.text').addClass('black');\n return false;\n });\n}\n\nfunction updateIssuesMeta(url, action, issueIds, elementId) {\n return new Promise(((resolve) => {\n $.ajax({\n type: 'POST',\n url,\n data: {\n _csrf: csrf,\n action,\n issue_ids: issueIds,\n id: elementId\n },\n success: resolve\n });\n }));\n}\n\nfunction initRepoStatusChecker() {\n const migrating = $('#repo_migrating');\n $('#repo_migrating_failed').hide();\n if (migrating) {\n const repo_name = migrating.attr('repo');\n if (typeof repo_name === 'undefined') {\n return;\n }\n $.ajax({\n type: 'GET',\n url: `${suburl}/${repo_name}/status`,\n data: {\n _csrf: csrf,\n },\n complete(xhr) {\n if (xhr.status === 200) {\n if (xhr.responseJSON) {\n if (xhr.responseJSON.status === 0) {\n window.location.reload();\n return;\n }\n\n setTimeout(() => {\n initRepoStatusChecker();\n }, 2000);\n return;\n }\n }\n $('#repo_migrating_progress').hide();\n $('#repo_migrating_failed').show();\n }\n });\n }\n}\n\nfunction initReactionSelector(parent) {\n let reactions = '';\n if (!parent) {\n parent = $(document);\n reactions = '.reactions > ';\n }\n\n parent.find(`${reactions}a.label`).popup({ position: 'bottom left', metadata: { content: 'title', title: 'none' } });\n\n parent.find(`.select-reaction > .menu > .item, ${reactions}a.label`).on('click', function (e) {\n const vm = this;\n e.preventDefault();\n\n if ($(this).hasClass('disabled')) return;\n\n const actionURL = $(this).hasClass('item')\n ? $(this).closest('.select-reaction').data('action-url')\n : $(this).data('action-url');\n const url = `${actionURL}/${$(this).hasClass('blue') ? 'unreact' : 'react'}`;\n $.ajax({\n type: 'POST',\n url,\n data: {\n _csrf: csrf,\n content: $(this).data('content')\n }\n }).done((resp) => {\n if (resp && (resp.html || resp.empty)) {\n const content = $(vm).closest('.content');\n let react = content.find('.segment.reactions');\n if (!resp.empty && react.length > 0) {\n react.remove();\n }\n if (!resp.empty) {\n react = $('
');\n const attachments = content.find('.segment.bottom:first');\n if (attachments.length > 0) {\n react.insertBefore(attachments);\n } else {\n react.appendTo(content);\n }\n react.html(resp.html);\n const hasEmoji = react.find('.has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji.get(i));\n }\n react.find('.dropdown').dropdown();\n initReactionSelector(react);\n }\n }\n });\n });\n}\n\nfunction insertAtCursor(field, value) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.substring(0, startPos)\n + value\n + field.value.substring(endPos, field.value.length);\n field.selectionStart = startPos + value.length;\n field.selectionEnd = startPos + value.length;\n } else {\n field.value += value;\n }\n}\n\nfunction replaceAndKeepCursor(field, oldval, newval) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.replace(oldval, newval);\n field.selectionStart = startPos + newval.length - oldval.length;\n field.selectionEnd = endPos + newval.length - oldval.length;\n } else {\n field.value = field.value.replace(oldval, newval);\n }\n}\n\nfunction retrieveImageFromClipboardAsBlob(pasteEvent, callback) {\n if (!pasteEvent.clipboardData) {\n return;\n }\n\n const { items } = pasteEvent.clipboardData;\n if (typeof items === 'undefined') {\n return;\n }\n\n for (let i = 0; i < items.length; i++) {\n if (items[i].type.indexOf('image') === -1) continue;\n const blob = items[i].getAsFile();\n\n if (typeof (callback) === 'function') {\n pasteEvent.preventDefault();\n pasteEvent.stopPropagation();\n callback(blob);\n }\n }\n}\n\nfunction uploadFile(file, callback) {\n const xhr = new XMLHttpRequest();\n\n xhr.onload = function () {\n if (xhr.status === 200) {\n callback(xhr.responseText);\n }\n };\n\n xhr.open('post', `${suburl}/attachments`, true);\n xhr.setRequestHeader('X-Csrf-Token', csrf);\n const formData = new FormData();\n formData.append('file', file, file.name);\n xhr.send(formData);\n}\n\nfunction reload() {\n window.location.reload();\n}\n\nfunction initImagePaste(target) {\n target.each(function () {\n const field = this;\n field.addEventListener('paste', (event) => {\n retrieveImageFromClipboardAsBlob(event, (img) => {\n const name = img.name.substr(0, img.name.lastIndexOf('.'));\n insertAtCursor(field, `![${name}]()`);\n uploadFile(img, (res) => {\n const data = JSON.parse(res);\n replaceAndKeepCursor(field, `![${name}]()`, `![${name}](${suburl}/attachments/${data.uuid})`);\n const input = $(``).val(data.uuid);\n $('.files').append(input);\n });\n });\n }, false);\n });\n}\n\nfunction initCommentForm() {\n if ($('.comment.form').length === 0) {\n return;\n }\n\n initBranchSelector();\n initCommentPreviewTab($('.comment.form'));\n initImagePaste($('.comment.form textarea'));\n\n // Listsubmit\n function initListSubmits(selector, outerSelector) {\n const $list = $(`.ui.${outerSelector}.list`);\n const $noSelect = $list.find('.no-select');\n const $listMenu = $(`.${selector} .menu`);\n let hasLabelUpdateAction = $listMenu.data('action') === 'update';\n const labels = {};\n\n $(`.${selector}`).dropdown('setting', 'onHide', () => {\n hasLabelUpdateAction = $listMenu.data('action') === 'update'; // Update the var\n if (hasLabelUpdateAction) {\n const promises = [];\n Object.keys(labels).forEach((elementId) => {\n const label = labels[elementId];\n const promise = updateIssuesMeta(\n label['update-url'],\n label.action,\n label['issue-id'],\n elementId\n );\n promises.push(promise);\n });\n Promise.all(promises).then(reload);\n }\n });\n\n $listMenu.find('.item:not(.no-select)').click(function () {\n // we don't need the action attribute when updating assignees\n if (selector === 'select-assignees-modify') {\n // UI magic. We need to do this here, otherwise it would destroy the functionality of\n // adding/removing labels\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n }\n\n updateIssuesMeta(\n $listMenu.data('update-url'),\n '',\n $listMenu.data('issue-id'),\n $(this).data('id')\n );\n $listMenu.data('action', 'update'); // Update to reload the page when we updated items\n return false;\n }\n\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n 'update-url': $listMenu.data('update-url'),\n action: 'detach',\n 'issue-id': $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n 'update-url': $listMenu.data('update-url'),\n action: 'attach',\n 'issue-id': $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n }\n\n const listIds = [];\n $(this).parent().find('.item').each(function () {\n if ($(this).hasClass('checked')) {\n listIds.push($(this).data('id'));\n $($(this).data('id-selector')).removeClass('hide');\n } else {\n $($(this).data('id-selector')).addClass('hide');\n }\n });\n if (listIds.length === 0) {\n $noSelect.removeClass('hide');\n } else {\n $noSelect.addClass('hide');\n }\n $($(this).parent().data('id')).val(listIds.join(','));\n return false;\n });\n $listMenu.find('.no-select.item').click(function () {\n if (hasLabelUpdateAction || selector === 'select-assignees-modify') {\n updateIssuesMeta(\n $listMenu.data('update-url'),\n 'clear',\n $listMenu.data('issue-id'),\n ''\n ).then(reload);\n }\n\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n });\n\n $list.find('.item').each(function () {\n $(this).addClass('hide');\n });\n $noSelect.removeClass('hide');\n $($(this).parent().data('id')).val('');\n });\n }\n\n // Init labels and assignees\n initListSubmits('select-label', 'labels');\n initListSubmits('select-assignees', 'assignees');\n initListSubmits('select-assignees-modify', 'assignees');\n\n function selectItem(select_id, input_id) {\n const $menu = $(`${select_id} .menu`);\n const $list = $(`.ui${select_id}.list`);\n const hasUpdateAction = $menu.data('action') === 'update';\n\n $menu.find('.item:not(.no-select)').click(function () {\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('selected active');\n });\n\n $(this).addClass('selected active');\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n '',\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n switch (input_id) {\n case '#milestone_id':\n $list.find('.selected').html(`${\n htmlEncode($(this).text())}`);\n break;\n case '#assignee_id':\n $list.find('.selected').html(``\n + `${\n htmlEncode($(this).text())}`);\n }\n $(`.ui${select_id}.list .no-select`).addClass('hide');\n $(input_id).val($(this).data('id'));\n });\n $menu.find('.no-select.item').click(function () {\n $(this).parent().find('.item:not(.no-select)').each(function () {\n $(this).removeClass('selected active');\n });\n\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n '',\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n\n $list.find('.selected').html('');\n $list.find('.no-select').removeClass('hide');\n $(input_id).val('');\n });\n }\n\n // Milestone and assignee\n selectItem('.select-milestone', '#milestone_id');\n selectItem('.select-assignee', '#assignee_id');\n}\n\nfunction initInstall() {\n if ($('.install').length === 0) {\n return;\n }\n\n if ($('#db_host').val() === '') {\n $('#db_host').val('127.0.0.1:3306');\n $('#db_user').val('gitea');\n $('#db_name').val('gitea');\n }\n\n // Database type change detection.\n $('#db_type').change(function () {\n const sqliteDefault = 'data/gitea.db';\n const tidbDefault = 'data/gitea_tidb';\n\n const dbType = $(this).val();\n if (dbType === 'SQLite3') {\n $('#sql_settings').hide();\n $('#pgsql_settings').hide();\n $('#mysql_settings').hide();\n $('#sqlite_settings').show();\n\n if (dbType === 'SQLite3' && $('#db_path').val() === tidbDefault) {\n $('#db_path').val(sqliteDefault);\n }\n return;\n }\n\n const dbDefaults = {\n MySQL: '127.0.0.1:3306',\n PostgreSQL: '127.0.0.1:5432',\n MSSQL: '127.0.0.1:1433'\n };\n\n $('#sqlite_settings').hide();\n $('#sql_settings').show();\n\n $('#pgsql_settings').toggle(dbType === 'PostgreSQL');\n $('#mysql_settings').toggle(dbType === 'MySQL');\n $.each(dbDefaults, (_type, defaultHost) => {\n if ($('#db_host').val() === defaultHost) {\n $('#db_host').val(dbDefaults[dbType]);\n return false;\n }\n });\n });\n\n // TODO: better handling of exclusive relations.\n $('#offline-mode input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('check');\n $('#federated-avatar-lookup').checkbox('uncheck');\n }\n });\n $('#disable-gravatar input').change(function () {\n if ($(this).is(':checked')) {\n $('#federated-avatar-lookup').checkbox('uncheck');\n } else {\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#federated-avatar-lookup input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('uncheck');\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#enable-openid-signin input').change(function () {\n if ($(this).is(':checked')) {\n if (!$('#disable-registration input').is(':checked')) {\n $('#enable-openid-signup').checkbox('check');\n }\n } else {\n $('#enable-openid-signup').checkbox('uncheck');\n }\n });\n $('#disable-registration input').change(function () {\n if ($(this).is(':checked')) {\n $('#enable-captcha').checkbox('uncheck');\n $('#enable-openid-signup').checkbox('uncheck');\n } else {\n $('#enable-openid-signup').checkbox('check');\n }\n });\n $('#enable-captcha input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-registration').checkbox('uncheck');\n }\n });\n}\n\nfunction initRepository() {\n if ($('.repository').length === 0) {\n return;\n }\n\n function initFilterSearchDropdown(selector) {\n const $dropdown = $(selector);\n $dropdown.dropdown({\n fullTextSearch: true,\n selectOnKeydown: false,\n onChange(_text, _value, $choice) {\n if ($choice.data('url')) {\n window.location.href = $choice.data('url');\n }\n },\n message: { noResults: $dropdown.data('no-results') }\n });\n }\n\n // File list and commits\n if ($('.repository.file.list').length > 0 || ('.repository.commits').length > 0) {\n initFilterBranchTagDropdown('.choose.reference .dropdown');\n }\n\n // Wiki\n if ($('.repository.wiki.view').length > 0) {\n initFilterSearchDropdown('.choose.page .dropdown');\n }\n\n // Options\n if ($('.repository.settings.options').length > 0) {\n $('#repo_name').keyup(function () {\n const $prompt = $('#repo-name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n\n // Enable or select internal/external wiki system and issue tracker.\n $('.enable-system').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).addClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).removeClass('disabled');\n }\n });\n $('.enable-system-radio').change(function () {\n if (this.value === 'false') {\n $($(this).data('target')).addClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled');\n } else if (this.value === 'true') {\n $($(this).data('target')).removeClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled');\n }\n });\n }\n\n // Labels\n if ($('.repository.labels').length > 0) {\n // Create label\n const $newLabelPanel = $('.new-label.segment');\n $('.new-label.button').click(() => {\n $newLabelPanel.show();\n });\n $('.new-label.segment .cancel').click(() => {\n $newLabelPanel.hide();\n });\n\n $('.color-picker').each(function () {\n $(this).minicolors();\n });\n $('.precolors .color').click(function () {\n const color_hex = $(this).data('color-hex');\n $('.color-picker').val(color_hex);\n $('.minicolors-swatch-color').css('background-color', color_hex);\n });\n $('.edit-label-button').click(function () {\n $('#label-modal-id').val($(this).data('id'));\n $('.edit-label .new-label-input').val($(this).data('title'));\n $('.edit-label .new-label-desc-input').val($(this).data('description'));\n $('.edit-label .color-picker').val($(this).data('color'));\n $('.minicolors-swatch-color').css('background-color', $(this).data('color'));\n $('.edit-label.modal').modal({\n onApprove() {\n $('.edit-label.form').submit();\n }\n }).modal('show');\n return false;\n });\n }\n\n // Milestones\n if ($('.repository.new.milestone').length > 0) {\n const $datepicker = $('.milestone.datepicker');\n $datepicker.datetimepicker({\n lang: $datepicker.data('lang'),\n inline: true,\n timepicker: false,\n startDate: $datepicker.data('start-date'),\n formatDate: 'Y-m-d',\n onSelectDate(ct) {\n $('#deadline').val(ct.dateFormat('Y-m-d'));\n }\n });\n $('#clear-date').click(() => {\n $('#deadline').val('');\n return false;\n });\n }\n\n // Issues\n if ($('.repository.view.issue').length > 0) {\n // Edit issue title\n const $issueTitle = $('#issue-title');\n const $editInput = $('#edit-title-input input');\n const editTitleToggle = function () {\n $issueTitle.toggle();\n $('.not-in-edit').toggle();\n $('#edit-title-input').toggle();\n $('.in-edit').toggle();\n $editInput.focus();\n return false;\n };\n $('#edit-title').click(editTitleToggle);\n $('#cancel-edit-title').click(editTitleToggle);\n $('#save-edit-title').click(editTitleToggle).click(function () {\n if ($editInput.val().length === 0 || $editInput.val() === $issueTitle.text()) {\n $editInput.val($issueTitle.text());\n return false;\n }\n\n $.post($(this).data('update-url'), {\n _csrf: csrf,\n title: $editInput.val()\n },\n (data) => {\n $editInput.val(data.title);\n $issueTitle.text(data.title);\n reload();\n });\n return false;\n });\n\n // Edit issue or comment content\n $('.edit-content').click(function () {\n const $segment = $(this).parent().parent().parent()\n .next();\n const $editContentZone = $segment.find('.edit-content-zone');\n const $renderContent = $segment.find('.render-content');\n const $rawContent = $segment.find('.raw-content');\n let $textarea;\n\n // Setup new form\n if ($editContentZone.html().length === 0) {\n $editContentZone.html($('#edit-content-form').html());\n $textarea = $editContentZone.find('textarea');\n issuesTribute.attach($textarea.get());\n emojiTribute.attach($textarea.get());\n\n const $dropzone = $editContentZone.find('.dropzone');\n $dropzone.data('saved', false);\n const $files = $editContentZone.find('.comment-files');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n $dropzone.dropzone({\n url: $dropzone.data('upload-url'),\n headers: { 'X-Csrf-Token': csrf },\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init() {\n this.on('success', (file, data) => {\n filenameDict[file.name] = {\n uuid: data.uuid,\n submitted: false\n };\n const input = $(``).val(data.uuid);\n $files.append(input);\n });\n this.on('removedfile', (file) => {\n if (!(file.name in filenameDict)) {\n return;\n }\n $(`#${filenameDict[file.name].uuid}`).remove();\n if ($dropzone.data('remove-url') && $dropzone.data('csrf') && !filenameDict[file.name].submitted) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name].uuid,\n _csrf: $dropzone.data('csrf')\n });\n }\n });\n this.on('submit', () => {\n $.each(filenameDict, (name) => {\n filenameDict[name].submitted = true;\n });\n });\n this.on('reload', () => {\n $.getJSON($editContentZone.data('attachment-url'), (data) => {\n const drop = $dropzone.get(0).dropzone;\n drop.removeAllFiles(true);\n $files.empty();\n $.each(data, function () {\n const imgSrc = `${$dropzone.data('upload-url')}/${this.uuid}`;\n drop.emit('addedfile', this);\n drop.emit('thumbnail', this, imgSrc);\n drop.emit('complete', this);\n drop.files.push(this);\n filenameDict[this.name] = {\n submitted: true,\n uuid: this.uuid\n };\n $dropzone.find(`img[src='${imgSrc}']`).css('max-width', '100%');\n const input = $(``).val(this.uuid);\n $files.append(input);\n });\n });\n });\n }\n });\n $dropzone.get(0).dropzone.emit('reload');\n }\n // Give new write/preview data-tab name to distinguish from others\n const $editContentForm = $editContentZone.find('.ui.comment.form');\n const $tabMenu = $editContentForm.find('.tabular.menu');\n $tabMenu.attr('data-write', $editContentZone.data('write'));\n $tabMenu.attr('data-preview', $editContentZone.data('preview'));\n $tabMenu.find('.write.item').attr('data-tab', $editContentZone.data('write'));\n $tabMenu.find('.preview.item').attr('data-tab', $editContentZone.data('preview'));\n $editContentForm.find('.write.segment').attr('data-tab', $editContentZone.data('write'));\n $editContentForm.find('.preview.segment').attr('data-tab', $editContentZone.data('preview'));\n\n initCommentPreviewTab($editContentForm);\n\n $editContentZone.find('.cancel.button').click(() => {\n $renderContent.show();\n $editContentZone.hide();\n $dropzone.get(0).dropzone.emit('reload');\n });\n $editContentZone.find('.save.button').click(() => {\n $renderContent.show();\n $editContentZone.hide();\n const $attachments = $files.find('[name=files]').map(function () {\n return $(this).val();\n }).get();\n $.post($editContentZone.data('update-url'), {\n _csrf: csrf,\n content: $textarea.val(),\n context: $editContentZone.data('context'),\n files: $attachments\n }, (data) => {\n if (data.length === 0) {\n $renderContent.html($('#no-content').html());\n } else {\n $renderContent.html(data.content);\n emojify.run($renderContent[0]);\n $('pre code', $renderContent[0]).each(function () {\n hljs.highlightBlock(this);\n });\n }\n const $content = $segment.parent();\n if (!$content.find('.ui.small.images').length) {\n if (data.attachments !== '') {\n $content.append(\n '
'\n );\n $content.find('.ui.small.images').html(data.attachments);\n }\n } else if (data.attachments === '') {\n $content.find('.ui.small.images').parent().remove();\n } else {\n $content.find('.ui.small.images').html(data.attachments);\n }\n $dropzone.get(0).dropzone.emit('submit');\n $dropzone.get(0).dropzone.emit('reload');\n });\n });\n } else {\n $textarea = $segment.find('textarea');\n }\n\n // Show write/preview tab and copy raw content as needed\n $editContentZone.show();\n $renderContent.hide();\n if ($textarea.val().length === 0) {\n $textarea.val($rawContent.text());\n }\n $textarea.focus();\n return false;\n });\n\n // Delete comment\n $('.delete-comment').click(function () {\n const $this = $(this);\n if (window.confirm($this.data('locale'))) {\n $.post($this.data('url'), {\n _csrf: csrf\n }).success(() => {\n $(`#${$this.data('comment-id')}`).remove();\n });\n }\n return false;\n });\n\n // Change status\n const $statusButton = $('#status-button');\n $('#comment-form .edit_area').keyup(function () {\n if ($(this).val().length === 0) {\n $statusButton.text($statusButton.data('status'));\n } else {\n $statusButton.text($statusButton.data('status-and-comment'));\n }\n });\n $statusButton.click(() => {\n $('#status').val($statusButton.data('status-val'));\n $('#comment-form').submit();\n });\n\n // Pull Request merge button\n const $mergeButton = $('.merge-button > button');\n $mergeButton.on('click', function (e) {\n e.preventDefault();\n $(`.${$(this).data('do')}-fields`).show();\n $(this).parent().hide();\n });\n $('.merge-button > .dropdown').dropdown({\n onChange(_text, _value, $choice) {\n if ($choice.data('do')) {\n $mergeButton.find('.button-text').text($choice.text());\n $mergeButton.data('do', $choice.data('do'));\n }\n }\n });\n $('.merge-cancel').on('click', function (e) {\n e.preventDefault();\n $(this).closest('.form').hide();\n $mergeButton.parent().show();\n });\n\n initReactionSelector();\n }\n\n // Diff\n if ($('.repository.diff').length > 0) {\n $('.diff-counter').each(function () {\n const $item = $(this);\n const addLine = $item.find('span[data-line].add').data('line');\n const delLine = $item.find('span[data-line].del').data('line');\n const addPercent = parseFloat(addLine) / (parseFloat(addLine) + parseFloat(delLine)) * 100;\n $item.find('.bar .add').css('width', `${addPercent}%`);\n });\n }\n\n // Quick start and repository home\n $('#repo-clone-ssh').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-https').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'ssh');\n });\n $('#repo-clone-https').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-ssh').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'https');\n });\n $('#repo-clone-url').click(function () {\n $(this).select();\n });\n\n // Pull request\n const $repoComparePull = $('.repository.compare.pull');\n if ($repoComparePull.length > 0) {\n initFilterSearchDropdown('.choose.branch .dropdown');\n // show pull request form\n $repoComparePull.find('button.show-form').on('click', function (e) {\n e.preventDefault();\n $repoComparePull.find('.pullrequest-form').show();\n $(this).parent().hide();\n });\n }\n\n // Branches\n if ($('.repository.settings.branches').length > 0) {\n initFilterSearchDropdown('.protected-branches .dropdown');\n $('.enable-protection, .enable-whitelist').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n }\n });\n }\n}\n\nfunction initMigration() {\n const toggleMigrations = function () {\n const authUserName = $('#auth_username').val();\n const cloneAddr = $('#clone_addr').val();\n if (!$('#mirror').is(':checked') && (authUserName && authUserName.length > 0)\n && (cloneAddr !== undefined && (cloneAddr.startsWith('https://github.com') || cloneAddr.startsWith('http://github.com')))) {\n $('#migrate_items').show();\n } else {\n $('#migrate_items').hide();\n }\n };\n\n toggleMigrations();\n\n $('#clone_addr').on('input', toggleMigrations);\n $('#auth_username').on('input', toggleMigrations);\n $('#mirror').on('change', toggleMigrations);\n}\n\nfunction initPullRequestReview() {\n $('.show-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass('hide');\n $(`#code-comments-${id}`).removeClass('hide');\n $(`#code-preview-${id}`).removeClass('hide');\n $(`#hide-outdated-${id}`).removeClass('hide');\n });\n\n $('.hide-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass('hide');\n $(`#code-comments-${id}`).addClass('hide');\n $(`#code-preview-${id}`).addClass('hide');\n $(`#show-outdated-${id}`).removeClass('hide');\n });\n\n $('button.comment-form-reply').on('click', function (e) {\n e.preventDefault();\n $(this).hide();\n const form = $(this).parent().find('.comment-form');\n form.removeClass('hide');\n assingMenuAttributes(form.find('.menu'));\n });\n // The following part is only for diff views\n if ($('.repository.pull.diff').length === 0) {\n return;\n }\n\n $('.diff-detail-box.ui.sticky').sticky();\n\n $('.btn-review').on('click', function (e) {\n e.preventDefault();\n $(this).closest('.dropdown').find('.menu').toggle('visible');\n }).closest('.dropdown').find('.link.close')\n .on('click', function (e) {\n e.preventDefault();\n $(this).closest('.menu').toggle('visible');\n });\n\n $('.code-view .lines-code,.code-view .lines-num')\n .on('mouseenter', function () {\n const parent = $(this).closest('td');\n $(this).closest('tr').addClass(\n parent.hasClass('lines-num-old') || parent.hasClass('lines-code-old')\n ? 'focus-lines-old' : 'focus-lines-new'\n );\n })\n .on('mouseleave', function () {\n $(this).closest('tr').removeClass('focus-lines-new focus-lines-old');\n });\n $('.add-code-comment').on('click', function (e) {\n // https://github.com/go-gitea/gitea/issues/4745\n if ($(e.target).hasClass('btn-add-single')) {\n return;\n }\n e.preventDefault();\n const isSplit = $(this).closest('.code-diff').hasClass('code-diff-split');\n const side = $(this).data('side');\n const idx = $(this).data('idx');\n const path = $(this).data('path');\n const form = $('#pull_review_add_comment').html();\n const tr = $(this).closest('tr');\n let ntr = tr.next();\n if (!ntr.hasClass('add-comment')) {\n ntr = $(`${\n isSplit ? ''\n : ''\n }`);\n tr.after(ntr);\n }\n const td = ntr.find(`.add-comment-${side}`);\n let commentCloud = td.find('.comment-code-cloud');\n if (commentCloud.length === 0) {\n td.html(form);\n commentCloud = td.find('.comment-code-cloud');\n assingMenuAttributes(commentCloud.find('.menu'));\n\n td.find(\"input[name='line']\").val(idx);\n td.find(\"input[name='side']\").val(side === 'left' ? 'previous' : 'proposed');\n td.find(\"input[name='path']\").val(path);\n }\n commentCloud.find('textarea').focus();\n });\n}\n\nfunction assingMenuAttributes(menu) {\n const id = Math.floor(Math.random() * Math.floor(1000000));\n menu.attr('data-write', menu.attr('data-write') + id);\n menu.attr('data-preview', menu.attr('data-preview') + id);\n menu.find('.item').each(function () {\n const tab = $(this).attr('data-tab') + id;\n $(this).attr('data-tab', tab);\n });\n menu.parent().find(\"*[data-tab='write']\").attr('data-tab', `write${id}`);\n menu.parent().find(\"*[data-tab='preview']\").attr('data-tab', `preview${id}`);\n initCommentPreviewTab(menu.parent('.form'));\n return id;\n}\n\nfunction initRepositoryCollaboration() {\n // Change collaborator access mode\n $('.access-mode.menu .item').click(function () {\n const $menu = $(this).parent();\n $.post($menu.data('url'), {\n _csrf: csrf,\n uid: $menu.data('uid'),\n mode: $(this).data('value')\n });\n });\n}\n\nfunction initTeamSettings() {\n // Change team access mode\n $('.organization.new.team input[name=permission]').change(() => {\n const val = $('input[name=permission]:checked', '.organization.new.team').val();\n if (val === 'admin') {\n $('.organization.new.team .team-units').hide();\n } else {\n $('.organization.new.team .team-units').show();\n }\n });\n}\n\nfunction initWikiForm() {\n const $editArea = $('.repository.wiki textarea#edit_area');\n if ($editArea.length > 0) {\n const simplemde = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n previewRender(plainText, preview) { // Async method\n setTimeout(() => {\n // FIXME: still send render request when return back to edit mode\n $.post($editArea.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $editArea.data('context'),\n text: plainText\n }, (data) => {\n preview.innerHTML = `
${data}
`;\n emojify.run($('.editor-preview')[0]);\n });\n }, 0);\n\n return 'Loading...';\n },\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n toolbar: ['bold', 'italic', 'strikethrough', '|',\n 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|',\n {\n name: 'code-inline',\n action(e) {\n const cm = e.codemirror;\n const selection = cm.getSelection();\n cm.replaceSelection(`\\`${selection}\\``);\n if (!selection) {\n const cursorPos = cm.getCursor();\n cm.setCursor(cursorPos.line, cursorPos.ch - 1);\n }\n cm.focus();\n },\n className: 'fa fa-angle-right',\n title: 'Add Inline Code',\n }, 'code', 'quote', '|', {\n name: 'checkbox-empty',\n action(e) {\n const cm = e.codemirror;\n cm.replaceSelection(`\\n- [ ] ${cm.getSelection()}`);\n cm.focus();\n },\n className: 'fa fa-square-o',\n title: 'Add Checkbox (empty)',\n },\n {\n name: 'checkbox-checked',\n action(e) {\n const cm = e.codemirror;\n cm.replaceSelection(`\\n- [x] ${cm.getSelection()}`);\n cm.focus();\n },\n className: 'fa fa-check-square-o',\n title: 'Add Checkbox (checked)',\n }, '|',\n 'unordered-list', 'ordered-list', '|',\n 'link', 'image', 'table', 'horizontal-rule', '|',\n 'clean-block', 'preview', 'fullscreen']\n });\n $(simplemde.codemirror.getInputField()).addClass('js-quick-submit');\n }\n}\n\n// Adding function to get the cursor position in a text field to jQuery object.\n$.fn.getCursorPosition = function () {\n const el = $(this).get(0);\n let pos = 0;\n if ('selectionStart' in el) {\n pos = el.selectionStart;\n } else if ('selection' in document) {\n el.focus();\n const Sel = document.selection.createRange();\n const SelLength = document.selection.createRange().text.length;\n Sel.moveStart('character', -el.value.length);\n pos = Sel.text.length - SelLength;\n }\n return pos;\n};\n\nfunction setSimpleMDE($editArea) {\n if (codeMirrorEditor) {\n codeMirrorEditor.toTextArea();\n codeMirrorEditor = null;\n }\n\n if (simpleMDEditor) {\n return true;\n }\n\n simpleMDEditor = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n previewRender(plainText, preview) { // Async method\n setTimeout(() => {\n // FIXME: still send render request when return back to edit mode\n $.post($editArea.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $editArea.data('context'),\n text: plainText\n },\n (data) => {\n preview.innerHTML = `
${data}
`;\n emojify.run($('.editor-preview')[0]);\n });\n }, 0);\n\n return 'Loading...';\n },\n toolbar: ['bold', 'italic', 'strikethrough', '|',\n 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|',\n 'code', 'quote', '|',\n 'unordered-list', 'ordered-list', '|',\n 'link', 'image', 'table', 'horizontal-rule', '|',\n 'clean-block', 'preview', 'fullscreen', 'side-by-side']\n });\n\n return true;\n}\n\nfunction setCodeMirror($editArea) {\n if (simpleMDEditor) {\n simpleMDEditor.toTextArea();\n simpleMDEditor = null;\n }\n\n if (codeMirrorEditor) {\n return true;\n }\n\n codeMirrorEditor = CodeMirror.fromTextArea($editArea[0], {\n lineNumbers: true\n });\n codeMirrorEditor.on('change', (cm, _change) => {\n $editArea.val(cm.getValue());\n });\n\n return true;\n}\n\nfunction initEditor() {\n $('.js-quick-pull-choice-option').change(function () {\n if ($(this).val() === 'commit-to-new-branch') {\n $('.quick-pull-branch-name').show();\n $('.quick-pull-branch-name input').prop('required', true);\n } else {\n $('.quick-pull-branch-name').hide();\n $('.quick-pull-branch-name input').prop('required', false);\n }\n $('#commit-button').text($(this).attr('button_text'));\n });\n\n const $editFilename = $('#file-name');\n $editFilename.keyup(function (e) {\n const $section = $('.breadcrumb span.section');\n const $divider = $('.breadcrumb div.divider');\n let value;\n let parts;\n\n if (e.keyCode === 8) {\n if ($(this).getCursorPosition() === 0) {\n if ($section.length > 0) {\n value = $section.last().find('a').text();\n $(this).val(value + $(this).val());\n $(this)[0].setSelectionRange(value.length, value.length);\n $section.last().remove();\n $divider.last().remove();\n }\n }\n }\n if (e.keyCode === 191) {\n parts = $(this).val().split('/');\n for (let i = 0; i < parts.length; ++i) {\n value = parts[i];\n if (i < parts.length - 1) {\n if (value.length) {\n $(`${value}`).insertBefore($(this));\n $('
/
').insertBefore($(this));\n }\n } else {\n $(this).val(value);\n }\n $(this)[0].setSelectionRange(0, 0);\n }\n }\n parts = [];\n $('.breadcrumb span.section').each(function () {\n const element = $(this);\n if (element.find('a').length) {\n parts.push(element.find('a').text());\n } else {\n parts.push(element.text());\n }\n });\n if ($(this).val()) parts.push($(this).val());\n $('#tree_path').val(parts.join('/'));\n }).trigger('keyup');\n\n const $editArea = $('.repository.editor textarea#edit_area');\n if (!$editArea.length) return;\n\n const markdownFileExts = $editArea.data('markdown-file-exts').split(',');\n const lineWrapExtensions = $editArea.data('line-wrap-extensions').split(',');\n\n $editFilename.on('keyup', () => {\n const val = $editFilename.val();\n let mode, spec, extension, extWithDot, dataUrl, apiCall;\n\n extension = extWithDot = '';\n const m = /.+\\.([^.]+)$/.exec(val);\n if (m) {\n extension = m[1];\n extWithDot = `.${extension}`;\n }\n\n const info = CodeMirror.findModeByExtension(extension);\n const previewLink = $('a[data-tab=preview]');\n if (info) {\n mode = info.mode;\n spec = info.mime;\n apiCall = mode;\n } else {\n apiCall = extension;\n }\n\n if (previewLink.length && apiCall && previewFileModes && previewFileModes.length && previewFileModes.indexOf(apiCall) >= 0) {\n dataUrl = previewLink.data('url');\n previewLink.data('url', dataUrl.replace(/(.*)\\/.*/i, `$1/${mode}`));\n previewLink.show();\n } else {\n previewLink.hide();\n }\n\n // If this file is a Markdown extensions, we will load that editor and return\n if (markdownFileExts.indexOf(extWithDot) >= 0) {\n if (setSimpleMDE($editArea)) {\n return;\n }\n }\n\n // Else we are going to use CodeMirror\n if (!codeMirrorEditor && !setCodeMirror($editArea)) {\n return;\n }\n\n if (mode) {\n codeMirrorEditor.setOption('mode', spec);\n CodeMirror.autoLoadMode(codeMirrorEditor, mode);\n }\n\n if (lineWrapExtensions.indexOf(extWithDot) >= 0) {\n codeMirrorEditor.setOption('lineWrapping', true);\n } else {\n codeMirrorEditor.setOption('lineWrapping', false);\n }\n\n // get the filename without any folder\n let value = $editFilename.val();\n if (value.length === 0) {\n return;\n }\n value = value.split('/');\n value = value[value.length - 1];\n\n $.getJSON($editFilename.data('ec-url-prefix') + value, (editorconfig) => {\n if (editorconfig.indent_style === 'tab') {\n codeMirrorEditor.setOption('indentWithTabs', true);\n codeMirrorEditor.setOption('extraKeys', {});\n } else {\n codeMirrorEditor.setOption('indentWithTabs', false);\n // required because CodeMirror doesn't seems to use spaces correctly for {\"indentWithTabs\": false}:\n // - https://github.com/codemirror/CodeMirror/issues/988\n // - https://codemirror.net/doc/manual.html#keymaps\n codeMirrorEditor.setOption('extraKeys', {\n Tab(cm) {\n const spaces = Array(parseInt(cm.getOption('indentUnit')) + 1).join(' ');\n cm.replaceSelection(spaces);\n }\n });\n }\n codeMirrorEditor.setOption('indentUnit', editorconfig.indent_size || 4);\n codeMirrorEditor.setOption('tabSize', editorconfig.tab_width || 4);\n });\n }).trigger('keyup');\n\n // Using events from https://github.com/codedance/jquery.AreYouSure#advanced-usage\n // to enable or disable the commit button\n const $commitButton = $('#commit-button');\n const $editForm = $('.ui.edit.form');\n const dirtyFileClass = 'dirty-file';\n\n // Disabling the button at the start\n $commitButton.prop('disabled', true);\n\n // Registering a custom listener for the file path and the file content\n $editForm.areYouSure({\n silent: true,\n dirtyClass: dirtyFileClass,\n fieldSelector: ':input:not(.commit-form-wrapper :input)',\n change() {\n const dirty = $(this).hasClass(dirtyFileClass);\n $commitButton.prop('disabled', !dirty);\n }\n });\n\n $commitButton.click((event) => {\n // A modal which asks if an empty file should be committed\n if ($editArea.val().length === 0) {\n $('#edit-empty-content-modal').modal({\n onApprove() {\n $('.edit.form').submit();\n }\n }).modal('show');\n event.preventDefault();\n }\n });\n}\n\nfunction initOrganization() {\n if ($('.organization').length === 0) {\n return;\n }\n\n // Options\n if ($('.organization.settings.options').length > 0) {\n $('#org_name').keyup(function () {\n const $prompt = $('#org-name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('org-name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initUserSettings() {\n // Options\n if ($('.user.settings.profile').length > 0) {\n $('#username').keyup(function () {\n const $prompt = $('#name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initWebhook() {\n if ($('.new.webhook').length === 0) {\n return;\n }\n\n $('.events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').show();\n }\n });\n $('.non-events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').hide();\n }\n });\n\n const updateContentType = function () {\n const visible = $('#http_method').val() === 'POST';\n $('#content_type').parent().parent()[visible ? 'show' : 'hide']();\n };\n updateContentType();\n $('#http_method').change(() => {\n updateContentType();\n });\n\n // Test delivery\n $('#test-delivery').click(function () {\n const $this = $(this);\n $this.addClass('loading disabled');\n $.post($this.data('link'), {\n _csrf: csrf\n }).done(\n setTimeout(() => {\n window.location.href = $this.data('redirect');\n }, 5000)\n );\n });\n}\n\nfunction initAdmin() {\n if ($('.admin').length === 0) {\n return;\n }\n\n // New user\n if ($('.admin.new.user').length > 0 || $('.admin.edit.user').length > 0) {\n $('#login_type').change(function () {\n if ($(this).val().substring(0, 1) === '0') {\n $('#login_name').removeAttr('required');\n $('.non-local').hide();\n $('.local').show();\n $('#user_name').focus();\n\n if ($(this).data('password') === 'required') {\n $('#password').attr('required', 'required');\n }\n } else {\n $('#login_name').attr('required', 'required');\n $('.non-local').show();\n $('.local').hide();\n $('#login_name').focus();\n\n $('#password').removeAttr('required');\n }\n });\n }\n\n function onSecurityProtocolChange() {\n if ($('#security_protocol').val() > 0) {\n $('.has-tls').show();\n } else {\n $('.has-tls').hide();\n }\n }\n\n function onUsePagedSearchChange() {\n if ($('#use_paged_search').prop('checked')) {\n $('.search-page-size').show()\n .find('input').attr('required', 'required');\n } else {\n $('.search-page-size').hide()\n .find('input').removeAttr('required');\n }\n }\n\n function onOAuth2Change() {\n $('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url').hide();\n $('.open_id_connect_auto_discovery_url input[required]').removeAttr('required');\n\n const provider = $('#oauth2_provider').val();\n switch (provider) {\n case 'github':\n case 'gitlab':\n case 'gitea':\n $('.oauth2_use_custom_url').show();\n break;\n case 'openidConnect':\n $('.open_id_connect_auto_discovery_url input').attr('required', 'required');\n $('.open_id_connect_auto_discovery_url').show();\n break;\n }\n onOAuth2UseCustomURLChange();\n }\n\n function onOAuth2UseCustomURLChange() {\n const provider = $('#oauth2_provider').val();\n $('.oauth2_use_custom_url_field').hide();\n $('.oauth2_use_custom_url_field input[required]').removeAttr('required');\n\n if ($('#oauth2_use_custom_url').is(':checked')) {\n if (!$('#oauth2_token_url').val()) {\n $('#oauth2_token_url').val($(`#${provider}_token_url`).val());\n }\n if (!$('#oauth2_auth_url').val()) {\n $('#oauth2_auth_url').val($(`#${provider}_auth_url`).val());\n }\n if (!$('#oauth2_profile_url').val()) {\n $('#oauth2_profile_url').val($(`#${provider}_profile_url`).val());\n }\n if (!$('#oauth2_email_url').val()) {\n $('#oauth2_email_url').val($(`#${provider}_email_url`).val());\n }\n switch (provider) {\n case 'github':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url').show();\n break;\n case 'gitea':\n case 'gitlab':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url').show();\n $('#oauth2_email_url').val('');\n break;\n }\n }\n }\n\n // New authentication\n if ($('.admin.new.authentication').length > 0) {\n $('#auth_type').change(function () {\n $('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size').hide();\n\n $('.ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]').removeAttr('required');\n $('.binddnrequired').removeClass('required');\n\n const authType = $(this).val();\n switch (authType) {\n case '2': // LDAP\n $('.ldap').show();\n $('.binddnrequired input, .ldap div.required:not(.dldap) input').attr('required', 'required');\n $('.binddnrequired').addClass('required');\n break;\n case '3': // SMTP\n $('.smtp').show();\n $('.has-tls').show();\n $('.smtp div.required input, .has-tls').attr('required', 'required');\n break;\n case '4': // PAM\n $('.pam').show();\n $('.pam input').attr('required', 'required');\n break;\n case '5': // LDAP\n $('.dldap').show();\n $('.dldap div.required:not(.ldap) input').attr('required', 'required');\n break;\n case '6': // OAuth2\n $('.oauth2').show();\n $('.oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input').attr('required', 'required');\n onOAuth2Change();\n break;\n }\n if (authType === '2' || authType === '5') {\n onSecurityProtocolChange();\n }\n if (authType === '2') {\n onUsePagedSearchChange();\n }\n });\n $('#auth_type').change();\n $('#security_protocol').change(onSecurityProtocolChange);\n $('#use_paged_search').change(onUsePagedSearchChange);\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n }\n // Edit authentication\n if ($('.admin.edit.authentication').length > 0) {\n const authType = $('#auth_type').val();\n if (authType === '2' || authType === '5') {\n $('#security_protocol').change(onSecurityProtocolChange);\n if (authType === '2') {\n $('#use_paged_search').change(onUsePagedSearchChange);\n }\n } else if (authType === '6') {\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n onOAuth2Change();\n }\n }\n\n // Notice\n if ($('.admin.notice')) {\n const $detailModal = $('#detail-modal');\n\n // Attach view detail modals\n $('.view-detail').click(function () {\n $detailModal.find('.content p').text($(this).data('content'));\n $detailModal.modal('show');\n return false;\n });\n\n // Select actions\n const $checkboxes = $('.select.table .ui.checkbox');\n $('.select.action').click(function () {\n switch ($(this).data('action')) {\n case 'select-all':\n $checkboxes.checkbox('check');\n break;\n case 'deselect-all':\n $checkboxes.checkbox('uncheck');\n break;\n case 'inverse':\n $checkboxes.checkbox('toggle');\n break;\n }\n });\n $('#delete-selection').click(function () {\n const $this = $(this);\n $this.addClass('loading disabled');\n const ids = [];\n $checkboxes.each(function () {\n if ($(this).checkbox('is checked')) {\n ids.push($(this).data('id'));\n }\n });\n $.post($this.data('link'), {\n _csrf: csrf,\n ids\n }).done(() => {\n window.location.href = $this.data('redirect');\n });\n });\n }\n}\n\nfunction buttonsClickOnEnter() {\n $('.ui.button').keypress(function (e) {\n if (e.keyCode === 13 || e.keyCode === 32) { // enter key or space bar\n $(this).click();\n }\n });\n}\n\nfunction searchUsers() {\n const $searchUserBox = $('#search-user-box');\n $searchUserBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/users/search?q={query}`,\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n let title = item.login;\n if (item.full_name && item.full_name.length > 0) {\n title += ` (${htmlEncode(item.full_name)})`;\n }\n items.push({\n title,\n image: item.avatar_url\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['login', 'full_name'],\n showNoResults: false\n });\n}\n\nfunction searchTeams() {\n const $searchTeamBox = $('#search-team-box');\n $searchTeamBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/orgs/${$searchTeamBox.data('org')}/teams/search?q={query}`,\n headers: { 'X-Csrf-Token': csrf },\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n const title = `${item.name} (${item.permission} access)`;\n items.push({\n title,\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['name', 'description'],\n showNoResults: false\n });\n}\n\nfunction searchRepositories() {\n const $searchRepoBox = $('#search-repo-box');\n $searchRepoBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/repos/search?q={query}&uid=${$searchRepoBox.data('uid')}`,\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n items.push({\n title: item.full_name.split('/')[1],\n description: item.full_name\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['full_name'],\n showNoResults: false\n });\n}\n\nfunction initCodeView() {\n if ($('.code-view .linenums').length > 0) {\n $(document).on('click', '.lines-num span', function (e) {\n const $select = $(this);\n const $list = $select.parent().siblings('.lines-code').find('ol.linenums > li');\n selectRange($list, $list.filter(`[rel=${$select.attr('id')}]`), (e.shiftKey ? $list.filter('.active').eq(0) : null));\n deSelect();\n });\n\n $(window).on('hashchange', () => {\n let m = window.location.hash.match(/^#(L\\d+)-(L\\d+)$/);\n const $list = $('.code-view ol.linenums > li');\n let $first;\n if (m) {\n $first = $list.filter(`.${m[1]}`);\n selectRange($list, $first, $list.filter(`.${m[2]}`));\n $('html, body').scrollTop($first.offset().top - 200);\n return;\n }\n m = window.location.hash.match(/^#(L|n)(\\d+)$/);\n if (m) {\n $first = $list.filter(`.L${m[2]}`);\n selectRange($list, $first);\n $('html, body').scrollTop($first.offset().top - 200);\n }\n }).trigger('hashchange');\n }\n}\n\nfunction initU2FAuth() {\n if ($('#wait-for-key').length === 0) {\n return;\n }\n u2fApi.ensureSupport()\n .then(() => {\n $.getJSON(`${suburl}/user/u2f/challenge`).success((req) => {\n u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30)\n .then(u2fSigned)\n .catch((err) => {\n if (err === undefined) {\n u2fError(1);\n return;\n }\n u2fError(err.metaData.code);\n });\n });\n }).catch(() => {\n // Fallback in case browser do not support U2F\n window.location.href = `${suburl}/user/two_factor`;\n });\n}\nfunction u2fSigned(resp) {\n $.ajax({\n url: `${suburl}/user/u2f/sign`,\n type: 'POST',\n headers: { 'X-Csrf-Token': csrf },\n data: JSON.stringify(resp),\n contentType: 'application/json; charset=utf-8',\n }).done((res) => {\n window.location.replace(res);\n }).fail(() => {\n u2fError(1);\n });\n}\n\nfunction u2fRegistered(resp) {\n if (checkError(resp)) {\n return;\n }\n $.ajax({\n url: `${suburl}/user/settings/security/u2f/register`,\n type: 'POST',\n headers: { 'X-Csrf-Token': csrf },\n data: JSON.stringify(resp),\n contentType: 'application/json; charset=utf-8',\n success() {\n reload();\n },\n fail() {\n u2fError(1);\n }\n });\n}\n\nfunction checkError(resp) {\n if (!('errorCode' in resp)) {\n return false;\n }\n if (resp.errorCode === 0) {\n return false;\n }\n u2fError(resp.errorCode);\n return true;\n}\n\n\nfunction u2fError(errorType) {\n const u2fErrors = {\n browser: $('#unsupported-browser'),\n 1: $('#u2f-error-1'),\n 2: $('#u2f-error-2'),\n 3: $('#u2f-error-3'),\n 4: $('#u2f-error-4'),\n 5: $('.u2f-error-5')\n };\n u2fErrors[errorType].removeClass('hide');\n\n Object.keys(u2fErrors).forEach((type) => {\n if (type !== errorType) {\n u2fErrors[type].addClass('hide');\n }\n });\n $('#u2f-error').modal('show');\n}\n\nfunction initU2FRegister() {\n $('#register-device').modal({ allowMultiple: false });\n $('#u2f-error').modal({ allowMultiple: false });\n $('#register-security-key').on('click', (e) => {\n e.preventDefault();\n u2fApi.ensureSupport()\n .then(u2fRegisterRequest)\n .catch(() => {\n u2fError('browser');\n });\n });\n}\n\nfunction u2fRegisterRequest() {\n $.post(`${suburl}/user/settings/security/u2f/request_register`, {\n _csrf: csrf,\n name: $('#nickname').val()\n }).success((req) => {\n $('#nickname').closest('div.field').removeClass('error');\n $('#register-device').modal('show');\n if (req.registeredKeys === null) {\n req.registeredKeys = [];\n }\n u2fApi.register(req.appId, req.registerRequests, req.registeredKeys, 30)\n .then(u2fRegistered)\n .catch((reason) => {\n if (reason === undefined) {\n u2fError(1);\n return;\n }\n u2fError(reason.metaData.code);\n });\n }).fail((xhr) => {\n if (xhr.status === 409) {\n $('#nickname').closest('div.field').addClass('error');\n }\n });\n}\n\nfunction initWipTitle() {\n $('.title_wip_desc > a').click((e) => {\n e.preventDefault();\n\n const $issueTitle = $('#issue_title');\n $issueTitle.focus();\n const value = $issueTitle.val().trim().toUpperCase();\n\n for (const i in wipPrefixes) {\n if (value.startsWith(wipPrefixes[i].toUpperCase())) {\n return;\n }\n }\n\n $issueTitle.val(`${wipPrefixes[0]} ${$issueTitle.val()}`);\n });\n}\n\nfunction initTemplateSearch() {\n const $repoTemplate = $('#repo_template');\n const checkTemplate = function () {\n const $templateUnits = $('#template_units');\n const $nonTemplate = $('#non_template');\n if ($repoTemplate.val() !== '') {\n $templateUnits.show();\n $nonTemplate.hide();\n } else {\n $templateUnits.hide();\n $nonTemplate.show();\n }\n };\n $repoTemplate.change(checkTemplate);\n checkTemplate();\n\n const changeOwner = function () {\n $('#repo_template_search')\n .dropdown({\n apiSettings: {\n url: `${suburl}/api/v1/repos/search?q={query}&template=true&priority_owner_id=${$('#uid').val()}`,\n onResponse(response) {\n const filteredResponse = { success: true, results: [] };\n filteredResponse.results.push({\n name: '',\n value: ''\n });\n // Parse the response from the api to work with our dropdown\n $.each(response.data, (_r, repo) => {\n filteredResponse.results.push({\n name: htmlEncode(repo.full_name),\n value: repo.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n };\n $('#uid').change(changeOwner);\n changeOwner();\n}\n\n$(document).ready(() => {\n csrf = $('meta[name=_csrf]').attr('content');\n suburl = $('meta[name=_suburl]').attr('content');\n\n // Show exact time\n $('.time-since').each(function () {\n $(this)\n .addClass('poping up')\n .attr('data-content', $(this).attr('title'))\n .attr('data-variation', 'inverted tiny')\n .attr('title', '');\n });\n\n // Semantic UI modules.\n $('.dropdown:not(.custom)').dropdown();\n $('.jump.dropdown').dropdown({\n action: 'hide',\n onShow() {\n $('.poping.up').popup('hide');\n }\n });\n $('.slide.up.dropdown').dropdown({\n transition: 'slide up'\n });\n $('.upward.dropdown').dropdown({\n direction: 'upward'\n });\n $('.ui.accordion').accordion();\n $('.ui.checkbox').checkbox();\n $('.ui.progress').progress({\n showActivity: false\n });\n $('.poping.up').popup();\n $('.top.menu .poping.up').popup({\n onShow() {\n if ($('.top.menu .menu.transition').hasClass('visible')) {\n return false;\n }\n }\n });\n $('.tabular.menu .item').tab();\n $('.tabable.menu .item').tab();\n\n $('.toggle.button').click(function () {\n $($(this).data('target')).slideToggle(100);\n });\n\n // make table element clickable like a link\n $('tr[data-href]').click(function () {\n window.location = $(this).data('href');\n });\n\n // Highlight JS\n if (typeof hljs !== 'undefined') {\n const nodes = [].slice.call(document.querySelectorAll('pre code') || []);\n for (let i = 0; i < nodes.length; i++) {\n hljs.highlightBlock(nodes[i]);\n }\n }\n\n // Dropzone\n const $dropzone = $('#dropzone');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n\n new Dropzone('#dropzone', {\n url: $dropzone.data('upload-url'),\n headers: { 'X-Csrf-Token': csrf },\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init() {\n this.on('success', (file, data) => {\n filenameDict[file.name] = data.uuid;\n const input = $(``).val(data.uuid);\n $('.files').append(input);\n });\n this.on('removedfile', (file) => {\n if (file.name in filenameDict) {\n $(`#${filenameDict[file.name]}`).remove();\n }\n if ($dropzone.data('remove-url') && $dropzone.data('csrf')) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name],\n _csrf: $dropzone.data('csrf')\n });\n }\n });\n },\n });\n }\n\n // Emojify\n emojify.setConfig({\n img_dir: `${suburl}/vendor/plugins/emojify/images`,\n ignore_emoticons: true\n });\n const hasEmoji = document.getElementsByClassName('has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji[i]);\n for (let j = 0; j < hasEmoji[i].childNodes.length; j++) {\n if (hasEmoji[i].childNodes[j].nodeName === 'A') {\n emojify.run(hasEmoji[i].childNodes[j]);\n }\n }\n }\n\n // Clipboard JS\n const clipboard = new Clipboard('.clipboard');\n clipboard.on('success', (e) => {\n e.clearSelection();\n\n $(`#${e.trigger.getAttribute('id')}`).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-success'));\n $(`#${e.trigger.getAttribute('id')}`).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));\n });\n\n clipboard.on('error', (e) => {\n $(`#${e.trigger.getAttribute('id')}`).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-error'));\n $(`#${e.trigger.getAttribute('id')}`).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));\n });\n\n // Helpers.\n $('.delete-button').click(showDeletePopup);\n $('.add-all-button').click(showAddAllPopup);\n\n $('.delete-branch-button').click(showDeletePopup);\n\n $('.undo-button').click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n });\n $('.show-panel.button').click(function () {\n $($(this).data('panel')).show();\n });\n $('.show-modal.button').click(function () {\n $($(this).data('modal')).modal('show');\n });\n $('.delete-post.button').click(function () {\n const $this = $(this);\n $.post($this.data('request-url'), {\n _csrf: csrf\n }).done(() => {\n window.location.href = $this.data('done-url');\n });\n });\n\n // Set anchor.\n $('.markdown').each(function () {\n const headers = {};\n $(this).find('h1, h2, h3, h4, h5, h6').each(function () {\n let node = $(this);\n const val = encodeURIComponent(node.text().toLowerCase().replace(/[^\\u00C0-\\u1FFF\\u2C00-\\uD7FF\\w\\- ]/g, '').replace(/[ ]/g, '-'));\n let name = val;\n if (headers[val] > 0) {\n name = `${val}-${headers[val]}`;\n }\n if (headers[val] === undefined) {\n headers[val] = 1;\n } else {\n headers[val] += 1;\n }\n node = node.wrap(`
`);\n node.append(``);\n });\n });\n\n $('.issue-checkbox').click(() => {\n const numChecked = $('.issue-checkbox').children('input:checked').length;\n if (numChecked > 0) {\n $('#issue-filters').addClass('hide');\n $('#issue-actions').removeClass('hide');\n } else {\n $('#issue-filters').removeClass('hide');\n $('#issue-actions').addClass('hide');\n }\n });\n\n $('.issue-action').click(function () {\n let { action } = this.dataset;\n let { elementId } = this.dataset;\n const issueIDs = $('.issue-checkbox').children('input:checked').map(function () {\n return this.dataset.issueId;\n }).get().join();\n const { url } = this.dataset;\n if (elementId === '0' && url.substr(-9) === '/assignee') {\n elementId = '';\n action = 'clear';\n }\n updateIssuesMeta(url, action, issueIDs, elementId).then(() => {\n // NOTICE: This reset of checkbox state targets Firefox caching behaviour, as the checkboxes stay checked after reload\n if (action === 'close' || action === 'open') {\n // uncheck all checkboxes\n $('.issue-checkbox input[type=\"checkbox\"]').each((_, e) => { e.checked = false; });\n }\n reload();\n });\n });\n\n // NOTICE: This event trigger targets Firefox caching behaviour, as the checkboxes stay checked after reload\n // trigger ckecked event, if checkboxes are checked on load\n $('.issue-checkbox input[type=\"checkbox\"]:checked').first().each((_, e) => {\n e.checked = false;\n $(e).click();\n });\n\n buttonsClickOnEnter();\n searchUsers();\n searchTeams();\n searchRepositories();\n\n initCommentForm();\n initInstall();\n initRepository();\n initMigration();\n initWikiForm();\n initEditForm();\n initEditor();\n initOrganization();\n initWebhook();\n initAdmin();\n initCodeView();\n initVueApp();\n initTeamSettings();\n initCtrlEnterSubmit();\n initNavbarContentToggle();\n initTopicbar();\n initU2FAuth();\n initU2FRegister();\n initIssueList();\n initWipTitle();\n initPullRequestReview();\n initRepoStatusChecker();\n initTemplateSearch();\n\n // Repo clone url.\n if ($('#repo-clone-url').length > 0) {\n switch (localStorage.getItem('repo-clone-protocol')) {\n case 'ssh':\n if ($('#repo-clone-ssh').click().length === 0) {\n $('#repo-clone-https').click();\n }\n break;\n default:\n $('#repo-clone-https').click();\n break;\n }\n }\n\n const routes = {\n 'div.user.settings': initUserSettings,\n 'div.repository.settings.collaboration': initRepositoryCollaboration\n };\n\n let selector;\n for (selector in routes) {\n if ($(selector).length > 0) {\n routes[selector]();\n break;\n }\n }\n\n const $cloneAddr = $('#clone_addr');\n $cloneAddr.change(() => {\n const $repoName = $('#repo_name');\n if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank\n $repoName.val($cloneAddr.val().match(/^(.*\\/)?((.+?)(\\.git)?)$/)[3]);\n }\n });\n});\n\nfunction changeHash(hash) {\n if (window.history.pushState) {\n window.history.pushState(null, null, hash);\n } else {\n window.location.hash = hash;\n }\n}\n\nfunction deSelect() {\n if (window.getSelection) {\n window.getSelection().removeAllRanges();\n } else {\n document.selection.empty();\n }\n}\n\nfunction selectRange($list, $select, $from) {\n $list.removeClass('active');\n if ($from) {\n let a = parseInt($select.attr('rel').substr(1));\n let b = parseInt($from.attr('rel').substr(1));\n let c;\n if (a !== b) {\n if (a > b) {\n c = a;\n a = b;\n b = c;\n }\n const classes = [];\n for (let i = a; i <= b; i++) {\n classes.push(`.L${i}`);\n }\n $list.filter(classes.join(',')).addClass('active');\n changeHash(`#L${a}-L${b}`);\n return;\n }\n }\n $select.addClass('active');\n changeHash(`#${$select.attr('rel')}`);\n}\n\n$(() => {\n // Warn users that try to leave a page after entering data into a form.\n // Except on sign-in pages, and for forms marked as 'ignore-dirty'.\n if ($('.user.signin').length === 0) {\n $('form:not(.ignore-dirty)').areYouSure();\n }\n\n // Parse SSH Key\n $('#ssh-key-content').on('change paste keyup', function () {\n const arrays = $(this).val().split(' ');\n const $title = $('#ssh-key-title');\n if ($title.val() === '' && arrays.length === 3 && arrays[2] !== '') {\n $title.val(arrays[2]);\n }\n });\n});\n\nfunction showDeletePopup() {\n const $this = $(this);\n let filter = '';\n if ($this.attr('id')) {\n filter += `#${$this.attr('id')}`;\n }\n\n const dialog = $(`.delete.modal${filter}`);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove() {\n if ($this.data('type') === 'form') {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction showAddAllPopup() {\n const $this = $(this);\n let filter = '';\n if ($this.attr('id')) {\n filter += `#${$this.attr('id')}`;\n }\n\n const dialog = $(`.addall.modal${filter}`);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove() {\n if ($this.data('type') === 'form') {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction initVueComponents() {\n const vueDelimeters = ['${', '}'];\n\n Vue.component('repo-search', {\n delimiters: vueDelimeters,\n\n props: {\n searchLimit: {\n type: Number,\n default: 10\n },\n suburl: {\n type: String,\n required: true\n },\n uid: {\n type: Number,\n required: true\n },\n organizations: {\n type: Array,\n default: []\n },\n isOrganization: {\n type: Boolean,\n default: true\n },\n canCreateOrganization: {\n type: Boolean,\n default: false\n },\n organizationsTotalCount: {\n type: Number,\n default: 0\n },\n moreReposLink: {\n type: String,\n default: ''\n }\n },\n\n data() {\n return {\n tab: 'repos',\n repos: [],\n reposTotalCount: 0,\n reposFilter: 'all',\n searchQuery: '',\n isLoading: false,\n repoTypes: {\n all: {\n count: 0,\n searchMode: '',\n },\n forks: {\n count: 0,\n searchMode: 'fork',\n },\n mirrors: {\n count: 0,\n searchMode: 'mirror',\n },\n sources: {\n count: 0,\n searchMode: 'source',\n },\n collaborative: {\n count: 0,\n searchMode: 'collaborative',\n },\n }\n };\n },\n\n computed: {\n showMoreReposLink() {\n return this.repos.length > 0 && this.repos.length < this.repoTypes[this.reposFilter].count;\n },\n searchURL() {\n return `${this.suburl}/api/v1/repos/search?sort=updated&order=desc&uid=${this.uid}&q=${this.searchQuery\n }&limit=${this.searchLimit}&mode=${this.repoTypes[this.reposFilter].searchMode\n }${this.reposFilter !== 'all' ? '&exclusive=1' : ''}`;\n },\n repoTypeCount() {\n return this.repoTypes[this.reposFilter].count;\n }\n },\n\n mounted() {\n this.searchRepos(this.reposFilter);\n\n const self = this;\n Vue.nextTick(() => {\n self.$refs.search.focus();\n });\n },\n\n methods: {\n changeTab(t) {\n this.tab = t;\n },\n\n changeReposFilter(filter) {\n this.reposFilter = filter;\n this.repos = [];\n this.repoTypes[filter].count = 0;\n this.searchRepos(filter);\n },\n\n showRepo(repo, filter) {\n switch (filter) {\n case 'sources':\n return repo.owner.id === this.uid && !repo.mirror && !repo.fork;\n case 'forks':\n return repo.owner.id === this.uid && !repo.mirror && repo.fork;\n case 'mirrors':\n return repo.mirror;\n case 'collaborative':\n return repo.owner.id !== this.uid && !repo.mirror;\n default:\n return true;\n }\n },\n\n searchRepos(reposFilter) {\n const self = this;\n\n this.isLoading = true;\n\n const searchedMode = this.repoTypes[reposFilter].searchMode;\n const searchedURL = this.searchURL;\n const searchedQuery = this.searchQuery;\n\n $.getJSON(searchedURL, (result, _textStatus, request) => {\n if (searchedURL === self.searchURL) {\n self.repos = result.data;\n const count = request.getResponseHeader('X-Total-Count');\n if (searchedQuery === '' && searchedMode === '') {\n self.reposTotalCount = count;\n }\n self.repoTypes[reposFilter].count = count;\n }\n }).always(() => {\n if (searchedURL === self.searchURL) {\n self.isLoading = false;\n }\n });\n },\n\n repoClass(repo) {\n if (repo.fork) {\n return 'octicon octicon-repo-forked';\n } if (repo.mirror) {\n return 'octicon octicon-repo-clone';\n } if (repo.private) {\n return 'octicon octicon-lock';\n }\n return 'octicon octicon-repo';\n }\n }\n });\n}\n\nfunction initCtrlEnterSubmit() {\n $('.js-quick-submit').keydown(function (e) {\n if (((e.ctrlKey && !e.altKey) || e.metaKey) && (e.keyCode === 13 || e.keyCode === 10)) {\n $(this).closest('form').submit();\n }\n });\n}\n\nfunction initVueApp() {\n const el = document.getElementById('app');\n if (!el) {\n return;\n }\n\n initVueComponents();\n\n new Vue({\n delimiters: ['${', '}'],\n el,\n data: {\n searchLimit: document.querySelector('meta[name=_search_limit]').content,\n suburl: document.querySelector('meta[name=_suburl]').content,\n uid: document.querySelector('meta[name=_context_uid]').content,\n },\n });\n}\n\nwindow.timeAddManual = function () {\n $('.mini.modal')\n .modal({\n duration: 200,\n onApprove() {\n $('#add_time_manual_form').submit();\n }\n }).modal('show');\n};\n\nwindow.toggleStopwatch = function () {\n $('#toggle_stopwatch_form').submit();\n};\nwindow.cancelStopwatch = function () {\n $('#cancel_stopwatch_form').submit();\n};\n\nwindow.initHeatmap = function (appElementId, heatmapUser, locale) {\n const el = document.getElementById(appElementId);\n if (!el) {\n return;\n }\n\n locale = locale || {};\n\n locale.contributions = locale.contributions || 'contributions';\n locale.no_contributions = locale.no_contributions || 'No contributions';\n\n const vueDelimeters = ['${', '}'];\n\n Vue.component('activity-heatmap', {\n delimiters: vueDelimeters,\n\n props: {\n user: {\n type: String,\n required: true\n },\n suburl: {\n type: String,\n required: true\n },\n locale: {\n type: Object,\n required: true\n }\n },\n\n data() {\n return {\n isLoading: true,\n colorRange: [],\n endDate: null,\n values: [],\n totalContributions: 0,\n };\n },\n\n mounted() {\n this.colorRange = [\n this.getColor(0),\n this.getColor(1),\n this.getColor(2),\n this.getColor(3),\n this.getColor(4),\n this.getColor(5)\n ];\n this.endDate = new Date();\n this.loadHeatmap(this.user);\n },\n\n methods: {\n loadHeatmap(userName) {\n const self = this;\n $.get(`${this.suburl}/api/v1/users/${userName}/heatmap`, (chartRawData) => {\n const chartData = [];\n for (let i = 0; i < chartRawData.length; i++) {\n self.totalContributions += chartRawData[i].contributions;\n chartData[i] = { date: new Date(chartRawData[i].timestamp * 1000), count: chartRawData[i].contributions };\n }\n self.values = chartData;\n self.isLoading = false;\n });\n },\n\n getColor(idx) {\n const el = document.createElement('div');\n el.className = `heatmap-color-${idx}`;\n document.body.appendChild(el);\n\n const color = getComputedStyle(el).backgroundColor;\n\n document.body.removeChild(el);\n\n return color;\n }\n },\n\n template: '

total contributions in the last 12 months

'\n });\n\n new Vue({\n delimiters: vueDelimeters,\n el,\n\n data: {\n suburl: document.querySelector('meta[name=_suburl]').content,\n heatmapUser,\n locale\n },\n });\n};\n\nfunction initFilterBranchTagDropdown(selector) {\n $(selector).each(function () {\n const $dropdown = $(this);\n const $data = $dropdown.find('.data');\n const data = {\n items: [],\n mode: $data.data('mode'),\n searchTerm: '',\n noResults: '',\n canCreateBranch: false,\n menuVisible: false,\n active: 0\n };\n $data.find('.item').each(function () {\n data.items.push({\n name: $(this).text(),\n url: $(this).data('url'),\n branch: $(this).hasClass('branch'),\n tag: $(this).hasClass('tag'),\n selected: $(this).hasClass('selected')\n });\n });\n $data.remove();\n new Vue({\n delimiters: ['${', '}'],\n el: this,\n data,\n\n beforeMount() {\n const vm = this;\n\n this.noResults = vm.$el.getAttribute('data-no-results');\n this.canCreateBranch = vm.$el.getAttribute('data-can-create-branch') === 'true';\n\n document.body.addEventListener('click', (event) => {\n if (vm.$el.contains(event.target)) {\n return;\n }\n if (vm.menuVisible) {\n Vue.set(vm, 'menuVisible', false);\n }\n });\n },\n\n watch: {\n menuVisible(visible) {\n if (visible) {\n this.focusSearchField();\n }\n }\n },\n\n computed: {\n filteredItems() {\n const vm = this;\n\n const items = vm.items.filter((item) => {\n return ((vm.mode === 'branches' && item.branch) || (vm.mode === 'tags' && item.tag))\n && (!vm.searchTerm || item.name.toLowerCase().indexOf(vm.searchTerm.toLowerCase()) >= 0);\n });\n\n vm.active = (items.length === 0 && vm.showCreateNewBranch ? 0 : -1);\n\n return items;\n },\n showNoResults() {\n return this.filteredItems.length === 0 && !this.showCreateNewBranch;\n },\n showCreateNewBranch() {\n const vm = this;\n if (!this.canCreateBranch || !vm.searchTerm || vm.mode === 'tags') {\n return false;\n }\n\n return vm.items.filter((item) => item.name.toLowerCase() === vm.searchTerm.toLowerCase()).length === 0;\n }\n },\n\n methods: {\n selectItem(item) {\n const prev = this.getSelected();\n if (prev !== null) {\n prev.selected = false;\n }\n item.selected = true;\n window.location.href = item.url;\n },\n createNewBranch() {\n if (!this.showCreateNewBranch) {\n return;\n }\n this.$refs.newBranchForm.submit();\n },\n focusSearchField() {\n const vm = this;\n Vue.nextTick(() => {\n vm.$refs.searchField.focus();\n });\n },\n getSelected() {\n for (let i = 0, j = this.items.length; i < j; ++i) {\n if (this.items[i].selected) return this.items[i];\n }\n return null;\n },\n getSelectedIndexInFiltered() {\n for (let i = 0, j = this.filteredItems.length; i < j; ++i) {\n if (this.filteredItems[i].selected) return i;\n }\n return -1;\n },\n scrollToActive() {\n let el = this.$refs[`listItem${this.active}`];\n if (!el || el.length === 0) {\n return;\n }\n if (Array.isArray(el)) {\n el = el[0];\n }\n\n const cont = this.$refs.scrollContainer;\n\n if (el.offsetTop < cont.scrollTop) {\n cont.scrollTop = el.offsetTop;\n } else if (el.offsetTop + el.clientHeight > cont.scrollTop + cont.clientHeight) {\n cont.scrollTop = el.offsetTop + el.clientHeight - cont.clientHeight;\n }\n },\n keydown(event) {\n const vm = this;\n if (event.keyCode === 40) {\n // arrow down\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active + (vm.showCreateNewBranch ? 0 : 1) >= vm.filteredItems.length) {\n return;\n }\n vm.active++;\n vm.scrollToActive();\n }\n if (event.keyCode === 38) {\n // arrow up\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active <= 0) {\n return;\n }\n vm.active--;\n vm.scrollToActive();\n }\n if (event.keyCode === 13) {\n // enter\n event.preventDefault();\n\n if (vm.active >= vm.filteredItems.length) {\n vm.createNewBranch();\n } else if (vm.active >= 0) {\n vm.selectItem(vm.filteredItems[vm.active]);\n }\n }\n if (event.keyCode === 27) {\n // escape\n event.preventDefault();\n vm.menuVisible = false;\n }\n }\n }\n });\n });\n}\n\n$('.commit-button').click(function (e) {\n e.preventDefault();\n $(this).parent().find('.commit-body').toggle();\n});\n\nfunction initNavbarContentToggle() {\n const content = $('#navbar');\n const toggle = $('#navbar-expand-toggle');\n let isExpanded = false;\n toggle.click(() => {\n isExpanded = !isExpanded;\n if (isExpanded) {\n content.addClass('shown');\n toggle.addClass('active');\n } else {\n content.removeClass('shown');\n toggle.removeClass('active');\n }\n });\n}\n\nfunction initTopicbar() {\n const mgrBtn = $('#manage_topic');\n const editDiv = $('#topic_edit');\n const viewDiv = $('#repo-topics');\n const saveBtn = $('#save_topic');\n const topicDropdown = $('#topic_edit .dropdown');\n const topicForm = $('#topic_edit.ui.form');\n const topicPrompts = getPrompts();\n\n mgrBtn.click(() => {\n viewDiv.hide();\n editDiv.css('display', ''); // show Semantic UI Grid\n });\n\n function getPrompts() {\n const hidePrompt = $('div.hide#validate_prompt');\n const prompts = {\n countPrompt: hidePrompt.children('#count_prompt').text(),\n formatPrompt: hidePrompt.children('#format_prompt').text()\n };\n hidePrompt.remove();\n return prompts;\n }\n\n saveBtn.click(() => {\n const topics = $('input[name=topics]').val();\n\n $.post(saveBtn.data('link'), {\n _csrf: csrf,\n topics\n }, (_data, _textStatus, xhr) => {\n if (xhr.responseJSON.status === 'ok') {\n viewDiv.children('.topic').remove();\n if (topics.length) {\n const topicArray = topics.split(',');\n\n const last = viewDiv.children('a').last();\n for (let i = 0; i < topicArray.length; i++) {\n $(`
${topicArray[i]}
`).insertBefore(last);\n }\n }\n editDiv.css('display', 'none');\n viewDiv.show();\n }\n }).fail((xhr) => {\n if (xhr.status === 422) {\n if (xhr.responseJSON.invalidTopics.length > 0) {\n topicPrompts.formatPrompt = xhr.responseJSON.message;\n\n const { invalidTopics } = xhr.responseJSON;\n const topicLables = topicDropdown.children('a.ui.label');\n\n topics.split(',').forEach((value, index) => {\n for (let i = 0; i < invalidTopics.length; i++) {\n if (invalidTopics[i] === value) {\n topicLables.eq(index).removeClass('green').addClass('red');\n }\n }\n });\n } else {\n topicPrompts.countPrompt = xhr.responseJSON.message;\n }\n }\n }).always(() => {\n topicForm.form('validate form');\n });\n });\n\n topicDropdown.dropdown({\n allowAdditions: true,\n forceSelection: false,\n fields: { name: 'description', value: 'data-value' },\n saveRemoteData: false,\n label: {\n transition: 'horizontal flip',\n duration: 200,\n variation: false,\n blue: true,\n basic: true,\n },\n className: {\n label: 'ui small label'\n },\n apiSettings: {\n url: `${suburl}/api/v1/topics/search?q={query}`,\n throttle: 500,\n cache: false,\n onResponse(res) {\n const formattedResponse = {\n success: false,\n results: [],\n };\n const stripTags = function (text) {\n return text.replace(/<[^>]*>?/gm, '');\n };\n\n const query = stripTags(this.urlData.query.trim());\n let found_query = false;\n const current_topics = [];\n topicDropdown.find('div.label.visible.topic,a.label.visible').each((_, e) => { current_topics.push(e.dataset.value); });\n\n if (res.topics) {\n let found = false;\n for (let i = 0; i < res.topics.length; i++) {\n // skip currently added tags\n if (current_topics.indexOf(res.topics[i].topic_name) !== -1) {\n continue;\n }\n\n if (res.topics[i].topic_name.toLowerCase() === query.toLowerCase()) {\n found_query = true;\n }\n formattedResponse.results.push({ description: res.topics[i].topic_name, 'data-value': res.topics[i].topic_name });\n found = true;\n }\n formattedResponse.success = found;\n }\n\n if (query.length > 0 && !found_query) {\n formattedResponse.success = true;\n formattedResponse.results.unshift({ description: query, 'data-value': query });\n } else if (query.length > 0 && found_query) {\n formattedResponse.results.sort((a, b) => {\n if (a.description.toLowerCase() === query.toLowerCase()) return -1;\n if (b.description.toLowerCase() === query.toLowerCase()) return 1;\n if (a.description > b.description) return -1;\n if (a.description < b.description) return 1;\n return 0;\n });\n }\n\n\n return formattedResponse;\n },\n },\n onLabelCreate(value) {\n value = value.toLowerCase().trim();\n this.attr('data-value', value).contents().first().replaceWith(value);\n return $(this);\n },\n onAdd(addedValue, _addedText, $addedChoice) {\n addedValue = addedValue.toLowerCase().trim();\n $($addedChoice).attr('data-value', addedValue);\n $($addedChoice).attr('data-text', addedValue);\n }\n });\n\n $.fn.form.settings.rules.validateTopic = function (_values, regExp) {\n const topics = topicDropdown.children('a.ui.label');\n const status = topics.length === 0 || topics.last().attr('data-value').match(regExp);\n if (!status) {\n topics.last().removeClass('green').addClass('red');\n }\n return status && topicDropdown.children('a.ui.label.red').length === 0;\n };\n\n topicForm.form({\n on: 'change',\n inline: true,\n fields: {\n topics: {\n identifier: 'topics',\n rules: [\n {\n type: 'validateTopic',\n value: /^[a-z0-9][a-z0-9-]{1,35}$/,\n prompt: topicPrompts.formatPrompt\n },\n {\n type: 'maxCount[25]',\n prompt: topicPrompts.countPrompt\n }\n ]\n },\n }\n });\n}\n\nwindow.toggleDeadlineForm = function () {\n $('#deadlineForm').fadeToggle(150);\n};\n\nwindow.setDeadline = function () {\n const deadline = $('#deadlineDate').val();\n window.updateDeadline(deadline);\n};\n\nwindow.updateDeadline = function (deadlineString) {\n $('#deadline-err-invalid-date').hide();\n $('#deadline-loader').addClass('loading');\n\n let realDeadline = null;\n if (deadlineString !== '') {\n const newDate = Date.parse(deadlineString);\n\n if (Number.isNaN(newDate)) {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n return false;\n }\n realDeadline = new Date(newDate);\n }\n\n $.ajax(`${$('#update-issue-deadline-form').attr('action')}/deadline`, {\n data: JSON.stringify({\n due_date: realDeadline,\n }),\n headers: {\n 'X-Csrf-Token': csrf,\n 'X-Remote': true,\n },\n contentType: 'application/json',\n type: 'POST',\n success() {\n reload();\n },\n error() {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n }\n });\n};\n\nwindow.deleteDependencyModal = function (id, type) {\n $('.remove-dependency')\n .modal({\n closable: false,\n duration: 200,\n onApprove() {\n $('#removeDependencyID').val(id);\n $('#dependencyType').val(type);\n $('#removeDependencyForm').submit();\n }\n }).modal('show');\n};\n\nfunction initIssueList() {\n const repolink = $('#repolink').val();\n const repoId = $('#repoId').val();\n const crossRepoSearch = $('#crossRepoSearch').val();\n let issueSearchUrl = `${suburl}/api/v1/repos/${repolink}/issues?q={query}`;\n if (crossRepoSearch === 'true') {\n issueSearchUrl = `${suburl}/api/v1/repos/issues/search?q={query}&priority_repo_id=${repoId}`;\n }\n $('#new-dependency-drop-list')\n .dropdown({\n apiSettings: {\n url: issueSearchUrl,\n onResponse(response) {\n const filteredResponse = { success: true, results: [] };\n const currIssueId = $('#new-dependency-drop-list').data('issue-id');\n // Parse the response from the api to work with our dropdown\n $.each(response, (_i, issue) => {\n // Don't list current issue in the dependency list.\n if (issue.id === currIssueId) {\n return;\n }\n filteredResponse.results.push({\n name: `#${issue.number} ${htmlEncode(issue.title)\n }
${htmlEncode(issue.repository.full_name)}
`,\n value: issue.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n\n $('.menu a.label-filter-item').each(function () {\n $(this).click(function (e) {\n if (e.altKey) {\n e.preventDefault();\n\n const href = $(this).attr('href');\n const id = $(this).data('label-id');\n\n const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`;\n const newStr = 'labels=$1-$2$3&';\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n });\n });\n\n $('.menu .ui.dropdown.label-filter').keydown((e) => {\n if (e.altKey && e.keyCode === 13) {\n const selectedItems = $('.menu .ui.dropdown.label-filter .menu .item.selected');\n\n if (selectedItems.length > 0) {\n const item = $(selectedItems[0]);\n\n const href = item.attr('href');\n const id = item.data('label-id');\n\n const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`;\n const newStr = 'labels=$1-$2$3&';\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n }\n });\n}\nwindow.cancelCodeComment = function (btn) {\n const form = $(btn).closest('form');\n if (form.length > 0 && form.hasClass('comment-form')) {\n form.addClass('hide');\n form.parent().find('button.comment-form-reply').show();\n } else {\n form.closest('.comment-code-cloud').remove();\n }\n};\nwindow.onOAuthLoginClick = function () {\n const oauthLoader = $('#oauth2-login-loader');\n const oauthNav = $('#oauth2-login-navigator');\n\n oauthNav.hide();\n oauthLoader.removeClass('disabled');\n\n setTimeout(() => {\n // recover previous content to let user try again\n // usually redirection will be performed before this action\n oauthLoader.addClass('disabled');\n oauthNav.show();\n }, 5000);\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/web_src/js/index.js b/web_src/js/index.js index 2edd70c87..4e53494eb 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1,10 +1,9 @@ /* globals wipPrefixes, issuesTribute, emojiTribute */ /* exported timeAddManual, toggleStopwatch, cancelStopwatch, initHeatmap */ /* exported toggleDeadlineForm, setDeadline, updateDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */ -'use strict'; function htmlEncode(text) { - return jQuery('
').text(text).html() + return jQuery('
').text(text).html(); } let csrf; @@ -14,3411 +13,3264 @@ let simpleMDEditor; let codeMirrorEditor; // Disable Dropzone auto-discover because it's manually initialized -if (typeof(Dropzone) !== "undefined") { - Dropzone.autoDiscover = false; -} - -// Polyfill for IE9+ support (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) -if (!Array.from) { - Array.from = (function () { - const toStr = Object.prototype.toString; - const isCallable = function (fn) { - return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; - }; - const toInteger = function (value) { - const number = Number(value); - if (isNaN(number)) { return 0; } - if (number === 0 || !isFinite(number)) { return number; } - return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); - }; - const maxSafeInteger = Math.pow(2, 53) - 1; - const toLength = function (value) { - const len = toInteger(value); - return Math.min(Math.max(len, 0), maxSafeInteger); - }; - - // The length property of the from method is 1. - return function from(arrayLike/*, mapFn, thisArg */) { - // 1. Let C be the this value. - const C = this; - - // 2. Let items be ToObject(arrayLike). - const items = Object(arrayLike); - - // 3. ReturnIfAbrupt(items). - if (arrayLike == null) { - throw new TypeError("Array.from requires an array-like object - not null or undefined"); - } - - // 4. If mapfn is undefined, then let mapping be false. - const mapFn = arguments.length > 1 ? arguments[1] : void undefined; - let T; - if (typeof mapFn !== 'undefined') { - // 5. else - // 5. a If IsCallable(mapfn) is false, throw a TypeError exception. - if (!isCallable(mapFn)) { - throw new TypeError('Array.from: when provided, the second argument must be a function'); - } - - // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined. - if (arguments.length > 2) { - T = arguments[2]; - } - } - - // 10. Let lenValue be Get(items, "length"). - // 11. Let len be ToLength(lenValue). - const len = toLength(items.length); - - // 13. If IsConstructor(C) is true, then - // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len. - // 14. a. Else, Let A be ArrayCreate(len). - const A = isCallable(C) ? Object(new C(len)) : new Array(len); - - // 16. Let k be 0. - let k = 0; - // 17. Repeat, while k < len… (also steps a - h) - let kValue; - while (k < len) { - kValue = items[k]; - if (mapFn) { - A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); - } else { - A[k] = kValue; - } - k += 1; - } - // 18. Let putStatus be Put(A, "length", len, true). - A.length = len; - // 20. Return A. - return A; - }; - }()); -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign -if (typeof Object.assign != 'function') { - // Must be writable: true, enumerable: false, configurable: true - Object.defineProperty(Object, "assign", { - value: function assign(target, _varArgs) { // .length of function is 2 - 'use strict'; - if (target == null) { // TypeError if undefined or null - throw new TypeError('Cannot convert undefined or null to object'); - } - - const to = Object(target); - - for (let index = 1; index < arguments.length; index++) { - const nextSource = arguments[index]; - - if (nextSource != null) { // Skip over if undefined or null - for (const nextKey in nextSource) { - // Avoid bugs when hasOwnProperty is shadowed - if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { - to[nextKey] = nextSource[nextKey]; - } - } - } - } - return to; - }, - writable: true, - configurable: true - }); +if (typeof (Dropzone) !== 'undefined') { + Dropzone.autoDiscover = false; } function initCommentPreviewTab($form) { - const $tabMenu = $form.find('.tabular.menu'); - $tabMenu.find('.item').tab(); - $tabMenu.find('.item[data-tab="' + $tabMenu.data('preview') + '"]').click(function () { - const $this = $(this); - $.post($this.data('url'), { - "_csrf": csrf, - "mode": "gfm", - "context": $this.data('context'), - "text": $form.find('.tab.segment[data-tab="' + $tabMenu.data('write') + '"] textarea').val() - }, - function (data) { - const $previewPanel = $form.find('.tab.segment[data-tab="' + $tabMenu.data('preview') + '"]'); - $previewPanel.html(data); - emojify.run($previewPanel[0]); - $('pre code', $previewPanel[0]).each(function () { - hljs.highlightBlock(this); - }); - } - ); + const $tabMenu = $form.find('.tabular.menu'); + $tabMenu.find('.item').tab(); + $tabMenu.find(`.item[data-tab="${$tabMenu.data('preview')}"]`).click(function () { + const $this = $(this); + $.post($this.data('url'), { + _csrf: csrf, + mode: 'gfm', + context: $this.data('context'), + text: $form.find(`.tab.segment[data-tab="${$tabMenu.data('write')}"] textarea`).val() + }, (data) => { + const $previewPanel = $form.find(`.tab.segment[data-tab="${$tabMenu.data('preview')}"]`); + $previewPanel.html(data); + emojify.run($previewPanel[0]); + $('pre code', $previewPanel[0]).each(function () { + hljs.highlightBlock(this); + }); }); + }); - buttonsClickOnEnter(); + buttonsClickOnEnter(); } function initEditPreviewTab($form) { - const $tabMenu = $form.find('.tabular.menu'); - $tabMenu.find('.item').tab(); - const $previewTab = $tabMenu.find('.item[data-tab="' + $tabMenu.data('preview') + '"]'); - if ($previewTab.length) { - previewFileModes = $previewTab.data('preview-file-modes').split(','); - $previewTab.click(function () { - const $this = $(this); - $.post($this.data('url'), { - "_csrf": csrf, - "mode": "gfm", - "context": $this.data('context'), - "text": $form.find('.tab.segment[data-tab="' + $tabMenu.data('write') + '"] textarea').val() - }, - function (data) { - const $previewPanel = $form.find('.tab.segment[data-tab="' + $tabMenu.data('preview') + '"]'); - $previewPanel.html(data); - emojify.run($previewPanel[0]); - $('pre code', $previewPanel[0]).each(function () { - hljs.highlightBlock(this); - }); - } - ); + const $tabMenu = $form.find('.tabular.menu'); + $tabMenu.find('.item').tab(); + const $previewTab = $tabMenu.find(`.item[data-tab="${$tabMenu.data('preview')}"]`); + if ($previewTab.length) { + previewFileModes = $previewTab.data('preview-file-modes').split(','); + $previewTab.click(function () { + const $this = $(this); + $.post($this.data('url'), { + _csrf: csrf, + mode: 'gfm', + context: $this.data('context'), + text: $form.find(`.tab.segment[data-tab="${$tabMenu.data('write')}"] textarea`).val() + }, (data) => { + const $previewPanel = $form.find(`.tab.segment[data-tab="${$tabMenu.data('preview')}"]`); + $previewPanel.html(data); + emojify.run($previewPanel[0]); + $('pre code', $previewPanel[0]).each(function () { + hljs.highlightBlock(this); }); - } + }); + }); + } } function initEditDiffTab($form) { - const $tabMenu = $form.find('.tabular.menu'); - $tabMenu.find('.item').tab(); - $tabMenu.find('.item[data-tab="' + $tabMenu.data('diff') + '"]').click(function () { - const $this = $(this); - $.post($this.data('url'), { - "_csrf": csrf, - "context": $this.data('context'), - "content": $form.find('.tab.segment[data-tab="' + $tabMenu.data('write') + '"] textarea').val() - }, - function (data) { - const $diffPreviewPanel = $form.find('.tab.segment[data-tab="' + $tabMenu.data('diff') + '"]'); - $diffPreviewPanel.html(data); - emojify.run($diffPreviewPanel[0]); - } - ); + const $tabMenu = $form.find('.tabular.menu'); + $tabMenu.find('.item').tab(); + $tabMenu.find(`.item[data-tab="${$tabMenu.data('diff')}"]`).click(function () { + const $this = $(this); + $.post($this.data('url'), { + _csrf: csrf, + context: $this.data('context'), + content: $form.find(`.tab.segment[data-tab="${$tabMenu.data('write')}"] textarea`).val() + }, (data) => { + const $diffPreviewPanel = $form.find(`.tab.segment[data-tab="${$tabMenu.data('diff')}"]`); + $diffPreviewPanel.html(data); + emojify.run($diffPreviewPanel[0]); }); + }); } function initEditForm() { - if ($('.edit.form').length == 0) { - return; - } + if ($('.edit.form').length === 0) { + return; + } - initEditPreviewTab($('.edit.form')); - initEditDiffTab($('.edit.form')); + initEditPreviewTab($('.edit.form')); + initEditDiffTab($('.edit.form')); } function initBranchSelector() { - const $selectBranch = $('.ui.select-branch') - const $branchMenu = $selectBranch.find('.reference-list-menu'); - $branchMenu.find('.item:not(.no-select)').click(function () { - const selectedValue = $(this).data('id'); - $($(this).data('id-selector')).val(selectedValue); - $selectBranch.find('.ui .branch-name').text(selectedValue); - }); - $selectBranch.find('.reference.column').click(function () { - $selectBranch.find('.scrolling.reference-list-menu').css('display', 'none'); - $selectBranch.find('.reference .text').removeClass('black'); - $($(this).data('target')).css('display', 'block'); - $(this).find('.text').addClass('black'); - return false; - }); + const $selectBranch = $('.ui.select-branch'); + const $branchMenu = $selectBranch.find('.reference-list-menu'); + $branchMenu.find('.item:not(.no-select)').click(function () { + const selectedValue = $(this).data('id'); + $($(this).data('id-selector')).val(selectedValue); + $selectBranch.find('.ui .branch-name').text(selectedValue); + }); + $selectBranch.find('.reference.column').click(function () { + $selectBranch.find('.scrolling.reference-list-menu').css('display', 'none'); + $selectBranch.find('.reference .text').removeClass('black'); + $($(this).data('target')).css('display', 'block'); + $(this).find('.text').addClass('black'); + return false; + }); } function updateIssuesMeta(url, action, issueIds, elementId) { - return new Promise(function(resolve) { - $.ajax({ - type: "POST", - url: url, - data: { - "_csrf": csrf, - "action": action, - "issue_ids": issueIds, - "id": elementId - }, - success: resolve - }) - }) + return new Promise(((resolve) => { + $.ajax({ + type: 'POST', + url, + data: { + _csrf: csrf, + action, + issue_ids: issueIds, + id: elementId + }, + success: resolve + }); + })); } function initRepoStatusChecker() { - const migrating = $("#repo_migrating"); - $('#repo_migrating_failed').hide(); - if (migrating) { - const repo_name = migrating.attr('repo'); - if (typeof repo_name === 'undefined') { - return - } - $.ajax({ - type: "GET", - url: suburl +"/"+repo_name+"/status", - data: { - "_csrf": csrf, - }, - complete: function(xhr) { - if (xhr.status == 200) { - if (xhr.responseJSON) { - if (xhr.responseJSON["status"] == 0) { - location.reload(); - return - } - - setTimeout(function () { - initRepoStatusChecker() - }, 2000); - return - } - } - $('#repo_migrating_progress').hide(); - $('#repo_migrating_failed').show(); - } - }) + const migrating = $('#repo_migrating'); + $('#repo_migrating_failed').hide(); + if (migrating) { + const repo_name = migrating.attr('repo'); + if (typeof repo_name === 'undefined') { + return; } + $.ajax({ + type: 'GET', + url: `${suburl}/${repo_name}/status`, + data: { + _csrf: csrf, + }, + complete(xhr) { + if (xhr.status === 200) { + if (xhr.responseJSON) { + if (xhr.responseJSON.status === 0) { + window.location.reload(); + return; + } + + setTimeout(() => { + initRepoStatusChecker(); + }, 2000); + return; + } + } + $('#repo_migrating_progress').hide(); + $('#repo_migrating_failed').show(); + } + }); + } } function initReactionSelector(parent) { - let reactions = ''; - if (!parent) { - parent = $(document); - reactions = '.reactions > '; - } + let reactions = ''; + if (!parent) { + parent = $(document); + reactions = '.reactions > '; + } - parent.find(reactions + 'a.label').popup({'position': 'bottom left', 'metadata': {'content': 'title', 'title': 'none'}}); + parent.find(`${reactions}a.label`).popup({ position: 'bottom left', metadata: { content: 'title', title: 'none' } }); - parent.find('.select-reaction > .menu > .item, ' + reactions + 'a.label').on('click', function(e){ - const vm = this; - e.preventDefault(); + parent.find(`.select-reaction > .menu > .item, ${reactions}a.label`).on('click', function (e) { + const vm = this; + e.preventDefault(); - if ($(this).hasClass('disabled')) return; - - const actionURL = $(this).hasClass('item') ? - $(this).closest('.select-reaction').data('action-url') : - $(this).data('action-url'); - const url = actionURL + '/' + ($(this).hasClass('blue') ? 'unreact' : 'react'); - $.ajax({ - type: 'POST', - url: url, - data: { - '_csrf': csrf, - 'content': $(this).data('content') - } - }).done(function(resp) { - if (resp && (resp.html || resp.empty)) { - const content = $(vm).closest('.content'); - let react = content.find('.segment.reactions'); - if (!resp.empty && react.length > 0) { - react.remove(); - } - if (!resp.empty) { - react = $('
'); - const attachments = content.find('.segment.bottom:first'); - if (attachments.length > 0) { - react.insertBefore(attachments); - } else { - react.appendTo(content); - } - react.html(resp.html); - const hasEmoji = react.find('.has-emoji'); - for (let i = 0; i < hasEmoji.length; i++) { - emojify.run(hasEmoji.get(i)); - } - react.find('.dropdown').dropdown(); - initReactionSelector(react); - } - } - }); - }); + if ($(this).hasClass('disabled')) return; + + const actionURL = $(this).hasClass('item') + ? $(this).closest('.select-reaction').data('action-url') + : $(this).data('action-url'); + const url = `${actionURL}/${$(this).hasClass('blue') ? 'unreact' : 'react'}`; + $.ajax({ + type: 'POST', + url, + data: { + _csrf: csrf, + content: $(this).data('content') + } + }).done((resp) => { + if (resp && (resp.html || resp.empty)) { + const content = $(vm).closest('.content'); + let react = content.find('.segment.reactions'); + if (!resp.empty && react.length > 0) { + react.remove(); + } + if (!resp.empty) { + react = $('
'); + const attachments = content.find('.segment.bottom:first'); + if (attachments.length > 0) { + react.insertBefore(attachments); + } else { + react.appendTo(content); + } + react.html(resp.html); + const hasEmoji = react.find('.has-emoji'); + for (let i = 0; i < hasEmoji.length; i++) { + emojify.run(hasEmoji.get(i)); + } + react.find('.dropdown').dropdown(); + initReactionSelector(react); + } + } + }); + }); } function insertAtCursor(field, value) { - if (field.selectionStart || field.selectionStart === 0) { - const startPos = field.selectionStart; - const endPos = field.selectionEnd; - field.value = field.value.substring(0, startPos) + if (field.selectionStart || field.selectionStart === 0) { + const startPos = field.selectionStart; + const endPos = field.selectionEnd; + field.value = field.value.substring(0, startPos) + value + field.value.substring(endPos, field.value.length); - field.selectionStart = startPos + value.length; - field.selectionEnd = startPos + value.length; - } else { - field.value += value; - } + field.selectionStart = startPos + value.length; + field.selectionEnd = startPos + value.length; + } else { + field.value += value; + } } function replaceAndKeepCursor(field, oldval, newval) { - if (field.selectionStart || field.selectionStart === 0) { - const startPos = field.selectionStart; - const endPos = field.selectionEnd; - field.value = field.value.replace(oldval, newval); - field.selectionStart = startPos + newval.length - oldval.length; - field.selectionEnd = endPos + newval.length - oldval.length; - } else { - field.value = field.value.replace(oldval, newval); - } + if (field.selectionStart || field.selectionStart === 0) { + const startPos = field.selectionStart; + const endPos = field.selectionEnd; + field.value = field.value.replace(oldval, newval); + field.selectionStart = startPos + newval.length - oldval.length; + field.selectionEnd = endPos + newval.length - oldval.length; + } else { + field.value = field.value.replace(oldval, newval); + } } -function retrieveImageFromClipboardAsBlob(pasteEvent, callback){ - if (!pasteEvent.clipboardData) { - return; - } +function retrieveImageFromClipboardAsBlob(pasteEvent, callback) { + if (!pasteEvent.clipboardData) { + return; + } - const items = pasteEvent.clipboardData.items; - if (typeof(items) === "undefined") { - return; - } + const { items } = pasteEvent.clipboardData; + if (typeof items === 'undefined') { + return; + } - for (let i = 0; i < items.length; i++) { - if (items[i].type.indexOf("image") === -1) continue; - const blob = items[i].getAsFile(); + for (let i = 0; i < items.length; i++) { + if (items[i].type.indexOf('image') === -1) continue; + const blob = items[i].getAsFile(); - if (typeof(callback) === "function") { - pasteEvent.preventDefault(); - pasteEvent.stopPropagation(); - callback(blob); - } + if (typeof (callback) === 'function') { + pasteEvent.preventDefault(); + pasteEvent.stopPropagation(); + callback(blob); } + } } function uploadFile(file, callback) { - const xhr = new XMLHttpRequest(); + const xhr = new XMLHttpRequest(); - xhr.onload = function() { - if (xhr.status == 200) { - callback(xhr.responseText); - } - }; + xhr.onload = function () { + if (xhr.status === 200) { + callback(xhr.responseText); + } + }; - xhr.open("post", suburl + "/attachments", true); - xhr.setRequestHeader("X-Csrf-Token", csrf); - const formData = new FormData(); - formData.append('file', file, file.name); - xhr.send(formData); + xhr.open('post', `${suburl}/attachments`, true); + xhr.setRequestHeader('X-Csrf-Token', csrf); + const formData = new FormData(); + formData.append('file', file, file.name); + xhr.send(formData); } function reload() { - window.location.reload(); + window.location.reload(); } function initImagePaste(target) { - target.each(function() { - const field = this; - field.addEventListener('paste', function(event){ - retrieveImageFromClipboardAsBlob(event, function(img) { - const name = img.name.substr(0, img.name.lastIndexOf('.')); - insertAtCursor(field, '![' + name + ']()'); - uploadFile(img, function(res) { - const data = JSON.parse(res); - replaceAndKeepCursor(field, '![' + name + ']()', '![' + name + '](' + suburl + '/attachments/' + data.uuid + ')'); - const input = $('').val(data.uuid); - $('.files').append(input); - }); - }); - }, false); - }); + target.each(function () { + const field = this; + field.addEventListener('paste', (event) => { + retrieveImageFromClipboardAsBlob(event, (img) => { + const name = img.name.substr(0, img.name.lastIndexOf('.')); + insertAtCursor(field, `![${name}]()`); + uploadFile(img, (res) => { + const data = JSON.parse(res); + replaceAndKeepCursor(field, `![${name}]()`, `![${name}](${suburl}/attachments/${data.uuid})`); + const input = $(``).val(data.uuid); + $('.files').append(input); + }); + }); + }, false); + }); } function initCommentForm() { - if ($('.comment.form').length == 0) { - return - } - - initBranchSelector(); - initCommentPreviewTab($('.comment.form')); - initImagePaste($('.comment.form textarea')); - - // Listsubmit - function initListSubmits(selector, outerSelector) { - const $list = $('.ui.' + outerSelector + '.list'); - const $noSelect = $list.find('.no-select'); - const $listMenu = $('.' + selector + ' .menu'); - let hasLabelUpdateAction = $listMenu.data('action') == 'update'; - const labels = {}; - - $('.' + selector).dropdown('setting', 'onHide', function(){ - hasLabelUpdateAction = $listMenu.data('action') == 'update'; // Update the var - if (hasLabelUpdateAction) { - const promises = []; - Object.keys(labels).forEach(function(elementId) { - const label = labels[elementId]; - const promise = updateIssuesMeta( - label["update-url"], - label["action"], - label["issue-id"], - elementId - ); - promises.push(promise); - }); - Promise.all(promises).then(reload); - } + if ($('.comment.form').length === 0) { + return; + } + + initBranchSelector(); + initCommentPreviewTab($('.comment.form')); + initImagePaste($('.comment.form textarea')); + + // Listsubmit + function initListSubmits(selector, outerSelector) { + const $list = $(`.ui.${outerSelector}.list`); + const $noSelect = $list.find('.no-select'); + const $listMenu = $(`.${selector} .menu`); + let hasLabelUpdateAction = $listMenu.data('action') === 'update'; + const labels = {}; + + $(`.${selector}`).dropdown('setting', 'onHide', () => { + hasLabelUpdateAction = $listMenu.data('action') === 'update'; // Update the var + if (hasLabelUpdateAction) { + const promises = []; + Object.keys(labels).forEach((elementId) => { + const label = labels[elementId]; + const promise = updateIssuesMeta( + label['update-url'], + label.action, + label['issue-id'], + elementId + ); + promises.push(promise); }); + Promise.all(promises).then(reload); + } + }); + + $listMenu.find('.item:not(.no-select)').click(function () { + // we don't need the action attribute when updating assignees + if (selector === 'select-assignees-modify') { + // UI magic. We need to do this here, otherwise it would destroy the functionality of + // adding/removing labels + if ($(this).hasClass('checked')) { + $(this).removeClass('checked'); + $(this).find('.octicon').removeClass('octicon-check'); + } else { + $(this).addClass('checked'); + $(this).find('.octicon').addClass('octicon-check'); + } - $listMenu.find('.item:not(.no-select)').click(function () { + updateIssuesMeta( + $listMenu.data('update-url'), + '', + $listMenu.data('issue-id'), + $(this).data('id') + ); + $listMenu.data('action', 'update'); // Update to reload the page when we updated items + return false; + } + + if ($(this).hasClass('checked')) { + $(this).removeClass('checked'); + $(this).find('.octicon').removeClass('octicon-check'); + if (hasLabelUpdateAction) { + if (!($(this).data('id') in labels)) { + labels[$(this).data('id')] = { + 'update-url': $listMenu.data('update-url'), + action: 'detach', + 'issue-id': $listMenu.data('issue-id'), + }; + } else { + delete labels[$(this).data('id')]; + } + } + } else { + $(this).addClass('checked'); + $(this).find('.octicon').addClass('octicon-check'); + if (hasLabelUpdateAction) { + if (!($(this).data('id') in labels)) { + labels[$(this).data('id')] = { + 'update-url': $listMenu.data('update-url'), + action: 'attach', + 'issue-id': $listMenu.data('issue-id'), + }; + } else { + delete labels[$(this).data('id')]; + } + } + } - // we don't need the action attribute when updating assignees - if (selector == 'select-assignees-modify') { + const listIds = []; + $(this).parent().find('.item').each(function () { + if ($(this).hasClass('checked')) { + listIds.push($(this).data('id')); + $($(this).data('id-selector')).removeClass('hide'); + } else { + $($(this).data('id-selector')).addClass('hide'); + } + }); + if (listIds.length === 0) { + $noSelect.removeClass('hide'); + } else { + $noSelect.addClass('hide'); + } + $($(this).parent().data('id')).val(listIds.join(',')); + return false; + }); + $listMenu.find('.no-select.item').click(function () { + if (hasLabelUpdateAction || selector === 'select-assignees-modify') { + updateIssuesMeta( + $listMenu.data('update-url'), + 'clear', + $listMenu.data('issue-id'), + '' + ).then(reload); + } + + $(this).parent().find('.item').each(function () { + $(this).removeClass('checked'); + $(this).find('.octicon').removeClass('octicon-check'); + }); + + $list.find('.item').each(function () { + $(this).addClass('hide'); + }); + $noSelect.removeClass('hide'); + $($(this).parent().data('id')).val(''); + }); + } + + // Init labels and assignees + initListSubmits('select-label', 'labels'); + initListSubmits('select-assignees', 'assignees'); + initListSubmits('select-assignees-modify', 'assignees'); + + function selectItem(select_id, input_id) { + const $menu = $(`${select_id} .menu`); + const $list = $(`.ui${select_id}.list`); + const hasUpdateAction = $menu.data('action') === 'update'; + + $menu.find('.item:not(.no-select)').click(function () { + $(this).parent().find('.item').each(function () { + $(this).removeClass('selected active'); + }); + + $(this).addClass('selected active'); + if (hasUpdateAction) { + updateIssuesMeta( + $menu.data('update-url'), + '', + $menu.data('issue-id'), + $(this).data('id') + ).then(reload); + } + switch (input_id) { + case '#milestone_id': + $list.find('.selected').html(`${ + htmlEncode($(this).text())}`); + break; + case '#assignee_id': + $list.find('.selected').html(`` + + `${ + htmlEncode($(this).text())}`); + } + $(`.ui${select_id}.list .no-select`).addClass('hide'); + $(input_id).val($(this).data('id')); + }); + $menu.find('.no-select.item').click(function () { + $(this).parent().find('.item:not(.no-select)').each(function () { + $(this).removeClass('selected active'); + }); + + if (hasUpdateAction) { + updateIssuesMeta( + $menu.data('update-url'), + '', + $menu.data('issue-id'), + $(this).data('id') + ).then(reload); + } + + $list.find('.selected').html(''); + $list.find('.no-select').removeClass('hide'); + $(input_id).val(''); + }); + } + + // Milestone and assignee + selectItem('.select-milestone', '#milestone_id'); + selectItem('.select-assignee', '#assignee_id'); +} - // UI magic. We need to do this here, otherwise it would destroy the functionality of - // adding/removing labels - if ($(this).hasClass('checked')) { - $(this).removeClass('checked'); - $(this).find('.octicon').removeClass('octicon-check'); - } else { - $(this).addClass('checked'); - $(this).find('.octicon').addClass('octicon-check'); - } +function initInstall() { + if ($('.install').length === 0) { + return; + } + + if ($('#db_host').val() === '') { + $('#db_host').val('127.0.0.1:3306'); + $('#db_user').val('gitea'); + $('#db_name').val('gitea'); + } + + // Database type change detection. + $('#db_type').change(function () { + const sqliteDefault = 'data/gitea.db'; + const tidbDefault = 'data/gitea_tidb'; + + const dbType = $(this).val(); + if (dbType === 'SQLite3') { + $('#sql_settings').hide(); + $('#pgsql_settings').hide(); + $('#mysql_settings').hide(); + $('#sqlite_settings').show(); + + if (dbType === 'SQLite3' && $('#db_path').val() === tidbDefault) { + $('#db_path').val(sqliteDefault); + } + return; + } + + const dbDefaults = { + MySQL: '127.0.0.1:3306', + PostgreSQL: '127.0.0.1:5432', + MSSQL: '127.0.0.1:1433' + }; - updateIssuesMeta( - $listMenu.data('update-url'), - "", - $listMenu.data('issue-id'), - $(this).data('id') - ); - $listMenu.data('action', 'update'); // Update to reload the page when we updated items - return false; - } + $('#sqlite_settings').hide(); + $('#sql_settings').show(); - if ($(this).hasClass('checked')) { - $(this).removeClass('checked'); - $(this).find('.octicon').removeClass('octicon-check'); - if (hasLabelUpdateAction) { - if (!($(this).data('id') in labels)) { - labels[$(this).data('id')] = { - "update-url": $listMenu.data('update-url'), - "action": "detach", - "issue-id": $listMenu.data('issue-id'), - }; - } else { - delete labels[$(this).data('id')]; - } - } - } else { - $(this).addClass('checked'); - $(this).find('.octicon').addClass('octicon-check'); - if (hasLabelUpdateAction) { - if (!($(this).data('id') in labels)) { - labels[$(this).data('id')] = { - "update-url": $listMenu.data('update-url'), - "action": "attach", - "issue-id": $listMenu.data('issue-id'), - }; - } else { - delete labels[$(this).data('id')]; - } - } - } + $('#pgsql_settings').toggle(dbType === 'PostgreSQL'); + $('#mysql_settings').toggle(dbType === 'MySQL'); + $.each(dbDefaults, (_type, defaultHost) => { + if ($('#db_host').val() === defaultHost) { + $('#db_host').val(dbDefaults[dbType]); + return false; + } + }); + }); + + // TODO: better handling of exclusive relations. + $('#offline-mode input').change(function () { + if ($(this).is(':checked')) { + $('#disable-gravatar').checkbox('check'); + $('#federated-avatar-lookup').checkbox('uncheck'); + } + }); + $('#disable-gravatar input').change(function () { + if ($(this).is(':checked')) { + $('#federated-avatar-lookup').checkbox('uncheck'); + } else { + $('#offline-mode').checkbox('uncheck'); + } + }); + $('#federated-avatar-lookup input').change(function () { + if ($(this).is(':checked')) { + $('#disable-gravatar').checkbox('uncheck'); + $('#offline-mode').checkbox('uncheck'); + } + }); + $('#enable-openid-signin input').change(function () { + if ($(this).is(':checked')) { + if (!$('#disable-registration input').is(':checked')) { + $('#enable-openid-signup').checkbox('check'); + } + } else { + $('#enable-openid-signup').checkbox('uncheck'); + } + }); + $('#disable-registration input').change(function () { + if ($(this).is(':checked')) { + $('#enable-captcha').checkbox('uncheck'); + $('#enable-openid-signup').checkbox('uncheck'); + } else { + $('#enable-openid-signup').checkbox('check'); + } + }); + $('#enable-captcha input').change(function () { + if ($(this).is(':checked')) { + $('#disable-registration').checkbox('uncheck'); + } + }); +} - const listIds = []; - $(this).parent().find('.item').each(function () { - if ($(this).hasClass('checked')) { - listIds.push($(this).data('id')); - $($(this).data('id-selector')).removeClass('hide'); - } else { - $($(this).data('id-selector')).addClass('hide'); +function initRepository() { + if ($('.repository').length === 0) { + return; + } + + function initFilterSearchDropdown(selector) { + const $dropdown = $(selector); + $dropdown.dropdown({ + fullTextSearch: true, + selectOnKeydown: false, + onChange(_text, _value, $choice) { + if ($choice.data('url')) { + window.location.href = $choice.data('url'); + } + }, + message: { noResults: $dropdown.data('no-results') } + }); + } + + // File list and commits + if ($('.repository.file.list').length > 0 || ('.repository.commits').length > 0) { + initFilterBranchTagDropdown('.choose.reference .dropdown'); + } + + // Wiki + if ($('.repository.wiki.view').length > 0) { + initFilterSearchDropdown('.choose.page .dropdown'); + } + + // Options + if ($('.repository.settings.options').length > 0) { + $('#repo_name').keyup(function () { + const $prompt = $('#repo-name-change-prompt'); + if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) { + $prompt.show(); + } else { + $prompt.hide(); + } + }); + + // Enable or select internal/external wiki system and issue tracker. + $('.enable-system').change(function () { + if (this.checked) { + $($(this).data('target')).removeClass('disabled'); + if (!$(this).data('context')) $($(this).data('context')).addClass('disabled'); + } else { + $($(this).data('target')).addClass('disabled'); + if (!$(this).data('context')) $($(this).data('context')).removeClass('disabled'); + } + }); + $('.enable-system-radio').change(function () { + if (this.value === 'false') { + $($(this).data('target')).addClass('disabled'); + if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled'); + } else if (this.value === 'true') { + $($(this).data('target')).removeClass('disabled'); + if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled'); + } + }); + } + + // Labels + if ($('.repository.labels').length > 0) { + // Create label + const $newLabelPanel = $('.new-label.segment'); + $('.new-label.button').click(() => { + $newLabelPanel.show(); + }); + $('.new-label.segment .cancel').click(() => { + $newLabelPanel.hide(); + }); + + $('.color-picker').each(function () { + $(this).minicolors(); + }); + $('.precolors .color').click(function () { + const color_hex = $(this).data('color-hex'); + $('.color-picker').val(color_hex); + $('.minicolors-swatch-color').css('background-color', color_hex); + }); + $('.edit-label-button').click(function () { + $('#label-modal-id').val($(this).data('id')); + $('.edit-label .new-label-input').val($(this).data('title')); + $('.edit-label .new-label-desc-input').val($(this).data('description')); + $('.edit-label .color-picker').val($(this).data('color')); + $('.minicolors-swatch-color').css('background-color', $(this).data('color')); + $('.edit-label.modal').modal({ + onApprove() { + $('.edit-label.form').submit(); + } + }).modal('show'); + return false; + }); + } + + // Milestones + if ($('.repository.new.milestone').length > 0) { + const $datepicker = $('.milestone.datepicker'); + $datepicker.datetimepicker({ + lang: $datepicker.data('lang'), + inline: true, + timepicker: false, + startDate: $datepicker.data('start-date'), + formatDate: 'Y-m-d', + onSelectDate(ct) { + $('#deadline').val(ct.dateFormat('Y-m-d')); + } + }); + $('#clear-date').click(() => { + $('#deadline').val(''); + return false; + }); + } + + // Issues + if ($('.repository.view.issue').length > 0) { + // Edit issue title + const $issueTitle = $('#issue-title'); + const $editInput = $('#edit-title-input input'); + const editTitleToggle = function () { + $issueTitle.toggle(); + $('.not-in-edit').toggle(); + $('#edit-title-input').toggle(); + $('.in-edit').toggle(); + $editInput.focus(); + return false; + }; + $('#edit-title').click(editTitleToggle); + $('#cancel-edit-title').click(editTitleToggle); + $('#save-edit-title').click(editTitleToggle).click(function () { + if ($editInput.val().length === 0 || $editInput.val() === $issueTitle.text()) { + $editInput.val($issueTitle.text()); + return false; + } + + $.post($(this).data('update-url'), { + _csrf: csrf, + title: $editInput.val() + }, + (data) => { + $editInput.val(data.title); + $issueTitle.text(data.title); + reload(); + }); + return false; + }); + + // Edit issue or comment content + $('.edit-content').click(function () { + const $segment = $(this).parent().parent().parent() + .next(); + const $editContentZone = $segment.find('.edit-content-zone'); + const $renderContent = $segment.find('.render-content'); + const $rawContent = $segment.find('.raw-content'); + let $textarea; + + // Setup new form + if ($editContentZone.html().length === 0) { + $editContentZone.html($('#edit-content-form').html()); + $textarea = $editContentZone.find('textarea'); + issuesTribute.attach($textarea.get()); + emojiTribute.attach($textarea.get()); + + const $dropzone = $editContentZone.find('.dropzone'); + $dropzone.data('saved', false); + const $files = $editContentZone.find('.comment-files'); + if ($dropzone.length > 0) { + const filenameDict = {}; + $dropzone.dropzone({ + url: $dropzone.data('upload-url'), + headers: { 'X-Csrf-Token': csrf }, + maxFiles: $dropzone.data('max-file'), + maxFilesize: $dropzone.data('max-size'), + acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'), + addRemoveLinks: true, + dictDefaultMessage: $dropzone.data('default-message'), + dictInvalidFileType: $dropzone.data('invalid-input-type'), + dictFileTooBig: $dropzone.data('file-too-big'), + dictRemoveFile: $dropzone.data('remove-file'), + init() { + this.on('success', (file, data) => { + filenameDict[file.name] = { + uuid: data.uuid, + submitted: false + }; + const input = $(``).val(data.uuid); + $files.append(input); + }); + this.on('removedfile', (file) => { + if (!(file.name in filenameDict)) { + return; } - }); - if (listIds.length == 0) { - $noSelect.removeClass('hide'); + $(`#${filenameDict[file.name].uuid}`).remove(); + if ($dropzone.data('remove-url') && $dropzone.data('csrf') && !filenameDict[file.name].submitted) { + $.post($dropzone.data('remove-url'), { + file: filenameDict[file.name].uuid, + _csrf: $dropzone.data('csrf') + }); + } + }); + this.on('submit', () => { + $.each(filenameDict, (name) => { + filenameDict[name].submitted = true; + }); + }); + this.on('reload', () => { + $.getJSON($editContentZone.data('attachment-url'), (data) => { + const drop = $dropzone.get(0).dropzone; + drop.removeAllFiles(true); + $files.empty(); + $.each(data, function () { + const imgSrc = `${$dropzone.data('upload-url')}/${this.uuid}`; + drop.emit('addedfile', this); + drop.emit('thumbnail', this, imgSrc); + drop.emit('complete', this); + drop.files.push(this); + filenameDict[this.name] = { + submitted: true, + uuid: this.uuid + }; + $dropzone.find(`img[src='${imgSrc}']`).css('max-width', '100%'); + const input = $(``).val(this.uuid); + $files.append(input); + }); + }); + }); + } + }); + $dropzone.get(0).dropzone.emit('reload'); + } + // Give new write/preview data-tab name to distinguish from others + const $editContentForm = $editContentZone.find('.ui.comment.form'); + const $tabMenu = $editContentForm.find('.tabular.menu'); + $tabMenu.attr('data-write', $editContentZone.data('write')); + $tabMenu.attr('data-preview', $editContentZone.data('preview')); + $tabMenu.find('.write.item').attr('data-tab', $editContentZone.data('write')); + $tabMenu.find('.preview.item').attr('data-tab', $editContentZone.data('preview')); + $editContentForm.find('.write.segment').attr('data-tab', $editContentZone.data('write')); + $editContentForm.find('.preview.segment').attr('data-tab', $editContentZone.data('preview')); + + initCommentPreviewTab($editContentForm); + + $editContentZone.find('.cancel.button').click(() => { + $renderContent.show(); + $editContentZone.hide(); + $dropzone.get(0).dropzone.emit('reload'); + }); + $editContentZone.find('.save.button').click(() => { + $renderContent.show(); + $editContentZone.hide(); + const $attachments = $files.find('[name=files]').map(function () { + return $(this).val(); + }).get(); + $.post($editContentZone.data('update-url'), { + _csrf: csrf, + content: $textarea.val(), + context: $editContentZone.data('context'), + files: $attachments + }, (data) => { + if (data.length === 0) { + $renderContent.html($('#no-content').html()); + } else { + $renderContent.html(data.content); + emojify.run($renderContent[0]); + $('pre code', $renderContent[0]).each(function () { + hljs.highlightBlock(this); + }); + } + const $content = $segment.parent(); + if (!$content.find('.ui.small.images').length) { + if (data.attachments !== '') { + $content.append( + '
' + ); + $content.find('.ui.small.images').html(data.attachments); + } + } else if (data.attachments === '') { + $content.find('.ui.small.images').parent().remove(); } else { - $noSelect.addClass('hide'); + $content.find('.ui.small.images').html(data.attachments); } - $($(this).parent().data('id')).val(listIds.join(",")); - return false; + $dropzone.get(0).dropzone.emit('submit'); + $dropzone.get(0).dropzone.emit('reload'); + }); }); - $listMenu.find('.no-select.item').click(function () { - if (hasLabelUpdateAction || selector == 'select-assignees-modify') { - updateIssuesMeta( - $listMenu.data('update-url'), - "clear", - $listMenu.data('issue-id'), - "" - ).then(reload); - } - - $(this).parent().find('.item').each(function () { - $(this).removeClass('checked'); - $(this).find('.octicon').removeClass('octicon-check'); - }); - - $list.find('.item').each(function () { - $(this).addClass('hide'); - }); - $noSelect.removeClass('hide'); - $($(this).parent().data('id')).val(''); - + } else { + $textarea = $segment.find('textarea'); + } + + // Show write/preview tab and copy raw content as needed + $editContentZone.show(); + $renderContent.hide(); + if ($textarea.val().length === 0) { + $textarea.val($rawContent.text()); + } + $textarea.focus(); + return false; + }); + + // Delete comment + $('.delete-comment').click(function () { + const $this = $(this); + if (window.confirm($this.data('locale'))) { + $.post($this.data('url'), { + _csrf: csrf + }).success(() => { + $(`#${$this.data('comment-id')}`).remove(); }); + } + return false; + }); + + // Change status + const $statusButton = $('#status-button'); + $('#comment-form .edit_area').keyup(function () { + if ($(this).val().length === 0) { + $statusButton.text($statusButton.data('status')); + } else { + $statusButton.text($statusButton.data('status-and-comment')); + } + }); + $statusButton.click(() => { + $('#status').val($statusButton.data('status-val')); + $('#comment-form').submit(); + }); + + // Pull Request merge button + const $mergeButton = $('.merge-button > button'); + $mergeButton.on('click', function (e) { + e.preventDefault(); + $(`.${$(this).data('do')}-fields`).show(); + $(this).parent().hide(); + }); + $('.merge-button > .dropdown').dropdown({ + onChange(_text, _value, $choice) { + if ($choice.data('do')) { + $mergeButton.find('.button-text').text($choice.text()); + $mergeButton.data('do', $choice.data('do')); + } + } + }); + $('.merge-cancel').on('click', function (e) { + e.preventDefault(); + $(this).closest('.form').hide(); + $mergeButton.parent().show(); + }); + + initReactionSelector(); + } + + // Diff + if ($('.repository.diff').length > 0) { + $('.diff-counter').each(function () { + const $item = $(this); + const addLine = $item.find('span[data-line].add').data('line'); + const delLine = $item.find('span[data-line].del').data('line'); + const addPercent = parseFloat(addLine) / (parseFloat(addLine) + parseFloat(delLine)) * 100; + $item.find('.bar .add').css('width', `${addPercent}%`); + }); + } + + // Quick start and repository home + $('#repo-clone-ssh').click(function () { + $('.clone-url').text($(this).data('link')); + $('#repo-clone-url').val($(this).data('link')); + $(this).addClass('blue'); + $('#repo-clone-https').removeClass('blue'); + localStorage.setItem('repo-clone-protocol', 'ssh'); + }); + $('#repo-clone-https').click(function () { + $('.clone-url').text($(this).data('link')); + $('#repo-clone-url').val($(this).data('link')); + $(this).addClass('blue'); + $('#repo-clone-ssh').removeClass('blue'); + localStorage.setItem('repo-clone-protocol', 'https'); + }); + $('#repo-clone-url').click(function () { + $(this).select(); + }); + + // Pull request + const $repoComparePull = $('.repository.compare.pull'); + if ($repoComparePull.length > 0) { + initFilterSearchDropdown('.choose.branch .dropdown'); + // show pull request form + $repoComparePull.find('button.show-form').on('click', function (e) { + e.preventDefault(); + $repoComparePull.find('.pullrequest-form').show(); + $(this).parent().hide(); + }); + } + + // Branches + if ($('.repository.settings.branches').length > 0) { + initFilterSearchDropdown('.protected-branches .dropdown'); + $('.enable-protection, .enable-whitelist').change(function () { + if (this.checked) { + $($(this).data('target')).removeClass('disabled'); + } else { + $($(this).data('target')).addClass('disabled'); + } + }); + } +} + +function initMigration() { + const toggleMigrations = function () { + const authUserName = $('#auth_username').val(); + const cloneAddr = $('#clone_addr').val(); + if (!$('#mirror').is(':checked') && (authUserName && authUserName.length > 0) + && (cloneAddr !== undefined && (cloneAddr.startsWith('https://github.com') || cloneAddr.startsWith('http://github.com')))) { + $('#migrate_items').show(); + } else { + $('#migrate_items').hide(); } + }; - // Init labels and assignees - initListSubmits('select-label', 'labels'); - initListSubmits('select-assignees', 'assignees'); - initListSubmits('select-assignees-modify', 'assignees'); + toggleMigrations(); - function selectItem(select_id, input_id) { - const $menu = $(select_id + ' .menu'); - const $list = $('.ui' + select_id + '.list'); - const hasUpdateAction = $menu.data('action') == 'update'; + $('#clone_addr').on('input', toggleMigrations); + $('#auth_username').on('input', toggleMigrations); + $('#mirror').on('change', toggleMigrations); +} - $menu.find('.item:not(.no-select)').click(function () { - $(this).parent().find('.item').each(function () { - $(this).removeClass('selected active') - }); +function initPullRequestReview() { + $('.show-outdated').on('click', function (e) { + e.preventDefault(); + const id = $(this).data('comment'); + $(this).addClass('hide'); + $(`#code-comments-${id}`).removeClass('hide'); + $(`#code-preview-${id}`).removeClass('hide'); + $(`#hide-outdated-${id}`).removeClass('hide'); + }); + + $('.hide-outdated').on('click', function (e) { + e.preventDefault(); + const id = $(this).data('comment'); + $(this).addClass('hide'); + $(`#code-comments-${id}`).addClass('hide'); + $(`#code-preview-${id}`).addClass('hide'); + $(`#show-outdated-${id}`).removeClass('hide'); + }); + + $('button.comment-form-reply').on('click', function (e) { + e.preventDefault(); + $(this).hide(); + const form = $(this).parent().find('.comment-form'); + form.removeClass('hide'); + assingMenuAttributes(form.find('.menu')); + }); + // The following part is only for diff views + if ($('.repository.pull.diff').length === 0) { + return; + } + + $('.diff-detail-box.ui.sticky').sticky(); + + $('.btn-review').on('click', function (e) { + e.preventDefault(); + $(this).closest('.dropdown').find('.menu').toggle('visible'); + }).closest('.dropdown').find('.link.close') + .on('click', function (e) { + e.preventDefault(); + $(this).closest('.menu').toggle('visible'); + }); + + $('.code-view .lines-code,.code-view .lines-num') + .on('mouseenter', function () { + const parent = $(this).closest('td'); + $(this).closest('tr').addClass( + parent.hasClass('lines-num-old') || parent.hasClass('lines-code-old') + ? 'focus-lines-old' : 'focus-lines-new' + ); + }) + .on('mouseleave', function () { + $(this).closest('tr').removeClass('focus-lines-new focus-lines-old'); + }); + $('.add-code-comment').on('click', function (e) { + // https://github.com/go-gitea/gitea/issues/4745 + if ($(e.target).hasClass('btn-add-single')) { + return; + } + e.preventDefault(); + const isSplit = $(this).closest('.code-diff').hasClass('code-diff-split'); + const side = $(this).data('side'); + const idx = $(this).data('idx'); + const path = $(this).data('path'); + const form = $('#pull_review_add_comment').html(); + const tr = $(this).closest('tr'); + let ntr = tr.next(); + if (!ntr.hasClass('add-comment')) { + ntr = $(`${ + isSplit ? '' + : '' + }`); + tr.after(ntr); + } + const td = ntr.find(`.add-comment-${side}`); + let commentCloud = td.find('.comment-code-cloud'); + if (commentCloud.length === 0) { + td.html(form); + commentCloud = td.find('.comment-code-cloud'); + assingMenuAttributes(commentCloud.find('.menu')); + + td.find("input[name='line']").val(idx); + td.find("input[name='side']").val(side === 'left' ? 'previous' : 'proposed'); + td.find("input[name='path']").val(path); + } + commentCloud.find('textarea').focus(); + }); +} - $(this).addClass('selected active'); - if (hasUpdateAction) { - updateIssuesMeta( - $menu.data('update-url'), - "", - $menu.data('issue-id'), - $(this).data('id') - ).then(reload); - } - switch (input_id) { - case '#milestone_id': - $list.find('.selected').html('' + - htmlEncode($(this).text()) + ''); - break; - case '#assignee_id': - $list.find('.selected').html('' + - '' + - htmlEncode($(this).text()) + ''); - } - $('.ui' + select_id + '.list .no-select').addClass('hide'); - $(input_id).val($(this).data('id')); - }); - $menu.find('.no-select.item').click(function () { - $(this).parent().find('.item:not(.no-select)').each(function () { - $(this).removeClass('selected active') - }); +function assingMenuAttributes(menu) { + const id = Math.floor(Math.random() * Math.floor(1000000)); + menu.attr('data-write', menu.attr('data-write') + id); + menu.attr('data-preview', menu.attr('data-preview') + id); + menu.find('.item').each(function () { + const tab = $(this).attr('data-tab') + id; + $(this).attr('data-tab', tab); + }); + menu.parent().find("*[data-tab='write']").attr('data-tab', `write${id}`); + menu.parent().find("*[data-tab='preview']").attr('data-tab', `preview${id}`); + initCommentPreviewTab(menu.parent('.form')); + return id; +} - if (hasUpdateAction) { - updateIssuesMeta( - $menu.data('update-url'), - "", - $menu.data('issue-id'), - $(this).data('id') - ).then(reload); - } +function initRepositoryCollaboration() { + // Change collaborator access mode + $('.access-mode.menu .item').click(function () { + const $menu = $(this).parent(); + $.post($menu.data('url'), { + _csrf: csrf, + uid: $menu.data('uid'), + mode: $(this).data('value') + }); + }); +} - $list.find('.selected').html(''); - $list.find('.no-select').removeClass('hide'); - $(input_id).val(''); - }); +function initTeamSettings() { + // Change team access mode + $('.organization.new.team input[name=permission]').change(() => { + const val = $('input[name=permission]:checked', '.organization.new.team').val(); + if (val === 'admin') { + $('.organization.new.team .team-units').hide(); + } else { + $('.organization.new.team .team-units').show(); } + }); +} - // Milestone and assignee - selectItem('.select-milestone', '#milestone_id'); - selectItem('.select-assignee', '#assignee_id'); +function initWikiForm() { + const $editArea = $('.repository.wiki textarea#edit_area'); + if ($editArea.length > 0) { + const simplemde = new SimpleMDE({ + autoDownloadFontAwesome: false, + element: $editArea[0], + forceSync: true, + previewRender(plainText, preview) { // Async method + setTimeout(() => { + // FIXME: still send render request when return back to edit mode + $.post($editArea.data('url'), { + _csrf: csrf, + mode: 'gfm', + context: $editArea.data('context'), + text: plainText + }, (data) => { + preview.innerHTML = `
${data}
`; + emojify.run($('.editor-preview')[0]); + }); + }, 0); + + return 'Loading...'; + }, + renderingConfig: { + singleLineBreaks: false + }, + indentWithTabs: false, + tabSize: 4, + spellChecker: false, + toolbar: ['bold', 'italic', 'strikethrough', '|', + 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|', + { + name: 'code-inline', + action(e) { + const cm = e.codemirror; + const selection = cm.getSelection(); + cm.replaceSelection(`\`${selection}\``); + if (!selection) { + const cursorPos = cm.getCursor(); + cm.setCursor(cursorPos.line, cursorPos.ch - 1); + } + cm.focus(); + }, + className: 'fa fa-angle-right', + title: 'Add Inline Code', + }, 'code', 'quote', '|', { + name: 'checkbox-empty', + action(e) { + const cm = e.codemirror; + cm.replaceSelection(`\n- [ ] ${cm.getSelection()}`); + cm.focus(); + }, + className: 'fa fa-square-o', + title: 'Add Checkbox (empty)', + }, + { + name: 'checkbox-checked', + action(e) { + const cm = e.codemirror; + cm.replaceSelection(`\n- [x] ${cm.getSelection()}`); + cm.focus(); + }, + className: 'fa fa-check-square-o', + title: 'Add Checkbox (checked)', + }, '|', + 'unordered-list', 'ordered-list', '|', + 'link', 'image', 'table', 'horizontal-rule', '|', + 'clean-block', 'preview', 'fullscreen'] + }); + $(simplemde.codemirror.getInputField()).addClass('js-quick-submit'); + } } -function initInstall() { - if ($('.install').length == 0) { - return; - } +// Adding function to get the cursor position in a text field to jQuery object. +$.fn.getCursorPosition = function () { + const el = $(this).get(0); + let pos = 0; + if ('selectionStart' in el) { + pos = el.selectionStart; + } else if ('selection' in document) { + el.focus(); + const Sel = document.selection.createRange(); + const SelLength = document.selection.createRange().text.length; + Sel.moveStart('character', -el.value.length); + pos = Sel.text.length - SelLength; + } + return pos; +}; - if ($('#db_host').val()=="") { - $('#db_host').val("127.0.0.1:3306"); - $('#db_user').val("gitea"); - $('#db_name').val("gitea"); - } +function setSimpleMDE($editArea) { + if (codeMirrorEditor) { + codeMirrorEditor.toTextArea(); + codeMirrorEditor = null; + } - // Database type change detection. - $("#db_type").change(function () { - const sqliteDefault = 'data/gitea.db'; - const tidbDefault = 'data/gitea_tidb'; + if (simpleMDEditor) { + return true; + } + + simpleMDEditor = new SimpleMDE({ + autoDownloadFontAwesome: false, + element: $editArea[0], + forceSync: true, + renderingConfig: { + singleLineBreaks: false + }, + indentWithTabs: false, + tabSize: 4, + spellChecker: false, + previewRender(plainText, preview) { // Async method + setTimeout(() => { + // FIXME: still send render request when return back to edit mode + $.post($editArea.data('url'), { + _csrf: csrf, + mode: 'gfm', + context: $editArea.data('context'), + text: plainText + }, + (data) => { + preview.innerHTML = `
${data}
`; + emojify.run($('.editor-preview')[0]); + }); + }, 0); - const dbType = $(this).val(); - if (dbType === "SQLite3") { - $('#sql_settings').hide(); - $('#pgsql_settings').hide(); - $('#mysql_settings').hide(); - $('#sqlite_settings').show(); + return 'Loading...'; + }, + toolbar: ['bold', 'italic', 'strikethrough', '|', + 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|', + 'code', 'quote', '|', + 'unordered-list', 'ordered-list', '|', + 'link', 'image', 'table', 'horizontal-rule', '|', + 'clean-block', 'preview', 'fullscreen', 'side-by-side'] + }); - if (dbType === "SQLite3" && $('#db_path').val() == tidbDefault) { - $('#db_path').val(sqliteDefault); - } - return; - } + return true; +} - const dbDefaults = { - "MySQL": "127.0.0.1:3306", - "PostgreSQL": "127.0.0.1:5432", - "MSSQL": "127.0.0.1:1433" - }; +function setCodeMirror($editArea) { + if (simpleMDEditor) { + simpleMDEditor.toTextArea(); + simpleMDEditor = null; + } - $('#sqlite_settings').hide(); - $('#sql_settings').show(); + if (codeMirrorEditor) { + return true; + } - $('#pgsql_settings').toggle(dbType === "PostgreSQL"); - $('#mysql_settings').toggle(dbType === "MySQL"); - $.each(dbDefaults, function(_type, defaultHost) { - if ($('#db_host').val() == defaultHost) { - $('#db_host').val(dbDefaults[dbType]); - return false; - } - }); - }); + codeMirrorEditor = CodeMirror.fromTextArea($editArea[0], { + lineNumbers: true + }); + codeMirrorEditor.on('change', (cm, _change) => { + $editArea.val(cm.getValue()); + }); - // TODO: better handling of exclusive relations. - $('#offline-mode input').change(function () { - if ($(this).is(':checked')) { - $('#disable-gravatar').checkbox('check'); - $('#federated-avatar-lookup').checkbox('uncheck'); - } - }); - $('#disable-gravatar input').change(function () { - if ($(this).is(':checked')) { - $('#federated-avatar-lookup').checkbox('uncheck'); - } else { - $('#offline-mode').checkbox('uncheck'); - } - }); - $('#federated-avatar-lookup input').change(function () { - if ($(this).is(':checked')) { - $('#disable-gravatar').checkbox('uncheck'); - $('#offline-mode').checkbox('uncheck'); - } - }); - $('#enable-openid-signin input').change(function () { - if ($(this).is(':checked')) { - if (!$('#disable-registration input').is(':checked')) { - $('#enable-openid-signup').checkbox('check'); - } - } else { - $('#enable-openid-signup').checkbox('uncheck'); - } - }); - $('#disable-registration input').change(function () { - if ($(this).is(':checked')) { - $('#enable-captcha').checkbox('uncheck'); - $('#enable-openid-signup').checkbox('uncheck'); - } else { - $('#enable-openid-signup').checkbox('check'); - } - }); - $('#enable-captcha input').change(function () { - if ($(this).is(':checked')) { - $('#disable-registration').checkbox('uncheck'); - } - }); + return true; } -function initRepository() { - if ($('.repository').length == 0) { - return; +function initEditor() { + $('.js-quick-pull-choice-option').change(function () { + if ($(this).val() === 'commit-to-new-branch') { + $('.quick-pull-branch-name').show(); + $('.quick-pull-branch-name input').prop('required', true); + } else { + $('.quick-pull-branch-name').hide(); + $('.quick-pull-branch-name input').prop('required', false); + } + $('#commit-button').text($(this).attr('button_text')); + }); + + const $editFilename = $('#file-name'); + $editFilename.keyup(function (e) { + const $section = $('.breadcrumb span.section'); + const $divider = $('.breadcrumb div.divider'); + let value; + let parts; + + if (e.keyCode === 8) { + if ($(this).getCursorPosition() === 0) { + if ($section.length > 0) { + value = $section.last().find('a').text(); + $(this).val(value + $(this).val()); + $(this)[0].setSelectionRange(value.length, value.length); + $section.last().remove(); + $divider.last().remove(); + } + } + } + if (e.keyCode === 191) { + parts = $(this).val().split('/'); + for (let i = 0; i < parts.length; ++i) { + value = parts[i]; + if (i < parts.length - 1) { + if (value.length) { + $(`${value}`).insertBefore($(this)); + $('
/
').insertBefore($(this)); + } + } else { + $(this).val(value); + } + $(this)[0].setSelectionRange(0, 0); + } + } + parts = []; + $('.breadcrumb span.section').each(function () { + const element = $(this); + if (element.find('a').length) { + parts.push(element.find('a').text()); + } else { + parts.push(element.text()); + } + }); + if ($(this).val()) parts.push($(this).val()); + $('#tree_path').val(parts.join('/')); + }).trigger('keyup'); + + const $editArea = $('.repository.editor textarea#edit_area'); + if (!$editArea.length) return; + + const markdownFileExts = $editArea.data('markdown-file-exts').split(','); + const lineWrapExtensions = $editArea.data('line-wrap-extensions').split(','); + + $editFilename.on('keyup', () => { + const val = $editFilename.val(); + let mode, spec, extension, extWithDot, dataUrl, apiCall; + + extension = extWithDot = ''; + const m = /.+\.([^.]+)$/.exec(val); + if (m) { + extension = m[1]; + extWithDot = `.${extension}`; + } + + const info = CodeMirror.findModeByExtension(extension); + const previewLink = $('a[data-tab=preview]'); + if (info) { + mode = info.mode; + spec = info.mime; + apiCall = mode; + } else { + apiCall = extension; } - function initFilterSearchDropdown(selector) { - const $dropdown = $(selector); - $dropdown.dropdown({ - fullTextSearch: true, - selectOnKeydown: false, - onChange: function (_text, _value, $choice) { - if ($choice.data('url')) { - window.location.href = $choice.data('url'); - } - }, - message: {noResults: $dropdown.data('no-results')} - }); + if (previewLink.length && apiCall && previewFileModes && previewFileModes.length && previewFileModes.indexOf(apiCall) >= 0) { + dataUrl = previewLink.data('url'); + previewLink.data('url', dataUrl.replace(/(.*)\/.*/i, `$1/${mode}`)); + previewLink.show(); + } else { + previewLink.hide(); } - // File list and commits - if ($('.repository.file.list').length > 0 || - ('.repository.commits').length > 0) { - initFilterBranchTagDropdown('.choose.reference .dropdown'); + // If this file is a Markdown extensions, we will load that editor and return + if (markdownFileExts.indexOf(extWithDot) >= 0) { + if (setSimpleMDE($editArea)) { + return; + } } - // Wiki - if ($('.repository.wiki.view').length > 0) { - initFilterSearchDropdown('.choose.page .dropdown'); + // Else we are going to use CodeMirror + if (!codeMirrorEditor && !setCodeMirror($editArea)) { + return; } - // Options - if ($('.repository.settings.options').length > 0) { - $('#repo_name').keyup(function () { - const $prompt = $('#repo-name-change-prompt'); - if ($(this).val().toString().toLowerCase() != $(this).data('name').toString().toLowerCase()) { - $prompt.show(); - } else { - $prompt.hide(); - } - }); - - // Enable or select internal/external wiki system and issue tracker. - $('.enable-system').change(function () { - if (this.checked) { - $($(this).data('target')).removeClass('disabled'); - if (!$(this).data('context')) $($(this).data('context')).addClass('disabled'); - } else { - $($(this).data('target')).addClass('disabled'); - if (!$(this).data('context')) $($(this).data('context')).removeClass('disabled'); - } - }); - $('.enable-system-radio').change(function () { - if (this.value == 'false') { - $($(this).data('target')).addClass('disabled'); - if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled'); - } else if (this.value == 'true') { - $($(this).data('target')).removeClass('disabled'); - if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled'); - } - }); + if (mode) { + codeMirrorEditor.setOption('mode', spec); + CodeMirror.autoLoadMode(codeMirrorEditor, mode); } - // Labels - if ($('.repository.labels').length > 0) { - // Create label - const $newLabelPanel = $('.new-label.segment'); - $('.new-label.button').click(function () { - $newLabelPanel.show(); - }); - $('.new-label.segment .cancel').click(function () { - $newLabelPanel.hide(); + if (lineWrapExtensions.indexOf(extWithDot) >= 0) { + codeMirrorEditor.setOption('lineWrapping', true); + } else { + codeMirrorEditor.setOption('lineWrapping', false); + } + + // get the filename without any folder + let value = $editFilename.val(); + if (value.length === 0) { + return; + } + value = value.split('/'); + value = value[value.length - 1]; + + $.getJSON($editFilename.data('ec-url-prefix') + value, (editorconfig) => { + if (editorconfig.indent_style === 'tab') { + codeMirrorEditor.setOption('indentWithTabs', true); + codeMirrorEditor.setOption('extraKeys', {}); + } else { + codeMirrorEditor.setOption('indentWithTabs', false); + // required because CodeMirror doesn't seems to use spaces correctly for {"indentWithTabs": false}: + // - https://github.com/codemirror/CodeMirror/issues/988 + // - https://codemirror.net/doc/manual.html#keymaps + codeMirrorEditor.setOption('extraKeys', { + Tab(cm) { + const spaces = Array(parseInt(cm.getOption('indentUnit')) + 1).join(' '); + cm.replaceSelection(spaces); + } }); + } + codeMirrorEditor.setOption('indentUnit', editorconfig.indent_size || 4); + codeMirrorEditor.setOption('tabSize', editorconfig.tab_width || 4); + }); + }).trigger('keyup'); - $('.color-picker').each(function () { - $(this).minicolors(); - }); - $('.precolors .color').click(function () { - const color_hex = $(this).data('color-hex'); - $('.color-picker').val(color_hex); - $('.minicolors-swatch-color').css("background-color", color_hex); - }); - $('.edit-label-button').click(function () { - $('#label-modal-id').val($(this).data('id')); - $('.edit-label .new-label-input').val($(this).data('title')); - $('.edit-label .new-label-desc-input').val($(this).data('description')); - $('.edit-label .color-picker').val($(this).data('color')); - $('.minicolors-swatch-color').css("background-color", $(this).data('color')); - $('.edit-label.modal').modal({ - onApprove: function () { - $('.edit-label.form').submit(); - } - }).modal('show'); - return false; - }); + // Using events from https://github.com/codedance/jquery.AreYouSure#advanced-usage + // to enable or disable the commit button + const $commitButton = $('#commit-button'); + const $editForm = $('.ui.edit.form'); + const dirtyFileClass = 'dirty-file'; + + // Disabling the button at the start + $commitButton.prop('disabled', true); + + // Registering a custom listener for the file path and the file content + $editForm.areYouSure({ + silent: true, + dirtyClass: dirtyFileClass, + fieldSelector: ':input:not(.commit-form-wrapper :input)', + change() { + const dirty = $(this).hasClass(dirtyFileClass); + $commitButton.prop('disabled', !dirty); } + }); - // Milestones - if ($('.repository.new.milestone').length > 0) { - const $datepicker = $('.milestone.datepicker'); - $datepicker.datetimepicker({ - lang: $datepicker.data('lang'), - inline: true, - timepicker: false, - startDate: $datepicker.data('start-date'), - formatDate: 'Y-m-d', - onSelectDate: function (ct) { - $('#deadline').val(ct.dateFormat('Y-m-d')); - } - }); - $('#clear-date').click(function () { - $('#deadline').val(''); - return false; - }); + $commitButton.click((event) => { + // A modal which asks if an empty file should be committed + if ($editArea.val().length === 0) { + $('#edit-empty-content-modal').modal({ + onApprove() { + $('.edit.form').submit(); + } + }).modal('show'); + event.preventDefault(); } + }); +} - // Issues - if ($('.repository.view.issue').length > 0) { - // Edit issue title - const $issueTitle = $('#issue-title'); - const $editInput = $('#edit-title-input input'); - const editTitleToggle = function () { - $issueTitle.toggle(); - $('.not-in-edit').toggle(); - $('#edit-title-input').toggle(); - $('.in-edit').toggle(); - $editInput.focus(); - return false; - }; - $('#edit-title').click(editTitleToggle); - $('#cancel-edit-title').click(editTitleToggle); - $('#save-edit-title').click(editTitleToggle).click(function () { - if ($editInput.val().length == 0 || - $editInput.val() == $issueTitle.text()) { - $editInput.val($issueTitle.text()); - return false; - } +function initOrganization() { + if ($('.organization').length === 0) { + return; + } - $.post($(this).data('update-url'), { - "_csrf": csrf, - "title": $editInput.val() - }, - function (data) { - $editInput.val(data.title); - $issueTitle.text(data.title); - reload(); - }); - return false; - }); - - // Edit issue or comment content - $('.edit-content').click(function () { - const $segment = $(this).parent().parent().parent().next(); - const $editContentZone = $segment.find('.edit-content-zone'); - const $renderContent = $segment.find('.render-content'); - const $rawContent = $segment.find('.raw-content'); - let $textarea; - - // Setup new form - if ($editContentZone.html().length == 0) { - $editContentZone.html($('#edit-content-form').html()); - $textarea = $editContentZone.find('textarea'); - issuesTribute.attach($textarea.get()); - emojiTribute.attach($textarea.get()); - - const $dropzone = $editContentZone.find('.dropzone'); - $dropzone.data("saved", false); - const $files = $editContentZone.find('.comment-files'); - if ($dropzone.length > 0) { - const filenameDict = {}; - $dropzone.dropzone({ - url: $dropzone.data('upload-url'), - headers: {"X-Csrf-Token": csrf}, - maxFiles: $dropzone.data('max-file'), - maxFilesize: $dropzone.data('max-size'), - acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'), - addRemoveLinks: true, - dictDefaultMessage: $dropzone.data('default-message'), - dictInvalidFileType: $dropzone.data('invalid-input-type'), - dictFileTooBig: $dropzone.data('file-too-big'), - dictRemoveFile: $dropzone.data('remove-file'), - init: function () { - this.on("success", function (file, data) { - filenameDict[file.name] = { - "uuid": data.uuid, - "submitted": false - } - const input = $('').val(data.uuid); - $files.append(input); - }); - this.on("removedfile", function (file) { - if (!(file.name in filenameDict)) { - return; - } - $('#' + filenameDict[file.name].uuid).remove(); - if ($dropzone.data('remove-url') && $dropzone.data('csrf') && !filenameDict[file.name].submitted) { - $.post($dropzone.data('remove-url'), { - file: filenameDict[file.name].uuid, - _csrf: $dropzone.data('csrf') - }); - } - }); - this.on("submit", function () { - $.each(filenameDict, function(name){ - filenameDict[name].submitted = true; - }); - }); - this.on("reload", function (){ - $.getJSON($editContentZone.data('attachment-url'), function(data){ - const drop = $dropzone.get(0).dropzone; - drop.removeAllFiles(true); - $files.empty(); - $.each(data, function(){ - const imgSrc = $dropzone.data('upload-url') + "/" + this.uuid; - drop.emit("addedfile", this); - drop.emit("thumbnail", this, imgSrc); - drop.emit("complete", this); - drop.files.push(this); - filenameDict[this.name] = { - "submitted": true, - "uuid": this.uuid - } - $dropzone.find("img[src='" + imgSrc + "']").css("max-width", "100%"); - const input = $('').val(this.uuid); - $files.append(input); - }); - }); - }); - } - }); - $dropzone.get(0).dropzone.emit("reload"); - } - // Give new write/preview data-tab name to distinguish from others - const $editContentForm = $editContentZone.find('.ui.comment.form'); - const $tabMenu = $editContentForm.find('.tabular.menu'); - $tabMenu.attr('data-write', $editContentZone.data('write')); - $tabMenu.attr('data-preview', $editContentZone.data('preview')); - $tabMenu.find('.write.item').attr('data-tab', $editContentZone.data('write')); - $tabMenu.find('.preview.item').attr('data-tab', $editContentZone.data('preview')); - $editContentForm.find('.write.segment').attr('data-tab', $editContentZone.data('write')); - $editContentForm.find('.preview.segment').attr('data-tab', $editContentZone.data('preview')); - - initCommentPreviewTab($editContentForm); - - $editContentZone.find('.cancel.button').click(function () { - $renderContent.show(); - $editContentZone.hide(); - $dropzone.get(0).dropzone.emit("reload"); - }); - $editContentZone.find('.save.button').click(function () { - $renderContent.show(); - $editContentZone.hide(); - const $attachments = $files.find("[name=files]").map(function(){ - return $(this).val(); - }).get(); - $.post($editContentZone.data('update-url'), { - "_csrf": csrf, - "content": $textarea.val(), - "context": $editContentZone.data('context'), - "files": $attachments - }, - function (data) { - if (data.length == 0) { - $renderContent.html($('#no-content').html()); - } else { - $renderContent.html(data.content); - emojify.run($renderContent[0]); - $('pre code', $renderContent[0]).each(function () { - hljs.highlightBlock(this); - }); - } - const $content = $segment.parent(); - if(!$content.find(".ui.small.images").length){ - if(data.attachments != ""){ - $content.append( - '
' + - '
' + - '
' + - '
' - ); - $content.find(".ui.small.images").html(data.attachments); - } - } else if (data.attachments == "") { - $content.find(".ui.small.images").parent().remove(); - } else { - $content.find(".ui.small.images").html(data.attachments); - } - $dropzone.get(0).dropzone.emit("submit"); - $dropzone.get(0).dropzone.emit("reload"); - }); - }); - } else { - $textarea = $segment.find('textarea'); - } - - // Show write/preview tab and copy raw content as needed - $editContentZone.show(); - $renderContent.hide(); - if ($textarea.val().length == 0) { - $textarea.val($rawContent.text()); - } - $textarea.focus(); - return false; - }); - - // Delete comment - $('.delete-comment').click(function () { - const $this = $(this); - if (confirm($this.data('locale'))) { - $.post($this.data('url'), { - "_csrf": csrf - }).success(function () { - $('#' + $this.data('comment-id')).remove(); - }); - } - return false; - }); - - // Change status - const $statusButton = $('#status-button'); - $('#comment-form .edit_area').keyup(function () { - if ($(this).val().length == 0) { - $statusButton.text($statusButton.data('status')) - } else { - $statusButton.text($statusButton.data('status-and-comment')) - } - }); - $statusButton.click(function () { - $('#status').val($statusButton.data('status-val')); - $('#comment-form').submit(); - }); - - // Pull Request merge button - const $mergeButton = $('.merge-button > button'); - $mergeButton.on('click', function(e) { - e.preventDefault(); - $('.' + $(this).data('do') + '-fields').show(); - $(this).parent().hide(); - }); - $('.merge-button > .dropdown').dropdown({ - onChange: function (_text, _value, $choice) { - if ($choice.data('do')) { - $mergeButton.find('.button-text').text($choice.text()); - $mergeButton.data('do', $choice.data('do')); - } - } - }); - $('.merge-cancel').on('click', function(e) { - e.preventDefault(); - $(this).closest('.form').hide(); - $mergeButton.parent().show(); - }); - - initReactionSelector(); - } - - // Diff - if ($('.repository.diff').length > 0) { - $('.diff-counter').each(function () { - const $item = $(this); - const addLine = $item.find('span[data-line].add').data("line"); - const delLine = $item.find('span[data-line].del').data("line"); - const addPercent = parseFloat(addLine) / (parseFloat(addLine) + parseFloat(delLine)) * 100; - $item.find(".bar .add").css("width", addPercent + "%"); - }); - } - - // Quick start and repository home - $('#repo-clone-ssh').click(function () { - $('.clone-url').text($(this).data('link')); - $('#repo-clone-url').val($(this).data('link')); - $(this).addClass('blue'); - $('#repo-clone-https').removeClass('blue'); - localStorage.setItem('repo-clone-protocol', 'ssh'); - }); - $('#repo-clone-https').click(function () { - $('.clone-url').text($(this).data('link')); - $('#repo-clone-url').val($(this).data('link')); - $(this).addClass('blue'); - $('#repo-clone-ssh').removeClass('blue'); - localStorage.setItem('repo-clone-protocol', 'https'); - }); - $('#repo-clone-url').click(function () { - $(this).select(); - }); - - // Pull request - const $repoComparePull = $('.repository.compare.pull'); - if ($repoComparePull.length > 0) { - initFilterSearchDropdown('.choose.branch .dropdown'); - // show pull request form - $repoComparePull.find('button.show-form').on('click', function(e) { - e.preventDefault(); - $repoComparePull.find('.pullrequest-form').show(); - $(this).parent().hide(); - }); - } - - // Branches - if ($('.repository.settings.branches').length > 0) { - initFilterSearchDropdown('.protected-branches .dropdown'); - $('.enable-protection, .enable-whitelist').change(function () { - if (this.checked) { - $($(this).data('target')).removeClass('disabled'); - } else { - $($(this).data('target')).addClass('disabled'); - } - }); - } -} - -function initMigration() { - const toggleMigrations = function() { - const authUserName = $('#auth_username').val(); - const cloneAddr = $('#clone_addr').val(); - if (!$('#mirror').is(":checked") && (authUserName!=undefined && authUserName.length > 0) - && (cloneAddr!=undefined && (cloneAddr.startsWith("https://github.com") || cloneAddr.startsWith("http://github.com")))) { - $('#migrate_items').show(); - } else { - $('#migrate_items').hide(); - } - } - - toggleMigrations(); - - $('#clone_addr').on('input', toggleMigrations) - $('#auth_username').on('input', toggleMigrations) - $('#mirror').on('change', toggleMigrations) -} - -function initPullRequestReview() { - $('.show-outdated').on('click', function (e) { - e.preventDefault(); - const id = $(this).data('comment'); - $(this).addClass("hide"); - $("#code-comments-" + id).removeClass('hide'); - $("#code-preview-" + id).removeClass('hide'); - $("#hide-outdated-" + id).removeClass('hide'); - }); - - $('.hide-outdated').on('click', function (e) { - e.preventDefault(); - const id = $(this).data('comment'); - $(this).addClass("hide"); - $("#code-comments-" + id).addClass('hide'); - $("#code-preview-" + id).addClass('hide'); - $("#show-outdated-" + id).removeClass('hide'); - }); - - $('button.comment-form-reply').on('click', function (e) { - e.preventDefault(); - $(this).hide(); - const form = $(this).parent().find('.comment-form') - form.removeClass('hide'); - assingMenuAttributes(form.find('.menu')); - }); - // The following part is only for diff views - if ($('.repository.pull.diff').length == 0) { - return; - } - - $('.diff-detail-box.ui.sticky').sticky(); - - $('.btn-review').on('click', function(e) { - e.preventDefault(); - $(this).closest('.dropdown').find('.menu').toggle('visible'); - }).closest('.dropdown').find('.link.close').on('click', function(e) { - e.preventDefault(); - $(this).closest('.menu').toggle('visible'); - }); - - $('.code-view .lines-code,.code-view .lines-num') - .on('mouseenter', function() { - const parent = $(this).closest('td'); - $(this).closest('tr').addClass( - parent.hasClass('lines-num-old') || parent.hasClass('lines-code-old') - ? 'focus-lines-old' : 'focus-lines-new' - ); - }) - .on('mouseleave', function() { - $(this).closest('tr').removeClass('focus-lines-new focus-lines-old'); - }); - $('.add-code-comment').on('click', function(e) { - // https://github.com/go-gitea/gitea/issues/4745 - if ($(e.target).hasClass('btn-add-single')) { - return; - } - e.preventDefault(); - const isSplit = $(this).closest('.code-diff').hasClass('code-diff-split'); - const side = $(this).data('side'); - const idx = $(this).data('idx'); - const path = $(this).data('path'); - const form = $('#pull_review_add_comment').html(); - const tr = $(this).closest('tr'); - let ntr = tr.next(); - if (!ntr.hasClass('add-comment')) { - ntr = $('' - + (isSplit ? '' - : '') - + ''); - tr.after(ntr); - } - const td = ntr.find('.add-comment-' + side); - let commentCloud = td.find('.comment-code-cloud'); - if (commentCloud.length === 0) { - td.html(form); - commentCloud = td.find('.comment-code-cloud'); - assingMenuAttributes(commentCloud.find('.menu')); - - td.find("input[name='line']").val(idx); - td.find("input[name='side']").val(side === "left" ? "previous":"proposed"); - td.find("input[name='path']").val(path); - } - commentCloud.find('textarea').focus(); - }); -} - -function assingMenuAttributes(menu) { - const id = Math.floor(Math.random() * Math.floor(1000000)); - menu.attr('data-write', menu.attr('data-write') + id); - menu.attr('data-preview', menu.attr('data-preview') + id); - menu.find('.item').each(function() { - const tab = $(this).attr('data-tab') + id; - $(this).attr('data-tab', tab); - }); - menu.parent().find("*[data-tab='write']").attr('data-tab', 'write' + id); - menu.parent().find("*[data-tab='preview']").attr('data-tab', 'preview' + id); - initCommentPreviewTab(menu.parent(".form")); - return id; -} - -function initRepositoryCollaboration() { - // Change collaborator access mode - $('.access-mode.menu .item').click(function () { - const $menu = $(this).parent(); - $.post($menu.data('url'), { - "_csrf": csrf, - "uid": $menu.data('uid'), - "mode": $(this).data('value') - }) - }); -} - -function initTeamSettings() { - // Change team access mode - $('.organization.new.team input[name=permission]').change(function () { - const val = $('input[name=permission]:checked', '.organization.new.team').val() - if (val === 'admin') { - $('.organization.new.team .team-units').hide(); - } else { - $('.organization.new.team .team-units').show(); - } - }); -} - -function initWikiForm() { - const $editArea = $('.repository.wiki textarea#edit_area'); - if ($editArea.length > 0) { - const simplemde = new SimpleMDE({ - autoDownloadFontAwesome: false, - element: $editArea[0], - forceSync: true, - previewRender: function (plainText, preview) { // Async method - setTimeout(function () { - // FIXME: still send render request when return back to edit mode - $.post($editArea.data('url'), { - "_csrf": csrf, - "mode": "gfm", - "context": $editArea.data('context'), - "text": plainText - }, - function (data) { - preview.innerHTML = '
' + data + '
'; - emojify.run($('.editor-preview')[0]); - } - ); - }, 0); - - return "Loading..."; - }, - renderingConfig: { - singleLineBreaks: false - }, - indentWithTabs: false, - tabSize: 4, - spellChecker: false, - toolbar: ["bold", "italic", "strikethrough", "|", - "heading-1", "heading-2", "heading-3", "heading-bigger", "heading-smaller", "|", - { - name: "code-inline", - action: function(e){ - const cm = e.codemirror; - const selection = cm.getSelection(); - cm.replaceSelection("`" + selection + "`"); - if (!selection) { - const cursorPos = cm.getCursor(); - cm.setCursor(cursorPos.line, cursorPos.ch - 1); - } - cm.focus(); - }, - className: "fa fa-angle-right", - title: "Add Inline Code", - },"code", "quote", "|", { - name: "checkbox-empty", - action: function(e){ - const cm = e.codemirror; - cm.replaceSelection("\n- [ ] " + cm.getSelection()); - cm.focus(); - }, - className: "fa fa-square-o", - title: "Add Checkbox (empty)", - }, - { - name: "checkbox-checked", - action: function(e){ - const cm = e.codemirror; - cm.replaceSelection("\n- [x] " + cm.getSelection()); - cm.focus(); - }, - className: "fa fa-check-square-o", - title: "Add Checkbox (checked)", - }, "|", - "unordered-list", "ordered-list", "|", - "link", "image", "table", "horizontal-rule", "|", - "clean-block", "preview", "fullscreen"] - }) - $(simplemde.codemirror.getInputField()).addClass("js-quick-submit"); - } -} - -// For IE -String.prototype.endsWith = function (pattern) { - const d = this.length - pattern.length; - return d >= 0 && this.lastIndexOf(pattern) === d; -}; - -// Adding function to get the cursor position in a text field to jQuery object. -$.fn.getCursorPosition = function () { - const el = $(this).get(0); - let pos = 0; - if ('selectionStart' in el) { - pos = el.selectionStart; - } else if ('selection' in document) { - el.focus(); - const Sel = document.selection.createRange(); - const SelLength = document.selection.createRange().text.length; - Sel.moveStart('character', -el.value.length); - pos = Sel.text.length - SelLength; - } - return pos; -} - -function setSimpleMDE($editArea) { - if (codeMirrorEditor) { - codeMirrorEditor.toTextArea(); - codeMirrorEditor = null; - } - - if (simpleMDEditor) { - return true; - } - - simpleMDEditor = new SimpleMDE({ - autoDownloadFontAwesome: false, - element: $editArea[0], - forceSync: true, - renderingConfig: { - singleLineBreaks: false - }, - indentWithTabs: false, - tabSize: 4, - spellChecker: false, - previewRender: function (plainText, preview) { // Async method - setTimeout(function () { - // FIXME: still send render request when return back to edit mode - $.post($editArea.data('url'), { - "_csrf": csrf, - "mode": "gfm", - "context": $editArea.data('context'), - "text": plainText - }, - function (data) { - preview.innerHTML = '
' + data + '
'; - emojify.run($('.editor-preview')[0]); - } - ); - }, 0); - - return "Loading..."; - }, - toolbar: ["bold", "italic", "strikethrough", "|", - "heading-1", "heading-2", "heading-3", "heading-bigger", "heading-smaller", "|", - "code", "quote", "|", - "unordered-list", "ordered-list", "|", - "link", "image", "table", "horizontal-rule", "|", - "clean-block", "preview", "fullscreen", "side-by-side"] - }); - - return true; -} - -function setCodeMirror($editArea) { - if (simpleMDEditor) { - simpleMDEditor.toTextArea(); - simpleMDEditor = null; - } - - if (codeMirrorEditor) { - return true; - } - - codeMirrorEditor = CodeMirror.fromTextArea($editArea[0], { - lineNumbers: true - }); - codeMirrorEditor.on("change", function (cm, _change) { - $editArea.val(cm.getValue()); - }); - - return true; -} - -function initEditor() { - $('.js-quick-pull-choice-option').change(function () { - if ($(this).val() == 'commit-to-new-branch') { - $('.quick-pull-branch-name').show(); - $('.quick-pull-branch-name input').prop('required',true); - } else { - $('.quick-pull-branch-name').hide(); - $('.quick-pull-branch-name input').prop('required',false); - } - $('#commit-button').text($(this).attr('button_text')); - }); - - const $editFilename = $("#file-name"); - $editFilename.keyup(function (e) { - const $section = $('.breadcrumb span.section'); - const $divider = $('.breadcrumb div.divider'); - let value; - let parts; - - if (e.keyCode == 8) { - if ($(this).getCursorPosition() == 0) { - if ($section.length > 0) { - value = $section.last().find('a').text(); - $(this).val(value + $(this).val()); - $(this)[0].setSelectionRange(value.length, value.length); - $section.last().remove(); - $divider.last().remove(); - } - } - } - if (e.keyCode == 191) { - parts = $(this).val().split('/'); - for (let i = 0; i < parts.length; ++i) { - value = parts[i]; - if (i < parts.length - 1) { - if (value.length) { - $('' + value + '').insertBefore($(this)); - $('
/
').insertBefore($(this)); - } - } - else { - $(this).val(value); - } - $(this)[0].setSelectionRange(0, 0); - } - } - parts = []; - $('.breadcrumb span.section').each(function () { - const element = $(this); - if (element.find('a').length) { - parts.push(element.find('a').text()); - } else { - parts.push(element.text()); - } - }); - if ($(this).val()) - parts.push($(this).val()); - $('#tree_path').val(parts.join('/')); - }).trigger('keyup'); - - const $editArea = $('.repository.editor textarea#edit_area'); - if (!$editArea.length) - return; - - const markdownFileExts = $editArea.data("markdown-file-exts").split(","); - const lineWrapExtensions = $editArea.data("line-wrap-extensions").split(","); - - $editFilename.on("keyup", function () { - const val = $editFilename.val(); - let mode, spec, extension, extWithDot, dataUrl, apiCall; - - extension = extWithDot = ""; - const m = /.+\.([^.]+)$/.exec(val); - if (m) { - extension = m[1]; - extWithDot = "." + extension; - } - - const info = CodeMirror.findModeByExtension(extension); - const previewLink = $('a[data-tab=preview]'); - if (info) { - mode = info.mode; - spec = info.mime; - apiCall = mode; - } - else { - apiCall = extension - } - - if (previewLink.length && apiCall && previewFileModes && previewFileModes.length && previewFileModes.indexOf(apiCall) >= 0) { - dataUrl = previewLink.data('url'); - previewLink.data('url', dataUrl.replace(/(.*)\/.*/i, '$1/' + mode)); - previewLink.show(); - } - else { - previewLink.hide(); - } - - // If this file is a Markdown extensions, we will load that editor and return - if (markdownFileExts.indexOf(extWithDot) >= 0) { - if (setSimpleMDE($editArea)) { - return; - } - } - - // Else we are going to use CodeMirror - if (!codeMirrorEditor && !setCodeMirror($editArea)) { - return; - } - - if (mode) { - codeMirrorEditor.setOption("mode", spec); - CodeMirror.autoLoadMode(codeMirrorEditor, mode); - } - - if (lineWrapExtensions.indexOf(extWithDot) >= 0) { - codeMirrorEditor.setOption("lineWrapping", true); - } - else { - codeMirrorEditor.setOption("lineWrapping", false); - } - - // get the filename without any folder - let value = $editFilename.val(); - if (value.length === 0) { - return; - } - value = value.split('/'); - value = value[value.length - 1]; - - $.getJSON($editFilename.data('ec-url-prefix')+value, function(editorconfig) { - if (editorconfig.indent_style === 'tab') { - codeMirrorEditor.setOption("indentWithTabs", true); - codeMirrorEditor.setOption('extraKeys', {}); - } else { - codeMirrorEditor.setOption("indentWithTabs", false); - // required because CodeMirror doesn't seems to use spaces correctly for {"indentWithTabs": false}: - // - https://github.com/codemirror/CodeMirror/issues/988 - // - https://codemirror.net/doc/manual.html#keymaps - codeMirrorEditor.setOption('extraKeys', { - Tab: function(cm) { - const spaces = Array(parseInt(cm.getOption("indentUnit")) + 1).join(" "); - cm.replaceSelection(spaces); - } - }); - } - codeMirrorEditor.setOption("indentUnit", editorconfig.indent_size || 4); - codeMirrorEditor.setOption("tabSize", editorconfig.tab_width || 4); - }); - }).trigger('keyup'); - - // Using events from https://github.com/codedance/jquery.AreYouSure#advanced-usage - // to enable or disable the commit button - const $commitButton = $('#commit-button'); - const $editForm = $('.ui.edit.form'); - const dirtyFileClass = 'dirty-file'; - - // Disabling the button at the start - $commitButton.prop('disabled', true); - - // Registering a custom listener for the file path and the file content - $editForm.areYouSure({ - silent: true, - dirtyClass: dirtyFileClass, - fieldSelector: ':input:not(.commit-form-wrapper :input)', - change: function () { - const dirty = $(this).hasClass(dirtyFileClass); - $commitButton.prop('disabled', !dirty); - } - }); - - $commitButton.click(function (event) { - // A modal which asks if an empty file should be committed - if ($editArea.val().length === 0) { - $('#edit-empty-content-modal').modal({ - onApprove: function () { - $('.edit.form').submit(); - } - }).modal('show'); - event.preventDefault(); - } - }); -} - -function initOrganization() { - if ($('.organization').length == 0) { - return; - } - - // Options - if ($('.organization.settings.options').length > 0) { - $('#org_name').keyup(function () { - const $prompt = $('#org-name-change-prompt'); - if ($(this).val().toString().toLowerCase() != $(this).data('org-name').toString().toLowerCase()) { - $prompt.show(); - } else { - $prompt.hide(); - } - }); - } -} + // Options + if ($('.organization.settings.options').length > 0) { + $('#org_name').keyup(function () { + const $prompt = $('#org-name-change-prompt'); + if ($(this).val().toString().toLowerCase() !== $(this).data('org-name').toString().toLowerCase()) { + $prompt.show(); + } else { + $prompt.hide(); + } + }); + } +} function initUserSettings() { - // Options - if ($('.user.settings.profile').length > 0) { - $('#username').keyup(function () { - const $prompt = $('#name-change-prompt'); - if ($(this).val().toString().toLowerCase() != $(this).data('name').toString().toLowerCase()) { - $prompt.show(); - } else { - $prompt.hide(); - } - }); - } -} - -function initWebhook() { - if ($('.new.webhook').length == 0) { - return; - } - - $('.events.checkbox input').change(function () { - if ($(this).is(':checked')) { - $('.events.fields').show(); - } - }); - $('.non-events.checkbox input').change(function () { - if ($(this).is(':checked')) { - $('.events.fields').hide(); - } - }); - - const updateContentType = function () { - const visible = $('#http_method').val() === 'POST'; - $('#content_type').parent().parent()[visible ? 'show' : 'hide'](); - }; - updateContentType(); - $('#http_method').change(function () { - updateContentType(); - }); - - // Test delivery - $('#test-delivery').click(function () { - const $this = $(this); - $this.addClass('loading disabled'); - $.post($this.data('link'), { - "_csrf": csrf - }).done( - setTimeout(function () { - window.location.href = $this.data('redirect'); - }, 5000) - ) - }); -} - -function initAdmin() { - if ($('.admin').length == 0) { - return; - } - - // New user - if ($('.admin.new.user').length > 0 || - $('.admin.edit.user').length > 0) { - $('#login_type').change(function () { - if ($(this).val().substring(0, 1) == '0') { - $('#login_name').removeAttr('required'); - $('.non-local').hide(); - $('.local').show(); - $('#user_name').focus(); - - if ($(this).data('password') == "required") { - $('#password').attr('required', 'required'); - } - - } else { - $('#login_name').attr('required', 'required'); - $('.non-local').show(); - $('.local').hide(); - $('#login_name').focus(); - - $('#password').removeAttr('required'); - } - }); - } - - function onSecurityProtocolChange() { - if ($('#security_protocol').val() > 0) { - $('.has-tls').show(); - } else { - $('.has-tls').hide(); - } - } - - function onUsePagedSearchChange() { - if ($('#use_paged_search').prop('checked')) { - $('.search-page-size').show() - .find('input').attr('required', 'required'); - } else { - $('.search-page-size').hide() - .find('input').removeAttr('required'); - } - } - - function onOAuth2Change() { - $('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url').hide(); - $('.open_id_connect_auto_discovery_url input[required]').removeAttr('required'); - - const provider = $('#oauth2_provider').val(); - switch (provider) { - case 'github': - case 'gitlab': - case 'gitea': - $('.oauth2_use_custom_url').show(); - break; - case 'openidConnect': - $('.open_id_connect_auto_discovery_url input').attr('required', 'required'); - $('.open_id_connect_auto_discovery_url').show(); - break; - } - onOAuth2UseCustomURLChange(); - } - - function onOAuth2UseCustomURLChange() { - const provider = $('#oauth2_provider').val(); - $('.oauth2_use_custom_url_field').hide(); - $('.oauth2_use_custom_url_field input[required]').removeAttr('required'); - - if ($('#oauth2_use_custom_url').is(':checked')) { - if (!$('#oauth2_token_url').val()) { - $('#oauth2_token_url').val($('#' + provider + '_token_url').val()); - } - if (!$('#oauth2_auth_url').val()) { - $('#oauth2_auth_url').val($('#' + provider + '_auth_url').val()); - } - if (!$('#oauth2_profile_url').val()) { - $('#oauth2_profile_url').val($('#' + provider + '_profile_url').val()); - } - if (!$('#oauth2_email_url').val()) { - $('#oauth2_email_url').val($('#' + provider + '_email_url').val()); - } - switch (provider) { - case 'github': - $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input').attr('required', 'required'); - $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url').show(); - break; - case 'gitea': - case 'gitlab': - $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input').attr('required', 'required'); - $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url').show(); - $('#oauth2_email_url').val(''); - break; - } - } - } - - // New authentication - if ($('.admin.new.authentication').length > 0) { - $('#auth_type').change(function () { - $('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size').hide(); - - $('.ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]').removeAttr('required'); - $('.binddnrequired').removeClass("required"); - - const authType = $(this).val(); - switch (authType) { - case '2': // LDAP - $('.ldap').show(); - $('.binddnrequired input, .ldap div.required:not(.dldap) input').attr('required', 'required'); - $('.binddnrequired').addClass("required"); - break; - case '3': // SMTP - $('.smtp').show(); - $('.has-tls').show(); - $('.smtp div.required input, .has-tls').attr('required', 'required'); - break; - case '4': // PAM - $('.pam').show(); - $('.pam input').attr('required', 'required'); - break; - case '5': // LDAP - $('.dldap').show(); - $('.dldap div.required:not(.ldap) input').attr('required', 'required'); - break; - case '6': // OAuth2 - $('.oauth2').show(); - $('.oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input').attr('required', 'required'); - onOAuth2Change(); - break; - } - if (authType == '2' || authType == '5') { - onSecurityProtocolChange() - } - if (authType == '2') { - onUsePagedSearchChange(); - } - }); - $('#auth_type').change(); - $('#security_protocol').change(onSecurityProtocolChange); - $('#use_paged_search').change(onUsePagedSearchChange); - $('#oauth2_provider').change(onOAuth2Change); - $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange); - } - // Edit authentication - if ($('.admin.edit.authentication').length > 0) { - const authType = $('#auth_type').val(); - if (authType == '2' || authType == '5') { - $('#security_protocol').change(onSecurityProtocolChange); - if (authType == '2') { - $('#use_paged_search').change(onUsePagedSearchChange); - } - } else if (authType == '6') { - $('#oauth2_provider').change(onOAuth2Change); - $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange); - onOAuth2Change(); - } - } - - // Notice - if ($('.admin.notice')) { - const $detailModal = $('#detail-modal'); - - // Attach view detail modals - $('.view-detail').click(function () { - $detailModal.find('.content p').text($(this).data('content')); - $detailModal.modal('show'); - return false; - }); - - // Select actions - const $checkboxes = $('.select.table .ui.checkbox'); - $('.select.action').click(function () { - switch ($(this).data('action')) { - case 'select-all': - $checkboxes.checkbox('check'); - break; - case 'deselect-all': - $checkboxes.checkbox('uncheck'); - break; - case 'inverse': - $checkboxes.checkbox('toggle'); - break; - } - }); - $('#delete-selection').click(function () { - const $this = $(this); - $this.addClass("loading disabled"); - const ids = []; - $checkboxes.each(function () { - if ($(this).checkbox('is checked')) { - ids.push($(this).data('id')); - } - }); - $.post($this.data('link'), { - "_csrf": csrf, - "ids": ids - }).done(function () { - window.location.href = $this.data('redirect'); - }); - }); - } -} - -function buttonsClickOnEnter() { - $('.ui.button').keypress(function (e) { - if (e.keyCode == 13 || e.keyCode == 32) // enter key or space bar - $(this).click(); - }); -} - -function searchUsers() { - const $searchUserBox = $('#search-user-box'); - $searchUserBox.search({ - minCharacters: 2, - apiSettings: { - url: suburl + '/api/v1/users/search?q={query}', - onResponse: function(response) { - const items = []; - $.each(response.data, function (_i, item) { - let title = item.login; - if (item.full_name && item.full_name.length > 0) { - title += ' (' + htmlEncode(item.full_name) + ')'; - } - items.push({ - title: title, - image: item.avatar_url - }) - }); - - return { results: items } - } - }, - searchFields: ['login', 'full_name'], - showNoResults: false - }); -} - -function searchTeams() { - const $searchTeamBox = $('#search-team-box'); - $searchTeamBox.search({ - minCharacters: 2, - apiSettings: { - url: suburl + '/api/v1/orgs/' + $searchTeamBox.data('org') + '/teams/search?q={query}', - headers: {"X-Csrf-Token": csrf}, - onResponse: function(response) { - const items = []; - $.each(response.data, function (_i, item) { - const title = item.name + ' (' + item.permission + ' access)'; - items.push({ - title: title, - }) - }); - - return { results: items } - } - }, - searchFields: ['name', 'description'], - showNoResults: false - }); -} - -function searchRepositories() { - const $searchRepoBox = $('#search-repo-box'); - $searchRepoBox.search({ - minCharacters: 2, - apiSettings: { - url: suburl + '/api/v1/repos/search?q={query}&uid=' + $searchRepoBox.data('uid'), - onResponse: function(response) { - const items = []; - $.each(response.data, function (_i, item) { - items.push({ - title: item.full_name.split("/")[1], - description: item.full_name - }) - }); - - return { results: items } - } - }, - searchFields: ['full_name'], - showNoResults: false - }); -} - -function initCodeView() { - if ($('.code-view .linenums').length > 0) { - $(document).on('click', '.lines-num span', function (e) { - const $select = $(this); - const $list = $select.parent().siblings('.lines-code').find('ol.linenums > li'); - selectRange($list, $list.filter('[rel=' + $select.attr('id') + ']'), (e.shiftKey ? $list.filter('.active').eq(0) : null)); - deSelect(); - }); - - $(window).on('hashchange', function () { - let m = window.location.hash.match(/^#(L\d+)-(L\d+)$/); - const $list = $('.code-view ol.linenums > li'); - let $first; - if (m) { - $first = $list.filter('.' + m[1]); - selectRange($list, $first, $list.filter('.' + m[2])); - $("html, body").scrollTop($first.offset().top - 200); - return; - } - m = window.location.hash.match(/^#(L|n)(\d+)$/); - if (m) { - $first = $list.filter('.L' + m[2]); - selectRange($list, $first); - $("html, body").scrollTop($first.offset().top - 200); - } - }).trigger('hashchange'); - } -} - -function initU2FAuth() { - if($('#wait-for-key').length === 0) { - return - } - u2fApi.ensureSupport() - .then(function () { - $.getJSON(suburl + '/user/u2f/challenge').success(function(req) { - u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30) - .then(u2fSigned) - .catch(function (err) { - if(err === undefined) { - u2fError(1); - return - } - u2fError(err.metaData.code); - }); - }); - }).catch(function () { - // Fallback in case browser do not support U2F - window.location.href = suburl + "/user/two_factor" - }) -} -function u2fSigned(resp) { - $.ajax({ - url: suburl + '/user/u2f/sign', - type: "POST", - headers: {"X-Csrf-Token": csrf}, - data: JSON.stringify(resp), - contentType: "application/json; charset=utf-8", - }).done(function(res){ - window.location.replace(res); - }).fail(function () { - u2fError(1); - }); -} - -function u2fRegistered(resp) { - if (checkError(resp)) { - return; - } - $.ajax({ - url: suburl + '/user/settings/security/u2f/register', - type: "POST", - headers: {"X-Csrf-Token": csrf}, - data: JSON.stringify(resp), - contentType: "application/json; charset=utf-8", - success: function(){ - reload(); - }, - fail: function () { - u2fError(1); - } - }); -} - -function checkError(resp) { - if (!('errorCode' in resp)) { - return false; - } - if (resp.errorCode === 0) { - return false; - } - u2fError(resp.errorCode); - return true; -} - - -function u2fError(errorType) { - const u2fErrors = { - 'browser': $('#unsupported-browser'), - 1: $('#u2f-error-1'), - 2: $('#u2f-error-2'), - 3: $('#u2f-error-3'), - 4: $('#u2f-error-4'), - 5: $('.u2f-error-5') - }; - u2fErrors[errorType].removeClass('hide'); - for(const type in u2fErrors){ - if(type != errorType){ - u2fErrors[type].addClass('hide'); - } - } - $('#u2f-error').modal('show'); -} - -function initU2FRegister() { - $('#register-device').modal({allowMultiple: false}); - $('#u2f-error').modal({allowMultiple: false}); - $('#register-security-key').on('click', function(e) { - e.preventDefault(); - u2fApi.ensureSupport() - .then(u2fRegisterRequest) - .catch(function() { - u2fError('browser'); - }) - }) -} - -function u2fRegisterRequest() { - $.post(suburl + "/user/settings/security/u2f/request_register", { - "_csrf": csrf, - "name": $('#nickname').val() - }).success(function(req) { - $("#nickname").closest("div.field").removeClass("error"); - $('#register-device').modal('show'); - if(req.registeredKeys === null) { - req.registeredKeys = [] - } - u2fApi.register(req.appId, req.registerRequests, req.registeredKeys, 30) - .then(u2fRegistered) - .catch(function (reason) { - if(reason === undefined) { - u2fError(1); - return - } - u2fError(reason.metaData.code); - }); - }).fail(function(xhr) { - if(xhr.status === 409) { - $("#nickname").closest("div.field").addClass("error"); - } - }); -} - -function initWipTitle() { - $(".title_wip_desc > a").click(function (e) { - e.preventDefault(); - - const $issueTitle = $("#issue_title"); - $issueTitle.focus(); - const value = $issueTitle.val().trim().toUpperCase(); - - for (const i in wipPrefixes) { - if (value.startsWith(wipPrefixes[i].toUpperCase())) { - return; - } - } - - $issueTitle.val(wipPrefixes[0] + " " + $issueTitle.val()); - }); -} - -function initTemplateSearch() { - const $repoTemplate = $("#repo_template"); - const checkTemplate = function() { - const $templateUnits = $("#template_units"); - const $nonTemplate = $("#non_template"); - if ($repoTemplate.val() !== "") { - $templateUnits.show(); - $nonTemplate.hide(); - } else { - $templateUnits.hide(); - $nonTemplate.show(); - } - }; - $repoTemplate.change(checkTemplate); - checkTemplate(); - - const changeOwner = function() { - $("#repo_template_search") - .dropdown({ - apiSettings: { - url: suburl + '/api/v1/repos/search?q={query}&template=true&priority_owner_id=' + $("#uid").val(), - onResponse: function(response) { - const filteredResponse = {'success': true, 'results': []}; - filteredResponse.results.push({ - 'name': '', - 'value': '' - }); - // Parse the response from the api to work with our dropdown - $.each(response.data, function(_r, repo) { - filteredResponse.results.push({ - 'name' : htmlEncode(repo.full_name) , - 'value' : repo.id - }); - }); - return filteredResponse; - }, - cache: false, - }, - - fullTextSearch: true - }); - }; - $("#uid").change(changeOwner); - changeOwner(); -} - -$(document).ready(function () { - csrf = $('meta[name=_csrf]').attr("content"); - suburl = $('meta[name=_suburl]').attr("content"); - - // Show exact time - $('.time-since').each(function () { - $(this).addClass('poping up').attr('data-content', $(this).attr('title')).attr('data-variation', 'inverted tiny').attr('title', ''); - }); - - // Semantic UI modules. - $('.dropdown:not(.custom)').dropdown(); - $('.jump.dropdown').dropdown({ - action: 'hide', - onShow: function () { - $('.poping.up').popup('hide'); - } - }); - $('.slide.up.dropdown').dropdown({ - transition: 'slide up' - }); - $('.upward.dropdown').dropdown({ - direction: 'upward' - }); - $('.ui.accordion').accordion(); - $('.ui.checkbox').checkbox(); - $('.ui.progress').progress({ - showActivity: false - }); - $('.poping.up').popup(); - $('.top.menu .poping.up').popup({ - onShow: function () { - if ($('.top.menu .menu.transition').hasClass('visible')) { - return false; - } - } - }); - $('.tabular.menu .item').tab(); - $('.tabable.menu .item').tab(); - - $('.toggle.button').click(function () { - $($(this).data('target')).slideToggle(100); - }); - - // make table element clickable like a link - $('tr[data-href]').click(function() { - window.location = $(this).data('href'); - }); - - // Highlight JS - if (typeof hljs != 'undefined') { - const nodes = [].slice.call(document.querySelectorAll('pre code') || []); - for (let i = 0; i < nodes.length; i++) { - hljs.highlightBlock(nodes[i]); - } - } - - // Dropzone - const $dropzone = $('#dropzone'); - if ($dropzone.length > 0) { - const filenameDict = {}; - - new Dropzone("#dropzone", { - url: $dropzone.data('upload-url'), - headers: {"X-Csrf-Token": csrf}, - maxFiles: $dropzone.data('max-file'), - maxFilesize: $dropzone.data('max-size'), - acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'), - addRemoveLinks: true, - dictDefaultMessage: $dropzone.data('default-message'), - dictInvalidFileType: $dropzone.data('invalid-input-type'), - dictFileTooBig: $dropzone.data('file-too-big'), - dictRemoveFile: $dropzone.data('remove-file'), - init: function () { - this.on("success", function (file, data) { - filenameDict[file.name] = data.uuid; - const input = $('').val(data.uuid); - $('.files').append(input); - }); - this.on("removedfile", function (file) { - if (file.name in filenameDict) { - $('#' + filenameDict[file.name]).remove(); - } - if ($dropzone.data('remove-url') && $dropzone.data('csrf')) { - $.post($dropzone.data('remove-url'), { - file: filenameDict[file.name], - _csrf: $dropzone.data('csrf') - }); - } - }) - }, - }); - } - - // Emojify - emojify.setConfig({ - img_dir: suburl + '/vendor/plugins/emojify/images', - ignore_emoticons: true - }); - const hasEmoji = document.getElementsByClassName('has-emoji'); - for (let i = 0; i < hasEmoji.length; i++) { - emojify.run(hasEmoji[i]); - for (let j = 0; j < hasEmoji[i].childNodes.length; j++) { - if (hasEmoji[i].childNodes[j].nodeName === "A") { - emojify.run(hasEmoji[i].childNodes[j]) - } - } - } - - // Clipboard JS - const clipboard = new Clipboard('.clipboard'); - clipboard.on('success', function (e) { - e.clearSelection(); - - $('#' + e.trigger.getAttribute('id')).popup('destroy'); - e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-success')) - $('#' + e.trigger.getAttribute('id')).popup('show'); - e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original')) - }); - - clipboard.on('error', function (e) { - $('#' + e.trigger.getAttribute('id')).popup('destroy'); - e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-error')) - $('#' + e.trigger.getAttribute('id')).popup('show'); - e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original')) - }); - - // Helpers. - $('.delete-button').click(showDeletePopup); - $('.add-all-button').click(showAddAllPopup); - - $('.delete-branch-button').click(showDeletePopup); - - $('.undo-button').click(function() { - const $this = $(this); - $.post($this.data('url'), { - "_csrf": csrf, - "id": $this.data("id") - }).done(function(data) { - window.location.href = data.redirect; - }); - }); - $('.show-panel.button').click(function () { - $($(this).data('panel')).show(); - }); - $('.show-modal.button').click(function () { - $($(this).data('modal')).modal('show'); - }); - $('.delete-post.button').click(function () { - const $this = $(this); - $.post($this.data('request-url'), { - "_csrf": csrf - }).done(function () { - window.location.href = $this.data('done-url'); - }); - }); - - // Set anchor. - $('.markdown').each(function () { - const headers = {}; - $(this).find('h1, h2, h3, h4, h5, h6').each(function () { - let node = $(this); - const val = encodeURIComponent(node.text().toLowerCase().replace(/[^\u00C0-\u1FFF\u2C00-\uD7FF\w\- ]/g, '').replace(/[ ]/g, '-')); - let name = val; - if (headers[val] > 0) { - name = val + '-' + headers[val]; - } - if (headers[val] == undefined) { - headers[val] = 1; - } else { - headers[val] += 1; - } - node = node.wrap('
'); - node.append(''); - }); - }); - - $('.issue-checkbox').click(function() { - const numChecked = $('.issue-checkbox').children('input:checked').length; - if (numChecked > 0) { - $('#issue-filters').addClass("hide"); - $('#issue-actions').removeClass("hide"); - } else { - $('#issue-filters').removeClass("hide"); - $('#issue-actions').addClass("hide"); - } - }); - - $('.issue-action').click(function () { - let action = this.dataset.action; - let elementId = this.dataset.elementId; - const issueIDs = $('.issue-checkbox').children('input:checked').map(function() { - return this.dataset.issueId; - }).get().join(); - const url = this.dataset.url; - if (elementId === '0' && url.substr(-9) === '/assignee'){ - elementId = ''; - action = 'clear'; - } - updateIssuesMeta(url, action, issueIDs, elementId).then(function() { - // NOTICE: This reset of checkbox state targets Firefox caching behaviour, as the checkboxes stay checked after reload - if (action === "close" || action === "open" ){ - //uncheck all checkboxes - $('.issue-checkbox input[type="checkbox"]').each(function(_,e){ e.checked = false; }); - } - reload(); - }); - }); - - // NOTICE: This event trigger targets Firefox caching behaviour, as the checkboxes stay checked after reload - // trigger ckecked event, if checkboxes are checked on load - $('.issue-checkbox input[type="checkbox"]:checked').first().each(function(_,e) { - e.checked = false; - $(e).click(); - }); - - buttonsClickOnEnter(); - searchUsers(); - searchTeams(); - searchRepositories(); - - initCommentForm(); - initInstall(); - initRepository(); - initMigration(); - initWikiForm(); - initEditForm(); - initEditor(); - initOrganization(); - initWebhook(); - initAdmin(); - initCodeView(); - initVueApp(); - initTeamSettings(); - initCtrlEnterSubmit(); - initNavbarContentToggle(); - initTopicbar(); - initU2FAuth(); - initU2FRegister(); - initIssueList(); - initWipTitle(); - initPullRequestReview(); - initRepoStatusChecker(); - initTemplateSearch(); - - // Repo clone url. - if ($('#repo-clone-url').length > 0) { - switch (localStorage.getItem('repo-clone-protocol')) { - case 'ssh': - if ($('#repo-clone-ssh').click().length === 0) { - $('#repo-clone-https').click(); - } - break; - default: - $('#repo-clone-https').click(); - break; - } - } - - const routes = { - 'div.user.settings': initUserSettings, - 'div.repository.settings.collaboration': initRepositoryCollaboration - }; - - let selector; - for (selector in routes) { - if ($(selector).length > 0) { - routes[selector](); - break; - } - } - - const $cloneAddr = $('#clone_addr'); - $cloneAddr.change(function() { - const $repoName = $('#repo_name'); - if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank - $repoName.val($cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]); - } + // Options + if ($('.user.settings.profile').length > 0) { + $('#username').keyup(function () { + const $prompt = $('#name-change-prompt'); + if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) { + $prompt.show(); + } else { + $prompt.hide(); + } }); -}); + } +} -function changeHash(hash) { - if (history.pushState) { - history.pushState(null, null, hash); - } - else { - location.hash = hash; - } +function initWebhook() { + if ($('.new.webhook').length === 0) { + return; + } + + $('.events.checkbox input').change(function () { + if ($(this).is(':checked')) { + $('.events.fields').show(); + } + }); + $('.non-events.checkbox input').change(function () { + if ($(this).is(':checked')) { + $('.events.fields').hide(); + } + }); + + const updateContentType = function () { + const visible = $('#http_method').val() === 'POST'; + $('#content_type').parent().parent()[visible ? 'show' : 'hide'](); + }; + updateContentType(); + $('#http_method').change(() => { + updateContentType(); + }); + + // Test delivery + $('#test-delivery').click(function () { + const $this = $(this); + $this.addClass('loading disabled'); + $.post($this.data('link'), { + _csrf: csrf + }).done( + setTimeout(() => { + window.location.href = $this.data('redirect'); + }, 5000) + ); + }); } -function deSelect() { - if (window.getSelection) { - window.getSelection().removeAllRanges(); +function initAdmin() { + if ($('.admin').length === 0) { + return; + } + + // New user + if ($('.admin.new.user').length > 0 || $('.admin.edit.user').length > 0) { + $('#login_type').change(function () { + if ($(this).val().substring(0, 1) === '0') { + $('#login_name').removeAttr('required'); + $('.non-local').hide(); + $('.local').show(); + $('#user_name').focus(); + + if ($(this).data('password') === 'required') { + $('#password').attr('required', 'required'); + } + } else { + $('#login_name').attr('required', 'required'); + $('.non-local').show(); + $('.local').hide(); + $('#login_name').focus(); + + $('#password').removeAttr('required'); + } + }); + } + + function onSecurityProtocolChange() { + if ($('#security_protocol').val() > 0) { + $('.has-tls').show(); } else { - document.selection.empty(); + $('.has-tls').hide(); } + } + + function onUsePagedSearchChange() { + if ($('#use_paged_search').prop('checked')) { + $('.search-page-size').show() + .find('input').attr('required', 'required'); + } else { + $('.search-page-size').hide() + .find('input').removeAttr('required'); + } + } + + function onOAuth2Change() { + $('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url').hide(); + $('.open_id_connect_auto_discovery_url input[required]').removeAttr('required'); + + const provider = $('#oauth2_provider').val(); + switch (provider) { + case 'github': + case 'gitlab': + case 'gitea': + $('.oauth2_use_custom_url').show(); + break; + case 'openidConnect': + $('.open_id_connect_auto_discovery_url input').attr('required', 'required'); + $('.open_id_connect_auto_discovery_url').show(); + break; + } + onOAuth2UseCustomURLChange(); + } + + function onOAuth2UseCustomURLChange() { + const provider = $('#oauth2_provider').val(); + $('.oauth2_use_custom_url_field').hide(); + $('.oauth2_use_custom_url_field input[required]').removeAttr('required'); + + if ($('#oauth2_use_custom_url').is(':checked')) { + if (!$('#oauth2_token_url').val()) { + $('#oauth2_token_url').val($(`#${provider}_token_url`).val()); + } + if (!$('#oauth2_auth_url').val()) { + $('#oauth2_auth_url').val($(`#${provider}_auth_url`).val()); + } + if (!$('#oauth2_profile_url').val()) { + $('#oauth2_profile_url').val($(`#${provider}_profile_url`).val()); + } + if (!$('#oauth2_email_url').val()) { + $('#oauth2_email_url').val($(`#${provider}_email_url`).val()); + } + switch (provider) { + case 'github': + $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input').attr('required', 'required'); + $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url').show(); + break; + case 'gitea': + case 'gitlab': + $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input').attr('required', 'required'); + $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url').show(); + $('#oauth2_email_url').val(''); + break; + } + } + } + + // New authentication + if ($('.admin.new.authentication').length > 0) { + $('#auth_type').change(function () { + $('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size').hide(); + + $('.ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]').removeAttr('required'); + $('.binddnrequired').removeClass('required'); + + const authType = $(this).val(); + switch (authType) { + case '2': // LDAP + $('.ldap').show(); + $('.binddnrequired input, .ldap div.required:not(.dldap) input').attr('required', 'required'); + $('.binddnrequired').addClass('required'); + break; + case '3': // SMTP + $('.smtp').show(); + $('.has-tls').show(); + $('.smtp div.required input, .has-tls').attr('required', 'required'); + break; + case '4': // PAM + $('.pam').show(); + $('.pam input').attr('required', 'required'); + break; + case '5': // LDAP + $('.dldap').show(); + $('.dldap div.required:not(.ldap) input').attr('required', 'required'); + break; + case '6': // OAuth2 + $('.oauth2').show(); + $('.oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input').attr('required', 'required'); + onOAuth2Change(); + break; + } + if (authType === '2' || authType === '5') { + onSecurityProtocolChange(); + } + if (authType === '2') { + onUsePagedSearchChange(); + } + }); + $('#auth_type').change(); + $('#security_protocol').change(onSecurityProtocolChange); + $('#use_paged_search').change(onUsePagedSearchChange); + $('#oauth2_provider').change(onOAuth2Change); + $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange); + } + // Edit authentication + if ($('.admin.edit.authentication').length > 0) { + const authType = $('#auth_type').val(); + if (authType === '2' || authType === '5') { + $('#security_protocol').change(onSecurityProtocolChange); + if (authType === '2') { + $('#use_paged_search').change(onUsePagedSearchChange); + } + } else if (authType === '6') { + $('#oauth2_provider').change(onOAuth2Change); + $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange); + onOAuth2Change(); + } + } + + // Notice + if ($('.admin.notice')) { + const $detailModal = $('#detail-modal'); + + // Attach view detail modals + $('.view-detail').click(function () { + $detailModal.find('.content p').text($(this).data('content')); + $detailModal.modal('show'); + return false; + }); + + // Select actions + const $checkboxes = $('.select.table .ui.checkbox'); + $('.select.action').click(function () { + switch ($(this).data('action')) { + case 'select-all': + $checkboxes.checkbox('check'); + break; + case 'deselect-all': + $checkboxes.checkbox('uncheck'); + break; + case 'inverse': + $checkboxes.checkbox('toggle'); + break; + } + }); + $('#delete-selection').click(function () { + const $this = $(this); + $this.addClass('loading disabled'); + const ids = []; + $checkboxes.each(function () { + if ($(this).checkbox('is checked')) { + ids.push($(this).data('id')); + } + }); + $.post($this.data('link'), { + _csrf: csrf, + ids + }).done(() => { + window.location.href = $this.data('redirect'); + }); + }); + } } -function selectRange($list, $select, $from) { - $list.removeClass('active'); - if ($from) { - let a = parseInt($select.attr('rel').substr(1)); - let b = parseInt($from.attr('rel').substr(1)); - let c; - if (a != b) { - if (a > b) { - c = a; - a = b; - b = c; - } - const classes = []; - for (let i = a; i <= b; i++) { - classes.push('.L' + i); - } - $list.filter(classes.join(',')).addClass('active'); - changeHash('#L' + a + '-' + 'L' + b); - return - } +function buttonsClickOnEnter() { + $('.ui.button').keypress(function (e) { + if (e.keyCode === 13 || e.keyCode === 32) { // enter key or space bar + $(this).click(); } - $select.addClass('active'); - changeHash('#' + $select.attr('rel')); + }); } -$(function () { - // Warn users that try to leave a page after entering data into a form. - // Except on sign-in pages, and for forms marked as 'ignore-dirty'. - if ($('.user.signin').length === 0) { - $('form:not(.ignore-dirty)').areYouSure(); - } +function searchUsers() { + const $searchUserBox = $('#search-user-box'); + $searchUserBox.search({ + minCharacters: 2, + apiSettings: { + url: `${suburl}/api/v1/users/search?q={query}`, + onResponse(response) { + const items = []; + $.each(response.data, (_i, item) => { + let title = item.login; + if (item.full_name && item.full_name.length > 0) { + title += ` (${htmlEncode(item.full_name)})`; + } + items.push({ + title, + image: item.avatar_url + }); + }); - // Parse SSH Key - $("#ssh-key-content").on('change paste keyup',function(){ - const arrays = $(this).val().split(" "); - const $title = $("#ssh-key-title") - if ($title.val() === "" && arrays.length === 3 && arrays[2] !== "") { - $title.val(arrays[2]); - } - }); -}); + return { results: items }; + } + }, + searchFields: ['login', 'full_name'], + showNoResults: false + }); +} -function showDeletePopup() { - const $this = $(this); - let filter = ""; - if ($this.attr("id")) { - filter += "#" + $this.attr("id") - } +function searchTeams() { + const $searchTeamBox = $('#search-team-box'); + $searchTeamBox.search({ + minCharacters: 2, + apiSettings: { + url: `${suburl}/api/v1/orgs/${$searchTeamBox.data('org')}/teams/search?q={query}`, + headers: { 'X-Csrf-Token': csrf }, + onResponse(response) { + const items = []; + $.each(response.data, (_i, item) => { + const title = `${item.name} (${item.permission} access)`; + items.push({ + title, + }); + }); - const dialog = $('.delete.modal' + filter); - dialog.find('.name').text($this.data('name')); + return { results: items }; + } + }, + searchFields: ['name', 'description'], + showNoResults: false + }); +} - dialog.modal({ - closable: false, - onApprove: function() { - if ($this.data('type') == "form") { - $($this.data('form')).submit(); - return; - } +function searchRepositories() { + const $searchRepoBox = $('#search-repo-box'); + $searchRepoBox.search({ + minCharacters: 2, + apiSettings: { + url: `${suburl}/api/v1/repos/search?q={query}&uid=${$searchRepoBox.data('uid')}`, + onResponse(response) { + const items = []; + $.each(response.data, (_i, item) => { + items.push({ + title: item.full_name.split('/')[1], + description: item.full_name + }); + }); - $.post($this.data('url'), { - "_csrf": csrf, - "id": $this.data("id") - }).done(function(data) { - window.location.href = data.redirect; - }); - } - }).modal('show'); - return false; + return { results: items }; + } + }, + searchFields: ['full_name'], + showNoResults: false + }); } -function showAddAllPopup() { - const $this = $(this); - let filter = ""; - if ($this.attr("id")) { - filter += "#" + $this.attr("id") - } +function initCodeView() { + if ($('.code-view .linenums').length > 0) { + $(document).on('click', '.lines-num span', function (e) { + const $select = $(this); + const $list = $select.parent().siblings('.lines-code').find('ol.linenums > li'); + selectRange($list, $list.filter(`[rel=${$select.attr('id')}]`), (e.shiftKey ? $list.filter('.active').eq(0) : null)); + deSelect(); + }); + + $(window).on('hashchange', () => { + let m = window.location.hash.match(/^#(L\d+)-(L\d+)$/); + const $list = $('.code-view ol.linenums > li'); + let $first; + if (m) { + $first = $list.filter(`.${m[1]}`); + selectRange($list, $first, $list.filter(`.${m[2]}`)); + $('html, body').scrollTop($first.offset().top - 200); + return; + } + m = window.location.hash.match(/^#(L|n)(\d+)$/); + if (m) { + $first = $list.filter(`.L${m[2]}`); + selectRange($list, $first); + $('html, body').scrollTop($first.offset().top - 200); + } + }).trigger('hashchange'); + } +} - const dialog = $('.addall.modal' + filter); - dialog.find('.name').text($this.data('name')); +function initU2FAuth() { + if ($('#wait-for-key').length === 0) { + return; + } + u2fApi.ensureSupport() + .then(() => { + $.getJSON(`${suburl}/user/u2f/challenge`).success((req) => { + u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30) + .then(u2fSigned) + .catch((err) => { + if (err === undefined) { + u2fError(1); + return; + } + u2fError(err.metaData.code); + }); + }); + }).catch(() => { + // Fallback in case browser do not support U2F + window.location.href = `${suburl}/user/two_factor`; + }); +} +function u2fSigned(resp) { + $.ajax({ + url: `${suburl}/user/u2f/sign`, + type: 'POST', + headers: { 'X-Csrf-Token': csrf }, + data: JSON.stringify(resp), + contentType: 'application/json; charset=utf-8', + }).done((res) => { + window.location.replace(res); + }).fail(() => { + u2fError(1); + }); +} - dialog.modal({ - closable: false, - onApprove: function() { - if ($this.data('type') == "form") { - $($this.data('form')).submit(); - return; - } +function u2fRegistered(resp) { + if (checkError(resp)) { + return; + } + $.ajax({ + url: `${suburl}/user/settings/security/u2f/register`, + type: 'POST', + headers: { 'X-Csrf-Token': csrf }, + data: JSON.stringify(resp), + contentType: 'application/json; charset=utf-8', + success() { + reload(); + }, + fail() { + u2fError(1); + } + }); +} - $.post($this.data('url'), { - "_csrf": csrf, - "id": $this.data("id") - }).done(function(data) { - window.location.href = data.redirect; - }); - } - }).modal('show'); +function checkError(resp) { + if (!('errorCode' in resp)) { + return false; + } + if (resp.errorCode === 0) { return false; + } + u2fError(resp.errorCode); + return true; } -function initVueComponents(){ - const vueDelimeters = ['${', '}']; - - Vue.component('repo-search', { - delimiters: vueDelimeters, - - props: { - searchLimit: { - type: Number, - default: 10 - }, - suburl: { - type: String, - required: true - }, - uid: { - type: Number, - required: true - }, - organizations: { - type: Array, - default: [] - }, - isOrganization: { - type: Boolean, - default: true - }, - canCreateOrganization: { - type: Boolean, - default: false - }, - organizationsTotalCount: { - type: Number, - default: 0 - }, - moreReposLink: { - type: String, - default: '' - } - }, - - data: function() { - return { - tab: 'repos', - repos: [], - reposTotalCount: 0, - reposFilter: 'all', - searchQuery: '', - isLoading: false, - repoTypes: { - 'all': { - count: 0, - searchMode: '', - }, - 'forks': { - count: 0, - searchMode: 'fork', - }, - 'mirrors': { - count: 0, - searchMode: 'mirror', - }, - 'sources': { - count: 0, - searchMode: 'source', - }, - 'collaborative': { - count: 0, - searchMode: 'collaborative', - }, - } - } - }, - - computed: { - showMoreReposLink: function() { - return this.repos.length > 0 && this.repos.length < this.repoTypes[this.reposFilter].count; - }, - searchURL: function() { - return this.suburl + '/api/v1/repos/search?sort=updated&order=desc&uid=' + this.uid + '&q=' + this.searchQuery - + '&limit=' + this.searchLimit + '&mode=' + this.repoTypes[this.reposFilter].searchMode - + (this.reposFilter !== 'all' ? '&exclusive=1' : ''); - }, - repoTypeCount: function() { - return this.repoTypes[this.reposFilter].count; - } - }, - mounted: function() { - this.searchRepos(this.reposFilter); +function u2fError(errorType) { + const u2fErrors = { + browser: $('#unsupported-browser'), + 1: $('#u2f-error-1'), + 2: $('#u2f-error-2'), + 3: $('#u2f-error-3'), + 4: $('#u2f-error-4'), + 5: $('.u2f-error-5') + }; + u2fErrors[errorType].removeClass('hide'); - const self = this; - Vue.nextTick(function() { - self.$refs.search.focus(); - }); - }, + Object.keys(u2fErrors).forEach((type) => { + if (type !== errorType) { + u2fErrors[type].addClass('hide'); + } + }); + $('#u2f-error').modal('show'); +} - methods: { - changeTab: function(t) { - this.tab = t; - }, - - changeReposFilter: function(filter) { - this.reposFilter = filter; - this.repos = []; - this.repoTypes[filter].count = 0; - this.searchRepos(filter); - }, - - showRepo: function(repo, filter) { - switch (filter) { - case 'sources': - return repo.owner.id == this.uid && !repo.mirror && !repo.fork; - case 'forks': - return repo.owner.id == this.uid && !repo.mirror && repo.fork; - case 'mirrors': - return repo.mirror; - case 'collaborative': - return repo.owner.id != this.uid && !repo.mirror; - default: - return true; - } - }, - - searchRepos: function(reposFilter) { - const self = this; - - this.isLoading = true; - - const searchedMode = this.repoTypes[reposFilter].searchMode; - const searchedURL = this.searchURL; - const searchedQuery = this.searchQuery; - - $.getJSON(searchedURL, function(result, _textStatus, request) { - if (searchedURL == self.searchURL) { - self.repos = result.data; - const count = request.getResponseHeader('X-Total-Count'); - if (searchedQuery === '' && searchedMode === '') { - self.reposTotalCount = count; - } - self.repoTypes[reposFilter].count = count; - } - }).always(function() { - if (searchedURL == self.searchURL) { - self.isLoading = false; - } - }); - }, - - repoClass: function(repo) { - if (repo.fork) { - return 'octicon octicon-repo-forked'; - } else if (repo.mirror) { - return 'octicon octicon-repo-clone'; - } else if (repo.private) { - return 'octicon octicon-lock'; - } else { - return 'octicon octicon-repo'; - } - } - } - }) +function initU2FRegister() { + $('#register-device').modal({ allowMultiple: false }); + $('#u2f-error').modal({ allowMultiple: false }); + $('#register-security-key').on('click', (e) => { + e.preventDefault(); + u2fApi.ensureSupport() + .then(u2fRegisterRequest) + .catch(() => { + u2fError('browser'); + }); + }); } -function initCtrlEnterSubmit() { - $(".js-quick-submit").keydown(function(e) { - if (((e.ctrlKey && !e.altKey) || e.metaKey) && (e.keyCode == 13 || e.keyCode == 10)) { - $(this).closest("form").submit(); +function u2fRegisterRequest() { + $.post(`${suburl}/user/settings/security/u2f/request_register`, { + _csrf: csrf, + name: $('#nickname').val() + }).success((req) => { + $('#nickname').closest('div.field').removeClass('error'); + $('#register-device').modal('show'); + if (req.registeredKeys === null) { + req.registeredKeys = []; + } + u2fApi.register(req.appId, req.registerRequests, req.registeredKeys, 30) + .then(u2fRegistered) + .catch((reason) => { + if (reason === undefined) { + u2fError(1); + return; } - }); + u2fError(reason.metaData.code); + }); + }).fail((xhr) => { + if (xhr.status === 409) { + $('#nickname').closest('div.field').addClass('error'); + } + }); } -function initVueApp() { - const el = document.getElementById('app'); - if (!el) { +function initWipTitle() { + $('.title_wip_desc > a').click((e) => { + e.preventDefault(); + + const $issueTitle = $('#issue_title'); + $issueTitle.focus(); + const value = $issueTitle.val().trim().toUpperCase(); + + for (const i in wipPrefixes) { + if (value.startsWith(wipPrefixes[i].toUpperCase())) { return; + } } - initVueComponents(); + $issueTitle.val(`${wipPrefixes[0]} ${$issueTitle.val()}`); + }); +} - new Vue({ - delimiters: ['${', '}'], - el: el, +function initTemplateSearch() { + const $repoTemplate = $('#repo_template'); + const checkTemplate = function () { + const $templateUnits = $('#template_units'); + const $nonTemplate = $('#non_template'); + if ($repoTemplate.val() !== '') { + $templateUnits.show(); + $nonTemplate.hide(); + } else { + $templateUnits.hide(); + $nonTemplate.show(); + } + }; + $repoTemplate.change(checkTemplate); + checkTemplate(); - data: { - searchLimit: document.querySelector('meta[name=_search_limit]').content, - suburl: document.querySelector('meta[name=_suburl]').content, - uid: document.querySelector('meta[name=_context_uid]').content, + const changeOwner = function () { + $('#repo_template_search') + .dropdown({ + apiSettings: { + url: `${suburl}/api/v1/repos/search?q={query}&template=true&priority_owner_id=${$('#uid').val()}`, + onResponse(response) { + const filteredResponse = { success: true, results: [] }; + filteredResponse.results.push({ + name: '', + value: '' + }); + // Parse the response from the api to work with our dropdown + $.each(response.data, (_r, repo) => { + filteredResponse.results.push({ + name: htmlEncode(repo.full_name), + value: repo.id + }); + }); + return filteredResponse; + }, + cache: false, }, - }); -} -window.timeAddManual = function() { - $('.mini.modal') - .modal({ - duration: 200, - onApprove: function() { - $('#add_time_manual_form').submit(); - } - }).modal('show') - ; -} + fullTextSearch: true + }); + }; + $('#uid').change(changeOwner); + changeOwner(); +} + +$(document).ready(() => { + csrf = $('meta[name=_csrf]').attr('content'); + suburl = $('meta[name=_suburl]').attr('content'); + + // Show exact time + $('.time-since').each(function () { + $(this) + .addClass('poping up') + .attr('data-content', $(this).attr('title')) + .attr('data-variation', 'inverted tiny') + .attr('title', ''); + }); + + // Semantic UI modules. + $('.dropdown:not(.custom)').dropdown(); + $('.jump.dropdown').dropdown({ + action: 'hide', + onShow() { + $('.poping.up').popup('hide'); + } + }); + $('.slide.up.dropdown').dropdown({ + transition: 'slide up' + }); + $('.upward.dropdown').dropdown({ + direction: 'upward' + }); + $('.ui.accordion').accordion(); + $('.ui.checkbox').checkbox(); + $('.ui.progress').progress({ + showActivity: false + }); + $('.poping.up').popup(); + $('.top.menu .poping.up').popup({ + onShow() { + if ($('.top.menu .menu.transition').hasClass('visible')) { + return false; + } + } + }); + $('.tabular.menu .item').tab(); + $('.tabable.menu .item').tab(); + + $('.toggle.button').click(function () { + $($(this).data('target')).slideToggle(100); + }); + + // make table element clickable like a link + $('tr[data-href]').click(function () { + window.location = $(this).data('href'); + }); + + // Highlight JS + if (typeof hljs !== 'undefined') { + const nodes = [].slice.call(document.querySelectorAll('pre code') || []); + for (let i = 0; i < nodes.length; i++) { + hljs.highlightBlock(nodes[i]); + } + } + + // Dropzone + const $dropzone = $('#dropzone'); + if ($dropzone.length > 0) { + const filenameDict = {}; + + new Dropzone('#dropzone', { + url: $dropzone.data('upload-url'), + headers: { 'X-Csrf-Token': csrf }, + maxFiles: $dropzone.data('max-file'), + maxFilesize: $dropzone.data('max-size'), + acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'), + addRemoveLinks: true, + dictDefaultMessage: $dropzone.data('default-message'), + dictInvalidFileType: $dropzone.data('invalid-input-type'), + dictFileTooBig: $dropzone.data('file-too-big'), + dictRemoveFile: $dropzone.data('remove-file'), + init() { + this.on('success', (file, data) => { + filenameDict[file.name] = data.uuid; + const input = $(``).val(data.uuid); + $('.files').append(input); + }); + this.on('removedfile', (file) => { + if (file.name in filenameDict) { + $(`#${filenameDict[file.name]}`).remove(); + } + if ($dropzone.data('remove-url') && $dropzone.data('csrf')) { + $.post($dropzone.data('remove-url'), { + file: filenameDict[file.name], + _csrf: $dropzone.data('csrf') + }); + } + }); + }, + }); + } + + // Emojify + emojify.setConfig({ + img_dir: `${suburl}/vendor/plugins/emojify/images`, + ignore_emoticons: true + }); + const hasEmoji = document.getElementsByClassName('has-emoji'); + for (let i = 0; i < hasEmoji.length; i++) { + emojify.run(hasEmoji[i]); + for (let j = 0; j < hasEmoji[i].childNodes.length; j++) { + if (hasEmoji[i].childNodes[j].nodeName === 'A') { + emojify.run(hasEmoji[i].childNodes[j]); + } + } + } + + // Clipboard JS + const clipboard = new Clipboard('.clipboard'); + clipboard.on('success', (e) => { + e.clearSelection(); + + $(`#${e.trigger.getAttribute('id')}`).popup('destroy'); + e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-success')); + $(`#${e.trigger.getAttribute('id')}`).popup('show'); + e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original')); + }); + + clipboard.on('error', (e) => { + $(`#${e.trigger.getAttribute('id')}`).popup('destroy'); + e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-error')); + $(`#${e.trigger.getAttribute('id')}`).popup('show'); + e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original')); + }); + + // Helpers. + $('.delete-button').click(showDeletePopup); + $('.add-all-button').click(showAddAllPopup); + + $('.delete-branch-button').click(showDeletePopup); + + $('.undo-button').click(function () { + const $this = $(this); + $.post($this.data('url'), { + _csrf: csrf, + id: $this.data('id') + }).done((data) => { + window.location.href = data.redirect; + }); + }); + $('.show-panel.button').click(function () { + $($(this).data('panel')).show(); + }); + $('.show-modal.button').click(function () { + $($(this).data('modal')).modal('show'); + }); + $('.delete-post.button').click(function () { + const $this = $(this); + $.post($this.data('request-url'), { + _csrf: csrf + }).done(() => { + window.location.href = $this.data('done-url'); + }); + }); + + // Set anchor. + $('.markdown').each(function () { + const headers = {}; + $(this).find('h1, h2, h3, h4, h5, h6').each(function () { + let node = $(this); + const val = encodeURIComponent(node.text().toLowerCase().replace(/[^\u00C0-\u1FFF\u2C00-\uD7FF\w\- ]/g, '').replace(/[ ]/g, '-')); + let name = val; + if (headers[val] > 0) { + name = `${val}-${headers[val]}`; + } + if (headers[val] === undefined) { + headers[val] = 1; + } else { + headers[val] += 1; + } + node = node.wrap(`
`); + node.append(``); + }); + }); + + $('.issue-checkbox').click(() => { + const numChecked = $('.issue-checkbox').children('input:checked').length; + if (numChecked > 0) { + $('#issue-filters').addClass('hide'); + $('#issue-actions').removeClass('hide'); + } else { + $('#issue-filters').removeClass('hide'); + $('#issue-actions').addClass('hide'); + } + }); + + $('.issue-action').click(function () { + let { action } = this.dataset; + let { elementId } = this.dataset; + const issueIDs = $('.issue-checkbox').children('input:checked').map(function () { + return this.dataset.issueId; + }).get().join(); + const { url } = this.dataset; + if (elementId === '0' && url.substr(-9) === '/assignee') { + elementId = ''; + action = 'clear'; + } + updateIssuesMeta(url, action, issueIDs, elementId).then(() => { + // NOTICE: This reset of checkbox state targets Firefox caching behaviour, as the checkboxes stay checked after reload + if (action === 'close' || action === 'open') { + // uncheck all checkboxes + $('.issue-checkbox input[type="checkbox"]').each((_, e) => { e.checked = false; }); + } + reload(); + }); + }); + + // NOTICE: This event trigger targets Firefox caching behaviour, as the checkboxes stay checked after reload + // trigger ckecked event, if checkboxes are checked on load + $('.issue-checkbox input[type="checkbox"]:checked').first().each((_, e) => { + e.checked = false; + $(e).click(); + }); + + buttonsClickOnEnter(); + searchUsers(); + searchTeams(); + searchRepositories(); + + initCommentForm(); + initInstall(); + initRepository(); + initMigration(); + initWikiForm(); + initEditForm(); + initEditor(); + initOrganization(); + initWebhook(); + initAdmin(); + initCodeView(); + initVueApp(); + initTeamSettings(); + initCtrlEnterSubmit(); + initNavbarContentToggle(); + initTopicbar(); + initU2FAuth(); + initU2FRegister(); + initIssueList(); + initWipTitle(); + initPullRequestReview(); + initRepoStatusChecker(); + initTemplateSearch(); + + // Repo clone url. + if ($('#repo-clone-url').length > 0) { + switch (localStorage.getItem('repo-clone-protocol')) { + case 'ssh': + if ($('#repo-clone-ssh').click().length === 0) { + $('#repo-clone-https').click(); + } + break; + default: + $('#repo-clone-https').click(); + break; + } + } + + const routes = { + 'div.user.settings': initUserSettings, + 'div.repository.settings.collaboration': initRepositoryCollaboration + }; + + let selector; + for (selector in routes) { + if ($(selector).length > 0) { + routes[selector](); + break; + } + } + + const $cloneAddr = $('#clone_addr'); + $cloneAddr.change(() => { + const $repoName = $('#repo_name'); + if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank + $repoName.val($cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]); + } + }); +}); -window.toggleStopwatch = function() { - $("#toggle_stopwatch_form").submit(); +function changeHash(hash) { + if (window.history.pushState) { + window.history.pushState(null, null, hash); + } else { + window.location.hash = hash; + } } -window.cancelStopwatch = function() { - $("#cancel_stopwatch_form").submit(); + +function deSelect() { + if (window.getSelection) { + window.getSelection().removeAllRanges(); + } else { + document.selection.empty(); + } } -window.initHeatmap = function(appElementId, heatmapUser, locale) { - const el = document.getElementById(appElementId); - if (!el) { +function selectRange($list, $select, $from) { + $list.removeClass('active'); + if ($from) { + let a = parseInt($select.attr('rel').substr(1)); + let b = parseInt($from.attr('rel').substr(1)); + let c; + if (a !== b) { + if (a > b) { + c = a; + a = b; + b = c; + } + const classes = []; + for (let i = a; i <= b; i++) { + classes.push(`.L${i}`); + } + $list.filter(classes.join(',')).addClass('active'); + changeHash(`#L${a}-L${b}`); + return; + } + } + $select.addClass('active'); + changeHash(`#${$select.attr('rel')}`); +} + +$(() => { + // Warn users that try to leave a page after entering data into a form. + // Except on sign-in pages, and for forms marked as 'ignore-dirty'. + if ($('.user.signin').length === 0) { + $('form:not(.ignore-dirty)').areYouSure(); + } + + // Parse SSH Key + $('#ssh-key-content').on('change paste keyup', function () { + const arrays = $(this).val().split(' '); + const $title = $('#ssh-key-title'); + if ($title.val() === '' && arrays.length === 3 && arrays[2] !== '') { + $title.val(arrays[2]); + } + }); +}); + +function showDeletePopup() { + const $this = $(this); + let filter = ''; + if ($this.attr('id')) { + filter += `#${$this.attr('id')}`; + } + + const dialog = $(`.delete.modal${filter}`); + dialog.find('.name').text($this.data('name')); + + dialog.modal({ + closable: false, + onApprove() { + if ($this.data('type') === 'form') { + $($this.data('form')).submit(); return; + } + + $.post($this.data('url'), { + _csrf: csrf, + id: $this.data('id') + }).done((data) => { + window.location.href = data.redirect; + }); } + }).modal('show'); + return false; +} - locale = locale || {}; +function showAddAllPopup() { + const $this = $(this); + let filter = ''; + if ($this.attr('id')) { + filter += `#${$this.attr('id')}`; + } + + const dialog = $(`.addall.modal${filter}`); + dialog.find('.name').text($this.data('name')); + + dialog.modal({ + closable: false, + onApprove() { + if ($this.data('type') === 'form') { + $($this.data('form')).submit(); + return; + } + + $.post($this.data('url'), { + _csrf: csrf, + id: $this.data('id') + }).done((data) => { + window.location.href = data.redirect; + }); + } + }).modal('show'); + return false; +} + +function initVueComponents() { + const vueDelimeters = ['${', '}']; + + Vue.component('repo-search', { + delimiters: vueDelimeters, + + props: { + searchLimit: { + type: Number, + default: 10 + }, + suburl: { + type: String, + required: true + }, + uid: { + type: Number, + required: true + }, + organizations: { + type: Array, + default: [] + }, + isOrganization: { + type: Boolean, + default: true + }, + canCreateOrganization: { + type: Boolean, + default: false + }, + organizationsTotalCount: { + type: Number, + default: 0 + }, + moreReposLink: { + type: String, + default: '' + } + }, + + data() { + return { + tab: 'repos', + repos: [], + reposTotalCount: 0, + reposFilter: 'all', + searchQuery: '', + isLoading: false, + repoTypes: { + all: { + count: 0, + searchMode: '', + }, + forks: { + count: 0, + searchMode: 'fork', + }, + mirrors: { + count: 0, + searchMode: 'mirror', + }, + sources: { + count: 0, + searchMode: 'source', + }, + collaborative: { + count: 0, + searchMode: 'collaborative', + }, + } + }; + }, + + computed: { + showMoreReposLink() { + return this.repos.length > 0 && this.repos.length < this.repoTypes[this.reposFilter].count; + }, + searchURL() { + return `${this.suburl}/api/v1/repos/search?sort=updated&order=desc&uid=${this.uid}&q=${this.searchQuery + }&limit=${this.searchLimit}&mode=${this.repoTypes[this.reposFilter].searchMode + }${this.reposFilter !== 'all' ? '&exclusive=1' : ''}`; + }, + repoTypeCount() { + return this.repoTypes[this.reposFilter].count; + } + }, + + mounted() { + this.searchRepos(this.reposFilter); + + const self = this; + Vue.nextTick(() => { + self.$refs.search.focus(); + }); + }, + + methods: { + changeTab(t) { + this.tab = t; + }, + + changeReposFilter(filter) { + this.reposFilter = filter; + this.repos = []; + this.repoTypes[filter].count = 0; + this.searchRepos(filter); + }, + + showRepo(repo, filter) { + switch (filter) { + case 'sources': + return repo.owner.id === this.uid && !repo.mirror && !repo.fork; + case 'forks': + return repo.owner.id === this.uid && !repo.mirror && repo.fork; + case 'mirrors': + return repo.mirror; + case 'collaborative': + return repo.owner.id !== this.uid && !repo.mirror; + default: + return true; + } + }, + + searchRepos(reposFilter) { + const self = this; + + this.isLoading = true; + + const searchedMode = this.repoTypes[reposFilter].searchMode; + const searchedURL = this.searchURL; + const searchedQuery = this.searchQuery; + + $.getJSON(searchedURL, (result, _textStatus, request) => { + if (searchedURL === self.searchURL) { + self.repos = result.data; + const count = request.getResponseHeader('X-Total-Count'); + if (searchedQuery === '' && searchedMode === '') { + self.reposTotalCount = count; + } + self.repoTypes[reposFilter].count = count; + } + }).always(() => { + if (searchedURL === self.searchURL) { + self.isLoading = false; + } + }); + }, - locale.contributions = locale.contributions || 'contributions'; - locale.no_contributions = locale.no_contributions || 'No contributions'; + repoClass(repo) { + if (repo.fork) { + return 'octicon octicon-repo-forked'; + } if (repo.mirror) { + return 'octicon octicon-repo-clone'; + } if (repo.private) { + return 'octicon octicon-lock'; + } + return 'octicon octicon-repo'; + } + } + }); +} - const vueDelimeters = ['${', '}']; +function initCtrlEnterSubmit() { + $('.js-quick-submit').keydown(function (e) { + if (((e.ctrlKey && !e.altKey) || e.metaKey) && (e.keyCode === 13 || e.keyCode === 10)) { + $(this).closest('form').submit(); + } + }); +} - Vue.component('activity-heatmap', { - delimiters: vueDelimeters, +function initVueApp() { + const el = document.getElementById('app'); + if (!el) { + return; + } + + initVueComponents(); + + new Vue({ + delimiters: ['${', '}'], + el, + data: { + searchLimit: document.querySelector('meta[name=_search_limit]').content, + suburl: document.querySelector('meta[name=_suburl]').content, + uid: document.querySelector('meta[name=_context_uid]').content, + }, + }); +} + +window.timeAddManual = function () { + $('.mini.modal') + .modal({ + duration: 200, + onApprove() { + $('#add_time_manual_form').submit(); + } + }).modal('show'); +}; - props: { - user: { - type: String, - required: true - }, - suburl: { - type: String, - required: true - }, - locale: { - type: Object, - required: true - } - }, +window.toggleStopwatch = function () { + $('#toggle_stopwatch_form').submit(); +}; +window.cancelStopwatch = function () { + $('#cancel_stopwatch_form').submit(); +}; - data: function () { - return { - isLoading: true, - colorRange: [], - endDate: null, - values: [], - totalContributions: 0, - }; - }, +window.initHeatmap = function (appElementId, heatmapUser, locale) { + const el = document.getElementById(appElementId); + if (!el) { + return; + } + + locale = locale || {}; + + locale.contributions = locale.contributions || 'contributions'; + locale.no_contributions = locale.no_contributions || 'No contributions'; + + const vueDelimeters = ['${', '}']; + + Vue.component('activity-heatmap', { + delimiters: vueDelimeters, + + props: { + user: { + type: String, + required: true + }, + suburl: { + type: String, + required: true + }, + locale: { + type: Object, + required: true + } + }, + + data() { + return { + isLoading: true, + colorRange: [], + endDate: null, + values: [], + totalContributions: 0, + }; + }, + + mounted() { + this.colorRange = [ + this.getColor(0), + this.getColor(1), + this.getColor(2), + this.getColor(3), + this.getColor(4), + this.getColor(5) + ]; + this.endDate = new Date(); + this.loadHeatmap(this.user); + }, + + methods: { + loadHeatmap(userName) { + const self = this; + $.get(`${this.suburl}/api/v1/users/${userName}/heatmap`, (chartRawData) => { + const chartData = []; + for (let i = 0; i < chartRawData.length; i++) { + self.totalContributions += chartRawData[i].contributions; + chartData[i] = { date: new Date(chartRawData[i].timestamp * 1000), count: chartRawData[i].contributions }; + } + self.values = chartData; + self.isLoading = false; + }); + }, - mounted: function() { - this.colorRange = [ - this.getColor(0), - this.getColor(1), - this.getColor(2), - this.getColor(3), - this.getColor(4), - this.getColor(5) - ]; - this.endDate = new Date(); - this.loadHeatmap(this.user); - }, + getColor(idx) { + const el = document.createElement('div'); + el.className = `heatmap-color-${idx}`; + document.body.appendChild(el); - methods: { - loadHeatmap: function(userName) { - const self = this; - $.get(this.suburl + '/api/v1/users/' + userName + '/heatmap', function(chartRawData) { - const chartData = []; - for (let i = 0; i < chartRawData.length; i++) { - self.totalContributions += chartRawData[i].contributions; - chartData[i] = { date: new Date(chartRawData[i].timestamp * 1000), count: chartRawData[i].contributions }; - } - self.values = chartData; - self.isLoading = false; - }); - }, + const color = getComputedStyle(el).backgroundColor; - getColor: function(idx) { - const el = document.createElement('div'); - el.className = 'heatmap-color-' + idx; - document.body.appendChild(el); + document.body.removeChild(el); - const color = getComputedStyle(el).backgroundColor; + return color; + } + }, - document.body.removeChild(el); + template: '

total contributions in the last 12 months

' + }); - return color; - } - }, + new Vue({ + delimiters: vueDelimeters, + el, - template: '

total contributions in the last 12 months

' - }); + data: { + suburl: document.querySelector('meta[name=_suburl]').content, + heatmapUser, + locale + }, + }); +}; +function initFilterBranchTagDropdown(selector) { + $(selector).each(function () { + const $dropdown = $(this); + const $data = $dropdown.find('.data'); + const data = { + items: [], + mode: $data.data('mode'), + searchTerm: '', + noResults: '', + canCreateBranch: false, + menuVisible: false, + active: 0 + }; + $data.find('.item').each(function () { + data.items.push({ + name: $(this).text(), + url: $(this).data('url'), + branch: $(this).hasClass('branch'), + tag: $(this).hasClass('tag'), + selected: $(this).hasClass('selected') + }); + }); + $data.remove(); new Vue({ - delimiters: vueDelimeters, - el: el, + delimiters: ['${', '}'], + el: this, + data, - data: { - suburl: document.querySelector('meta[name=_suburl]').content, - heatmapUser: heatmapUser, - locale: locale - }, - }); -} + beforeMount() { + const vm = this; -function initFilterBranchTagDropdown(selector) { - $(selector).each(function() { - const $dropdown = $(this); - const $data = $dropdown.find('.data'); - const data = { - items: [], - mode: $data.data('mode'), - searchTerm: '', - noResults: '', - canCreateBranch: false, - menuVisible: false, - active: 0 - }; - $data.find('.item').each(function() { - data.items.push({ - name: $(this).text(), - url: $(this).data('url'), - branch: $(this).hasClass('branch'), - tag: $(this).hasClass('tag'), - selected: $(this).hasClass('selected') - }); - }); - $data.remove(); - new Vue({ - delimiters: ['${', '}'], - el: this, - data: data, - - beforeMount: function () { - const vm = this; - - this.noResults = vm.$el.getAttribute('data-no-results'); - this.canCreateBranch = vm.$el.getAttribute('data-can-create-branch') === 'true'; - - document.body.addEventListener('click', function(event) { - if (vm.$el.contains(event.target)) { - return; - } - if (vm.menuVisible) { - Vue.set(vm, 'menuVisible', false); - } - }); - }, + this.noResults = vm.$el.getAttribute('data-no-results'); + this.canCreateBranch = vm.$el.getAttribute('data-can-create-branch') === 'true'; - watch: { - menuVisible: function(visible) { - if (visible) { - this.focusSearchField(); - } - } - }, - - computed: { - filteredItems: function() { - const vm = this; - - const items = vm.items.filter(function (item) { - return ((vm.mode === 'branches' && item.branch) - || (vm.mode === 'tags' && item.tag)) - && (!vm.searchTerm - || item.name.toLowerCase().indexOf(vm.searchTerm.toLowerCase()) >= 0); - }); - - vm.active = (items.length === 0 && vm.showCreateNewBranch ? 0 : -1); - - return items; - }, - showNoResults: function() { - return this.filteredItems.length === 0 - && !this.showCreateNewBranch; - }, - showCreateNewBranch: function() { - const vm = this; - if (!this.canCreateBranch || !vm.searchTerm || vm.mode === 'tags') { - return false; - } - - return vm.items.filter(function (item) { - return item.name.toLowerCase() === vm.searchTerm.toLowerCase() - }).length === 0; - } - }, - - methods: { - selectItem: function(item) { - const prev = this.getSelected(); - if (prev !== null) { - prev.selected = false; - } - item.selected = true; - window.location.href = item.url; - }, - createNewBranch: function() { - if (!this.showCreateNewBranch) { - return; - } - this.$refs.newBranchForm.submit(); - }, - focusSearchField: function() { - const vm = this; - Vue.nextTick(function() { - vm.$refs.searchField.focus(); - }); - }, - getSelected: function() { - for (let i = 0, j = this.items.length; i < j; ++i) { - if (this.items[i].selected) - return this.items[i]; - } - return null; - }, - getSelectedIndexInFiltered: function() { - for (let i = 0, j = this.filteredItems.length; i < j; ++i) { - if (this.filteredItems[i].selected) - return i; - } - return -1; - }, - scrollToActive: function() { - let el = this.$refs['listItem' + this.active]; - if (!el || el.length === 0) { - return; - } - if (Array.isArray(el)) { - el = el[0]; - } - - const cont = this.$refs.scrollContainer; - - if (el.offsetTop < cont.scrollTop) { - cont.scrollTop = el.offsetTop; - } - else if (el.offsetTop + el.clientHeight > cont.scrollTop + cont.clientHeight) { - cont.scrollTop = el.offsetTop + el.clientHeight - cont.clientHeight; - } - }, - keydown: function(event) { - const vm = this; - if (event.keyCode === 40) { - // arrow down - event.preventDefault(); - - if (vm.active === -1) { - vm.active = vm.getSelectedIndexInFiltered(); - } - - if (vm.active + (vm.showCreateNewBranch ? 0 : 1) >= vm.filteredItems.length) { - return; - } - vm.active++; - vm.scrollToActive(); - } - if (event.keyCode === 38) { - // arrow up - event.preventDefault(); - - if (vm.active === -1) { - vm.active = vm.getSelectedIndexInFiltered(); - } - - if (vm.active <= 0) { - return; - } - vm.active--; - vm.scrollToActive(); - } - if (event.keyCode == 13) { - // enter - event.preventDefault(); - - if (vm.active >= vm.filteredItems.length) { - vm.createNewBranch(); - } else if (vm.active >= 0) { - vm.selectItem(vm.filteredItems[vm.active]); - } - } - if (event.keyCode == 27) { - // escape - event.preventDefault(); - vm.menuVisible = false; - } - } - } + document.body.addEventListener('click', (event) => { + if (vm.$el.contains(event.target)) { + return; + } + if (vm.menuVisible) { + Vue.set(vm, 'menuVisible', false); + } }); - }); -} - -$(".commit-button").click(function(e) { - e.preventDefault(); - $(this).parent().find('.commit-body').toggle(); -}); + }, -function initNavbarContentToggle() { - const content = $('#navbar'); - const toggle = $('#navbar-expand-toggle'); - let isExpanded = false; - toggle.click(function() { - isExpanded = !isExpanded; - if (isExpanded) { - content.addClass('shown'); - toggle.addClass('active'); - } - else { - content.removeClass('shown'); - toggle.removeClass('active'); + watch: { + menuVisible(visible) { + if (visible) { + this.focusSearchField(); + } } - }); -} + }, -function initTopicbar() { - const mgrBtn = $("#manage_topic"); - const editDiv = $("#topic_edit"); - const viewDiv = $("#repo-topics"); - const saveBtn = $("#save_topic"); - const topicDropdown = $('#topic_edit .dropdown'); - const topicForm = $('#topic_edit.ui.form'); - const topicPrompts = getPrompts(); - - mgrBtn.click(function() { - viewDiv.hide(); - editDiv.css('display', ''); // show Semantic UI Grid - }); + computed: { + filteredItems() { + const vm = this; - function getPrompts() { - const hidePrompt = $("div.hide#validate_prompt"), - prompts = { - countPrompt: hidePrompt.children('#count_prompt').text(), - formatPrompt: hidePrompt.children('#format_prompt').text() - }; - hidePrompt.remove(); - return prompts; - } - - saveBtn.click(function() { - const topics = $("input[name=topics]").val(); - - $.post(saveBtn.data('link'), { - "_csrf": csrf, - "topics": topics - }, function(_data, _textStatus, xhr){ - if (xhr.responseJSON.status === 'ok') { - viewDiv.children(".topic").remove(); - if (topics.length) { - const topicArray = topics.split(","); - - const last = viewDiv.children("a").last(); - for (let i=0; i < topicArray.length; i++) { - $('
'+topicArray[i]+'
').insertBefore(last) - } - } - editDiv.css('display', 'none'); - viewDiv.show(); - } - }).fail(function(xhr){ - if (xhr.status === 422) { - if (xhr.responseJSON.invalidTopics.length > 0) { - topicPrompts.formatPrompt = xhr.responseJSON.message; - - const invalidTopics = xhr.responseJSON.invalidTopics, - topicLables = topicDropdown.children('a.ui.label'); - - topics.split(',').forEach(function(value, index) { - for (let i=0; i < invalidTopics.length; i++) { - if (invalidTopics[i] === value) { - topicLables.eq(index).removeClass("green").addClass("red"); - } - } - }); - } else { - topicPrompts.countPrompt = xhr.responseJSON.message; - } - } - }).always(function() { - topicForm.form('validate form'); - }); - }); + const items = vm.items.filter((item) => { + return ((vm.mode === 'branches' && item.branch) || (vm.mode === 'tags' && item.tag)) + && (!vm.searchTerm || item.name.toLowerCase().indexOf(vm.searchTerm.toLowerCase()) >= 0); + }); + + vm.active = (items.length === 0 && vm.showCreateNewBranch ? 0 : -1); - topicDropdown.dropdown({ - allowAdditions: true, - forceSelection: false, - fields: { name: "description", value: "data-value" }, - saveRemoteData: false, - label: { - transition : 'horizontal flip', - duration : 200, - variation : false, - blue : true, - basic: true, + return items; }, - className: { - label: 'ui small label' + showNoResults() { + return this.filteredItems.length === 0 && !this.showCreateNewBranch; }, - apiSettings: { - url: suburl + '/api/v1/topics/search?q={query}', - throttle: 500, - cache: false, - onResponse: function(res) { - const formattedResponse = { - success: false, - results: [], - }; - const stripTags = function (text) { - return text.replace(/<[^>]*>?/gm, ""); - }; - - const query = stripTags(this.urlData.query.trim()); - let found_query = false; - const current_topics = []; - topicDropdown.find('div.label.visible.topic,a.label.visible').each(function(_,e){ current_topics.push(e.dataset.value); }); - - if (res.topics) { - let found = false; - for (let i=0;i < res.topics.length;i++) { - // skip currently added tags - if (current_topics.indexOf(res.topics[i].topic_name) != -1){ - continue; - } - - if (res.topics[i].topic_name.toLowerCase() === query.toLowerCase()){ - found_query = true; - } - formattedResponse.results.push({"description": res.topics[i].topic_name, "data-value": res.topics[i].topic_name}); - found = true; - } - formattedResponse.success = found; - } - - if (query.length > 0 && !found_query){ - formattedResponse.success = true; - formattedResponse.results.unshift({"description": query, "data-value": query}); - } else if (query.length > 0 && found_query) { - formattedResponse.results.sort(function(a, b){ - if (a.description.toLowerCase() === query.toLowerCase()) return -1; - if (b.description.toLowerCase() === query.toLowerCase()) return 1; - if (a.description > b.description) return -1; - if (a.description < b.description) return 1; - return 0; - }); - } + showCreateNewBranch() { + const vm = this; + if (!this.canCreateBranch || !vm.searchTerm || vm.mode === 'tags') { + return false; + } + return vm.items.filter((item) => item.name.toLowerCase() === vm.searchTerm.toLowerCase()).length === 0; + } + }, - return formattedResponse; - }, + methods: { + selectItem(item) { + const prev = this.getSelected(); + if (prev !== null) { + prev.selected = false; + } + item.selected = true; + window.location.href = item.url; }, - onLabelCreate: function(value) { - value = value.toLowerCase().trim(); - this.attr("data-value", value).contents().first().replaceWith(value); - return $(this); + createNewBranch() { + if (!this.showCreateNewBranch) { + return; + } + this.$refs.newBranchForm.submit(); }, - onAdd: function(addedValue, _addedText, $addedChoice) { - addedValue = addedValue.toLowerCase().trim(); - $($addedChoice).attr('data-value', addedValue); - $($addedChoice).attr('data-text', addedValue); - } - }); - - $.fn.form.settings.rules.validateTopic = function(_values, regExp) { - const topics = topicDropdown.children('a.ui.label'), - status = topics.length === 0 || topics.last().attr("data-value").match(regExp); - if (!status) { - topics.last().removeClass("green").addClass("red"); - } - return status && topicDropdown.children('a.ui.label.red').length === 0; - }; + focusSearchField() { + const vm = this; + Vue.nextTick(() => { + vm.$refs.searchField.focus(); + }); + }, + getSelected() { + for (let i = 0, j = this.items.length; i < j; ++i) { + if (this.items[i].selected) return this.items[i]; + } + return null; + }, + getSelectedIndexInFiltered() { + for (let i = 0, j = this.filteredItems.length; i < j; ++i) { + if (this.filteredItems[i].selected) return i; + } + return -1; + }, + scrollToActive() { + let el = this.$refs[`listItem${this.active}`]; + if (!el || el.length === 0) { + return; + } + if (Array.isArray(el)) { + el = el[0]; + } + + const cont = this.$refs.scrollContainer; + + if (el.offsetTop < cont.scrollTop) { + cont.scrollTop = el.offsetTop; + } else if (el.offsetTop + el.clientHeight > cont.scrollTop + cont.clientHeight) { + cont.scrollTop = el.offsetTop + el.clientHeight - cont.clientHeight; + } + }, + keydown(event) { + const vm = this; + if (event.keyCode === 40) { + // arrow down + event.preventDefault(); - topicForm.form({ - on: 'change', - inline : true, - fields: { - topics: { - identifier: 'topics', - rules: [ - { - type: 'validateTopic', - value: /^[a-z0-9][a-z0-9-]{1,35}$/, - prompt: topicPrompts.formatPrompt - }, - { - type: 'maxCount[25]', - prompt: topicPrompts.countPrompt - } - ] - }, + if (vm.active === -1) { + vm.active = vm.getSelectedIndexInFiltered(); } - }); -} -window.toggleDeadlineForm = function() { - $('#deadlineForm').fadeToggle(150); -} -window.setDeadline = function() { - const deadline = $('#deadlineDate').val(); - window.updateDeadline(deadline); -} - -window.updateDeadline = function(deadlineString) { - $('#deadline-err-invalid-date').hide(); - $('#deadline-loader').addClass('loading'); - - let realDeadline = null; - if (deadlineString !== '') { + if (vm.active + (vm.showCreateNewBranch ? 0 : 1) >= vm.filteredItems.length) { + return; + } + vm.active++; + vm.scrollToActive(); + } + if (event.keyCode === 38) { + // arrow up + event.preventDefault(); - const newDate = Date.parse(deadlineString) + if (vm.active === -1) { + vm.active = vm.getSelectedIndexInFiltered(); + } - if (isNaN(newDate)) { - $('#deadline-loader').removeClass('loading'); - $('#deadline-err-invalid-date').show(); - return false; - } - realDeadline = new Date(newDate); - } + if (vm.active <= 0) { + return; + } + vm.active--; + vm.scrollToActive(); + } + if (event.keyCode === 13) { + // enter + event.preventDefault(); - $.ajax($('#update-issue-deadline-form').attr('action') + '/deadline', { - data: JSON.stringify({ - 'due_date': realDeadline, - }), - headers: { - 'X-Csrf-Token': csrf, - 'X-Remote': true, - }, - contentType: 'application/json', - type: 'POST', - success: function () { - reload(); - }, - error: function () { - $('#deadline-loader').removeClass('loading'); - $('#deadline-err-invalid-date').show(); + if (vm.active >= vm.filteredItems.length) { + vm.createNewBranch(); + } else if (vm.active >= 0) { + vm.selectItem(vm.filteredItems[vm.active]); + } + } + if (event.keyCode === 27) { + // escape + event.preventDefault(); + vm.menuVisible = false; + } } + } }); + }); } -window.deleteDependencyModal = function(id, type) { - $('.remove-dependency') - .modal({ - closable: false, - duration: 200, - onApprove: function () { - $('#removeDependencyID').val(id); - $('#dependencyType').val(type); - $('#removeDependencyForm').submit(); - } - }).modal('show') - ; +$('.commit-button').click(function (e) { + e.preventDefault(); + $(this).parent().find('.commit-body').toggle(); +}); + +function initNavbarContentToggle() { + const content = $('#navbar'); + const toggle = $('#navbar-expand-toggle'); + let isExpanded = false; + toggle.click(() => { + isExpanded = !isExpanded; + if (isExpanded) { + content.addClass('shown'); + toggle.addClass('active'); + } else { + content.removeClass('shown'); + toggle.removeClass('active'); + } + }); } +function initTopicbar() { + const mgrBtn = $('#manage_topic'); + const editDiv = $('#topic_edit'); + const viewDiv = $('#repo-topics'); + const saveBtn = $('#save_topic'); + const topicDropdown = $('#topic_edit .dropdown'); + const topicForm = $('#topic_edit.ui.form'); + const topicPrompts = getPrompts(); + + mgrBtn.click(() => { + viewDiv.hide(); + editDiv.css('display', ''); // show Semantic UI Grid + }); + + function getPrompts() { + const hidePrompt = $('div.hide#validate_prompt'); + const prompts = { + countPrompt: hidePrompt.children('#count_prompt').text(), + formatPrompt: hidePrompt.children('#format_prompt').text() + }; + hidePrompt.remove(); + return prompts; + } + + saveBtn.click(() => { + const topics = $('input[name=topics]').val(); + + $.post(saveBtn.data('link'), { + _csrf: csrf, + topics + }, (_data, _textStatus, xhr) => { + if (xhr.responseJSON.status === 'ok') { + viewDiv.children('.topic').remove(); + if (topics.length) { + const topicArray = topics.split(','); + + const last = viewDiv.children('a').last(); + for (let i = 0; i < topicArray.length; i++) { + $(`
${topicArray[i]}
`).insertBefore(last); + } + } + editDiv.css('display', 'none'); + viewDiv.show(); + } + }).fail((xhr) => { + if (xhr.status === 422) { + if (xhr.responseJSON.invalidTopics.length > 0) { + topicPrompts.formatPrompt = xhr.responseJSON.message; + + const { invalidTopics } = xhr.responseJSON; + const topicLables = topicDropdown.children('a.ui.label'); + + topics.split(',').forEach((value, index) => { + for (let i = 0; i < invalidTopics.length; i++) { + if (invalidTopics[i] === value) { + topicLables.eq(index).removeClass('green').addClass('red'); + } + } + }); + } else { + topicPrompts.countPrompt = xhr.responseJSON.message; + } + } + }).always(() => { + topicForm.form('validate form'); + }); + }); + + topicDropdown.dropdown({ + allowAdditions: true, + forceSelection: false, + fields: { name: 'description', value: 'data-value' }, + saveRemoteData: false, + label: { + transition: 'horizontal flip', + duration: 200, + variation: false, + blue: true, + basic: true, + }, + className: { + label: 'ui small label' + }, + apiSettings: { + url: `${suburl}/api/v1/topics/search?q={query}`, + throttle: 500, + cache: false, + onResponse(res) { + const formattedResponse = { + success: false, + results: [], + }; + const stripTags = function (text) { + return text.replace(/<[^>]*>?/gm, ''); + }; + + const query = stripTags(this.urlData.query.trim()); + let found_query = false; + const current_topics = []; + topicDropdown.find('div.label.visible.topic,a.label.visible').each((_, e) => { current_topics.push(e.dataset.value); }); + + if (res.topics) { + let found = false; + for (let i = 0; i < res.topics.length; i++) { + // skip currently added tags + if (current_topics.indexOf(res.topics[i].topic_name) !== -1) { + continue; + } + + if (res.topics[i].topic_name.toLowerCase() === query.toLowerCase()) { + found_query = true; + } + formattedResponse.results.push({ description: res.topics[i].topic_name, 'data-value': res.topics[i].topic_name }); + found = true; + } + formattedResponse.success = found; + } + + if (query.length > 0 && !found_query) { + formattedResponse.success = true; + formattedResponse.results.unshift({ description: query, 'data-value': query }); + } else if (query.length > 0 && found_query) { + formattedResponse.results.sort((a, b) => { + if (a.description.toLowerCase() === query.toLowerCase()) return -1; + if (b.description.toLowerCase() === query.toLowerCase()) return 1; + if (a.description > b.description) return -1; + if (a.description < b.description) return 1; + return 0; + }); + } + + + return formattedResponse; + }, + }, + onLabelCreate(value) { + value = value.toLowerCase().trim(); + this.attr('data-value', value).contents().first().replaceWith(value); + return $(this); + }, + onAdd(addedValue, _addedText, $addedChoice) { + addedValue = addedValue.toLowerCase().trim(); + $($addedChoice).attr('data-value', addedValue); + $($addedChoice).attr('data-text', addedValue); + } + }); + + $.fn.form.settings.rules.validateTopic = function (_values, regExp) { + const topics = topicDropdown.children('a.ui.label'); + const status = topics.length === 0 || topics.last().attr('data-value').match(regExp); + if (!status) { + topics.last().removeClass('green').addClass('red'); + } + return status && topicDropdown.children('a.ui.label.red').length === 0; + }; + + topicForm.form({ + on: 'change', + inline: true, + fields: { + topics: { + identifier: 'topics', + rules: [ + { + type: 'validateTopic', + value: /^[a-z0-9][a-z0-9-]{1,35}$/, + prompt: topicPrompts.formatPrompt + }, + { + type: 'maxCount[25]', + prompt: topicPrompts.countPrompt + } + ] + }, + } + }); +} + +window.toggleDeadlineForm = function () { + $('#deadlineForm').fadeToggle(150); +}; + +window.setDeadline = function () { + const deadline = $('#deadlineDate').val(); + window.updateDeadline(deadline); +}; + +window.updateDeadline = function (deadlineString) { + $('#deadline-err-invalid-date').hide(); + $('#deadline-loader').addClass('loading'); + + let realDeadline = null; + if (deadlineString !== '') { + const newDate = Date.parse(deadlineString); + + if (Number.isNaN(newDate)) { + $('#deadline-loader').removeClass('loading'); + $('#deadline-err-invalid-date').show(); + return false; + } + realDeadline = new Date(newDate); + } + + $.ajax(`${$('#update-issue-deadline-form').attr('action')}/deadline`, { + data: JSON.stringify({ + due_date: realDeadline, + }), + headers: { + 'X-Csrf-Token': csrf, + 'X-Remote': true, + }, + contentType: 'application/json', + type: 'POST', + success() { + reload(); + }, + error() { + $('#deadline-loader').removeClass('loading'); + $('#deadline-err-invalid-date').show(); + } + }); +}; + +window.deleteDependencyModal = function (id, type) { + $('.remove-dependency') + .modal({ + closable: false, + duration: 200, + onApprove() { + $('#removeDependencyID').val(id); + $('#dependencyType').val(type); + $('#removeDependencyForm').submit(); + } + }).modal('show'); +}; + function initIssueList() { - const repolink = $('#repolink').val(); - const repoId = $('#repoId').val(); - const crossRepoSearch = $('#crossRepoSearch').val(); - let issueSearchUrl = suburl + '/api/v1/repos/' + repolink + '/issues?q={query}'; - if (crossRepoSearch === 'true') { - issueSearchUrl = suburl + '/api/v1/repos/issues/search?q={query}&priority_repo_id=' + repoId; - } - $('#new-dependency-drop-list') - .dropdown({ - apiSettings: { - url: issueSearchUrl, - onResponse: function(response) { - const filteredResponse = {'success': true, 'results': []}; - const currIssueId = $('#new-dependency-drop-list').data('issue-id'); - // Parse the response from the api to work with our dropdown - $.each(response, function(_i, issue) { - // Don't list current issue in the dependency list. - if(issue.id === currIssueId) { - return; - } - filteredResponse.results.push({ - 'name' : '#' + issue.number + ' ' + htmlEncode(issue.title) + - '
' + htmlEncode(issue.repository.full_name) + '
', - 'value' : issue.id - }); - }); - return filteredResponse; - }, - cache: false, - }, - - fullTextSearch: true - }); + const repolink = $('#repolink').val(); + const repoId = $('#repoId').val(); + const crossRepoSearch = $('#crossRepoSearch').val(); + let issueSearchUrl = `${suburl}/api/v1/repos/${repolink}/issues?q={query}`; + if (crossRepoSearch === 'true') { + issueSearchUrl = `${suburl}/api/v1/repos/issues/search?q={query}&priority_repo_id=${repoId}`; + } + $('#new-dependency-drop-list') + .dropdown({ + apiSettings: { + url: issueSearchUrl, + onResponse(response) { + const filteredResponse = { success: true, results: [] }; + const currIssueId = $('#new-dependency-drop-list').data('issue-id'); + // Parse the response from the api to work with our dropdown + $.each(response, (_i, issue) => { + // Don't list current issue in the dependency list. + if (issue.id === currIssueId) { + return; + } + filteredResponse.results.push({ + name: `#${issue.number} ${htmlEncode(issue.title) + }
${htmlEncode(issue.repository.full_name)}
`, + value: issue.id + }); + }); + return filteredResponse; + }, + cache: false, + }, + + fullTextSearch: true + }); - $(".menu a.label-filter-item").each(function() { - $(this).click(function(e) { - if (e.altKey) { - e.preventDefault(); + $('.menu a.label-filter-item').each(function () { + $(this).click(function (e) { + if (e.altKey) { + e.preventDefault(); - const href = $(this).attr("href"); - const id = $(this).data("label-id"); + const href = $(this).attr('href'); + const id = $(this).data('label-id'); - const regStr = "labels=(-?[0-9]+%2c)*(" + id + ")(%2c-?[0-9]+)*&"; - const newStr = "labels=$1-$2$3&"; + const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`; + const newStr = 'labels=$1-$2$3&'; - window.location = href.replace(new RegExp(regStr), newStr); - } - }); + window.location = href.replace(new RegExp(regStr), newStr); + } }); + }); - $(".menu .ui.dropdown.label-filter").keydown(function(e) { - if (e.altKey && e.keyCode == 13) { - const selectedItems = $(".menu .ui.dropdown.label-filter .menu .item.selected"); + $('.menu .ui.dropdown.label-filter').keydown((e) => { + if (e.altKey && e.keyCode === 13) { + const selectedItems = $('.menu .ui.dropdown.label-filter .menu .item.selected'); - if (selectedItems.length > 0) { - const item = $(selectedItems[0]); + if (selectedItems.length > 0) { + const item = $(selectedItems[0]); - const href = item.attr("href"); - const id = item.data("label-id"); + const href = item.attr('href'); + const id = item.data('label-id'); - const regStr = "labels=(-?[0-9]+%2c)*(" + id + ")(%2c-?[0-9]+)*&"; - const newStr = "labels=$1-$2$3&"; + const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`; + const newStr = 'labels=$1-$2$3&'; - window.location = href.replace(new RegExp(regStr), newStr); - } - } - }); -} -window.cancelCodeComment = function(btn) { - const form = $(btn).closest("form"); - if(form.length > 0 && form.hasClass('comment-form')) { - form.addClass('hide'); - form.parent().find('button.comment-form-reply').show(); - } else { - form.closest('.comment-code-cloud').remove() + window.location = href.replace(new RegExp(regStr), newStr); + } } + }); } -window.onOAuthLoginClick = function() { - const oauthLoader = $('#oauth2-login-loader'); - const oauthNav = $('#oauth2-login-navigator'); - - oauthNav.hide(); - oauthLoader.removeClass('disabled'); - - setTimeout(function(){ - // recover previous content to let user try again - // usually redirection will be performed before this action - oauthLoader.addClass('disabled'); - oauthNav.show(); - },5000); -} +window.cancelCodeComment = function (btn) { + const form = $(btn).closest('form'); + if (form.length > 0 && form.hasClass('comment-form')) { + form.addClass('hide'); + form.parent().find('button.comment-form-reply').show(); + } else { + form.closest('.comment-code-cloud').remove(); + } +}; +window.onOAuthLoginClick = function () { + const oauthLoader = $('#oauth2-login-loader'); + const oauthNav = $('#oauth2-login-navigator'); + + oauthNav.hide(); + oauthLoader.removeClass('disabled'); + + setTimeout(() => { + // recover previous content to let user try again + // usually redirection will be performed before this action + oauthLoader.addClass('disabled'); + oauthNav.show(); + }, 5000); +}; diff --git a/webpack.config.js b/webpack.config.js index 750ee4c89..8749e9391 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,12 +9,34 @@ module.exports = { devtool: 'source-map', output: { path: path.resolve(__dirname, 'public/js'), - filename: "[name].js" + filename: '[name].js' }, optimization: { minimize: true, - minimizer: [new TerserPlugin({ - sourceMap: true - })], + minimizer: [new TerserPlugin({ + sourceMap: true, + })], }, + module: { + rules: [ + { + test: /\.js$/, + exclude: /node_modules/, + use: { + loader: 'babel-loader', + options: { + presets: [ + [ + '@babel/preset-env', + { + useBuiltIns: 'entry', + corejs: 3, + } + ] + ] + } + } + } + ] + } };