File "view.min.js.map"

Full Path: /home/pumpbmko/public_html/wp-content/plugins/gutenberg/build/block-library/blocks/navigation/view.min.js.map
File size: 10.8 KB
MIME-type: application/json
Charset: utf-8

{"version":3,"file":"./build/block-library/blocks/navigation/view.min.js","mappings":"mBAAA,MAAM,EAA+BA,OAAW,GAAiB,cCK3DC,EAAqB,CAC1B,UACA,gEACA,4CACA,8CACA,4CACA,oBACA,mCAMDC,SAASC,iBAAkB,SAAS,SAEpC,MAAM,MAAEC,EAAK,QAAEC,IAAYC,EAAAA,EAAAA,OAC1B,kBACA,CACCF,MAAO,CACN,iBAAIG,GAEH,MAAoB,aADRC,EAAAA,EAAAA,cACDC,MAAsBL,EAAMM,WACpC,SACA,IACJ,EACA,aAAIC,GAEH,MAAoB,aADRH,EAAAA,EAAAA,cACDC,MAAsBL,EAAMM,WACpC,OACA,IACJ,EACA,aAAIE,GACH,MAAMC,GAAML,EAAAA,EAAAA,cACZ,MAAoB,YAAbK,EAAIJ,MAAsBL,EAAMM,WACpCG,EAAID,UACJ,IACJ,EACA,cAAIF,GAEH,OACCI,OAAOC,OAAQX,EAAMY,cAAeC,OAAQC,SAC1CC,OAAS,CAEb,EACA,gBAAIH,GACH,MAAMH,GAAML,EAAAA,EAAAA,cACZ,MAAoB,YAAbK,EAAIJ,KACRI,EAAIO,gBACJP,EAAIQ,eACR,GAEDhB,QAAS,CACRiB,eAAAA,GACC,MAAM,KAAEb,EAAI,gBAAEW,IAAoBZ,EAAAA,EAAAA,cAExB,YAATC,GAGa,IADbK,OAAOC,OAAQK,GAAmB,CAAC,GAAIH,OAAQC,SAC7CC,QAEFd,EAAQkB,SAAU,QAEpB,EACAC,gBAAAA,GACC,MAAM,KAAEf,EAAI,gBAAEW,IAAoBZ,EAAAA,EAAAA,cAExB,YAATC,GAGa,IADbK,OAAOC,OAAQK,GAAmB,CAAC,GAAIH,OAAQC,SAC7CC,QAEFd,EAAQoB,UAAW,QAErB,EACAC,eAAAA,GACC,MAAMb,GAAML,EAA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aAAcgC,IAAiB,EACvB,YAATvC,GAEJP,SAAS+C,gBAAgBC,UAAUC,IAAK,iBAE1C,EAEA1B,SAAAA,CAAW2B,EAAe,SACzB,MAAMvC,GAAML,EAAAA,EAAAA,cACZJ,EAAMY,aAAcoC,IAAiB,EAE9BhD,EAAMM,aAEXG,EAAI+B,OAAOE,SAAU9C,OAAOE,SAAS+B,gBAErCpB,EAAIgB,eAAeK,QAEpBrB,EAAI+B,MAAQ,KACZ/B,EAAIgB,cAAgB,KACF,YAAbhB,EAAIJ,MACRP,SAAS+C,gBAAgBC,UAAUG,OAClC,kBAIJ,GAEDC,UAAW,CACVC,QAAAA,GACC,MAAM1C,GAAML,EAAAA,EAAAA,eACN,IAAEmB,IAAQC,EAAAA,EAAAA,cAChB,GAAKxB,EAAMM,WAAa,CACvB,MAAM8C,EACL7B,EAAI8B,iBAAkBxD,GACvBY,EAAI+B,MAAQjB,EACZd,EAAIyB,sBAAwBkB,EAAmB,GAC/C3C,EAAI0B,qBACHiB,EAAmBA,EAAkBrC,OAAS,EAChD,CACD,EACAuC,iBAAAA,GACC,MAAM,IAAE/B,IAAQC,EAAAA,EAAAA,cAChB,GAAKxB,EAAMM,WAAa,CACvB,MAAM8C,EACL7B,EAAI8B,iBAAkBxD,GACvBuD,IAAqB,IAAKtB,OAC3B,CACD,IAGF,CAAEyB,MAAM,G","sources":["webpack://wp/external window [\"wp\",\"interactivity\"]","webpack://wp/./packages/block-library/build-module/navigation/@wordpress/block-library/src/navigation/view.js"],"sourcesContent":["const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"interactivity\"];","/**\n * WordPress dependencies\n */\nimport { store, getContext, getElement } from '@wordpress/interactivity';\n\nconst focusableSelectors = [\n\t'a[href]',\n\t'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n\t'select:not([disabled]):not([aria-hidden])',\n\t'textarea:not([disabled]):not([aria-hidden])',\n\t'button:not([disabled]):not([aria-hidden])',\n\t'[contenteditable]',\n\t'[tabindex]:not([tabindex^=\"-\"])',\n];\n\n// This is a fix for Safari in iOS/iPadOS. Without it, Safari doesn't focus out\n// when the user taps in the body. It can be removed once we add an overlay to\n// capture the clicks, instead of relying on the focusout event.\ndocument.addEventListener( 'click', () => {} );\n\nconst { state, actions } = store(\n\t'core/navigation',\n\t{\n\t\tstate: {\n\t\t\tget roleAttribute() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\treturn ctx.type === 'overlay' && state.isMenuOpen\n\t\t\t\t\t? 'dialog'\n\t\t\t\t\t: null;\n\t\t\t},\n\t\t\tget ariaModal() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\treturn ctx.type === 'overlay' && state.isMenuOpen\n\t\t\t\t\t? 'true'\n\t\t\t\t\t: null;\n\t\t\t},\n\t\t\tget ariaLabel() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\treturn ctx.type === 'overlay' && state.isMenuOpen\n\t\t\t\t\t? ctx.ariaLabel\n\t\t\t\t\t: null;\n\t\t\t},\n\t\t\tget isMenuOpen() {\n\t\t\t\t// The menu is opened if either `click`, `hover` or `focus` is true.\n\t\t\t\treturn (\n\t\t\t\t\tObject.values( state.menuOpenedBy ).filter( Boolean )\n\t\t\t\t\t\t.length > 0\n\t\t\t\t);\n\t\t\t},\n\t\t\tget menuOpenedBy() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\treturn ctx.type === 'overlay'\n\t\t\t\t\t? ctx.overlayOpenedBy\n\t\t\t\t\t: ctx.submenuOpenedBy;\n\t\t\t},\n\t\t},\n\t\tactions: {\n\t\t\topenMenuOnHover() {\n\t\t\t\tconst { type, overlayOpenedBy } = getContext();\n\t\t\t\tif (\n\t\t\t\t\ttype === 'submenu' &&\n\t\t\t\t\t// Only open on hover if the overlay is closed.\n\t\t\t\t\tObject.values( overlayOpenedBy || {} ).filter( Boolean )\n\t\t\t\t\t\t.length === 0\n\t\t\t\t) {\n\t\t\t\t\tactions.openMenu( 'hover' );\n\t\t\t\t}\n\t\t\t},\n\t\t\tcloseMenuOnHover() {\n\t\t\t\tconst { type, overlayOpenedBy } = getContext();\n\t\t\t\tif (\n\t\t\t\t\ttype === 'submenu' &&\n\t\t\t\t\t// Only close on hover if the overlay is closed.\n\t\t\t\t\tObject.values( overlayOpenedBy || {} ).filter( Boolean )\n\t\t\t\t\t\t.length === 0\n\t\t\t\t) {\n\t\t\t\t\tactions.closeMenu( 'hover' );\n\t\t\t\t}\n\t\t\t},\n\t\t\topenMenuOnClick() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tctx.previousFocus = ref;\n\t\t\t\tactions.openMenu( 'click' );\n\t\t\t},\n\t\t\tcloseMenuOnClick() {\n\t\t\t\tactions.closeMenu( 'click' );\n\t\t\t\tactions.closeMenu( 'focus' );\n\t\t\t},\n\t\t\topenMenuOnFocus() {\n\t\t\t\tactions.openMenu( 'focus' );\n\t\t\t},\n\t\t\ttoggleMenuOnClick() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\t// Safari won't send focus to the clicked element, so we need to manually place it: https://bugs.webkit.org/show_bug.cgi?id=22261\n\t\t\t\tif ( window.document.activeElement !== ref ) {\n\t\t\t\t\tref.focus();\n\t\t\t\t}\n\t\t\t\tconst { menuOpenedBy } = state;\n\t\t\t\tif ( menuOpenedBy.click || menuOpenedBy.focus ) {\n\t\t\t\t\tactions.closeMenu( 'click' );\n\t\t\t\t\tactions.closeMenu( 'focus' );\n\t\t\t\t} else {\n\t\t\t\t\tctx.previousFocus = ref;\n\t\t\t\t\tactions.openMenu( 'click' );\n\t\t\t\t}\n\t\t\t},\n\t\t\thandleMenuKeydown( event ) {\n\t\t\t\tconst { type, firstFocusableElement, lastFocusableElement } =\n\t\t\t\t\tgetContext();\n\t\t\t\tif ( state.menuOpenedBy.click ) {\n\t\t\t\t\t// If Escape close the menu.\n\t\t\t\t\tif ( event?.key === 'Escape' ) {\n\t\t\t\t\t\tactions.closeMenu( 'click' );\n\t\t\t\t\t\tactions.closeMenu( 'focus' );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Trap focus if it is an overlay (main menu).\n\t\t\t\t\tif ( type === 'overlay' && event.key === 'Tab' ) {\n\t\t\t\t\t\t// If shift + tab it change the direction.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tevent.shiftKey &&\n\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\tfirstFocusableElement\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tlastFocusableElement.focus();\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t! event.shiftKey &&\n\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\tlastFocusableElement\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tfirstFocusableElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\thandleMenuFocusout( event ) {\n\t\t\t\tconst { modal, type } = getContext();\n\t\t\t\t// If focus is outside modal, and in the document, close menu\n\t\t\t\t// event.target === The element losing focus\n\t\t\t\t// event.relatedTarget === The element receiving focus (if any)\n\t\t\t\t// When focusout is outside the document,\n\t\t\t\t// `window.document.activeElement` doesn't change.\n\n\t\t\t\t// The event.relatedTarget is null when something outside the navigation menu is clicked. This is only necessary for Safari.\n\t\t\t\tif (\n\t\t\t\t\tevent.relatedTarget === null ||\n\t\t\t\t\t( ! modal?.contains( event.relatedTarget ) &&\n\t\t\t\t\t\tevent.target !== window.document.activeElement &&\n\t\t\t\t\t\ttype === 'submenu' )\n\t\t\t\t) {\n\t\t\t\t\tactions.closeMenu( 'click' );\n\t\t\t\t\tactions.closeMenu( 'focus' );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\topenMenu( menuOpenedOn = 'click' ) {\n\t\t\t\tconst { type } = getContext();\n\t\t\t\tstate.menuOpenedBy[ menuOpenedOn ] = true;\n\t\t\t\tif ( type === 'overlay' ) {\n\t\t\t\t\t// Add a `has-modal-open` class to the <html> root.\n\t\t\t\t\tdocument.documentElement.classList.add( 'has-modal-open' );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tcloseMenu( menuClosedOn = 'click' ) {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\tstate.menuOpenedBy[ menuClosedOn ] = false;\n\t\t\t\t// Check if the menu is still open or not.\n\t\t\t\tif ( ! state.isMenuOpen ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tctx.modal?.contains( window.document.activeElement )\n\t\t\t\t\t) {\n\t\t\t\t\t\tctx.previousFocus?.focus();\n\t\t\t\t\t}\n\t\t\t\t\tctx.modal = null;\n\t\t\t\t\tctx.previousFocus = null;\n\t\t\t\t\tif ( ctx.type === 'overlay' ) {\n\t\t\t\t\t\tdocument.documentElement.classList.remove(\n\t\t\t\t\t\t\t'has-modal-open'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tcallbacks: {\n\t\t\tinitMenu() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tif ( state.isMenuOpen ) {\n\t\t\t\t\tconst focusableElements =\n\t\t\t\t\t\tref.querySelectorAll( focusableSelectors );\n\t\t\t\t\tctx.modal = ref;\n\t\t\t\t\tctx.firstFocusableElement = focusableElements[ 0 ];\n\t\t\t\t\tctx.lastFocusableElement =\n\t\t\t\t\t\tfocusableElements[ focusableElements.length - 1 ];\n\t\t\t\t}\n\t\t\t},\n\t\t\tfocusFirstElement() {\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tif ( state.isMenuOpen ) {\n\t\t\t\t\tconst focusableElements =\n\t\t\t\t\t\tref.querySelectorAll( focusableSelectors );\n\t\t\t\t\tfocusableElements?.[ 0 ]?.focus();\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n\t{ lock: true }\n);\n"],"names":["window","focusableSelectors","document","addEventListener","state","actions","store","roleAttribute","getContext","type","isMenuOpen","ariaModal","ariaLabel","ctx","Object","values","menuOpenedBy","filter","Boolean","length","overlayOpenedBy","submenuOpenedBy","openMenuOnHover","openMenu","closeMenuOnHover","closeMenu","openMenuOnClick","ref","getElement","previousFocus","closeMenuOnClick","openMenuOnFocus","toggleMenuOnClick","activeElement","focus","click","handleMenuKeydown","event","firstFocusableElement","lastFocusableElement","key","shiftKey","preventDefault","handleMenuFocusout","modal","relatedTarget","contains","target","menuOpenedOn","documentElement","classList","add","menuClosedOn","remove","callbacks","initMenu","focusableElements","querySelectorAll","focusFirstElement","lock"],"sourceRoot":""}