2020-01-22 23:06:21 +01:00
this [ "wp" ] = this [ "wp" ] || { } ; this [ "wp" ] [ "keyboardShortcuts" ] =
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
2020-07-07 16:43:35 +02:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = 456 ) ;
2020-01-22 23:06:21 +01:00
/******/ } )
/************************************************************************/
/******/ ( {
2020-07-07 16:43:35 +02:00
/***/ 13 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 13:50:29 +02:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ _slicedToArray ; } ) ;
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
2020-03-24 00:40:19 +01:00
var arrayWithHoles = _ _webpack _require _ _ ( 38 ) ;
2020-02-10 23:33:27 +01:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit ( arr , i ) {
2020-03-24 00:40:19 +01:00
if ( typeof Symbol === "undefined" || ! ( Symbol . iterator in Object ( arr ) ) ) return ;
2020-02-10 23:33:27 +01:00
var _arr = [ ] ;
var _n = true ;
var _d = false ;
var _e = undefined ;
try {
for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) {
_arr . push ( _s . value ) ;
if ( i && _arr . length === i ) break ;
}
} catch ( err ) {
_d = true ;
_e = err ;
} finally {
try {
if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ;
} finally {
if ( _d ) throw _e ;
}
}
return _arr ;
}
2020-03-24 00:40:19 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
2020-07-07 16:43:35 +02:00
var unsupportedIterableToArray = _ _webpack _require _ _ ( 29 ) ;
2020-03-24 00:40:19 +01:00
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
2020-03-24 00:40:19 +01:00
var nonIterableRest = _ _webpack _require _ _ ( 39 ) ;
2020-02-10 23:33:27 +01:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
2020-03-24 00:40:19 +01:00
2020-02-10 23:33:27 +01:00
function _slicedToArray ( arr , i ) {
2020-03-24 00:40:19 +01:00
return Object ( arrayWithHoles [ "a" /* default */ ] ) ( arr ) || _iterableToArrayLimit ( arr , i ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr , i ) || Object ( nonIterableRest [ "a" /* default */ ] ) ( ) ;
2020-02-10 23:33:27 +01:00
}
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 17 :
2020-06-26 15:33:47 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 13:50:29 +02:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ _toConsumableArray ; } ) ;
2020-06-26 15:33:47 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = _ _webpack _require _ _ ( 26 ) ;
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function _arrayWithoutHoles ( arr ) {
if ( Array . isArray ( arr ) ) return Object ( arrayLikeToArray [ "a" /* default */ ] ) ( arr ) ;
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = _ _webpack _require _ _ ( 35 ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
2020-07-07 16:43:35 +02:00
var unsupportedIterableToArray = _ _webpack _require _ _ ( 29 ) ;
2020-06-26 15:33:47 +02:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread ( ) {
throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
function _toConsumableArray ( arr ) {
return _arrayWithoutHoles ( arr ) || Object ( iterableToArray [ "a" /* default */ ] ) ( arr ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr ) || _nonIterableSpread ( ) ;
}
/***/ } ) ,
/***/ 2 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "lodash" ] ; } ( ) ) ;
/***/ } ) ,
2020-03-16 23:07:16 +01:00
/***/ 22 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "keycodes" ] ; } ( ) ) ;
/***/ } ) ,
2020-06-26 15:33:47 +02:00
/***/ 26 :
2020-03-24 00:40:19 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayLikeToArray ; } ) ;
function _arrayLikeToArray ( arr , len ) {
if ( len == null || len > arr . length ) len = arr . length ;
for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) {
arr2 [ i ] = arr [ i ] ;
}
return arr2 ;
}
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 29 :
2020-03-24 00:40:19 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _unsupportedIterableToArray ; } ) ;
2020-06-26 15:33:47 +02:00
/* harmony import */ var _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 26 ) ;
2020-03-24 00:40:19 +01:00
function _unsupportedIterableToArray ( o , minLen ) {
if ( ! o ) return ;
if ( typeof o === "string" ) return Object ( _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ;
if ( n === "Object" && o . constructor ) n = o . constructor . name ;
2020-06-26 15:33:47 +02:00
if ( n === "Map" || n === "Set" ) return Array . from ( o ) ;
2020-03-24 00:40:19 +01:00
if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return Object ( _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
}
/***/ } ) ,
/***/ 35 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _iterableToArray ; } ) ;
function _iterableToArray ( iter ) {
2020-03-24 00:40:19 +01:00
if ( typeof Symbol !== "undefined" && Symbol . iterator in Object ( iter ) ) return Array . from ( iter ) ;
2020-01-22 23:06:21 +01:00
}
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 38 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-02-10 23:33:27 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayWithHoles ; } ) ;
function _arrayWithHoles ( arr ) {
if ( Array . isArray ( arr ) ) return arr ;
}
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 39 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _nonIterableRest ; } ) ;
function _nonIterableRest ( ) {
2020-03-24 00:40:19 +01:00
throw new TypeError ( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
2020-02-10 23:33:27 +01:00
}
/***/ } ) ,
2020-03-24 00:40:19 +01:00
/***/ 4 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "data" ] ; } ( ) ) ;
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 42 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-01-22 23:06:21 +01:00
"use strict" ;
var LEAF _KEY , hasWeakMap ;
/ * *
* Arbitrary value used as key for referencing cache object in WeakMap tree .
*
* @ type { Object }
* /
LEAF _KEY = { } ;
/ * *
* Whether environment supports WeakMap .
*
* @ type { boolean }
* /
hasWeakMap = typeof WeakMap !== 'undefined' ;
/ * *
* Returns the first argument as the sole entry in an array .
*
* @ param { * } value Value to return .
*
* @ return { Array } Value returned as entry in array .
* /
function arrayOf ( value ) {
return [ value ] ;
}
/ * *
* Returns true if the value passed is object - like , or false otherwise . A value
* is object - like if it can support property assignment , e . g . object or array .
*
* @ param { * } value Value to test .
*
* @ return { boolean } Whether value is object - like .
* /
function isObjectLike ( value ) {
return ! ! value && 'object' === typeof value ;
}
/ * *
* Creates and returns a new cache object .
*
* @ return { Object } Cache object .
* /
function createCache ( ) {
var cache = {
clear : function ( ) {
cache . head = null ;
} ,
} ;
return cache ;
}
/ * *
* Returns true if entries within the two arrays are strictly equal by
* reference from a starting index .
*
* @ param { Array } a First array .
* @ param { Array } b Second array .
* @ param { number } fromIndex Index from which to start comparison .
*
* @ return { boolean } Whether arrays are shallowly equal .
* /
function isShallowEqual ( a , b , fromIndex ) {
var i ;
if ( a . length !== b . length ) {
return false ;
}
for ( i = fromIndex ; i < a . length ; i ++ ) {
if ( a [ i ] !== b [ i ] ) {
return false ;
}
}
return true ;
}
/ * *
* Returns a memoized selector function . The getDependants function argument is
* called before the memoized selector and is expected to return an immutable
* reference or array of references on which the selector depends for computing
* its own return value . The memoize cache is preserved only as long as those
* dependant references remain the same . If getDependants returns a different
* reference ( s ) , the cache is cleared and the selector value regenerated .
*
* @ param { Function } selector Selector function .
* @ param { Function } getDependants Dependant getter returning an immutable
* reference or array of reference used in
* cache bust consideration .
*
* @ return { Function } Memoized selector .
* /
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( function ( selector , getDependants ) {
var rootCache , getCache ;
// Use object source as dependant if getter not provided
if ( ! getDependants ) {
getDependants = arrayOf ;
}
/ * *
* Returns the root cache . If WeakMap is supported , this is assigned to the
* root WeakMap cache set , otherwise it is a shared instance of the default
* cache object .
*
* @ return { ( WeakMap | Object ) } Root cache object .
* /
function getRootCache ( ) {
return rootCache ;
}
/ * *
* Returns the cache for a given dependants array . When possible , a WeakMap
* will be used to create a unique cache for each set of dependants . This
* is feasible due to the nature of WeakMap in allowing garbage collection
* to occur on entries where the key object is no longer referenced . Since
* WeakMap requires the key to be an object , this is only possible when the
* dependant is object - like . The root cache is created as a hierarchy where
* each top - level key is the first entry in a dependants set , the value a
* WeakMap where each key is the next dependant , and so on . This continues
* so long as the dependants are object - like . If no dependants are object -
* like , then the cache is shared across all invocations .
*
* @ see isObjectLike
*
* @ param { Array } dependants Selector dependants .
*
* @ return { Object } Cache object .
* /
function getWeakMapCache ( dependants ) {
var caches = rootCache ,
isUniqueByDependants = true ,
i , dependant , map , cache ;
for ( i = 0 ; i < dependants . length ; i ++ ) {
dependant = dependants [ i ] ;
// Can only compose WeakMap from object-like key.
if ( ! isObjectLike ( dependant ) ) {
isUniqueByDependants = false ;
break ;
}
// Does current segment of cache already have a WeakMap?
if ( caches . has ( dependant ) ) {
// Traverse into nested WeakMap.
caches = caches . get ( dependant ) ;
} else {
// Create, set, and traverse into a new one.
map = new WeakMap ( ) ;
caches . set ( dependant , map ) ;
caches = map ;
}
}
// We use an arbitrary (but consistent) object as key for the last item
// in the WeakMap to serve as our running cache.
if ( ! caches . has ( LEAF _KEY ) ) {
cache = createCache ( ) ;
cache . isUniqueByDependants = isUniqueByDependants ;
caches . set ( LEAF _KEY , cache ) ;
}
return caches . get ( LEAF _KEY ) ;
}
// Assign cache handler by availability of WeakMap
getCache = hasWeakMap ? getWeakMapCache : getRootCache ;
/ * *
* Resets root memoization cache .
* /
function clear ( ) {
rootCache = hasWeakMap ? new WeakMap ( ) : createCache ( ) ;
}
// eslint-disable-next-line jsdoc/check-param-names
/ * *
* The augmented selector call , considering first whether dependants have
* changed before passing it to underlying memoize function .
*
* @ param { Object } source Source object for derivation .
* @ param { ... * } extraArgs Additional arguments to pass to selector .
*
* @ return { * } Selector result .
* /
function callSelector ( /* source, ...extraArgs */ ) {
var len = arguments . length ,
cache , node , i , args , dependants ;
// Create copy of arguments (avoid leaking deoptimization).
args = new Array ( len ) ;
for ( i = 0 ; i < len ; i ++ ) {
args [ i ] = arguments [ i ] ;
}
dependants = getDependants . apply ( null , args ) ;
cache = getCache ( dependants ) ;
// If not guaranteed uniqueness by dependants (primitive type or lack
// of WeakMap support), shallow compare against last dependants and, if
// references have changed, destroy cache to recalculate result.
if ( ! cache . isUniqueByDependants ) {
if ( cache . lastDependants && ! isShallowEqual ( dependants , cache . lastDependants , 0 ) ) {
cache . clear ( ) ;
}
cache . lastDependants = dependants ;
}
node = cache . head ;
while ( node ) {
// Check whether node arguments match arguments
if ( ! isShallowEqual ( node . args , args , 1 ) ) {
node = node . next ;
continue ;
}
// At this point we can assume we've found a match
// Surface matched node to head if not already
if ( node !== cache . head ) {
// Adjust siblings to point to each other.
node . prev . next = node . next ;
if ( node . next ) {
node . next . prev = node . prev ;
}
node . next = cache . head ;
node . prev = null ;
cache . head . prev = node ;
cache . head = node ;
}
// Return immediately
return node . val ;
}
// No cached value found. Continue to insertion phase:
node = {
// Generate the result from original function
val : selector . apply ( null , args ) ,
} ;
// Avoid including the source object in the cache.
args [ 0 ] = null ;
node . args = args ;
// Don't need to check whether node is already head, since it would
// have been returned above already if it was
// Shift existing head down list
if ( cache . head ) {
cache . head . prev = node ;
node . next = cache . head ;
}
cache . head = node ;
return node . val ;
}
callSelector . getDependants = getDependants ;
callSelector . clear = clear ;
clear ( ) ;
return callSelector ;
} ) ;
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 456 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 13:50:29 +02:00
// ESM COMPAT FLAG
2020-01-22 23:06:21 +01:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2020-06-29 13:50:29 +02:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useShortcut" , function ( ) { return /* reexport */ use _shortcut ; } ) ;
// NAMESPACE OBJECT: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/actions.js
2020-01-22 23:06:21 +01:00
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "registerShortcut" , function ( ) { return registerShortcut ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "unregisterShortcut" , function ( ) { return unregisterShortcut ; } ) ;
2020-06-29 13:50:29 +02:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/selectors.js
2020-01-22 23:06:21 +01:00
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getShortcutKeyCombination" , function ( ) { return getShortcutKeyCombination ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getShortcutRepresentation" , function ( ) { return getShortcutRepresentation ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getShortcutDescription" , function ( ) { return getShortcutDescription ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getShortcutAliases" , function ( ) { return getShortcutAliases ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getAllShortcutRawKeyCombinations" , function ( ) { return getAllShortcutRawKeyCombinations ; } ) ;
2020-02-10 23:33:27 +01:00
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getCategoryShortcuts" , function ( ) { return getCategoryShortcuts ; } ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","data"]}
var external _this _wp _data _ = _ _webpack _require _ _ ( 4 ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
2020-02-06 22:03:31 +01:00
var defineProperty = _ _webpack _require _ _ ( 5 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":"lodash"}
var external _this _lodash _ = _ _webpack _require _ _ ( 2 ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/reducer.js
2020-02-06 22:03:31 +01:00
function ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2020-01-22 23:06:21 +01:00
/ * *
* External dependencies
* /
/ * *
* Reducer returning the registered shortcuts
*
* @ param { Object } state Current state .
* @ param { Object } action Dispatched action .
*
* @ return { Object } Updated state .
* /
function reducer ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
switch ( action . type ) {
case 'REGISTER_SHORTCUT' :
2020-02-06 22:03:31 +01:00
return _objectSpread ( { } , state , Object ( defineProperty [ "a" /* default */ ] ) ( { } , action . name , {
2020-01-22 23:06:21 +01:00
category : action . category ,
keyCombination : action . keyCombination ,
aliases : action . aliases ,
description : action . description
} ) ) ;
case 'UNREGISTER_SHORTCUT' :
return Object ( external _this _lodash _ [ "omit" ] ) ( state , action . name ) ;
}
return state ;
}
/* harmony default export */ var 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 .
*
* @ return { Object } action .
* /
function registerShortcut ( _ref ) {
var name = _ref . name ,
category = _ref . category ,
description = _ref . description ,
keyCombination = _ref . keyCombination ,
aliases = _ref . aliases ;
return {
type : 'REGISTER_SHORTCUT' ,
name : name ,
category : category ,
keyCombination : keyCombination ,
aliases : aliases ,
description : description
} ;
}
/ * *
* Returns an action object used to unregister a keyboard shortcut .
*
* @ param { string } name Shortcut name .
*
* @ return { Object } action .
* /
function unregisterShortcut ( name ) {
return {
type : 'UNREGISTER_SHORTCUT' ,
name : name
} ;
}
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
2020-07-07 16:43:35 +02:00
var slicedToArray = _ _webpack _require _ _ ( 13 ) ;
2020-02-10 23:33:27 +01:00
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
2020-07-07 16:43:35 +02:00
var toConsumableArray = _ _webpack _require _ _ ( 17 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
2020-07-07 16:43:35 +02:00
var rememo = _ _webpack _require _ _ ( 42 ) ;
2020-01-22 23:06:21 +01:00
// EXTERNAL MODULE: external {"this":["wp","keycodes"]}
2020-03-16 23:07:16 +01:00
var external _this _wp _keycodes _ = _ _webpack _require _ _ ( 22 ) ;
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/selectors.js
2020-02-10 23:33:27 +01:00
2020-01-22 23:06:21 +01:00
/ * *
* External dependencies
* /
/ * *
* 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 > }
* /
var EMPTY _ARRAY = [ ] ;
/ * *
* Shortcut formatting methods .
*
* @ property { WPKeycodeHandlerByModifier } display Display formatting .
* @ property { WPKeycodeHandlerByModifier } rawShortcut Raw shortcut formatting .
* @ property { WPKeycodeHandlerByModifier } ariaLabel ARIA label formatting .
* /
var FORMATTING _METHODS = {
display : external _this _wp _keycodes _ [ "displayShortcut" ] ,
raw : external _this _wp _keycodes _ [ "rawShortcut" ] ,
ariaLabel : external _this _wp _keycodes _ [ "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 .
*
* @ 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 ) .
*
* @ return { string ? } Shortcut representation .
* /
function getShortcutRepresentation ( state , name ) {
var representation = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : 'display' ;
var 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 .
*
* @ 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 .
*
* @ return { WPShortcutKeyCombination [ ] } Key combinations .
* /
function getShortcutAliases ( state , name ) {
return state [ name ] && state [ name ] . aliases ? state [ name ] . aliases : EMPTY _ARRAY ;
}
/ * *
* Returns the raw representation of all the keyboard combinations of a given shortcut name .
*
* @ param { Object } state Global state .
* @ param { string } name Shortcut name .
*
* @ return { string [ ] } Shortcuts .
* /
var getAllShortcutRawKeyCombinations = Object ( rememo [ "a" /* default */ ] ) ( function ( state , name ) {
return Object ( external _this _lodash _ [ "compact" ] ) ( [ getKeyCombinationRepresentation ( getShortcutKeyCombination ( state , name ) , 'raw' ) ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( getShortcutAliases ( state , name ) . map ( function ( combination ) {
return getKeyCombinationRepresentation ( combination , 'raw' ) ;
} ) ) ) ) ;
} , function ( state , name ) {
return [ state [ name ] ] ;
} ) ;
2020-02-10 23:33:27 +01:00
/ * *
* Returns the shortcut names list for a given category name .
*
* @ param { Object } state Global state .
* @ param { string } name Category name .
*
* @ return { string [ ] } Shortcut names .
* /
var getCategoryShortcuts = Object ( rememo [ "a" /* default */ ] ) ( function ( state , categoryName ) {
return Object . entries ( state ) . filter ( function ( _ref ) {
var _ref2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _ref , 2 ) ,
shortcut = _ref2 [ 1 ] ;
return shortcut . category === categoryName ;
} ) . map ( function ( _ref3 ) {
var _ref4 = Object ( slicedToArray [ "a" /* default */ ] ) ( _ref3 , 1 ) ,
name = _ref4 [ 0 ] ;
return name ;
} ) ;
} , function ( state ) {
return [ state ] ;
} ) ;
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/store/index.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
/* harmony default export */ var store = ( Object ( external _this _wp _data _ [ "registerStore" ] ) ( 'core/keyboard-shortcuts' , {
reducer : store _reducer ,
actions : actions _namespaceObject ,
selectors : selectors _namespaceObject
} ) ) ;
// EXTERNAL MODULE: external {"this":["wp","compose"]}
2020-06-26 15:33:47 +02:00
var external _this _wp _compose _ = _ _webpack _require _ _ ( 9 ) ;
2020-01-22 23:06:21 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/hooks/use-shortcut.js
/ * *
* WordPress dependencies
* /
/ * *
* Attach a keyboard shortcut handler .
*
* @ param { string } name Shortcut name .
* @ param { Function } callback Shortcut callback .
* @ param { Object } options Shortcut options .
* /
function useShortcut ( name , callback , options ) {
var shortcuts = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
return select ( 'core/keyboard-shortcuts' ) . getAllShortcutRawKeyCombinations ( name ) ;
} , [ name ] ) ;
Object ( external _this _wp _compose _ [ "useKeyboardShortcut" ] ) ( shortcuts , callback , options ) ;
}
/* harmony default export */ var use _shortcut = ( useShortcut ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/keyboard-shortcuts/build-module/index.js
/ * *
* Internal dependencies
* /
/***/ } ) ,
2020-02-06 22:03:31 +01:00
/***/ 5 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _defineProperty ; } ) ;
function _defineProperty ( obj , key , value ) {
if ( key in obj ) {
Object . defineProperty ( obj , key , {
value : value ,
enumerable : true ,
configurable : true ,
writable : true
} ) ;
} else {
obj [ key ] = value ;
}
return obj ;
}
2020-02-06 22:03:31 +01:00
/***/ } ) ,
2020-06-26 15:33:47 +02:00
/***/ 9 :
2020-02-06 22:03:31 +01:00
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "compose" ] ; } ( ) ) ;
2020-01-22 23:06:21 +01:00
/***/ } )
/******/ } ) ;