WordPress/wp-includes/js/dist/widgets.min.js
noisysocks c2d0fb2040 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Navigation: Fix click-button size, submenu directions, scrollbars.
- Group - Fix overzealous regex when restoring inner containers
- Babel Preset: Update Babel packages to 7.16 version
- theme.json: adds a setting property that enables some other ones
- Polish metabox container.
- Fix submenu justification and spacer orientation.
- Fix Gutenberg 11.8.2 in WordPress trunk
- Strip meta tags from pasted links in Chromium
- Hide visilibility and status for navigation posts
- Navigation: Refactor and simplify setup state.
- Nav block menu switcher - decode HTML entities and utilise accessible markup pattern
- Rename fse_navigation_area to wp_navigation_area
- theme.json: adds a setting property that enables some other ones
- Revert "theme.json: adds a setting property that enables some other ones"
- Skip flaky image block test
- WordPress/gutenberg@3c935c4
- React to any errors coming up in gutenberg_migrate_menu_to_navigation_post
- Return wp error from wp_insert_post
- Fix not transforming logical assignments for packages

See #54337.

Built from https://develop.svn.wordpress.org/trunk@52161


git-svn-id: http://core.svn.wordpress.org/trunk@51753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 12:50:17 +00:00

7 lines
22 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.widgets=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="4g8P")}({"1ZqX":function(e,t){e.exports=window.wp.data},"4g8P":function(e,t,n){"use strict";n.r(t),n.d(t,"MoveToWidgetArea",(function(){return q})),n.d(t,"getWidgetIdFromBlock",(function(){return X})),n.d(t,"addWidgetIdToBlock",(function(){return Y})),n.d(t,"registerLegacyWidgetBlock",(function(){return J})),n.d(t,"registerWidgetGroupBlock",(function(){return ee})),n.d(t,"registerLegacyWidgetVariations",(function(){return K}));var i={};n.r(i),n.d(i,"metadata",(function(){return D})),n.d(i,"name",(function(){return W})),n.d(i,"settings",(function(){return A}));var r={};n.r(r),n.d(r,"metadata",(function(){return Q})),n.d(r,"name",(function(){return Z})),n.d(r,"settings",(function(){return U}));var o=n("HSyU"),a=n("GRId"),c=n("Tqx9");var s=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{d:"M6 3H8V5H16V3H18V5C19.1046 5 20 5.89543 20 7V19C20 20.1046 19.1046 21 18 21H6C4.89543 21 4 20.1046 4 19V7C4 5.89543 4.89543 5 6 5V3ZM18 6.5H6C5.72386 6.5 5.5 6.72386 5.5 7V8H18.5V7C18.5 6.72386 18.2761 6.5 18 6.5ZM18.5 9.5H5.5V19C5.5 19.2761 5.72386 19.5 6 19.5H18C18.2761 19.5 18.5 19.2761 18.5 19V9.5ZM11 11H13V13H11V11ZM7 11V13H9V11H7ZM15 13V11H17V13H15Z"})),l=n("TSYQ"),d=n.n(l),u=n("axFQ"),m=n("tI+e");var h=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})),b=n("l3Sj"),g=n("1ZqX"),w=n("jZUy");function p(e){let{selectedId:t,onSelect:n}=e;const i=Object(g.useSelect)(e=>{var t,n,i;const r=null!==(t=null===(n=e(u.store).getSettings())||void 0===n?void 0:n.widgetTypesToHideFromLegacyWidgetBlock)&&void 0!==t?t:[];return null===(i=e(w.store).getWidgetTypes({per_page:-1}))||void 0===i?void 0:i.filter(e=>!r.includes(e.id))},[]);return i?0===i.length?Object(b.__)("There are no widgets available."):Object(a.createElement)(m.SelectControl,{label:Object(b.__)("Select a legacy widget to display:"),value:null!=t?t:"",options:[{value:"",label:Object(b.__)("Select widget")},...i.map(e=>({value:e.id,label:e.name}))],onChange:e=>{if(e){const t=i.find(t=>t.id===e);n({selectedId:t.id,isMulti:t.is_multi})}else n({selectedId:null})}}):Object(a.createElement)(m.Spinner,null)}function f(e){let{name:t,description:n}=e;return Object(a.createElement)("div",{className:"wp-block-legacy-widget-inspector-card"},Object(a.createElement)("h3",{className:"wp-block-legacy-widget-inspector-card__name"},t),Object(a.createElement)("span",null,n))}var v=n("onLe"),j=n("K9lf"),O=n("YLtl"),y=n("ywyh"),_=n.n(y);class E{constructor(e){let{id:t,idBase:n,instance:i,onChangeInstance:r,onChangeHasPreview:o,onError:a}=e;this.id=t,this.idBase=n,this._instance=i,this._hasPreview=null,this.onChangeInstance=r,this.onChangeHasPreview=o,this.onError=a,this.number=++k,this.handleFormChange=Object(O.debounce)(this.handleFormChange.bind(this),200),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.initDOM(),this.bindEvents(),this.loadContent()}destroy(){this.unbindEvents(),this.element.remove()}initDOM(){var e,t;this.element=B("div",{class:"widget open"},[B("div",{class:"widget-inside"},[this.form=B("form",{class:"form",method:"post"},[B("input",{class:"widget-id",type:"hidden",name:"widget-id",value:null!==(e=this.id)&&void 0!==e?e:`${this.idBase}-${this.number}`}),B("input",{class:"id_base",type:"hidden",name:"id_base",value:null!==(t=this.idBase)&&void 0!==t?t:this.id}),B("input",{class:"widget-width",type:"hidden",name:"widget-width",value:"250"}),B("input",{class:"widget-height",type:"hidden",name:"widget-height",value:"200"}),B("input",{class:"widget_number",type:"hidden",name:"widget_number",value:this.idBase?this.number.toString():""}),this.content=B("div",{class:"widget-content"}),this.id&&B("button",{class:"button is-primary",type:"submit"},Object(b.__)("Save"))])])])}bindEvents(){if(window.jQuery){const{jQuery:e}=window;e(this.form).on("change",null,this.handleFormChange),e(this.form).on("input",null,this.handleFormChange),e(this.form).on("submit",this.handleFormSubmit)}else this.form.addEventListener("change",this.handleFormChange),this.form.addEventListener("input",this.handleFormChange),this.form.addEventListener("submit",this.handleFormSubmit)}unbindEvents(){if(window.jQuery){const{jQuery:e}=window;e(this.form).off("change",null,this.handleFormChange),e(this.form).off("input",null,this.handleFormChange),e(this.form).off("submit",this.handleFormSubmit)}else this.form.removeEventListener("change",this.handleFormChange),this.form.removeEventListener("input",this.handleFormChange),this.form.removeEventListener("submit",this.handleFormSubmit)}async loadContent(){try{if(this.id){const{form:e}=await C(this.id);this.content.innerHTML=e}else if(this.idBase){const{form:e,preview:t}=await S({idBase:this.idBase,instance:this.instance,number:this.number});if(this.content.innerHTML=e,this.hasPreview=!T(t),!this.instance.hash){const{instance:e}=await S({idBase:this.idBase,instance:this.instance,number:this.number,formData:I(this.form)});this.instance=e}}if(window.jQuery){const{jQuery:e}=window;e(document).trigger("widget-added",[e(this.element)])}}catch(e){this.onError(e)}}handleFormChange(){this.idBase&&this.saveForm()}handleFormSubmit(e){e.preventDefault(),this.saveForm()}async saveForm(){const e=I(this.form);try{if(this.id){const{form:t}=await C(this.id,e);if(this.content.innerHTML=t,window.jQuery){const{jQuery:e}=window;e(document).trigger("widget-updated",[e(this.element)])}}else if(this.idBase){const{instance:t,preview:n}=await S({idBase:this.idBase,instance:this.instance,number:this.number,formData:e});this.instance=t,this.hasPreview=!T(n)}}catch(e){this.onError(e)}}get instance(){return this._instance}set instance(e){this._instance!==e&&(this._instance=e,this.onChangeInstance(e))}get hasPreview(){return this._hasPreview}set hasPreview(e){this._hasPreview!==e&&(this._hasPreview=e,this.onChangeHasPreview(e))}}let k=0;function B(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i=document.createElement(e);for(const[e,n]of Object.entries(t))i.setAttribute(e,n);if(Array.isArray(n))for(const e of n)e&&i.appendChild(e);else"string"==typeof n&&(i.innerText=n);return i}async function C(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t=n?await _()({path:`/wp/v2/widgets/${e}?context=edit`,method:"PUT",data:{form_data:n}}):await _()({path:`/wp/v2/widgets/${e}?context=edit`,method:"GET"}),{form:t.rendered_form}}async function S(e){let{idBase:t,instance:n,number:i,formData:r=null}=e;const o=await _()({path:`/wp/v2/widget-types/${t}/encode`,method:"POST",data:{instance:n,number:i,form_data:r}});return{instance:o.instance,form:o.form,preview:o.preview}}function T(e){const t=document.createElement("div");return t.innerHTML=e,x(t)}function x(e){switch(e.nodeType){case e.TEXT_NODE:return""===e.nodeValue.trim();case e.ELEMENT_NODE:return!["AUDIO","CANVAS","EMBED","IFRAME","IMG","MATH","OBJECT","SVG","VIDEO"].includes(e.tagName)&&(!e.hasChildNodes()||Array.from(e.childNodes).every(x));default:return!0}}function I(e){return new window.URLSearchParams(Array.from(new window.FormData(e))).toString()}function M(e){let{title:t,isVisible:n,id:i,idBase:r,instance:o,isWide:c,onChangeInstance:s,onChangeHasPreview:l}=e;const u=Object(a.useRef)(),h=Object(j.useViewportMatch)("small"),w=Object(a.useRef)(new Set),p=Object(a.useRef)(new Set),{createNotice:f}=Object(g.useDispatch)(v.store);return Object(a.useEffect)(()=>{if(p.current.has(o))return void p.current.delete(o);const e=new E({id:i,idBase:r,instance:o,onChangeInstance(e){w.current.add(o),p.current.add(e),s(e)},onChangeHasPreview:l,onError(e){window.console.error(e),f("error",Object(b.sprintf)(Object(b.__)('The "%s" block was affected by errors and may not function properly. Check the developer tools for more details.'),r||i))}});return u.current.appendChild(e.element),()=>{w.current.has(o)?w.current.delete(o):e.destroy()}},[i,r,o,s,l,h]),c&&h?Object(a.createElement)("div",{className:d()({"wp-block-legacy-widget__container":n})},n&&Object(a.createElement)("h3",{className:"wp-block-legacy-widget__edit-form-title"},t),Object(a.createElement)(m.Popover,{focusOnMount:!1,position:"middle right",__unstableForceXAlignment:!0},Object(a.createElement)("div",{ref:u,className:"wp-block-legacy-widget__edit-form",hidden:!n}))):Object(a.createElement)("div",{ref:u,className:"wp-block-legacy-widget__edit-form",hidden:!n},Object(a.createElement)("h3",{className:"wp-block-legacy-widget__edit-form-title"},t))}function P(e){let{idBase:t,instance:n,isVisible:i}=e;const[r,o]=Object(a.useState)(!1),[c,s]=Object(a.useState)("");Object(a.useEffect)(()=>{const e=void 0===window.AbortController?void 0:new window.AbortController;return async function(){const i=`/wp/v2/widget-types/${t}/render`;return await _()({path:i,method:"POST",signal:null==e?void 0:e.signal,data:n?{instance:n}:{}})}().then(e=>{s(e.preview)}).catch(e=>{if("AbortError"!==e.name)throw e}),()=>null==e?void 0:e.abort()},[t,n]);const l=Object(j.useRefEffect)(e=>{if(!r)return;function t(){const t=Math.max(e.contentDocument.documentElement.offsetHeight,e.contentDocument.body.offsetHeight);e.style.height=t+"px"}const{IntersectionObserver:n}=e.ownerDocument.defaultView,i=new n(e=>{let[n]=e;n.isIntersecting&&t()},{threshold:1});return i.observe(e),e.addEventListener("load",t),()=>{i.disconnect(),e.removeEventListener("load",t)}},[r]);return Object(a.createElement)(a.Fragment,null,i&&!r&&Object(a.createElement)(m.Placeholder,null,Object(a.createElement)(m.Spinner,null)),Object(a.createElement)("div",{className:d()("wp-block-legacy-widget__edit-preview",{"is-offscreen":!i||!r})},Object(a.createElement)(m.Disabled,null,Object(a.createElement)("iframe",{ref:l,className:"wp-block-legacy-widget__edit-preview-iframe",tabIndex:"-1",title:Object(b.__)("Legacy Widget Preview"),srcDoc:c,onLoad:e=>{e.target.contentDocument.body.style.overflow="hidden",o(!0)},height:100}))))}function H(e){let{name:t}=e;return Object(a.createElement)("div",{className:"wp-block-legacy-widget__edit-no-preview"},t&&Object(a.createElement)("h3",null,t),Object(a.createElement)("p",null,Object(b.__)("No preview available.")))}function V(e){let{clientId:t,rawInstance:n}=e;const{replaceBlocks:i}=Object(g.useDispatch)(u.store);return Object(a.createElement)(m.ToolbarButton,{onClick:()=>{n.title?i(t,[Object(o.createBlock)("core/heading",{content:n.title}),...Object(o.rawHandler)({HTML:n.text})]):i(t,Object(o.rawHandler)({HTML:n.text}))}},Object(b.__)("Convert to blocks"))}function F(e){let{attributes:{id:t,idBase:n},setAttributes:i}=e;return Object(a.createElement)(m.Placeholder,{icon:Object(a.createElement)(u.BlockIcon,{icon:h}),label:Object(b.__)("Legacy Widget")},Object(a.createElement)(p,{selectedId:null!=t?t:n,onSelect:e=>{let{selectedId:t,isMulti:n}=e;i(t?n?{id:null,idBase:t,instance:{}}:{id:t,idBase:null,instance:null}:{id:null,idBase:null,instance:null})}}))}function L(e){let{attributes:{id:t,idBase:n,instance:i},setAttributes:r,clientId:o,isSelected:c,isWide:s=!1}=e;const[l,d]=Object(a.useState)(null),{widgetType:p,hasResolvedWidgetType:v,isNavigationMode:j}=Object(g.useSelect)(e=>{const i=null!=t?t:n;return{widgetType:e(w.store).getWidgetType(i),hasResolvedWidgetType:e(w.store).hasFinishedResolution("getWidgetType",[i]),isNavigationMode:e(u.store).isNavigationMode()}},[t,n]),O=Object(a.useCallback)(e=>{r({instance:e})},[]);if(!p&&v)return Object(a.createElement)(m.Placeholder,{icon:Object(a.createElement)(u.BlockIcon,{icon:h}),label:Object(b.__)("Legacy Widget")},Object(b.__)("Widget is missing."));if(!v)return Object(a.createElement)(m.Placeholder,null,Object(a.createElement)(m.Spinner,null));const y=!n||!j&&c?"edit":"preview";return Object(a.createElement)(a.Fragment,null,"text"===n&&Object(a.createElement)(u.BlockControls,{group:"other"},Object(a.createElement)(V,{clientId:o,rawInstance:i.raw})),Object(a.createElement)(u.InspectorControls,null,Object(a.createElement)(f,{name:p.name,description:p.description})),Object(a.createElement)(M,{title:p.name,isVisible:"edit"===y,id:t,idBase:n,instance:i,isWide:s,onChangeInstance:O,onChangeHasPreview:d}),n&&Object(a.createElement)(a.Fragment,null,null===l&&"preview"===y&&Object(a.createElement)(m.Placeholder,null,Object(a.createElement)(m.Spinner,null)),!0===l&&Object(a.createElement)(P,{idBase:n,instance:i,isVisible:"preview"===y}),!1===l&&"preview"===y&&Object(a.createElement)(H,{name:p.name})))}var N={to:[{block:"core/calendar",widget:"calendar"},{block:"core/search",widget:"search"},{block:"core/html",widget:"custom_html",transform:e=>{let{content:t}=e;return{content:t}}},{block:"core/archives",widget:"archives",transform:e=>{let{count:t,dropdown:n}=e;return{displayAsDropdown:!!n,showPostCounts:!!t}}},{block:"core/latest-posts",widget:"recent-posts",transform:e=>{let{show_date:t,number:n}=e;return{displayPostDate:!!t,postsToShow:n}}},{block:"core/latest-comments",widget:"recent-comments",transform:e=>{let{number:t}=e;return{commentsToShow:t}}},{block:"core/tag-cloud",widget:"tag_cloud",transform:e=>{let{taxonomy:t,count:n}=e;return{showTagCounts:!!n,taxonomy:t}}},{block:"core/categories",widget:"categories",transform:e=>{let{count:t,dropdown:n,hierarchical:i}=e;return{displayAsDropdown:!!n,showPostCounts:!!t,showHierarchy:!!i}}},{block:"core/audio",widget:"media_audio",transform:e=>{let{url:t,preload:n,loop:i,attachment_id:r}=e;return{src:t,id:r,preload:n,loop:i}}},{block:"core/video",widget:"media_video",transform:e=>{let{url:t,preload:n,loop:i,attachment_id:r}=e;return{src:t,id:r,preload:n,loop:i}}},{block:"core/image",widget:"media_image",transform:e=>{let{alt:t,attachment_id:n,caption:i,height:r,link_classes:o,link_rel:a,link_target_blank:c,link_type:s,link_url:l,size:d,url:u,width:m}=e;return{alt:t,caption:i,height:r,id:n,link:l,linkClass:o,linkDestination:s,linkTarget:c?"_blank":void 0,rel:a,sizeSlug:d,url:u,width:m}}},{block:"core/gallery",widget:"media_gallery",transform:e=>{let{ids:t,link_type:n,size:i,number:r}=e;return{ids:t,columns:r,linkTo:n,sizeSlug:i,images:t.map(e=>({id:e}))}}},{block:"core/rss",widget:"rss",transform:e=>{let{url:t,show_author:n,show_date:i,show_summary:r,items:o}=e;return{feedURL:t,displayAuthor:!!n,displayDate:!!i,displayExcerpt:!!r,itemsToShow:o}}}].map(e=>{let{block:t,widget:n,transform:i}=e;return{type:"block",blocks:[t],isMatch:e=>{let{idBase:t,instance:i}=e;return t===n&&!(null==i||!i.raw)},transform:e=>{var n;let{instance:r}=e;const a=Object(o.createBlock)(t,i?i(r.raw):void 0);return null!==(n=r.raw)&&void 0!==n&&n.title?[Object(o.createBlock)("core/heading",{content:r.raw.title}),a]:a}}})};const D={apiVersion:2,name:"core/legacy-widget",title:"Legacy Widget",category:"widgets",description:"Display a legacy widget.",textdomain:"default",attributes:{id:{type:"string",default:null},idBase:{type:"string",default:null},instance:{type:"object",default:null}},supports:{html:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-legacy-widget-editor"},{name:W}=D,A={icon:s,edit:function(e){const{id:t,idBase:n}=e.attributes,{isWide:i=!1}=e,r=Object(u.useBlockProps)({className:d()({"is-wide-widget":i})});return Object(a.createElement)("div",r,t||n?Object(a.createElement)(L,e):Object(a.createElement)(F,e))},transforms:N};var G=n("u6za");function R(e){let{clientId:t}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.Placeholder,{className:"wp-block-widget-group__placeholder",icon:Object(a.createElement)(u.BlockIcon,{icon:G.a}),label:Object(b.__)("Widget Group")},Object(a.createElement)(u.ButtonBlockAppender,{rootClientId:t})),Object(a.createElement)(u.InnerBlocks,{renderAppender:!1}))}function z(e){var t;let{attributes:n,setAttributes:i}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(u.RichText,{tagName:"h2",className:"widget-title",allowedFormats:[],placeholder:Object(b.__)("Title"),value:null!==(t=n.title)&&void 0!==t?t:"",onChange:e=>i({title:e})}),Object(a.createElement)(u.InnerBlocks,null))}const Q={apiVersion:2,name:"core/widget-group",category:"widgets",attributes:{title:{type:"string"}},supports:{html:!1,inserter:!0,customClassName:!0,reusable:!1},editorStyle:"wp-block-widget-group-editor",style:"wp-block-widget-group"},{name:Z}=Q,U={title:Object(b.__)("Widget Group"),description:Object(b.__)("Create a classic widget layout with a title thats styled by your theme for your widget areas."),icon:G.a,__experimentalLabel:e=>{let{name:t}=e;return t},edit:function(e){const{clientId:t}=e,{innerBlocks:n}=Object(g.useSelect)(e=>e(u.store).getBlock(t),[t]);return Object(a.createElement)("div",Object(u.useBlockProps)({className:"widget"}),0===n.length?Object(a.createElement)(R,e):Object(a.createElement)(z,e))},save:function(e){let{attributes:t}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(u.RichText.Content,{tagName:"h2",className:"widget-title",value:t.title}),Object(a.createElement)(u.InnerBlocks.Content,null))},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:(e,t)=>!t.some(e=>"core/widget-group"===e.name),__experimentalConvert(e){let t=[...e.map(e=>Object(o.createBlock)(e.name,e.attributes,e.innerBlocks))];const n="core/heading"===t[0].name?t[0]:null;return t=t.filter(e=>e!==n),Object(o.createBlock)("core/widget-group",{...n&&{title:n.attributes.content}},t)}}]}};var $=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"}));function q(e){let{currentWidgetAreaId:t,widgetAreas:n,onSelect:i}=e;return Object(a.createElement)(m.ToolbarGroup,null,Object(a.createElement)(m.ToolbarItem,null,e=>Object(a.createElement)(m.DropdownMenu,{icon:$,label:Object(b.__)("Move to widget area"),toggleProps:e},e=>{let{onClose:r}=e;return Object(a.createElement)(m.MenuGroup,{label:Object(b.__)("Move to")},Object(a.createElement)(m.MenuItemsChoice,{choices:n.map(e=>({value:e.id,label:e.name,info:e.description})),value:t,onSelect:e=>{i(e),r()}}))})))}function X(e){return e.attributes.__internalWidgetId}function Y(e,t){return{...e,attributes:{...e.attributes||{},__internalWidgetId:t}}}function K(e){const t=Object(g.subscribe)(()=>{var n,i;const r=null!==(n=null==e?void 0:e.widgetTypesToHideFromLegacyWidgetBlock)&&void 0!==n?n:[],a=null===(i=Object(g.select)(w.store).getWidgetTypes({per_page:-1}))||void 0===i?void 0:i.filter(e=>!r.includes(e.id));a&&(t(),Object(g.dispatch)(o.store).addBlockVariations("core/legacy-widget",a.map(e=>({name:e.id,title:e.name,description:e.description,attributes:e.is_multi?{idBase:e.id,instance:{}}:{id:e.id}}))))})}function J(){const{metadata:e,settings:t,name:n}=i;Object(o.registerBlockType)({name:n,...e},t)}function ee(){const{metadata:e,settings:t,name:n}=r;Object(o.registerBlockType)({name:n,...e},t)}},GRId:function(e,t){e.exports=window.wp.element},HSyU:function(e,t){e.exports=window.wp.blocks},K9lf:function(e,t){e.exports=window.wp.compose},TSYQ:function(e,t,n){var i;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var o=typeof i;if("string"===o||"number"===o)e.push(i);else if(Array.isArray(i)){if(i.length){var a=r.apply(null,i);a&&e.push(a)}}else if("object"===o)if(i.toString===Object.prototype.toString)for(var c in i)n.call(i,c)&&i[c]&&e.push(c);else e.push(i.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(i=function(){return r}.apply(t,[]))||(e.exports=i)}()},Tqx9:function(e,t){e.exports=window.wp.primitives},YLtl:function(e,t){e.exports=window.lodash},axFQ:function(e,t){e.exports=window.wp.blockEditor},jZUy:function(e,t){e.exports=window.wp.coreData},l3Sj:function(e,t){e.exports=window.wp.i18n},onLe:function(e,t){e.exports=window.wp.notices},"tI+e":function(e,t){e.exports=window.wp.components},u6za:function(e,t,n){"use strict";var i=n("GRId"),r=n("Tqx9");const o=Object(i.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(r.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));t.a=o},ywyh:function(e,t){e.exports=window.wp.apiFetch}});