cloudcmd 19.1.17 → 19.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +12 -0
- package/HELP.md +2 -1
- package/README.md +1 -1
- package/dist/cloudcmd.common.css +1 -1
- package/dist/cloudcmd.common.js +2 -2
- package/dist/cloudcmd.common.js.map +1 -1
- package/dist/modules/menu.js +1 -1
- package/dist/modules/menu.js.map +1 -1
- package/dist/modules/operation.js +1 -1
- package/dist/modules/operation.js.map +1 -1
- package/dist/modules/upload.js +1 -1
- package/dist/modules/upload.js.map +1 -1
- package/dist/modules/user-menu.js +1 -1
- package/dist/modules/user-menu.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist-dev/cloudcmd.common.css +27 -27
- package/dist-dev/cloudcmd.common.js +706 -103
- package/dist-dev/modules/menu.js +1 -1
- package/dist-dev/modules/upload.js +1 -1
- package/dist-dev/modules/user-menu.js +1 -1
- package/dist-dev/sw.js +1 -1
- package/package.json +6 -1
|
@@ -37,7 +37,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
37
37
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
38
38
|
|
|
39
39
|
"use strict";
|
|
40
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ clear: () => (/* binding */ clear),\n/* harmony export */ copy: () => (/* binding */ copy),\n/* harmony export */ cut: () => (/* binding */ cut),\n/* harmony export */ paste: () => (/* binding */ paste)\n/* harmony export */ });\n/* harmony import */ var
|
|
40
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ clear: () => (/* binding */ clear),\n/* harmony export */ copy: () => (/* binding */ copy),\n/* harmony export */ cut: () => (/* binding */ cut),\n/* harmony export */ paste: () => (/* binding */ paste)\n/* harmony export */ });\n/* harmony import */ var _dom_storage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! #dom/storage */ \"./client/dom/storage.mjs\");\n/* harmony import */ var _common_try_to_promise_all_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/try-to-promise-all.js */ \"./common/try-to-promise-all.js\");\n/* global CloudCmd*/\n\n\nconst CLASS = 'cut-file';\nconst COPY = 'copy';\nconst CUT = 'cut';\nfunction showMessage(msg) {\n globalThis.DOM.Dialog.alert(msg);\n}\nfunction getNames() {\n const {\n DOM\n } = globalThis;\n const files = DOM.getActiveFiles();\n return DOM.getFilenames(files);\n}\nfunction addCutClass() {\n const {\n DOM\n } = globalThis;\n const files = DOM.getActiveFiles();\n for (const element of files) {\n element.classList.add(CLASS);\n }\n}\nfunction rmCutClass() {\n const {\n DOM\n } = globalThis;\n const files = DOM.getByClassAll(CLASS);\n for (const element of files) {\n element.classList.remove(CLASS);\n }\n}\nconst checkEnabled = fn => () => {\n const is = CloudCmd.config('buffer');\n if (is) return fn();\n showMessage('Buffer disabled in config!');\n};\nasync function readBuffer() {\n const [e, cp, ct] = await _common_try_to_promise_all_js__WEBPACK_IMPORTED_MODULE_1__([_dom_storage__WEBPACK_IMPORTED_MODULE_0__.getJson(COPY), _dom_storage__WEBPACK_IMPORTED_MODULE_0__.getJson(CUT)]);\n return [e, cp, ct];\n}\nconst copy = checkEnabled(async () => {\n const Info = globalThis.DOM.CurrentInfo;\n const names = getNames();\n const from = Info.dirPath;\n await clear();\n if (!names.length) return;\n await _dom_storage__WEBPACK_IMPORTED_MODULE_0__.remove(CUT);\n await _dom_storage__WEBPACK_IMPORTED_MODULE_0__.setJson(COPY, {\n from,\n names\n });\n});\nconst cut = checkEnabled(async () => {\n const Info = globalThis.DOM.CurrentInfo;\n const names = getNames();\n const from = Info.dirPath;\n await clear();\n if (!names.length) return;\n addCutClass();\n await _dom_storage__WEBPACK_IMPORTED_MODULE_0__.setJson(CUT, {\n from,\n names\n });\n});\nconst clear = checkEnabled(async () => {\n await _dom_storage__WEBPACK_IMPORTED_MODULE_0__.remove(COPY);\n await _dom_storage__WEBPACK_IMPORTED_MODULE_0__.remove(CUT);\n rmCutClass();\n});\nconst paste = checkEnabled(async () => {\n const Info = globalThis.DOM.CurrentInfo;\n const [error, cp, ct] = await readBuffer();\n if (error || !cp && !ct) return showMessage(error || 'Buffer is empty!');\n const opStr = cp ? 'copy' : 'move';\n const data = cp || ct;\n const {\n Operation\n } = CloudCmd;\n const msg = 'Path is same!';\n const to = Info.dirPath;\n if (data.from === to) return showMessage(msg);\n Operation.show(opStr, {\n ...data,\n to\n });\n await clear();\n});\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/buffer.mjs\n}");
|
|
41
41
|
|
|
42
42
|
/***/ },
|
|
43
43
|
|
|
@@ -59,7 +59,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
59
59
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
60
60
|
|
|
61
61
|
"use strict";
|
|
62
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ _CURRENT_FILE: () => (/* binding */ _CURRENT_FILE),\n/* harmony export */ _parseHrefAttribute: () => (/* binding */ _parseHrefAttribute),\n/* harmony export */ _parseNameAttribute: () => (/* binding */ _parseNameAttribute),\n/* harmony export */ getCurrentByName: () => (/* binding */ getCurrentByName),\n/* harmony export */ getCurrentByPosition: () => (/* binding */ getCurrentByPosition),\n/* harmony export */ getCurrentDirName: () => (/* binding */ getCurrentDirName),\n/* harmony export */ getCurrentDirPath: () => (/* binding */ getCurrentDirPath),\n/* harmony export */ getCurrentFile: () => (/* binding */ getCurrentFile),\n/* harmony export */ getCurrentName: () => (/* binding */ getCurrentName),\n/* harmony export */ getCurrentPath: () => (/* binding */ getCurrentPath),\n/* harmony export */ getCurrentType: () => (/* binding */ getCurrentType),\n/* harmony export */ getNotCurrentDirPath: () => (/* binding */ getNotCurrentDirPath),\n/* harmony export */ getParentDirPath: () => (/* binding */ getParentDirPath),\n/* harmony export */ isCurrentFile: () => (/* binding */ isCurrentFile),\n/* harmony export */ isCurrentIsDir: () => (/* binding */ isCurrentIsDir),\n/* harmony export */ setCurrentByName: () => (/* binding */ setCurrentByName),\n/* harmony export */ setCurrentFile: () => (/* binding */ setCurrentFile),\n/* harmony export */ setCurrentName: () => (/* binding */ setCurrentName),\n/* harmony export */ setTitle: () => (/* binding */ setTitle)\n/* harmony export */ });\n/* harmony import */ var _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* harmony import */ var _common_entity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/entity.js */ \"./common/entity.js\");\n/* harmony import */ var _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/cloudfunc.mjs */ \"./common/cloudfunc.mjs\");\n/* global DOM */\n/* global CloudCmd */\n\n\n\nlet Title;\nconst CURRENT_FILE = 'current-file';\nconst encodeNBSP = a => a === null || a === void 0 ? void 0 : a.replace('\\xa0', ' ');\nconst decodeNBSP = a => a === null || a === void 0 ? void 0 : a.replace(' ', '\\xa0');\nconst _CURRENT_FILE = CURRENT_FILE;\n\n/**\n * set name from current (or param) file\n *\n * @param name\n * @param current\n */\nconst setCurrentName = (name, current) => {\n const Info = DOM.CurrentInfo;\n const {\n link\n } = Info;\n const {\n prefix\n } = CloudCmd;\n const dir = prefix + _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_2__.FS + Info.dirPath;\n const encoded = (0,_common_entity_js__WEBPACK_IMPORTED_MODULE_1__.encode)(name);\n link.title = encoded;\n link.href = dir + encoded;\n link.innerHTML = encoded;\n current.setAttribute('data-name', createNameAttribute(name));\n CloudCmd.emit('current-file', current);\n return link;\n};\n\n/**\n * get name from current (or param) file\n *\n * @param currentFile\n */\nconst getCurrentName = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n if (!current) return '';\n return parseNameAttribute(current.getAttribute('data-name'));\n};\n\n/**\n * Generate a `data-name` attribute for the given filename\n * @param name The string name to encode\n */\nconst createNameAttribute = name => {\n const encoded = btoa(encodeURI(name));\n return `js-file-${encoded}`;\n};\n\n/**\n * Parse a `data-name` attribute string back into the original filename\n * @param attribute The string we wish to decode\n */\nconst parseNameAttribute = attribute => {\n attribute = attribute.replace('js-file-', '');\n return decodeNBSP(decodeURI(atob(attribute)));\n};\nconst _parseNameAttribute = parseNameAttribute;\nconst parseHrefAttribute = (prefix, attribute) => {\n attribute = attribute.replace(RegExp('^' + prefix + _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_2__.FS), '');\n return (0,_common_entity_js__WEBPACK_IMPORTED_MODULE_1__.decode)(decodeNBSP(attribute));\n};\nconst _parseHrefAttribute = parseHrefAttribute;\n\n/**\n * get current direcotory path\n */\nconst getCurrentDirPath = (panel = DOM.getPanel()) => {\n const path = DOM.getByDataName('js-path', panel);\n return path.textContent;\n};\n\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\nconst getCurrentPath = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const [element] = DOM.getByTag('a', current);\n const {\n prefix\n } = CloudCmd;\n return parseHrefAttribute(prefix, element.getAttribute('href'));\n};\n\n/**\n * get current direcotory name\n */\nconst getCurrentDirName = () => {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n return href.replace(`${substr}/`, '') || '/';\n};\n\n/**\n * get current direcotory path\n */\nconst getParentDirPath = panel => {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path === '/') return path;\n return path.slice(0, index);\n};\n\n/**\n * get not current direcotory path\n */\nconst getNotCurrentDirPath = () => {\n const panel = DOM.getPanel({\n active: false\n });\n return DOM.getCurrentDirPath(panel);\n};\n\n/**\n * unified way to get current file\n *\n * @currentFile\n */\nconst getCurrentFile = () => {\n return DOM.getByClass(CURRENT_FILE);\n};\n\n/**\n * get current file by name\n */\nconst getCurrentByName = (name, panel = DOM.CurrentInfo.panel) => {\n const dataName = 'js-file-' + btoa(encodeURI(encodeNBSP(name)));\n return DOM.getByDataName(dataName, panel);\n};\n\n/**\n * private function thet unset
|
|
62
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ _CURRENT_FILE: () => (/* binding */ _CURRENT_FILE),\n/* harmony export */ _parseHrefAttribute: () => (/* binding */ _parseHrefAttribute),\n/* harmony export */ _parseNameAttribute: () => (/* binding */ _parseNameAttribute),\n/* harmony export */ getCurrentByName: () => (/* binding */ getCurrentByName),\n/* harmony export */ getCurrentByPosition: () => (/* binding */ getCurrentByPosition),\n/* harmony export */ getCurrentDirName: () => (/* binding */ getCurrentDirName),\n/* harmony export */ getCurrentDirPath: () => (/* binding */ getCurrentDirPath),\n/* harmony export */ getCurrentFile: () => (/* binding */ getCurrentFile),\n/* harmony export */ getCurrentName: () => (/* binding */ getCurrentName),\n/* harmony export */ getCurrentPath: () => (/* binding */ getCurrentPath),\n/* harmony export */ getCurrentType: () => (/* binding */ getCurrentType),\n/* harmony export */ getNotCurrentDirPath: () => (/* binding */ getNotCurrentDirPath),\n/* harmony export */ getParentDirPath: () => (/* binding */ getParentDirPath),\n/* harmony export */ isCurrentFile: () => (/* binding */ isCurrentFile),\n/* harmony export */ isCurrentIsDir: () => (/* binding */ isCurrentIsDir),\n/* harmony export */ setCurrentByName: () => (/* binding */ setCurrentByName),\n/* harmony export */ setCurrentFile: () => (/* binding */ setCurrentFile),\n/* harmony export */ setCurrentName: () => (/* binding */ setCurrentName),\n/* harmony export */ setTitle: () => (/* binding */ setTitle)\n/* harmony export */ });\n/* harmony import */ var _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* harmony import */ var _common_entity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/entity.js */ \"./common/entity.js\");\n/* harmony import */ var _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/cloudfunc.mjs */ \"./common/cloudfunc.mjs\");\n/* global DOM */\n/* global CloudCmd */\n\n\n\nlet Title;\nconst CURRENT_FILE = 'current-file';\nconst encodeNBSP = a => a === null || a === void 0 ? void 0 : a.replace('\\xa0', ' ');\nconst decodeNBSP = a => a === null || a === void 0 ? void 0 : a.replace(' ', '\\xa0');\nconst _CURRENT_FILE = CURRENT_FILE;\n\n/**\n * set name from current (or param) file\n *\n * @param name\n * @param current\n */\nconst setCurrentName = (name, current) => {\n const Info = DOM.CurrentInfo;\n const {\n link\n } = Info;\n const {\n prefix\n } = CloudCmd;\n const dir = prefix + _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_2__.FS + Info.dirPath;\n const encoded = (0,_common_entity_js__WEBPACK_IMPORTED_MODULE_1__.encode)(name);\n link.title = encoded;\n link.href = dir + encoded;\n link.innerHTML = encoded;\n current.setAttribute('data-name', createNameAttribute(name));\n CloudCmd.emit('current-file', current);\n return link;\n};\n\n/**\n * get name from current (or param) file\n *\n * @param currentFile\n */\nconst getCurrentName = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n if (!current) return '';\n return parseNameAttribute(current.getAttribute('data-name'));\n};\n\n/**\n * Generate a `data-name` attribute for the given filename\n * @param name The string name to encode\n */\nconst createNameAttribute = name => {\n const encoded = btoa(encodeURI(name));\n return `js-file-${encoded}`;\n};\n\n/**\n * Parse a `data-name` attribute string back into the original filename\n * @param attribute The string we wish to decode\n */\nconst parseNameAttribute = attribute => {\n attribute = attribute.replace('js-file-', '');\n return decodeNBSP(decodeURI(atob(attribute)));\n};\nconst _parseNameAttribute = parseNameAttribute;\nconst parseHrefAttribute = (prefix, attribute) => {\n attribute = attribute.replace(RegExp('^' + prefix + _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_2__.FS), '');\n return (0,_common_entity_js__WEBPACK_IMPORTED_MODULE_1__.decode)(decodeNBSP(attribute));\n};\nconst _parseHrefAttribute = parseHrefAttribute;\n\n/**\n * get current direcotory path\n */\nconst getCurrentDirPath = (panel = DOM.getPanel()) => {\n const path = DOM.getByDataName('js-path', panel);\n return path.textContent;\n};\n\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\nconst getCurrentPath = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const [element] = DOM.getByTag('a', current);\n const {\n prefix\n } = CloudCmd;\n return parseHrefAttribute(prefix, element.getAttribute('href'));\n};\n\n/**\n * get current direcotory name\n */\nconst getCurrentDirName = () => {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n return href.replace(`${substr}/`, '') || '/';\n};\n\n/**\n * get current direcotory path\n */\nconst getParentDirPath = panel => {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path === '/') return path;\n return path.slice(0, index);\n};\n\n/**\n * get not current direcotory path\n */\nconst getNotCurrentDirPath = () => {\n const panel = DOM.getPanel({\n active: false\n });\n return DOM.getCurrentDirPath(panel);\n};\n\n/**\n * unified way to get current file\n *\n * @currentFile\n */\nconst getCurrentFile = () => {\n return DOM.getByClass(CURRENT_FILE);\n};\n\n/**\n * get current file by name\n */\nconst getCurrentByName = (name, panel = DOM.CurrentInfo.panel) => {\n const dataName = 'js-file-' + btoa(encodeURI(encodeNBSP(name)));\n return DOM.getByDataName(dataName, panel);\n};\n\n/**\n * private function thet unset currentFile\n *\n * @currentFile\n */\nfunction unsetCurrentFile(currentFile) {\n const is = DOM.isCurrentFile(currentFile);\n if (!is) return;\n currentFile.classList.remove(CURRENT_FILE);\n}\n\n/**\n * unified way to set current file\n */\nconst setCurrentFile = (currentFile, options) => {\n const o = options;\n const currentFileWas = DOM.getCurrentFile();\n if (!currentFile) return DOM;\n let pathWas = '';\n if (currentFileWas) {\n pathWas = DOM.getCurrentDirPath();\n unsetCurrentFile(currentFileWas);\n }\n currentFile.classList.add(CURRENT_FILE);\n const path = DOM.getCurrentDirPath();\n const name = CloudCmd.config('name');\n if (path !== pathWas) {\n DOM.setTitle((0,_common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_2__.getTitle)({\n name,\n path\n }));\n\n /* history could be present\n * but it should be false\n * to prevent default behavior\n */\n if (!o || o.history) {\n const historyPath = path === '/' ? path : _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_2__.FS + path;\n DOM.setHistory(historyPath, null, historyPath);\n }\n }\n\n /* scrolling to current file */\n const CENTER = true;\n DOM.scrollIntoViewIfNeeded(currentFile, CENTER);\n CloudCmd.emit('current-file', currentFile);\n CloudCmd.emit('current-path', path);\n CloudCmd.emit('current-name', DOM.getCurrentName(currentFile));\n return DOM;\n};\nconst setCurrentByName = name => {\n const current = DOM.getCurrentByName(name);\n return DOM.setCurrentFile(current);\n};\n\n/*\n * set current file by position\n *\n * @param layer - element\n * @param - position {x, y}\n */\nconst getCurrentByPosition = ({\n x,\n y\n}) => {\n const element = document.elementFromPoint(x, y);\n const getEl = el => {\n const {\n tagName\n } = el;\n const isChild = /A|SPAN|LI/.test(tagName);\n if (!isChild) return null;\n if (tagName === 'A') return el.parentElement.parentElement;\n if (tagName === 'SPAN') return el.parentElement;\n return el;\n };\n const el = getEl(element);\n if (el && el.tagName !== 'LI') return null;\n return el;\n};\n\n/**\n * current file check\n *\n * @param currentFile\n */\nconst isCurrentFile = currentFile => {\n if (!currentFile) return false;\n return DOM.isContainClass(currentFile, CURRENT_FILE);\n};\n\n/**\n * set title or create title element\n *\n * @param name\n */\nconst setTitle = name => {\n if (!Title) Title = DOM.getByTag('title')[0] || _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_0__('title', {\n innerHTML: name,\n parent: document.head\n });\n Title.textContent = name;\n return DOM;\n};\n\n/**\n * check is current file is a directory\n *\n * @param currentFile\n */\nconst isCurrentIsDir = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const fileType = DOM.getCurrentType(current);\n const isZip = path.endsWith('.zip');\n const isDir = /^directory(-link)?/.test(fileType);\n return isDir || isZip;\n};\nconst getCurrentType = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const el = DOM.getByDataName('js-type', current);\n const type = el.className.split(' ').pop();\n return type;\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/current-file.mjs\n}");
|
|
63
63
|
|
|
64
64
|
/***/ },
|
|
65
65
|
|
|
@@ -125,7 +125,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
125
125
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
126
126
|
|
|
127
127
|
"use strict";
|
|
128
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ get: () => (/* binding */ get)\n/* harmony export */ });\n/* harmony import */ var itype__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n/* harmony import */ var es6_promisify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\n/* harmony import */ var _dom_load__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #dom/load */ \"./client/dom/load.mjs\");\n/* harmony import */ var
|
|
128
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ get: () => (/* binding */ get)\n/* harmony export */ });\n/* harmony import */ var itype__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n/* harmony import */ var es6_promisify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\n/* harmony import */ var _dom_load__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #dom/load */ \"./client/dom/load.mjs\");\n/* harmony import */ var _dom_rest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! #dom/rest */ \"./client/dom/rest.mjs\");\n/* global CloudCmd */\n\n\n\n\nconst Promises = {};\nconst FILES_JSON = 'config|modules';\nconst FILES_HTML = 'file|path|link|pathLink|media';\nconst FILES_HTML_ROOT = 'view/media-tmpl|config-tmpl|upload';\nconst DIR_HTML = '/tmpl/';\nconst DIR_HTML_FS = `${DIR_HTML}fs/`;\nconst DIR_JSON = '/json/';\nconst timeout = getTimeoutOnce(2000);\nconst get = getFile;\nfunction getFile(name) {\n const type = itype__WEBPACK_IMPORTED_MODULE_0__(name);\n check(name);\n if (type === 'string') return getModule(name);\n if (type === 'array') return Promise.all(name.map(getFile));\n}\nfunction check(name) {\n if (!name) throw Error('name could not be empty!');\n}\nfunction getModule(name) {\n const regExpHTML = RegExp(FILES_HTML + '|' + FILES_HTML_ROOT);\n const regExpJSON = RegExp(FILES_JSON);\n const isHTML = regExpHTML.test(name);\n const isJSON = regExpJSON.test(name);\n if (!isHTML && !isJSON) return showError(name);\n if (name === 'config') return getConfig();\n const path = getPath(name, isHTML, isJSON);\n return getSystemFile(path);\n}\nfunction getPath(name, isHTML, isJSON) {\n let path;\n const regExp = RegExp(FILES_HTML_ROOT);\n const isRoot = regExp.test(name);\n if (isHTML) {\n if (isRoot) path = DIR_HTML + name.replace('-tmpl', '');else path = DIR_HTML_FS + name;\n path += '.hbs';\n } else if (isJSON) {\n path = DIR_JSON + name + '.json';\n }\n return path;\n}\nfunction showError(name) {\n const str = `Wrong file name: ${name}`;\n const error = Error(str);\n throw error;\n}\nconst getSystemFile = (0,es6_promisify__WEBPACK_IMPORTED_MODULE_1__.promisify)((file, callback) => {\n const {\n prefix\n } = CloudCmd;\n if (!Promises[file]) Promises[file] = new Promise((success, error) => {\n const url = prefix + file;\n _dom_load__WEBPACK_IMPORTED_MODULE_2__.ajax({\n url,\n success,\n error\n });\n });\n Promises[file].then(data => {\n callback(null, data);\n }, error => {\n Promises[file] = null;\n callback(error);\n });\n});\nconst getConfig = async () => {\n let is;\n if (!Promises.config) Promises.config = () => {\n is = true;\n return _dom_rest__WEBPACK_IMPORTED_MODULE_3__.Config.read();\n };\n const [, data] = await Promises.config();\n if (data) is = false;\n timeout(() => {\n if (!is) Promises.config = null;\n });\n return data;\n};\nfunction getTimeoutOnce(time) {\n let is;\n return callback => {\n if (is) return;\n is = true;\n setTimeout(() => {\n is = false;\n callback();\n }, time);\n };\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/files.mjs\n}");
|
|
129
129
|
|
|
130
130
|
/***/ },
|
|
131
131
|
|
|
@@ -147,7 +147,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
147
147
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
148
148
|
|
|
149
149
|
"use strict";
|
|
150
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CurrentInfo: () => (/* binding */ CurrentInfo),\n/* harmony export */ changePanel: () => (/* binding */ changePanel),\n/* harmony export */ checkStorageHash: () => (/* binding */ checkStorageHash),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ deleteCurrent: () => (/* binding */ deleteCurrent),\n/* harmony export */ deleteSelected: () => (/* binding */ deleteSelected),\n/* harmony export */ duplicatePanel: () => (/* binding */ duplicatePanel),\n/* harmony export */ expandSelection: () => (/* binding */ expandSelection),\n/* harmony export */ getActiveFiles: () => (/* binding */ getActiveFiles),\n/* harmony export */ getAllFiles: () => (/* binding */ getAllFiles),\n/* harmony export */ getCSSVar: () => (/* binding */ getCSSVar),\n/* harmony export */ getCurrentData: () => (/* binding */ getCurrentData),\n/* harmony export */ getCurrentDate: () => (/* binding */ getCurrentDate),\n/* harmony export */ getCurrentDirName: () => (/* binding */ getCurrentDirName),\n/* harmony export */ getCurrentLink: () => (/* binding */ getCurrentLink),\n/* harmony export */ getCurrentMode: () => (/* binding */ getCurrentMode),\n/* harmony export */ getCurrentOwner: () => (/* binding */ getCurrentOwner),\n/* harmony export */ getCurrentSize: () => (/* binding */ getCurrentSize),\n/* harmony export */ getFM: () => (/* binding */ getFM),\n/* harmony export */ getFilenames: () => (/* binding */ getFilenames),\n/* harmony export */ getFiles: () => (/* binding */ getFiles),\n/* harmony export */ getNotCurrentDirPath: () => (/* binding */ getNotCurrentDirPath),\n/* harmony export */ getPackerExt: () => (/* binding */ getPackerExt),\n/* harmony export */ getPanel: () => (/* binding */ getPanel),\n/* harmony export */ getPanelPosition: () => (/* binding */ getPanelPosition),\n/* harmony export */ getParentDirPath: () => (/* binding */ getParentDirPath),\n/* harmony export */ getRefreshButton: () => (/* binding */ getRefreshButton),\n/* harmony export */ goToDirectory: () => (/* binding */ goToDirectory),\n/* harmony export */ hidePanel: () => (/* binding */ hidePanel),\n/* harmony export */ loadCurrentHash: () => (/* binding */ loadCurrentHash),\n/* harmony export */ loadCurrentSize: () => (/* binding */ loadCurrentSize),\n/* harmony export */ loadRemote: () => (/* binding */ loadRemote),\n/* harmony export */ loadSocket: () => (/* binding */ loadSocket),\n/* harmony export */ promptNewDir: () => (/* binding */ promptNewDir),\n/* harmony export */ promptNewFile: () => (/* binding */ promptNewFile),\n/* harmony export */ remove: () => (/* binding */ remove),\n/* harmony export */ saveDataToStorage: () => (/* binding */ saveDataToStorage),\n/* harmony export */ scrollByPages: () => (/* binding */ scrollByPages),\n/* harmony export */ scrollIntoViewIfNeeded: () => (/* binding */ scrollIntoViewIfNeeded),\n/* harmony export */ setCurrentSize: () => (/* binding */ setCurrentSize),\n/* harmony export */ setHistory: () => (/* binding */ setHistory),\n/* harmony export */ showPanel: () => (/* binding */ showPanel),\n/* harmony export */ shrinkSelection: () => (/* binding */ shrinkSelection),\n/* harmony export */ swapPanels: () => (/* binding */ swapPanels),\n/* harmony export */ unselectFiles: () => (/* binding */ unselectFiles),\n/* harmony export */ updateCurrentInfo: () => (/* binding */ updateCurrentInfo)\n/* harmony export */ });\n/* harmony import */ var _dom_load__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! #dom/load */ \"./client/dom/load.mjs\");\n/* harmony import */ var _dom_files__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! #dom/files */ \"./client/dom/files.mjs\");\n/* harmony import */ var _dom_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #dom/dialog */ \"./client/dom/dialog.mjs\");\n/* harmony import */ var _dom_events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! #dom/events */ \"./client/dom/events/index.mjs\");\n/* harmony import */ var _common_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! #common/util */ \"./common/util.mjs\");\n/* harmony import */ var _images_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./images.mjs */ \"./client/dom/images.mjs\");\n/* harmony import */ var _rest_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./rest.js */ \"./client/dom/rest.js\");\n/* harmony import */ var _storage_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./storage.js */ \"./client/dom/storage.js\");\n/* harmony import */ var _operations_rename_current_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./operations/rename-current.js */ \"./client/dom/operations/rename-current.js\");\n/* harmony import */ var _current_file_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./current-file.mjs */ \"./client/dom/current-file.mjs\");\n/* harmony import */ var _dom_tree_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./dom-tree.mjs */ \"./client/dom/dom-tree.mjs\");\n/* harmony import */ var _cmd_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./cmd.mjs */ \"./client/dom/cmd.mjs\");\n/* harmony import */ var _io_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./io/index.js */ \"./client/dom/io/index.js\");\n/* harmony import */ var _directory_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./directory.mjs */ \"./client/dom/directory.mjs\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./buffer.mjs */ \"./client/dom/buffer.mjs\");\n/* harmony import */ var _load_remote_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./load-remote.js */ \"./client/dom/load-remote.js\");\n/* harmony import */ var _select_by_pattern_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./select-by-pattern.mjs */ \"./client/dom/select-by-pattern.mjs\");\n/* global CloudCmd */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst {\n assign\n} = Object;\nconst DOM = {\n getCurrentDirName,\n getNotCurrentDirPath,\n getParentDirPath,\n load: _dom_load__WEBPACK_IMPORTED_MODULE_0__,\n RESTful: _rest_js__WEBPACK_IMPORTED_MODULE_6__,\n Storage: _storage_js__WEBPACK_IMPORTED_MODULE_7__,\n loadRemote,\n loadSocket,\n promptNewDir,\n promptNewFile,\n unselectFiles,\n getActiveFiles,\n getCurrentDate,\n getCurrentSize,\n loadCurrentSize,\n loadCurrentHash,\n setCurrentSize,\n getCurrentMode,\n getCurrentOwner,\n getCurrentData,\n getRefreshButton,\n getAllFiles,\n expandSelection,\n shrinkSelection,\n setHistory,\n getCurrentLink,\n getFilenames,\n checkStorageHash,\n saveDataToStorage,\n getFM,\n getPanelPosition,\n getCSSVar,\n getPanel,\n getFiles,\n showPanel,\n hidePanel,\n remove,\n deleteCurrent,\n deleteSelected,\n renameCurrent: _operations_rename_current_js__WEBPACK_IMPORTED_MODULE_8__,\n scrollIntoViewIfNeeded,\n scrollByPages,\n changePanel,\n getPackerExt,\n goToDirectory,\n duplicatePanel,\n swapPanels,\n updateCurrentInfo\n};\nassign(DOM, {\n ..._dom_tree_mjs__WEBPACK_IMPORTED_MODULE_10__,\n ..._current_file_mjs__WEBPACK_IMPORTED_MODULE_9__,\n ..._cmd_mjs__WEBPACK_IMPORTED_MODULE_11__\n});\nconst CurrentInfo = {};\nDOM.Images = _images_mjs__WEBPACK_IMPORTED_MODULE_5__;\nDOM.load = _dom_load__WEBPACK_IMPORTED_MODULE_0__;\nDOM.Files = _dom_files__WEBPACK_IMPORTED_MODULE_1__;\nDOM.RESTful = _rest_js__WEBPACK_IMPORTED_MODULE_6__;\nDOM.IO = _io_index_js__WEBPACK_IMPORTED_MODULE_12__;\nDOM.Storage = _storage_js__WEBPACK_IMPORTED_MODULE_7__;\nDOM.Dialog = _dom_dialog__WEBPACK_IMPORTED_MODULE_2__;\nDOM.CurrentInfo = CurrentInfo;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DOM);\nDOM.uploadDirectory = _directory_mjs__WEBPACK_IMPORTED_MODULE_13__.uploadDirectory;\nDOM.Buffer = _buffer_mjs__WEBPACK_IMPORTED_MODULE_14__;\nDOM.Events = _dom_events__WEBPACK_IMPORTED_MODULE_3__;\nconst isString = a => typeof a === 'string';\nconst TabPanel = {\n 'js-left': null,\n 'js-right': null\n};\nfunction loadRemote(name, options, callback) {\n _load_remote_js__WEBPACK_IMPORTED_MODULE_15__(name, options, callback);\n return DOM;\n}\nfunction loadSocket(callback) {\n DOM.loadRemote('socket', {\n name: 'io'\n }, callback);\n return DOM;\n}\n\n/**\n * create new folder\n *\n */\nasync function promptNewDir() {\n await promptNew('directory');\n}\n\n/**\n * create new file\n *\n * @typeName\n * @type\n */\nasync function promptNewFile() {\n await promptNew('file');\n}\nasync function promptNew(typeName) {\n const {\n Dialog\n } = DOM;\n const dir = DOM.getCurrentDirPath();\n const msg = `New ${typeName}` || 'File';\n const getName = () => {\n const name = DOM.getCurrentName();\n if (name === '..') return '';\n return name;\n };\n const name = getName();\n const [cancel, currentName] = await Dialog.prompt(msg, name);\n if (cancel) return;\n const path = `${dir}${currentName}`;\n if (typeName === 'directory') await _rest_js__WEBPACK_IMPORTED_MODULE_6__.createDirectory(path);else await _rest_js__WEBPACK_IMPORTED_MODULE_6__.write(path);\n await CloudCmd.refresh({\n currentName\n });\n}\n\n/**\n * get current directory name\n */\nfunction getCurrentDirName() {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n return href.replace(`${substr}/`, '') || '/';\n}\n\n/**\n * get current directory path\n */\nfunction getParentDirPath(panel) {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path !== '/') return path.slice(0, index);\n return path;\n}\n\n/**\n * get not current directory path\n */\nfunction getNotCurrentDirPath() {\n const panel = DOM.getPanel({\n active: false\n });\n return DOM.getCurrentDirPath(panel);\n}\n\n/*\n * unselect all files\n */\nfunction unselectFiles(files) {\n files = files || DOM.getSelectedFiles();\n Array.from(files).forEach(DOM.toggleSelectedFile);\n}\n\n/**\n * get all selected files or current when none selected\n *\n * @currentFile\n */\nfunction getActiveFiles() {\n const current = DOM.getCurrentFile();\n const files = DOM.getSelectedFiles();\n const name = DOM.getCurrentName(current);\n if (!files.length && name !== '..') return [current];\n return files;\n}\nfunction getCurrentDate(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n return DOM.getByDataName('js-date', current).textContent;\n}\n\n/**\n * get size\n * @currentFile\n */\nfunction getCurrentSize(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n\n /* если это папка - возвращаем слово dir вместо размера*/\n const size = DOM.getByDataName('js-size', current).textContent.replace(/^<|>$/g, '');\n return size;\n}\n\n/**\n * get size\n * @currentFile\n */\nasync function loadCurrentSize(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?size';\n const link = DOM.getCurrentPath(current);\n _images_mjs__WEBPACK_IMPORTED_MODULE_5__.show.load();\n if (name === '..') return;\n const [, size] = await _rest_js__WEBPACK_IMPORTED_MODULE_6__.read(link + query);\n DOM.setCurrentSize(size, current);\n _images_mjs__WEBPACK_IMPORTED_MODULE_5__.hide();\n return current;\n}\n\n/**\n * load hash\n * @callback\n * @currentFile\n */\nasync function loadCurrentHash(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?hash';\n const link = DOM.getCurrentPath(current);\n const [, data] = await _rest_js__WEBPACK_IMPORTED_MODULE_6__.read(link + query);\n return data;\n}\n\n/**\n * set size\n * @currentFile\n */\nfunction setCurrentSize(size, currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const sizeElement = DOM.getByDataName('js-size', current);\n sizeElement.textContent = size;\n}\n\n/**\n * @currentFile\n */\nfunction getCurrentMode(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const mode = DOM.getByDataName('js-mode', current);\n return mode.textContent;\n}\n\n/**\n * @currentFile\n */\nfunction getCurrentOwner(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const owner = DOM.getByDataName('js-owner', current);\n return owner.textContent;\n}\n\n/**\n * unified way to get current file content\n *\n * @param currentFile\n */\nasync function getCurrentData(currentFile) {\n const {\n Dialog\n } = DOM;\n const Info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const isDir = DOM.isCurrentIsDir(current);\n if (Info.name === '..') {\n Dialog.alert.noFiles();\n return [Error('No Files')];\n }\n if (isDir) return await _rest_js__WEBPACK_IMPORTED_MODULE_6__.read(path);\n const [hashNew, hash] = await DOM.checkStorageHash(path);\n if (!hashNew) return [Error(`Can't get hash of a file`)];\n if (hash === hashNew) return [null, await _storage_js__WEBPACK_IMPORTED_MODULE_7__.get(`${path}-data`)];\n const [e, data] = await _rest_js__WEBPACK_IMPORTED_MODULE_6__.read(path);\n if (e) return [e, null];\n const ONE_MEGABYTE = 1024 ** 2 * 1024;\n const {\n length\n } = data;\n if (hash && length < ONE_MEGABYTE) await DOM.saveDataToStorage(path, data, hashNew);\n return [null, data];\n}\n\n/**\n * unified way to get RefreshButton\n */\nfunction getRefreshButton(panel = DOM.getPanel()) {\n return DOM.getByDataName('js-refresh', panel);\n}\nfunction getAllFiles() {\n const panel = DOM.getPanel();\n const files = DOM.getFiles(panel);\n const name = DOM.getCurrentName(files[0]);\n const from = a => a === '..' ? 1 : 0;\n const i = from(name);\n return Array.from(files).slice(i);\n}\n\n/**\n * open dialog with expand selection\n */\nasync function expandSelection() {\n const msg = 'expand';\n const {\n files\n } = CurrentInfo;\n await (0,_select_by_pattern_mjs__WEBPACK_IMPORTED_MODULE_16__.selectByPattern)(msg, files);\n}\n\n/**\n * open dialog with shrink selection\n */\nasync function shrinkSelection() {\n const msg = 'shrink';\n const {\n files\n } = CurrentInfo;\n await (0,_select_by_pattern_mjs__WEBPACK_IMPORTED_MODULE_16__.selectByPattern)(msg, files);\n}\n\n/**\n * setting history wrapper\n */\nfunction setHistory(data, title, url) {\n const ret = globalThis.history;\n const {\n prefix\n } = CloudCmd;\n url = prefix + url;\n if (ret) history.pushState(data, title, url);\n return ret;\n}\n\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\nfunction getCurrentLink(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const link = DOM.getByTag('a', current);\n return link[0];\n}\nfunction getFilenames(files) {\n if (!files) throw Error('AllFiles could not be empty');\n const first = files[0] || DOM.getCurrentFile();\n const name = DOM.getCurrentName(first);\n const allFiles = Array.from(files);\n if (name === '..') allFiles.shift();\n const names = allFiles.map(current => {\n return DOM.getCurrentName(current);\n });\n return names;\n}\n\n/**\n * check storage hash\n */\nasync function checkStorageHash(name) {\n const nameHash = `${name}-hash`;\n if (!isString(name)) throw Error('name should be a string!');\n const [loadHash, storeHash] = await Promise.all([DOM.loadCurrentHash(), _storage_js__WEBPACK_IMPORTED_MODULE_7__.get(nameHash)]);\n return [loadHash, storeHash];\n}\n\n/**\n * save data to storage\n *\n * @param name\n * @param data\n * @param hash\n */\nasync function saveDataToStorage(name, data, hash) {\n const isDir = DOM.isCurrentIsDir();\n if (isDir) return;\n hash = hash || (await DOM.loadCurrentHash());\n const nameHash = `${name}-hash`;\n const nameData = `${name}-data`;\n await _storage_js__WEBPACK_IMPORTED_MODULE_7__.set(nameHash, hash);\n await _storage_js__WEBPACK_IMPORTED_MODULE_7__.set(nameData, data);\n return hash;\n}\nfunction getFM() {\n const {\n parentElement\n } = DOM.getPanel();\n return parentElement;\n}\nfunction getPanelPosition(panel) {\n panel = panel || DOM.getPanel();\n return panel.dataset.name.replace('js-', '');\n}\nfunction getCSSVar(name, {\n body = document.body\n} = {}) {\n const bodyStyle = getComputedStyle(body);\n return bodyStyle.getPropertyValue(`--${name}`);\n}\n\n/** function getting panel active, or passive\n * @param options = {active: true}\n */\nfunction getPanel(options) {\n let files;\n let panel;\n let isLeft;\n let dataName = 'js-';\n const current = DOM.getCurrentFile();\n if (!current) {\n panel = DOM.getByDataName('js-left');\n } else {\n files = current.parentElement;\n panel = files.parentElement;\n isLeft = panel.getAttribute('data-name') === 'js-left';\n }\n\n /* if {active : false} getting passive panel */\n if (options && !options.active) {\n dataName += isLeft ? 'right' : 'left';\n panel = DOM.getByDataName(dataName);\n }\n\n /* if two panels showed\n * then always work with passive\n * panel\n */\n if (globalThis.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH) panel = DOM.getByDataName('js-left');\n if (!panel) throw Error('can not find Active Panel!');\n return panel;\n}\nfunction getFiles(element) {\n const files = DOM.getByDataName('js-files', element);\n return files.children || [];\n}\n\n/**\n * shows panel right or left (or active)\n */\nfunction showPanel(active) {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n DOM.show(panel);\n return true;\n}\n\n/**\n * hides panel right or left (or active)\n */\nfunction hidePanel(active) {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n return DOM.hide(panel);\n}\n\n/**\n * remove child of element\n * @param child\n * @param element\n */\nfunction remove(child, element) {\n const parent = element || document.body;\n parent.removeChild(child);\n return DOM;\n}\n\n/**\n * remove current file from file table\n * @param current\n *\n */\nfunction deleteCurrent(current) {\n if (!current) DOM.getCurrentFile();\n const parent = current === null || current === void 0 ? void 0 : current.parentElement;\n const name = DOM.getCurrentName(current);\n if (current && name !== '..') {\n const next = current.nextSibling;\n const prev = current.previousSibling;\n DOM.setCurrentFile(next || prev);\n parent.removeChild(current);\n }\n}\n\n/**\n * remove selected files from file table\n * @Selected\n */\nfunction deleteSelected(selected) {\n selected = selected || DOM.getSelectedFiles();\n if (!selected) return;\n selected.map(DOM.deleteCurrent);\n}\n\n/**\n * rename current file\n *\n * @currentFile\n */\nfunction scrollIntoViewIfNeeded(element, center = false) {\n if (!element || !element.scrollIntoViewIfNeeded) return;\n element.scrollIntoViewIfNeeded(center);\n}\n\n/* scroll on one page */\nfunction scrollByPages(element, pPages) {\n const ret = (element === null || element === void 0 ? void 0 : element.scrollByPages) && pPages;\n if (ret) element.scrollByPages(pPages);\n return ret;\n}\nfunction changePanel() {\n const Info = CurrentInfo;\n let panel = DOM.getPanel();\n CloudCmd.emit('passive-dir', Info.dirPath);\n const panelPassive = DOM.getPanel({\n active: false\n });\n let name = DOM.getCurrentName();\n const filesPassive = DOM.getFiles(panelPassive);\n let dataName = panel.getAttribute('data-name');\n TabPanel[dataName] = name;\n panel = panelPassive;\n dataName = panel.getAttribute('data-name');\n name = TabPanel[dataName];\n let files;\n let current;\n if (name) {\n current = DOM.getCurrentByName(name, panel);\n if (current) files = current.parentElement;\n }\n if (!files || !files.parentElement) {\n current = DOM.getCurrentByName(name, panel);\n if (!current) [current] = filesPassive;\n }\n DOM.setCurrentFile(current, {\n history: true\n });\n CloudCmd.emit('active-dir', Info.dirPath);\n return DOM;\n}\nfunction getPackerExt(type) {\n if (type === 'zip') return '.zip';\n return '.tar.gz';\n}\nasync function goToDirectory(overrides = {}) {\n const {\n Dialog\n } = DOM;\n const {\n prompt = Dialog.prompt,\n changeDir = CloudCmd.changeDir\n } = overrides;\n const msg = 'Go to directory:';\n const {\n dirPath\n } = CurrentInfo;\n const [cancel, path = dirPath] = await prompt(msg, dirPath);\n if (cancel) return;\n await changeDir(path);\n}\nasync function duplicatePanel() {\n const Info = CurrentInfo;\n const {\n isDir\n } = Info;\n const panel = Info.panelPassive;\n const noCurrent = !Info.isOnePanel;\n const getPath = isDir => {\n if (isDir) return Info.path;\n return Info.dirPath;\n };\n const path = getPath(isDir);\n await CloudCmd.changeDir(path, {\n panel,\n noCurrent\n });\n}\nasync function swapPanels() {\n const Info = CurrentInfo;\n const {\n panel,\n files,\n element,\n panelPassive\n } = Info;\n const path = DOM.getCurrentDirPath();\n const dirPathPassive = DOM.getNotCurrentDirPath();\n let currentIndex = files.indexOf(element);\n await CloudCmd.changeDir(path, {\n panel: panelPassive,\n noCurrent: true\n });\n await CloudCmd.changeDir(dirPathPassive, {\n panel\n });\n const length = Info.files.length - 1;\n if (currentIndex > length) currentIndex = length;\n const el = Info.files[currentIndex];\n DOM.setCurrentFile(el);\n}\nfunction updateCurrentInfo(currentFile) {\n const info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const files = current.parentElement;\n const panelPassive = DOM.getPanel({\n active: false\n });\n const filesPassive = DOM.getFiles(panelPassive);\n const name = DOM.getCurrentName(current);\n info.dir = DOM.getCurrentDirName();\n info.dirPath = DOM.getCurrentDirPath();\n info.parentDirPath = DOM.getParentDirPath();\n info.element = current;\n info.ext = (0,_common_util__WEBPACK_IMPORTED_MODULE_4__.getExt)(name);\n info.files = Array.from(files.children);\n info.filesPassive = Array.from(filesPassive);\n info.first = files.firstChild;\n info.getData = DOM.getCurrentData;\n info.last = files.lastChild;\n info.link = DOM.getCurrentLink(current);\n info.mode = DOM.getCurrentMode(current);\n info.name = name;\n info.path = DOM.getCurrentPath(current);\n info.panel = files.parentElement || DOM.getPanel();\n info.panelPassive = panelPassive;\n info.size = DOM.getCurrentSize(current);\n info.isDir = DOM.isCurrentIsDir();\n info.isSelected = DOM.isSelected(current);\n info.panelPosition = DOM.getPanel().dataset.name.replace('js-', '');\n info.isOnePanel = info.panel.getAttribute('data-name') === info.panelPassive.getAttribute('data-name');\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/index.mjs\n}");
|
|
150
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CurrentInfo: () => (/* binding */ CurrentInfo),\n/* harmony export */ changePanel: () => (/* binding */ changePanel),\n/* harmony export */ checkStorageHash: () => (/* binding */ checkStorageHash),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ deleteCurrent: () => (/* binding */ deleteCurrent),\n/* harmony export */ deleteSelected: () => (/* binding */ deleteSelected),\n/* harmony export */ duplicatePanel: () => (/* binding */ duplicatePanel),\n/* harmony export */ expandSelection: () => (/* binding */ expandSelection),\n/* harmony export */ getActiveFiles: () => (/* binding */ getActiveFiles),\n/* harmony export */ getAllFiles: () => (/* binding */ getAllFiles),\n/* harmony export */ getCSSVar: () => (/* binding */ getCSSVar),\n/* harmony export */ getCurrentData: () => (/* binding */ getCurrentData),\n/* harmony export */ getCurrentDate: () => (/* binding */ getCurrentDate),\n/* harmony export */ getCurrentDirName: () => (/* binding */ getCurrentDirName),\n/* harmony export */ getCurrentLink: () => (/* binding */ getCurrentLink),\n/* harmony export */ getCurrentMode: () => (/* binding */ getCurrentMode),\n/* harmony export */ getCurrentOwner: () => (/* binding */ getCurrentOwner),\n/* harmony export */ getCurrentSize: () => (/* binding */ getCurrentSize),\n/* harmony export */ getFM: () => (/* binding */ getFM),\n/* harmony export */ getFilenames: () => (/* binding */ getFilenames),\n/* harmony export */ getFiles: () => (/* binding */ getFiles),\n/* harmony export */ getNotCurrentDirPath: () => (/* binding */ getNotCurrentDirPath),\n/* harmony export */ getPackerExt: () => (/* binding */ getPackerExt),\n/* harmony export */ getPanel: () => (/* binding */ getPanel),\n/* harmony export */ getPanelPosition: () => (/* binding */ getPanelPosition),\n/* harmony export */ getParentDirPath: () => (/* binding */ getParentDirPath),\n/* harmony export */ getRefreshButton: () => (/* binding */ getRefreshButton),\n/* harmony export */ goToDirectory: () => (/* binding */ goToDirectory),\n/* harmony export */ hidePanel: () => (/* binding */ hidePanel),\n/* harmony export */ loadCurrentHash: () => (/* binding */ loadCurrentHash),\n/* harmony export */ loadCurrentSize: () => (/* binding */ loadCurrentSize),\n/* harmony export */ loadRemote: () => (/* binding */ loadRemote),\n/* harmony export */ loadSocket: () => (/* binding */ loadSocket),\n/* harmony export */ promptNewDir: () => (/* binding */ promptNewDir),\n/* harmony export */ promptNewFile: () => (/* binding */ promptNewFile),\n/* harmony export */ remove: () => (/* binding */ remove),\n/* harmony export */ saveDataToStorage: () => (/* binding */ saveDataToStorage),\n/* harmony export */ scrollByPages: () => (/* binding */ scrollByPages),\n/* harmony export */ scrollIntoViewIfNeeded: () => (/* binding */ scrollIntoViewIfNeeded),\n/* harmony export */ setCurrentSize: () => (/* binding */ setCurrentSize),\n/* harmony export */ setHistory: () => (/* binding */ setHistory),\n/* harmony export */ showPanel: () => (/* binding */ showPanel),\n/* harmony export */ shrinkSelection: () => (/* binding */ shrinkSelection),\n/* harmony export */ swapPanels: () => (/* binding */ swapPanels),\n/* harmony export */ unselectFiles: () => (/* binding */ unselectFiles),\n/* harmony export */ updateCurrentInfo: () => (/* binding */ updateCurrentInfo)\n/* harmony export */ });\n/* harmony import */ var _dom_load__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! #dom/load */ \"./client/dom/load.mjs\");\n/* harmony import */ var _dom_files__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! #dom/files */ \"./client/dom/files.mjs\");\n/* harmony import */ var _dom_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #dom/dialog */ \"./client/dom/dialog.mjs\");\n/* harmony import */ var _dom_events__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! #dom/events */ \"./client/dom/events/index.mjs\");\n/* harmony import */ var _common_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! #common/util */ \"./common/util.mjs\");\n/* harmony import */ var _dom_storage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! #dom/storage */ \"./client/dom/storage.mjs\");\n/* harmony import */ var _dom_rest__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! #dom/rest */ \"./client/dom/rest.mjs\");\n/* harmony import */ var _images_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./images.mjs */ \"./client/dom/images.mjs\");\n/* harmony import */ var _operations_rename_current_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./operations/rename-current.js */ \"./client/dom/operations/rename-current.js\");\n/* harmony import */ var _current_file_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./current-file.mjs */ \"./client/dom/current-file.mjs\");\n/* harmony import */ var _dom_tree_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./dom-tree.mjs */ \"./client/dom/dom-tree.mjs\");\n/* harmony import */ var _cmd_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./cmd.mjs */ \"./client/dom/cmd.mjs\");\n/* harmony import */ var _io_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./io/index.js */ \"./client/dom/io/index.js\");\n/* harmony import */ var _directory_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./directory.mjs */ \"./client/dom/directory.mjs\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./buffer.mjs */ \"./client/dom/buffer.mjs\");\n/* harmony import */ var _load_remote_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./load-remote.mjs */ \"./client/dom/load-remote.mjs\");\n/* harmony import */ var _select_by_pattern_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./select-by-pattern.mjs */ \"./client/dom/select-by-pattern.mjs\");\n/* global CloudCmd */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst {\n assign\n} = Object;\nconst DOM = {\n getCurrentDirName,\n getNotCurrentDirPath,\n getParentDirPath,\n loadRemote,\n loadSocket,\n promptNewDir,\n promptNewFile,\n unselectFiles,\n getActiveFiles,\n getCurrentDate,\n getCurrentSize,\n loadCurrentSize,\n loadCurrentHash,\n setCurrentSize,\n getCurrentMode,\n getCurrentOwner,\n getCurrentData,\n getRefreshButton,\n getAllFiles,\n expandSelection,\n shrinkSelection,\n setHistory,\n getCurrentLink,\n getFilenames,\n checkStorageHash,\n saveDataToStorage,\n getFM,\n getPanelPosition,\n getCSSVar,\n getPanel,\n getFiles,\n showPanel,\n hidePanel,\n remove,\n deleteCurrent,\n deleteSelected,\n renameCurrent: _operations_rename_current_js__WEBPACK_IMPORTED_MODULE_8__,\n scrollIntoViewIfNeeded,\n scrollByPages,\n changePanel,\n getPackerExt,\n goToDirectory,\n duplicatePanel,\n swapPanels,\n updateCurrentInfo\n};\nassign(DOM, {\n ..._dom_tree_mjs__WEBPACK_IMPORTED_MODULE_10__,\n ..._current_file_mjs__WEBPACK_IMPORTED_MODULE_9__,\n ..._cmd_mjs__WEBPACK_IMPORTED_MODULE_11__\n});\nconst CurrentInfo = {};\nDOM.Images = _images_mjs__WEBPACK_IMPORTED_MODULE_7__;\nDOM.load = _dom_load__WEBPACK_IMPORTED_MODULE_0__;\nDOM.Files = _dom_files__WEBPACK_IMPORTED_MODULE_1__;\nDOM.RESTful = _dom_rest__WEBPACK_IMPORTED_MODULE_6__;\nDOM.IO = _io_index_js__WEBPACK_IMPORTED_MODULE_12__;\nDOM.Storage = _dom_storage__WEBPACK_IMPORTED_MODULE_5__;\nDOM.Dialog = _dom_dialog__WEBPACK_IMPORTED_MODULE_2__;\nDOM.CurrentInfo = CurrentInfo;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DOM);\nDOM.uploadDirectory = _directory_mjs__WEBPACK_IMPORTED_MODULE_13__.uploadDirectory;\nDOM.Buffer = _buffer_mjs__WEBPACK_IMPORTED_MODULE_14__;\nDOM.Events = _dom_events__WEBPACK_IMPORTED_MODULE_3__;\nconst isString = a => typeof a === 'string';\nconst TabPanel = {\n 'js-left': null,\n 'js-right': null\n};\nfunction loadRemote(name, options, callback) {\n (0,_load_remote_mjs__WEBPACK_IMPORTED_MODULE_15__.loadRemote)(name, options, callback);\n return DOM;\n}\nfunction loadSocket(callback) {\n DOM.loadRemote('socket', {\n name: 'io'\n }, callback);\n return DOM;\n}\n\n/**\n * create new folder\n *\n */\nasync function promptNewDir() {\n await promptNew('directory');\n}\n\n/**\n * create new file\n *\n * @typeName\n * @type\n */\nasync function promptNewFile() {\n await promptNew('file');\n}\nasync function promptNew(typeName) {\n const {\n Dialog\n } = DOM;\n const dir = DOM.getCurrentDirPath();\n const msg = `New ${typeName}` || 'File';\n const getName = () => {\n const name = DOM.getCurrentName();\n if (name === '..') return '';\n return name;\n };\n const name = getName();\n const [cancel, currentName] = await Dialog.prompt(msg, name);\n if (cancel) return;\n const path = `${dir}${currentName}`;\n if (typeName === 'directory') await _dom_rest__WEBPACK_IMPORTED_MODULE_6__.createDirectory(path);else await _dom_rest__WEBPACK_IMPORTED_MODULE_6__.write(path);\n await CloudCmd.refresh({\n currentName\n });\n}\n\n/**\n * get current directory name\n */\nfunction getCurrentDirName() {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n return href.replace(`${substr}/`, '') || '/';\n}\n\n/**\n * get current directory path\n */\nfunction getParentDirPath(panel) {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path !== '/') return path.slice(0, index);\n return path;\n}\n\n/**\n * get not current directory path\n */\nfunction getNotCurrentDirPath() {\n const panel = DOM.getPanel({\n active: false\n });\n return DOM.getCurrentDirPath(panel);\n}\n\n/*\n * unselect all files\n */\nfunction unselectFiles(files) {\n files = files || DOM.getSelectedFiles();\n Array.from(files).forEach(DOM.toggleSelectedFile);\n}\n\n/**\n * get all selected files or current when none selected\n *\n * @currentFile\n */\nfunction getActiveFiles() {\n const current = DOM.getCurrentFile();\n const files = DOM.getSelectedFiles();\n const name = DOM.getCurrentName(current);\n if (!files.length && name !== '..') return [current];\n return files;\n}\nfunction getCurrentDate(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n return DOM.getByDataName('js-date', current).textContent;\n}\n\n/**\n * get size\n * @currentFile\n */\nfunction getCurrentSize(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n\n /* если это папка - возвращаем слово dir вместо размера*/\n const size = DOM.getByDataName('js-size', current).textContent.replace(/^<|>$/g, '');\n return size;\n}\n\n/**\n * get size\n * @currentFile\n */\nasync function loadCurrentSize(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?size';\n const link = DOM.getCurrentPath(current);\n _images_mjs__WEBPACK_IMPORTED_MODULE_7__.show.load();\n if (name === '..') return;\n const [, size] = await _dom_rest__WEBPACK_IMPORTED_MODULE_6__.read(link + query);\n DOM.setCurrentSize(size, current);\n _images_mjs__WEBPACK_IMPORTED_MODULE_7__.hide();\n return current;\n}\n\n/**\n * load hash\n * @callback\n * @currentFile\n */\nasync function loadCurrentHash(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?hash';\n const link = DOM.getCurrentPath(current);\n const [, data] = await _dom_rest__WEBPACK_IMPORTED_MODULE_6__.read(link + query);\n return data;\n}\n\n/**\n * set size\n * @currentFile\n */\nfunction setCurrentSize(size, currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const sizeElement = DOM.getByDataName('js-size', current);\n sizeElement.textContent = size;\n}\n\n/**\n * @currentFile\n */\nfunction getCurrentMode(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const mode = DOM.getByDataName('js-mode', current);\n return mode.textContent;\n}\n\n/**\n * @currentFile\n */\nfunction getCurrentOwner(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const owner = DOM.getByDataName('js-owner', current);\n return owner.textContent;\n}\n\n/**\n * unified way to get current file content\n *\n * @param currentFile\n */\nasync function getCurrentData(currentFile) {\n const {\n Dialog\n } = DOM;\n const Info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const isDir = DOM.isCurrentIsDir(current);\n if (Info.name === '..') {\n Dialog.alert.noFiles();\n return [Error('No Files')];\n }\n if (isDir) return await _dom_rest__WEBPACK_IMPORTED_MODULE_6__.read(path);\n const [hashNew, hash] = await DOM.checkStorageHash(path);\n if (!hashNew) return [Error(`Can't get hash of a file`)];\n if (hash === hashNew) return [null, await _dom_storage__WEBPACK_IMPORTED_MODULE_5__.get(`${path}-data`)];\n const [e, data] = await _dom_rest__WEBPACK_IMPORTED_MODULE_6__.read(path);\n if (e) return [e, null];\n const ONE_MEGABYTE = 1024 ** 2 * 1024;\n const {\n length\n } = data;\n if (hash && length < ONE_MEGABYTE) await DOM.saveDataToStorage(path, data, hashNew);\n return [null, data];\n}\n\n/**\n * unified way to get RefreshButton\n */\nfunction getRefreshButton(panel = DOM.getPanel()) {\n return DOM.getByDataName('js-refresh', panel);\n}\nfunction getAllFiles() {\n const panel = DOM.getPanel();\n const files = DOM.getFiles(panel);\n const name = DOM.getCurrentName(files[0]);\n const from = a => a === '..' ? 1 : 0;\n const i = from(name);\n return Array.from(files).slice(i);\n}\n\n/**\n * open dialog with expand selection\n */\nasync function expandSelection() {\n const msg = 'expand';\n const {\n files\n } = CurrentInfo;\n await (0,_select_by_pattern_mjs__WEBPACK_IMPORTED_MODULE_16__.selectByPattern)(msg, files);\n}\n\n/**\n * open dialog with shrink selection\n */\nasync function shrinkSelection() {\n const msg = 'shrink';\n const {\n files\n } = CurrentInfo;\n await (0,_select_by_pattern_mjs__WEBPACK_IMPORTED_MODULE_16__.selectByPattern)(msg, files);\n}\n\n/**\n * setting history wrapper\n */\nfunction setHistory(data, title, url) {\n const ret = globalThis.history;\n const {\n prefix\n } = CloudCmd;\n url = prefix + url;\n if (ret) history.pushState(data, title, url);\n return ret;\n}\n\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\nfunction getCurrentLink(currentFile) {\n const current = currentFile || DOM.getCurrentFile();\n const link = DOM.getByTag('a', current);\n return link[0];\n}\nfunction getFilenames(files) {\n if (!files) throw Error('AllFiles could not be empty');\n const first = files[0] || DOM.getCurrentFile();\n const name = DOM.getCurrentName(first);\n const allFiles = Array.from(files);\n if (name === '..') allFiles.shift();\n const names = allFiles.map(current => {\n return DOM.getCurrentName(current);\n });\n return names;\n}\n\n/**\n * check storage hash\n */\nasync function checkStorageHash(name) {\n const nameHash = `${name}-hash`;\n if (!isString(name)) throw Error('name should be a string!');\n const [loadHash, storeHash] = await Promise.all([DOM.loadCurrentHash(), _dom_storage__WEBPACK_IMPORTED_MODULE_5__.get(nameHash)]);\n return [loadHash, storeHash];\n}\n\n/**\n * save data to storage\n *\n * @param name\n * @param data\n * @param hash\n */\nasync function saveDataToStorage(name, data, hash) {\n const isDir = DOM.isCurrentIsDir();\n if (isDir) return;\n hash = hash || (await DOM.loadCurrentHash());\n const nameHash = `${name}-hash`;\n const nameData = `${name}-data`;\n await _dom_storage__WEBPACK_IMPORTED_MODULE_5__.set(nameHash, hash);\n await _dom_storage__WEBPACK_IMPORTED_MODULE_5__.set(nameData, data);\n return hash;\n}\nfunction getFM() {\n const {\n parentElement\n } = DOM.getPanel();\n return parentElement;\n}\nfunction getPanelPosition(panel) {\n panel = panel || DOM.getPanel();\n return panel.dataset.name.replace('js-', '');\n}\nfunction getCSSVar(name, {\n body = document.body\n} = {}) {\n const bodyStyle = getComputedStyle(body);\n return bodyStyle.getPropertyValue(`--${name}`);\n}\n\n/** function getting panel active, or passive\n * @param options = {active: true}\n */\nfunction getPanel(options) {\n let files;\n let panel;\n let isLeft;\n let dataName = 'js-';\n const current = DOM.getCurrentFile();\n if (!current) {\n panel = DOM.getByDataName('js-left');\n } else {\n files = current.parentElement;\n panel = files.parentElement;\n isLeft = panel.getAttribute('data-name') === 'js-left';\n }\n\n /* if {active : false} getting passive panel */\n if (options && !options.active) {\n dataName += isLeft ? 'right' : 'left';\n panel = DOM.getByDataName(dataName);\n }\n\n /* if two panels showed\n * then always work with passive\n * panel\n */\n if (globalThis.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH) panel = DOM.getByDataName('js-left');\n if (!panel) throw Error('can not find Active Panel!');\n return panel;\n}\nfunction getFiles(element) {\n const files = DOM.getByDataName('js-files', element);\n return files.children || [];\n}\n\n/**\n * shows panel right or left (or active)\n */\nfunction showPanel(active) {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n DOM.show(panel);\n return true;\n}\n\n/**\n * hides panel right or left (or active)\n */\nfunction hidePanel(active) {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n return DOM.hide(panel);\n}\n\n/**\n * remove child of element\n * @param child\n * @param element\n */\nfunction remove(child, element) {\n const parent = element || document.body;\n parent.removeChild(child);\n return DOM;\n}\n\n/**\n * remove current file from file table\n * @param current\n *\n */\nfunction deleteCurrent(current) {\n if (!current) DOM.getCurrentFile();\n const parent = current === null || current === void 0 ? void 0 : current.parentElement;\n const name = DOM.getCurrentName(current);\n if (current && name !== '..') {\n const next = current.nextSibling;\n const prev = current.previousSibling;\n DOM.setCurrentFile(next || prev);\n parent.removeChild(current);\n }\n}\n\n/**\n * remove selected files from file table\n * @Selected\n */\nfunction deleteSelected(selected) {\n selected = selected || DOM.getSelectedFiles();\n if (!selected) return;\n selected.map(DOM.deleteCurrent);\n}\n\n/**\n * rename current file\n *\n * @currentFile\n */\nfunction scrollIntoViewIfNeeded(element, center = false) {\n if (!element || !element.scrollIntoViewIfNeeded) return;\n element.scrollIntoViewIfNeeded(center);\n}\n\n/* scroll on one page */\nfunction scrollByPages(element, pPages) {\n const ret = (element === null || element === void 0 ? void 0 : element.scrollByPages) && pPages;\n if (ret) element.scrollByPages(pPages);\n return ret;\n}\nfunction changePanel() {\n const Info = CurrentInfo;\n let panel = DOM.getPanel();\n CloudCmd.emit('passive-dir', Info.dirPath);\n const panelPassive = DOM.getPanel({\n active: false\n });\n let name = DOM.getCurrentName();\n const filesPassive = DOM.getFiles(panelPassive);\n let dataName = panel.getAttribute('data-name');\n TabPanel[dataName] = name;\n panel = panelPassive;\n dataName = panel.getAttribute('data-name');\n name = TabPanel[dataName];\n let files;\n let current;\n if (name) {\n current = DOM.getCurrentByName(name, panel);\n if (current) files = current.parentElement;\n }\n if (!files || !files.parentElement) {\n current = DOM.getCurrentByName(name, panel);\n if (!current) [current] = filesPassive;\n }\n DOM.setCurrentFile(current, {\n history: true\n });\n CloudCmd.emit('active-dir', Info.dirPath);\n return DOM;\n}\nfunction getPackerExt(type) {\n if (type === 'zip') return '.zip';\n return '.tar.gz';\n}\nasync function goToDirectory(overrides = {}) {\n const {\n Dialog\n } = DOM;\n const {\n prompt = Dialog.prompt,\n changeDir = CloudCmd.changeDir\n } = overrides;\n const msg = 'Go to directory:';\n const {\n dirPath\n } = CurrentInfo;\n const [cancel, path = dirPath] = await prompt(msg, dirPath);\n if (cancel) return;\n await changeDir(path);\n}\nasync function duplicatePanel() {\n const Info = CurrentInfo;\n const {\n isDir\n } = Info;\n const panel = Info.panelPassive;\n const noCurrent = !Info.isOnePanel;\n const getPath = isDir => {\n if (isDir) return Info.path;\n return Info.dirPath;\n };\n const path = getPath(isDir);\n await CloudCmd.changeDir(path, {\n panel,\n noCurrent\n });\n}\nasync function swapPanels() {\n const Info = CurrentInfo;\n const {\n panel,\n files,\n element,\n panelPassive\n } = Info;\n const path = DOM.getCurrentDirPath();\n const dirPathPassive = DOM.getNotCurrentDirPath();\n let currentIndex = files.indexOf(element);\n await CloudCmd.changeDir(path, {\n panel: panelPassive,\n noCurrent: true\n });\n await CloudCmd.changeDir(dirPathPassive, {\n panel\n });\n const length = Info.files.length - 1;\n if (currentIndex > length) currentIndex = length;\n const el = Info.files[currentIndex];\n DOM.setCurrentFile(el);\n}\nfunction updateCurrentInfo(currentFile) {\n const info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const files = current.parentElement;\n const panelPassive = DOM.getPanel({\n active: false\n });\n const filesPassive = DOM.getFiles(panelPassive);\n const name = DOM.getCurrentName(current);\n info.dir = DOM.getCurrentDirName();\n info.dirPath = DOM.getCurrentDirPath();\n info.parentDirPath = DOM.getParentDirPath();\n info.element = current;\n info.ext = (0,_common_util__WEBPACK_IMPORTED_MODULE_4__.getExt)(name);\n info.files = Array.from(files.children);\n info.filesPassive = Array.from(filesPassive);\n info.first = files.firstChild;\n info.getData = DOM.getCurrentData;\n info.last = files.lastChild;\n info.link = DOM.getCurrentLink(current);\n info.mode = DOM.getCurrentMode(current);\n info.name = name;\n info.path = DOM.getCurrentPath(current);\n info.panel = files.parentElement || DOM.getPanel();\n info.panelPassive = panelPassive;\n info.size = DOM.getCurrentSize(current);\n info.isDir = DOM.isCurrentIsDir();\n info.isSelected = DOM.isSelected(current);\n info.panelPosition = DOM.getPanel().dataset.name.replace('js-', '');\n info.isOnePanel = info.panel.getAttribute('data-name') === info.panelPassive.getAttribute('data-name');\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/index.mjs\n}");
|
|
151
151
|
|
|
152
152
|
/***/ },
|
|
153
153
|
|
|
@@ -173,14 +173,14 @@ eval("{\n\n/* global CloudCmd */\nconst {\n promisify\n} = __webpack_require__(
|
|
|
173
173
|
|
|
174
174
|
/***/ },
|
|
175
175
|
|
|
176
|
-
/***/ "./client/dom/load-remote.
|
|
177
|
-
|
|
178
|
-
!*** ./client/dom/load-remote.
|
|
179
|
-
|
|
180
|
-
(
|
|
176
|
+
/***/ "./client/dom/load-remote.mjs"
|
|
177
|
+
/*!************************************!*\
|
|
178
|
+
!*** ./client/dom/load-remote.mjs ***!
|
|
179
|
+
\************************************/
|
|
180
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
181
181
|
|
|
182
182
|
"use strict";
|
|
183
|
-
eval("{\n\n/*
|
|
183
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadRemote: () => (/* binding */ loadRemote)\n/* harmony export */ });\n/* harmony import */ var node_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:util */ \"./node_modules/util/util.js\");\n/* harmony import */ var rendy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\n/* harmony import */ var itype__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n/* harmony import */ var load_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n/* harmony import */ var try_to_catch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* harmony import */ var _common_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! #common/util */ \"./common/util.mjs\");\n/* harmony import */ var _dom_files__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! #dom/files */ \"./client/dom/files.mjs\");\n/* global CloudCmd */\n\n\n\n\n\n\n\nconst loadRemote = (0,node_util__WEBPACK_IMPORTED_MODULE_0__.callbackify)(async (name, options) => {\n const {\n prefix,\n config\n } = CloudCmd;\n const o = options;\n if (o.name && window[o.name]) return;\n const modules = await _dom_files__WEBPACK_IMPORTED_MODULE_6__.get('modules');\n const online = config('online') && navigator.onLine;\n const module = (0,_common_util__WEBPACK_IMPORTED_MODULE_5__.findObjByNameInArr)(modules.remote, name);\n const isArray = itype__WEBPACK_IMPORTED_MODULE_2__.array(module.local);\n const {\n version\n } = module;\n let remoteTmpls;\n let local;\n if (isArray) {\n remoteTmpls = module.remote;\n ({\n local\n } = module);\n } else {\n remoteTmpls = [module.remote];\n local = [module.local];\n }\n const localURL = local.map(url => prefix + url);\n const remoteURL = remoteTmpls.map(tmpl => {\n return rendy__WEBPACK_IMPORTED_MODULE_1__(tmpl, {\n version\n });\n });\n if (online) {\n const [e] = await (0,try_to_catch__WEBPACK_IMPORTED_MODULE_4__.tryToCatch)(load_js__WEBPACK_IMPORTED_MODULE_3__.parallel, remoteURL);\n if (!e) return;\n }\n await load_js__WEBPACK_IMPORTED_MODULE_3__.parallel(localURL);\n});\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/load-remote.mjs\n}");
|
|
184
184
|
|
|
185
185
|
/***/ },
|
|
186
186
|
|
|
@@ -202,18 +202,18 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
202
202
|
(module, __unused_webpack_exports, __webpack_require__) {
|
|
203
203
|
|
|
204
204
|
"use strict";
|
|
205
|
-
eval("{\n\n/* global CloudCmd */\nconst capitalize = __webpack_require__(/*! just-capitalize */ \"./node_modules/just-capitalize/index.cjs\");\nconst _Dialog = __webpack_require__(/*! #dom/dialog */ \"./client/dom/dialog.mjs\");\nconst Storage = __webpack_require__(/*!
|
|
205
|
+
eval("{\n\n/* global CloudCmd */\nconst capitalize = __webpack_require__(/*! just-capitalize */ \"./node_modules/just-capitalize/index.cjs\");\nconst _Dialog = __webpack_require__(/*! #dom/dialog */ \"./client/dom/dialog.mjs\");\nconst Storage = __webpack_require__(/*! #dom/storage */ \"./client/dom/storage.mjs\");\nconst RESTful = __webpack_require__(/*! #dom/rest */ \"./client/dom/rest.mjs\");\nconst _currentFile = __webpack_require__(/*! ../current-file.mjs */ \"./client/dom/current-file.mjs\");\nmodule.exports = async (current, overrides = {}) => {\n const {\n refresh = CloudCmd.refresh,\n Dialog = _Dialog,\n currentFile = _currentFile\n } = overrides;\n const {\n isCurrentFile,\n getCurrentName,\n getCurrentFile,\n getCurrentByName,\n getCurrentType,\n getCurrentDirPath,\n setCurrentName\n } = currentFile;\n if (!isCurrentFile(current)) current = getCurrentFile();\n const from = getCurrentName(current);\n if (from === '..') return Dialog.alert.noFiles();\n const [cancel, to] = await Dialog.prompt('Rename', from);\n if (cancel) return;\n const nextFile = getCurrentByName(to);\n if (nextFile) {\n const type = getCurrentType(nextFile);\n const msg = `${capitalize(type)} \"${to}\" already exists. Proceed?`;\n const [cancel] = await Dialog.confirm(msg);\n if (cancel) return;\n }\n if (from === to) return;\n const dirPath = getCurrentDirPath();\n const fromFull = `${dirPath}${from}`;\n const toFull = `${dirPath}${to}`;\n const [e] = await RESTful.rename(fromFull, toFull);\n if (e) return;\n setCurrentName(to, current);\n Storage.remove(dirPath);\n refresh();\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/operations/rename-current.js\n}");
|
|
206
206
|
|
|
207
207
|
/***/ },
|
|
208
208
|
|
|
209
|
-
/***/ "./client/dom/rest.
|
|
210
|
-
|
|
211
|
-
!*** ./client/dom/rest.
|
|
212
|
-
|
|
213
|
-
(
|
|
209
|
+
/***/ "./client/dom/rest.mjs"
|
|
210
|
+
/*!*****************************!*\
|
|
211
|
+
!*** ./client/dom/rest.mjs ***!
|
|
212
|
+
\*****************************/
|
|
213
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
214
214
|
|
|
215
215
|
"use strict";
|
|
216
|
-
eval("{
|
|
216
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Config: () => (/* binding */ Config),\n/* harmony export */ Markdown: () => (/* binding */ Markdown),\n/* harmony export */ copy: () => (/* binding */ copy),\n/* harmony export */ createDirectory: () => (/* binding */ createDirectory),\n/* harmony export */ extract: () => (/* binding */ extract),\n/* harmony export */ move: () => (/* binding */ move),\n/* harmony export */ pack: () => (/* binding */ pack),\n/* harmony export */ patch: () => (/* binding */ patch),\n/* harmony export */ read: () => (/* binding */ read),\n/* harmony export */ remove: () => (/* binding */ remove),\n/* harmony export */ rename: () => (/* binding */ rename),\n/* harmony export */ write: () => (/* binding */ write)\n/* harmony export */ });\n/* harmony import */ var try_to_catch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* harmony import */ var _dom_dialog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! #dom/dialog */ \"./client/dom/dialog.mjs\");\n/* harmony import */ var _common_entity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/entity.js */ \"./common/entity.js\");\n/* harmony import */ var _images_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./images.mjs */ \"./client/dom/images.mjs\");\n/* harmony import */ var _io_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./io/index.js */ \"./client/dom/io/index.js\");\n\n\n\n\n\nconst handleError = promise => async (...args) => {\n const [e, data] = await (0,try_to_catch__WEBPACK_IMPORTED_MODULE_0__.tryToCatch)(promise, ...args);\n if (!e) return [e, data];\n const encoded = (0,_common_entity_js__WEBPACK_IMPORTED_MODULE_2__.encode)(e.message);\n _images_mjs__WEBPACK_IMPORTED_MODULE_3__.show.error(encoded);\n _dom_dialog__WEBPACK_IMPORTED_MODULE_1__.alert(encoded);\n return [e, data];\n};\nconst remove = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__[\"delete\"]);\nconst patch = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.patch);\nconst write = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.write);\nconst createDirectory = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.createDirectory);\nconst read = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.read);\nconst copy = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.copy);\nconst pack = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.pack);\nconst extract = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.extract);\nconst move = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.move);\nconst rename = handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.rename);\nconst Config = {\n read: handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.Config.read),\n write: handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.Config.write)\n};\nconst Markdown = {\n read: handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.Markdown.read),\n render: handleError(_io_index_js__WEBPACK_IMPORTED_MODULE_4__.Markdown.render)\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/rest.mjs\n}");
|
|
217
217
|
|
|
218
218
|
/***/ },
|
|
219
219
|
|
|
@@ -228,25 +228,25 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
228
228
|
|
|
229
229
|
/***/ },
|
|
230
230
|
|
|
231
|
-
/***/ "./client/dom/storage.
|
|
232
|
-
|
|
233
|
-
!*** ./client/dom/storage.
|
|
234
|
-
|
|
235
|
-
(
|
|
231
|
+
/***/ "./client/dom/storage.mjs"
|
|
232
|
+
/*!********************************!*\
|
|
233
|
+
!*** ./client/dom/storage.mjs ***!
|
|
234
|
+
\********************************/
|
|
235
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
236
236
|
|
|
237
237
|
"use strict";
|
|
238
|
-
eval("{\n\nconst {\n parse,\n stringify\n} = JSON;\
|
|
238
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ clear: () => (/* binding */ clear),\n/* harmony export */ get: () => (/* binding */ get),\n/* harmony export */ getJson: () => (/* binding */ getJson),\n/* harmony export */ remove: () => (/* binding */ remove),\n/* harmony export */ set: () => (/* binding */ set),\n/* harmony export */ setJson: () => (/* binding */ setJson)\n/* harmony export */ });\nconst {\n parse,\n stringify\n} = JSON;\nconst set = (name, data) => {\n localStorage.setItem(name, data);\n};\nconst setJson = (name, data) => {\n localStorage.setItem(name, stringify(data));\n};\nconst get = name => {\n return localStorage.getItem(name);\n};\nconst getJson = name => {\n const data = localStorage.getItem(name);\n return parse(data);\n};\nconst clear = () => {\n localStorage.clear();\n};\nconst remove = item => {\n localStorage.removeItem(item);\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/storage.mjs\n}");
|
|
239
239
|
|
|
240
240
|
/***/ },
|
|
241
241
|
|
|
242
|
-
/***/ "./client/dom/upload-files.
|
|
243
|
-
|
|
244
|
-
!*** ./client/dom/upload-files.
|
|
245
|
-
|
|
246
|
-
(
|
|
242
|
+
/***/ "./client/dom/upload-files.mjs"
|
|
243
|
+
/*!*************************************!*\
|
|
244
|
+
!*** ./client/dom/upload-files.mjs ***!
|
|
245
|
+
\*************************************/
|
|
246
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
247
247
|
|
|
248
248
|
"use strict";
|
|
249
|
-
eval("{
|
|
249
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ uploadFiles: () => (/* binding */ uploadFiles)\n/* harmony export */ });\n/* harmony import */ var execon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n/* harmony import */ var wraptile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* harmony import */ var _dom_load__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #dom/load */ \"./client/dom/load.mjs\");\n/* harmony import */ var _dom_dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! #dom/dialog */ \"./client/dom/dialog.mjs\");\n/* harmony import */ var _images_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./images.mjs */ \"./client/dom/images.mjs\");\n/* harmony import */ var _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/cloudfunc.mjs */ \"./common/cloudfunc.mjs\");\n/* harmony import */ var _current_file_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./current-file.mjs */ \"./client/dom/current-file.mjs\");\n/* global CloudCmd */\n\n\n\n\n\n\n\nconst loadFile = wraptile__WEBPACK_IMPORTED_MODULE_1__(_loadFile);\nconst onEnd = wraptile__WEBPACK_IMPORTED_MODULE_1__(_onEnd);\nconst uploadFiles = (dir, files) => {\n if (!files) {\n files = dir;\n dir = (0,_current_file_mjs__WEBPACK_IMPORTED_MODULE_6__.getCurrentDirPath)();\n }\n const n = files.length;\n if (!n) return;\n const array = Array.from(files);\n const {\n name\n } = files[0];\n (0,execon__WEBPACK_IMPORTED_MODULE_0__.eachSeries)(array, loadFile(dir, n), onEnd(name));\n};\nfunction _onEnd(currentName) {\n CloudCmd.refresh({\n currentName\n });\n}\nfunction _loadFile(dir, n, file, callback) {\n let i = 0;\n const {\n name\n } = file;\n const path = dir + name;\n const {\n prefixURL\n } = CloudCmd;\n const api = prefixURL + _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_5__.FS;\n const percent = (i, n, per = 100) => {\n return Math.round(i * per / n);\n };\n const step = n => 100 / n;\n ++i;\n _dom_load__WEBPACK_IMPORTED_MODULE_2__.put(api + path, file).on('error', showError).on('end', callback).on('progress', count => {\n const max = step(n);\n const value = (i - 1) * max + percent(count, 100, max);\n _images_mjs__WEBPACK_IMPORTED_MODULE_4__.show.load('top');\n _images_mjs__WEBPACK_IMPORTED_MODULE_4__.setProgress(Math.round(value));\n });\n}\nfunction showError({\n message\n}) {\n (0,_dom_dialog__WEBPACK_IMPORTED_MODULE_3__.alert)(message);\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/dom/upload-files.mjs\n}");
|
|
250
250
|
|
|
251
251
|
/***/ },
|
|
252
252
|
|
|
@@ -279,7 +279,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
279
279
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
280
280
|
|
|
281
281
|
"use strict";
|
|
282
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Key: () => (/* binding */ Key),\n/* harmony export */ _listener: () => (/* binding */ _listener)\n/* harmony export */ });\n/* harmony import */ var _cloudcmd_clipboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @cloudcmd/clipboard */ \"./node_modules/@cloudcmd/clipboard/lib/clipboard.js\");\n/* harmony import */ var fullstore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n/* harmony import */ var _dom_events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #dom/events */ \"./client/dom/events/index.mjs\");\n/* harmony import */ var _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dom/buffer.mjs */ \"./client/dom/buffer.mjs\");\n/* harmony import */ var _key_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./key.mjs */ \"./client/key/key.mjs\");\n/* harmony import */ var _vim_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./vim/index.mjs */ \"./client/key/vim/index.mjs\");\n/* harmony import */ var _set_current_by_char_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./set-current-by-char.mjs */ \"./client/key/set-current-by-char.mjs\");\n/* harmony import */ var _binder_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./binder.mjs */ \"./client/key/binder.mjs\");\n/* global CloudCmd, DOM */\n\n\n\n\n\n\n\n\nconst Chars = (0,fullstore__WEBPACK_IMPORTED_MODULE_1__.fullstore)();\nconst toggleVim = (keyCode, overrides = {}) => {\n const {\n _config,\n config\n } = overrides;\n if (keyCode === _key_mjs__WEBPACK_IMPORTED_MODULE_4__.ESC) _config('vim', !config('vim'));\n};\nconst isUndefined = a => typeof a === 'undefined';\nChars([]);\nconst {\n assign\n} = Object;\nconst binder = (0,_binder_mjs__WEBPACK_IMPORTED_MODULE_7__.createBinder)();\nconst bind = () => {\n _dom_events__WEBPACK_IMPORTED_MODULE_2__.addKey(listener, true);\n binder.setBind();\n};\nconst Key = assign(binder, _key_mjs__WEBPACK_IMPORTED_MODULE_4__, {\n bind\n});\nconst _listener = listener;\nfunction getChar(event) {\n /*\n * event.keyIdentifier deprecated in chrome v51\n * but event.key is absent in chrome <= v51\n */\n const {\n key,\n shift,\n keyCode,\n keyIdentifier\n } = event;\n const char = key || fromCharCode(keyIdentifier);\n const symbol = getSymbol(shift, keyCode);\n return [symbol, char];\n}\nasync function listener(event, overrides = {}) {\n const {\n config = CloudCmd.config,\n _config = CloudCmd._config,\n switchKey = _switchKey,\n vim = _vim_index_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n } = overrides;\n const {\n keyCode\n } = event;\n\n // strange chrome bug calles listener twice\n // in second time event misses a lot fields\n if (isUndefined(event.altKey)) return;\n const alt = event.altKey;\n const ctrl = event.ctrlKey;\n const meta = event.metaKey;\n const isBetween = keyCode >= _key_mjs__WEBPACK_IMPORTED_MODULE_4__.ZERO && keyCode <= _key_mjs__WEBPACK_IMPORTED_MODULE_4__.Z;\n const isNumpad = /Numpad/.test(event.code);\n const [symbol, char] = getChar(event);\n if (!binder.isBind()) return;\n toggleVim(keyCode, {\n config,\n _config\n });\n const isVim = config('vim');\n if (!isVim && !isNumpad && !alt && !ctrl && !meta && (isBetween || symbol)) return (0,_set_current_by_char_mjs__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(char, Chars);\n Chars([]);\n await switchKey(event);\n if (keyCode >= _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F1 && keyCode <= _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F10) return;\n if (isVim) vim(char, event);\n}\nfunction getSymbol(shift, keyCode) {\n switch (keyCode) {\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.DOT:\n return '.';\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.HYPHEN:\n return shift ? '_' : '-';\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.EQUAL:\n return shift ? '+' : '=';\n }\n return '';\n}\nfunction fromCharCode(keyIdentifier) {\n const code = keyIdentifier.substring(2);\n const hex = parseInt(code, 16);\n return String.fromCharCode(hex);\n}\nasync function _switchKey(event) {\n const Info = DOM.CurrentInfo;\n let i;\n let isSelected;\n let prev;\n let next;\n let current = Info.element;\n let dataName;\n const {\n name,\n panel,\n path,\n isDir\n } = Info;\n const {\n Operation,\n changeDir,\n config\n } = CloudCmd;\n const {\n keyCode\n } = event;\n const alt = event.altKey;\n const shift = event.shiftKey;\n const ctrl = event.ctrlKey;\n const meta = event.metaKey;\n const ctrlMeta = ctrl || meta;\n if (current) {\n prev = current.previousSibling;\n next = current.nextSibling;\n }\n switch (keyCode) {\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.TAB:\n DOM.changePanel();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.INSERT:\n DOM.toggleSelectedFile(current).setCurrentFile(next);\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.INSERT_MAC:\n DOM.toggleSelectedFile(current).setCurrentFile(next);\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.DELETE:\n if (shift) Operation.show('delete:silent');else Operation.show('delete');\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.ASTERISK:\n DOM.toggleAllSelectedFiles(current);\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.PLUS:\n DOM.expandSelection();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.MINUS:\n DOM.shrinkSelection();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F1:\n CloudCmd.Help.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F2:\n CloudCmd.UserMenu.show();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F3:\n event.preventDefault();\n if (Info.isDir) await changeDir(path);else if (shift) CloudCmd.View.show(null, {\n raw: true\n });else if (ctrlMeta) CloudCmd.sortPanel('name');else CloudCmd.View.show();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F4:\n if (config('vim')) CloudCmd.EditFileVim.show();else CloudCmd.EditFile.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F5:\n if (ctrlMeta) CloudCmd.sortPanel('date');else if (alt) Operation.show('pack');else Operation.show('copy');\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F6:\n if (ctrlMeta) CloudCmd.sortPanel('size');else if (shift) DOM.renameCurrent(current);else Operation.show('move');\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F7:\n if (shift) DOM.promptNewFile();else DOM.promptNewDir();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F8:\n Operation.show('delete');\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F9:\n if (alt) Operation.show('extract');else CloudCmd.Menu.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F10:\n CloudCmd.Config.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.TRA:\n event.preventDefault();\n if (shift) return CloudCmd.Terminal.show();\n CloudCmd.Konsole.show();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.BRACKET_CLOSE:\n CloudCmd.Konsole.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.SPACE:\n event.preventDefault();\n if (!isDir || name === '..') isSelected = true;else isSelected = DOM.isSelected(current);\n if (!isSelected) await DOM.loadCurrentSize(current);\n DOM.toggleSelectedFile(current);\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.U:\n if (ctrlMeta) {\n DOM.swapPanels();\n event.preventDefault();\n }\n break;\n\n /* navigation on file table: *\n * in case of pressing button 'up', *\n * select previous row */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.UP:\n if (shift) DOM.toggleSelectedFile(current);\n DOM.setCurrentFile(prev);\n event.preventDefault();\n break;\n\n /* in case of pressing button 'down', *\n * select next row */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.DOWN:\n if (shift) DOM.toggleSelectedFile(current);\n DOM.setCurrentFile(next);\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.LEFT:\n if (!alt) return;\n event.preventDefault();\n dataName = Info.panel.getAttribute('data-name');\n if (dataName === 'js-right') DOM.duplicatePanel();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.RIGHT:\n if (!alt) return;\n event.preventDefault();\n dataName = Info.panel.getAttribute('data-name');\n if (dataName === 'js-left') DOM.duplicatePanel();\n break;\n\n /* in case of pressing button 'Home', *\n * go to top element */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.HOME:\n DOM.setCurrentFile(Info.first);\n event.preventDefault();\n break;\n\n /* in case of pressing button 'End', select last element */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.END:\n DOM.setCurrentFile(Info.last);\n event.preventDefault();\n break;\n\n /* если нажали клавишу page down проматываем экран */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.PAGE_DOWN:\n DOM.scrollByPages(panel, 1);\n for (i = 0; i < 30; i++) {\n if (!current.nextSibling) break;\n current = current.nextSibling;\n }\n DOM.setCurrentFile(current);\n event.preventDefault();\n break;\n\n /* если нажали клавишу page up проматываем экран */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.PAGE_UP:\n DOM.scrollByPages(panel, -1);\n for (i = 0; i < 30; i++) {\n if (!current.previousSibling) break;\n current = current.previousSibling;\n }\n DOM.setCurrentFile(current);\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.ENTER:\n if (Info.isDir) await changeDir(path);else CloudCmd.View.show();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.BACKSPACE:\n CloudCmd.goToParentDir();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.BACKSLASH:\n if (ctrlMeta) await changeDir('/');\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.A:\n if (ctrlMeta) {\n DOM.selectAllFiles();\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.G:\n if (alt) {\n DOM.goToDirectory();\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.M:\n if (ctrlMeta) {\n if (config('vim')) CloudCmd.EditNamesVim.show();else CloudCmd.EditNames.show();\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.P:\n if (!ctrlMeta) return;\n event.preventDefault();\n _cloudcmd_clipboard__WEBPACK_IMPORTED_MODULE_0__.writeText(Info.dirPath).catch(CloudCmd.log);\n break;\n\n /**\n * обновляем страницу,\n * загружаем содержимое каталога\n * при этом данные берём всегда с\n * сервера, а не из кэша\n * (обновляем кэш)\n */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.R:\n if (ctrlMeta) {\n CloudCmd.log('reloading page...\\n');\n CloudCmd.refresh();\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.C:\n if (ctrlMeta) _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.copy();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.X:\n if (ctrlMeta) _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.cut();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.V:\n if (ctrlMeta) _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.paste();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.Z:\n if (ctrlMeta) _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.clear();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.COLON:\n CloudCmd.CommandLine.show();\n event.preventDefault();\n break;\n\n /* чистим хранилище */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.D:\n if (ctrlMeta) {\n CloudCmd.log('clearing storage...');\n await DOM.Storage.clear();\n CloudCmd.log('storage cleared');\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.DOT:\n if (meta && shift) {\n const showDotFiles = !CloudCmd.config('showDotFiles');\n CloudCmd._config('showDotFiles', showDotFiles);\n CloudCmd.refresh();\n await DOM.RESTful.Config.write({\n showDotFiles\n });\n }\n break;\n }\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/key/index.mjs\n}");
|
|
282
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Key: () => (/* binding */ Key),\n/* harmony export */ _listener: () => (/* binding */ _listener)\n/* harmony export */ });\n/* harmony import */ var _cloudcmd_clipboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @cloudcmd/clipboard */ \"./node_modules/@cloudcmd/clipboard/lib/clipboard.js\");\n/* harmony import */ var fullstore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n/* harmony import */ var _dom_events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #dom/events */ \"./client/dom/events/index.mjs\");\n/* harmony import */ var _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dom/buffer.mjs */ \"./client/dom/buffer.mjs\");\n/* harmony import */ var _key_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./key.mjs */ \"./client/key/key.mjs\");\n/* harmony import */ var _vim_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./vim/index.mjs */ \"./client/key/vim/index.mjs\");\n/* harmony import */ var _set_current_by_char_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./set-current-by-char.mjs */ \"./client/key/set-current-by-char.mjs\");\n/* harmony import */ var _binder_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./binder.mjs */ \"./client/key/binder.mjs\");\n/* global CloudCmd, DOM */\n\n\n\n\n\n\n\n\nconst Chars = (0,fullstore__WEBPACK_IMPORTED_MODULE_1__.fullstore)();\nconst toggleVim = (keyCode, overrides = {}) => {\n const {\n _config,\n config\n } = overrides;\n if (keyCode === _key_mjs__WEBPACK_IMPORTED_MODULE_4__.ESC) _config('vim', !config('vim'));\n};\nconst isUndefined = a => typeof a === 'undefined';\nChars([]);\nconst {\n assign\n} = Object;\nconst binder = (0,_binder_mjs__WEBPACK_IMPORTED_MODULE_7__.createBinder)();\nconst bind = () => {\n _dom_events__WEBPACK_IMPORTED_MODULE_2__.addKey(listener, true);\n binder.setBind();\n};\nconst Key = assign(binder, _key_mjs__WEBPACK_IMPORTED_MODULE_4__, {\n bind\n});\nconst _listener = listener;\nfunction getChar(event) {\n /*\n * event.keyIdentifier deprecated in chrome v51\n * but event.key is absent in chrome <= v51\n */\n const {\n key,\n shift,\n keyCode,\n keyIdentifier\n } = event;\n const char = key || fromCharCode(keyIdentifier);\n const symbol = getSymbol(shift, keyCode);\n return [symbol, char];\n}\nasync function listener(event, overrides = {}) {\n const {\n config = CloudCmd.config,\n _config = CloudCmd._config,\n switchKey = _switchKey,\n vim = _vim_index_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n } = overrides;\n const {\n keyCode\n } = event;\n\n // strange chrome bug calls listener twice\n // in second time event misses a lot fields\n if (isUndefined(event.altKey)) return;\n const alt = event.altKey;\n const ctrl = event.ctrlKey;\n const meta = event.metaKey;\n const isBetween = keyCode >= _key_mjs__WEBPACK_IMPORTED_MODULE_4__.ZERO && keyCode <= _key_mjs__WEBPACK_IMPORTED_MODULE_4__.Z;\n const isNumpad = /Numpad/.test(event.code);\n const [symbol, char] = getChar(event);\n if (!binder.isBind()) return;\n toggleVim(keyCode, {\n config,\n _config\n });\n const isVim = config('vim');\n if (!isVim && !isNumpad && !alt && !ctrl && !meta && (isBetween || symbol)) return (0,_set_current_by_char_mjs__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(char, Chars);\n Chars([]);\n await switchKey(event);\n if (keyCode >= _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F1 && keyCode <= _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F10) return;\n if (isVim) vim(char, event);\n}\nfunction getSymbol(shift, keyCode) {\n switch (keyCode) {\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.DOT:\n return '.';\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.HYPHEN:\n return shift ? '_' : '-';\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.EQUAL:\n return shift ? '+' : '=';\n }\n return '';\n}\nfunction fromCharCode(keyIdentifier) {\n const code = keyIdentifier.substring(2);\n const hex = parseInt(code, 16);\n return String.fromCharCode(hex);\n}\nasync function _switchKey(event) {\n const Info = DOM.CurrentInfo;\n let i;\n let isSelected;\n let prev;\n let next;\n let current = Info.element;\n let dataName;\n const {\n name,\n panel,\n path,\n isDir\n } = Info;\n const {\n Operation,\n changeDir,\n config\n } = CloudCmd;\n const {\n keyCode\n } = event;\n const alt = event.altKey;\n const shift = event.shiftKey;\n const ctrl = event.ctrlKey;\n const meta = event.metaKey;\n const ctrlMeta = ctrl || meta;\n if (current) {\n prev = current.previousSibling;\n next = current.nextSibling;\n }\n switch (keyCode) {\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.TAB:\n DOM.changePanel();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.INSERT:\n DOM.toggleSelectedFile(current).setCurrentFile(next);\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.INSERT_MAC:\n DOM.toggleSelectedFile(current).setCurrentFile(next);\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.DELETE:\n if (shift) Operation.show('delete:silent');else Operation.show('delete');\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.ASTERISK:\n DOM.toggleAllSelectedFiles(current);\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.PLUS:\n DOM.expandSelection();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.MINUS:\n DOM.shrinkSelection();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F1:\n CloudCmd.Help.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F2:\n CloudCmd.UserMenu.show();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F3:\n event.preventDefault();\n if (Info.isDir) await changeDir(path);else if (shift) CloudCmd.View.show(null, {\n raw: true\n });else if (ctrlMeta) CloudCmd.sortPanel('name');else CloudCmd.View.show();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F4:\n if (config('vim')) CloudCmd.EditFileVim.show();else CloudCmd.EditFile.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F5:\n if (ctrlMeta) CloudCmd.sortPanel('date');else if (alt) Operation.show('pack');else Operation.show('copy');\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F6:\n if (ctrlMeta) CloudCmd.sortPanel('size');else if (shift) DOM.renameCurrent(current);else Operation.show('move');\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F7:\n if (shift) DOM.promptNewFile();else DOM.promptNewDir();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F8:\n Operation.show('delete');\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F9:\n if (alt) Operation.show('extract');else CloudCmd.Menu.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.F10:\n CloudCmd.Config.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.TRA:\n event.preventDefault();\n if (shift) return CloudCmd.Terminal.show();\n CloudCmd.Konsole.show();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.BRACKET_CLOSE:\n CloudCmd.Konsole.show();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.SPACE:\n event.preventDefault();\n if (!isDir || name === '..') isSelected = true;else isSelected = DOM.isSelected(current);\n if (!isSelected) await DOM.loadCurrentSize(current);\n DOM.toggleSelectedFile(current);\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.U:\n if (ctrlMeta) {\n DOM.swapPanels();\n event.preventDefault();\n }\n break;\n\n /* navigation on file table: *\n * in case of pressing button 'up', *\n * select previous row */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.UP:\n if (shift) DOM.toggleSelectedFile(current);\n DOM.setCurrentFile(prev);\n event.preventDefault();\n break;\n\n /* in case of pressing button 'down', *\n * select next row */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.DOWN:\n if (shift) DOM.toggleSelectedFile(current);\n DOM.setCurrentFile(next);\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.LEFT:\n if (!alt) return;\n event.preventDefault();\n dataName = Info.panel.getAttribute('data-name');\n if (dataName === 'js-right') DOM.duplicatePanel();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.RIGHT:\n if (!alt) return;\n event.preventDefault();\n dataName = Info.panel.getAttribute('data-name');\n if (dataName === 'js-left') DOM.duplicatePanel();\n break;\n\n /* in case of pressing button 'Home', *\n * go to top element */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.HOME:\n DOM.setCurrentFile(Info.first);\n event.preventDefault();\n break;\n\n /* in case of pressing button 'End', select last element */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.END:\n DOM.setCurrentFile(Info.last);\n event.preventDefault();\n break;\n\n /* если нажали клавишу page down проматываем экран */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.PAGE_DOWN:\n DOM.scrollByPages(panel, 1);\n for (i = 0; i < 30; i++) {\n if (!current.nextSibling) break;\n current = current.nextSibling;\n }\n DOM.setCurrentFile(current);\n event.preventDefault();\n break;\n\n /* если нажали клавишу page up проматываем экран */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.PAGE_UP:\n DOM.scrollByPages(panel, -1);\n for (i = 0; i < 30; i++) {\n if (!current.previousSibling) break;\n current = current.previousSibling;\n }\n DOM.setCurrentFile(current);\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.ENTER:\n if (Info.isDir) await changeDir(path);else CloudCmd.View.show();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.BACKSPACE:\n CloudCmd.goToParentDir();\n event.preventDefault();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.BACKSLASH:\n if (ctrlMeta) await changeDir('/');\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.A:\n if (ctrlMeta) {\n DOM.selectAllFiles();\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.G:\n if (alt) {\n DOM.goToDirectory();\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.M:\n if (ctrlMeta) {\n if (config('vim')) CloudCmd.EditNamesVim.show();else CloudCmd.EditNames.show();\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.P:\n if (!ctrlMeta) return;\n event.preventDefault();\n _cloudcmd_clipboard__WEBPACK_IMPORTED_MODULE_0__.writeText(Info.dirPath).catch(CloudCmd.log);\n break;\n\n /**\n * обновляем страницу,\n * загружаем содержимое каталога\n * при этом данные берём всегда с\n * сервера, а не из кэша\n * (обновляем кэш)\n */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.R:\n if (ctrlMeta) {\n CloudCmd.log('reloading page...\\n');\n CloudCmd.refresh();\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.C:\n if (ctrlMeta) _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.copy();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.X:\n if (ctrlMeta) _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.cut();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.V:\n if (ctrlMeta) _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.paste();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.Z:\n if (ctrlMeta) _dom_buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.clear();\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.COLON:\n CloudCmd.CommandLine.show();\n event.preventDefault();\n break;\n\n /* чистим хранилище */\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.D:\n if (ctrlMeta) {\n CloudCmd.log('clearing storage...');\n await DOM.Storage.clear();\n CloudCmd.log('storage cleared');\n event.preventDefault();\n }\n break;\n case _key_mjs__WEBPACK_IMPORTED_MODULE_4__.DOT:\n if (meta && shift) {\n const showDotFiles = !CloudCmd.config('showDotFiles');\n CloudCmd._config('showDotFiles', showDotFiles);\n CloudCmd.refresh();\n await DOM.RESTful.Config.write({\n showDotFiles\n });\n }\n break;\n }\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/key/index.mjs\n}");
|
|
283
283
|
|
|
284
284
|
/***/ },
|
|
285
285
|
|
|
@@ -378,7 +378,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
378
378
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
379
379
|
|
|
380
380
|
"use strict";
|
|
381
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ initKeysPanel: () => (/* binding */ initKeysPanel),\n/* harmony export */ setOnPanel: () => (/* binding */ setOnPanel)\n/* harmony export */ });\n/* harmony import */ var execon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n/* harmony import */ var itype__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n/* harmony import */ var currify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* harmony import */ var try_to_catch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* harmony import */ var _cloudcmd_clipboard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @cloudcmd/clipboard */ \"./node_modules/@cloudcmd/clipboard/lib/clipboard.js\");\n/* harmony import */ var _dom_events__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! #dom/events */ \"./client/dom/events/index.mjs\");\n/* harmony import */ var _get_range_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./get-range.mjs */ \"./client/listeners/get-range.mjs\");\n/* harmony import */ var _dom_upload_files_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../dom/upload-files.js */ \"./client/dom/upload-files.js\");\n/* harmony import */ var _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/cloudfunc.mjs */ \"./common/cloudfunc.mjs\");\n/* harmony import */ var _get_index_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./get-index.mjs */ \"./client/listeners/get-index.mjs\");\n/* global DOM, CloudCmd */\n\n\n\n\n\n\n\n\n\n\nconst NBSP_REG = RegExp(String.fromCharCode(160), 'g');\nconst SPACE = ' ';\nconst init = async () => {\n contextMenu();\n dragndrop();\n unload();\n pop();\n resize();\n header();\n await config();\n};\nconst unselect = event => {\n const isMac = /Mac/.test(globalThis.navigator.platform);\n const {\n shiftKey,\n metaKey,\n ctrlKey\n } = event;\n if (shiftKey || isMac && metaKey || ctrlKey) return;\n DOM.unselectFiles();\n};\nconst execAll = currify__WEBPACK_IMPORTED_MODULE_2__((funcs, event) => {\n for (const fn of funcs) fn(event);\n});\nconst EventsFiles = {\n mousedown: execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotUL, setCurrentFileByEvent),\n click: execAll([onClick, execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotMobile, unselect)]),\n dragstart: execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotUL, onDragStart),\n dblclick: execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotUL, onDblClick),\n touchstart: execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotUL, onTouch)\n};\nlet EXT;\nfunction header() {\n const fm = DOM.getFM();\n const isDataset = el => el.dataset;\n const isPanel = el => {\n return /^js-(left|right)$/.test(el.dataset.name);\n };\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addClick(fm, event => {\n const el = event.target;\n const parent = el.parentElement;\n if (parent.dataset.name !== 'js-fm-header') return;\n const name = (el.dataset.name || '').replace('js-', '');\n if (!/^(name|size|date)$/.test(name)) return;\n const panel = getPath(el).filter(isDataset).filter(isPanel).pop();\n CloudCmd.sortPanel(name, panel);\n });\n}\nfunction getPath(el, path = []) {\n if (!el) return path;\n return getPath(el.parentElement, path.concat(el));\n}\nasync function config() {\n const [, config] = await (0,try_to_catch__WEBPACK_IMPORTED_MODULE_3__.tryToCatch)(DOM.Files.get, 'config');\n const type = config === null || config === void 0 ? void 0 : config.packer;\n EXT = DOM.getPackerExt(type);\n}\nconst initKeysPanel = () => {\n const keysElement = DOM.getById('js-keyspanel');\n if (!keysElement) return;\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addClick(keysElement, event => {\n const {\n target\n } = event;\n const {\n id\n } = target;\n const operation = name => {\n const {\n Operation\n } = CloudCmd;\n return Operation.show.bind(null, name);\n };\n const clickFuncs = {\n 'f1': CloudCmd.Help.show,\n 'f2': CloudCmd.UserMenu.show,\n 'f3': CloudCmd.View.show,\n 'f4': CloudCmd.EditFile.show,\n 'f5': operation('copy'),\n 'f6': operation('move'),\n 'f7': DOM.promptNewDir,\n 'f8': operation('delete'),\n 'f9': () => {\n event.stopPropagation();\n CloudCmd.Menu.show();\n },\n 'f10': CloudCmd.Config.show,\n '~': CloudCmd.Konsole.show,\n 'shift~': CloudCmd.Terminal.show,\n 'contact': CloudCmd.Contact.show\n };\n execon__WEBPACK_IMPORTED_MODULE_0__(clickFuncs[id]);\n });\n};\nconst getPanel = side => {\n if (!itype__WEBPACK_IMPORTED_MODULE_1__.string(side)) return side;\n return DOM.getByDataName(`js-${side}`);\n};\nconst setOnPanel = side => {\n const panel = getPanel(side);\n const filesElement = DOM.getByDataName('js-files', panel);\n const pathElement = DOM.getByDataName('js-path', panel);\n\n /* ставим загрузку гифа на клик*/\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addClick(pathElement, getPathListener(panel));\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.add(filesElement, EventsFiles);\n};\nfunction getPathListener(panel) {\n return onPathElementClick.bind(null, panel);\n}\nfunction isNoCurrent(panel) {\n const Info = DOM.CurrentInfo;\n const infoPanel = Info.panel;\n if (!infoPanel) return true;\n const namePanel = panel.getAttribute('data-name');\n const nameInfoPanel = infoPanel.getAttribute('data-name');\n return namePanel !== nameInfoPanel;\n}\nfunction decodePath(path) {\n const url = CloudCmd.HOST;\n const {\n prefix\n } = CloudCmd;\n const prefixReg = RegExp('^' + prefix + _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_8__.FS);\n return decodeURI(path).replace(url, '').replace(prefixReg, '') // browser doesn't replace % -> %25% do it for him\n .replace('%%', '%25%').replace(NBSP_REG, SPACE) || '/';\n}\nasync function onPathElementClick(panel, event) {\n const Info = DOM.CurrentInfo;\n event.preventDefault();\n const element = event.target;\n const attr = element.getAttribute('data-name');\n const noCurrent = isNoCurrent(panel);\n if (attr === 'js-copy-path') return copyPath(element);\n if (attr === 'js-refresh') return CloudCmd.refresh({\n panel,\n noCurrent\n });\n if (attr !== 'js-path-link') return;\n const {\n href\n } = element;\n const path = decodePath(href);\n await CloudCmd.changeDir(path, {\n isRefresh: false,\n panel: noCurrent ? panel : Info.panel\n });\n}\nfunction copyPath(el) {\n _cloudcmd_clipboard__WEBPACK_IMPORTED_MODULE_4__.writeText(el.parentElement.title).then(CloudCmd.log).catch(CloudCmd.log);\n}\nfunction execIfNotMobile(callback, event) {\n const isMobile = DOM.getCSSVar('is-mobile');\n if (!isMobile) callback(event);\n}\nfunction execIfNotUL(callback, event) {\n const {\n target\n } = event;\n const {\n tagName\n } = target;\n if (tagName !== 'UL') callback(event);\n}\nfunction onClick(event) {\n event.preventDefault();\n changePanel(event.target);\n}\nfunction toggleSelect(key, files) {\n const isMac = /Mac/.test(globalThis.navigator.platform);\n if (!key) throw Error('key should not be undefined!');\n const [file] = files;\n if (isMac && key.meta) return DOM.toggleSelectedFile(file);\n if (key.shift) return files.map(DOM.selectFile);\n}\nfunction changePanel(element) {\n const Info = DOM.CurrentInfo;\n const {\n panel\n } = Info;\n const files = DOM.getByDataName('js-files', panel);\n const ul = getULElement(element);\n if (ul !== files) DOM.changePanel();\n}\nasync function onDblClick(event) {\n event.preventDefault();\n const current = getLIElement(event.target);\n const isDir = DOM.isCurrentIsDir(current);\n const path = DOM.getCurrentPath(current);\n if (!isDir) return CloudCmd.View.show();\n await CloudCmd.changeDir(path);\n}\nasync function onTouch(event) {\n const current = getLIElement(event.target);\n const isDir = DOM.isCurrentIsDir(current);\n if (!isDir) return;\n const isCurrent = DOM.isCurrentFile(current);\n if (!isCurrent) return;\n await CloudCmd.changeDir(DOM.getCurrentPath(current));\n}\n\n/*\n * download file from browser to desktop\n * in Chrome (HTML5)\n */\nfunction onDragStart(event) {\n const Info = DOM.CurrentInfo;\n const {\n prefixURL\n } = CloudCmd;\n const element = getLIElement(event.target);\n const {\n isDir\n } = Info;\n let link = DOM.getCurrentLink(element);\n let name = DOM.getCurrentName(element);\n\n /* if it's directory - adding json extension */\n if (isDir) {\n name += EXT;\n link = document.createElement('a');\n link.textContent = name;\n link.href = prefixURL + '/pack' + Info.path + EXT;\n }\n event.dataTransfer.setData('DownloadURL', 'application/octet-stream' + ':' + name + ':' + link);\n}\nfunction getLIElement(element) {\n if (!element) return element;\n while (element.tagName !== 'LI') element = element.parentElement;\n return element;\n}\nfunction getULElement(element) {\n while (element.tagName !== 'UL') element = element.parentElement;\n return element;\n}\nfunction setCurrentFileByEvent(event) {\n const Info = DOM.CurrentInfo;\n const BUTTON_LEFT = 0;\n const key = {\n alt: event.altKey,\n ctrl: event.ctrlKey,\n meta: event.metaKey,\n shift: event.shiftKey\n };\n const element = getLIElement(event.target);\n const fromName = Info.name;\n DOM.setCurrentFile(element);\n const toName = Info.name;\n let files = [];\n if (key.shift) files = getFilesRange(fromName, toName);else files.push(Info.element);\n if (event.button === BUTTON_LEFT) toggleSelect(key, files);\n}\nfunction getFilesRange(from, to) {\n const files = DOM.getAllFiles();\n const names = DOM.getFilenames(files);\n const getNameIndex = (0,_get_index_mjs__WEBPACK_IMPORTED_MODULE_9__.getIndex)(names);\n const indexFrom = getNameIndex(from);\n const indexTo = getNameIndex(to);\n return (0,_get_range_mjs__WEBPACK_IMPORTED_MODULE_6__.getRange)(indexFrom, indexTo, files);\n}\nfunction contextMenu() {\n const fm = DOM.getFM();\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addOnce('contextmenu', fm, event => {\n CloudCmd.Menu.show({\n x: event.clientX,\n y: event.clientY\n });\n });\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addContextMenu(fm, event => {\n CloudCmd.Menu.ENABLED || event.preventDefault();\n });\n}\nfunction dragndrop() {\n const panels = DOM.getByClassAll('panel');\n const select = ({\n target\n }) => {\n target.classList.add('selected-panel');\n };\n const unselect = ({\n target\n }) => {\n target.classList.remove('selected-panel');\n };\n const onDrop = event => {\n const {\n files,\n items\n } = event.dataTransfer;\n const {\n length: filesCount\n } = files;\n event.preventDefault();\n if (filesCount && (!items || !items.length || !items[0].webkitGetAsEntry)) return _dom_upload_files_js__WEBPACK_IMPORTED_MODULE_7__(files);\n const isFile = item => item.kind === 'file';\n const dirFiles = Array.from(items).filter(isFile);\n if (dirFiles.length) return DOM.uploadDirectory(dirFiles);\n const {\n Operation\n } = CloudCmd;\n const operation = event.shiftKey ? 'move' : 'copy';\n return Operation.show(operation);\n };\n\n /**\n * In macOS Chrome dropEffect = 'none'\n * so drop do not firing up when try\n * to upload file from download bar\n */\n const onDragOver = event => {\n const {\n dataTransfer\n } = event;\n const {\n effectAllowed\n } = dataTransfer;\n if (/move|linkMove/.test(effectAllowed)) dataTransfer.dropEffect = 'move';else dataTransfer.dropEffect = 'copy';\n event.preventDefault();\n };\n for (const panel of panels) _dom_events__WEBPACK_IMPORTED_MODULE_5__.add('dragover', panel, onDragOver).add('drop', panel, onDrop).add('dragenter', select).add(['dragleave', 'drop'], unselect);\n}\nfunction unload() {\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.add(['unload', 'beforeunload'], event => {\n const {\n Key\n } = CloudCmd;\n const isBind = Key === null || Key === void 0 ? void 0 : Key.isBind();\n if (isBind) return;\n event.preventDefault();\n return 'Please make sure that you saved all work.';\n });\n}\nfunction pop() {\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.add('popstate', async ({\n state\n }) => {\n const path = (state || '').replace(_common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_8__.FS, '');\n if (!path) return CloudCmd.route(location.hash);\n const history = false;\n await CloudCmd.changeDir(path, {\n history\n });\n });\n}\nfunction resize() {\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.add('resize', () => {\n const Info = DOM.CurrentInfo;\n const is = globalThis.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH;\n if (!is) return;\n const {\n panel\n } = Info;\n const isEmptyRoot = !panel;\n if (isEmptyRoot) return;\n const name = panel.getAttribute('data-name');\n const isLeft = name === 'js-left';\n if (isLeft) return;\n DOM.changePanel();\n });\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/listeners/index.mjs\n}");
|
|
381
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ initKeysPanel: () => (/* binding */ initKeysPanel),\n/* harmony export */ setOnPanel: () => (/* binding */ setOnPanel)\n/* harmony export */ });\n/* harmony import */ var execon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n/* harmony import */ var itype__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n/* harmony import */ var currify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* harmony import */ var try_to_catch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* harmony import */ var _cloudcmd_clipboard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @cloudcmd/clipboard */ \"./node_modules/@cloudcmd/clipboard/lib/clipboard.js\");\n/* harmony import */ var _dom_events__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! #dom/events */ \"./client/dom/events/index.mjs\");\n/* harmony import */ var _dom_upload_files__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! #dom/upload-files */ \"./client/dom/upload-files.mjs\");\n/* harmony import */ var _get_range_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./get-range.mjs */ \"./client/listeners/get-range.mjs\");\n/* harmony import */ var _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/cloudfunc.mjs */ \"./common/cloudfunc.mjs\");\n/* harmony import */ var _get_index_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./get-index.mjs */ \"./client/listeners/get-index.mjs\");\n/* global DOM, CloudCmd */\n\n\n\n\n\n\n\n\n\n\nconst NBSP_REG = RegExp(String.fromCharCode(160), 'g');\nconst SPACE = ' ';\nconst init = async () => {\n contextMenu();\n dragndrop();\n unload();\n pop();\n resize();\n header();\n await config();\n};\nconst unselect = event => {\n const isMac = /Mac/.test(globalThis.navigator.platform);\n const {\n shiftKey,\n metaKey,\n ctrlKey\n } = event;\n if (shiftKey || isMac && metaKey || ctrlKey) return;\n DOM.unselectFiles();\n};\nconst execAll = currify__WEBPACK_IMPORTED_MODULE_2__((funcs, event) => {\n for (const fn of funcs) fn(event);\n});\nconst EventsFiles = {\n mousedown: execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotUL, setCurrentFileByEvent),\n click: execAll([onClick, execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotMobile, unselect)]),\n dragstart: execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotUL, onDragStart),\n dblclick: execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotUL, onDblClick),\n touchstart: execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](execIfNotUL, onTouch)\n};\nlet EXT;\nfunction header() {\n const fm = DOM.getFM();\n const isDataset = el => el.dataset;\n const isPanel = el => {\n return /^js-(left|right)$/.test(el.dataset.name);\n };\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addClick(fm, event => {\n const el = event.target;\n const parent = el.parentElement;\n if (parent.dataset.name !== 'js-fm-header') return;\n const name = (el.dataset.name || '').replace('js-', '');\n if (!/^(name|size|date)$/.test(name)) return;\n const panel = getPath(el).filter(isDataset).filter(isPanel).pop();\n CloudCmd.sortPanel(name, panel);\n });\n}\nfunction getPath(el, path = []) {\n if (!el) return path;\n return getPath(el.parentElement, path.concat(el));\n}\nasync function config() {\n const [, config] = await (0,try_to_catch__WEBPACK_IMPORTED_MODULE_3__.tryToCatch)(DOM.Files.get, 'config');\n const type = config === null || config === void 0 ? void 0 : config.packer;\n EXT = DOM.getPackerExt(type);\n}\nconst initKeysPanel = () => {\n const keysElement = DOM.getById('js-keyspanel');\n if (!keysElement) return;\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addClick(keysElement, event => {\n const {\n target\n } = event;\n const {\n id\n } = target;\n const operation = name => {\n const {\n Operation\n } = CloudCmd;\n return Operation.show.bind(null, name);\n };\n const clickFuncs = {\n 'f1': CloudCmd.Help.show,\n 'f2': CloudCmd.UserMenu.show,\n 'f3': CloudCmd.View.show,\n 'f4': CloudCmd.EditFile.show,\n 'f5': operation('copy'),\n 'f6': operation('move'),\n 'f7': DOM.promptNewDir,\n 'f8': operation('delete'),\n 'f9': () => {\n event.stopPropagation();\n CloudCmd.Menu.show();\n },\n 'f10': CloudCmd.Config.show,\n '~': CloudCmd.Konsole.show,\n 'shift~': CloudCmd.Terminal.show,\n 'contact': CloudCmd.Contact.show\n };\n execon__WEBPACK_IMPORTED_MODULE_0__(clickFuncs[id]);\n });\n};\nconst getPanel = side => {\n if (!itype__WEBPACK_IMPORTED_MODULE_1__.string(side)) return side;\n return DOM.getByDataName(`js-${side}`);\n};\nconst setOnPanel = side => {\n const panel = getPanel(side);\n const filesElement = DOM.getByDataName('js-files', panel);\n const pathElement = DOM.getByDataName('js-path', panel);\n\n /* ставим загрузку гифа на клик*/\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addClick(pathElement, getPathListener(panel));\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.add(filesElement, EventsFiles);\n};\nfunction getPathListener(panel) {\n return onPathElementClick.bind(null, panel);\n}\nfunction isNoCurrent(panel) {\n const Info = DOM.CurrentInfo;\n const infoPanel = Info.panel;\n if (!infoPanel) return true;\n const namePanel = panel.getAttribute('data-name');\n const nameInfoPanel = infoPanel.getAttribute('data-name');\n return namePanel !== nameInfoPanel;\n}\nfunction decodePath(path) {\n const url = CloudCmd.HOST;\n const {\n prefix\n } = CloudCmd;\n const prefixReg = RegExp('^' + prefix + _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_8__.FS);\n return decodeURI(path).replace(url, '').replace(prefixReg, '') // browser doesn't replace % -> %25% do it for him\n .replace('%%', '%25%').replace(NBSP_REG, SPACE) || '/';\n}\nasync function onPathElementClick(panel, event) {\n const Info = DOM.CurrentInfo;\n event.preventDefault();\n const element = event.target;\n const attr = element.getAttribute('data-name');\n const noCurrent = isNoCurrent(panel);\n if (attr === 'js-copy-path') return copyPath(element);\n if (attr === 'js-refresh') return CloudCmd.refresh({\n panel,\n noCurrent\n });\n if (attr !== 'js-path-link') return;\n const {\n href\n } = element;\n const path = decodePath(href);\n await CloudCmd.changeDir(path, {\n isRefresh: false,\n panel: noCurrent ? panel : Info.panel\n });\n}\nfunction copyPath(el) {\n _cloudcmd_clipboard__WEBPACK_IMPORTED_MODULE_4__.writeText(el.parentElement.title).then(CloudCmd.log).catch(CloudCmd.log);\n}\nfunction execIfNotMobile(callback, event) {\n const isMobile = DOM.getCSSVar('is-mobile');\n if (!isMobile) callback(event);\n}\nfunction execIfNotUL(callback, event) {\n const {\n target\n } = event;\n const {\n tagName\n } = target;\n if (tagName !== 'UL') callback(event);\n}\nfunction onClick(event) {\n event.preventDefault();\n changePanel(event.target);\n}\nfunction toggleSelect(key, files) {\n const isMac = /Mac/.test(globalThis.navigator.platform);\n if (!key) throw Error('key should not be undefined!');\n const [file] = files;\n if (isMac && key.meta) return DOM.toggleSelectedFile(file);\n if (key.shift) return files.map(DOM.selectFile);\n}\nfunction changePanel(element) {\n const Info = DOM.CurrentInfo;\n const {\n panel\n } = Info;\n const files = DOM.getByDataName('js-files', panel);\n const ul = getULElement(element);\n if (ul !== files) DOM.changePanel();\n}\nasync function onDblClick(event) {\n event.preventDefault();\n const current = getLIElement(event.target);\n const isDir = DOM.isCurrentIsDir(current);\n const path = DOM.getCurrentPath(current);\n if (!isDir) return CloudCmd.View.show();\n await CloudCmd.changeDir(path);\n}\nasync function onTouch(event) {\n const current = getLIElement(event.target);\n const isDir = DOM.isCurrentIsDir(current);\n if (!isDir) return;\n const isCurrent = DOM.isCurrentFile(current);\n if (!isCurrent) return;\n await CloudCmd.changeDir(DOM.getCurrentPath(current));\n}\n\n/*\n * download file from browser to desktop\n * in Chrome (HTML5)\n */\nfunction onDragStart(event) {\n const Info = DOM.CurrentInfo;\n const {\n prefixURL\n } = CloudCmd;\n const element = getLIElement(event.target);\n const {\n isDir\n } = Info;\n let link = DOM.getCurrentLink(element);\n let name = DOM.getCurrentName(element);\n\n /* if it's directory - adding json extension */\n if (isDir) {\n name += EXT;\n link = document.createElement('a');\n link.textContent = name;\n link.href = prefixURL + '/pack' + Info.path + EXT;\n }\n event.dataTransfer.setData('DownloadURL', 'application/octet-stream' + ':' + name + ':' + link);\n}\nfunction getLIElement(element) {\n if (!element) return element;\n while (element.tagName !== 'LI') element = element.parentElement;\n return element;\n}\nfunction getULElement(element) {\n while (element.tagName !== 'UL') element = element.parentElement;\n return element;\n}\nfunction setCurrentFileByEvent(event) {\n const Info = DOM.CurrentInfo;\n const BUTTON_LEFT = 0;\n const key = {\n alt: event.altKey,\n ctrl: event.ctrlKey,\n meta: event.metaKey,\n shift: event.shiftKey\n };\n const element = getLIElement(event.target);\n const fromName = Info.name;\n DOM.setCurrentFile(element);\n const toName = Info.name;\n let files = [];\n if (key.shift) files = getFilesRange(fromName, toName);else files.push(Info.element);\n if (event.button === BUTTON_LEFT) toggleSelect(key, files);\n}\nfunction getFilesRange(from, to) {\n const files = DOM.getAllFiles();\n const names = DOM.getFilenames(files);\n const getNameIndex = (0,_get_index_mjs__WEBPACK_IMPORTED_MODULE_9__.getIndex)(names);\n const indexFrom = getNameIndex(from);\n const indexTo = getNameIndex(to);\n return (0,_get_range_mjs__WEBPACK_IMPORTED_MODULE_7__.getRange)(indexFrom, indexTo, files);\n}\nfunction contextMenu() {\n const fm = DOM.getFM();\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addOnce('contextmenu', fm, event => {\n CloudCmd.Menu.show({\n x: event.clientX,\n y: event.clientY\n });\n });\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.addContextMenu(fm, event => {\n CloudCmd.Menu.ENABLED || event.preventDefault();\n });\n}\nfunction dragndrop() {\n const panels = DOM.getByClassAll('panel');\n const select = ({\n target\n }) => {\n target.classList.add('selected-panel');\n };\n const unselect = ({\n target\n }) => {\n target.classList.remove('selected-panel');\n };\n const onDrop = event => {\n const {\n files,\n items\n } = event.dataTransfer;\n const {\n length: filesCount\n } = files;\n event.preventDefault();\n if (filesCount && (!items || !items.length || !items[0].webkitGetAsEntry)) return (0,_dom_upload_files__WEBPACK_IMPORTED_MODULE_6__.uploadFiles)(files);\n const isFile = item => item.kind === 'file';\n const dirFiles = Array.from(items).filter(isFile);\n if (dirFiles.length) return DOM.uploadDirectory(dirFiles);\n const {\n Operation\n } = CloudCmd;\n const operation = event.shiftKey ? 'move' : 'copy';\n return Operation.show(operation);\n };\n\n /**\n * In macOS Chrome dropEffect = 'none'\n * so drop do not firing up when try\n * to upload file from download bar\n */\n const onDragOver = event => {\n const {\n dataTransfer\n } = event;\n const {\n effectAllowed\n } = dataTransfer;\n if (/move|linkMove/.test(effectAllowed)) dataTransfer.dropEffect = 'move';else dataTransfer.dropEffect = 'copy';\n event.preventDefault();\n };\n for (const panel of panels) _dom_events__WEBPACK_IMPORTED_MODULE_5__.add('dragover', panel, onDragOver).add('drop', panel, onDrop).add('dragenter', select).add(['dragleave', 'drop'], unselect);\n}\nfunction unload() {\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.add(['unload', 'beforeunload'], event => {\n const {\n Key\n } = CloudCmd;\n const isBind = Key === null || Key === void 0 ? void 0 : Key.isBind();\n if (isBind) return;\n event.preventDefault();\n return 'Please make sure that you saved all work.';\n });\n}\nfunction pop() {\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.add('popstate', async ({\n state\n }) => {\n const path = (state || '').replace(_common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_8__.FS, '');\n if (!path) return CloudCmd.route(location.hash);\n const history = false;\n await CloudCmd.changeDir(path, {\n history\n });\n });\n}\nfunction resize() {\n _dom_events__WEBPACK_IMPORTED_MODULE_5__.add('resize', () => {\n const Info = DOM.CurrentInfo;\n const is = globalThis.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH;\n if (!is) return;\n const {\n panel\n } = Info;\n const isEmptyRoot = !panel;\n if (isEmptyRoot) return;\n const name = panel.getAttribute('data-name');\n const isLeft = name === 'js-left';\n if (isLeft) return;\n DOM.changePanel();\n });\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/listeners/index.mjs\n}");
|
|
382
382
|
|
|
383
383
|
/***/ },
|
|
384
384
|
|
|
@@ -532,7 +532,7 @@ eval("{\n\n/* global CloudCmd */\n/* global Util */\n/* global DOM */\n/* global
|
|
|
532
532
|
(module, exports, __webpack_require__) {
|
|
533
533
|
|
|
534
534
|
"use strict";
|
|
535
|
-
eval("{\n\n/* global CloudCmd */\nCloudCmd.Markdown = exports;\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\nconst Images = __webpack_require__(/*! ../dom/images.mjs */ \"./client/dom/images.mjs\");\nconst {\n Markdown\n} = __webpack_require__(/*!
|
|
535
|
+
eval("{\n\n/* global CloudCmd */\nCloudCmd.Markdown = exports;\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\nconst Images = __webpack_require__(/*! ../dom/images.mjs */ \"./client/dom/images.mjs\");\nconst {\n Markdown\n} = __webpack_require__(/*! #dom/rest */ \"./client/dom/rest.mjs\");\nconst {\n alert\n} = __webpack_require__(/*! #dom/dialog */ \"./client/dom/dialog.mjs\");\nmodule.exports.init = async () => {\n Images.show.load('top');\n await CloudCmd.View();\n};\nmodule.exports.show = show;\nmodule.exports.hide = () => {\n CloudCmd.View.hide();\n};\nasync function show(name, options = {}) {\n const {\n positionLoad,\n relative\n } = options;\n Images.show.load(positionLoad);\n if (relative) name += '?relative';\n const [error, innerHTML] = await Markdown.read(name);\n Images.hide();\n if (error) return alert(error.message, {\n cancel: false\n });\n const className = 'help';\n const div = createElement('div', {\n className,\n innerHTML\n });\n CloudCmd.View.show(div);\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/markdown.js\n}");
|
|
536
536
|
|
|
537
537
|
/***/ },
|
|
538
538
|
|
|
@@ -547,36 +547,36 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
547
547
|
|
|
548
548
|
/***/ },
|
|
549
549
|
|
|
550
|
-
/***/ "./client/modules/menu/index.
|
|
551
|
-
|
|
552
|
-
!*** ./client/modules/menu/index.
|
|
553
|
-
|
|
554
|
-
(
|
|
550
|
+
/***/ "./client/modules/menu/index.mjs"
|
|
551
|
+
/*!***************************************!*\
|
|
552
|
+
!*** ./client/modules/menu/index.mjs ***!
|
|
553
|
+
\***************************************/
|
|
554
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
555
555
|
|
|
556
556
|
"use strict";
|
|
557
|
-
eval("{/*
|
|
557
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ENABLED: () => (/* binding */ ENABLED),\n/* harmony export */ hide: () => (/* binding */ hide),\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ show: () => (/* binding */ show)\n/* harmony export */ });\n/* harmony import */ var execon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n/* harmony import */ var wraptile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* harmony import */ var _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* harmony import */ var _dom_load__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! #dom/load */ \"./client/dom/load.mjs\");\n/* harmony import */ var _dom_rest__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! #dom/rest */ \"./client/dom/rest.mjs\");\n/* harmony import */ var _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/cloudfunc.mjs */ \"./common/cloudfunc.mjs\");\n/* global CloudCmd, DOM */\n\n\n\n\n\n\nconst {\n config,\n Key\n} = CloudCmd;\nconst {\n Buffer,\n Events,\n Dialog,\n Images\n} = DOM;\nconst Info = DOM.CurrentInfo;\nconst alertNoFiles = Dialog.alert.noFiles;\nconst uploadTo = wraptile__WEBPACK_IMPORTED_MODULE_1__(_uploadTo);\nlet MenuShowedName;\nlet MenuContext;\nlet MenuContextFile;\nconst ENABLED = false;\nCloudCmd.Menu = {\n init,\n show,\n hide\n};\nasync function init() {\n const {\n isAuth,\n menuDataFile\n } = getFileMenuData();\n const fm = DOM.getFM();\n const menuData = getMenuData(isAuth);\n const options = getOptions({\n type: 'context'\n });\n const optionsFile = getOptions({\n type: 'file'\n });\n const {\n createCloudMenu\n } = await __webpack_require__.e(/*! import() */ \"cloudcmd.common\").then(__webpack_require__.bind(__webpack_require__, /*! ./cloudmenu.mjs */ \"./client/modules/menu/cloudmenu.mjs\"));\n const {\n name\n } = fm.dataset;\n MenuContext = await createCloudMenu(name, options, menuData);\n MenuContextFile = await createCloudMenu(name, optionsFile, menuDataFile);\n MenuContext.addContextMenuListener();\n MenuContextFile.addContextMenuListener();\n Events.addKey(listener);\n}\nfunction hide() {\n MenuContext.hide();\n MenuContextFile.hide();\n}\nfunction show(position) {\n const {\n x,\n y\n } = getPosition(position);\n MenuContext.show(x, y);\n MenuContextFile.show(x, y);\n Images.hide();\n}\nfunction getPosition(position) {\n if (position) return {\n x: position.x,\n y: position.y\n };\n return getCurrentPosition();\n}\nfunction getMenuNameByEl(el) {\n if (!el) return 'context';\n const name = DOM.getCurrentName(el);\n if (name === '..') return 'context';\n return 'contextFile';\n}\nfunction getOptions({\n type\n}) {\n let name;\n let func;\n if (type === 'context') {\n name = 'context';\n func = Key.unsetBind;\n } else if (type === 'file') {\n name = 'contextFile';\n }\n const options = {\n icon: true,\n infiniteScroll: false,\n beforeClose: Key.setBind,\n beforeHide: Key.setBind,\n beforeShow: execon__WEBPACK_IMPORTED_MODULE_0__[\"with\"](beforeShow, func),\n beforeClick,\n name\n };\n return options;\n}\nfunction getMenuData(isAuth) {\n const menu = {\n 'Paste': Buffer.paste,\n 'New': {\n File: DOM.promptNewFile,\n Directory: DOM.promptNewDir\n },\n 'Upload': () => {\n CloudCmd.Upload.show();\n },\n 'Upload From Cloud': uploadFromCloud,\n 'Toggle File Selection': DOM.toggleSelectedFile,\n '(Un)Select All': DOM.toggleAllSelectedFiles\n };\n if (isAuth) menu['Log Out'] = CloudCmd.logOut;\n return menu;\n}\nfunction getFileMenuData() {\n const isAuth = CloudCmd.config('auth');\n const menuBottom = getMenuData(isAuth);\n const menuTop = {\n 'View': () => {\n CloudCmd.View.show();\n },\n 'Edit': () => {\n const name = config('vim') ? 'EditFileVim' : 'EditFile';\n CloudCmd[name].show();\n },\n 'Rename': () => {\n setTimeout(DOM.renameCurrent, 100);\n },\n 'Delete': () => {\n CloudCmd.Operation.show('delete');\n },\n 'Pack': () => {\n CloudCmd.Operation.show('pack');\n },\n 'Extract': () => {\n CloudCmd.Operation.show('extract');\n },\n 'Download': preDownload,\n 'Upload To Cloud': uploadTo('Cloud'),\n 'Cut': () => {\n isCurrent(Buffer.cut, alertNoFiles);\n },\n 'Copy': () => {\n isCurrent(Buffer.copy, alertNoFiles);\n }\n };\n const menuDataFile = {\n ...menuTop,\n ...menuBottom\n };\n return {\n isAuth,\n menuDataFile\n };\n}\nfunction isCurrent(yesFn, noFn) {\n if (Info.name !== '..') return yesFn();\n noFn();\n}\nfunction isPath(x, y) {\n const {\n panel\n } = Info;\n const isEmptyRoot = !panel;\n if (isEmptyRoot) return false;\n const el = document.elementFromPoint(x, y);\n const elements = panel.querySelectorAll('[data-name=\"js-path\"] *');\n return !~[].indexOf.call(elements, el);\n}\nfunction beforeShow(callback, params) {\n Key.unsetBind();\n const {\n name,\n position = {\n x: params.x,\n y: params.y\n }\n } = params;\n const {\n x,\n y\n } = position;\n const el = DOM.getCurrentByPosition({\n x,\n y\n });\n const menuName = getMenuNameByEl(el);\n let isShow = menuName !== 'contextFile';\n if (params.name === 'contextFile') isShow = !isShow;\n if (isShow) MenuShowedName = name;\n execon__WEBPACK_IMPORTED_MODULE_0__(callback);\n if (isShow) isShow = isPath(x, y);\n return isShow;\n}\nconst beforeClick = name => MenuShowedName !== name;\nasync function _uploadTo(nameModule) {\n const [error, data] = await Info.getData();\n if (error) return;\n const {\n name\n } = Info;\n CloudCmd.execFromModule(nameModule, 'uploadFile', name, data);\n CloudCmd.log(`Uploading to ${name}...`);\n}\nfunction uploadFromCloud() {\n Images.show.load('top');\n CloudCmd.execFromModule('Cloud', 'saveFile', async (currentName, data) => {\n const path = DOM.getCurrentDirPath() + currentName;\n const [e] = await _dom_rest__WEBPACK_IMPORTED_MODULE_4__.write(path, data);\n if (e) return;\n await CloudCmd.refresh({\n currentName\n });\n });\n}\nfunction preDownload() {\n download(config('packer'));\n}\nfunction download(type) {\n const TIME = 30 * 1000;\n const {\n prefixURL\n } = CloudCmd;\n const PACK = '/pack';\n const date = Date.now();\n const files = DOM.getActiveFiles();\n if (!files.length) return alertNoFiles();\n for (const file of files) {\n const selected = DOM.isSelected(file);\n const isDir = DOM.isCurrentIsDir(file);\n const path = DOM.getCurrentPath(file);\n CloudCmd.log(`downloading file ${path}...`);\n\n /*\n * if we send ajax request -\n * no need in hash so we escape #\n * and all other characters, like \"%\"\n */\n const encodedPath = encodeURI(path).replace(/#/g, '#');\n const id = (0,_dom_load__WEBPACK_IMPORTED_MODULE_3__.getIdBySrc)(path);\n let src;\n if (isDir) src = prefixURL + PACK + encodedPath + DOM.getPackerExt(type);else src = prefixURL + _common_cloudfunc_mjs__WEBPACK_IMPORTED_MODULE_5__.FS + encodedPath + '?download';\n const element = _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_2__('iframe', {\n id: id + '-' + date,\n async: false,\n className: 'hidden',\n src\n });\n const {\n body\n } = document;\n const removeChild = body.removeChild.bind(body, element);\n setTimeout(removeChild, TIME);\n if (selected) DOM.toggleSelectedFile(file);\n }\n}\nfunction getCurrentPosition() {\n const current = Info.element;\n const rect = current.getBoundingClientRect();\n const position = {\n x: Math.round(rect.left + rect.width / 3),\n y: Math.round(rect.top)\n };\n return position;\n}\nfunction listener(event) {\n const {\n F9,\n ESC\n } = Key;\n const key = event.keyCode;\n const isBind = Key.isBind();\n if (key === ESC) {\n Key.setBind();\n return hide();\n }\n if (isBind && key === F9) {\n const position = getCurrentPosition();\n MenuContext.show(position.x, position.y);\n event.preventDefault();\n }\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/menu/index.mjs\n}");
|
|
558
558
|
|
|
559
559
|
/***/ },
|
|
560
560
|
|
|
561
|
-
/***/ "./client/modules/operation/format.
|
|
562
|
-
|
|
563
|
-
!*** ./client/modules/operation/format.
|
|
564
|
-
|
|
565
|
-
(
|
|
561
|
+
/***/ "./client/modules/operation/format.mjs"
|
|
562
|
+
/*!*********************************************!*\
|
|
563
|
+
!*** ./client/modules/operation/format.mjs ***!
|
|
564
|
+
\*********************************************/
|
|
565
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
566
566
|
|
|
567
567
|
"use strict";
|
|
568
|
-
eval("{\n\
|
|
568
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ format: () => (/* binding */ format)\n/* harmony export */ });\nconst format = (operation, from, to) => {\n if (!to) return `${operation} ${from}`;\n return `${operation} ${from} -> ${to}`;\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/operation/format.mjs\n}");
|
|
569
569
|
|
|
570
570
|
/***/ },
|
|
571
571
|
|
|
572
|
-
/***/ "./client/modules/operation/get-next-current-name.
|
|
573
|
-
|
|
574
|
-
!*** ./client/modules/operation/get-next-current-name.
|
|
575
|
-
|
|
576
|
-
(
|
|
572
|
+
/***/ "./client/modules/operation/get-next-current-name.mjs"
|
|
573
|
+
/*!************************************************************!*\
|
|
574
|
+
!*** ./client/modules/operation/get-next-current-name.mjs ***!
|
|
575
|
+
\************************************************************/
|
|
576
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
577
577
|
|
|
578
578
|
"use strict";
|
|
579
|
-
eval("{\n\
|
|
579
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getNextCurrentName: () => (/* binding */ getNextCurrentName)\n/* harmony export */ });\n/* harmony import */ var currify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n\nconst not = currify__WEBPACK_IMPORTED_MODULE_0__((array, value) => !array.includes(value));\nconst notOneOf = currify__WEBPACK_IMPORTED_MODULE_0__((a, b) => a.filter(not(b)));\nconst getNextCurrentName = (currentName, names, removedNames) => {\n const i = names.indexOf(currentName);\n const nextNames = notOneOf(names, removedNames);\n const {\n length\n } = nextNames;\n if (nextNames[i]) return nextNames[i];\n return nextNames[length - 1];\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/operation/get-next-current-name.mjs\n}");
|
|
580
580
|
|
|
581
581
|
/***/ },
|
|
582
582
|
|
|
@@ -587,18 +587,18 @@ eval("{\n\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/c
|
|
|
587
587
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
588
588
|
|
|
589
589
|
"use strict";
|
|
590
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ hide: () => (/* binding */ hide),\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ show: () => (/* binding */ show)\n/* harmony export */ });\n/* harmony import */ var currify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* harmony import */ var wraptile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* harmony import */ var es6_promisify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\n/* harmony import */ var execon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n/* harmony import */ var load_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n/* harmony import */ var try_to_catch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* harmony import */ var _common_entity_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/entity.js */ \"./common/entity.js\");\n/* harmony import */ var _remove_extension_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./remove-extension.js */ \"./client/modules/operation/remove-extension.js\");\n/* harmony import */ var _set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./set-listeners.mjs */ \"./client/modules/operation/set-listeners.mjs\");\n/* harmony import */ var _get_next_current_name_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./get-next-current-name.js */ \"./client/modules/operation/get-next-current-name.js\");\n\n\n\n\n\n\n\n\n\n\nconst {\n DOM,\n CloudCmd\n} = globalThis;\nconst removeQuery = a => a.replace(/\\?.*/, '');\nconst Name = 'Operation';\nconst {\n config\n} = CloudCmd;\nconst {\n Dialog,\n Images\n} = DOM;\nconst authCheck = wraptile__WEBPACK_IMPORTED_MODULE_1__(_authCheck);\nconst Operation = {};\nlet Loaded;\nlet copyFn;\nlet moveFn;\nlet deleteFn;\nlet extractFn;\nlet packZipFn;\nlet packTarFn;\nconst Info = DOM.CurrentInfo;\nconst showLoad = Images.show.load.bind(null, 'top');\nconst processFiles = currify__WEBPACK_IMPORTED_MODULE_0__(_processFiles);\nconst noFilesCheck = () => {\n const {\n length\n } = DOM.getActiveFiles();\n const is = Boolean(!length);\n if (is) return Dialog.alert.noFiles();\n return is;\n};\nconst init = (0,es6_promisify__WEBPACK_IMPORTED_MODULE_2__.promisify)(callback => {\n showLoad();\n execon__WEBPACK_IMPORTED_MODULE_3__.series([DOM.loadSocket, async callback => {\n if (config('dropbox')) return callback();\n const {\n prefix,\n prefixSocket\n } = CloudCmd;\n await loadAll();\n await initOperations(prefix, prefixSocket, callback);\n }, callback => {\n Loaded = true;\n Images.hide();\n callback();\n }], callback);\n});\nfunction _authCheck(spawn, ok) {\n const accept = wraptile__WEBPACK_IMPORTED_MODULE_1__(ok);\n const alertDialog = wraptile__WEBPACK_IMPORTED_MODULE_1__(Dialog.alert);\n spawn.on('accept', accept(spawn));\n spawn.on('reject', alertDialog('Wrong credentials!'));\n spawn.emit('auth', config('username'), config('password'));\n}\nconst onConnect = currify__WEBPACK_IMPORTED_MODULE_0__((fn, operator) => {\n setOperations(operator);\n fn();\n});\nasync function initOperations(prefix, socketPrefix, fn) {\n socketPrefix = `${socketPrefix}/fileop`;\n const operator = await globalThis.fileop({\n prefix,\n socketPrefix\n });\n operator.on('connect', authCheck(operator, onConnect(fn)));\n}\nfunction setOperations(operator) {\n packTarFn = ({\n from,\n to,\n names\n }, callback) => {\n const operation = 'Tar';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n noContinue: true,\n from,\n to\n });\n operator.tar(from, to, names).then(listen);\n };\n packZipFn = ({\n from,\n to,\n names\n }, callback) => {\n const operation = 'Zip';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n noContinue: true,\n from,\n to\n });\n operator.zip(from, to, names).then(listen);\n };\n deleteFn = (from, files, callback) => {\n from = removeQuery(from);\n const operation = 'Delete';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n from\n });\n operator.remove(from, files).then(listen);\n };\n copyFn = ({\n from,\n to,\n names\n }, callback) => {\n const operation = 'Copy';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n from,\n to,\n names\n });\n operator.copy(from, to, names).then(listen);\n };\n moveFn = ({\n from,\n to,\n names\n }, callback) => {\n const operation = 'Move';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n from,\n to\n });\n operator.move(from, to, names).then(listen);\n };\n extractFn = ({\n from,\n to\n }, callback) => {\n const operation = 'Extract';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n noContinue: true,\n from,\n to\n });\n operator.extract(from, to).then(listen);\n };\n}\nfunction getPacker(type) {\n if (type === 'zip') return packZipFn;\n return packTarFn;\n}\nconst hide = () => {\n CloudCmd.View.hide();\n};\nconst show = (operation, data) => {\n if (!Loaded) return;\n if (operation === 'copy') return Operation.copy(data);\n if (operation === 'move') return Operation.move(data);\n if (operation === 'delete') return Operation.delete();\n if (operation === 'delete:silent') return Operation.deleteSilent();\n if (operation === 'pack') return Operation.pack();\n if (operation === 'extract') return Operation.extract();\n};\nOperation.copy = processFiles({\n type: 'copy'\n});\nOperation.move = processFiles({\n type: 'move'\n});\nOperation.delete = promptDelete;\nOperation.deleteSilent = deleteSilent;\nOperation.pack = () => {\n const isZip = config('packer') === 'zip';\n twopack('pack', isZip ? 'zip' : 'tar');\n};\nOperation.extract = () => {\n twopack('extract');\n};\n\n/**\n * prompt and delete current file or selected files\n *\n * @currentFile\n */\nasync function promptDelete() {\n if (noFilesCheck()) return;\n const msgAsk = 'Do you really want to delete the ';\n const msgSel = 'selected ';\n const files = DOM.getActiveFiles();\n const names = DOM.getFilenames(files);\n const n = names.length;\n let msg;\n if (n) {\n let name = '';\n for (let i = 0; i < 5 && i < n; i++) name += '\\n' + names[i];\n if (n >= 5) name += '\\n...';\n msg = msgAsk + msgSel + n + ' files/directories?\\n' + (0,_common_entity_js__WEBPACK_IMPORTED_MODULE_6__.encode)(name);\n } else {\n const current = DOM.getCurrentFile();\n const isDir = DOM.isCurrentIsDir(current);\n const getType = isDir => isDir ? 'directory' : 'file';\n const type = getType(isDir) + ' ';\n const name = DOM.getCurrentName(current);\n msg = msgAsk + msgSel + type + name + '?';\n }\n const [cancel] = await Dialog.confirm(msg);\n if (cancel) return;\n deleteSilent(files);\n}\n\n/**\n * delete current or selected files\n *\n * @files\n */\nfunction deleteSilent(files = DOM.getActiveFiles()) {\n const query = '?files';\n const path = Info.dirPath;\n if (noFilesCheck()) return;\n showLoad();\n const removedNames = DOM.getFilenames(files);\n const names = DOM.CurrentInfo.files.map(DOM.getCurrentName);\n const currentName = DOM.getCurrentName();\n const nextCurrentName = _get_next_current_name_js__WEBPACK_IMPORTED_MODULE_9__(currentName, names, removedNames);\n deleteFn(path + query, removedNames, async () => {\n await CloudCmd.refresh();\n const names = Info.files.map(DOM.getCurrentName);\n const isCurrent = names.includes(currentName);\n const name = isCurrent ? currentName : nextCurrentName;\n DOM.setCurrentByName(name);\n });\n}\n\n/*\n * process files (copy or move)\n * @param data\n * @param operation\n */\nasync function _processFiles(options, data) {\n let selFiles;\n let files;\n let panel;\n let shouldAsk;\n let ok;\n let from = '';\n let to = '';\n let names = [];\n if (data) {\n ({\n from,\n to,\n names\n } = data);\n ({\n panel\n } = Info);\n } else {\n from = Info.dirPath;\n to = DOM.getNotCurrentDirPath();\n selFiles = DOM.getSelectedFiles();\n names = DOM.getFilenames(selFiles);\n data = {};\n shouldAsk = true;\n panel = Info.panelPassive;\n }\n if (!names.length) names.push(DOM.getCurrentName());\n const [name] = names;\n const sameName = DOM.getCurrentByName(name, panel);\n if (!data && noFilesCheck()) return;\n const {\n type\n } = options;\n const isCopy = type === 'copy';\n const option = isCopy ? 'confirmCopy' : 'confirmMove';\n const title = isCopy ? 'Copy' : 'Rename/Move';\n const operation = isCopy ? copyFn : moveFn;\n if (shouldAsk && config(option)) {\n const [cancel, newTo] = await prompt(title, to, names.map(_common_entity_js__WEBPACK_IMPORTED_MODULE_6__.encode));\n if (!cancel) ask(newTo);\n return;\n }\n ask(to);\n function ask(to) {\n ok = from !== to && to;\n if (ok && !shouldAsk || !sameName) return go();\n const str = `\"${name}\" already exist. Overwrite?`;\n const cancel = false;\n Dialog.confirm(str, {\n cancel\n }).then(go);\n function go() {\n showLoad();\n files = {\n from,\n to,\n names\n };\n operation(files, async () => {\n await DOM.Storage.remove(from);\n const {\n panel,\n panelPassive\n } = Info;\n if (!Info.isOnePanel) CloudCmd.refresh({\n panel: panelPassive,\n noCurrent: true\n });\n CloudCmd.refresh({\n panel\n });\n });\n }\n }\n}\nfunction checkEmpty(name, operation) {\n if (!operation) throw Error(`${name} could not be empty!`);\n}\nfunction twopack(operation, type) {\n let op;\n let fileFrom;\n let currentName = Info.name;\n const {\n path,\n dirPath\n } = Info;\n const activeFiles = DOM.getActiveFiles();\n const names = DOM.getFilenames(activeFiles);\n checkEmpty('operation', operation);\n if (!names.length) return Dialog.alert.noFiles();\n switch (operation) {\n case 'extract':\n op = extractFn;\n fileFrom = {\n from: path,\n to: dirPath\n };\n currentName = _remove_extension_js__WEBPACK_IMPORTED_MODULE_7__(currentName);\n break;\n case 'pack':\n op = getPacker(type);\n if (names.length > 1) currentName = Info.dir;\n currentName += DOM.getPackerExt(type);\n fileFrom = {\n from: dirPath,\n to: dirPath + currentName,\n names\n };\n break;\n }\n showLoad();\n op(fileFrom, error => {\n !error && CloudCmd.refresh({\n currentName\n });\n });\n}\nasync function prompt(msg, to, names) {\n const n = names.length;\n const [name] = names;\n msg += ' ';\n if (names.length > 1) msg += `${n} file(s)`;else msg += `\"${name}\"`;\n msg += ' to';\n return await Dialog.prompt(msg, to);\n}\nglobalThis.CloudCmd[Name] = {\n init,\n hide,\n show\n};\nasync function loadAll() {\n const {\n prefix\n } = globalThis.CloudCmd;\n const file = `${prefix}/fileop/fileop.js`;\n const [error] = await (0,try_to_catch__WEBPACK_IMPORTED_MODULE_5__.tryToCatch)(load_js__WEBPACK_IMPORTED_MODULE_4__.js, file);\n if (error) Dialog.alert(error.message);\n Loaded = true;\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/operation/index.mjs\n}");
|
|
590
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ hide: () => (/* binding */ hide),\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ show: () => (/* binding */ show)\n/* harmony export */ });\n/* harmony import */ var currify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* harmony import */ var wraptile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* harmony import */ var es6_promisify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\n/* harmony import */ var execon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n/* harmony import */ var load_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n/* harmony import */ var try_to_catch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* harmony import */ var _common_entity_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/entity.js */ \"./common/entity.js\");\n/* harmony import */ var _remove_extension_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./remove-extension.mjs */ \"./client/modules/operation/remove-extension.mjs\");\n/* harmony import */ var _set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./set-listeners.mjs */ \"./client/modules/operation/set-listeners.mjs\");\n/* harmony import */ var _get_next_current_name_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./get-next-current-name.mjs */ \"./client/modules/operation/get-next-current-name.mjs\");\n\n\n\n\n\n\n\n\n\n\nconst {\n DOM,\n CloudCmd\n} = globalThis;\nconst removeQuery = a => a.replace(/\\?.*/, '');\nconst Name = 'Operation';\nconst {\n config\n} = CloudCmd;\nconst {\n Dialog,\n Images\n} = DOM;\nconst authCheck = wraptile__WEBPACK_IMPORTED_MODULE_1__(_authCheck);\nconst Operation = {};\nlet Loaded;\nlet copyFn;\nlet moveFn;\nlet deleteFn;\nlet extractFn;\nlet packZipFn;\nlet packTarFn;\nconst Info = DOM.CurrentInfo;\nconst showLoad = Images.show.load.bind(null, 'top');\nconst processFiles = currify__WEBPACK_IMPORTED_MODULE_0__(_processFiles);\nconst noFilesCheck = () => {\n const {\n length\n } = DOM.getActiveFiles();\n const is = Boolean(!length);\n if (is) return Dialog.alert.noFiles();\n return is;\n};\nconst init = (0,es6_promisify__WEBPACK_IMPORTED_MODULE_2__.promisify)(callback => {\n showLoad();\n execon__WEBPACK_IMPORTED_MODULE_3__.series([DOM.loadSocket, async callback => {\n if (config('dropbox')) return callback();\n const {\n prefix,\n prefixSocket\n } = CloudCmd;\n await loadAll();\n await initOperations(prefix, prefixSocket, callback);\n }, callback => {\n Loaded = true;\n Images.hide();\n callback();\n }], callback);\n});\nfunction _authCheck(spawn, ok) {\n const accept = wraptile__WEBPACK_IMPORTED_MODULE_1__(ok);\n const alertDialog = wraptile__WEBPACK_IMPORTED_MODULE_1__(Dialog.alert);\n spawn.on('accept', accept(spawn));\n spawn.on('reject', alertDialog('Wrong credentials!'));\n spawn.emit('auth', config('username'), config('password'));\n}\nconst onConnect = currify__WEBPACK_IMPORTED_MODULE_0__((fn, operator) => {\n setOperations(operator);\n fn();\n});\nasync function initOperations(prefix, socketPrefix, fn) {\n socketPrefix = `${socketPrefix}/fileop`;\n const operator = await globalThis.fileop({\n prefix,\n socketPrefix\n });\n operator.on('connect', authCheck(operator, onConnect(fn)));\n}\nfunction setOperations(operator) {\n packTarFn = ({\n from,\n to,\n names\n }, callback) => {\n const operation = 'Tar';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n noContinue: true,\n from,\n to\n });\n operator.tar(from, to, names).then(listen);\n };\n packZipFn = ({\n from,\n to,\n names\n }, callback) => {\n const operation = 'Zip';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n noContinue: true,\n from,\n to\n });\n operator.zip(from, to, names).then(listen);\n };\n deleteFn = (from, files, callback) => {\n from = removeQuery(from);\n const operation = 'Delete';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n from\n });\n operator.remove(from, files).then(listen);\n };\n copyFn = ({\n from,\n to,\n names\n }, callback) => {\n const operation = 'Copy';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n from,\n to,\n names\n });\n operator.copy(from, to, names).then(listen);\n };\n moveFn = ({\n from,\n to,\n names\n }, callback) => {\n const operation = 'Move';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n from,\n to\n });\n operator.move(from, to, names).then(listen);\n };\n extractFn = ({\n from,\n to\n }, callback) => {\n const operation = 'Extract';\n const listen = (0,_set_listeners_mjs__WEBPACK_IMPORTED_MODULE_8__.setListeners)({\n operation,\n callback,\n noContinue: true,\n from,\n to\n });\n operator.extract(from, to).then(listen);\n };\n}\nfunction getPacker(type) {\n if (type === 'zip') return packZipFn;\n return packTarFn;\n}\nconst hide = () => {\n CloudCmd.View.hide();\n};\nconst show = (operation, data) => {\n if (!Loaded) return;\n if (operation === 'copy') return Operation.copy(data);\n if (operation === 'move') return Operation.move(data);\n if (operation === 'delete') return Operation.delete();\n if (operation === 'delete:silent') return Operation.deleteSilent();\n if (operation === 'pack') return Operation.pack();\n if (operation === 'extract') return Operation.extract();\n};\nOperation.copy = processFiles({\n type: 'copy'\n});\nOperation.move = processFiles({\n type: 'move'\n});\nOperation.delete = promptDelete;\nOperation.deleteSilent = deleteSilent;\nOperation.pack = () => {\n const isZip = config('packer') === 'zip';\n twopack('pack', isZip ? 'zip' : 'tar');\n};\nOperation.extract = () => {\n twopack('extract');\n};\n\n/**\n * prompt and delete current file or selected files\n *\n * @currentFile\n */\nasync function promptDelete() {\n if (noFilesCheck()) return;\n const msgAsk = 'Do you really want to delete the ';\n const msgSel = 'selected ';\n const files = DOM.getActiveFiles();\n const names = DOM.getFilenames(files);\n const n = names.length;\n let msg;\n if (n) {\n let name = '';\n for (let i = 0; i < 5 && i < n; i++) name += '\\n' + names[i];\n if (n >= 5) name += '\\n...';\n msg = msgAsk + msgSel + n + ' files/directories?\\n' + (0,_common_entity_js__WEBPACK_IMPORTED_MODULE_6__.encode)(name);\n } else {\n const current = DOM.getCurrentFile();\n const isDir = DOM.isCurrentIsDir(current);\n const getType = isDir => isDir ? 'directory' : 'file';\n const type = getType(isDir) + ' ';\n const name = DOM.getCurrentName(current);\n msg = msgAsk + msgSel + type + name + '?';\n }\n const [cancel] = await Dialog.confirm(msg);\n if (cancel) return;\n deleteSilent(files);\n}\n\n/**\n * delete current or selected files\n *\n * @files\n */\nfunction deleteSilent(files = DOM.getActiveFiles()) {\n const query = '?files';\n const path = Info.dirPath;\n if (noFilesCheck()) return;\n showLoad();\n const removedNames = DOM.getFilenames(files);\n const names = DOM.CurrentInfo.files.map(DOM.getCurrentName);\n const currentName = DOM.getCurrentName();\n const nextCurrentName = (0,_get_next_current_name_mjs__WEBPACK_IMPORTED_MODULE_9__.getNextCurrentName)(currentName, names, removedNames);\n deleteFn(path + query, removedNames, async () => {\n await CloudCmd.refresh();\n const names = Info.files.map(DOM.getCurrentName);\n const isCurrent = names.includes(currentName);\n const name = isCurrent ? currentName : nextCurrentName;\n DOM.setCurrentByName(name);\n });\n}\n\n/*\n * process files (copy or move)\n * @param data\n * @param operation\n */\nasync function _processFiles(options, data) {\n let selFiles;\n let files;\n let panel;\n let shouldAsk;\n let ok;\n let from = '';\n let to = '';\n let names = [];\n if (data) {\n ({\n from,\n to,\n names\n } = data);\n ({\n panel\n } = Info);\n } else {\n from = Info.dirPath;\n to = DOM.getNotCurrentDirPath();\n selFiles = DOM.getSelectedFiles();\n names = DOM.getFilenames(selFiles);\n data = {};\n shouldAsk = true;\n panel = Info.panelPassive;\n }\n if (!names.length) names.push(DOM.getCurrentName());\n const [name] = names;\n const sameName = DOM.getCurrentByName(name, panel);\n if (!data && noFilesCheck()) return;\n const {\n type\n } = options;\n const isCopy = type === 'copy';\n const option = isCopy ? 'confirmCopy' : 'confirmMove';\n const title = isCopy ? 'Copy' : 'Rename/Move';\n const operation = isCopy ? copyFn : moveFn;\n if (shouldAsk && config(option)) {\n const [cancel, newTo] = await prompt(title, to, names.map(_common_entity_js__WEBPACK_IMPORTED_MODULE_6__.encode));\n if (!cancel) ask(newTo);\n return;\n }\n ask(to);\n function ask(to) {\n ok = from !== to && to;\n if (ok && !shouldAsk || !sameName) return go();\n const str = `\"${name}\" already exist. Overwrite?`;\n const cancel = false;\n Dialog.confirm(str, {\n cancel\n }).then(go);\n function go() {\n showLoad();\n files = {\n from,\n to,\n names\n };\n operation(files, async () => {\n await DOM.Storage.remove(from);\n const {\n panel,\n panelPassive\n } = Info;\n if (!Info.isOnePanel) CloudCmd.refresh({\n panel: panelPassive,\n noCurrent: true\n });\n CloudCmd.refresh({\n panel\n });\n });\n }\n }\n}\nfunction checkEmpty(name, operation) {\n if (!operation) throw Error(`${name} could not be empty!`);\n}\nfunction twopack(operation, type) {\n let op;\n let fileFrom;\n let currentName = Info.name;\n const {\n path,\n dirPath\n } = Info;\n const activeFiles = DOM.getActiveFiles();\n const names = DOM.getFilenames(activeFiles);\n checkEmpty('operation', operation);\n if (!names.length) return Dialog.alert.noFiles();\n switch (operation) {\n case 'extract':\n op = extractFn;\n fileFrom = {\n from: path,\n to: dirPath\n };\n currentName = (0,_remove_extension_mjs__WEBPACK_IMPORTED_MODULE_7__.removeExtension)(currentName);\n break;\n case 'pack':\n op = getPacker(type);\n if (names.length > 1) currentName = Info.dir;\n currentName += DOM.getPackerExt(type);\n fileFrom = {\n from: dirPath,\n to: dirPath + currentName,\n names\n };\n break;\n }\n showLoad();\n op(fileFrom, error => {\n !error && CloudCmd.refresh({\n currentName\n });\n });\n}\nasync function prompt(msg, to, names) {\n const n = names.length;\n const [name] = names;\n msg += ' ';\n if (names.length > 1) msg += `${n} file(s)`;else msg += `\"${name}\"`;\n msg += ' to';\n return await Dialog.prompt(msg, to);\n}\nglobalThis.CloudCmd[Name] = {\n init,\n hide,\n show\n};\nasync function loadAll() {\n const {\n prefix\n } = globalThis.CloudCmd;\n const file = `${prefix}/fileop/fileop.js`;\n const [error] = await (0,try_to_catch__WEBPACK_IMPORTED_MODULE_5__.tryToCatch)(load_js__WEBPACK_IMPORTED_MODULE_4__.js, file);\n if (error) Dialog.alert(error.message);\n Loaded = true;\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/operation/index.mjs\n}");
|
|
591
591
|
|
|
592
592
|
/***/ },
|
|
593
593
|
|
|
594
|
-
/***/ "./client/modules/operation/remove-extension.
|
|
595
|
-
|
|
596
|
-
!*** ./client/modules/operation/remove-extension.
|
|
597
|
-
|
|
598
|
-
(
|
|
594
|
+
/***/ "./client/modules/operation/remove-extension.mjs"
|
|
595
|
+
/*!*******************************************************!*\
|
|
596
|
+
!*** ./client/modules/operation/remove-extension.mjs ***!
|
|
597
|
+
\*******************************************************/
|
|
598
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
599
599
|
|
|
600
600
|
"use strict";
|
|
601
|
-
eval("{
|
|
601
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ removeExtension: () => (/* binding */ removeExtension)\n/* harmony export */ });\n/* harmony import */ var _common_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! #common/util */ \"./common/util.mjs\");\n\nconst removeExtension = name => {\n const ext = getExtension(name);\n return name.replace(ext, '');\n};\nfunction getExtension(name) {\n if (name.endsWith('.tar.gz')) return '.tar.gz';\n if (name.endsWith('.tar.bz2')) return '.tar.bz2';\n return (0,_common_util__WEBPACK_IMPORTED_MODULE_0__.getExt)(name);\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/operation/remove-extension.mjs\n}");
|
|
602
602
|
|
|
603
603
|
/***/ },
|
|
604
604
|
|
|
@@ -609,7 +609,7 @@ eval("{\n\nconst {\n getExt\n} = __webpack_require__(/*! #common/util */ \"./co
|
|
|
609
609
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
610
610
|
|
|
611
611
|
"use strict";
|
|
612
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ setListeners: () => (/* binding */ setListeners)\n/* harmony export */ });\n/* harmony import */ var for_each_key__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! for-each-key */ \"./node_modules/for-each-key/lib/for-each-key.js\");\n/* harmony import */ var wraptile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* harmony import */ var
|
|
612
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ setListeners: () => (/* binding */ setListeners)\n/* harmony export */ });\n/* harmony import */ var for_each_key__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! for-each-key */ \"./node_modules/for-each-key/lib/for-each-key.js\");\n/* harmony import */ var wraptile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* harmony import */ var _format_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./format.mjs */ \"./client/modules/operation/format.mjs\");\n/* global DOM */\n\n\n\nconst {\n Dialog,\n Images\n} = DOM;\nconst setListeners = options => emitter => {\n const {\n operation,\n callback,\n noContinue,\n from,\n to\n } = options;\n let done;\n let lastError;\n const onAbort = wraptile__WEBPACK_IMPORTED_MODULE_1__(({\n emitter,\n operation\n }) => {\n emitter.abort();\n const msg = `${operation} aborted`;\n lastError = true;\n Dialog.alert(msg, {\n cancel: false\n });\n });\n const removeListener = emitter.removeListener.bind(emitter);\n const on = emitter.on.bind(emitter);\n const message = (0,_format_mjs__WEBPACK_IMPORTED_MODULE_2__.format)(operation, from, to);\n const progress = Dialog.progress(message);\n progress.catch(onAbort({\n emitter,\n operation\n }));\n let noProgress = true;\n const listeners = {\n progress: value => {\n done = value === 100;\n progress.setProgress(value);\n noProgress = false;\n },\n end: () => {\n Images.hide();\n for_each_key__WEBPACK_IMPORTED_MODULE_0__(removeListener, listeners);\n progress.remove();\n if (lastError || done || noProgress) callback();\n },\n error: async error => {\n lastError = error;\n if (noContinue) {\n listeners.end(error);\n Dialog.alert(error);\n progress.remove();\n return;\n }\n const [cancel] = await Dialog.confirm(`${error}\n Continue?`);\n if (!done && !cancel) return emitter.continue();\n emitter.abort();\n progress.remove();\n }\n };\n for_each_key__WEBPACK_IMPORTED_MODULE_0__(on, listeners);\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/operation/set-listeners.mjs\n}");
|
|
613
613
|
|
|
614
614
|
/***/ },
|
|
615
615
|
|
|
@@ -646,80 +646,80 @@ eval("{\n\n/* global CloudCmd */\n/* global gritty */\nconst {\n tryToCatch\n}
|
|
|
646
646
|
|
|
647
647
|
/***/ },
|
|
648
648
|
|
|
649
|
-
/***/ "./client/modules/upload.
|
|
650
|
-
|
|
651
|
-
!*** ./client/modules/upload.
|
|
652
|
-
|
|
653
|
-
(
|
|
649
|
+
/***/ "./client/modules/upload.mjs"
|
|
650
|
+
/*!***********************************!*\
|
|
651
|
+
!*** ./client/modules/upload.mjs ***!
|
|
652
|
+
\***********************************/
|
|
653
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
654
654
|
|
|
655
655
|
"use strict";
|
|
656
|
-
eval("{/*
|
|
656
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ hide: () => (/* binding */ hide),\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ show: () => (/* binding */ show)\n/* harmony export */ });\n/* harmony import */ var _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* harmony import */ var _dom_files__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! #dom/files */ \"./client/dom/files.mjs\");\n/* harmony import */ var _dom_upload_files__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! #dom/upload-files */ \"./client/dom/upload-files.mjs\");\n/* harmony import */ var _dom_images_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dom/images.mjs */ \"./client/dom/images.mjs\");\n/* global CloudCmd, DOM */\n\n\n\n\nCloudCmd.Upload = {\n init,\n show,\n hide\n};\nasync function init() {\n _dom_images_mjs__WEBPACK_IMPORTED_MODULE_3__.show.load('top');\n await CloudCmd.View();\n}\nasync function show() {\n _dom_images_mjs__WEBPACK_IMPORTED_MODULE_3__.show.load('top');\n const innerHTML = await _dom_files__WEBPACK_IMPORTED_MODULE_1__.get('upload');\n const autoSize = true;\n const el = _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_0__('div', {\n innerHTML\n });\n CloudCmd.View.show(el, {\n autoSize,\n afterShow\n });\n const fontFamily = ['\"Droid Sans Mono\"', '\"Ubuntu Mono\"', '\"Consolas\"', 'monospace'].join(', ');\n _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_0__('style', {\n dataName: 'upload-css',\n innerText: `[data-name=js-upload-file-button] {\n font-family: ${fontFamily};\n font-size: 16px;\n margin: 10px 0 10px 0;\n }`\n });\n}\nfunction hide() {\n CloudCmd.View.hide();\n}\nfunction afterShow() {\n const button = DOM.getByDataName('js-upload-file-button');\n _dom_images_mjs__WEBPACK_IMPORTED_MODULE_3__.hide();\n DOM.Events.add('change', button, ({\n target\n }) => {\n const {\n files\n } = target;\n hide();\n (0,_dom_upload_files__WEBPACK_IMPORTED_MODULE_2__.uploadFiles)(files);\n });\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/upload.mjs\n}");
|
|
657
657
|
|
|
658
658
|
/***/ },
|
|
659
659
|
|
|
660
|
-
/***/ "./client/modules/user-menu/get-user-menu.
|
|
661
|
-
|
|
662
|
-
!*** ./client/modules/user-menu/get-user-menu.
|
|
663
|
-
|
|
664
|
-
(
|
|
660
|
+
/***/ "./client/modules/user-menu/get-user-menu.mjs"
|
|
661
|
+
/*!****************************************************!*\
|
|
662
|
+
!*** ./client/modules/user-menu/get-user-menu.mjs ***!
|
|
663
|
+
\****************************************************/
|
|
664
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
665
665
|
|
|
666
666
|
"use strict";
|
|
667
|
-
eval("{\n\
|
|
667
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getUserMenu: () => (/* binding */ getUserMenu)\n/* harmony export */ });\nconst getUserMenu = menuFn => {\n const module = {};\n const fn = Function('module', menuFn);\n fn(module);\n return module.exports;\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/user-menu/get-user-menu.mjs\n}");
|
|
668
668
|
|
|
669
669
|
/***/ },
|
|
670
670
|
|
|
671
|
-
/***/ "./client/modules/user-menu/index.
|
|
672
|
-
|
|
673
|
-
!*** ./client/modules/user-menu/index.
|
|
674
|
-
|
|
675
|
-
(
|
|
671
|
+
/***/ "./client/modules/user-menu/index.mjs"
|
|
672
|
+
/*!********************************************!*\
|
|
673
|
+
!*** ./client/modules/user-menu/index.mjs ***!
|
|
674
|
+
\********************************************/
|
|
675
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
676
676
|
|
|
677
677
|
"use strict";
|
|
678
|
-
eval("{
|
|
678
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ hide: () => (/* binding */ hide),\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ show: () => (/* binding */ show)\n/* harmony export */ });\n/* harmony import */ var currify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* harmony import */ var wraptile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* harmony import */ var fullstore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n/* harmony import */ var load_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n/* harmony import */ var _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* harmony import */ var try_catch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! try-catch */ \"./node_modules/try-catch/lib/try-catch.js\");\n/* harmony import */ var try_to_catch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* harmony import */ var _babel_code_frame__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/code-frame */ \"./node_modules/@babel/code-frame/lib/index.js\");\n/* harmony import */ var _dom_dialog__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! #dom/dialog */ \"./client/dom/dialog.mjs\");\n/* harmony import */ var _css_user_menu_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../css/user-menu.css */ \"./css/user-menu.css\");\n/* harmony import */ var _dom_images_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../dom/images.mjs */ \"./client/dom/images.mjs\");\n/* harmony import */ var _get_user_menu_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./get-user-menu.mjs */ \"./client/modules/user-menu/get-user-menu.mjs\");\n/* harmony import */ var _navigate_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./navigate.mjs */ \"./client/modules/user-menu/navigate.mjs\");\n/* harmony import */ var _parse_error_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./parse-error.mjs */ \"./client/modules/user-menu/parse-error.mjs\");\n/* harmony import */ var _parse_user_menu_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./parse-user-menu.mjs */ \"./client/modules/user-menu/parse-user-menu.mjs\");\n/* harmony import */ var _run_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./run.mjs */ \"./client/modules/user-menu/run.mjs\");\n/* global CloudCmd, DOM */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst loadCSS = load_js__WEBPACK_IMPORTED_MODULE_3__.css;\nconst sourceStore = (0,fullstore__WEBPACK_IMPORTED_MODULE_2__.fullstore)();\nconst Name = 'UserMenu';\nCloudCmd[Name] = {\n init,\n show,\n hide\n};\nconst {\n Key\n} = CloudCmd;\nasync function init() {\n await Promise.all([loadCSS(`${CloudCmd.prefix}/dist/user-menu.css`), CloudCmd.View()]);\n}\nconst {\n CurrentInfo\n} = DOM;\nasync function show() {\n _dom_images_mjs__WEBPACK_IMPORTED_MODULE_10__.show.load('top');\n const {\n dirPath\n } = CurrentInfo;\n const res = await fetch(`${CloudCmd.prefix}/api/v1/user-menu?dir=${dirPath}`);\n const source = await res.text();\n const [error, userMenu] = (0,try_catch__WEBPACK_IMPORTED_MODULE_5__.tryCatch)(_get_user_menu_mjs__WEBPACK_IMPORTED_MODULE_11__.getUserMenu, source);\n _dom_images_mjs__WEBPACK_IMPORTED_MODULE_10__.hide();\n if (error) return _dom_dialog__WEBPACK_IMPORTED_MODULE_8__.alert(getCodeFrame({\n error,\n source\n }));\n sourceStore(source);\n const {\n names,\n keys,\n items,\n settings\n } = (0,_parse_user_menu_mjs__WEBPACK_IMPORTED_MODULE_14__.parseUserMenu)(userMenu);\n if (settings.run) return (0,_run_mjs__WEBPACK_IMPORTED_MODULE_15__.runSelected)(settings.select, items, runUserMenu);\n const button = _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_4__('button', {\n className: 'cloudcmd-user-menu-button',\n innerText: 'User Menu',\n notAppend: true\n });\n const select = _cloudcmd_create_element__WEBPACK_IMPORTED_MODULE_4__('select', {\n className: 'cloudcmd-user-menu',\n innerHTML: fillTemplate(names),\n notAppend: true,\n size: 10\n });\n button.addEventListener('click', onButtonClick(userMenu, select));\n select.addEventListener('dblclick', onDblClick(userMenu));\n select.addEventListener('keydown', onKeyDown({\n keys,\n userMenu\n }));\n const afterShow = () => select.focus();\n const autoSize = true;\n CloudCmd.View.show([button, select], {\n autoSize,\n afterShow\n });\n}\nfunction fillTemplate(options) {\n const result = [];\n for (const option of options) result.push(`<option>${option}</option>`);\n return result.join('');\n}\nfunction hide() {\n CloudCmd.View.hide();\n}\nconst onDblClick = currify__WEBPACK_IMPORTED_MODULE_0__(async (items, e) => {\n const {\n value\n } = e.target;\n await runUserMenu(items[value]);\n});\nconst onButtonClick = wraptile__WEBPACK_IMPORTED_MODULE_1__(async (items, {\n value\n}) => {\n await runUserMenu(items[value]);\n});\nconst onKeyDown = currify__WEBPACK_IMPORTED_MODULE_0__(async ({\n keys,\n userMenu\n}, e) => {\n const {\n keyCode,\n target\n } = e;\n const keyName = e.key.toUpperCase();\n e.preventDefault();\n e.stopPropagation();\n let value;\n if (keyCode === Key.ESC) return hide();\n if (keyCode === Key.ENTER) value = userMenu[target.value];else if (keys[keyName]) value = keys[keyName];else return (0,_navigate_mjs__WEBPACK_IMPORTED_MODULE_12__.navigate)(target, e);\n await runUserMenu(value);\n});\nconst runUserMenu = async fn => {\n hide();\n const [error] = await (0,try_to_catch__WEBPACK_IMPORTED_MODULE_6__.tryToCatch)(fn, {\n DOM,\n CloudCmd,\n tryToCatch: try_to_catch__WEBPACK_IMPORTED_MODULE_6__.tryToCatch\n });\n if (!error) return;\n const source = sourceStore();\n return _dom_dialog__WEBPACK_IMPORTED_MODULE_8__.alert(getCodeFrame({\n error,\n source\n }));\n};\nfunction getCodeFrame({\n error,\n source\n}) {\n const {\n code\n } = error;\n if (!code || code === 'frame') return error.message;\n const [line, column] = (0,_parse_error_mjs__WEBPACK_IMPORTED_MODULE_13__.parseError)(error);\n const start = {\n line,\n column\n };\n const location = {\n start\n };\n const frame = (0,_babel_code_frame__WEBPACK_IMPORTED_MODULE_7__.codeFrameColumns)(source, location, {\n message: error.message,\n highlightCode: false\n });\n return `<pre>${frame}</pre>`;\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/user-menu/index.mjs\n}");
|
|
679
679
|
|
|
680
680
|
/***/ },
|
|
681
681
|
|
|
682
|
-
/***/ "./client/modules/user-menu/navigate.
|
|
683
|
-
|
|
684
|
-
!*** ./client/modules/user-menu/navigate.
|
|
685
|
-
|
|
686
|
-
(
|
|
682
|
+
/***/ "./client/modules/user-menu/navigate.mjs"
|
|
683
|
+
/*!***********************************************!*\
|
|
684
|
+
!*** ./client/modules/user-menu/navigate.mjs ***!
|
|
685
|
+
\***********************************************/
|
|
686
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
687
687
|
|
|
688
688
|
"use strict";
|
|
689
|
-
eval("{
|
|
689
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ navigate: () => (/* binding */ navigate)\n/* harmony export */ });\n/* harmony import */ var fullstore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n/* harmony import */ var _key_key_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../key/key.mjs */ \"./client/key/key.mjs\");\n\n\nconst store = (0,fullstore__WEBPACK_IMPORTED_MODULE_0__.fullstore)(1);\nconst isDigit = a => /^\\d+$/.test(a);\nconst navigate = (el, {\n key,\n keyCode\n}) => {\n if (isDigit(key)) store(Number(key));\n if (keyCode === _key_key_mjs__WEBPACK_IMPORTED_MODULE_1__.DOWN || keyCode === _key_key_mjs__WEBPACK_IMPORTED_MODULE_1__.J) {\n const count = store();\n store(1);\n return down(el, count);\n }\n if (keyCode === _key_key_mjs__WEBPACK_IMPORTED_MODULE_1__.UP || keyCode === _key_key_mjs__WEBPACK_IMPORTED_MODULE_1__.K) {\n const count = store();\n store(1);\n return up(el, count);\n }\n};\nfunction down(el, count) {\n const {\n length\n } = el;\n if (el.selectedIndex === length - 1) el.selectedIndex = 0;else el.selectedIndex += count;\n if (el.selectedIndex < 0) el.selectedIndex = length - 1;\n}\nfunction up(el, count) {\n const {\n length\n } = el;\n if (!el.selectedIndex) el.selectedIndex = length - 1;else el.selectedIndex -= count;\n if (el.selectedIndex < 0) el.selectedIndex = 0;\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/user-menu/navigate.mjs\n}");
|
|
690
690
|
|
|
691
691
|
/***/ },
|
|
692
692
|
|
|
693
|
-
/***/ "./client/modules/user-menu/parse-error.
|
|
694
|
-
|
|
695
|
-
!*** ./client/modules/user-menu/parse-error.
|
|
696
|
-
|
|
697
|
-
(
|
|
693
|
+
/***/ "./client/modules/user-menu/parse-error.mjs"
|
|
694
|
+
/*!**************************************************!*\
|
|
695
|
+
!*** ./client/modules/user-menu/parse-error.mjs ***!
|
|
696
|
+
\**************************************************/
|
|
697
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
698
698
|
|
|
699
699
|
"use strict";
|
|
700
|
-
eval("{\n\nconst isNumber = a => typeof a === 'number';\
|
|
700
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ parseError: () => (/* binding */ parseError)\n/* harmony export */ });\nconst isNumber = a => typeof a === 'number';\nconst parseError = error => {\n const {\n lineNumber,\n columnNumber\n } = error;\n\n // thank you firefox\n if (isNumber(lineNumber) && isNumber(columnNumber)) return [lineNumber, columnNumber];\n const before = error.stack.indexOf('>');\n const str = error.stack.slice(before + 1);\n const after = str.indexOf(')');\n const newStr = str.slice(1, after);\n const [line, column] = newStr.split(':');\n return [Number(line), Number(column)];\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/user-menu/parse-error.mjs\n}");
|
|
701
701
|
|
|
702
702
|
/***/ },
|
|
703
703
|
|
|
704
|
-
/***/ "./client/modules/user-menu/parse-user-menu.
|
|
705
|
-
|
|
706
|
-
!*** ./client/modules/user-menu/parse-user-menu.
|
|
707
|
-
|
|
708
|
-
(
|
|
704
|
+
/***/ "./client/modules/user-menu/parse-user-menu.mjs"
|
|
705
|
+
/*!******************************************************!*\
|
|
706
|
+
!*** ./client/modules/user-menu/parse-user-menu.mjs ***!
|
|
707
|
+
\******************************************************/
|
|
708
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
709
709
|
|
|
710
710
|
"use strict";
|
|
711
|
-
eval("{\n\nconst {\n entries,\n assign\n} = Object;\
|
|
711
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ parseUserMenu: () => (/* binding */ parseUserMenu)\n/* harmony export */ });\nconst {\n entries,\n assign\n} = Object;\nconst parseUserMenu = userMenu => {\n const names = [];\n const keys = {};\n const items = {};\n const settings = {};\n for (const [str, fn] of entries(userMenu)) {\n if (str === '__settings') {\n assign(settings, userMenu[str]);\n continue;\n }\n if (str.startsWith('_')) continue;\n names.push(str);\n const [key, name] = str.split(' - ');\n keys[key] = fn;\n items[name] = fn;\n }\n return {\n names,\n keys,\n items,\n settings\n };\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/user-menu/parse-user-menu.mjs\n}");
|
|
712
712
|
|
|
713
713
|
/***/ },
|
|
714
714
|
|
|
715
|
-
/***/ "./client/modules/user-menu/run.
|
|
716
|
-
|
|
717
|
-
!*** ./client/modules/user-menu/run.
|
|
718
|
-
|
|
719
|
-
(
|
|
715
|
+
/***/ "./client/modules/user-menu/run.mjs"
|
|
716
|
+
/*!******************************************!*\
|
|
717
|
+
!*** ./client/modules/user-menu/run.mjs ***!
|
|
718
|
+
\******************************************/
|
|
719
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
720
720
|
|
|
721
721
|
"use strict";
|
|
722
|
-
eval("{\n\
|
|
722
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ runSelected: () => (/* binding */ runSelected)\n/* harmony export */ });\nconst runSelected = async (selectedItems, items, runUserMenu) => {\n for (const selected of selectedItems) {\n await runUserMenu(items[selected]);\n }\n};\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/user-menu/run.mjs\n}");
|
|
723
723
|
|
|
724
724
|
/***/ },
|
|
725
725
|
|
|
@@ -873,7 +873,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-ext
|
|
|
873
873
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
874
874
|
|
|
875
875
|
"use strict";
|
|
876
|
-
eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n\nvar picocolors = __webpack_require__(/*! picocolors */ \"./node_modules/picocolors/picocolors.browser.js\");\nvar jsTokens = __webpack_require__(/*! js-tokens */ \"./node_modules/js-tokens/index.js\");\nvar helperValidatorIdentifier = __webpack_require__(/*! @babel/helper-validator-identifier */ \"./node_modules/@babel/helper-validator-identifier/lib/index.js\");\n\nfunction isColorSupported() {\n return (typeof process === \"object\" && (process.env.FORCE_COLOR === \"0\" || process.env.FORCE_COLOR === \"false\") ? false : picocolors.isColorSupported\n );\n}\nconst compose = (f, g) => v => f(g(v));\nfunction buildDefs(colors) {\n return {\n keyword: colors.cyan,\n capitalized: colors.yellow,\n jsxIdentifier: colors.yellow,\n punctuator: colors.yellow,\n number: colors.magenta,\n string: colors.green,\n regex: colors.magenta,\n comment: colors.gray,\n invalid: compose(compose(colors.white, colors.bgRed), colors.bold),\n gutter: colors.gray,\n marker: compose(colors.red, colors.bold),\n message: compose(colors.red, colors.bold),\n reset: colors.reset\n };\n}\nconst defsOn = buildDefs(picocolors.createColors(true));\nconst defsOff = buildDefs(picocolors.createColors(false));\nfunction getDefs(enabled) {\n return enabled ? defsOn : defsOff;\n}\n\nconst sometimesKeywords = new Set([\"as\", \"async\", \"from\", \"get\", \"of\", \"set\"]);\nconst NEWLINE$1 = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nconst BRACKET = /^[()[\\]{}]$/;\nlet tokenize;\nconst JSX_TAG = /^[a-z][\\w-]*$/i;\nconst getTokenType = function (token, offset, text) {\n if (token.type === \"name\") {\n const tokenValue = token.value;\n if (helperValidatorIdentifier.isKeyword(tokenValue) || helperValidatorIdentifier.isStrictReservedWord(tokenValue, true) || sometimesKeywords.has(tokenValue)) {\n return \"keyword\";\n }\n if (JSX_TAG.test(tokenValue) && (text[offset - 1] === \"<\" || text.slice(offset - 2, offset) === \"</\")) {\n return \"jsxIdentifier\";\n }\n const firstChar = String.fromCodePoint(tokenValue.codePointAt(0));\n if (firstChar !== firstChar.toLowerCase()) {\n return \"capitalized\";\n }\n }\n if (token.type === \"punctuator\" && BRACKET.test(token.value)) {\n return \"bracket\";\n }\n if (token.type === \"invalid\" && (token.value === \"@\" || token.value === \"#\")) {\n return \"punctuator\";\n }\n return token.type;\n};\ntokenize = function* (text) {\n let match;\n while (match = jsTokens.default.exec(text)) {\n const token = jsTokens.matchToToken(match);\n yield {\n type: getTokenType(token, match.index, text),\n value: token.value\n };\n }\n};\nfunction highlight(text) {\n if (text === \"\") return \"\";\n const defs = getDefs(true);\n let highlighted = \"\";\n for (const {\n type,\n value\n } of tokenize(text)) {\n if (type in defs) {\n highlighted += value.split(NEWLINE$1).map(str => defs[type](str)).join(\"\\n\");\n } else {\n highlighted += value;\n }\n }\n return highlighted;\n}\n\nlet deprecationWarningShown = false;\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nfunction getMarkerLines(loc, source, opts) {\n const startLoc = Object.assign({\n column: 0,\n line: -1\n }, loc.start);\n const endLoc = Object.assign({}, startLoc, loc.end);\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n if (startLine === -1) {\n start = 0;\n }\n if (endLine === -1) {\n end = source.length;\n }\n const lineDiff = endLine - startLine;\n const markerLines = {};\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n return {\n start,\n end,\n markerLines\n };\n}\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;\n const defs = getDefs(shouldHighlight);\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end).length;\n const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;\n let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", defs.gutter(gutter.replace(/\\d/g, \" \")), \" \", markerSpacing, defs.marker(\"^\").repeat(numberOfMarkers)].join(\"\");\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + defs.message(opts.message);\n }\n }\n return [defs.marker(\">\"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : \"\", markerLine].join(\"\");\n } else {\n return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n }).join(\"\\n\");\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n if (shouldHighlight) {\n return defs.reset(frame);\n } else {\n return frame;\n }\n}\nfunction index (rawLines, lineNumber, colNumber, opts = {}) {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n const message = \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n if (process.emitWarning) {\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n colNumber = Math.max(colNumber, 0);\n const location = {\n start: {\n column: colNumber,\n line: lineNumber\n }\n };\n return codeFrameColumns(rawLines, location, opts);\n}\n\nexports.codeFrameColumns = codeFrameColumns;\nexports[\"default\"] = index;\nexports.highlight = highlight;\n//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@babel/code-frame/lib/index.js\n}");
|
|
876
|
+
eval("{/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n\nvar picocolors = __webpack_require__(/*! picocolors */ \"./node_modules/picocolors/picocolors.browser.js\");\nvar jsTokens = __webpack_require__(/*! js-tokens */ \"./node_modules/js-tokens/index.js\");\nvar helperValidatorIdentifier = __webpack_require__(/*! @babel/helper-validator-identifier */ \"./node_modules/@babel/helper-validator-identifier/lib/index.js\");\n\nfunction isColorSupported() {\n return (typeof process === \"object\" && (process.env.FORCE_COLOR === \"0\" || process.env.FORCE_COLOR === \"false\") ? false : picocolors.isColorSupported\n );\n}\nconst compose = (f, g) => v => f(g(v));\nfunction buildDefs(colors) {\n return {\n keyword: colors.cyan,\n capitalized: colors.yellow,\n jsxIdentifier: colors.yellow,\n punctuator: colors.yellow,\n number: colors.magenta,\n string: colors.green,\n regex: colors.magenta,\n comment: colors.gray,\n invalid: compose(compose(colors.white, colors.bgRed), colors.bold),\n gutter: colors.gray,\n marker: compose(colors.red, colors.bold),\n message: compose(colors.red, colors.bold),\n reset: colors.reset\n };\n}\nconst defsOn = buildDefs(picocolors.createColors(true));\nconst defsOff = buildDefs(picocolors.createColors(false));\nfunction getDefs(enabled) {\n return enabled ? defsOn : defsOff;\n}\n\nconst sometimesKeywords = new Set([\"as\", \"async\", \"from\", \"get\", \"of\", \"set\"]);\nconst NEWLINE$1 = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nconst BRACKET = /^[()[\\]{}]$/;\nlet tokenize;\nconst JSX_TAG = /^[a-z][\\w-]*$/i;\nconst getTokenType = function (token, offset, text) {\n if (token.type === \"name\") {\n const tokenValue = token.value;\n if (helperValidatorIdentifier.isKeyword(tokenValue) || helperValidatorIdentifier.isStrictReservedWord(tokenValue, true) || sometimesKeywords.has(tokenValue)) {\n return \"keyword\";\n }\n if (JSX_TAG.test(tokenValue) && (text[offset - 1] === \"<\" || text.slice(offset - 2, offset) === \"</\")) {\n return \"jsxIdentifier\";\n }\n const firstChar = String.fromCodePoint(tokenValue.codePointAt(0));\n if (firstChar !== firstChar.toLowerCase()) {\n return \"capitalized\";\n }\n }\n if (token.type === \"punctuator\" && BRACKET.test(token.value)) {\n return \"bracket\";\n }\n if (token.type === \"invalid\" && (token.value === \"@\" || token.value === \"#\")) {\n return \"punctuator\";\n }\n return token.type;\n};\ntokenize = function* (text) {\n let match;\n while (match = jsTokens.default.exec(text)) {\n const token = jsTokens.matchToToken(match);\n yield {\n type: getTokenType(token, match.index, text),\n value: token.value\n };\n }\n};\nfunction highlight(text) {\n if (text === \"\") return \"\";\n const defs = getDefs(true);\n let highlighted = \"\";\n for (const {\n type,\n value\n } of tokenize(text)) {\n if (type in defs) {\n highlighted += value.split(NEWLINE$1).map(str => defs[type](str)).join(\"\\n\");\n } else {\n highlighted += value;\n }\n }\n return highlighted;\n}\n\nlet deprecationWarningShown = false;\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nfunction getMarkerLines(loc, source, opts) {\n const startLoc = Object.assign({\n column: 0,\n line: -1\n }, loc.start);\n const endLoc = Object.assign({}, startLoc, loc.end);\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n if (startLine === -1) {\n start = 0;\n }\n if (endLine === -1) {\n end = source.length;\n }\n const lineDiff = endLine - startLine;\n const markerLines = {};\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n return {\n start,\n end,\n markerLines\n };\n}\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;\n const defs = getDefs(shouldHighlight);\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end).length;\n const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;\n let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", defs.gutter(gutter.replace(/\\d/g, \" \")), \" \", markerSpacing, defs.marker(\"^\").repeat(numberOfMarkers)].join(\"\");\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + defs.message(opts.message);\n }\n }\n return [defs.marker(\">\"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : \"\", markerLine].join(\"\");\n } else {\n return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n }).join(\"\\n\");\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n if (shouldHighlight) {\n return defs.reset(frame);\n } else {\n return frame;\n }\n}\nfunction index (rawLines, lineNumber, colNumber, opts = {}) {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n const message = \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n if (process.emitWarning) {\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n colNumber = Math.max(colNumber, 0);\n const location = {\n start: {\n column: colNumber,\n line: lineNumber\n }\n };\n return codeFrameColumns(rawLines, location, opts);\n}\n\nexports.codeFrameColumns = codeFrameColumns;\nexports[\"default\"] = index;\nexports.highlight = highlight;\n//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@babel/code-frame/lib/index.js\n}");
|
|
877
877
|
|
|
878
878
|
/***/ },
|
|
879
879
|
|
|
@@ -1031,6 +1031,105 @@ eval("{\n\nmodule.exports = (fn, ...a) => {\n check(fn);\n \n return (.
|
|
|
1031
1031
|
|
|
1032
1032
|
/***/ },
|
|
1033
1033
|
|
|
1034
|
+
/***/ "./node_modules/available-typed-arrays/index.js"
|
|
1035
|
+
/*!******************************************************!*\
|
|
1036
|
+
!*** ./node_modules/available-typed-arrays/index.js ***!
|
|
1037
|
+
\******************************************************/
|
|
1038
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1039
|
+
|
|
1040
|
+
"use strict";
|
|
1041
|
+
eval("{\n\nvar possibleNames = __webpack_require__(/*! possible-typed-array-names */ \"./node_modules/possible-typed-array-names/index.js\");\n\nvar g = typeof globalThis === 'undefined' ? globalThis : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/available-typed-arrays/index.js\n}");
|
|
1042
|
+
|
|
1043
|
+
/***/ },
|
|
1044
|
+
|
|
1045
|
+
/***/ "./node_modules/call-bind-apply-helpers/actualApply.js"
|
|
1046
|
+
/*!*************************************************************!*\
|
|
1047
|
+
!*** ./node_modules/call-bind-apply-helpers/actualApply.js ***!
|
|
1048
|
+
\*************************************************************/
|
|
1049
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1050
|
+
|
|
1051
|
+
"use strict";
|
|
1052
|
+
eval("{\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\n\nvar $apply = __webpack_require__(/*! ./functionApply */ \"./node_modules/call-bind-apply-helpers/functionApply.js\");\nvar $call = __webpack_require__(/*! ./functionCall */ \"./node_modules/call-bind-apply-helpers/functionCall.js\");\nvar $reflectApply = __webpack_require__(/*! ./reflectApply */ \"./node_modules/call-bind-apply-helpers/reflectApply.js\");\n\n/** @type {import('./actualApply')} */\nmodule.exports = $reflectApply || bind.call($call, $apply);\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/call-bind-apply-helpers/actualApply.js\n}");
|
|
1053
|
+
|
|
1054
|
+
/***/ },
|
|
1055
|
+
|
|
1056
|
+
/***/ "./node_modules/call-bind-apply-helpers/applyBind.js"
|
|
1057
|
+
/*!***********************************************************!*\
|
|
1058
|
+
!*** ./node_modules/call-bind-apply-helpers/applyBind.js ***!
|
|
1059
|
+
\***********************************************************/
|
|
1060
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1061
|
+
|
|
1062
|
+
"use strict";
|
|
1063
|
+
eval("{\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar $apply = __webpack_require__(/*! ./functionApply */ \"./node_modules/call-bind-apply-helpers/functionApply.js\");\nvar actualApply = __webpack_require__(/*! ./actualApply */ \"./node_modules/call-bind-apply-helpers/actualApply.js\");\n\n/** @type {import('./applyBind')} */\nmodule.exports = function applyBind() {\n\treturn actualApply(bind, $apply, arguments);\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/call-bind-apply-helpers/applyBind.js\n}");
|
|
1064
|
+
|
|
1065
|
+
/***/ },
|
|
1066
|
+
|
|
1067
|
+
/***/ "./node_modules/call-bind-apply-helpers/functionApply.js"
|
|
1068
|
+
/*!***************************************************************!*\
|
|
1069
|
+
!*** ./node_modules/call-bind-apply-helpers/functionApply.js ***!
|
|
1070
|
+
\***************************************************************/
|
|
1071
|
+
(module) {
|
|
1072
|
+
|
|
1073
|
+
"use strict";
|
|
1074
|
+
eval("{\n\n/** @type {import('./functionApply')} */\nmodule.exports = Function.prototype.apply;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/call-bind-apply-helpers/functionApply.js\n}");
|
|
1075
|
+
|
|
1076
|
+
/***/ },
|
|
1077
|
+
|
|
1078
|
+
/***/ "./node_modules/call-bind-apply-helpers/functionCall.js"
|
|
1079
|
+
/*!**************************************************************!*\
|
|
1080
|
+
!*** ./node_modules/call-bind-apply-helpers/functionCall.js ***!
|
|
1081
|
+
\**************************************************************/
|
|
1082
|
+
(module) {
|
|
1083
|
+
|
|
1084
|
+
"use strict";
|
|
1085
|
+
eval("{\n\n/** @type {import('./functionCall')} */\nmodule.exports = Function.prototype.call;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/call-bind-apply-helpers/functionCall.js\n}");
|
|
1086
|
+
|
|
1087
|
+
/***/ },
|
|
1088
|
+
|
|
1089
|
+
/***/ "./node_modules/call-bind-apply-helpers/index.js"
|
|
1090
|
+
/*!*******************************************************!*\
|
|
1091
|
+
!*** ./node_modules/call-bind-apply-helpers/index.js ***!
|
|
1092
|
+
\*******************************************************/
|
|
1093
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1094
|
+
|
|
1095
|
+
"use strict";
|
|
1096
|
+
eval("{\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar $TypeError = __webpack_require__(/*! es-errors/type */ \"./node_modules/es-errors/type.js\");\n\nvar $call = __webpack_require__(/*! ./functionCall */ \"./node_modules/call-bind-apply-helpers/functionCall.js\");\nvar $actualApply = __webpack_require__(/*! ./actualApply */ \"./node_modules/call-bind-apply-helpers/actualApply.js\");\n\n/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */\nmodule.exports = function callBindBasic(args) {\n\tif (args.length < 1 || typeof args[0] !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\treturn $actualApply(bind, $call, args);\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/call-bind-apply-helpers/index.js\n}");
|
|
1097
|
+
|
|
1098
|
+
/***/ },
|
|
1099
|
+
|
|
1100
|
+
/***/ "./node_modules/call-bind-apply-helpers/reflectApply.js"
|
|
1101
|
+
/*!**************************************************************!*\
|
|
1102
|
+
!*** ./node_modules/call-bind-apply-helpers/reflectApply.js ***!
|
|
1103
|
+
\**************************************************************/
|
|
1104
|
+
(module) {
|
|
1105
|
+
|
|
1106
|
+
"use strict";
|
|
1107
|
+
eval("{\n\n/** @type {import('./reflectApply')} */\nmodule.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/call-bind-apply-helpers/reflectApply.js\n}");
|
|
1108
|
+
|
|
1109
|
+
/***/ },
|
|
1110
|
+
|
|
1111
|
+
/***/ "./node_modules/call-bind/index.js"
|
|
1112
|
+
/*!*****************************************!*\
|
|
1113
|
+
!*** ./node_modules/call-bind/index.js ***!
|
|
1114
|
+
\*****************************************/
|
|
1115
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1116
|
+
|
|
1117
|
+
"use strict";
|
|
1118
|
+
eval("{\n\nvar setFunctionLength = __webpack_require__(/*! set-function-length */ \"./node_modules/set-function-length/index.js\");\n\nvar $defineProperty = __webpack_require__(/*! es-define-property */ \"./node_modules/es-define-property/index.js\");\n\nvar callBindBasic = __webpack_require__(/*! call-bind-apply-helpers */ \"./node_modules/call-bind-apply-helpers/index.js\");\nvar applyBind = __webpack_require__(/*! call-bind-apply-helpers/applyBind */ \"./node_modules/call-bind-apply-helpers/applyBind.js\");\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = callBindBasic(arguments);\n\tvar adjustedLength = originalFunction.length - (arguments.length - 1);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + (adjustedLength > 0 ? adjustedLength : 0),\n\t\ttrue\n\t);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/call-bind/index.js\n}");
|
|
1119
|
+
|
|
1120
|
+
/***/ },
|
|
1121
|
+
|
|
1122
|
+
/***/ "./node_modules/call-bound/index.js"
|
|
1123
|
+
/*!******************************************!*\
|
|
1124
|
+
!*** ./node_modules/call-bound/index.js ***!
|
|
1125
|
+
\******************************************/
|
|
1126
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1127
|
+
|
|
1128
|
+
"use strict";
|
|
1129
|
+
eval("{\n\nvar GetIntrinsic = __webpack_require__(/*! get-intrinsic */ \"./node_modules/get-intrinsic/index.js\");\n\nvar callBindBasic = __webpack_require__(/*! call-bind-apply-helpers */ \"./node_modules/call-bind-apply-helpers/index.js\");\n\n/** @type {(thisArg: string, searchString: string, position?: number) => number} */\nvar $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);\n\n/** @type {import('.')} */\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\t/* eslint no-extra-parens: 0 */\n\n\tvar intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBindBasic(/** @type {const} */ ([intrinsic]));\n\t}\n\treturn intrinsic;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/call-bound/index.js\n}");
|
|
1130
|
+
|
|
1131
|
+
/***/ },
|
|
1132
|
+
|
|
1034
1133
|
/***/ "./node_modules/compute-scroll-into-view/dist/index.cjs"
|
|
1035
1134
|
/*!**************************************************************!*\
|
|
1036
1135
|
!*** ./node_modules/compute-scroll-into-view/dist/index.cjs ***!
|
|
@@ -1053,6 +1152,17 @@ eval("{\n\nconst f = (fn) => [\n /*eslint no-unused-vars: 0*/\n function (
|
|
|
1053
1152
|
|
|
1054
1153
|
/***/ },
|
|
1055
1154
|
|
|
1155
|
+
/***/ "./node_modules/define-data-property/index.js"
|
|
1156
|
+
/*!****************************************************!*\
|
|
1157
|
+
!*** ./node_modules/define-data-property/index.js ***!
|
|
1158
|
+
\****************************************************/
|
|
1159
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1160
|
+
|
|
1161
|
+
"use strict";
|
|
1162
|
+
eval("{\n\nvar $defineProperty = __webpack_require__(/*! es-define-property */ \"./node_modules/es-define-property/index.js\");\n\nvar $SyntaxError = __webpack_require__(/*! es-errors/syntax */ \"./node_modules/es-errors/syntax.js\");\nvar $TypeError = __webpack_require__(/*! es-errors/type */ \"./node_modules/es-errors/type.js\");\n\nvar gopd = __webpack_require__(/*! gopd */ \"./node_modules/gopd/index.js\");\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor<unknown>} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/define-data-property/index.js\n}");
|
|
1163
|
+
|
|
1164
|
+
/***/ },
|
|
1165
|
+
|
|
1056
1166
|
/***/ "./node_modules/domfs-findit/legacy/findit.js"
|
|
1057
1167
|
/*!****************************************************!*\
|
|
1058
1168
|
!*** ./node_modules/domfs-findit/legacy/findit.js ***!
|
|
@@ -1095,6 +1205,17 @@ eval("{/*! DOMTokenlist shim | Copyright 2016 Jonathan Wilsson and Bogdan Chadki
|
|
|
1095
1205
|
|
|
1096
1206
|
/***/ },
|
|
1097
1207
|
|
|
1208
|
+
/***/ "./node_modules/dunder-proto/get.js"
|
|
1209
|
+
/*!******************************************!*\
|
|
1210
|
+
!*** ./node_modules/dunder-proto/get.js ***!
|
|
1211
|
+
\******************************************/
|
|
1212
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1213
|
+
|
|
1214
|
+
"use strict";
|
|
1215
|
+
eval("{\n\nvar callBind = __webpack_require__(/*! call-bind-apply-helpers */ \"./node_modules/call-bind-apply-helpers/index.js\");\nvar gOPD = __webpack_require__(/*! gopd */ \"./node_modules/gopd/index.js\");\n\nvar hasProtoAccessor;\ntry {\n\t// eslint-disable-next-line no-extra-parens, no-proto\n\thasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;\n} catch (e) {\n\tif (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {\n\t\tthrow e;\n\t}\n}\n\n// eslint-disable-next-line no-extra-parens\nvar desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));\n\nvar $Object = Object;\nvar $getPrototypeOf = $Object.getPrototypeOf;\n\n/** @type {import('./get')} */\nmodule.exports = desc && typeof desc.get === 'function'\n\t? callBind([desc.get])\n\t: typeof $getPrototypeOf === 'function'\n\t\t? /** @type {import('./get')} */ function getDunder(value) {\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\treturn $getPrototypeOf(value == null ? value : $Object(value));\n\t\t}\n\t\t: false;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/dunder-proto/get.js\n}");
|
|
1216
|
+
|
|
1217
|
+
/***/ },
|
|
1218
|
+
|
|
1098
1219
|
/***/ "./node_modules/emitify/lib/emitify.js"
|
|
1099
1220
|
/*!*********************************************!*\
|
|
1100
1221
|
!*** ./node_modules/emitify/lib/emitify.js ***!
|
|
@@ -1106,6 +1227,105 @@ eval("{\n\nmodule.exports = Emitify;\n\nfunction Emitify() {\n if (!(this ins
|
|
|
1106
1227
|
|
|
1107
1228
|
/***/ },
|
|
1108
1229
|
|
|
1230
|
+
/***/ "./node_modules/es-define-property/index.js"
|
|
1231
|
+
/*!**************************************************!*\
|
|
1232
|
+
!*** ./node_modules/es-define-property/index.js ***!
|
|
1233
|
+
\**************************************************/
|
|
1234
|
+
(module) {
|
|
1235
|
+
|
|
1236
|
+
"use strict";
|
|
1237
|
+
eval("{\n\n/** @type {import('.')} */\nvar $defineProperty = Object.defineProperty || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es-define-property/index.js\n}");
|
|
1238
|
+
|
|
1239
|
+
/***/ },
|
|
1240
|
+
|
|
1241
|
+
/***/ "./node_modules/es-errors/eval.js"
|
|
1242
|
+
/*!****************************************!*\
|
|
1243
|
+
!*** ./node_modules/es-errors/eval.js ***!
|
|
1244
|
+
\****************************************/
|
|
1245
|
+
(module) {
|
|
1246
|
+
|
|
1247
|
+
"use strict";
|
|
1248
|
+
eval("{\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es-errors/eval.js\n}");
|
|
1249
|
+
|
|
1250
|
+
/***/ },
|
|
1251
|
+
|
|
1252
|
+
/***/ "./node_modules/es-errors/index.js"
|
|
1253
|
+
/*!*****************************************!*\
|
|
1254
|
+
!*** ./node_modules/es-errors/index.js ***!
|
|
1255
|
+
\*****************************************/
|
|
1256
|
+
(module) {
|
|
1257
|
+
|
|
1258
|
+
"use strict";
|
|
1259
|
+
eval("{\n\n/** @type {import('.')} */\nmodule.exports = Error;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es-errors/index.js\n}");
|
|
1260
|
+
|
|
1261
|
+
/***/ },
|
|
1262
|
+
|
|
1263
|
+
/***/ "./node_modules/es-errors/range.js"
|
|
1264
|
+
/*!*****************************************!*\
|
|
1265
|
+
!*** ./node_modules/es-errors/range.js ***!
|
|
1266
|
+
\*****************************************/
|
|
1267
|
+
(module) {
|
|
1268
|
+
|
|
1269
|
+
"use strict";
|
|
1270
|
+
eval("{\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es-errors/range.js\n}");
|
|
1271
|
+
|
|
1272
|
+
/***/ },
|
|
1273
|
+
|
|
1274
|
+
/***/ "./node_modules/es-errors/ref.js"
|
|
1275
|
+
/*!***************************************!*\
|
|
1276
|
+
!*** ./node_modules/es-errors/ref.js ***!
|
|
1277
|
+
\***************************************/
|
|
1278
|
+
(module) {
|
|
1279
|
+
|
|
1280
|
+
"use strict";
|
|
1281
|
+
eval("{\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es-errors/ref.js\n}");
|
|
1282
|
+
|
|
1283
|
+
/***/ },
|
|
1284
|
+
|
|
1285
|
+
/***/ "./node_modules/es-errors/syntax.js"
|
|
1286
|
+
/*!******************************************!*\
|
|
1287
|
+
!*** ./node_modules/es-errors/syntax.js ***!
|
|
1288
|
+
\******************************************/
|
|
1289
|
+
(module) {
|
|
1290
|
+
|
|
1291
|
+
"use strict";
|
|
1292
|
+
eval("{\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es-errors/syntax.js\n}");
|
|
1293
|
+
|
|
1294
|
+
/***/ },
|
|
1295
|
+
|
|
1296
|
+
/***/ "./node_modules/es-errors/type.js"
|
|
1297
|
+
/*!****************************************!*\
|
|
1298
|
+
!*** ./node_modules/es-errors/type.js ***!
|
|
1299
|
+
\****************************************/
|
|
1300
|
+
(module) {
|
|
1301
|
+
|
|
1302
|
+
"use strict";
|
|
1303
|
+
eval("{\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es-errors/type.js\n}");
|
|
1304
|
+
|
|
1305
|
+
/***/ },
|
|
1306
|
+
|
|
1307
|
+
/***/ "./node_modules/es-errors/uri.js"
|
|
1308
|
+
/*!***************************************!*\
|
|
1309
|
+
!*** ./node_modules/es-errors/uri.js ***!
|
|
1310
|
+
\***************************************/
|
|
1311
|
+
(module) {
|
|
1312
|
+
|
|
1313
|
+
"use strict";
|
|
1314
|
+
eval("{\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es-errors/uri.js\n}");
|
|
1315
|
+
|
|
1316
|
+
/***/ },
|
|
1317
|
+
|
|
1318
|
+
/***/ "./node_modules/es-object-atoms/index.js"
|
|
1319
|
+
/*!***********************************************!*\
|
|
1320
|
+
!*** ./node_modules/es-object-atoms/index.js ***!
|
|
1321
|
+
\***********************************************/
|
|
1322
|
+
(module) {
|
|
1323
|
+
|
|
1324
|
+
"use strict";
|
|
1325
|
+
eval("{\n\n/** @type {import('.')} */\nmodule.exports = Object;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es-object-atoms/index.js\n}");
|
|
1326
|
+
|
|
1327
|
+
/***/ },
|
|
1328
|
+
|
|
1109
1329
|
/***/ "./node_modules/es6-promisify/dist/promisify.js"
|
|
1110
1330
|
/*!******************************************************!*\
|
|
1111
1331
|
!*** ./node_modules/es6-promisify/dist/promisify.js ***!
|
|
@@ -1149,6 +1369,17 @@ eval("{\n\nconst setValue = (fn, obj) => (key) => fn(key, obj[key]);\n\nmodule.e
|
|
|
1149
1369
|
|
|
1150
1370
|
/***/ },
|
|
1151
1371
|
|
|
1372
|
+
/***/ "./node_modules/for-each/index.js"
|
|
1373
|
+
/*!****************************************!*\
|
|
1374
|
+
!*** ./node_modules/for-each/index.js ***!
|
|
1375
|
+
\****************************************/
|
|
1376
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1377
|
+
|
|
1378
|
+
"use strict";
|
|
1379
|
+
eval("{\n\nvar isCallable = __webpack_require__(/*! is-callable */ \"./node_modules/is-callable/index.js\");\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/** @type {<This, A extends readonly unknown[]>(arr: A, iterator: (this: This | void, value: A[number], index: number, arr: A) => void, receiver: This | undefined) => void} */\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\n/** @type {<This, S extends string>(string: S, iterator: (this: This | void, value: S[number], index: number, string: S) => void, receiver: This | undefined) => void} */\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\n/** @type {<This, O>(obj: O, iterator: (this: This | void, value: O[keyof O], index: keyof O, obj: O) => void, receiver: This | undefined) => void} */\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\n/** @type {(x: unknown) => x is readonly unknown[]} */\nfunction isArray(x) {\n return toStr.call(x) === '[object Array]';\n}\n\n/** @type {import('.')._internal} */\nmodule.exports = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (isArray(list)) {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/for-each/index.js\n}");
|
|
1380
|
+
|
|
1381
|
+
/***/ },
|
|
1382
|
+
|
|
1152
1383
|
/***/ "./node_modules/format-io/lib/format.js"
|
|
1153
1384
|
/*!**********************************************!*\
|
|
1154
1385
|
!*** ./node_modules/format-io/lib/format.js ***!
|
|
@@ -1192,6 +1423,160 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
1192
1423
|
|
|
1193
1424
|
/***/ },
|
|
1194
1425
|
|
|
1426
|
+
/***/ "./node_modules/function-bind/implementation.js"
|
|
1427
|
+
/*!******************************************************!*\
|
|
1428
|
+
!*** ./node_modules/function-bind/implementation.js ***!
|
|
1429
|
+
\******************************************************/
|
|
1430
|
+
(module) {
|
|
1431
|
+
|
|
1432
|
+
"use strict";
|
|
1433
|
+
eval("{\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/function-bind/implementation.js\n}");
|
|
1434
|
+
|
|
1435
|
+
/***/ },
|
|
1436
|
+
|
|
1437
|
+
/***/ "./node_modules/function-bind/index.js"
|
|
1438
|
+
/*!*********************************************!*\
|
|
1439
|
+
!*** ./node_modules/function-bind/index.js ***!
|
|
1440
|
+
\*********************************************/
|
|
1441
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1442
|
+
|
|
1443
|
+
"use strict";
|
|
1444
|
+
eval("{\n\nvar implementation = __webpack_require__(/*! ./implementation */ \"./node_modules/function-bind/implementation.js\");\n\nmodule.exports = Function.prototype.bind || implementation;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/function-bind/index.js\n}");
|
|
1445
|
+
|
|
1446
|
+
/***/ },
|
|
1447
|
+
|
|
1448
|
+
/***/ "./node_modules/generator-function/index.js"
|
|
1449
|
+
/*!**************************************************!*\
|
|
1450
|
+
!*** ./node_modules/generator-function/index.js ***!
|
|
1451
|
+
\**************************************************/
|
|
1452
|
+
(module) {
|
|
1453
|
+
|
|
1454
|
+
"use strict";
|
|
1455
|
+
eval("{\n\n// eslint-disable-next-line no-extra-parens, no-empty-function\nconst cached = /** @type {GeneratorFunctionConstructor} */ (function* () {}.constructor);\n\n/** @type {import('.')} */\nmodule.exports = () => cached;\n\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/generator-function/index.js\n}");
|
|
1456
|
+
|
|
1457
|
+
/***/ },
|
|
1458
|
+
|
|
1459
|
+
/***/ "./node_modules/get-intrinsic/index.js"
|
|
1460
|
+
/*!*********************************************!*\
|
|
1461
|
+
!*** ./node_modules/get-intrinsic/index.js ***!
|
|
1462
|
+
\*********************************************/
|
|
1463
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1464
|
+
|
|
1465
|
+
"use strict";
|
|
1466
|
+
eval("{\n\nvar undefined;\n\nvar $Object = __webpack_require__(/*! es-object-atoms */ \"./node_modules/es-object-atoms/index.js\");\n\nvar $Error = __webpack_require__(/*! es-errors */ \"./node_modules/es-errors/index.js\");\nvar $EvalError = __webpack_require__(/*! es-errors/eval */ \"./node_modules/es-errors/eval.js\");\nvar $RangeError = __webpack_require__(/*! es-errors/range */ \"./node_modules/es-errors/range.js\");\nvar $ReferenceError = __webpack_require__(/*! es-errors/ref */ \"./node_modules/es-errors/ref.js\");\nvar $SyntaxError = __webpack_require__(/*! es-errors/syntax */ \"./node_modules/es-errors/syntax.js\");\nvar $TypeError = __webpack_require__(/*! es-errors/type */ \"./node_modules/es-errors/type.js\");\nvar $URIError = __webpack_require__(/*! es-errors/uri */ \"./node_modules/es-errors/uri.js\");\n\nvar abs = __webpack_require__(/*! math-intrinsics/abs */ \"./node_modules/math-intrinsics/abs.js\");\nvar floor = __webpack_require__(/*! math-intrinsics/floor */ \"./node_modules/math-intrinsics/floor.js\");\nvar max = __webpack_require__(/*! math-intrinsics/max */ \"./node_modules/math-intrinsics/max.js\");\nvar min = __webpack_require__(/*! math-intrinsics/min */ \"./node_modules/math-intrinsics/min.js\");\nvar pow = __webpack_require__(/*! math-intrinsics/pow */ \"./node_modules/math-intrinsics/pow.js\");\nvar round = __webpack_require__(/*! math-intrinsics/round */ \"./node_modules/math-intrinsics/round.js\");\nvar sign = __webpack_require__(/*! math-intrinsics/sign */ \"./node_modules/math-intrinsics/sign.js\");\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = __webpack_require__(/*! gopd */ \"./node_modules/gopd/index.js\");\nvar $defineProperty = __webpack_require__(/*! es-define-property */ \"./node_modules/es-define-property/index.js\");\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = __webpack_require__(/*! has-symbols */ \"./node_modules/has-symbols/index.js\")();\n\nvar getProto = __webpack_require__(/*! get-proto */ \"./node_modules/get-proto/index.js\");\nvar $ObjectGPO = __webpack_require__(/*! get-proto/Object.getPrototypeOf */ \"./node_modules/get-proto/Object.getPrototypeOf.js\");\nvar $ReflectGPO = __webpack_require__(/*! get-proto/Reflect.getPrototypeOf */ \"./node_modules/get-proto/Reflect.getPrototypeOf.js\");\n\nvar $apply = __webpack_require__(/*! call-bind-apply-helpers/functionApply */ \"./node_modules/call-bind-apply-helpers/functionApply.js\");\nvar $call = __webpack_require__(/*! call-bind-apply-helpers/functionCall */ \"./node_modules/call-bind-apply-helpers/functionCall.js\");\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': $Object,\n\t'%Object.getOwnPropertyDescriptor%': $gOPD,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\n\t'%Function.prototype.call%': $call,\n\t'%Function.prototype.apply%': $apply,\n\t'%Object.defineProperty%': $defineProperty,\n\t'%Object.getPrototypeOf%': $ObjectGPO,\n\t'%Math.abs%': abs,\n\t'%Math.floor%': floor,\n\t'%Math.max%': max,\n\t'%Math.min%': min,\n\t'%Math.pow%': pow,\n\t'%Math.round%': round,\n\t'%Math.sign%': sign,\n\t'%Reflect.getPrototypeOf%': $ReflectGPO\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\nvar hasOwn = __webpack_require__(/*! hasown */ \"./node_modules/hasown/index.js\");\nvar $concat = bind.call($call, Array.prototype.concat);\nvar $spliceApply = bind.call($apply, Array.prototype.splice);\nvar $replace = bind.call($call, String.prototype.replace);\nvar $strSlice = bind.call($call, String.prototype.slice);\nvar $exec = bind.call($call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/get-intrinsic/index.js\n}");
|
|
1467
|
+
|
|
1468
|
+
/***/ },
|
|
1469
|
+
|
|
1470
|
+
/***/ "./node_modules/get-proto/Object.getPrototypeOf.js"
|
|
1471
|
+
/*!*********************************************************!*\
|
|
1472
|
+
!*** ./node_modules/get-proto/Object.getPrototypeOf.js ***!
|
|
1473
|
+
\*********************************************************/
|
|
1474
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1475
|
+
|
|
1476
|
+
"use strict";
|
|
1477
|
+
eval("{\n\nvar $Object = __webpack_require__(/*! es-object-atoms */ \"./node_modules/es-object-atoms/index.js\");\n\n/** @type {import('./Object.getPrototypeOf')} */\nmodule.exports = $Object.getPrototypeOf || null;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/get-proto/Object.getPrototypeOf.js\n}");
|
|
1478
|
+
|
|
1479
|
+
/***/ },
|
|
1480
|
+
|
|
1481
|
+
/***/ "./node_modules/get-proto/Reflect.getPrototypeOf.js"
|
|
1482
|
+
/*!**********************************************************!*\
|
|
1483
|
+
!*** ./node_modules/get-proto/Reflect.getPrototypeOf.js ***!
|
|
1484
|
+
\**********************************************************/
|
|
1485
|
+
(module) {
|
|
1486
|
+
|
|
1487
|
+
"use strict";
|
|
1488
|
+
eval("{\n\n/** @type {import('./Reflect.getPrototypeOf')} */\nmodule.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/get-proto/Reflect.getPrototypeOf.js\n}");
|
|
1489
|
+
|
|
1490
|
+
/***/ },
|
|
1491
|
+
|
|
1492
|
+
/***/ "./node_modules/get-proto/index.js"
|
|
1493
|
+
/*!*****************************************!*\
|
|
1494
|
+
!*** ./node_modules/get-proto/index.js ***!
|
|
1495
|
+
\*****************************************/
|
|
1496
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1497
|
+
|
|
1498
|
+
"use strict";
|
|
1499
|
+
eval("{\n\nvar reflectGetProto = __webpack_require__(/*! ./Reflect.getPrototypeOf */ \"./node_modules/get-proto/Reflect.getPrototypeOf.js\");\nvar originalGetProto = __webpack_require__(/*! ./Object.getPrototypeOf */ \"./node_modules/get-proto/Object.getPrototypeOf.js\");\n\nvar getDunderProto = __webpack_require__(/*! dunder-proto/get */ \"./node_modules/dunder-proto/get.js\");\n\n/** @type {import('.')} */\nmodule.exports = reflectGetProto\n\t? function getProto(O) {\n\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\treturn reflectGetProto(O);\n\t}\n\t: originalGetProto\n\t\t? function getProto(O) {\n\t\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\t\tthrow new TypeError('getProto: not an object');\n\t\t\t}\n\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\treturn originalGetProto(O);\n\t\t}\n\t\t: getDunderProto\n\t\t\t? function getProto(O) {\n\t\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\t\treturn getDunderProto(O);\n\t\t\t}\n\t\t\t: null;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/get-proto/index.js\n}");
|
|
1500
|
+
|
|
1501
|
+
/***/ },
|
|
1502
|
+
|
|
1503
|
+
/***/ "./node_modules/gopd/gOPD.js"
|
|
1504
|
+
/*!***********************************!*\
|
|
1505
|
+
!*** ./node_modules/gopd/gOPD.js ***!
|
|
1506
|
+
\***********************************/
|
|
1507
|
+
(module) {
|
|
1508
|
+
|
|
1509
|
+
"use strict";
|
|
1510
|
+
eval("{\n\n/** @type {import('./gOPD')} */\nmodule.exports = Object.getOwnPropertyDescriptor;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/gopd/gOPD.js\n}");
|
|
1511
|
+
|
|
1512
|
+
/***/ },
|
|
1513
|
+
|
|
1514
|
+
/***/ "./node_modules/gopd/index.js"
|
|
1515
|
+
/*!************************************!*\
|
|
1516
|
+
!*** ./node_modules/gopd/index.js ***!
|
|
1517
|
+
\************************************/
|
|
1518
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1519
|
+
|
|
1520
|
+
"use strict";
|
|
1521
|
+
eval("{\n\n/** @type {import('.')} */\nvar $gOPD = __webpack_require__(/*! ./gOPD */ \"./node_modules/gopd/gOPD.js\");\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/gopd/index.js\n}");
|
|
1522
|
+
|
|
1523
|
+
/***/ },
|
|
1524
|
+
|
|
1525
|
+
/***/ "./node_modules/has-property-descriptors/index.js"
|
|
1526
|
+
/*!********************************************************!*\
|
|
1527
|
+
!*** ./node_modules/has-property-descriptors/index.js ***!
|
|
1528
|
+
\********************************************************/
|
|
1529
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1530
|
+
|
|
1531
|
+
"use strict";
|
|
1532
|
+
eval("{\n\nvar $defineProperty = __webpack_require__(/*! es-define-property */ \"./node_modules/es-define-property/index.js\");\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\treturn !!$defineProperty;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!$defineProperty) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/has-property-descriptors/index.js\n}");
|
|
1533
|
+
|
|
1534
|
+
/***/ },
|
|
1535
|
+
|
|
1536
|
+
/***/ "./node_modules/has-symbols/index.js"
|
|
1537
|
+
/*!*******************************************!*\
|
|
1538
|
+
!*** ./node_modules/has-symbols/index.js ***!
|
|
1539
|
+
\*******************************************/
|
|
1540
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1541
|
+
|
|
1542
|
+
"use strict";
|
|
1543
|
+
eval("{\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = __webpack_require__(/*! ./shams */ \"./node_modules/has-symbols/shams.js\");\n\n/** @type {import('.')} */\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/has-symbols/index.js\n}");
|
|
1544
|
+
|
|
1545
|
+
/***/ },
|
|
1546
|
+
|
|
1547
|
+
/***/ "./node_modules/has-symbols/shams.js"
|
|
1548
|
+
/*!*******************************************!*\
|
|
1549
|
+
!*** ./node_modules/has-symbols/shams.js ***!
|
|
1550
|
+
\*******************************************/
|
|
1551
|
+
(module) {
|
|
1552
|
+
|
|
1553
|
+
"use strict";
|
|
1554
|
+
eval("{\n\n/** @type {import('./shams')} */\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\t/** @type {{ [k in symbol]?: unknown }} */\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\t// eslint-disable-next-line no-extra-parens\n\t\tvar descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/has-symbols/shams.js\n}");
|
|
1555
|
+
|
|
1556
|
+
/***/ },
|
|
1557
|
+
|
|
1558
|
+
/***/ "./node_modules/has-tostringtag/shams.js"
|
|
1559
|
+
/*!***********************************************!*\
|
|
1560
|
+
!*** ./node_modules/has-tostringtag/shams.js ***!
|
|
1561
|
+
\***********************************************/
|
|
1562
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1563
|
+
|
|
1564
|
+
"use strict";
|
|
1565
|
+
eval("{\n\nvar hasSymbols = __webpack_require__(/*! has-symbols/shams */ \"./node_modules/has-symbols/shams.js\");\n\n/** @type {import('.')} */\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/has-tostringtag/shams.js\n}");
|
|
1566
|
+
|
|
1567
|
+
/***/ },
|
|
1568
|
+
|
|
1569
|
+
/***/ "./node_modules/hasown/index.js"
|
|
1570
|
+
/*!**************************************!*\
|
|
1571
|
+
!*** ./node_modules/hasown/index.js ***!
|
|
1572
|
+
\**************************************/
|
|
1573
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1574
|
+
|
|
1575
|
+
"use strict";
|
|
1576
|
+
eval("{\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = __webpack_require__(/*! function-bind */ \"./node_modules/function-bind/index.js\");\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/hasown/index.js\n}");
|
|
1577
|
+
|
|
1578
|
+
/***/ },
|
|
1579
|
+
|
|
1195
1580
|
/***/ "./node_modules/inherits/inherits_browser.js"
|
|
1196
1581
|
/*!***************************************************!*\
|
|
1197
1582
|
!*** ./node_modules/inherits/inherits_browser.js ***!
|
|
@@ -1202,6 +1587,61 @@ eval("{if (typeof Object.create === 'function') {\n // implementation from stan
|
|
|
1202
1587
|
|
|
1203
1588
|
/***/ },
|
|
1204
1589
|
|
|
1590
|
+
/***/ "./node_modules/is-arguments/index.js"
|
|
1591
|
+
/*!********************************************!*\
|
|
1592
|
+
!*** ./node_modules/is-arguments/index.js ***!
|
|
1593
|
+
\********************************************/
|
|
1594
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1595
|
+
|
|
1596
|
+
"use strict";
|
|
1597
|
+
eval("{\n\nvar hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ \"./node_modules/has-tostringtag/shams.js\")();\nvar callBound = __webpack_require__(/*! call-bound */ \"./node_modules/call-bound/index.js\");\n\nvar $toString = callBound('Object.prototype.toString');\n\n/** @type {import('.')} */\nvar isStandardArguments = function isArguments(value) {\n\tif (\n\t\thasToStringTag\n\t\t&& value\n\t\t&& typeof value === 'object'\n\t\t&& Symbol.toStringTag in value\n\t) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\n/** @type {import('.')} */\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null\n\t\t&& typeof value === 'object'\n\t\t&& 'length' in value\n\t\t&& typeof value.length === 'number'\n\t\t&& value.length >= 0\n\t\t&& $toString(value) !== '[object Array]'\n\t\t&& 'callee' in value\n\t\t&& $toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\n// @ts-expect-error TODO make this not error\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\n/** @type {import('.')} */\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/is-arguments/index.js\n}");
|
|
1598
|
+
|
|
1599
|
+
/***/ },
|
|
1600
|
+
|
|
1601
|
+
/***/ "./node_modules/is-callable/index.js"
|
|
1602
|
+
/*!*******************************************!*\
|
|
1603
|
+
!*** ./node_modules/is-callable/index.js ***!
|
|
1604
|
+
\*******************************************/
|
|
1605
|
+
(module) {
|
|
1606
|
+
|
|
1607
|
+
"use strict";
|
|
1608
|
+
eval("{\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/is-callable/index.js\n}");
|
|
1609
|
+
|
|
1610
|
+
/***/ },
|
|
1611
|
+
|
|
1612
|
+
/***/ "./node_modules/is-generator-function/index.js"
|
|
1613
|
+
/*!*****************************************************!*\
|
|
1614
|
+
!*** ./node_modules/is-generator-function/index.js ***!
|
|
1615
|
+
\*****************************************************/
|
|
1616
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1617
|
+
|
|
1618
|
+
"use strict";
|
|
1619
|
+
eval("{\n\nvar callBound = __webpack_require__(/*! call-bound */ \"./node_modules/call-bound/index.js\");\nvar safeRegexTest = __webpack_require__(/*! safe-regex-test */ \"./node_modules/safe-regex-test/index.js\");\nvar isFnRegex = safeRegexTest(/^\\s*(?:function)?\\*/);\nvar hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ \"./node_modules/has-tostringtag/shams.js\")();\nvar getProto = __webpack_require__(/*! get-proto */ \"./node_modules/get-proto/index.js\");\n\nvar toStr = callBound('Object.prototype.toString');\nvar fnToStr = callBound('Function.prototype.toString');\n\nvar getGeneratorFunction = __webpack_require__(/*! generator-function */ \"./node_modules/generator-function/index.js\");\n\n/** @type {import('.')} */\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex(fnToStr(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tvar GeneratorFunction = getGeneratorFunction();\n\treturn GeneratorFunction && getProto(fn) === GeneratorFunction.prototype;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/is-generator-function/index.js\n}");
|
|
1620
|
+
|
|
1621
|
+
/***/ },
|
|
1622
|
+
|
|
1623
|
+
/***/ "./node_modules/is-regex/index.js"
|
|
1624
|
+
/*!****************************************!*\
|
|
1625
|
+
!*** ./node_modules/is-regex/index.js ***!
|
|
1626
|
+
\****************************************/
|
|
1627
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1628
|
+
|
|
1629
|
+
"use strict";
|
|
1630
|
+
eval("{\n\nvar callBound = __webpack_require__(/*! call-bound */ \"./node_modules/call-bound/index.js\");\nvar hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ \"./node_modules/has-tostringtag/shams.js\")();\nvar hasOwn = __webpack_require__(/*! hasown */ \"./node_modules/hasown/index.js\");\nvar gOPD = __webpack_require__(/*! gopd */ \"./node_modules/gopd/index.js\");\n\n/** @type {import('.')} */\nvar fn;\n\nif (hasToStringTag) {\n\t/** @type {(receiver: ThisParameterType<typeof RegExp.prototype.exec>, ...args: Parameters<typeof RegExp.prototype.exec>) => ReturnType<typeof RegExp.prototype.exec>} */\n\tvar $exec = callBound('RegExp.prototype.exec');\n\t/** @type {object} */\n\tvar isRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\t/** @type {{ toString(): never, valueOf(): never, [Symbol.toPrimitive]?(): never }} */\n\tvar badStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n\n\t/** @type {import('.')} */\n\t// @ts-expect-error TS can't figure out that the $exec call always throws\n\t// eslint-disable-next-line consistent-return\n\tfn = function isRegex(value) {\n\t\tif (!value || typeof value !== 'object') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// eslint-disable-next-line no-extra-parens\n\t\tvar descriptor = /** @type {NonNullable<typeof gOPD>} */ (gOPD)(/** @type {{ lastIndex?: unknown }} */ (value), 'lastIndex');\n\t\tvar hasLastIndexDataProperty = descriptor && hasOwn(descriptor, 'value');\n\t\tif (!hasLastIndexDataProperty) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-extra-parens\n\t\t\t$exec(value, /** @type {string} */ (/** @type {unknown} */ (badStringifier)));\n\t\t} catch (e) {\n\t\t\treturn e === isRegexMarker;\n\t\t}\n\t};\n} else {\n\t/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */\n\tvar $toString = callBound('Object.prototype.toString');\n\t/** @const @type {'[object RegExp]'} */\n\tvar regexClass = '[object RegExp]';\n\n\t/** @type {import('.')} */\n\tfn = function isRegex(value) {\n\t\t// In older browsers, typeof regex incorrectly returns 'function'\n\t\tif (!value || (typeof value !== 'object' && typeof value !== 'function')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $toString(value) === regexClass;\n\t};\n}\n\nmodule.exports = fn;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/is-regex/index.js\n}");
|
|
1631
|
+
|
|
1632
|
+
/***/ },
|
|
1633
|
+
|
|
1634
|
+
/***/ "./node_modules/is-typed-array/index.js"
|
|
1635
|
+
/*!**********************************************!*\
|
|
1636
|
+
!*** ./node_modules/is-typed-array/index.js ***!
|
|
1637
|
+
\**********************************************/
|
|
1638
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1639
|
+
|
|
1640
|
+
"use strict";
|
|
1641
|
+
eval("{\n\nvar whichTypedArray = __webpack_require__(/*! which-typed-array */ \"./node_modules/which-typed-array/index.js\");\n\n/** @type {import('.')} */\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/is-typed-array/index.js\n}");
|
|
1642
|
+
|
|
1643
|
+
/***/ },
|
|
1644
|
+
|
|
1205
1645
|
/***/ "./node_modules/itchy/lib/itchy.js"
|
|
1206
1646
|
/*!*****************************************!*\
|
|
1207
1647
|
!*** ./node_modules/itchy/lib/itchy.js ***!
|
|
@@ -1310,6 +1750,94 @@ eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}))
|
|
|
1310
1750
|
|
|
1311
1751
|
/***/ },
|
|
1312
1752
|
|
|
1753
|
+
/***/ "./node_modules/math-intrinsics/abs.js"
|
|
1754
|
+
/*!*********************************************!*\
|
|
1755
|
+
!*** ./node_modules/math-intrinsics/abs.js ***!
|
|
1756
|
+
\*********************************************/
|
|
1757
|
+
(module) {
|
|
1758
|
+
|
|
1759
|
+
"use strict";
|
|
1760
|
+
eval("{\n\n/** @type {import('./abs')} */\nmodule.exports = Math.abs;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/math-intrinsics/abs.js\n}");
|
|
1761
|
+
|
|
1762
|
+
/***/ },
|
|
1763
|
+
|
|
1764
|
+
/***/ "./node_modules/math-intrinsics/floor.js"
|
|
1765
|
+
/*!***********************************************!*\
|
|
1766
|
+
!*** ./node_modules/math-intrinsics/floor.js ***!
|
|
1767
|
+
\***********************************************/
|
|
1768
|
+
(module) {
|
|
1769
|
+
|
|
1770
|
+
"use strict";
|
|
1771
|
+
eval("{\n\n/** @type {import('./floor')} */\nmodule.exports = Math.floor;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/math-intrinsics/floor.js\n}");
|
|
1772
|
+
|
|
1773
|
+
/***/ },
|
|
1774
|
+
|
|
1775
|
+
/***/ "./node_modules/math-intrinsics/isNaN.js"
|
|
1776
|
+
/*!***********************************************!*\
|
|
1777
|
+
!*** ./node_modules/math-intrinsics/isNaN.js ***!
|
|
1778
|
+
\***********************************************/
|
|
1779
|
+
(module) {
|
|
1780
|
+
|
|
1781
|
+
"use strict";
|
|
1782
|
+
eval("{\n\n/** @type {import('./isNaN')} */\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/math-intrinsics/isNaN.js\n}");
|
|
1783
|
+
|
|
1784
|
+
/***/ },
|
|
1785
|
+
|
|
1786
|
+
/***/ "./node_modules/math-intrinsics/max.js"
|
|
1787
|
+
/*!*********************************************!*\
|
|
1788
|
+
!*** ./node_modules/math-intrinsics/max.js ***!
|
|
1789
|
+
\*********************************************/
|
|
1790
|
+
(module) {
|
|
1791
|
+
|
|
1792
|
+
"use strict";
|
|
1793
|
+
eval("{\n\n/** @type {import('./max')} */\nmodule.exports = Math.max;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/math-intrinsics/max.js\n}");
|
|
1794
|
+
|
|
1795
|
+
/***/ },
|
|
1796
|
+
|
|
1797
|
+
/***/ "./node_modules/math-intrinsics/min.js"
|
|
1798
|
+
/*!*********************************************!*\
|
|
1799
|
+
!*** ./node_modules/math-intrinsics/min.js ***!
|
|
1800
|
+
\*********************************************/
|
|
1801
|
+
(module) {
|
|
1802
|
+
|
|
1803
|
+
"use strict";
|
|
1804
|
+
eval("{\n\n/** @type {import('./min')} */\nmodule.exports = Math.min;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/math-intrinsics/min.js\n}");
|
|
1805
|
+
|
|
1806
|
+
/***/ },
|
|
1807
|
+
|
|
1808
|
+
/***/ "./node_modules/math-intrinsics/pow.js"
|
|
1809
|
+
/*!*********************************************!*\
|
|
1810
|
+
!*** ./node_modules/math-intrinsics/pow.js ***!
|
|
1811
|
+
\*********************************************/
|
|
1812
|
+
(module) {
|
|
1813
|
+
|
|
1814
|
+
"use strict";
|
|
1815
|
+
eval("{\n\n/** @type {import('./pow')} */\nmodule.exports = Math.pow;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/math-intrinsics/pow.js\n}");
|
|
1816
|
+
|
|
1817
|
+
/***/ },
|
|
1818
|
+
|
|
1819
|
+
/***/ "./node_modules/math-intrinsics/round.js"
|
|
1820
|
+
/*!***********************************************!*\
|
|
1821
|
+
!*** ./node_modules/math-intrinsics/round.js ***!
|
|
1822
|
+
\***********************************************/
|
|
1823
|
+
(module) {
|
|
1824
|
+
|
|
1825
|
+
"use strict";
|
|
1826
|
+
eval("{\n\n/** @type {import('./round')} */\nmodule.exports = Math.round;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/math-intrinsics/round.js\n}");
|
|
1827
|
+
|
|
1828
|
+
/***/ },
|
|
1829
|
+
|
|
1830
|
+
/***/ "./node_modules/math-intrinsics/sign.js"
|
|
1831
|
+
/*!**********************************************!*\
|
|
1832
|
+
!*** ./node_modules/math-intrinsics/sign.js ***!
|
|
1833
|
+
\**********************************************/
|
|
1834
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1835
|
+
|
|
1836
|
+
"use strict";
|
|
1837
|
+
eval("{\n\nvar $isNaN = __webpack_require__(/*! ./isNaN */ \"./node_modules/math-intrinsics/isNaN.js\");\n\n/** @type {import('./sign')} */\nmodule.exports = function sign(number) {\n\tif ($isNaN(number) || number === 0) {\n\t\treturn number;\n\t}\n\treturn number < 0 ? -1 : +1;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/math-intrinsics/sign.js\n}");
|
|
1838
|
+
|
|
1839
|
+
/***/ },
|
|
1840
|
+
|
|
1313
1841
|
/***/ "./node_modules/montag/lib/montag.js"
|
|
1314
1842
|
/*!*******************************************!*\
|
|
1315
1843
|
!*** ./node_modules/montag/lib/montag.js ***!
|
|
@@ -1336,10 +1864,10 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
1336
1864
|
/*!***********************************************!*\
|
|
1337
1865
|
!*** ./node_modules/path-browserify/index.js ***!
|
|
1338
1866
|
\***********************************************/
|
|
1339
|
-
(module) {
|
|
1867
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1340
1868
|
|
|
1341
1869
|
"use strict";
|
|
1342
|
-
eval("{// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/path-browserify/index.js\n}");
|
|
1870
|
+
eval("{/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/path-browserify/index.js\n}");
|
|
1343
1871
|
|
|
1344
1872
|
/***/ },
|
|
1345
1873
|
|
|
@@ -1364,6 +1892,17 @@ eval("{var x=String;\nvar create=function() {return {isColorSupported:false,rese
|
|
|
1364
1892
|
|
|
1365
1893
|
/***/ },
|
|
1366
1894
|
|
|
1895
|
+
/***/ "./node_modules/possible-typed-array-names/index.js"
|
|
1896
|
+
/*!**********************************************************!*\
|
|
1897
|
+
!*** ./node_modules/possible-typed-array-names/index.js ***!
|
|
1898
|
+
\**********************************************************/
|
|
1899
|
+
(module) {
|
|
1900
|
+
|
|
1901
|
+
"use strict";
|
|
1902
|
+
eval("{\n\n/** @type {import('.')} */\nmodule.exports = [\n\t'Float16Array',\n\t'Float32Array',\n\t'Float64Array',\n\t'Int8Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'BigInt64Array',\n\t'BigUint64Array'\n];\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/possible-typed-array-names/index.js\n}");
|
|
1903
|
+
|
|
1904
|
+
/***/ },
|
|
1905
|
+
|
|
1367
1906
|
/***/ "./node_modules/process/browser.js"
|
|
1368
1907
|
/*!*****************************************!*\
|
|
1369
1908
|
!*** ./node_modules/process/browser.js ***!
|
|
@@ -1385,6 +1924,17 @@ eval("{\n\nconst isString = (a) => typeof a === 'string';\nconst constant = (a)
|
|
|
1385
1924
|
|
|
1386
1925
|
/***/ },
|
|
1387
1926
|
|
|
1927
|
+
/***/ "./node_modules/safe-regex-test/index.js"
|
|
1928
|
+
/*!***********************************************!*\
|
|
1929
|
+
!*** ./node_modules/safe-regex-test/index.js ***!
|
|
1930
|
+
\***********************************************/
|
|
1931
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1932
|
+
|
|
1933
|
+
"use strict";
|
|
1934
|
+
eval("{\n\nvar callBound = __webpack_require__(/*! call-bound */ \"./node_modules/call-bound/index.js\");\nvar isRegex = __webpack_require__(/*! is-regex */ \"./node_modules/is-regex/index.js\");\n\nvar $exec = callBound('RegExp.prototype.exec');\nvar $TypeError = __webpack_require__(/*! es-errors/type */ \"./node_modules/es-errors/type.js\");\n\n/** @type {import('.')} */\nmodule.exports = function regexTester(regex) {\n\tif (!isRegex(regex)) {\n\t\tthrow new $TypeError('`regex` must be a RegExp');\n\t}\n\treturn function test(s) {\n\t\treturn $exec(regex, s) !== null;\n\t};\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/safe-regex-test/index.js\n}");
|
|
1935
|
+
|
|
1936
|
+
/***/ },
|
|
1937
|
+
|
|
1388
1938
|
/***/ "./node_modules/scroll-into-view-if-needed/dist/index.cjs"
|
|
1389
1939
|
/*!****************************************************************!*\
|
|
1390
1940
|
!*** ./node_modules/scroll-into-view-if-needed/dist/index.cjs ***!
|
|
@@ -1396,6 +1946,17 @@ eval("{var t=__webpack_require__(/*! compute-scroll-into-view */ \"./node_module
|
|
|
1396
1946
|
|
|
1397
1947
|
/***/ },
|
|
1398
1948
|
|
|
1949
|
+
/***/ "./node_modules/set-function-length/index.js"
|
|
1950
|
+
/*!***************************************************!*\
|
|
1951
|
+
!*** ./node_modules/set-function-length/index.js ***!
|
|
1952
|
+
\***************************************************/
|
|
1953
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
1954
|
+
|
|
1955
|
+
"use strict";
|
|
1956
|
+
eval("{\n\nvar GetIntrinsic = __webpack_require__(/*! get-intrinsic */ \"./node_modules/get-intrinsic/index.js\");\nvar define = __webpack_require__(/*! define-data-property */ \"./node_modules/define-data-property/index.js\");\nvar hasDescriptors = __webpack_require__(/*! has-property-descriptors */ \"./node_modules/has-property-descriptors/index.js\")();\nvar gOPD = __webpack_require__(/*! gopd */ \"./node_modules/gopd/index.js\");\n\nvar $TypeError = __webpack_require__(/*! es-errors/type */ \"./node_modules/es-errors/type.js\");\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @type {import('.')} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters<define>[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/set-function-length/index.js\n}");
|
|
1957
|
+
|
|
1958
|
+
/***/ },
|
|
1959
|
+
|
|
1399
1960
|
/***/ "./node_modules/shortdate/lib/shortdate.js"
|
|
1400
1961
|
/*!*************************************************!*\
|
|
1401
1962
|
!*** ./node_modules/shortdate/lib/shortdate.js ***!
|
|
@@ -1539,6 +2100,48 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
1539
2100
|
|
|
1540
2101
|
/***/ },
|
|
1541
2102
|
|
|
2103
|
+
/***/ "./node_modules/util/support/isBufferBrowser.js"
|
|
2104
|
+
/*!******************************************************!*\
|
|
2105
|
+
!*** ./node_modules/util/support/isBufferBrowser.js ***!
|
|
2106
|
+
\******************************************************/
|
|
2107
|
+
(module) {
|
|
2108
|
+
|
|
2109
|
+
eval("{module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/util/support/isBufferBrowser.js\n}");
|
|
2110
|
+
|
|
2111
|
+
/***/ },
|
|
2112
|
+
|
|
2113
|
+
/***/ "./node_modules/util/support/types.js"
|
|
2114
|
+
/*!********************************************!*\
|
|
2115
|
+
!*** ./node_modules/util/support/types.js ***!
|
|
2116
|
+
\********************************************/
|
|
2117
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2118
|
+
|
|
2119
|
+
"use strict";
|
|
2120
|
+
eval("{// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n\n\nvar isArgumentsObject = __webpack_require__(/*! is-arguments */ \"./node_modules/is-arguments/index.js\");\nvar isGeneratorFunction = __webpack_require__(/*! is-generator-function */ \"./node_modules/is-generator-function/index.js\");\nvar whichTypedArray = __webpack_require__(/*! which-typed-array */ \"./node_modules/which-typed-array/index.js\");\nvar isTypedArray = __webpack_require__(/*! is-typed-array */ \"./node_modules/is-typed-array/index.js\");\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/util/support/types.js\n}");
|
|
2121
|
+
|
|
2122
|
+
/***/ },
|
|
2123
|
+
|
|
2124
|
+
/***/ "./node_modules/util/util.js"
|
|
2125
|
+
/*!***********************************!*\
|
|
2126
|
+
!*** ./node_modules/util/util.js ***!
|
|
2127
|
+
\***********************************/
|
|
2128
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2129
|
+
|
|
2130
|
+
eval("{/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').slice(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = __webpack_require__(/*! ./support/types */ \"./node_modules/util/support/types.js\");\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ \"./node_modules/util/support/isBufferBrowser.js\");\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/util/util.js\n}");
|
|
2131
|
+
|
|
2132
|
+
/***/ },
|
|
2133
|
+
|
|
2134
|
+
/***/ "./node_modules/which-typed-array/index.js"
|
|
2135
|
+
/*!*************************************************!*\
|
|
2136
|
+
!*** ./node_modules/which-typed-array/index.js ***!
|
|
2137
|
+
\*************************************************/
|
|
2138
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
2139
|
+
|
|
2140
|
+
"use strict";
|
|
2141
|
+
eval("{\n\nvar forEach = __webpack_require__(/*! for-each */ \"./node_modules/for-each/index.js\");\nvar availableTypedArrays = __webpack_require__(/*! available-typed-arrays */ \"./node_modules/available-typed-arrays/index.js\");\nvar callBind = __webpack_require__(/*! call-bind */ \"./node_modules/call-bind/index.js\");\nvar callBound = __webpack_require__(/*! call-bound */ \"./node_modules/call-bound/index.js\");\nvar gOPD = __webpack_require__(/*! gopd */ \"./node_modules/gopd/index.js\");\nvar getProto = __webpack_require__(/*! get-proto */ \"./node_modules/get-proto/index.js\");\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ \"./node_modules/has-tostringtag/shams.js\")();\n\nvar g = typeof globalThis === 'undefined' ? globalThis : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\n\n/** @type {<T = unknown>(array: readonly T[], value: unknown) => number} */\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n/** @typedef {import('./types').Getter} Getter */\n/** @type {import('./types').Cache} */\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getProto) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr && getProto) {\n\t\t\tvar proto = getProto(arr);\n\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor && proto) {\n\t\t\t\tvar superProto = getProto(proto);\n\t\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\tif (descriptor && descriptor.get) {\n\t\t\t\tvar bound = callBind(descriptor.get);\n\t\t\t\tcache[\n\t\t\t\t\t/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)\n\t\t\t\t] = bound;\n\t\t\t}\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tvar fn = arr.slice || arr.set;\n\t\tif (fn) {\n\t\t\tvar bound = /** @type {import('./types').BoundSlice | import('./types').BoundSet} */ (\n\t\t\t\t// @ts-expect-error TODO FIXME\n\t\t\t\tcallBind(fn)\n\t\t\t);\n\t\t\tcache[\n\t\t\t\t/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)\n\t\t\t] = bound;\n\t\t}\n\t});\n}\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\t/** @type {ReturnType<typeof tryAllTypedArrays>} */ var found = false;\n\tforEach(\n\t\t/** @type {Record<`\\$${import('.').TypedArrayName}`, Getter>} */ (cache),\n\t\t/** @type {(getter: Getter, name: `\\$${import('.').TypedArrayName}`) => void} */\n\t\tfunction (getter, typedArray) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t\t// @ts-expect-error a throw is fine here\n\t\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\t\tfound = /** @type {import('.').TypedArrayName} */ ($slice(typedArray, 1));\n\t\t\t\t\t}\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar trySlices = function tryAllSlices(value) {\n\t/** @type {ReturnType<typeof tryAllSlices>} */ var found = false;\n\tforEach(\n\t\t/** @type {Record<`\\$${import('.').TypedArrayName}`, Getter>} */(cache),\n\t\t/** @type {(getter: Getter, name: `\\$${import('.').TypedArrayName}`) => void} */ function (getter, name) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t\t// @ts-expect-error a throw is fine here\n\t\t\t\t\tgetter(value);\n\t\t\t\t\tfound = /** @type {import('.').TypedArrayName} */ ($slice(name, 1));\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\t/** @type {string} */\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/which-typed-array/index.js\n}");
|
|
2142
|
+
|
|
2143
|
+
/***/ },
|
|
2144
|
+
|
|
1542
2145
|
/***/ "./node_modules/wraptile/lib/wraptile.js"
|
|
1543
2146
|
/*!***********************************************!*\
|
|
1544
2147
|
!*** ./node_modules/wraptile/lib/wraptile.js ***!
|