Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/dist
File: keycodes.js
this["wp"] = this["wp"] || {}; this["wp"]["keycodes"] =
[0] Fix | Delete
/******/ (function(modules) { // webpackBootstrap
[1] Fix | Delete
/******/ // The module cache
[2] Fix | Delete
/******/ var installedModules = {};
[3] Fix | Delete
/******/
[4] Fix | Delete
/******/ // The require function
[5] Fix | Delete
/******/ function __webpack_require__(moduleId) {
[6] Fix | Delete
/******/
[7] Fix | Delete
/******/ // Check if module is in cache
[8] Fix | Delete
/******/ if(installedModules[moduleId]) {
[9] Fix | Delete
/******/ return installedModules[moduleId].exports;
[10] Fix | Delete
/******/ }
[11] Fix | Delete
/******/ // Create a new module (and put it into the cache)
[12] Fix | Delete
/******/ var module = installedModules[moduleId] = {
[13] Fix | Delete
/******/ i: moduleId,
[14] Fix | Delete
/******/ l: false,
[15] Fix | Delete
/******/ exports: {}
[16] Fix | Delete
/******/ };
[17] Fix | Delete
/******/
[18] Fix | Delete
/******/ // Execute the module function
[19] Fix | Delete
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
[20] Fix | Delete
/******/
[21] Fix | Delete
/******/ // Flag the module as loaded
[22] Fix | Delete
/******/ module.l = true;
[23] Fix | Delete
/******/
[24] Fix | Delete
/******/ // Return the exports of the module
[25] Fix | Delete
/******/ return module.exports;
[26] Fix | Delete
/******/ }
[27] Fix | Delete
/******/
[28] Fix | Delete
/******/
[29] Fix | Delete
/******/ // expose the modules object (__webpack_modules__)
[30] Fix | Delete
/******/ __webpack_require__.m = modules;
[31] Fix | Delete
/******/
[32] Fix | Delete
/******/ // expose the module cache
[33] Fix | Delete
/******/ __webpack_require__.c = installedModules;
[34] Fix | Delete
/******/
[35] Fix | Delete
/******/ // define getter function for harmony exports
[36] Fix | Delete
/******/ __webpack_require__.d = function(exports, name, getter) {
[37] Fix | Delete
/******/ if(!__webpack_require__.o(exports, name)) {
[38] Fix | Delete
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
[39] Fix | Delete
/******/ }
[40] Fix | Delete
/******/ };
[41] Fix | Delete
/******/
[42] Fix | Delete
/******/ // define __esModule on exports
[43] Fix | Delete
/******/ __webpack_require__.r = function(exports) {
[44] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[45] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[46] Fix | Delete
/******/ }
[47] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[48] Fix | Delete
/******/ };
[49] Fix | Delete
/******/
[50] Fix | Delete
/******/ // create a fake namespace object
[51] Fix | Delete
/******/ // mode & 1: value is a module id, require it
[52] Fix | Delete
/******/ // mode & 2: merge all properties of value into the ns
[53] Fix | Delete
/******/ // mode & 4: return value when already ns object
[54] Fix | Delete
/******/ // mode & 8|1: behave like require
[55] Fix | Delete
/******/ __webpack_require__.t = function(value, mode) {
[56] Fix | Delete
/******/ if(mode & 1) value = __webpack_require__(value);
[57] Fix | Delete
/******/ if(mode & 8) return value;
[58] Fix | Delete
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
[59] Fix | Delete
/******/ var ns = Object.create(null);
[60] Fix | Delete
/******/ __webpack_require__.r(ns);
[61] Fix | Delete
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
[62] Fix | Delete
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
[63] Fix | Delete
/******/ return ns;
[64] Fix | Delete
/******/ };
[65] Fix | Delete
/******/
[66] Fix | Delete
/******/ // getDefaultExport function for compatibility with non-harmony modules
[67] Fix | Delete
/******/ __webpack_require__.n = function(module) {
[68] Fix | Delete
/******/ var getter = module && module.__esModule ?
[69] Fix | Delete
/******/ function getDefault() { return module['default']; } :
[70] Fix | Delete
/******/ function getModuleExports() { return module; };
[71] Fix | Delete
/******/ __webpack_require__.d(getter, 'a', getter);
[72] Fix | Delete
/******/ return getter;
[73] Fix | Delete
/******/ };
[74] Fix | Delete
/******/
[75] Fix | Delete
/******/ // Object.prototype.hasOwnProperty.call
[76] Fix | Delete
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
[77] Fix | Delete
/******/
[78] Fix | Delete
/******/ // __webpack_public_path__
[79] Fix | Delete
/******/ __webpack_require__.p = "";
[80] Fix | Delete
/******/
[81] Fix | Delete
/******/
[82] Fix | Delete
/******/ // Load entry module and return exports
[83] Fix | Delete
/******/ return __webpack_require__(__webpack_require__.s = "z7pY");
[84] Fix | Delete
/******/ })
[85] Fix | Delete
/************************************************************************/
[86] Fix | Delete
/******/ ({
[87] Fix | Delete
[88] Fix | Delete
/***/ "25BE":
[89] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[90] Fix | Delete
[91] Fix | Delete
"use strict";
[92] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
[93] Fix | Delete
function _iterableToArray(iter) {
[94] Fix | Delete
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
[95] Fix | Delete
}
[96] Fix | Delete
[97] Fix | Delete
/***/ }),
[98] Fix | Delete
[99] Fix | Delete
/***/ "BsWD":
[100] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[101] Fix | Delete
[102] Fix | Delete
"use strict";
[103] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
[104] Fix | Delete
/* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a3WO");
[105] Fix | Delete
[106] Fix | Delete
function _unsupportedIterableToArray(o, minLen) {
[107] Fix | Delete
if (!o) return;
[108] Fix | Delete
if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
[109] Fix | Delete
var n = Object.prototype.toString.call(o).slice(8, -1);
[110] Fix | Delete
if (n === "Object" && o.constructor) n = o.constructor.name;
[111] Fix | Delete
if (n === "Map" || n === "Set") return Array.from(o);
[112] Fix | Delete
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
[113] Fix | Delete
}
[114] Fix | Delete
[115] Fix | Delete
/***/ }),
[116] Fix | Delete
[117] Fix | Delete
/***/ "KQm4":
[118] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[119] Fix | Delete
[120] Fix | Delete
"use strict";
[121] Fix | Delete
[122] Fix | Delete
// EXPORTS
[123] Fix | Delete
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
[124] Fix | Delete
[125] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
[126] Fix | Delete
var arrayLikeToArray = __webpack_require__("a3WO");
[127] Fix | Delete
[128] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
[129] Fix | Delete
[130] Fix | Delete
function _arrayWithoutHoles(arr) {
[131] Fix | Delete
if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
[132] Fix | Delete
}
[133] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
[134] Fix | Delete
var iterableToArray = __webpack_require__("25BE");
[135] Fix | Delete
[136] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
[137] Fix | Delete
var unsupportedIterableToArray = __webpack_require__("BsWD");
[138] Fix | Delete
[139] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
[140] Fix | Delete
function _nonIterableSpread() {
[141] Fix | Delete
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
[142] Fix | Delete
}
[143] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
[144] Fix | Delete
[145] Fix | Delete
[146] Fix | Delete
[147] Fix | Delete
[148] Fix | Delete
function _toConsumableArray(arr) {
[149] Fix | Delete
return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
[150] Fix | Delete
}
[151] Fix | Delete
[152] Fix | Delete
/***/ }),
[153] Fix | Delete
[154] Fix | Delete
/***/ "YLtl":
[155] Fix | Delete
/***/ (function(module, exports) {
[156] Fix | Delete
[157] Fix | Delete
(function() { module.exports = window["lodash"]; }());
[158] Fix | Delete
[159] Fix | Delete
/***/ }),
[160] Fix | Delete
[161] Fix | Delete
/***/ "a3WO":
[162] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[163] Fix | Delete
[164] Fix | Delete
"use strict";
[165] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
[166] Fix | Delete
function _arrayLikeToArray(arr, len) {
[167] Fix | Delete
if (len == null || len > arr.length) len = arr.length;
[168] Fix | Delete
[169] Fix | Delete
for (var i = 0, arr2 = new Array(len); i < len; i++) {
[170] Fix | Delete
arr2[i] = arr[i];
[171] Fix | Delete
}
[172] Fix | Delete
[173] Fix | Delete
return arr2;
[174] Fix | Delete
}
[175] Fix | Delete
[176] Fix | Delete
/***/ }),
[177] Fix | Delete
[178] Fix | Delete
/***/ "l3Sj":
[179] Fix | Delete
/***/ (function(module, exports) {
[180] Fix | Delete
[181] Fix | Delete
(function() { module.exports = window["wp"]["i18n"]; }());
[182] Fix | Delete
[183] Fix | Delete
/***/ }),
[184] Fix | Delete
[185] Fix | Delete
/***/ "rePB":
[186] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[187] Fix | Delete
[188] Fix | Delete
"use strict";
[189] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
[190] Fix | Delete
function _defineProperty(obj, key, value) {
[191] Fix | Delete
if (key in obj) {
[192] Fix | Delete
Object.defineProperty(obj, key, {
[193] Fix | Delete
value: value,
[194] Fix | Delete
enumerable: true,
[195] Fix | Delete
configurable: true,
[196] Fix | Delete
writable: true
[197] Fix | Delete
});
[198] Fix | Delete
} else {
[199] Fix | Delete
obj[key] = value;
[200] Fix | Delete
}
[201] Fix | Delete
[202] Fix | Delete
return obj;
[203] Fix | Delete
}
[204] Fix | Delete
[205] Fix | Delete
/***/ }),
[206] Fix | Delete
[207] Fix | Delete
/***/ "z7pY":
[208] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[209] Fix | Delete
[210] Fix | Delete
"use strict";
[211] Fix | Delete
// ESM COMPAT FLAG
[212] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[213] Fix | Delete
[214] Fix | Delete
// EXPORTS
[215] Fix | Delete
__webpack_require__.d(__webpack_exports__, "BACKSPACE", function() { return /* binding */ BACKSPACE; });
[216] Fix | Delete
__webpack_require__.d(__webpack_exports__, "TAB", function() { return /* binding */ TAB; });
[217] Fix | Delete
__webpack_require__.d(__webpack_exports__, "ENTER", function() { return /* binding */ ENTER; });
[218] Fix | Delete
__webpack_require__.d(__webpack_exports__, "ESCAPE", function() { return /* binding */ ESCAPE; });
[219] Fix | Delete
__webpack_require__.d(__webpack_exports__, "SPACE", function() { return /* binding */ SPACE; });
[220] Fix | Delete
__webpack_require__.d(__webpack_exports__, "LEFT", function() { return /* binding */ LEFT; });
[221] Fix | Delete
__webpack_require__.d(__webpack_exports__, "UP", function() { return /* binding */ UP; });
[222] Fix | Delete
__webpack_require__.d(__webpack_exports__, "RIGHT", function() { return /* binding */ RIGHT; });
[223] Fix | Delete
__webpack_require__.d(__webpack_exports__, "DOWN", function() { return /* binding */ DOWN; });
[224] Fix | Delete
__webpack_require__.d(__webpack_exports__, "DELETE", function() { return /* binding */ DELETE; });
[225] Fix | Delete
__webpack_require__.d(__webpack_exports__, "F10", function() { return /* binding */ F10; });
[226] Fix | Delete
__webpack_require__.d(__webpack_exports__, "ALT", function() { return /* binding */ ALT; });
[227] Fix | Delete
__webpack_require__.d(__webpack_exports__, "CTRL", function() { return /* binding */ CTRL; });
[228] Fix | Delete
__webpack_require__.d(__webpack_exports__, "COMMAND", function() { return /* binding */ COMMAND; });
[229] Fix | Delete
__webpack_require__.d(__webpack_exports__, "SHIFT", function() { return /* binding */ SHIFT; });
[230] Fix | Delete
__webpack_require__.d(__webpack_exports__, "ZERO", function() { return /* binding */ ZERO; });
[231] Fix | Delete
__webpack_require__.d(__webpack_exports__, "modifiers", function() { return /* binding */ modifiers; });
[232] Fix | Delete
__webpack_require__.d(__webpack_exports__, "rawShortcut", function() { return /* binding */ rawShortcut; });
[233] Fix | Delete
__webpack_require__.d(__webpack_exports__, "displayShortcutList", function() { return /* binding */ displayShortcutList; });
[234] Fix | Delete
__webpack_require__.d(__webpack_exports__, "displayShortcut", function() { return /* binding */ displayShortcut; });
[235] Fix | Delete
__webpack_require__.d(__webpack_exports__, "shortcutAriaLabel", function() { return /* binding */ shortcutAriaLabel; });
[236] Fix | Delete
__webpack_require__.d(__webpack_exports__, "isKeyboardEvent", function() { return /* binding */ isKeyboardEvent; });
[237] Fix | Delete
[238] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
[239] Fix | Delete
var defineProperty = __webpack_require__("rePB");
[240] Fix | Delete
[241] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
[242] Fix | Delete
var toConsumableArray = __webpack_require__("KQm4");
[243] Fix | Delete
[244] Fix | Delete
// EXTERNAL MODULE: external "lodash"
[245] Fix | Delete
var external_lodash_ = __webpack_require__("YLtl");
[246] Fix | Delete
[247] Fix | Delete
// EXTERNAL MODULE: external ["wp","i18n"]
[248] Fix | Delete
var external_wp_i18n_ = __webpack_require__("l3Sj");
[249] Fix | Delete
[250] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/keycodes/build-module/platform.js
[251] Fix | Delete
/**
[252] Fix | Delete
* External dependencies
[253] Fix | Delete
*/
[254] Fix | Delete
[255] Fix | Delete
/**
[256] Fix | Delete
* Return true if platform is MacOS.
[257] Fix | Delete
*
[258] Fix | Delete
* @param {Window} _window window object by default; used for DI testing.
[259] Fix | Delete
*
[260] Fix | Delete
* @return {boolean} True if MacOS; false otherwise.
[261] Fix | Delete
*/
[262] Fix | Delete
[263] Fix | Delete
function isAppleOS() {
[264] Fix | Delete
var _window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
[265] Fix | Delete
[266] Fix | Delete
var platform = _window.navigator.platform;
[267] Fix | Delete
return platform.indexOf('Mac') !== -1 || Object(external_lodash_["includes"])(['iPad', 'iPhone'], platform);
[268] Fix | Delete
}
[269] Fix | Delete
[270] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/keycodes/build-module/index.js
[271] Fix | Delete
[272] Fix | Delete
[273] Fix | Delete
[274] Fix | Delete
/**
[275] Fix | Delete
* Note: The order of the modifier keys in many of the [foo]Shortcut()
[276] Fix | Delete
* functions in this file are intentional and should not be changed. They're
[277] Fix | Delete
* designed to fit with the standard menu keyboard shortcuts shown in the
[278] Fix | Delete
* user's platform.
[279] Fix | Delete
*
[280] Fix | Delete
* For example, on MacOS menu shortcuts will place Shift before Command, but
[281] Fix | Delete
* on Windows Control will usually come first. So don't provide your own
[282] Fix | Delete
* shortcut combos directly to keyboardShortcut().
[283] Fix | Delete
*/
[284] Fix | Delete
[285] Fix | Delete
/**
[286] Fix | Delete
* External dependencies
[287] Fix | Delete
*/
[288] Fix | Delete
[289] Fix | Delete
/**
[290] Fix | Delete
* WordPress dependencies
[291] Fix | Delete
*/
[292] Fix | Delete
[293] Fix | Delete
[294] Fix | Delete
/**
[295] Fix | Delete
* Internal dependencies
[296] Fix | Delete
*/
[297] Fix | Delete
[298] Fix | Delete
[299] Fix | Delete
/** @typedef {typeof ALT | CTRL | COMMAND | SHIFT } WPModifierPart */
[300] Fix | Delete
[301] Fix | Delete
/** @typedef {'primary' | 'primaryShift' | 'primaryAlt' | 'secondary' | 'access' | 'ctrl' | 'alt' | 'ctrlShift' | 'shift' | 'shiftAlt'} WPKeycodeModifier */
[302] Fix | Delete
[303] Fix | Delete
/**
[304] Fix | Delete
* An object of handler functions for each of the possible modifier
[305] Fix | Delete
* combinations. A handler will return a value for a given key.
[306] Fix | Delete
*
[307] Fix | Delete
* @template T
[308] Fix | Delete
*
[309] Fix | Delete
* @typedef {Record<WPKeycodeModifier, T>} WPModifierHandler
[310] Fix | Delete
*/
[311] Fix | Delete
[312] Fix | Delete
/* eslint-disable jsdoc/valid-types */
[313] Fix | Delete
[314] Fix | Delete
/**
[315] Fix | Delete
* @template T
[316] Fix | Delete
*
[317] Fix | Delete
* @typedef {(character: string, isApple?: () => boolean) => T} WPKeyHandler
[318] Fix | Delete
*/
[319] Fix | Delete
[320] Fix | Delete
/** @typedef {(event: KeyboardEvent, character: string, isApple?: () => boolean) => boolean} WPEventKeyHandler */
[321] Fix | Delete
[322] Fix | Delete
/* eslint-enable jsdoc/valid-types */
[323] Fix | Delete
[324] Fix | Delete
/**
[325] Fix | Delete
* Keycode for BACKSPACE key.
[326] Fix | Delete
*/
[327] Fix | Delete
[328] Fix | Delete
var BACKSPACE = 8;
[329] Fix | Delete
/**
[330] Fix | Delete
* Keycode for TAB key.
[331] Fix | Delete
*/
[332] Fix | Delete
[333] Fix | Delete
var TAB = 9;
[334] Fix | Delete
/**
[335] Fix | Delete
* Keycode for ENTER key.
[336] Fix | Delete
*/
[337] Fix | Delete
[338] Fix | Delete
var ENTER = 13;
[339] Fix | Delete
/**
[340] Fix | Delete
* Keycode for ESCAPE key.
[341] Fix | Delete
*/
[342] Fix | Delete
[343] Fix | Delete
var ESCAPE = 27;
[344] Fix | Delete
/**
[345] Fix | Delete
* Keycode for SPACE key.
[346] Fix | Delete
*/
[347] Fix | Delete
[348] Fix | Delete
var SPACE = 32;
[349] Fix | Delete
/**
[350] Fix | Delete
* Keycode for LEFT key.
[351] Fix | Delete
*/
[352] Fix | Delete
[353] Fix | Delete
var LEFT = 37;
[354] Fix | Delete
/**
[355] Fix | Delete
* Keycode for UP key.
[356] Fix | Delete
*/
[357] Fix | Delete
[358] Fix | Delete
var UP = 38;
[359] Fix | Delete
/**
[360] Fix | Delete
* Keycode for RIGHT key.
[361] Fix | Delete
*/
[362] Fix | Delete
[363] Fix | Delete
var RIGHT = 39;
[364] Fix | Delete
/**
[365] Fix | Delete
* Keycode for DOWN key.
[366] Fix | Delete
*/
[367] Fix | Delete
[368] Fix | Delete
var DOWN = 40;
[369] Fix | Delete
/**
[370] Fix | Delete
* Keycode for DELETE key.
[371] Fix | Delete
*/
[372] Fix | Delete
[373] Fix | Delete
var DELETE = 46;
[374] Fix | Delete
/**
[375] Fix | Delete
* Keycode for F10 key.
[376] Fix | Delete
*/
[377] Fix | Delete
[378] Fix | Delete
var F10 = 121;
[379] Fix | Delete
/**
[380] Fix | Delete
* Keycode for ALT key.
[381] Fix | Delete
*/
[382] Fix | Delete
[383] Fix | Delete
var ALT = 'alt';
[384] Fix | Delete
/**
[385] Fix | Delete
* Keycode for CTRL key.
[386] Fix | Delete
*/
[387] Fix | Delete
[388] Fix | Delete
var CTRL = 'ctrl';
[389] Fix | Delete
/**
[390] Fix | Delete
* Keycode for COMMAND/META key.
[391] Fix | Delete
*/
[392] Fix | Delete
[393] Fix | Delete
var COMMAND = 'meta';
[394] Fix | Delete
/**
[395] Fix | Delete
* Keycode for SHIFT key.
[396] Fix | Delete
*/
[397] Fix | Delete
[398] Fix | Delete
var SHIFT = 'shift';
[399] Fix | Delete
/**
[400] Fix | Delete
* Keycode for ZERO key.
[401] Fix | Delete
*/
[402] Fix | Delete
[403] Fix | Delete
var ZERO = 48;
[404] Fix | Delete
/**
[405] Fix | Delete
* Object that contains functions that return the available modifier
[406] Fix | Delete
* depending on platform.
[407] Fix | Delete
*
[408] Fix | Delete
* @type {WPModifierHandler< ( isApple: () => boolean ) => WPModifierPart[]>}
[409] Fix | Delete
*/
[410] Fix | Delete
[411] Fix | Delete
var modifiers = {
[412] Fix | Delete
primary: function primary(_isApple) {
[413] Fix | Delete
return _isApple() ? [COMMAND] : [CTRL];
[414] Fix | Delete
},
[415] Fix | Delete
primaryShift: function primaryShift(_isApple) {
[416] Fix | Delete
return _isApple() ? [SHIFT, COMMAND] : [CTRL, SHIFT];
[417] Fix | Delete
},
[418] Fix | Delete
primaryAlt: function primaryAlt(_isApple) {
[419] Fix | Delete
return _isApple() ? [ALT, COMMAND] : [CTRL, ALT];
[420] Fix | Delete
},
[421] Fix | Delete
secondary: function secondary(_isApple) {
[422] Fix | Delete
return _isApple() ? [SHIFT, ALT, COMMAND] : [CTRL, SHIFT, ALT];
[423] Fix | Delete
},
[424] Fix | Delete
access: function access(_isApple) {
[425] Fix | Delete
return _isApple() ? [CTRL, ALT] : [SHIFT, ALT];
[426] Fix | Delete
},
[427] Fix | Delete
ctrl: function ctrl() {
[428] Fix | Delete
return [CTRL];
[429] Fix | Delete
},
[430] Fix | Delete
alt: function alt() {
[431] Fix | Delete
return [ALT];
[432] Fix | Delete
},
[433] Fix | Delete
ctrlShift: function ctrlShift() {
[434] Fix | Delete
return [CTRL, SHIFT];
[435] Fix | Delete
},
[436] Fix | Delete
shift: function shift() {
[437] Fix | Delete
return [SHIFT];
[438] Fix | Delete
},
[439] Fix | Delete
shiftAlt: function shiftAlt() {
[440] Fix | Delete
return [SHIFT, ALT];
[441] Fix | Delete
}
[442] Fix | Delete
};
[443] Fix | Delete
/**
[444] Fix | Delete
* An object that contains functions to get raw shortcuts.
[445] Fix | Delete
*
[446] Fix | Delete
* These are intended for user with the KeyboardShortcuts.
[447] Fix | Delete
*
[448] Fix | Delete
* @example
[449] Fix | Delete
* ```js
[450] Fix | Delete
* // Assuming macOS:
[451] Fix | Delete
* rawShortcut.primary( 'm' )
[452] Fix | Delete
* // "meta+m""
[453] Fix | Delete
* ```
[454] Fix | Delete
*
[455] Fix | Delete
* @type {WPModifierHandler<WPKeyHandler<string>>} Keyed map of functions to raw
[456] Fix | Delete
* shortcuts.
[457] Fix | Delete
*/
[458] Fix | Delete
[459] Fix | Delete
var rawShortcut = Object(external_lodash_["mapValues"])(modifiers, function (modifier) {
[460] Fix | Delete
return (
[461] Fix | Delete
/** @type {WPKeyHandler<string>} */
[462] Fix | Delete
function (character) {
[463] Fix | Delete
var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
[464] Fix | Delete
[465] Fix | Delete
return [].concat(Object(toConsumableArray["a" /* default */])(modifier(_isApple)), [character.toLowerCase()]).join('+');
[466] Fix | Delete
}
[467] Fix | Delete
);
[468] Fix | Delete
});
[469] Fix | Delete
/**
[470] Fix | Delete
* Return an array of the parts of a keyboard shortcut chord for display.
[471] Fix | Delete
*
[472] Fix | Delete
* @example
[473] Fix | Delete
* ```js
[474] Fix | Delete
* // Assuming macOS:
[475] Fix | Delete
* displayShortcutList.primary( 'm' );
[476] Fix | Delete
* // [ "⌘", "M" ]
[477] Fix | Delete
* ```
[478] Fix | Delete
*
[479] Fix | Delete
* @type {WPModifierHandler<WPKeyHandler<string[]>>} Keyed map of functions to
[480] Fix | Delete
* shortcut sequences.
[481] Fix | Delete
*/
[482] Fix | Delete
[483] Fix | Delete
var displayShortcutList = Object(external_lodash_["mapValues"])(modifiers, function (modifier) {
[484] Fix | Delete
return (
[485] Fix | Delete
/** @type {WPKeyHandler<string[]>} */
[486] Fix | Delete
function (character) {
[487] Fix | Delete
var _replacementKeyMap;
[488] Fix | Delete
[489] Fix | Delete
var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
[490] Fix | Delete
[491] Fix | Delete
var isApple = _isApple();
[492] Fix | Delete
[493] Fix | Delete
var replacementKeyMap = (_replacementKeyMap = {}, Object(defineProperty["a" /* default */])(_replacementKeyMap, ALT, isApple ? '⌥' : 'Alt'), Object(defineProperty["a" /* default */])(_replacementKeyMap, CTRL, isApple ? '⌃' : 'Ctrl'), Object(defineProperty["a" /* default */])(_replacementKeyMap, COMMAND, '⌘'), Object(defineProperty["a" /* default */])(_replacementKeyMap, SHIFT, isApple ? '⇧' : 'Shift'), _replacementKeyMap);
[494] Fix | Delete
var modifierKeys = modifier(_isApple).reduce(function (accumulator, key) {
[495] Fix | Delete
var replacementKey = Object(external_lodash_["get"])(replacementKeyMap, key, key); // If on the Mac, adhere to platform convention and don't show plus between keys.
[496] Fix | Delete
[497] Fix | Delete
if (isApple) {
[498] Fix | Delete
return [].concat(Object(toConsumableArray["a" /* default */])(accumulator), [replacementKey]);
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function