Current File : /home/resuelf/www/wp-content/plugins/gutenberg/build/interactivity/search.min.js
import*as e from"@wordpress/interactivity";var t,n,r={d:function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},o=(t={getContext:()=>e.getContext,getElement:()=>e.getElement,store:()=>e.store},n={},r.d(n,t),n);const{actions:a}=(0,o.store)("core/search",{state:{get ariaLabel(){const{isSearchInputVisible:e,ariaLabelCollapsed:t,ariaLabelExpanded:n}=(0,o.getContext)();return e?n:t},get ariaControls(){const{isSearchInputVisible:e,inputId:t}=(0,o.getContext)();return e?null:t},get type(){const{isSearchInputVisible:e}=(0,o.getContext)();return e?"submit":"button"},get tabindex(){const{isSearchInputVisible:e}=(0,o.getContext)();return e?"0":"-1"}},actions:{openSearchInput(e){const t=(0,o.getContext)(),{ref:n}=(0,o.getElement)();t.isSearchInputVisible||(e.preventDefault(),t.isSearchInputVisible=!0,n.parentElement.querySelector("input").focus())},closeSearchInput(){(0,o.getContext)().isSearchInputVisible=!1},handleSearchKeydown(e){const{ref:t}=(0,o.getElement)();"Escape"===e?.key&&(a.closeSearchInput(),t.querySelector("button").focus())},handleSearchFocusout(e){const{ref:t}=(0,o.getElement)();t.contains(e.relatedTarget)||e.target===window.document.activeElement||a.closeSearchInput()}}});
//# sourceMappingURL=search.min.js.map