From 3c7a623f85f4648eded5cbcf340ccb5c9cc3b2fb Mon Sep 17 00:00:00 2001
From: youknowriad
".concat(e,"
")})}},{type:"raw",isMatch:function(e){return"BLOCKQUOTE"===e.nodeName&&Array.from(e.childNodes).every(function(e){return"P"===e.nodeName})},schema:{blockquote:{children:{p:{children:Object(D.getPhrasingContentSchema)()}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.value,n=e.citation,r=[];return t&&""!==t&&r.push.apply(r,Object(H.a)(Object(lt.split)(Object(lt.create)({html:t,multilineTag:"p"}),"\u2028").map(function(e){return Object(D.createBlock)("core/paragraph",{content:Object(lt.toHTMLString)({value:e})})}))),n&&""!==n&&r.push(Object(D.createBlock)("core/paragraph",{content:n})),0===r.length?Object(D.createBlock)("core/paragraph",{content:""}):r}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.value,n=e.citation,r=Object(et.a)(e,["value","citation"]);if(""===t)return Object(D.createBlock)("core/heading",{content:n});var o=Object(lt.split)(Object(lt.create)({html:t,multilineTag:"p"}),"\u2028"),a=o.slice(1);return[Object(D.createBlock)("core/heading",{content:Object(lt.toHTMLString)({value:o[0]})}),Object(D.createBlock)("core/quote",Object(V.a)({},r,{citation:n,value:Object(lt.toHTMLString)({value:a.length?Object(lt.join)(o.slice(1),"\u2028"):Object(lt.create)(),multilineTag:"p"})}))]}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(D.createBlock)("core/pullquote",{value:t,citation:n})}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected,o=e.mergeBlocks,a=e.onReplace,c=e.className,i=t.align,l=t.value,s=t.citation;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}})),Object(U.createElement)("blockquote",{className:c,style:{textAlign:i}},Object(U.createElement)($.RichText,{identifier:"value",multiline:!0,value:l,onChange:function(e){return n({value:e})},onMerge:o,onRemove:function(e){var t=!s||0===s.length;!e&&t&&a([])},placeholder:Object(K.__)("Write quote…")}),(!$.RichText.isEmpty(s)||r)&&Object(U.createElement)($.RichText,{identifier:"citation",value:s,onChange:function(e){return n({citation:e})},placeholder:Object(K.__)("Write citation…"),className:"wp-block-quote__citation"})))},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation;return Object(U.createElement)("blockquote",{style:{textAlign:n||null}},Object(U.createElement)($.RichText.Content,{multiline:!0,value:r}),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){var n=t.value,r=t.citation;return n&&""!==n?Object(V.a)({},e,{value:e.value+n,citation:e.citation+r}):Object(V.a)({},e,{citation:e.citation+r})},deprecated:[{attributes:Object(V.a)({},st,{style:{type:"number",default:1}}),migrate:function(e){return 2===e.style?Object(V.a)({},Object(G.omit)(e,["style"]),{className:e.className?e.className+" is-style-large":"is-style-large"}):e},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=t.style;return Object(U.createElement)("blockquote",{className:2===a?"is-large":"",style:{textAlign:n||null}},Object(U.createElement)($.RichText.Content,{multiline:!0,value:r}),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Object(V.a)({},st,{citation:{type:"string",source:"html",selector:"footer",default:""},style:{type:"number",default:1}}),save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=t.style;return Object(U.createElement)("blockquote",{className:"blocks-quote-style-".concat(a),style:{textAlign:n||null}},Object(U.createElement)($.RichText.Content,{multiline:!0,value:r}),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"footer",value:o}))}}]},mt=n(16),dt=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onImageClick=e.onImageClick.bind(Object(ne.a)(Object(ne.a)(e))),e.onSelectCaption=e.onSelectCaption.bind(Object(ne.a)(Object(ne.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(ne.a)(Object(ne.a)(e))),e.bindContainer=e.bindContainer.bind(Object(ne.a)(Object(ne.a)(e))),e.state={captionSelected:!1},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"onSelectCaption",value:function(){this.state.captionSelected||this.setState({captionSelected:!0}),this.props.isSelected||this.props.onSelect()}},{key:"onImageClick",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onKeyDown",value:function(e){this.container===document.activeElement&&this.props.isSelected&&-1!==[mt.BACKSPACE,mt.DELETE].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),this.props.onRemove())}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isSelected,r=t.image,o=t.url;r&&!o&&this.props.setAttributes({url:r.source_url,alt:r.alt_text}),this.state.captionSelected&&!n&&e.isSelected&&this.setState({captionSelected:!1})}},{key:"render",value:function(){var e,t=this.props,n=t.url,r=t.alt,o=t.id,a=t.linkTo,c=t.link,i=t.isSelected,l=t.caption,s=t.onRemove,u=t.setAttributes,b=t["aria-label"];switch(a){case"media":e=n;break;case"attachment":e=c}var m=Object(U.createElement)(U.Fragment,null,Object(U.createElement)("img",{src:n,alt:r,"data-id":o,onClick:this.onImageClick,tabIndex:"0",onKeyDown:this.onImageClick,"aria-label":b}),Object(de.isBlobURL)(n)&&Object(U.createElement)(Q.Spinner,null)),d=q()({"is-selected":i,"is-transient":Object(de.isBlobURL)(n)});return Object(U.createElement)("figure",{className:d,tabIndex:"-1",onKeyDown:this.onKeyDown,ref:this.bindContainer},i&&Object(U.createElement)("div",{className:"block-library-gallery-item__inline-menu"},Object(U.createElement)(Q.IconButton,{icon:"no-alt",onClick:s,className:"blocks-gallery-item__remove",label:Object(K.__)("Remove Image")})),e?Object(U.createElement)("a",{href:e},m):m,!$.RichText.isEmpty(l)||i?Object(U.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:l,isSelected:this.state.captionSelected,onChange:function(e){return u({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}):null)}}]),t}(U.Component),ht=Object(oe.withSelect)(function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}})(dt),pt=[{value:"attachment",label:Object(K.__)("Attachment Page")},{value:"media",label:Object(K.__)("Media File")},{value:"none",label:Object(K.__)("None")}],gt=["image"];function Ot(e){return Math.min(3,e.images.length)}var ft=function(e){var t=Object(G.pick)(e,["alt","id","link","caption"]);return t.url=Object(G.get)(e,["sizes","large","url"])||Object(G.get)(e,["media_details","sizes","large","source_url"])||e.url,t},jt=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(ne.a)(Object(ne.a)(e))),e.onSelectImages=e.onSelectImages.bind(Object(ne.a)(Object(ne.a)(e))),e.setLinkTo=e.setLinkTo.bind(Object(ne.a)(Object(ne.a)(e))),e.setColumnsNumber=e.setColumnsNumber.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleImageCrop=e.toggleImageCrop.bind(Object(ne.a)(Object(ne.a)(e))),e.onRemoveImage=e.onRemoveImage.bind(Object(ne.a)(Object(ne.a)(e))),e.setImageAttributes=e.setImageAttributes.bind(Object(ne.a)(Object(ne.a)(e))),e.addFiles=e.addFiles.bind(Object(ne.a)(Object(ne.a)(e))),e.uploadFromFiles=e.uploadFromFiles.bind(Object(ne.a)(Object(ne.a)(e))),e.setAttributes=e.setAttributes.bind(Object(ne.a)(Object(ne.a)(e))),e.state={selectedImage:null},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"setAttributes",value:function(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e=Object(V.a)({},e,{ids:Object(G.map)(e.images,"id")})),this.props.setAttributes(e)}},{key:"onSelectImage",value:function(e){var t=this;return function(){t.state.selectedImage!==e&&t.setState({selectedImage:e})}}},{key:"onRemoveImage",value:function(e){var t=this;return function(){var n=Object(G.filter)(t.props.attributes.images,function(t,n){return e!==n}),r=t.props.attributes.columns;t.setState({selectedImage:null}),t.setAttributes({images:n,columns:r?Math.min(n.length,r):r})}}},{key:"onSelectImages",value:function(e){this.setAttributes({images:e.map(function(e){return ft(e)})})}},{key:"setLinkTo",value:function(e){this.setAttributes({linkTo:e})}},{key:"setColumnsNumber",value:function(e){this.setAttributes({columns:e})}},{key:"toggleImageCrop",value:function(){this.setAttributes({imageCrop:!this.props.attributes.imageCrop})}},{key:"getImageCropHelp",value:function(e){return e?Object(K.__)("Thumbnails are cropped to align."):Object(K.__)("Thumbnails are not cropped.")}},{key:"setImageAttributes",value:function(e,t){var n=this.props.attributes.images,r=this.setAttributes;n[e]&&r({images:Object(H.a)(n.slice(0,e)).concat([Object(V.a)({},n[e],t)],Object(H.a)(n.slice(e+1)))})}},{key:"uploadFromFiles",value:function(e){this.addFiles(e.target.files)}},{key:"addFiles",value:function(e){var t=this.props.attributes.images||[],n=this.props.noticeOperations,r=this.setAttributes;Object($.mediaUpload)({allowedTypes:gt,filesList:e,onFileChange:function(e){var n=e.map(function(e){return ft(e)});r({images:t.concat(n)})},onError:n.createErrorNotice})}},{key:"componentDidUpdate",value:function(e){!this.props.isSelected&&e.isSelected&&this.setState({selectedImage:null,captionSelected:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.isSelected,o=t.className,a=t.noticeOperations,c=t.noticeUI,i=n.images,l=n.columns,s=void 0===l?Ot(n):l,u=n.align,b=n.imageCrop,m=n.linkTo,d=Object(U.createElement)(Q.DropZone,{onFilesDrop:this.addFiles}),h=Object(U.createElement)($.BlockControls,null,!!i.length&&Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)($.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:gt,multiple:!0,gallery:!0,value:i.map(function(e){return e.id}),render:function(e){var t=e.open;return Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit Gallery"),icon:"edit",onClick:t})}})));return 0===i.length?Object(U.createElement)(U.Fragment,null,h,Object(U.createElement)($.MediaPlaceholder,{icon:"format-gallery",className:o,labels:{title:Object(K.__)("Gallery"),instructions:Object(K.__)("Drag images, upload new ones or select files from your library.")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:gt,multiple:!0,notices:c,onError:a.createErrorNotice})):Object(U.createElement)(U.Fragment,null,h,Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Gallery Settings")},i.length>1&&Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Columns"),value:s,onChange:this.setColumnsNumber,min:1,max:Math.min(8,i.length)}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Crop Images"),checked:!!b,onChange:this.toggleImageCrop,help:this.getImageCropHelp}),Object(U.createElement)(Q.SelectControl,{label:Object(K.__)("Link To"),value:m,onChange:this.setLinkTo,options:pt}))),c,Object(U.createElement)("ul",{className:"".concat(o," align").concat(u," columns-").concat(s," ").concat(b?"is-cropped":"")},d,i.map(function(t,n){var o=Object(K.__)(Object(K.sprintf)("image %1$d of %2$d in gallery",n+1,i.length));return Object(U.createElement)("li",{className:"blocks-gallery-item",key:t.id||t.url},Object(U.createElement)(ht,{url:t.url,alt:t.alt,id:t.id,isSelected:r&&e.state.selectedImage===n,onRemove:e.onRemoveImage(n),onSelect:e.onSelectImage(n),setAttributes:function(t){return e.setImageAttributes(n,t)},caption:t.caption,"aria-label":o}))}),r&&Object(U.createElement)("li",{className:"blocks-gallery-item has-add-item-button"},Object(U.createElement)(Q.FormFileUpload,{multiple:!0,isLarge:!0,className:"block-library-gallery-add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},Object(K.__)("Upload an image")))))}}]),t}(U.Component),vt=Object(Q.withNotices)(jt),yt={images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},kt="core/gallery",wt=function(e){return e?e.split(",").map(function(e){return parseInt(e,10)}):[]},Et={title:Object(K.__)("Gallery"),description:Object(K.__)("Display multiple images in a rich gallery."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M20 4v12H8V4h12m0-2H8L6 4v12l2 2h12l2-2V4l-2-2z"}),Object(U.createElement)(Q.Path,{d:"M12 12l1 2 3-3 3 4H9z"}),Object(U.createElement)(Q.Path,{d:"M2 6v14l2 2h14v-2H4V6H2z"}))),category:"common",keywords:[Object(K.__)("images"),Object(K.__)("photos")],attributes:yt,supports:{align:!0},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:function(e){var t=e[0].align;t=Object(G.every)(e,["align",t])?t:void 0;var n=Object(G.filter)(e,function(e){var t=e.id,n=e.url;return t&&n});return Object(D.createBlock)("core/gallery",{images:n.map(function(e){return{id:e.id,url:e.url,alt:e.alt,caption:e.caption}}),ids:n.map(function(e){return e.id}),align:t})}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:function(e){var t=e.named.ids;return wt(t).map(function(e){return{id:e}})}},ids:{type:"array",shortcode:function(e){var t=e.named.ids;return wt(t)}},columns:{type:"number",shortcode:function(e){var t=e.named.columns;return parseInt(void 0===t?"3":t,10)}},linkTo:{type:"string",shortcode:function(e){var t=e.named.link,n=void 0===t?"attachment":t;return"file"===n?"media":n}}}},{type:"files",isMatch:function(e){return 1!==e.length&&Object(G.every)(e,function(e){return 0===e.type.indexOf("image/")})},transform:function(e,t){var n=Object(D.createBlock)("core/gallery",{images:e.map(function(e){return ft({url:Object(de.createBlobURL)(e)})})});return Object($.mediaUpload)({filesList:e,onFileChange:function(e){var r=e.map(ft);t(n.clientId,{ids:Object(G.map)(r,"id"),images:r})},allowedTypes:["image"]}),n}}],to:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.images,n=e.align;return t.length>0?t.map(function(e){var t=e.id,r=e.url,o=e.alt,a=e.caption;return Object(D.createBlock)("core/image",{id:t,url:r,alt:o,caption:a,align:n})}):Object(D.createBlock)("core/image",{align:n})}}]},edit:vt,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ot(t):r,a=t.imageCrop,c=t.linkTo;return Object(U.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map(function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(U.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(U.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(U.createElement)("figure",null,t?Object(U.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:e.caption})))}))},deprecated:[{attributes:yt,isEligible:function(e){var t=e.images,n=e.ids;return t&&t.length>0&&(!n&&t||n&&t&&n.length!==t.length||Object(G.some)(t,function(e,t){return!e&&null!==n[t]||parseInt(e,10)!==n[t]}))},migrate:function(e){return Object(V.a)({},e,{ids:Object(G.map)(e.images,function(e){var t=e.id;return t?parseInt(t,10):null})})},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ot(t):r,a=t.imageCrop,c=t.linkTo;return Object(U.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map(function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(U.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(U.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(U.createElement)("figure",null,t?Object(U.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:e.caption})))}))}},{attributes:yt,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ot(t):r,a=t.imageCrop,c=t.linkTo;return Object(U.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map(function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(U.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link});return Object(U.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(U.createElement)("figure",null,t?Object(U.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:e.caption})))}))}},{attributes:Object(V.a)({},yt,{images:Object(V.a)({},yt.images,{selector:"div.wp-block-gallery figure.blocks-gallery-image img"}),align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ot(t):r,a=t.align,c=t.imageCrop,i=t.linkTo;return Object(U.createElement)("div",{className:"align".concat(a," columns-").concat(o," ").concat(c?"is-cropped":"")},n.map(function(e){var t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(U.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object(U.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object(U.createElement)("a",{href:t},n):n)}))}}]};var Ct="core/archives",_t={title:Object(K.__)("Archives"),description:Object(K.__)("Display a monthly archive of your posts."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M7 11h2v2H7v-2zm14-5v14l-2 2H5l-2-2V6l2-2h1V2h2v2h8V2h2v2h1l2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}))),category:"widgets",supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right"].includes(t))return{"data-align":t}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=t.align,o=t.showPostCounts,a=t.displayAsDropdown;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Archives Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:a,onChange:function(){return n({displayAsDropdown:!a})}}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:o,onChange:function(){return n({showPostCounts:!o})}}))),Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:r,onChange:function(e){n({align:e})},controls:["left","center","right"]})),Object(U.createElement)(Q.Disabled,null,Object(U.createElement)($.ServerSideRender,{block:"core/archives",attributes:t})))},save:function(){return null}},xt=["audio"],St=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.toggleAttribute=e.toggleAttribute.bind(Object(ne.a)(Object(ne.a)(e))),e.onSelectURL=e.onSelectURL.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=t.setAttributes,a=n.id,c=n.src,i=void 0===c?"":c;if(!a&&Object(de.isBlobURL)(i)){var l=Object(de.getBlobByURL)(i);l&&Object($.mediaUpload)({filesList:[l],onFileChange:function(e){var t=Object(he.a)(e,1)[0],n=t.id,r=t.url;o({id:n,src:r})},onError:function(t){o({src:void 0,id:void 0}),e.setState({editing:!0}),r.createErrorNotice(t)},allowedTypes:xt})}}},{key:"toggleAttribute",value:function(e){var t=this;return function(n){t.props.setAttributes(Object(F.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;if(e!==n.src){var o=He({attributes:{url:e}});if(void 0!==o)return void this.props.onReplace(o);r({src:e,id:void 0})}this.setState({editing:!1})}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src,i=this.props,l=i.setAttributes,s=i.isSelected,u=i.className,b=i.noticeOperations,m=i.noticeUI,d=this.state.editing,h=function(){e.setState({editing:!0})};return d?Object(U.createElement)($.MediaPlaceholder,{icon:"media-audio",className:u,onSelect:function(t){if(!t||!t.url)return l({src:void 0,id:void 0}),void h();l({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"audio/*",allowedTypes:xt,value:this.props.attributes,notices:m,onError:b.createErrorNotice}):Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)(Q.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(K.__)("Edit audio"),onClick:h,icon:"edit"}))),Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Audio Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:o}),Object(U.createElement)(Q.SelectControl,{label:Object(K.__)("Preload"),value:void 0!==a?a:"none",onChange:function(e){return l({preload:"none"!==e?e:void 0})},options:[{value:"auto",label:Object(K.__)("Auto")},{value:"metadata",label:Object(K.__)("Metadata")},{value:"none",label:Object(K.__)("None")}]}))),Object(U.createElement)("figure",{className:u},Object(U.createElement)(Q.Disabled,null,Object(U.createElement)("audio",{controls:"controls",src:c})),(!$.RichText.isEmpty(r)||s)&&Object(U.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:r,onChange:function(e){return l({caption:e})},inlineToolbar:!0})))}}]),t}(U.Component),Tt=Object(Q.withNotices)(St),Nt="core/audio",Rt={title:Object(K.__)("Audio"),description:Object(K.__)("Embed a simple audio player."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(U.createElement)(Q.Path,{d:"m12 3l0.01 10.55c-0.59-0.34-1.27-0.55-2-0.55-2.22 0-4.01 1.79-4.01 4s1.79 4 4.01 4 3.99-1.79 3.99-4v-10h4v-4h-6zm-1.99 16c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z"})),category:"common",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},transforms:{from:[{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform:function(e){var t=e[0];return Object(D.createBlock)("core/audio",{src:Object(de.createBlobURL)(t)})}}]},supports:{align:!0},edit:Tt,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src;return Object(U.createElement)("figure",null,Object(U.createElement)("audio",{controls:"controls",src:c,autoPlay:n,loop:o,preload:a}),!$.RichText.isEmpty(r)&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:r}))}},Bt=window.getComputedStyle,At=Object(Q.withFallbackStyles)(function(e,t){var n=t.textColor,r=t.backgroundColor,o=r&&r.color,a=n&&n.color,c=!a&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:Bt(e).backgroundColor,fallbackTextColor:a||!c?void 0:Bt(c).color}}),It=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).nodeRef=null,e.bindRef=e.bindRef.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"bindRef",value:function(e){e&&(this.nodeRef=e)}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.backgroundColor,o=t.textColor,a=t.setBackgroundColor,c=t.setTextColor,i=t.fallbackBackgroundColor,l=t.fallbackTextColor,s=t.setAttributes,u=t.isSelected,b=t.className,m=n.text,d=n.url,h=n.title;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)("div",{className:b,title:h,ref:this.bindRef},Object(U.createElement)($.RichText,{placeholder:Object(K.__)("Add text…"),value:m,onChange:function(e){return s({text:e})},formattingControls:["bold","italic","strikethrough"],className:q()("wp-block-button__link",(e={"has-background":r.color},Object(F.a)(e,r.class,r.class),Object(F.a)(e,"has-text-color",o.color),Object(F.a)(e,o.class,o.class),e)),style:{backgroundColor:r.color,color:o.color},keepPlaceholderOnFocus:!0}),Object(U.createElement)($.InspectorControls,null,Object(U.createElement)($.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:r.color,onChange:a,label:Object(K.__)("Background Color")},{value:o.color,onChange:c,label:Object(K.__)("Text Color")}]},Object(U.createElement)($.ContrastChecker,{isLargeText:!1,textColor:o.color,backgroundColor:r.color,fallbackBackgroundColor:i,fallbackTextColor:l})))),u&&Object(U.createElement)("form",{className:"block-library-button__inline-link",onSubmit:function(e){return e.preventDefault()}},Object(U.createElement)(Q.Dashicon,{icon:"admin-links"}),Object(U.createElement)($.URLInput,{value:d,onChange:function(e){return s({url:e})}}),Object(U.createElement)(Q.IconButton,{icon:"editor-break",label:Object(K.__)("Apply"),type:"submit"})))}}]),t}(U.Component),Pt=Object(re.compose)([Object($.withColors)("backgroundColor",{textColor:"color"}),At])(It),Lt={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},Mt="core/button",zt=function(e){return Object(G.omit)(Object(V.a)({},e,{customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0}),["color","textColor"])},Ht={title:Object(K.__)("Button"),description:Object(K.__)("Prompt visitors to take action with a custom button."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M19 6H5L3 8v8l2 2h14l2-2V8l-2-2zm0 10H5V8h14v8z"}))),category:"layout",attributes:Lt,supports:{align:!0,alignWide:!1},styles:[{name:"default",label:Object(K._x)("Rounded","block style"),isDefault:!0},{name:"outline",label:Object(K.__)("Outline")},{name:"squared",label:Object(K._x)("Squared","block style")}],edit:Pt,save:function(e){var t,n=e.attributes,r=n.url,o=n.text,a=n.title,c=n.backgroundColor,i=n.textColor,l=n.customBackgroundColor,s=n.customTextColor,u=Object($.getColorClassName)("color",i),b=Object($.getColorClassName)("background-color",c),m=q()("wp-block-button__link",(t={"has-text-color":i||s},Object(F.a)(t,u,u),Object(F.a)(t,"has-background",c||l),Object(F.a)(t,b,b),t)),d={backgroundColor:b?void 0:l,color:u?void 0:s};return Object(U.createElement)("div",null,Object(U.createElement)($.RichText.Content,{tagName:"a",className:m,href:r,title:a,style:d,value:o}))},deprecated:[{attributes:Object(V.a)({},Object(G.pick)(Lt,["url","title","text"]),{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c={backgroundColor:t.color,color:t.textColor};return Object(U.createElement)("div",{className:"align".concat(a)},Object(U.createElement)($.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:o,style:c,value:r}))},migrate:zt},{attributes:Object(V.a)({},Object(G.pick)(Lt,["url","title","text"]),{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c=t.color,i=t.textColor;return Object(U.createElement)("div",{className:"align".concat(a),style:{backgroundColor:c}},Object(U.createElement)($.RichText.Content,{tagName:"a",href:n,title:o,style:{color:i},value:r}))},migrate:zt}]},Dt=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).toggleDisplayAsDropdown=e.toggleDisplayAsDropdown.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleShowPostCounts=e.toggleShowPostCounts.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleShowHierarchy=e.toggleShowHierarchy.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"toggleDisplayAsDropdown",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({displayAsDropdown:!t.displayAsDropdown})}},{key:"toggleShowPostCounts",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showPostCounts:!t.showPostCounts})}},{key:"toggleShowHierarchy",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showHierarchy:!t.showHierarchy})}},{key:"getCategories",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.props.categories;return t&&t.length?null===e?t:t.filter(function(t){return t.parent===e}):[]}},{key:"getCategoryListClassName",value:function(e){var t=this.props.className;return"".concat(t,"__list ").concat(t,"__list-level-").concat(e)}},{key:"renderCategoryName",value:function(e){return e.name?Object(G.unescape)(e.name).trim():Object(K.__)("(Untitled)")}},{key:"renderCategoryList",value:function(){var e=this,t=this.props.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object(U.createElement)("ul",{className:this.getCategoryListClassName(0)},n.map(function(t){return e.renderCategoryListItem(t,0)}))}},{key:"renderCategoryListItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return Object(U.createElement)("li",{key:e.id},Object(U.createElement)("a",{href:e.link,target:"_blank"},this.renderCategoryName(e)),a&&Object(U.createElement)("span",{className:"".concat(this.props.className,"__post-count")}," ","(",e.count,")"),o&&!!c.length&&Object(U.createElement)("ul",{className:this.getCategoryListClassName(t+1)},c.map(function(e){return n.renderCategoryListItem(e,t+1)})))}},{key:"renderCategoryDropdown",value:function(){var e=this,t=this.props,n=t.showHierarchy,r=t.instanceId,o=t.className,a=n?0:null,c=this.getCategories(a),i="blocks-category-select-".concat(r);return Object(U.createElement)(U.Fragment,null,Object(U.createElement)("label",{htmlFor:i,className:"screen-reader-text"},Object(K.__)("Categories")),Object(U.createElement)("select",{id:i,className:"".concat(o,"__dropdown")},c.map(function(t){return e.renderCategoryDropdownItem(t,0)})))}},{key:"renderCategoryDropdownItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return[Object(U.createElement)("option",{key:e.id},Object(G.times)(3*t,function(){return" "}),this.renderCategoryName(e),a?" (".concat(e.count,")"):""),o&&!!c.length&&c.map(function(e){return n.renderCategoryDropdownItem(e,t+1)})]}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.isRequesting,o=t.align,a=t.displayAsDropdown,c=t.showHierarchy,i=t.showPostCounts,l=Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Categories Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:a,onChange:this.toggleDisplayAsDropdown}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Show Hierarchy"),checked:c,onChange:this.toggleShowHierarchy}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:i,onChange:this.toggleShowPostCounts})));return r?Object(U.createElement)(U.Fragment,null,l,Object(U.createElement)(Q.Placeholder,{icon:"admin-post",label:Object(K.__)("Categories")},Object(U.createElement)(Q.Spinner,null))):Object(U.createElement)(U.Fragment,null,l,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:o,onChange:function(e){n({align:e})},controls:["left","center","right","full"]})),Object(U.createElement)("div",{className:this.props.className},a?this.renderCategoryDropdown():this.renderCategoryList()))}}]),t}(U.Component),Ft=Object(re.compose)(Object(oe.withSelect)(function(e){var t=e("core").getEntityRecords,n=e("core/data").isResolving,r={per_page:-1};return{categories:t("taxonomy","category",r),isRequesting:n("core","getEntityRecords",["taxonomy","category",r])}}),re.withInstanceId)(Dt),Vt="core/categories",Ut={title:Object(K.__)("Categories"),description:Object(K.__)("Display a list of all categories."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(U.createElement)(Q.Path,{d:"M12,2l-5.5,9h11L12,2z M12,5.84L13.93,9h-3.87L12,5.84z"}),Object(U.createElement)(Q.Path,{d:"m17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5zm0 7c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"}),Object(U.createElement)(Q.Path,{d:"m3 21.5h8v-8h-8v8zm2-6h4v4h-4v-4z"})),category:"widgets",attributes:{align:{type:"string"},displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1}},supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right","full"].includes(t))return{"data-align":t}},edit:Ft,save:function(){return null}};var Wt="core/code",qt={title:Object(K.__)("Code"),description:Object(K.__)("Display code snippets that respect your spacing and tabs."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(U.createElement)(Q.Path,{d:"M9.4,16.6L4.8,12l4.6-4.6L8,6l-6,6l6,6L9.4,16.6z M14.6,16.6l4.6-4.6l-4.6-4.6L16,6l6,6l-6,6L14.6,16.6z"})),category:"formatting",attributes:{content:{type:"string",source:"text",selector:"code"}},supports:{html:!1},transforms:{from:[{type:"enter",regExp:/^```$/,transform:function(){return Object(D.createBlock)("core/code")}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName},schema:{pre:{children:{code:{children:{"#text":{}}}}}}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className;return Object(U.createElement)("div",{className:r},Object(U.createElement)($.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(K.__)("Write code…"),"aria-label":Object(K.__)("Code")}))},save:function(e){var t=e.attributes;return Object(U.createElement)("pre",null,Object(U.createElement)("code",null,t.content))}},Gt=n(41),Kt=["core/column"],$t=n.n(Gt)()(function(e){return Object(G.times)(e,function(){return["core/column"]})});function Qt(e){var t,n=Qt.doc;n||(n=document.implementation.createHTMLDocument(""),Qt.doc=n),n.body.innerHTML=e;var r=!0,o=!1,a=void 0;try{for(var c,i=n.body.firstChild.classList[Symbol.iterator]();!(r=(c=i.next()).done);r=!0){if(t=c.value.match(/^layout-column-(\d+)$/))return Number(t[1])-1}}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}}var Yt="core/columns",Zt={title:Object(K.__)("Columns"),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M21 4H3L2 5v14l1 1h18l1-1V5l-1-1zM8 18H4V6h4v12zm6 0h-4V6h4v12zm6 0h-4V6h4v12z"}))),category:"layout",attributes:{columns:{type:"number",default:2}},description:Object(K.__)("Add a block that displays content in multiple columns, then add whatever content blocks you’d like."),supports:{align:["wide","full"],html:!1},deprecated:[{attributes:{columns:{type:"number",default:2}},isEligible:function(e,t){return!!t.some(function(e){return/layout-column-\d+/.test(e.originalContent)})&&t.some(function(e){return void 0!==Qt(e.originalContent)})},migrate:function(e,t){return[e,t.reduce(function(e,t){var n=Qt(t.originalContent);return void 0===n&&(n=0),e[n]||(e[n]=[]),e[n].push(t),e},[]).map(function(e){return Object(D.createBlock)("core/column",{},e)})]},save:function(e){var t=e.attributes.columns;return Object(U.createElement)("div",{className:"has-".concat(t,"-columns")},Object(U.createElement)($.InnerBlocks.Content,null))}}],edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.columns,a=q()(r,"has-".concat(o,"-columns"));return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,null,Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Columns"),value:o,onChange:function(e){n({columns:e})},min:2,max:6}))),Object(U.createElement)("div",{className:a},Object(U.createElement)($.InnerBlocks,{template:$t(o),templateLock:"all",allowedBlocks:Kt})))},save:function(e){var t=e.attributes.columns;return Object(U.createElement)("div",{className:"has-".concat(t,"-columns")},Object(U.createElement)($.InnerBlocks.Content,null))}},Jt="core/column",Xt={title:Object(K.__)("Column"),parent:["core/columns"],icon:Object(U.createElement)(Q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.Path,{d:"M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z"})),description:Object(K.__)("A single column within a columns block."),category:"common",supports:{inserter:!1,reusable:!1,html:!1},edit:function(){return Object(U.createElement)($.InnerBlocks,{templateLock:!1})},save:function(){return Object(U.createElement)("div",null,Object(U.createElement)($.InnerBlocks.Content,null))}},en=["left","center","right","wide","full"],tn={title:{type:"string",source:"html",selector:"p"},url:{type:"string"},align:{type:"string"},contentAlign:{type:"string",default:"center"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"}},nn="core/cover",rn=["image","video"],on={title:Object(K.__)("Cover"),description:Object(K.__)("Add an image or video with a text overlay — great for headers."),icon:Object(U.createElement)(Q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(U.createElement)(Q.Path,{d:"M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"}),Object(U.createElement)(Q.Path,{d:"M0 0h24v24H0z",fill:"none"})),category:"common",attributes:tn,transforms:{from:[{type:"block",blocks:["core/heading"],transform:function(e){var t=e.content;return Object(D.createBlock)("core/cover",{title:t})}},{type:"block",blocks:["core/image"],transform:function(e){var t=e.caption,n=e.url,r=e.align,o=e.id;return Object(D.createBlock)("core/cover",{title:t,url:n,align:r,id:o})}},{type:"block",blocks:["core/video"],transform:function(e){var t=e.caption,n=e.src,r=e.align,o=e.id;return Object(D.createBlock)("core/cover",{title:t,url:n,align:r,id:o,backgroundType:"video"})}}],to:[{type:"block",blocks:["core/heading"],transform:function(e){var t=e.title;return Object(D.createBlock)("core/heading",{content:t})}},{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.backgroundType;return!e.url||"image"===t},transform:function(e){var t=e.title,n=e.url,r=e.align,o=e.id;return Object(D.createBlock)("core/image",{caption:t,url:n,align:r,id:o})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.backgroundType;return!e.url||"video"===t},transform:function(e){var t=e.title,n=e.url,r=e.align,o=e.id;return Object(D.createBlock)("core/video",{caption:t,src:n,id:o,align:r})}}]},getEditWrapperProps:function(e){var t=e.align;if(-1!==en.indexOf(t))return{"data-align":t}},edit:Object(re.compose)([Object($.withColors)({overlayColor:"background-color"}),Q.withNotices])(function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected,o=e.className,a=e.noticeOperations,c=e.noticeUI,i=e.overlayColor,l=e.setOverlayColor,s=t.align,u=t.backgroundType,b=t.contentAlign,m=t.dimRatio,d=t.hasParallax,h=t.id,p=t.title,g=t.url,O=function(e){if(e&&e.url){var t;if(e.media_type)t="image"===e.media_type?"image":"video";else{if("image"!==e.type&&"video"!==e.type)return;t=e.type}n({url:e.url,id:e.id,backgroundType:t})}else n({url:void 0,id:void 0})},f=function(e){return n({title:e})},j=Object(V.a)({},"image"===u?cn(g):{},{backgroundColor:i.color}),v=Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:s,onChange:function(e){return n({align:e})}}),!!g&&Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.AlignmentToolbar,{value:b,onChange:function(e){n({contentAlign:e})}}),Object(U.createElement)($.MediaUploadCheck,null,Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)($.MediaUpload,{onSelect:O,allowedTypes:rn,value:h,render:function(e){var t=e.open;return Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit media"),icon:"edit",onClick:t})}}))))),!!g&&Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Cover Settings")},"image"===u&&Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Fixed Background"),checked:d,onChange:function(){return n({hasParallax:!d})}}),Object(U.createElement)($.PanelColorSettings,{title:Object(K.__)("Overlay"),initialOpen:!0,colorSettings:[{value:i.color,onChange:l,label:Object(K.__)("Overlay Color")}]},Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Background Opacity"),value:m,onChange:function(e){return n({dimRatio:e})},min:0,max:100,step:10})))));if(!g){var y=!$.RichText.isEmpty(p),k=y?void 0:"format-image",w=y?Object(U.createElement)($.RichText,{tagName:"h2",value:p,onChange:f,inlineToolbar:!0}):Object(K.__)("Cover");return Object(U.createElement)(U.Fragment,null,v,Object(U.createElement)($.MediaPlaceholder,{icon:k,className:o,labels:{title:w,instructions:Object(K.__)("Drag an image or a video, upload a new one or select a file from your library.")},onSelect:O,accept:"image/*,video/*",allowedTypes:rn,notices:c,onError:a.createErrorNotice}))}var E=q()(o,"center"!==b&&"has-".concat(b,"-content"),an(m),{"has-background-dim":0!==m,"has-parallax":d});return Object(U.createElement)(U.Fragment,null,v,Object(U.createElement)("div",{"data-url":g,style:j,className:E},"video"===u&&Object(U.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:g}),(!$.RichText.isEmpty(p)||r)&&Object(U.createElement)($.RichText,{tagName:"p",className:"wp-block-cover-text",placeholder:Object(K.__)("Write title…"),value:p,onChange:f,inlineToolbar:!0})))}),save:function(e){var t=e.attributes,n=t.align,r=t.backgroundType,o=t.contentAlign,a=t.customOverlayColor,c=t.dimRatio,i=t.hasParallax,l=t.overlayColor,s=t.title,u=t.url,b=Object($.getColorClassName)("background-color",l),m="image"===r?cn(u):{};b||(m.backgroundColor=a);var d=q()(an(c),b,Object(F.a)({"has-background-dim":0!==c,"has-parallax":i},"has-".concat(o,"-content"),"center"!==o),n?"align".concat(n):null);return Object(U.createElement)("div",{className:d,style:m},"video"===r&&u&&Object(U.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!$.RichText.isEmpty(s)&&Object(U.createElement)($.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:s}))},deprecated:[{attributes:Object(V.a)({},tn),supports:{className:!1},save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=t.contentAlign,l=t.overlayColor,s=t.customOverlayColor,u=Object($.getColorClassName)("background-color",l),b=cn(n);u||(b.backgroundColor=s);var m=q()("wp-block-cover-image",an(a),u,Object(F.a)({"has-background-dim":0!==a,"has-parallax":o},"has-".concat(i,"-content"),"center"!==i),c?"align".concat(c):null);return Object(U.createElement)("div",{className:m,style:b},!$.RichText.isEmpty(r)&&Object(U.createElement)($.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r}))}},{attributes:Object(V.a)({},tn,{title:{type:"string",source:"html",selector:"h2"}}),save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=cn(n),l=q()(an(a),{"has-background-dim":0!==a,"has-parallax":o},c?"align".concat(c):null);return Object(U.createElement)("section",{className:l,style:i},Object(U.createElement)($.RichText.Content,{tagName:"h2",value:r}))}}]};function an(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}function cn(e){return e?{backgroundImage:"url(".concat(e,")")}:{}}var ln=function(e){var t=e.blockSupportsResponsive,n=e.showEditButton,r=e.themeSupportsResponsive,o=e.allowResponsive,a=e.getResponsiveHelp,c=e.toggleResponsive,i=e.switchBackToURLInput;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)(Q.Toolbar,null,n&&Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit URL"),icon:"edit",onClick:i}))),r&&t&&Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Media Settings"),className:"blocks-responsive"},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Resize for smaller devices"),checked:o,help:a,onChange:c}))))},sn=function(){return Object(U.createElement)("div",{className:"wp-block-embed is-loading"},Object(U.createElement)(Q.Spinner,null),Object(U.createElement)("p",null,Object(K.__)("Embedding…")))},un=function(e){var t=e.icon,n=e.label,r=e.value,o=e.onSubmit,a=e.onChange,c=e.cannotEmbed,i=e.fallback,l=e.tryAgain;return Object(U.createElement)(Q.Placeholder,{icon:Object(U.createElement)($.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-embed"},Object(U.createElement)("form",{onSubmit:o},Object(U.createElement)("input",{type:"url",value:r||"",className:"components-placeholder__input","aria-label":n,placeholder:Object(K.__)("Enter URL to embed here…"),onChange:a}),Object(U.createElement)(Q.Button,{isLarge:!0,type:"submit"},Object(K._x)("Embed","button label")),c&&Object(U.createElement)("p",{className:"components-placeholder__error"},Object(K.__)("Sorry, we could not embed that content."),Object(U.createElement)("br",null),Object(U.createElement)(Q.Button,{isLarge:!0,onClick:l},Object(K._x)("Try again","button label"))," ",Object(U.createElement)(Q.Button,{isLarge:!0,onClick:i},Object(K._x)("Convert to link","button label")))))},bn=n(75),mn=window.FocusEvent,dn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).checkFocus=e.checkFocus.bind(Object(ne.a)(Object(ne.a)(e))),e.node=Object(U.createRef)(),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"checkFocus",value:function(){var e=document.activeElement;if("IFRAME"===e.tagName&&e.parentNode===this.node.current){var t=new mn("focus",{bubbles:!0});e.dispatchEvent(t)}}},{key:"render",value:function(){var e=this.props.html;return Object(U.createElement)("div",{ref:this.node,className:"wp-block-embed__wrapper",dangerouslySetInnerHTML:{__html:e}})}}]),t}(U.Component),hn=Object(re.withGlobalEvents)({blur:"checkFocus"})(dn),pn=function(e){var t,n,r=e.preview,o=e.url,a=e.type,c=e.caption,i=e.onCaptionChange,l=e.isSelected,s=e.className,u=e.icon,b=e.label,m=r.scripts,d="photo"===a?(t=r,n=Object(U.createElement)("p",null,Object(U.createElement)("img",{src:t.thumbnail_url,alt:t.title,width:"100%"})),Object(U.renderToString)(n)):r.html,h=Object(bn.parse)(o),p=Object(G.includes)(Ae,h.host.replace(/^www\./,"")),g=Object(K.sprintf)(Object(K.__)("Embedded content from %s"),h.host),O=Le()(a,s,"wp-block-embed__wrapper"),f="wp-embed"===a?Object(U.createElement)(hn,{html:d}):Object(U.createElement)("div",{className:"wp-block-embed__wrapper"},Object(U.createElement)(Q.SandBox,{html:d,scripts:m,title:g,type:O}));return Object(U.createElement)("figure",{className:Le()(s,"wp-block-embed",{"is-type-video":"video"===a})},p?Object(U.createElement)(Q.Placeholder,{icon:Object(U.createElement)($.BlockIcon,{icon:u,showColors:!0}),label:b},Object(U.createElement)("p",{className:"components-placeholder__error"},Object(U.createElement)("a",{href:o},o)),Object(U.createElement)("p",{className:"components-placeholder__error"},Object(K.__)("Sorry, we cannot preview this embedded content in the editor."))):f,(!$.RichText.isEmpty(c)||l)&&Object(U.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:c,onChange:i,inlineToolbar:!0}))};function gn(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(r){function o(){var e;return Object(Z.a)(this,o),(e=Object(X.a)(this,Object(ee.a)(o).apply(this,arguments))).switchBackToURLInput=e.switchBackToURLInput.bind(Object(ne.a)(Object(ne.a)(e))),e.setUrl=e.setUrl.bind(Object(ne.a)(Object(ne.a)(e))),e.getAttributesFromPreview=e.getAttributesFromPreview.bind(Object(ne.a)(Object(ne.a)(e))),e.setAttributesFromPreview=e.setAttributesFromPreview.bind(Object(ne.a)(Object(ne.a)(e))),e.getResponsiveHelp=e.getResponsiveHelp.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleResponsive=e.toggleResponsive.bind(Object(ne.a)(Object(ne.a)(e))),e.handleIncomingPreview=e.handleIncomingPreview.bind(Object(ne.a)(Object(ne.a)(e))),e.state={editingURL:!1,url:e.props.attributes.url},e.props.preview&&e.handleIncomingPreview(),e}return Object(te.a)(o,r),Object(J.a)(o,[{key:"handleIncomingPreview",value:function(){var e=this.props.attributes.allowResponsive;this.setAttributesFromPreview();var t=He(this.props,this.getAttributesFromPreview(this.props.preview,e));t&&this.props.onReplace(t)}},{key:"componentDidUpdate",value:function(e){var t=void 0!==this.props.preview,n=void 0!==e.preview,r=e.preview&&this.props.preview&&this.props.preview.html!==e.preview.html||t&&!n,o=this.props.attributes.url!==e.attributes.url;if(r||o){if(this.props.cannotEmbed)return;this.handleIncomingPreview()}}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;this.setState({editingURL:!1}),n({url:t})}},{key:"getAttributesFromPreview",value:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o={},a=t.type,c=void 0===a?"rich":a,i=t.html,l=t.provider_name,s=Object(G.kebabCase)(Object(G.toLower)(""!==l?l:e));return ze(i)&&(c="wp-embed"),(i||"photo"===c)&&(o.type=c,o.providerNameSlug=s),o.className=De(i,this.props.attributes.className,n&&r),o}},{key:"setAttributesFromPreview",value:function(){var e=this.props,t=e.setAttributes,n=e.preview,r=this.props.attributes.allowResponsive;t(this.getAttributesFromPreview(n,r))}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"getResponsiveHelp",value:function(e){return e?Object(K.__)("This embed will preserve its aspect ratio when the browser is resized."):Object(K.__)("This embed may not preserve its aspect ratio when the browser is resized.")}},{key:"toggleResponsive",value:function(){var e=this.props.attributes,t=e.allowResponsive,r=e.className,o=this.props.preview.html,a=!t;this.props.setAttributes({allowResponsive:a,className:De(o,r,n&&a)})}},{key:"render",value:function(){var r=this,o=this.state,a=o.url,c=o.editingURL,i=this.props.attributes,l=i.caption,s=i.type,u=i.allowResponsive,b=this.props,m=b.fetching,d=b.setAttributes,h=b.isSelected,p=b.className,g=b.preview,O=b.cannotEmbed,f=b.themeSupportsResponsive,j=b.tryAgain;if(m)return Object(U.createElement)(sn,null);var v=Object(K.sprintf)(Object(K.__)("%s URL"),e);return!g||O||c?Object(U.createElement)(un,{icon:t,label:v,onSubmit:this.setUrl,value:a,cannotEmbed:O,onChange:function(e){return r.setState({url:e.target.value})},fallback:function(){return function(e,t){var n=Object(U.createElement)("a",{href:e},e);t(Object(D.createBlock)("core/paragraph",{content:Object(U.renderToString)(n)}))}(a,r.props.onReplace)},tryAgain:j}):Object(U.createElement)(U.Fragment,null,Object(U.createElement)(ln,{showEditButton:g&&!O,themeSupportsResponsive:f,blockSupportsResponsive:n,allowResponsive:u,getResponsiveHelp:this.getResponsiveHelp,toggleResponsive:this.toggleResponsive,switchBackToURLInput:this.switchBackToURLInput}),Object(U.createElement)(pn,{preview:g,className:p,url:a,type:s,caption:l,onCaptionChange:function(e){return d({caption:e})},isSelected:h,icon:t,label:v}))}}]),o}(U.Component)}var On={url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0}};function fn(e){var t=e.title,n=e.description,r=e.icon,o=e.category,a=void 0===o?"embed":o,c=e.transforms,i=e.keywords,l=void 0===i?[]:i,s=e.supports,u=void 0===s?{}:s,b=e.responsive,m=void 0===b||b,d=n||Object(K.sprintf)(Object(K.__)("Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube."),t),h=gn(t,r,m);return{title:t,description:d,icon:r,category:a,keywords:l,attributes:On,supports:Object(V.a)({align:!0},u),transforms:c,edit:Object(re.compose)(Object(oe.withSelect)(function(e,t){var n=t.attributes.url,r=e("core"),o=r.getEmbedPreview,a=r.isPreviewEmbedFallback,c=r.isRequestingEmbedPreview,i=r.getThemeSupports,l=void 0!==n&&o(n),s=void 0!==n&&a(n),u=void 0!==n&&c(n),b=i(),m=!!l&&void 0===l.type&&!1===l.html,d=!!l&&l.data&&404===l.data.status,h=!!l&&!m&&!d,p=void 0!==n&&(!h||s);return{preview:h?l:void 0,fetching:u,themeSupportsResponsive:b["responsive-embeds"],cannotEmbed:p}}),Object(oe.withDispatch)(function(e,t){var n=t.attributes.url,r=e("core/data");return{tryAgain:function(){r.invalidateResolution("core","getEmbedPreview",[n])}}}))(h),save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,c=n.providerNameSlug;if(!r)return null;var i=Le()("wp-block-embed",(t={},Object(F.a)(t,"is-type-".concat(a),a),Object(F.a)(t,"is-provider-".concat(c),c),t));return Object(U.createElement)("figure",{className:i},Object(U.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(r,"\n")),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:o}))},deprecated:[{attributes:On,save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,c=n.providerNameSlug;if(!r)return null;var i=Le()("wp-block-embed",(t={},Object(F.a)(t,"is-type-".concat(a),a),Object(F.a)(t,"is-provider-".concat(c),c),t));return Object(U.createElement)("figure",{className:i},"\n".concat(r,"\n"),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:o}))}}]}}var jn="core/embed",vn=fn({title:Object(K._x)("Embed","block title"),description:Object(K.__)("Embed videos, images, tweets, audio, and other content from external sources."),icon:Oe,responsive:!1,transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)},transform:function(e){return Object(D.createBlock)("core/embed",{url:e.textContent.trim()})}}]}}),yn=Re.map(function(e){return Object(V.a)({},e,{settings:fn(e.settings)})}),kn=Be.map(function(e){return Object(V.a)({},e,{settings:fn(e.settings)})});function wn(e){return e?Object(K.__)("The download button is visible."):Object(K.__)("The download button is hidden.")}function En(e){var t=e.hrefs,n=e.openInNewWindow,r=e.showDownloadButton,o=e.changeLinkDestinationOption,a=e.changeOpenInNewWindow,c=e.changeShowDownloadButton,i=t.href,l=t.textLinkHref,s=t.attachmentPage,u=[{value:i,label:Object(K.__)("URL")}];return s&&(u=[{value:i,label:Object(K.__)("Media File")},{value:s,label:Object(K.__)("Attachment Page")}]),Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Text Link Settings")},Object(U.createElement)(Q.SelectControl,{label:Object(K.__)("Link To"),value:l,options:u,onChange:o}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Open in New Tab"),checked:n,onChange:a})),Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Download Button Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Show Download Button"),help:wn,checked:r,onChange:c}))))}var Cn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onSelectFile=e.onSelectFile.bind(Object(ne.a)(Object(ne.a)(e))),e.confirmCopyURL=e.confirmCopyURL.bind(Object(ne.a)(Object(ne.a)(e))),e.resetCopyConfirmation=e.resetCopyConfirmation.bind(Object(ne.a)(Object(ne.a)(e))),e.changeLinkDestinationOption=e.changeLinkDestinationOption.bind(Object(ne.a)(Object(ne.a)(e))),e.changeOpenInNewWindow=e.changeOpenInNewWindow.bind(Object(ne.a)(Object(ne.a)(e))),e.changeShowDownloadButton=e.changeShowDownloadButton.bind(Object(ne.a)(Object(ne.a)(e))),e.state={hasError:!1,showCopyConfirmation:!1},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=n.href;if(Object(de.isBlobURL)(o)){var a=Object(de.getBlobByURL)(o);Object($.mediaUpload)({filesList:[a],onFileChange:function(t){var n=Object(he.a)(t,1)[0];return e.onSelectFile(n)},onError:function(t){e.setState({hasError:!0}),r.createErrorNotice(t)}}),Object(de.revokeBlobURL)(o)}}},{key:"componentDidUpdate",value:function(e){e.isSelected&&!this.props.isSelected&&this.setState({showCopyConfirmation:!1})}},{key:"onSelectFile",value:function(e){e&&e.url&&(this.setState({hasError:!1}),this.props.setAttributes({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id}))}},{key:"confirmCopyURL",value:function(){this.setState({showCopyConfirmation:!0})}},{key:"resetCopyConfirmation",value:function(){this.setState({showCopyConfirmation:!1})}},{key:"changeLinkDestinationOption",value:function(e){this.props.setAttributes({textLinkHref:e})}},{key:"changeOpenInNewWindow",value:function(e){this.props.setAttributes({textLinkTarget:!!e&&"_blank"})}},{key:"changeShowDownloadButton",value:function(e){this.props.setAttributes({showDownloadButton:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.isSelected,r=e.attributes,o=e.setAttributes,a=e.noticeUI,c=e.noticeOperations,i=e.media,l=r.fileName,s=r.href,u=r.textLinkHref,b=r.textLinkTarget,m=r.showDownloadButton,d=r.downloadButtonText,h=r.id,p=this.state,g=p.hasError,O=p.showCopyConfirmation,f=i&&i.link;if(!s||g)return Object(U.createElement)($.MediaPlaceholder,{icon:"media-default",labels:{title:Object(K.__)("File"),instructions:Object(K.__)("Drag a file, upload a new one or select a file from your library.")},onSelect:this.onSelectFile,notices:a,onError:c.createErrorNotice,accept:"*"});var j=q()(t,{"is-transient":Object(de.isBlobURL)(s)});return Object(U.createElement)(U.Fragment,null,Object(U.createElement)(En,Object(Y.a)({hrefs:{href:s,textLinkHref:u,attachmentPage:f}},{openInNewWindow:!!b,showDownloadButton:m,changeLinkDestinationOption:this.changeLinkDestinationOption,changeOpenInNewWindow:this.changeOpenInNewWindow,changeShowDownloadButton:this.changeShowDownloadButton})),Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.MediaUploadCheck,null,Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)($.MediaUpload,{onSelect:this.onSelectFile,value:h,render:function(e){var t=e.open;return Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit file"),onClick:t,icon:"edit"})}})))),Object(U.createElement)("div",{className:j},Object(U.createElement)("div",{className:"".concat(t,"__content-wrapper")},Object(U.createElement)($.RichText,{wrapperClassName:"".concat(t,"__textlink"),tagName:"div",value:l,placeholder:Object(K.__)("Write file name…"),keepPlaceholderOnFocus:!0,formattingControls:[],onChange:function(e){return o({fileName:e})}}),m&&Object(U.createElement)("div",{className:"".concat(t,"__button-richtext-wrapper")},Object(U.createElement)($.RichText,{tagName:"div",className:"".concat(t,"__button"),value:d,formattingControls:[],placeholder:Object(K.__)("Add text…"),keepPlaceholderOnFocus:!0,onChange:function(e){return o({downloadButtonText:e})}}))),n&&Object(U.createElement)(Q.ClipboardButton,{isDefault:!0,text:s,className:"".concat(t,"__copy-url-button"),onCopy:this.confirmCopyURL,onFinishCopy:this.resetCopyConfirmation,disabled:Object(de.isBlobURL)(s)},O?Object(K.__)("Copied!"):Object(K.__)("Copy URL"))))}}]),t}(U.Component),_n=Object(re.compose)([Object(oe.withSelect)(function(e,t){var n=e("core").getMedia,r=t.attributes.id;return{media:void 0===r?void 0:n(r)}}),Q.withNotices])(Cn),xn="core/file",Sn={title:Object(K.__)("File"),description:Object(K.__)("Add a link to a downloadable file."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.Path,{d:"M9 6l2 2h9v10H4V6h5m1-2H4L2 6v12l2 2h16l2-2V8l-2-2h-8l-2-2z"})),category:"common",keywords:[Object(K.__)("document"),Object(K.__)("pdf")],attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]",default:Object(K._x)("Download","button label")}},supports:{align:!0},transforms:{from:[{type:"files",isMatch:function(e){return e.length>0},priority:15,transform:function(e){var t=[];return e.map(function(e){var n=Object(de.createBlobURL)(e);t.push(Object(D.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))}),t}},{type:"block",blocks:["core/audio"],transform:function(e){return Object(D.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id})}},{type:"block",blocks:["core/video"],transform:function(e){return Object(D.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id})}},{type:"block",blocks:["core/image"],transform:function(e){return Object(D.createBlock)("core/file",{href:e.url,fileName:e.caption,textLinkHref:e.url,id:e.id})}}],to:[{type:"block",blocks:["core/audio"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(oe.select)("core").getMedia)(t);return!!n&&Object(G.includes)(n.mime_type,"audio")},transform:function(e){return Object(D.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(oe.select)("core").getMedia)(t);return!!n&&Object(G.includes)(n.mime_type,"video")},transform:function(e){return Object(D.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id})}},{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(oe.select)("core").getMedia)(t);return!!n&&Object(G.includes)(n.mime_type,"image")},transform:function(e){return Object(D.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id})}}]},edit:_n,save:function(e){var t=e.attributes,n=t.href,r=t.fileName,o=t.textLinkHref,a=t.textLinkTarget,c=t.showDownloadButton,i=t.downloadButtonText;return n&&Object(U.createElement)("div",null,!$.RichText.isEmpty(r)&&Object(U.createElement)("a",{href:o,target:a,rel:!!a&&"noreferrer noopener"},Object(U.createElement)($.RichText.Content,{value:r})),c&&Object(U.createElement)("a",{href:n,className:"wp-block-file__button",download:!0},Object(U.createElement)($.RichText.Content,{value:i})))}},Tn="core/html",Nn={title:Object(K.__)("Custom HTML"),description:Object(K.__)("Add custom HTML code and preview it as you edit."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M4.5,11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5V11z M7,10.5h1.5V15H10v-4.5h1.5V9H7V10.5z M14.5,10l-1-1H12v6h1.5v-3.9 l1,1l1-1V15H17V9h-1.5L14.5,10z M19.5,13.5V9H18v6h5v-1.5H19.5z"})),category:"formatting",keywords:[Object(K.__)("embed")],supports:{customClassName:!1,className:!1,html:!1},attributes:{content:{type:"string",source:"html"}},transforms:{from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("iframe")},schema:{figure:{require:["iframe"],children:{iframe:{attributes:["src","allowfullscreen","height","width"]},figcaption:{children:Object(D.getPhrasingContentSchema)()}}}}}]},edit:Object(re.withState)({isPreview:!1})(function(e){var t=e.attributes,n=e.setAttributes,r=e.setState,o=e.isPreview;return Object(U.createElement)("div",{className:"wp-block-html"},Object(U.createElement)($.BlockControls,null,Object(U.createElement)("div",{className:"components-toolbar"},Object(U.createElement)("button",{className:"components-tab-button ".concat(o?"":"is-active"),onClick:function(){return r({isPreview:!1})}},Object(U.createElement)("span",null,"HTML")),Object(U.createElement)("button",{className:"components-tab-button ".concat(o?"is-active":""),onClick:function(){return r({isPreview:!0})}},Object(U.createElement)("span",null,Object(K.__)("Preview"))))),Object(U.createElement)(Q.Disabled.Consumer,null,function(e){return o||e?Object(U.createElement)(Q.SandBox,{html:t.content}):Object(U.createElement)($.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(K.__)("Write HTML…"),"aria-label":Object(K.__)("HTML")})}))}),save:function(e){var t=e.attributes;return Object(U.createElement)(U.RawHTML,null,t.content)}},Rn=["image","video"],Bn=function(e){function t(){return Object(Z.a)(this,t),Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))}return Object(te.a)(t,e),Object(J.a)(t,[{key:"renderToolbarEditButton",value:function(){var e=this.props,t=e.mediaId,n=e.onSelectMedia;return Object(U.createElement)($.BlockControls,null,Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)($.MediaUpload,{onSelect:n,allowedTypes:Rn,value:t,render:function(e){var t=e.open;return Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit media"),icon:"edit",onClick:t})}})))}},{key:"renderImage",value:function(){var e=this.props,t=e.mediaAlt,n=e.mediaUrl,r=e.className;return Object(U.createElement)(U.Fragment,null,this.renderToolbarEditButton(),Object(U.createElement)("figure",{className:r},Object(U.createElement)("img",{src:n,alt:t})))}},{key:"renderVideo",value:function(){var e=this.props,t=e.mediaUrl,n=e.className;return Object(U.createElement)(U.Fragment,null,this.renderToolbarEditButton(),Object(U.createElement)("figure",{className:n},Object(U.createElement)("video",{controls:!0,src:t})))}},{key:"renderPlaceholder",value:function(){var e=this.props,t=e.onSelectMedia,n=e.className;return Object(U.createElement)($.MediaPlaceholder,{icon:"format-image",labels:{title:Object(K.__)("Media area")},className:n,onSelect:t,accept:"image/*,video/*",allowedTypes:Rn})}},{key:"render",value:function(){var e=this.props,t=e.mediaPosition,n=e.mediaUrl,r=e.mediaType,o=e.mediaWidth,a=e.commitWidthChange,c=e.onWidthChange;if(r&&n){var i={right:"left"===t,left:"right"===t},l=null;switch(r){case"image":l=this.renderImage();break;case"video":l=this.renderVideo()}return Object(U.createElement)(Q.ResizableBox,{className:"editor-media-container__resizer",size:{width:o+"%"},minWidth:"10%",maxWidth:"100%",enable:i,onResize:function(e,t,n){c(parseInt(n.style.width))},onResizeStop:function(e,t,n){a(parseInt(n.style.width))},axis:"x"},l)}return this.renderPlaceholder()}}]),t}(U.Component),An=["core/button","core/paragraph","core/heading","core/list"],In=[["core/paragraph",{fontSize:"large",placeholder:Object(K._x)("Content…","content placeholder")}]],Pn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onSelectMedia=e.onSelectMedia.bind(Object(ne.a)(Object(ne.a)(e))),e.onWidthChange=e.onWidthChange.bind(Object(ne.a)(Object(ne.a)(e))),e.commitWidthChange=e.commitWidthChange.bind(Object(ne.a)(Object(ne.a)(e))),e.state={mediaWidth:null},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"onSelectMedia",value:function(e){var t,n,r=this.props.setAttributes;"image"===(t=e.media_type?"image"===e.media_type?"image":"video":e.type)&&(n=Object(G.get)(e,["sizes","large","url"])||Object(G.get)(e,["media_details","sizes","large","source_url"])),r({mediaAlt:e.alt,mediaId:e.id,mediaType:t,mediaUrl:n||e.url})}},{key:"onWidthChange",value:function(e){this.setState({mediaWidth:e})}},{key:"commitWidthChange",value:function(e){(0,this.props.setAttributes)({mediaWidth:e}),this.setState({mediaWidth:null})}},{key:"renderMediaArea",value:function(){var e=this.props.attributes,t=e.mediaAlt,n=e.mediaId,r=e.mediaPosition,o=e.mediaType,a=e.mediaUrl,c=e.mediaWidth;return Object(U.createElement)(Bn,Object(Y.a)({className:"block-library-media-text__media-container",onSelectMedia:this.onSelectMedia,onWidthChange:this.onWidthChange,commitWidthChange:this.commitWidthChange},{mediaAlt:t,mediaId:n,mediaType:o,mediaUrl:a,mediaPosition:r,mediaWidth:c}))}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.className,o=t.backgroundColor,a=t.isSelected,c=t.setAttributes,i=t.setBackgroundColor,l=n.isStackedOnMobile,s=n.mediaAlt,u=n.mediaPosition,b=n.mediaType,m=n.mediaWidth,d=this.state.mediaWidth,h=q()(r,(e={"has-media-on-the-right":"right"===u,"is-selected":a},Object(F.a)(e,o.class,o.class),Object(F.a)(e,"is-stacked-on-mobile",l),e)),p="".concat(d||m,"%"),g={gridTemplateColumns:"right"===u?"auto ".concat(p):"".concat(p," auto"),backgroundColor:o.color},O=[{value:o.color,onChange:i,label:Object(K.__)("Background Color")}],f=[{icon:"align-pull-left",title:Object(K.__)("Show media on left"),isActive:"left"===u,onClick:function(){return c({mediaPosition:"left"})}},{icon:"align-pull-right",title:Object(K.__)("Show media on right"),isActive:"right"===u,onClick:function(){return c({mediaPosition:"right"})}}],j=Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Media & Text Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Stack on mobile"),checked:l,onChange:function(){return c({isStackedOnMobile:!l})}}),"image"===b&&Object(U.createElement)(Q.TextareaControl,{label:Object(K.__)("Alt Text (Alternative Text)"),value:s,onChange:function(e){c({mediaAlt:e})},help:Object(K.__)("Alternative text describes your image to people who can’t see it. Add a short description with its key details.")}));return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.InspectorControls,null,j,Object(U.createElement)($.PanelColorSettings,{title:Object(K.__)("Color Settings"),initialOpen:!1,colorSettings:O})),Object(U.createElement)($.BlockControls,null,Object(U.createElement)(Q.Toolbar,{controls:f})),Object(U.createElement)("div",{className:h,style:g},this.renderMediaArea(),Object(U.createElement)($.InnerBlocks,{allowedBlocks:An,template:In,templateInsertUpdatesSelection:!1})))}}]),t}(U.Component),Ln=Object($.withColors)("backgroundColor")(Pn),Mn="core/media-text",zn={align:{type:"string",default:"wide"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},Hn={title:Object(K.__)("Media & Text"),description:Object(K.__)("Set media and words side-by-side for a richer layout."),icon:Object(U.createElement)(Q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(U.createElement)(Q.Path,{d:"M13 17h8v-2h-8v2zM3 19h8V5H3v14zM13 9h8V7h-8v2zm0 4h8v-2h-8v2z"})),category:"layout",keywords:[Object(K.__)("image"),Object(K.__)("video")],attributes:zn,supports:{align:["wide","full"],html:!1},transforms:{from:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.alt,n=e.url,r=e.id;return Object(D.createBlock)("core/media-text",{mediaAlt:t,mediaId:r,mediaUrl:n,mediaType:"image"})}},{type:"block",blocks:["core/video"],transform:function(e){var t=e.src,n=e.id;return Object(D.createBlock)("core/media-text",{mediaId:n,mediaUrl:t,mediaType:"video"})}}],to:[{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.mediaType;return!e.mediaUrl||"image"===t},transform:function(e){var t=e.mediaAlt,n=e.mediaId,r=e.mediaUrl;return Object(D.createBlock)("core/image",{alt:t,id:n,url:r})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.mediaType;return!e.mediaUrl||"video"===t},transform:function(e){var t=e.mediaId,n=e.mediaUrl;return Object(D.createBlock)("core/video",{id:t,src:n})}}]},edit:Ln,save:function(e){var t,n,r=e.attributes,o=r.backgroundColor,a=r.customBackgroundColor,c=r.isStackedOnMobile,i=r.mediaAlt,l=r.mediaPosition,s=r.mediaType,u=r.mediaUrl,b=r.mediaWidth,m=r.mediaId,d={image:function(){return Object(U.createElement)("img",{src:u,alt:i,className:m&&"image"===s?"wp-image-".concat(m):null})},video:function(){return Object(U.createElement)("video",{controls:!0,src:u})}},h=Object($.getColorClassName)("background-color",o),p=q()((t={"has-media-on-the-right":"right"===l},Object(F.a)(t,h,h),Object(F.a)(t,"is-stacked-on-mobile",c),t));50!==b&&(n="right"===l?"auto ".concat(b,"%"):"".concat(b,"% auto"));var g={backgroundColor:h?void 0:a,gridTemplateColumns:n};return Object(U.createElement)("div",{className:p,style:g},Object(U.createElement)("figure",{className:"wp-block-media-text__media"},(d[s]||G.noop)()),Object(U.createElement)("div",{className:"wp-block-media-text__content"},Object(U.createElement)($.InnerBlocks.Content,null)))},deprecated:[{attributes:zn,save:function(e){var t,n,r=e.attributes,o=r.backgroundColor,a=r.customBackgroundColor,c=r.isStackedOnMobile,i=r.mediaAlt,l=r.mediaPosition,s=r.mediaType,u=r.mediaUrl,b=r.mediaWidth,m={image:function(){return Object(U.createElement)("img",{src:u,alt:i})},video:function(){return Object(U.createElement)("video",{controls:!0,src:u})}},d=Object($.getColorClassName)("background-color",o),h=q()((t={"has-media-on-the-right":"right"===l},Object(F.a)(t,d,d),Object(F.a)(t,"is-stacked-on-mobile",c),t));50!==b&&(n="right"===l?"auto ".concat(b,"%"):"".concat(b,"% auto"));var p={backgroundColor:d?void 0:a,gridTemplateColumns:n};return Object(U.createElement)("div",{className:h,style:p},Object(U.createElement)("figure",{className:"wp-block-media-text__media"},(m[s]||G.noop)()),Object(U.createElement)("div",{className:"wp-block-media-text__content"},Object(U.createElement)($.InnerBlocks.Content,null)))}}]},Dn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).setAlignment=e.setAlignment.bind(Object(ne.a)(Object(ne.a)(e))),e.setCommentsToShow=e.setCommentsToShow.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleDisplayAvatar=e.createToggleAttribute("displayAvatar"),e.toggleDisplayDate=e.createToggleAttribute("displayDate"),e.toggleDisplayExcerpt=e.createToggleAttribute("displayExcerpt"),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"createToggleAttribute",value:function(e){var t=this;return function(){var n=t.props.attributes[e];(0,t.props.setAttributes)(Object(F.a)({},e,!n))}}},{key:"setAlignment",value:function(e){this.props.setAttributes({align:e})}},{key:"setCommentsToShow",value:function(e){this.props.setAttributes({commentsToShow:e})}},{key:"render",value:function(){var e=this.props.attributes,t=e.align,n=e.commentsToShow,r=e.displayAvatar,o=e.displayDate,a=e.displayExcerpt;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:t,onChange:this.setAlignment})),Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Latest Comments Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display Avatar"),checked:r,onChange:this.toggleDisplayAvatar}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display Date"),checked:o,onChange:this.toggleDisplayDate}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display Excerpt"),checked:a,onChange:this.toggleDisplayExcerpt}),Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Number of Comments"),value:n,onChange:this.setCommentsToShow,min:1,max:100}))),Object(U.createElement)(Q.Disabled,null,Object(U.createElement)($.ServerSideRender,{block:"core/latest-comments",attributes:this.props.attributes})))}}]),t}(U.Component),Fn="core/latest-comments",Vn={title:Object(K.__)("Latest Comments"),description:Object(K.__)("Display a list of your most recent comments."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M22 4l-2-2H4L2 4v12l2 2h14l4 4V4zm-2 0v13l-1-1H4V4h16z"}),Object(U.createElement)(Q.Path,{d:"M6 12h12v2H6zM6 9h12v2H6zM6 6h12v2H6z"}))),category:"widgets",keywords:[Object(K.__)("recent comments")],supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right","wide","full"].includes(t))return{"data-align":t}},edit:Dn,save:function(){return null}},Un=n(30),Wn=n.n(Un),qn=n(46),Gn=n(49),Kn={per_page:-1},$n=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).state={categoriesList:[]},e.toggleDisplayPostDate=e.toggleDisplayPostDate.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentWillMount",value:function(){var e=this;this.isStillMounted=!0,this.fetchRequest=Wn()({path:Object(pe.addQueryArgs)("/wp/v2/categories",Kn)}).then(function(t){e.isStillMounted&&e.setState({categoriesList:t})}).catch(function(){e.isStillMounted&&e.setState({categoriesList:[]})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"toggleDisplayPostDate",value:function(){var e=this.props.attributes.displayPostDate;(0,this.props.setAttributes)({displayPostDate:!e})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.latestPosts,o=this.state.categoriesList,a=t.displayPostDate,c=t.align,i=t.postLayout,l=t.columns,s=t.order,u=t.orderBy,b=t.categories,m=t.postsToShow,d=Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Latest Posts Settings")},Object(U.createElement)(Q.QueryControls,Object(Y.a)({order:s,orderBy:u},{numberOfItems:m,categoriesList:o,selectedCategoryId:b,onOrderChange:function(e){return n({order:e})},onOrderByChange:function(e){return n({orderBy:e})},onCategoryChange:function(e){return n({categories:""!==e?e:void 0})},onNumberOfItemsChange:function(e){return n({postsToShow:e})}})),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display post date"),checked:a,onChange:this.toggleDisplayPostDate}),"grid"===i&&Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Columns"),value:l,onChange:function(e){return n({columns:e})},min:2,max:h?Math.min(6,r.length):6}))),h=Array.isArray(r)&&r.length;if(!h)return Object(U.createElement)(U.Fragment,null,d,Object(U.createElement)(Q.Placeholder,{icon:"admin-post",label:Object(K.__)("Latest Posts")},Array.isArray(r)?Object(K.__)("No posts found."):Object(U.createElement)(Q.Spinner,null)));var p=r.length>m?r.slice(0,m):r,g=[{icon:"list-view",title:Object(K.__)("List View"),onClick:function(){return n({postLayout:"list"})},isActive:"list"===i},{icon:"grid-view",title:Object(K.__)("Grid View"),onClick:function(){return n({postLayout:"grid"})},isActive:"grid"===i}],O=Object(qn.__experimentalGetSettings)().formats.date;return Object(U.createElement)(U.Fragment,null,d,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:c,onChange:function(e){n({align:e})},controls:["center","wide","full"]}),Object(U.createElement)(Q.Toolbar,{controls:g})),Object(U.createElement)("ul",{className:q()(this.props.className,Object(F.a)({"is-grid":"grid"===i,"has-dates":a},"columns-".concat(l),"grid"===i))},p.map(function(e,t){return Object(U.createElement)("li",{key:t},Object(U.createElement)("a",{href:e.link,target:"_blank"},Object(Gn.decodeEntities)(e.title.rendered.trim())||Object(K.__)("(Untitled)")),a&&e.date_gmt&&Object(U.createElement)("time",{dateTime:Object(qn.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date"},Object(qn.dateI18n)(O,e.date_gmt)))})))}}]),t}(U.Component),Qn=Object(oe.withSelect)(function(e,t){var n=t.attributes,r=n.postsToShow,o=n.order,a=n.orderBy,c=n.categories;return{latestPosts:(0,e("core").getEntityRecords)("postType","post",Object(G.pickBy)({categories:c,order:o,orderby:a,per_page:r},function(e){return!Object(G.isUndefined)(e)}))}})($n),Yn="core/latest-posts",Zn={title:Object(K.__)("Latest Posts"),description:Object(K.__)("Display a list of your most recent posts."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(U.createElement)(Q.Rect,{x:"11",y:"7",width:"6",height:"2"}),Object(U.createElement)(Q.Rect,{x:"11",y:"11",width:"6",height:"2"}),Object(U.createElement)(Q.Rect,{x:"11",y:"15",width:"6",height:"2"}),Object(U.createElement)(Q.Rect,{x:"7",y:"7",width:"2",height:"2"}),Object(U.createElement)(Q.Rect,{x:"7",y:"11",width:"2",height:"2"}),Object(U.createElement)(Q.Rect,{x:"7",y:"15",width:"2",height:"2"}),Object(U.createElement)(Q.Path,{d:"M20.1,3H3.9C3.4,3,3,3.4,3,3.9v16.2C3,20.5,3.4,21,3.9,21h16.2c0.4,0,0.9-0.5,0.9-0.9V3.9C21,3.4,20.5,3,20.1,3z M19,19H5V5h14V19z"})),category:"widgets",keywords:[Object(K.__)("recent posts")],supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right","wide","full"].includes(t))return{"data-align":t}},edit:Qn,save:function(){return null}},Jn=Object(V.a)({},Object(D.getPhrasingContentSchema)(),{ul:{},ol:{attributes:["type"]}});["ul","ol"].forEach(function(e){Jn[e].children={li:{children:Jn}}});var Xn={className:!1},er={ordered:{type:"boolean",default:!1},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",default:""}},tr="core/list",nr={title:Object(K.__)("List"),description:Object(K.__)("Create a bulleted or numbered list."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"}))),category:"common",keywords:[Object(K.__)("bullet list"),Object(K.__)("ordered list"),Object(K.__)("numbered list")],attributes:er,supports:Xn,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(D.createBlock)("core/list",{values:Object(lt.toHTMLString)({value:Object(lt.join)(e.map(function(e){var t=e.content;return Object(lt.replace)(Object(lt.create)({html:t}),/\n/g,lt.LINE_SEPARATOR)}),lt.LINE_SEPARATOR),multilineTag:"li"})})}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.value;return Object(D.createBlock)("core/list",{values:Object(lt.toHTMLString)({value:Object(lt.create)({html:t,multilineTag:"p"}),multilineTag:"li"})})}},{type:"raw",selector:"ol,ul",schema:{ol:Jn.ol,ul:Jn.ul},transform:function(e){return Object(D.createBlock)("core/list",Object(V.a)({},Object(D.getBlockAttributes)("core/list",e.outerHTML),{ordered:"OL"===e.nodeName}))}}].concat(Object(H.a)(["*","-"].map(function(e){return{type:"prefix",prefix:e,transform:function(e){return Object(D.createBlock)("core/list",{values:"".concat(e,"
")})}},{type:"raw",isMatch:function(e){return"BLOCKQUOTE"===e.nodeName&&Array.from(e.childNodes).every(function(e){return"P"===e.nodeName})},schema:{blockquote:{children:{p:{children:Object(D.getPhrasingContentSchema)()}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.value,n=e.citation,r=[];return t&&""!==t&&r.push.apply(r,Object(H.a)(Object(lt.split)(Object(lt.create)({html:t,multilineTag:"p"}),"\u2028").map(function(e){return Object(D.createBlock)("core/paragraph",{content:Object(lt.toHTMLString)({value:e})})}))),n&&""!==n&&r.push(Object(D.createBlock)("core/paragraph",{content:n})),0===r.length?Object(D.createBlock)("core/paragraph",{content:""}):r}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.value,n=e.citation,r=Object(et.a)(e,["value","citation"]);if(""===t)return Object(D.createBlock)("core/heading",{content:n});var o=Object(lt.split)(Object(lt.create)({html:t,multilineTag:"p"}),"\u2028"),a=o.slice(1);return[Object(D.createBlock)("core/heading",{content:Object(lt.toHTMLString)({value:o[0]})}),Object(D.createBlock)("core/quote",Object(V.a)({},r,{citation:n,value:Object(lt.toHTMLString)({value:a.length?Object(lt.join)(o.slice(1),"\u2028"):Object(lt.create)(),multilineTag:"p"})}))]}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(D.createBlock)("core/pullquote",{value:t,citation:n})}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected,o=e.mergeBlocks,a=e.onReplace,c=e.className,i=t.align,l=t.value,s=t.citation;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}})),Object(U.createElement)("blockquote",{className:c,style:{textAlign:i}},Object(U.createElement)($.RichText,{identifier:"value",multiline:!0,value:l,onChange:function(e){return n({value:e})},onMerge:o,onRemove:function(e){var t=!s||0===s.length;!e&&t&&a([])},placeholder:Object(K.__)("Write quote…")}),(!$.RichText.isEmpty(s)||r)&&Object(U.createElement)($.RichText,{identifier:"citation",value:s,onChange:function(e){return n({citation:e})},placeholder:Object(K.__)("Write citation…"),className:"wp-block-quote__citation"})))},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation;return Object(U.createElement)("blockquote",{style:{textAlign:n||null}},Object(U.createElement)($.RichText.Content,{multiline:!0,value:r}),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){var n=t.value,r=t.citation;return n&&""!==n?Object(V.a)({},e,{value:e.value+n,citation:e.citation+r}):Object(V.a)({},e,{citation:e.citation+r})},deprecated:[{attributes:Object(V.a)({},st,{style:{type:"number",default:1}}),migrate:function(e){return 2===e.style?Object(V.a)({},Object(G.omit)(e,["style"]),{className:e.className?e.className+" is-style-large":"is-style-large"}):e},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=t.style;return Object(U.createElement)("blockquote",{className:2===a?"is-large":"",style:{textAlign:n||null}},Object(U.createElement)($.RichText.Content,{multiline:!0,value:r}),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Object(V.a)({},st,{citation:{type:"string",source:"html",selector:"footer",default:""},style:{type:"number",default:1}}),save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=t.style;return Object(U.createElement)("blockquote",{className:"blocks-quote-style-".concat(a),style:{textAlign:n||null}},Object(U.createElement)($.RichText.Content,{multiline:!0,value:r}),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"footer",value:o}))}}]},mt=n(16),dt=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onImageClick=e.onImageClick.bind(Object(ne.a)(Object(ne.a)(e))),e.onSelectCaption=e.onSelectCaption.bind(Object(ne.a)(Object(ne.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(ne.a)(Object(ne.a)(e))),e.bindContainer=e.bindContainer.bind(Object(ne.a)(Object(ne.a)(e))),e.state={captionSelected:!1},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"onSelectCaption",value:function(){this.state.captionSelected||this.setState({captionSelected:!0}),this.props.isSelected||this.props.onSelect()}},{key:"onImageClick",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onKeyDown",value:function(e){this.container===document.activeElement&&this.props.isSelected&&-1!==[mt.BACKSPACE,mt.DELETE].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),this.props.onRemove())}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isSelected,r=t.image,o=t.url;r&&!o&&this.props.setAttributes({url:r.source_url,alt:r.alt_text}),this.state.captionSelected&&!n&&e.isSelected&&this.setState({captionSelected:!1})}},{key:"render",value:function(){var e,t=this.props,n=t.url,r=t.alt,o=t.id,a=t.linkTo,c=t.link,i=t.isSelected,l=t.caption,s=t.onRemove,u=t.setAttributes,b=t["aria-label"];switch(a){case"media":e=n;break;case"attachment":e=c}var m=Object(U.createElement)(U.Fragment,null,Object(U.createElement)("img",{src:n,alt:r,"data-id":o,onClick:this.onImageClick,tabIndex:"0",onKeyDown:this.onImageClick,"aria-label":b}),Object(de.isBlobURL)(n)&&Object(U.createElement)(Q.Spinner,null)),d=q()({"is-selected":i,"is-transient":Object(de.isBlobURL)(n)});return Object(U.createElement)("figure",{className:d,tabIndex:"-1",onKeyDown:this.onKeyDown,ref:this.bindContainer},i&&Object(U.createElement)("div",{className:"block-library-gallery-item__inline-menu"},Object(U.createElement)(Q.IconButton,{icon:"no-alt",onClick:s,className:"blocks-gallery-item__remove",label:Object(K.__)("Remove Image")})),e?Object(U.createElement)("a",{href:e},m):m,!$.RichText.isEmpty(l)||i?Object(U.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:l,isSelected:this.state.captionSelected,onChange:function(e){return u({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}):null)}}]),t}(U.Component),ht=Object(oe.withSelect)(function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}})(dt),pt=[{value:"attachment",label:Object(K.__)("Attachment Page")},{value:"media",label:Object(K.__)("Media File")},{value:"none",label:Object(K.__)("None")}],gt=["image"];function Ot(e){return Math.min(3,e.images.length)}var ft=function(e){var t=Object(G.pick)(e,["alt","id","link","caption"]);return t.url=Object(G.get)(e,["sizes","large","url"])||Object(G.get)(e,["media_details","sizes","large","source_url"])||e.url,t},jt=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(ne.a)(Object(ne.a)(e))),e.onSelectImages=e.onSelectImages.bind(Object(ne.a)(Object(ne.a)(e))),e.setLinkTo=e.setLinkTo.bind(Object(ne.a)(Object(ne.a)(e))),e.setColumnsNumber=e.setColumnsNumber.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleImageCrop=e.toggleImageCrop.bind(Object(ne.a)(Object(ne.a)(e))),e.onRemoveImage=e.onRemoveImage.bind(Object(ne.a)(Object(ne.a)(e))),e.setImageAttributes=e.setImageAttributes.bind(Object(ne.a)(Object(ne.a)(e))),e.addFiles=e.addFiles.bind(Object(ne.a)(Object(ne.a)(e))),e.uploadFromFiles=e.uploadFromFiles.bind(Object(ne.a)(Object(ne.a)(e))),e.setAttributes=e.setAttributes.bind(Object(ne.a)(Object(ne.a)(e))),e.state={selectedImage:null},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"setAttributes",value:function(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e=Object(V.a)({},e,{ids:Object(G.map)(e.images,"id")})),this.props.setAttributes(e)}},{key:"onSelectImage",value:function(e){var t=this;return function(){t.state.selectedImage!==e&&t.setState({selectedImage:e})}}},{key:"onRemoveImage",value:function(e){var t=this;return function(){var n=Object(G.filter)(t.props.attributes.images,function(t,n){return e!==n}),r=t.props.attributes.columns;t.setState({selectedImage:null}),t.setAttributes({images:n,columns:r?Math.min(n.length,r):r})}}},{key:"onSelectImages",value:function(e){this.setAttributes({images:e.map(function(e){return ft(e)})})}},{key:"setLinkTo",value:function(e){this.setAttributes({linkTo:e})}},{key:"setColumnsNumber",value:function(e){this.setAttributes({columns:e})}},{key:"toggleImageCrop",value:function(){this.setAttributes({imageCrop:!this.props.attributes.imageCrop})}},{key:"getImageCropHelp",value:function(e){return e?Object(K.__)("Thumbnails are cropped to align."):Object(K.__)("Thumbnails are not cropped.")}},{key:"setImageAttributes",value:function(e,t){var n=this.props.attributes.images,r=this.setAttributes;n[e]&&r({images:Object(H.a)(n.slice(0,e)).concat([Object(V.a)({},n[e],t)],Object(H.a)(n.slice(e+1)))})}},{key:"uploadFromFiles",value:function(e){this.addFiles(e.target.files)}},{key:"addFiles",value:function(e){var t=this.props.attributes.images||[],n=this.props.noticeOperations,r=this.setAttributes;Object($.mediaUpload)({allowedTypes:gt,filesList:e,onFileChange:function(e){var n=e.map(function(e){return ft(e)});r({images:t.concat(n)})},onError:n.createErrorNotice})}},{key:"componentDidUpdate",value:function(e){!this.props.isSelected&&e.isSelected&&this.setState({selectedImage:null,captionSelected:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.isSelected,o=t.className,a=t.noticeOperations,c=t.noticeUI,i=n.images,l=n.columns,s=void 0===l?Ot(n):l,u=n.align,b=n.imageCrop,m=n.linkTo,d=Object(U.createElement)(Q.DropZone,{onFilesDrop:this.addFiles}),h=Object(U.createElement)($.BlockControls,null,!!i.length&&Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)($.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:gt,multiple:!0,gallery:!0,value:i.map(function(e){return e.id}),render:function(e){var t=e.open;return Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit Gallery"),icon:"edit",onClick:t})}})));return 0===i.length?Object(U.createElement)(U.Fragment,null,h,Object(U.createElement)($.MediaPlaceholder,{icon:"format-gallery",className:o,labels:{title:Object(K.__)("Gallery"),instructions:Object(K.__)("Drag images, upload new ones or select files from your library.")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:gt,multiple:!0,notices:c,onError:a.createErrorNotice})):Object(U.createElement)(U.Fragment,null,h,Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Gallery Settings")},i.length>1&&Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Columns"),value:s,onChange:this.setColumnsNumber,min:1,max:Math.min(8,i.length)}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Crop Images"),checked:!!b,onChange:this.toggleImageCrop,help:this.getImageCropHelp}),Object(U.createElement)(Q.SelectControl,{label:Object(K.__)("Link To"),value:m,onChange:this.setLinkTo,options:pt}))),c,Object(U.createElement)("ul",{className:"".concat(o," align").concat(u," columns-").concat(s," ").concat(b?"is-cropped":"")},d,i.map(function(t,n){var o=Object(K.__)(Object(K.sprintf)("image %1$d of %2$d in gallery",n+1,i.length));return Object(U.createElement)("li",{className:"blocks-gallery-item",key:t.id||t.url},Object(U.createElement)(ht,{url:t.url,alt:t.alt,id:t.id,isSelected:r&&e.state.selectedImage===n,onRemove:e.onRemoveImage(n),onSelect:e.onSelectImage(n),setAttributes:function(t){return e.setImageAttributes(n,t)},caption:t.caption,"aria-label":o}))}),r&&Object(U.createElement)("li",{className:"blocks-gallery-item has-add-item-button"},Object(U.createElement)(Q.FormFileUpload,{multiple:!0,isLarge:!0,className:"block-library-gallery-add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},Object(K.__)("Upload an image")))))}}]),t}(U.Component),vt=Object(Q.withNotices)(jt),yt={images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},kt="core/gallery",wt=function(e){return e?e.split(",").map(function(e){return parseInt(e,10)}):[]},Et={title:Object(K.__)("Gallery"),description:Object(K.__)("Display multiple images in a rich gallery."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M20 4v12H8V4h12m0-2H8L6 4v12l2 2h12l2-2V4l-2-2z"}),Object(U.createElement)(Q.Path,{d:"M12 12l1 2 3-3 3 4H9z"}),Object(U.createElement)(Q.Path,{d:"M2 6v14l2 2h14v-2H4V6H2z"}))),category:"common",keywords:[Object(K.__)("images"),Object(K.__)("photos")],attributes:yt,supports:{align:!0},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:function(e){var t=e[0].align;t=Object(G.every)(e,["align",t])?t:void 0;var n=Object(G.filter)(e,function(e){var t=e.id,n=e.url;return t&&n});return Object(D.createBlock)("core/gallery",{images:n.map(function(e){return{id:e.id,url:e.url,alt:e.alt,caption:e.caption}}),ids:n.map(function(e){return e.id}),align:t})}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:function(e){var t=e.named.ids;return wt(t).map(function(e){return{id:e}})}},ids:{type:"array",shortcode:function(e){var t=e.named.ids;return wt(t)}},columns:{type:"number",shortcode:function(e){var t=e.named.columns;return parseInt(void 0===t?"3":t,10)}},linkTo:{type:"string",shortcode:function(e){var t=e.named.link,n=void 0===t?"attachment":t;return"file"===n?"media":n}}}},{type:"files",isMatch:function(e){return 1!==e.length&&Object(G.every)(e,function(e){return 0===e.type.indexOf("image/")})},transform:function(e,t){var n=Object(D.createBlock)("core/gallery",{images:e.map(function(e){return ft({url:Object(de.createBlobURL)(e)})})});return Object($.mediaUpload)({filesList:e,onFileChange:function(e){var r=e.map(ft);t(n.clientId,{ids:Object(G.map)(r,"id"),images:r})},allowedTypes:["image"]}),n}}],to:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.images,n=e.align;return t.length>0?t.map(function(e){var t=e.id,r=e.url,o=e.alt,a=e.caption;return Object(D.createBlock)("core/image",{id:t,url:r,alt:o,caption:a,align:n})}):Object(D.createBlock)("core/image",{align:n})}}]},edit:vt,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ot(t):r,a=t.imageCrop,c=t.linkTo;return Object(U.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map(function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(U.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(U.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(U.createElement)("figure",null,t?Object(U.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:e.caption})))}))},deprecated:[{attributes:yt,isEligible:function(e){var t=e.images,n=e.ids;return t&&t.length>0&&(!n&&t||n&&t&&n.length!==t.length||Object(G.some)(t,function(e,t){return!e&&null!==n[t]||parseInt(e,10)!==n[t]}))},migrate:function(e){return Object(V.a)({},e,{ids:Object(G.map)(e.images,function(e){var t=e.id;return t?parseInt(t,10):null})})},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ot(t):r,a=t.imageCrop,c=t.linkTo;return Object(U.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map(function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(U.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(U.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(U.createElement)("figure",null,t?Object(U.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:e.caption})))}))}},{attributes:yt,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ot(t):r,a=t.imageCrop,c=t.linkTo;return Object(U.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map(function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(U.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link});return Object(U.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(U.createElement)("figure",null,t?Object(U.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:e.caption})))}))}},{attributes:Object(V.a)({},yt,{images:Object(V.a)({},yt.images,{selector:"div.wp-block-gallery figure.blocks-gallery-image img"}),align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ot(t):r,a=t.align,c=t.imageCrop,i=t.linkTo;return Object(U.createElement)("div",{className:"align".concat(a," columns-").concat(o," ").concat(c?"is-cropped":"")},n.map(function(e){var t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(U.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object(U.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object(U.createElement)("a",{href:t},n):n)}))}}]};var Ct="core/archives",_t={title:Object(K.__)("Archives"),description:Object(K.__)("Display a monthly archive of your posts."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M7 11h2v2H7v-2zm14-5v14l-2 2H5l-2-2V6l2-2h1V2h2v2h8V2h2v2h1l2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}))),category:"widgets",supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right"].includes(t))return{"data-align":t}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=t.align,o=t.showPostCounts,a=t.displayAsDropdown;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Archives Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:a,onChange:function(){return n({displayAsDropdown:!a})}}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:o,onChange:function(){return n({showPostCounts:!o})}}))),Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:r,onChange:function(e){n({align:e})},controls:["left","center","right"]})),Object(U.createElement)(Q.Disabled,null,Object(U.createElement)($.ServerSideRender,{block:"core/archives",attributes:t})))},save:function(){return null}},xt=["audio"],St=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.toggleAttribute=e.toggleAttribute.bind(Object(ne.a)(Object(ne.a)(e))),e.onSelectURL=e.onSelectURL.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=t.setAttributes,a=n.id,c=n.src,i=void 0===c?"":c;if(!a&&Object(de.isBlobURL)(i)){var l=Object(de.getBlobByURL)(i);l&&Object($.mediaUpload)({filesList:[l],onFileChange:function(e){var t=Object(he.a)(e,1)[0],n=t.id,r=t.url;o({id:n,src:r})},onError:function(t){o({src:void 0,id:void 0}),e.setState({editing:!0}),r.createErrorNotice(t)},allowedTypes:xt})}}},{key:"toggleAttribute",value:function(e){var t=this;return function(n){t.props.setAttributes(Object(F.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;if(e!==n.src){var o=He({attributes:{url:e}});if(void 0!==o)return void this.props.onReplace(o);r({src:e,id:void 0})}this.setState({editing:!1})}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src,i=this.props,l=i.setAttributes,s=i.isSelected,u=i.className,b=i.noticeOperations,m=i.noticeUI,d=this.state.editing,h=function(){e.setState({editing:!0})};return d?Object(U.createElement)($.MediaPlaceholder,{icon:"media-audio",className:u,onSelect:function(t){if(!t||!t.url)return l({src:void 0,id:void 0}),void h();l({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"audio/*",allowedTypes:xt,value:this.props.attributes,notices:m,onError:b.createErrorNotice}):Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)(Q.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(K.__)("Edit audio"),onClick:h,icon:"edit"}))),Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Audio Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:o}),Object(U.createElement)(Q.SelectControl,{label:Object(K.__)("Preload"),value:void 0!==a?a:"none",onChange:function(e){return l({preload:"none"!==e?e:void 0})},options:[{value:"auto",label:Object(K.__)("Auto")},{value:"metadata",label:Object(K.__)("Metadata")},{value:"none",label:Object(K.__)("None")}]}))),Object(U.createElement)("figure",{className:u},Object(U.createElement)(Q.Disabled,null,Object(U.createElement)("audio",{controls:"controls",src:c})),(!$.RichText.isEmpty(r)||s)&&Object(U.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:r,onChange:function(e){return l({caption:e})},inlineToolbar:!0})))}}]),t}(U.Component),Tt=Object(Q.withNotices)(St),Nt="core/audio",Rt={title:Object(K.__)("Audio"),description:Object(K.__)("Embed a simple audio player."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(U.createElement)(Q.Path,{d:"m12 3l0.01 10.55c-0.59-0.34-1.27-0.55-2-0.55-2.22 0-4.01 1.79-4.01 4s1.79 4 4.01 4 3.99-1.79 3.99-4v-10h4v-4h-6zm-1.99 16c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z"})),category:"common",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},transforms:{from:[{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform:function(e){var t=e[0];return Object(D.createBlock)("core/audio",{src:Object(de.createBlobURL)(t)})}}]},supports:{align:!0},edit:Tt,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src;return Object(U.createElement)("figure",null,Object(U.createElement)("audio",{controls:"controls",src:c,autoPlay:n,loop:o,preload:a}),!$.RichText.isEmpty(r)&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:r}))}},Bt=window.getComputedStyle,At=Object(Q.withFallbackStyles)(function(e,t){var n=t.textColor,r=t.backgroundColor,o=r&&r.color,a=n&&n.color,c=!a&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:Bt(e).backgroundColor,fallbackTextColor:a||!c?void 0:Bt(c).color}}),It=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).nodeRef=null,e.bindRef=e.bindRef.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"bindRef",value:function(e){e&&(this.nodeRef=e)}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.backgroundColor,o=t.textColor,a=t.setBackgroundColor,c=t.setTextColor,i=t.fallbackBackgroundColor,l=t.fallbackTextColor,s=t.setAttributes,u=t.isSelected,b=t.className,m=n.text,d=n.url,h=n.title;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)("div",{className:b,title:h,ref:this.bindRef},Object(U.createElement)($.RichText,{placeholder:Object(K.__)("Add text…"),value:m,onChange:function(e){return s({text:e})},formattingControls:["bold","italic","strikethrough"],className:q()("wp-block-button__link",(e={"has-background":r.color},Object(F.a)(e,r.class,r.class),Object(F.a)(e,"has-text-color",o.color),Object(F.a)(e,o.class,o.class),e)),style:{backgroundColor:r.color,color:o.color},keepPlaceholderOnFocus:!0}),Object(U.createElement)($.InspectorControls,null,Object(U.createElement)($.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:r.color,onChange:a,label:Object(K.__)("Background Color")},{value:o.color,onChange:c,label:Object(K.__)("Text Color")}]},Object(U.createElement)($.ContrastChecker,{isLargeText:!1,textColor:o.color,backgroundColor:r.color,fallbackBackgroundColor:i,fallbackTextColor:l})))),u&&Object(U.createElement)("form",{className:"block-library-button__inline-link",onSubmit:function(e){return e.preventDefault()}},Object(U.createElement)(Q.Dashicon,{icon:"admin-links"}),Object(U.createElement)($.URLInput,{value:d,onChange:function(e){return s({url:e})}}),Object(U.createElement)(Q.IconButton,{icon:"editor-break",label:Object(K.__)("Apply"),type:"submit"})))}}]),t}(U.Component),Pt=Object(re.compose)([Object($.withColors)("backgroundColor",{textColor:"color"}),At])(It),Lt={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},Mt="core/button",zt=function(e){return Object(G.omit)(Object(V.a)({},e,{customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0}),["color","textColor"])},Ht={title:Object(K.__)("Button"),description:Object(K.__)("Prompt visitors to take action with a custom button."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M19 6H5L3 8v8l2 2h14l2-2V8l-2-2zm0 10H5V8h14v8z"}))),category:"layout",attributes:Lt,supports:{align:!0,alignWide:!1},styles:[{name:"default",label:Object(K._x)("Rounded","block style"),isDefault:!0},{name:"outline",label:Object(K.__)("Outline")},{name:"squared",label:Object(K._x)("Squared","block style")}],edit:Pt,save:function(e){var t,n=e.attributes,r=n.url,o=n.text,a=n.title,c=n.backgroundColor,i=n.textColor,l=n.customBackgroundColor,s=n.customTextColor,u=Object($.getColorClassName)("color",i),b=Object($.getColorClassName)("background-color",c),m=q()("wp-block-button__link",(t={"has-text-color":i||s},Object(F.a)(t,u,u),Object(F.a)(t,"has-background",c||l),Object(F.a)(t,b,b),t)),d={backgroundColor:b?void 0:l,color:u?void 0:s};return Object(U.createElement)("div",null,Object(U.createElement)($.RichText.Content,{tagName:"a",className:m,href:r,title:a,style:d,value:o}))},deprecated:[{attributes:Object(V.a)({},Object(G.pick)(Lt,["url","title","text"]),{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c={backgroundColor:t.color,color:t.textColor};return Object(U.createElement)("div",{className:"align".concat(a)},Object(U.createElement)($.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:o,style:c,value:r}))},migrate:zt},{attributes:Object(V.a)({},Object(G.pick)(Lt,["url","title","text"]),{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c=t.color,i=t.textColor;return Object(U.createElement)("div",{className:"align".concat(a),style:{backgroundColor:c}},Object(U.createElement)($.RichText.Content,{tagName:"a",href:n,title:o,style:{color:i},value:r}))},migrate:zt}]},Dt=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).toggleDisplayAsDropdown=e.toggleDisplayAsDropdown.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleShowPostCounts=e.toggleShowPostCounts.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleShowHierarchy=e.toggleShowHierarchy.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"toggleDisplayAsDropdown",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({displayAsDropdown:!t.displayAsDropdown})}},{key:"toggleShowPostCounts",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showPostCounts:!t.showPostCounts})}},{key:"toggleShowHierarchy",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showHierarchy:!t.showHierarchy})}},{key:"getCategories",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.props.categories;return t&&t.length?null===e?t:t.filter(function(t){return t.parent===e}):[]}},{key:"getCategoryListClassName",value:function(e){var t=this.props.className;return"".concat(t,"__list ").concat(t,"__list-level-").concat(e)}},{key:"renderCategoryName",value:function(e){return e.name?Object(G.unescape)(e.name).trim():Object(K.__)("(Untitled)")}},{key:"renderCategoryList",value:function(){var e=this,t=this.props.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object(U.createElement)("ul",{className:this.getCategoryListClassName(0)},n.map(function(t){return e.renderCategoryListItem(t,0)}))}},{key:"renderCategoryListItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return Object(U.createElement)("li",{key:e.id},Object(U.createElement)("a",{href:e.link,target:"_blank"},this.renderCategoryName(e)),a&&Object(U.createElement)("span",{className:"".concat(this.props.className,"__post-count")}," ","(",e.count,")"),o&&!!c.length&&Object(U.createElement)("ul",{className:this.getCategoryListClassName(t+1)},c.map(function(e){return n.renderCategoryListItem(e,t+1)})))}},{key:"renderCategoryDropdown",value:function(){var e=this,t=this.props,n=t.showHierarchy,r=t.instanceId,o=t.className,a=n?0:null,c=this.getCategories(a),i="blocks-category-select-".concat(r);return Object(U.createElement)(U.Fragment,null,Object(U.createElement)("label",{htmlFor:i,className:"screen-reader-text"},Object(K.__)("Categories")),Object(U.createElement)("select",{id:i,className:"".concat(o,"__dropdown")},c.map(function(t){return e.renderCategoryDropdownItem(t,0)})))}},{key:"renderCategoryDropdownItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return[Object(U.createElement)("option",{key:e.id},Object(G.times)(3*t,function(){return" "}),this.renderCategoryName(e),a?" (".concat(e.count,")"):""),o&&!!c.length&&c.map(function(e){return n.renderCategoryDropdownItem(e,t+1)})]}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.isRequesting,o=t.align,a=t.displayAsDropdown,c=t.showHierarchy,i=t.showPostCounts,l=Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Categories Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:a,onChange:this.toggleDisplayAsDropdown}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Show Hierarchy"),checked:c,onChange:this.toggleShowHierarchy}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:i,onChange:this.toggleShowPostCounts})));return r?Object(U.createElement)(U.Fragment,null,l,Object(U.createElement)(Q.Placeholder,{icon:"admin-post",label:Object(K.__)("Categories")},Object(U.createElement)(Q.Spinner,null))):Object(U.createElement)(U.Fragment,null,l,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:o,onChange:function(e){n({align:e})},controls:["left","center","right","full"]})),Object(U.createElement)("div",{className:this.props.className},a?this.renderCategoryDropdown():this.renderCategoryList()))}}]),t}(U.Component),Ft=Object(re.compose)(Object(oe.withSelect)(function(e){var t=e("core").getEntityRecords,n=e("core/data").isResolving,r={per_page:-1};return{categories:t("taxonomy","category",r),isRequesting:n("core","getEntityRecords",["taxonomy","category",r])}}),re.withInstanceId)(Dt),Vt="core/categories",Ut={title:Object(K.__)("Categories"),description:Object(K.__)("Display a list of all categories."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(U.createElement)(Q.Path,{d:"M12,2l-5.5,9h11L12,2z M12,5.84L13.93,9h-3.87L12,5.84z"}),Object(U.createElement)(Q.Path,{d:"m17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5zm0 7c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"}),Object(U.createElement)(Q.Path,{d:"m3 21.5h8v-8h-8v8zm2-6h4v4h-4v-4z"})),category:"widgets",attributes:{align:{type:"string"},displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1}},supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right","full"].includes(t))return{"data-align":t}},edit:Ft,save:function(){return null}};var Wt="core/code",qt={title:Object(K.__)("Code"),description:Object(K.__)("Display code snippets that respect your spacing and tabs."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(U.createElement)(Q.Path,{d:"M9.4,16.6L4.8,12l4.6-4.6L8,6l-6,6l6,6L9.4,16.6z M14.6,16.6l4.6-4.6l-4.6-4.6L16,6l6,6l-6,6L14.6,16.6z"})),category:"formatting",attributes:{content:{type:"string",source:"text",selector:"code"}},supports:{html:!1},transforms:{from:[{type:"enter",regExp:/^```$/,transform:function(){return Object(D.createBlock)("core/code")}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName},schema:{pre:{children:{code:{children:{"#text":{}}}}}}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className;return Object(U.createElement)("div",{className:r},Object(U.createElement)($.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(K.__)("Write code…"),"aria-label":Object(K.__)("Code")}))},save:function(e){var t=e.attributes;return Object(U.createElement)("pre",null,Object(U.createElement)("code",null,t.content))}},Gt=n(41),Kt=["core/column"],$t=n.n(Gt)()(function(e){return Object(G.times)(e,function(){return["core/column"]})});function Qt(e){var t,n=Qt.doc;n||(n=document.implementation.createHTMLDocument(""),Qt.doc=n),n.body.innerHTML=e;var r=!0,o=!1,a=void 0;try{for(var c,i=n.body.firstChild.classList[Symbol.iterator]();!(r=(c=i.next()).done);r=!0){if(t=c.value.match(/^layout-column-(\d+)$/))return Number(t[1])-1}}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}}var Yt="core/columns",Zt={title:Object(K.__)("Columns"),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M21 4H3L2 5v14l1 1h18l1-1V5l-1-1zM8 18H4V6h4v12zm6 0h-4V6h4v12zm6 0h-4V6h4v12z"}))),category:"layout",attributes:{columns:{type:"number",default:2}},description:Object(K.__)("Add a block that displays content in multiple columns, then add whatever content blocks you’d like."),supports:{align:["wide","full"],html:!1},deprecated:[{attributes:{columns:{type:"number",default:2}},isEligible:function(e,t){return!!t.some(function(e){return/layout-column-\d+/.test(e.originalContent)})&&t.some(function(e){return void 0!==Qt(e.originalContent)})},migrate:function(e,t){return[e,t.reduce(function(e,t){var n=Qt(t.originalContent);return void 0===n&&(n=0),e[n]||(e[n]=[]),e[n].push(t),e},[]).map(function(e){return Object(D.createBlock)("core/column",{},e)})]},save:function(e){var t=e.attributes.columns;return Object(U.createElement)("div",{className:"has-".concat(t,"-columns")},Object(U.createElement)($.InnerBlocks.Content,null))}}],edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.columns,a=q()(r,"has-".concat(o,"-columns"));return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,null,Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Columns"),value:o,onChange:function(e){n({columns:e})},min:2,max:6}))),Object(U.createElement)("div",{className:a},Object(U.createElement)($.InnerBlocks,{template:$t(o),templateLock:"all",allowedBlocks:Kt})))},save:function(e){var t=e.attributes.columns;return Object(U.createElement)("div",{className:"has-".concat(t,"-columns")},Object(U.createElement)($.InnerBlocks.Content,null))}},Jt="core/column",Xt={title:Object(K.__)("Column"),parent:["core/columns"],icon:Object(U.createElement)(Q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.Path,{d:"M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z"})),description:Object(K.__)("A single column within a columns block."),category:"common",supports:{inserter:!1,reusable:!1,html:!1},edit:function(){return Object(U.createElement)($.InnerBlocks,{templateLock:!1})},save:function(){return Object(U.createElement)("div",null,Object(U.createElement)($.InnerBlocks.Content,null))}},en=["left","center","right","wide","full"],tn={title:{type:"string",source:"html",selector:"p"},url:{type:"string"},align:{type:"string"},contentAlign:{type:"string",default:"center"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"}},nn="core/cover",rn=["image","video"],on={title:Object(K.__)("Cover"),description:Object(K.__)("Add an image or video with a text overlay — great for headers."),icon:Object(U.createElement)(Q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(U.createElement)(Q.Path,{d:"M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"}),Object(U.createElement)(Q.Path,{d:"M0 0h24v24H0z",fill:"none"})),category:"common",attributes:tn,transforms:{from:[{type:"block",blocks:["core/heading"],transform:function(e){var t=e.content;return Object(D.createBlock)("core/cover",{title:t})}},{type:"block",blocks:["core/image"],transform:function(e){var t=e.caption,n=e.url,r=e.align,o=e.id;return Object(D.createBlock)("core/cover",{title:t,url:n,align:r,id:o})}},{type:"block",blocks:["core/video"],transform:function(e){var t=e.caption,n=e.src,r=e.align,o=e.id;return Object(D.createBlock)("core/cover",{title:t,url:n,align:r,id:o,backgroundType:"video"})}}],to:[{type:"block",blocks:["core/heading"],transform:function(e){var t=e.title;return Object(D.createBlock)("core/heading",{content:t})}},{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.backgroundType;return!e.url||"image"===t},transform:function(e){var t=e.title,n=e.url,r=e.align,o=e.id;return Object(D.createBlock)("core/image",{caption:t,url:n,align:r,id:o})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.backgroundType;return!e.url||"video"===t},transform:function(e){var t=e.title,n=e.url,r=e.align,o=e.id;return Object(D.createBlock)("core/video",{caption:t,src:n,id:o,align:r})}}]},getEditWrapperProps:function(e){var t=e.align;if(-1!==en.indexOf(t))return{"data-align":t}},edit:Object(re.compose)([Object($.withColors)({overlayColor:"background-color"}),Q.withNotices])(function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected,o=e.className,a=e.noticeOperations,c=e.noticeUI,i=e.overlayColor,l=e.setOverlayColor,s=t.align,u=t.backgroundType,b=t.contentAlign,m=t.dimRatio,d=t.hasParallax,h=t.id,p=t.title,g=t.url,O=function(e){if(e&&e.url){var t;if(e.media_type)t="image"===e.media_type?"image":"video";else{if("image"!==e.type&&"video"!==e.type)return;t=e.type}n({url:e.url,id:e.id,backgroundType:t})}else n({url:void 0,id:void 0})},f=function(e){return n({title:e})},j=Object(V.a)({},"image"===u?cn(g):{},{backgroundColor:i.color}),v=Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:s,onChange:function(e){return n({align:e})}}),!!g&&Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.AlignmentToolbar,{value:b,onChange:function(e){n({contentAlign:e})}}),Object(U.createElement)($.MediaUploadCheck,null,Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)($.MediaUpload,{onSelect:O,allowedTypes:rn,value:h,render:function(e){var t=e.open;return Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit media"),icon:"edit",onClick:t})}}))))),!!g&&Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Cover Settings")},"image"===u&&Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Fixed Background"),checked:d,onChange:function(){return n({hasParallax:!d})}}),Object(U.createElement)($.PanelColorSettings,{title:Object(K.__)("Overlay"),initialOpen:!0,colorSettings:[{value:i.color,onChange:l,label:Object(K.__)("Overlay Color")}]},Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Background Opacity"),value:m,onChange:function(e){return n({dimRatio:e})},min:0,max:100,step:10})))));if(!g){var y=!$.RichText.isEmpty(p),k=y?void 0:"format-image",w=y?Object(U.createElement)($.RichText,{tagName:"h2",value:p,onChange:f,inlineToolbar:!0}):Object(K.__)("Cover");return Object(U.createElement)(U.Fragment,null,v,Object(U.createElement)($.MediaPlaceholder,{icon:k,className:o,labels:{title:w,instructions:Object(K.__)("Drag an image or a video, upload a new one or select a file from your library.")},onSelect:O,accept:"image/*,video/*",allowedTypes:rn,notices:c,onError:a.createErrorNotice}))}var E=q()(o,"center"!==b&&"has-".concat(b,"-content"),an(m),{"has-background-dim":0!==m,"has-parallax":d});return Object(U.createElement)(U.Fragment,null,v,Object(U.createElement)("div",{"data-url":g,style:j,className:E},"video"===u&&Object(U.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:g}),(!$.RichText.isEmpty(p)||r)&&Object(U.createElement)($.RichText,{tagName:"p",className:"wp-block-cover-text",placeholder:Object(K.__)("Write title…"),value:p,onChange:f,inlineToolbar:!0})))}),save:function(e){var t=e.attributes,n=t.align,r=t.backgroundType,o=t.contentAlign,a=t.customOverlayColor,c=t.dimRatio,i=t.hasParallax,l=t.overlayColor,s=t.title,u=t.url,b=Object($.getColorClassName)("background-color",l),m="image"===r?cn(u):{};b||(m.backgroundColor=a);var d=q()(an(c),b,Object(F.a)({"has-background-dim":0!==c,"has-parallax":i},"has-".concat(o,"-content"),"center"!==o),n?"align".concat(n):null);return Object(U.createElement)("div",{className:d,style:m},"video"===r&&u&&Object(U.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!$.RichText.isEmpty(s)&&Object(U.createElement)($.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:s}))},deprecated:[{attributes:Object(V.a)({},tn),supports:{className:!1},save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=t.contentAlign,l=t.overlayColor,s=t.customOverlayColor,u=Object($.getColorClassName)("background-color",l),b=cn(n);u||(b.backgroundColor=s);var m=q()("wp-block-cover-image",an(a),u,Object(F.a)({"has-background-dim":0!==a,"has-parallax":o},"has-".concat(i,"-content"),"center"!==i),c?"align".concat(c):null);return Object(U.createElement)("div",{className:m,style:b},!$.RichText.isEmpty(r)&&Object(U.createElement)($.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r}))}},{attributes:Object(V.a)({},tn,{title:{type:"string",source:"html",selector:"h2"}}),save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=cn(n),l=q()(an(a),{"has-background-dim":0!==a,"has-parallax":o},c?"align".concat(c):null);return Object(U.createElement)("section",{className:l,style:i},Object(U.createElement)($.RichText.Content,{tagName:"h2",value:r}))}}]};function an(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}function cn(e){return e?{backgroundImage:"url(".concat(e,")")}:{}}var ln=function(e){var t=e.blockSupportsResponsive,n=e.showEditButton,r=e.themeSupportsResponsive,o=e.allowResponsive,a=e.getResponsiveHelp,c=e.toggleResponsive,i=e.switchBackToURLInput;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)(Q.Toolbar,null,n&&Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit URL"),icon:"edit",onClick:i}))),r&&t&&Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Media Settings"),className:"blocks-responsive"},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Resize for smaller devices"),checked:o,help:a,onChange:c}))))},sn=function(){return Object(U.createElement)("div",{className:"wp-block-embed is-loading"},Object(U.createElement)(Q.Spinner,null),Object(U.createElement)("p",null,Object(K.__)("Embedding…")))},un=function(e){var t=e.icon,n=e.label,r=e.value,o=e.onSubmit,a=e.onChange,c=e.cannotEmbed,i=e.fallback,l=e.tryAgain;return Object(U.createElement)(Q.Placeholder,{icon:Object(U.createElement)($.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-embed"},Object(U.createElement)("form",{onSubmit:o},Object(U.createElement)("input",{type:"url",value:r||"",className:"components-placeholder__input","aria-label":n,placeholder:Object(K.__)("Enter URL to embed here…"),onChange:a}),Object(U.createElement)(Q.Button,{isLarge:!0,type:"submit"},Object(K._x)("Embed","button label")),c&&Object(U.createElement)("p",{className:"components-placeholder__error"},Object(K.__)("Sorry, we could not embed that content."),Object(U.createElement)("br",null),Object(U.createElement)(Q.Button,{isLarge:!0,onClick:l},Object(K._x)("Try again","button label"))," ",Object(U.createElement)(Q.Button,{isLarge:!0,onClick:i},Object(K._x)("Convert to link","button label")))))},bn=n(75),mn=window.FocusEvent,dn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).checkFocus=e.checkFocus.bind(Object(ne.a)(Object(ne.a)(e))),e.node=Object(U.createRef)(),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"checkFocus",value:function(){var e=document.activeElement;if("IFRAME"===e.tagName&&e.parentNode===this.node.current){var t=new mn("focus",{bubbles:!0});e.dispatchEvent(t)}}},{key:"render",value:function(){var e=this.props.html;return Object(U.createElement)("div",{ref:this.node,className:"wp-block-embed__wrapper",dangerouslySetInnerHTML:{__html:e}})}}]),t}(U.Component),hn=Object(re.withGlobalEvents)({blur:"checkFocus"})(dn),pn=function(e){var t,n,r=e.preview,o=e.url,a=e.type,c=e.caption,i=e.onCaptionChange,l=e.isSelected,s=e.className,u=e.icon,b=e.label,m=r.scripts,d="photo"===a?(t=r,n=Object(U.createElement)("p",null,Object(U.createElement)("img",{src:t.thumbnail_url,alt:t.title,width:"100%"})),Object(U.renderToString)(n)):r.html,h=Object(bn.parse)(o),p=Object(G.includes)(Ae,h.host.replace(/^www\./,"")),g=Object(K.sprintf)(Object(K.__)("Embedded content from %s"),h.host),O=Le()(a,s,"wp-block-embed__wrapper"),f="wp-embed"===a?Object(U.createElement)(hn,{html:d}):Object(U.createElement)("div",{className:"wp-block-embed__wrapper"},Object(U.createElement)(Q.SandBox,{html:d,scripts:m,title:g,type:O}));return Object(U.createElement)("figure",{className:Le()(s,"wp-block-embed",{"is-type-video":"video"===a})},p?Object(U.createElement)(Q.Placeholder,{icon:Object(U.createElement)($.BlockIcon,{icon:u,showColors:!0}),label:b},Object(U.createElement)("p",{className:"components-placeholder__error"},Object(U.createElement)("a",{href:o},o)),Object(U.createElement)("p",{className:"components-placeholder__error"},Object(K.__)("Sorry, we cannot preview this embedded content in the editor."))):f,(!$.RichText.isEmpty(c)||l)&&Object(U.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:c,onChange:i,inlineToolbar:!0}))};function gn(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(r){function o(){var e;return Object(Z.a)(this,o),(e=Object(X.a)(this,Object(ee.a)(o).apply(this,arguments))).switchBackToURLInput=e.switchBackToURLInput.bind(Object(ne.a)(Object(ne.a)(e))),e.setUrl=e.setUrl.bind(Object(ne.a)(Object(ne.a)(e))),e.getAttributesFromPreview=e.getAttributesFromPreview.bind(Object(ne.a)(Object(ne.a)(e))),e.setAttributesFromPreview=e.setAttributesFromPreview.bind(Object(ne.a)(Object(ne.a)(e))),e.getResponsiveHelp=e.getResponsiveHelp.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleResponsive=e.toggleResponsive.bind(Object(ne.a)(Object(ne.a)(e))),e.handleIncomingPreview=e.handleIncomingPreview.bind(Object(ne.a)(Object(ne.a)(e))),e.state={editingURL:!1,url:e.props.attributes.url},e.props.preview&&e.handleIncomingPreview(),e}return Object(te.a)(o,r),Object(J.a)(o,[{key:"handleIncomingPreview",value:function(){var e=this.props.attributes.allowResponsive;this.setAttributesFromPreview();var t=He(this.props,this.getAttributesFromPreview(this.props.preview,e));t&&this.props.onReplace(t)}},{key:"componentDidUpdate",value:function(e){var t=void 0!==this.props.preview,n=void 0!==e.preview,r=e.preview&&this.props.preview&&this.props.preview.html!==e.preview.html||t&&!n,o=this.props.attributes.url!==e.attributes.url;if(r||o){if(this.props.cannotEmbed)return;this.handleIncomingPreview()}}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;this.setState({editingURL:!1}),n({url:t})}},{key:"getAttributesFromPreview",value:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o={},a=t.type,c=void 0===a?"rich":a,i=t.html,l=t.provider_name,s=Object(G.kebabCase)(Object(G.toLower)(""!==l?l:e));return ze(i)&&(c="wp-embed"),(i||"photo"===c)&&(o.type=c,o.providerNameSlug=s),o.className=De(i,this.props.attributes.className,n&&r),o}},{key:"setAttributesFromPreview",value:function(){var e=this.props,t=e.setAttributes,n=e.preview,r=this.props.attributes.allowResponsive;t(this.getAttributesFromPreview(n,r))}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"getResponsiveHelp",value:function(e){return e?Object(K.__)("This embed will preserve its aspect ratio when the browser is resized."):Object(K.__)("This embed may not preserve its aspect ratio when the browser is resized.")}},{key:"toggleResponsive",value:function(){var e=this.props.attributes,t=e.allowResponsive,r=e.className,o=this.props.preview.html,a=!t;this.props.setAttributes({allowResponsive:a,className:De(o,r,n&&a)})}},{key:"render",value:function(){var r=this,o=this.state,a=o.url,c=o.editingURL,i=this.props.attributes,l=i.caption,s=i.type,u=i.allowResponsive,b=this.props,m=b.fetching,d=b.setAttributes,h=b.isSelected,p=b.className,g=b.preview,O=b.cannotEmbed,f=b.themeSupportsResponsive,j=b.tryAgain;if(m)return Object(U.createElement)(sn,null);var v=Object(K.sprintf)(Object(K.__)("%s URL"),e);return!g||O||c?Object(U.createElement)(un,{icon:t,label:v,onSubmit:this.setUrl,value:a,cannotEmbed:O,onChange:function(e){return r.setState({url:e.target.value})},fallback:function(){return function(e,t){var n=Object(U.createElement)("a",{href:e},e);t(Object(D.createBlock)("core/paragraph",{content:Object(U.renderToString)(n)}))}(a,r.props.onReplace)},tryAgain:j}):Object(U.createElement)(U.Fragment,null,Object(U.createElement)(ln,{showEditButton:g&&!O,themeSupportsResponsive:f,blockSupportsResponsive:n,allowResponsive:u,getResponsiveHelp:this.getResponsiveHelp,toggleResponsive:this.toggleResponsive,switchBackToURLInput:this.switchBackToURLInput}),Object(U.createElement)(pn,{preview:g,className:p,url:a,type:s,caption:l,onCaptionChange:function(e){return d({caption:e})},isSelected:h,icon:t,label:v}))}}]),o}(U.Component)}var On={url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0}};function fn(e){var t=e.title,n=e.description,r=e.icon,o=e.category,a=void 0===o?"embed":o,c=e.transforms,i=e.keywords,l=void 0===i?[]:i,s=e.supports,u=void 0===s?{}:s,b=e.responsive,m=void 0===b||b,d=n||Object(K.sprintf)(Object(K.__)("Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube."),t),h=gn(t,r,m);return{title:t,description:d,icon:r,category:a,keywords:l,attributes:On,supports:Object(V.a)({align:!0},u),transforms:c,edit:Object(re.compose)(Object(oe.withSelect)(function(e,t){var n=t.attributes.url,r=e("core"),o=r.getEmbedPreview,a=r.isPreviewEmbedFallback,c=r.isRequestingEmbedPreview,i=r.getThemeSupports,l=void 0!==n&&o(n),s=void 0!==n&&a(n),u=void 0!==n&&c(n),b=i(),m=!!l&&void 0===l.type&&!1===l.html,d=!!l&&l.data&&404===l.data.status,h=!!l&&!m&&!d,p=void 0!==n&&(!h||s);return{preview:h?l:void 0,fetching:u,themeSupportsResponsive:b["responsive-embeds"],cannotEmbed:p}}),Object(oe.withDispatch)(function(e,t){var n=t.attributes.url,r=e("core/data");return{tryAgain:function(){r.invalidateResolution("core","getEmbedPreview",[n])}}}))(h),save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,c=n.providerNameSlug;if(!r)return null;var i=Le()("wp-block-embed",(t={},Object(F.a)(t,"is-type-".concat(a),a),Object(F.a)(t,"is-provider-".concat(c),c),t));return Object(U.createElement)("figure",{className:i},Object(U.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(r,"\n")),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:o}))},deprecated:[{attributes:On,save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,c=n.providerNameSlug;if(!r)return null;var i=Le()("wp-block-embed",(t={},Object(F.a)(t,"is-type-".concat(a),a),Object(F.a)(t,"is-provider-".concat(c),c),t));return Object(U.createElement)("figure",{className:i},"\n".concat(r,"\n"),!$.RichText.isEmpty(o)&&Object(U.createElement)($.RichText.Content,{tagName:"figcaption",value:o}))}}]}}var jn="core/embed",vn=fn({title:Object(K._x)("Embed","block title"),description:Object(K.__)("Embed videos, images, tweets, audio, and other content from external sources."),icon:Oe,responsive:!1,transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)},transform:function(e){return Object(D.createBlock)("core/embed",{url:e.textContent.trim()})}}]}}),yn=Re.map(function(e){return Object(V.a)({},e,{settings:fn(e.settings)})}),kn=Be.map(function(e){return Object(V.a)({},e,{settings:fn(e.settings)})});function wn(e){return e?Object(K.__)("The download button is visible."):Object(K.__)("The download button is hidden.")}function En(e){var t=e.hrefs,n=e.openInNewWindow,r=e.showDownloadButton,o=e.changeLinkDestinationOption,a=e.changeOpenInNewWindow,c=e.changeShowDownloadButton,i=t.href,l=t.textLinkHref,s=t.attachmentPage,u=[{value:i,label:Object(K.__)("URL")}];return s&&(u=[{value:i,label:Object(K.__)("Media File")},{value:s,label:Object(K.__)("Attachment Page")}]),Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Text Link Settings")},Object(U.createElement)(Q.SelectControl,{label:Object(K.__)("Link To"),value:l,options:u,onChange:o}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Open in New Tab"),checked:n,onChange:a})),Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Download Button Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Show Download Button"),help:wn,checked:r,onChange:c}))))}var Cn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onSelectFile=e.onSelectFile.bind(Object(ne.a)(Object(ne.a)(e))),e.confirmCopyURL=e.confirmCopyURL.bind(Object(ne.a)(Object(ne.a)(e))),e.resetCopyConfirmation=e.resetCopyConfirmation.bind(Object(ne.a)(Object(ne.a)(e))),e.changeLinkDestinationOption=e.changeLinkDestinationOption.bind(Object(ne.a)(Object(ne.a)(e))),e.changeOpenInNewWindow=e.changeOpenInNewWindow.bind(Object(ne.a)(Object(ne.a)(e))),e.changeShowDownloadButton=e.changeShowDownloadButton.bind(Object(ne.a)(Object(ne.a)(e))),e.state={hasError:!1,showCopyConfirmation:!1},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=n.href;if(Object(de.isBlobURL)(o)){var a=Object(de.getBlobByURL)(o);Object($.mediaUpload)({filesList:[a],onFileChange:function(t){var n=Object(he.a)(t,1)[0];return e.onSelectFile(n)},onError:function(t){e.setState({hasError:!0}),r.createErrorNotice(t)}}),Object(de.revokeBlobURL)(o)}}},{key:"componentDidUpdate",value:function(e){e.isSelected&&!this.props.isSelected&&this.setState({showCopyConfirmation:!1})}},{key:"onSelectFile",value:function(e){e&&e.url&&(this.setState({hasError:!1}),this.props.setAttributes({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id}))}},{key:"confirmCopyURL",value:function(){this.setState({showCopyConfirmation:!0})}},{key:"resetCopyConfirmation",value:function(){this.setState({showCopyConfirmation:!1})}},{key:"changeLinkDestinationOption",value:function(e){this.props.setAttributes({textLinkHref:e})}},{key:"changeOpenInNewWindow",value:function(e){this.props.setAttributes({textLinkTarget:!!e&&"_blank"})}},{key:"changeShowDownloadButton",value:function(e){this.props.setAttributes({showDownloadButton:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.isSelected,r=e.attributes,o=e.setAttributes,a=e.noticeUI,c=e.noticeOperations,i=e.media,l=r.fileName,s=r.href,u=r.textLinkHref,b=r.textLinkTarget,m=r.showDownloadButton,d=r.downloadButtonText,h=r.id,p=this.state,g=p.hasError,O=p.showCopyConfirmation,f=i&&i.link;if(!s||g)return Object(U.createElement)($.MediaPlaceholder,{icon:"media-default",labels:{title:Object(K.__)("File"),instructions:Object(K.__)("Drag a file, upload a new one or select a file from your library.")},onSelect:this.onSelectFile,notices:a,onError:c.createErrorNotice,accept:"*"});var j=q()(t,{"is-transient":Object(de.isBlobURL)(s)});return Object(U.createElement)(U.Fragment,null,Object(U.createElement)(En,Object(Y.a)({hrefs:{href:s,textLinkHref:u,attachmentPage:f}},{openInNewWindow:!!b,showDownloadButton:m,changeLinkDestinationOption:this.changeLinkDestinationOption,changeOpenInNewWindow:this.changeOpenInNewWindow,changeShowDownloadButton:this.changeShowDownloadButton})),Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.MediaUploadCheck,null,Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)($.MediaUpload,{onSelect:this.onSelectFile,value:h,render:function(e){var t=e.open;return Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit file"),onClick:t,icon:"edit"})}})))),Object(U.createElement)("div",{className:j},Object(U.createElement)("div",{className:"".concat(t,"__content-wrapper")},Object(U.createElement)($.RichText,{wrapperClassName:"".concat(t,"__textlink"),tagName:"div",value:l,placeholder:Object(K.__)("Write file name…"),keepPlaceholderOnFocus:!0,formattingControls:[],onChange:function(e){return o({fileName:e})}}),m&&Object(U.createElement)("div",{className:"".concat(t,"__button-richtext-wrapper")},Object(U.createElement)($.RichText,{tagName:"div",className:"".concat(t,"__button"),value:d,formattingControls:[],placeholder:Object(K.__)("Add text…"),keepPlaceholderOnFocus:!0,onChange:function(e){return o({downloadButtonText:e})}}))),n&&Object(U.createElement)(Q.ClipboardButton,{isDefault:!0,text:s,className:"".concat(t,"__copy-url-button"),onCopy:this.confirmCopyURL,onFinishCopy:this.resetCopyConfirmation,disabled:Object(de.isBlobURL)(s)},O?Object(K.__)("Copied!"):Object(K.__)("Copy URL"))))}}]),t}(U.Component),_n=Object(re.compose)([Object(oe.withSelect)(function(e,t){var n=e("core").getMedia,r=t.attributes.id;return{media:void 0===r?void 0:n(r)}}),Q.withNotices])(Cn),xn="core/file",Sn={title:Object(K.__)("File"),description:Object(K.__)("Add a link to a downloadable file."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.Path,{d:"M9 6l2 2h9v10H4V6h5m1-2H4L2 6v12l2 2h16l2-2V8l-2-2h-8l-2-2z"})),category:"common",keywords:[Object(K.__)("document"),Object(K.__)("pdf")],attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]",default:Object(K._x)("Download","button label")}},supports:{align:!0},transforms:{from:[{type:"files",isMatch:function(e){return e.length>0},priority:15,transform:function(e){var t=[];return e.map(function(e){var n=Object(de.createBlobURL)(e);t.push(Object(D.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))}),t}},{type:"block",blocks:["core/audio"],transform:function(e){return Object(D.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id})}},{type:"block",blocks:["core/video"],transform:function(e){return Object(D.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id})}},{type:"block",blocks:["core/image"],transform:function(e){return Object(D.createBlock)("core/file",{href:e.url,fileName:e.caption,textLinkHref:e.url,id:e.id})}}],to:[{type:"block",blocks:["core/audio"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(oe.select)("core").getMedia)(t);return!!n&&Object(G.includes)(n.mime_type,"audio")},transform:function(e){return Object(D.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(oe.select)("core").getMedia)(t);return!!n&&Object(G.includes)(n.mime_type,"video")},transform:function(e){return Object(D.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id})}},{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(oe.select)("core").getMedia)(t);return!!n&&Object(G.includes)(n.mime_type,"image")},transform:function(e){return Object(D.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id})}}]},edit:_n,save:function(e){var t=e.attributes,n=t.href,r=t.fileName,o=t.textLinkHref,a=t.textLinkTarget,c=t.showDownloadButton,i=t.downloadButtonText;return n&&Object(U.createElement)("div",null,!$.RichText.isEmpty(r)&&Object(U.createElement)("a",{href:o,target:a,rel:!!a&&"noreferrer noopener"},Object(U.createElement)($.RichText.Content,{value:r})),c&&Object(U.createElement)("a",{href:n,className:"wp-block-file__button",download:!0},Object(U.createElement)($.RichText.Content,{value:i})))}},Tn="core/html",Nn={title:Object(K.__)("Custom HTML"),description:Object(K.__)("Add custom HTML code and preview it as you edit."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M4.5,11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5V11z M7,10.5h1.5V15H10v-4.5h1.5V9H7V10.5z M14.5,10l-1-1H12v6h1.5v-3.9 l1,1l1-1V15H17V9h-1.5L14.5,10z M19.5,13.5V9H18v6h5v-1.5H19.5z"})),category:"formatting",keywords:[Object(K.__)("embed")],supports:{customClassName:!1,className:!1,html:!1},attributes:{content:{type:"string",source:"html"}},transforms:{from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("iframe")},schema:{figure:{require:["iframe"],children:{iframe:{attributes:["src","allowfullscreen","height","width"]},figcaption:{children:Object(D.getPhrasingContentSchema)()}}}}}]},edit:Object(re.withState)({isPreview:!1})(function(e){var t=e.attributes,n=e.setAttributes,r=e.setState,o=e.isPreview;return Object(U.createElement)("div",{className:"wp-block-html"},Object(U.createElement)($.BlockControls,null,Object(U.createElement)("div",{className:"components-toolbar"},Object(U.createElement)("button",{className:"components-tab-button ".concat(o?"":"is-active"),onClick:function(){return r({isPreview:!1})}},Object(U.createElement)("span",null,"HTML")),Object(U.createElement)("button",{className:"components-tab-button ".concat(o?"is-active":""),onClick:function(){return r({isPreview:!0})}},Object(U.createElement)("span",null,Object(K.__)("Preview"))))),Object(U.createElement)(Q.Disabled.Consumer,null,function(e){return o||e?Object(U.createElement)(Q.SandBox,{html:t.content}):Object(U.createElement)($.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(K.__)("Write HTML…"),"aria-label":Object(K.__)("HTML")})}))}),save:function(e){var t=e.attributes;return Object(U.createElement)(U.RawHTML,null,t.content)}},Rn=["image","video"],Bn=function(e){function t(){return Object(Z.a)(this,t),Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))}return Object(te.a)(t,e),Object(J.a)(t,[{key:"renderToolbarEditButton",value:function(){var e=this.props,t=e.mediaId,n=e.onSelectMedia;return Object(U.createElement)($.BlockControls,null,Object(U.createElement)(Q.Toolbar,null,Object(U.createElement)($.MediaUpload,{onSelect:n,allowedTypes:Rn,value:t,render:function(e){var t=e.open;return Object(U.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit media"),icon:"edit",onClick:t})}})))}},{key:"renderImage",value:function(){var e=this.props,t=e.mediaAlt,n=e.mediaUrl,r=e.className;return Object(U.createElement)(U.Fragment,null,this.renderToolbarEditButton(),Object(U.createElement)("figure",{className:r},Object(U.createElement)("img",{src:n,alt:t})))}},{key:"renderVideo",value:function(){var e=this.props,t=e.mediaUrl,n=e.className;return Object(U.createElement)(U.Fragment,null,this.renderToolbarEditButton(),Object(U.createElement)("figure",{className:n},Object(U.createElement)("video",{controls:!0,src:t})))}},{key:"renderPlaceholder",value:function(){var e=this.props,t=e.onSelectMedia,n=e.className;return Object(U.createElement)($.MediaPlaceholder,{icon:"format-image",labels:{title:Object(K.__)("Media area")},className:n,onSelect:t,accept:"image/*,video/*",allowedTypes:Rn})}},{key:"render",value:function(){var e=this.props,t=e.mediaPosition,n=e.mediaUrl,r=e.mediaType,o=e.mediaWidth,a=e.commitWidthChange,c=e.onWidthChange;if(r&&n){var i={right:"left"===t,left:"right"===t},l=null;switch(r){case"image":l=this.renderImage();break;case"video":l=this.renderVideo()}return Object(U.createElement)(Q.ResizableBox,{className:"editor-media-container__resizer",size:{width:o+"%"},minWidth:"10%",maxWidth:"100%",enable:i,onResize:function(e,t,n){c(parseInt(n.style.width))},onResizeStop:function(e,t,n){a(parseInt(n.style.width))},axis:"x"},l)}return this.renderPlaceholder()}}]),t}(U.Component),An=["core/button","core/paragraph","core/heading","core/list"],In=[["core/paragraph",{fontSize:"large",placeholder:Object(K._x)("Content…","content placeholder")}]],Pn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onSelectMedia=e.onSelectMedia.bind(Object(ne.a)(Object(ne.a)(e))),e.onWidthChange=e.onWidthChange.bind(Object(ne.a)(Object(ne.a)(e))),e.commitWidthChange=e.commitWidthChange.bind(Object(ne.a)(Object(ne.a)(e))),e.state={mediaWidth:null},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"onSelectMedia",value:function(e){var t,n,r=this.props.setAttributes;"image"===(t=e.media_type?"image"===e.media_type?"image":"video":e.type)&&(n=Object(G.get)(e,["sizes","large","url"])||Object(G.get)(e,["media_details","sizes","large","source_url"])),r({mediaAlt:e.alt,mediaId:e.id,mediaType:t,mediaUrl:n||e.url})}},{key:"onWidthChange",value:function(e){this.setState({mediaWidth:e})}},{key:"commitWidthChange",value:function(e){(0,this.props.setAttributes)({mediaWidth:e}),this.setState({mediaWidth:null})}},{key:"renderMediaArea",value:function(){var e=this.props.attributes,t=e.mediaAlt,n=e.mediaId,r=e.mediaPosition,o=e.mediaType,a=e.mediaUrl,c=e.mediaWidth;return Object(U.createElement)(Bn,Object(Y.a)({className:"block-library-media-text__media-container",onSelectMedia:this.onSelectMedia,onWidthChange:this.onWidthChange,commitWidthChange:this.commitWidthChange},{mediaAlt:t,mediaId:n,mediaType:o,mediaUrl:a,mediaPosition:r,mediaWidth:c}))}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.className,o=t.backgroundColor,a=t.isSelected,c=t.setAttributes,i=t.setBackgroundColor,l=n.isStackedOnMobile,s=n.mediaAlt,u=n.mediaPosition,b=n.mediaType,m=n.mediaWidth,d=this.state.mediaWidth,h=q()(r,(e={"has-media-on-the-right":"right"===u,"is-selected":a},Object(F.a)(e,o.class,o.class),Object(F.a)(e,"is-stacked-on-mobile",l),e)),p="".concat(d||m,"%"),g={gridTemplateColumns:"right"===u?"auto ".concat(p):"".concat(p," auto"),backgroundColor:o.color},O=[{value:o.color,onChange:i,label:Object(K.__)("Background Color")}],f=[{icon:"align-pull-left",title:Object(K.__)("Show media on left"),isActive:"left"===u,onClick:function(){return c({mediaPosition:"left"})}},{icon:"align-pull-right",title:Object(K.__)("Show media on right"),isActive:"right"===u,onClick:function(){return c({mediaPosition:"right"})}}],j=Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Media & Text Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Stack on mobile"),checked:l,onChange:function(){return c({isStackedOnMobile:!l})}}),"image"===b&&Object(U.createElement)(Q.TextareaControl,{label:Object(K.__)("Alt Text (Alternative Text)"),value:s,onChange:function(e){c({mediaAlt:e})},help:Object(K.__)("Alternative text describes your image to people who can’t see it. Add a short description with its key details.")}));return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.InspectorControls,null,j,Object(U.createElement)($.PanelColorSettings,{title:Object(K.__)("Color Settings"),initialOpen:!1,colorSettings:O})),Object(U.createElement)($.BlockControls,null,Object(U.createElement)(Q.Toolbar,{controls:f})),Object(U.createElement)("div",{className:h,style:g},this.renderMediaArea(),Object(U.createElement)($.InnerBlocks,{allowedBlocks:An,template:In,templateInsertUpdatesSelection:!1})))}}]),t}(U.Component),Ln=Object($.withColors)("backgroundColor")(Pn),Mn="core/media-text",zn={align:{type:"string",default:"wide"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},Hn={title:Object(K.__)("Media & Text"),description:Object(K.__)("Set media and words side-by-side for a richer layout."),icon:Object(U.createElement)(Q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(U.createElement)(Q.Path,{d:"M13 17h8v-2h-8v2zM3 19h8V5H3v14zM13 9h8V7h-8v2zm0 4h8v-2h-8v2z"})),category:"layout",keywords:[Object(K.__)("image"),Object(K.__)("video")],attributes:zn,supports:{align:["wide","full"],html:!1},transforms:{from:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.alt,n=e.url,r=e.id;return Object(D.createBlock)("core/media-text",{mediaAlt:t,mediaId:r,mediaUrl:n,mediaType:"image"})}},{type:"block",blocks:["core/video"],transform:function(e){var t=e.src,n=e.id;return Object(D.createBlock)("core/media-text",{mediaId:n,mediaUrl:t,mediaType:"video"})}}],to:[{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.mediaType;return!e.mediaUrl||"image"===t},transform:function(e){var t=e.mediaAlt,n=e.mediaId,r=e.mediaUrl;return Object(D.createBlock)("core/image",{alt:t,id:n,url:r})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.mediaType;return!e.mediaUrl||"video"===t},transform:function(e){var t=e.mediaId,n=e.mediaUrl;return Object(D.createBlock)("core/video",{id:t,src:n})}}]},edit:Ln,save:function(e){var t,n,r=e.attributes,o=r.backgroundColor,a=r.customBackgroundColor,c=r.isStackedOnMobile,i=r.mediaAlt,l=r.mediaPosition,s=r.mediaType,u=r.mediaUrl,b=r.mediaWidth,m=r.mediaId,d={image:function(){return Object(U.createElement)("img",{src:u,alt:i,className:m&&"image"===s?"wp-image-".concat(m):null})},video:function(){return Object(U.createElement)("video",{controls:!0,src:u})}},h=Object($.getColorClassName)("background-color",o),p=q()((t={"has-media-on-the-right":"right"===l},Object(F.a)(t,h,h),Object(F.a)(t,"is-stacked-on-mobile",c),t));50!==b&&(n="right"===l?"auto ".concat(b,"%"):"".concat(b,"% auto"));var g={backgroundColor:h?void 0:a,gridTemplateColumns:n};return Object(U.createElement)("div",{className:p,style:g},Object(U.createElement)("figure",{className:"wp-block-media-text__media"},(d[s]||G.noop)()),Object(U.createElement)("div",{className:"wp-block-media-text__content"},Object(U.createElement)($.InnerBlocks.Content,null)))},deprecated:[{attributes:zn,save:function(e){var t,n,r=e.attributes,o=r.backgroundColor,a=r.customBackgroundColor,c=r.isStackedOnMobile,i=r.mediaAlt,l=r.mediaPosition,s=r.mediaType,u=r.mediaUrl,b=r.mediaWidth,m={image:function(){return Object(U.createElement)("img",{src:u,alt:i})},video:function(){return Object(U.createElement)("video",{controls:!0,src:u})}},d=Object($.getColorClassName)("background-color",o),h=q()((t={"has-media-on-the-right":"right"===l},Object(F.a)(t,d,d),Object(F.a)(t,"is-stacked-on-mobile",c),t));50!==b&&(n="right"===l?"auto ".concat(b,"%"):"".concat(b,"% auto"));var p={backgroundColor:d?void 0:a,gridTemplateColumns:n};return Object(U.createElement)("div",{className:h,style:p},Object(U.createElement)("figure",{className:"wp-block-media-text__media"},(m[s]||G.noop)()),Object(U.createElement)("div",{className:"wp-block-media-text__content"},Object(U.createElement)($.InnerBlocks.Content,null)))}}]},Dn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).setAlignment=e.setAlignment.bind(Object(ne.a)(Object(ne.a)(e))),e.setCommentsToShow=e.setCommentsToShow.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleDisplayAvatar=e.createToggleAttribute("displayAvatar"),e.toggleDisplayDate=e.createToggleAttribute("displayDate"),e.toggleDisplayExcerpt=e.createToggleAttribute("displayExcerpt"),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"createToggleAttribute",value:function(e){var t=this;return function(){var n=t.props.attributes[e];(0,t.props.setAttributes)(Object(F.a)({},e,!n))}}},{key:"setAlignment",value:function(e){this.props.setAttributes({align:e})}},{key:"setCommentsToShow",value:function(e){this.props.setAttributes({commentsToShow:e})}},{key:"render",value:function(){var e=this.props.attributes,t=e.align,n=e.commentsToShow,r=e.displayAvatar,o=e.displayDate,a=e.displayExcerpt;return Object(U.createElement)(U.Fragment,null,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:t,onChange:this.setAlignment})),Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Latest Comments Settings")},Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display Avatar"),checked:r,onChange:this.toggleDisplayAvatar}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display Date"),checked:o,onChange:this.toggleDisplayDate}),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display Excerpt"),checked:a,onChange:this.toggleDisplayExcerpt}),Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Number of Comments"),value:n,onChange:this.setCommentsToShow,min:1,max:100}))),Object(U.createElement)(Q.Disabled,null,Object(U.createElement)($.ServerSideRender,{block:"core/latest-comments",attributes:this.props.attributes})))}}]),t}(U.Component),Fn="core/latest-comments",Vn={title:Object(K.__)("Latest Comments"),description:Object(K.__)("Display a list of your most recent comments."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M22 4l-2-2H4L2 4v12l2 2h14l4 4V4zm-2 0v13l-1-1H4V4h16z"}),Object(U.createElement)(Q.Path,{d:"M6 12h12v2H6zM6 9h12v2H6zM6 6h12v2H6z"}))),category:"widgets",keywords:[Object(K.__)("recent comments")],supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right","wide","full"].includes(t))return{"data-align":t}},edit:Dn,save:function(){return null}},Un=n(30),Wn=n.n(Un),qn=n(46),Gn=n(49),Kn={per_page:-1},$n=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).state={categoriesList:[]},e.toggleDisplayPostDate=e.toggleDisplayPostDate.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentWillMount",value:function(){var e=this;this.isStillMounted=!0,this.fetchRequest=Wn()({path:Object(pe.addQueryArgs)("/wp/v2/categories",Kn)}).then(function(t){e.isStillMounted&&e.setState({categoriesList:t})}).catch(function(){e.isStillMounted&&e.setState({categoriesList:[]})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"toggleDisplayPostDate",value:function(){var e=this.props.attributes.displayPostDate;(0,this.props.setAttributes)({displayPostDate:!e})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.latestPosts,o=this.state.categoriesList,a=t.displayPostDate,c=t.align,i=t.postLayout,l=t.columns,s=t.order,u=t.orderBy,b=t.categories,m=t.postsToShow,d=Object(U.createElement)($.InspectorControls,null,Object(U.createElement)(Q.PanelBody,{title:Object(K.__)("Latest Posts Settings")},Object(U.createElement)(Q.QueryControls,Object(Y.a)({order:s,orderBy:u},{numberOfItems:m,categoriesList:o,selectedCategoryId:b,onOrderChange:function(e){return n({order:e})},onOrderByChange:function(e){return n({orderBy:e})},onCategoryChange:function(e){return n({categories:""!==e?e:void 0})},onNumberOfItemsChange:function(e){return n({postsToShow:e})}})),Object(U.createElement)(Q.ToggleControl,{label:Object(K.__)("Display post date"),checked:a,onChange:this.toggleDisplayPostDate}),"grid"===i&&Object(U.createElement)(Q.RangeControl,{label:Object(K.__)("Columns"),value:l,onChange:function(e){return n({columns:e})},min:2,max:h?Math.min(6,r.length):6}))),h=Array.isArray(r)&&r.length;if(!h)return Object(U.createElement)(U.Fragment,null,d,Object(U.createElement)(Q.Placeholder,{icon:"admin-post",label:Object(K.__)("Latest Posts")},Array.isArray(r)?Object(K.__)("No posts found."):Object(U.createElement)(Q.Spinner,null)));var p=r.length>m?r.slice(0,m):r,g=[{icon:"list-view",title:Object(K.__)("List View"),onClick:function(){return n({postLayout:"list"})},isActive:"list"===i},{icon:"grid-view",title:Object(K.__)("Grid View"),onClick:function(){return n({postLayout:"grid"})},isActive:"grid"===i}],O=Object(qn.__experimentalGetSettings)().formats.date;return Object(U.createElement)(U.Fragment,null,d,Object(U.createElement)($.BlockControls,null,Object(U.createElement)($.BlockAlignmentToolbar,{value:c,onChange:function(e){n({align:e})},controls:["center","wide","full"]}),Object(U.createElement)(Q.Toolbar,{controls:g})),Object(U.createElement)("ul",{className:q()(this.props.className,Object(F.a)({"is-grid":"grid"===i,"has-dates":a},"columns-".concat(l),"grid"===i))},p.map(function(e,t){return Object(U.createElement)("li",{key:t},Object(U.createElement)("a",{href:e.link,target:"_blank"},Object(Gn.decodeEntities)(e.title.rendered.trim())||Object(K.__)("(Untitled)")),a&&e.date_gmt&&Object(U.createElement)("time",{dateTime:Object(qn.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date"},Object(qn.dateI18n)(O,e.date_gmt)))})))}}]),t}(U.Component),Qn=Object(oe.withSelect)(function(e,t){var n=t.attributes,r=n.postsToShow,o=n.order,a=n.orderBy,c=n.categories;return{latestPosts:(0,e("core").getEntityRecords)("postType","post",Object(G.pickBy)({categories:c,order:o,orderby:a,per_page:r},function(e){return!Object(G.isUndefined)(e)}))}})($n),Yn="core/latest-posts",Zn={title:Object(K.__)("Latest Posts"),description:Object(K.__)("Display a list of your most recent posts."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(U.createElement)(Q.Rect,{x:"11",y:"7",width:"6",height:"2"}),Object(U.createElement)(Q.Rect,{x:"11",y:"11",width:"6",height:"2"}),Object(U.createElement)(Q.Rect,{x:"11",y:"15",width:"6",height:"2"}),Object(U.createElement)(Q.Rect,{x:"7",y:"7",width:"2",height:"2"}),Object(U.createElement)(Q.Rect,{x:"7",y:"11",width:"2",height:"2"}),Object(U.createElement)(Q.Rect,{x:"7",y:"15",width:"2",height:"2"}),Object(U.createElement)(Q.Path,{d:"M20.1,3H3.9C3.4,3,3,3.4,3,3.9v16.2C3,20.5,3.4,21,3.9,21h16.2c0.4,0,0.9-0.5,0.9-0.9V3.9C21,3.4,20.5,3,20.1,3z M19,19H5V5h14V19z"})),category:"widgets",keywords:[Object(K.__)("recent posts")],supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right","wide","full"].includes(t))return{"data-align":t}},edit:Qn,save:function(){return null}},Jn=Object(V.a)({},Object(D.getPhrasingContentSchema)(),{ul:{},ol:{attributes:["type"]}});["ul","ol"].forEach(function(e){Jn[e].children={li:{children:Jn}}});var Xn={className:!1},er={ordered:{type:"boolean",default:!1},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",default:""}},tr="core/list",nr={title:Object(K.__)("List"),description:Object(K.__)("Create a bulleted or numbered list."),icon:Object(U.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(U.createElement)(Q.G,null,Object(U.createElement)(Q.Path,{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"}))),category:"common",keywords:[Object(K.__)("bullet list"),Object(K.__)("ordered list"),Object(K.__)("numbered list")],attributes:er,supports:Xn,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(D.createBlock)("core/list",{values:Object(lt.toHTMLString)({value:Object(lt.join)(e.map(function(e){var t=e.content;return Object(lt.replace)(Object(lt.create)({html:t}),/\n/g,lt.LINE_SEPARATOR)}),lt.LINE_SEPARATOR),multilineTag:"li"})})}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.value;return Object(D.createBlock)("core/list",{values:Object(lt.toHTMLString)({value:Object(lt.create)({html:t,multilineTag:"p"}),multilineTag:"li"})})}},{type:"raw",selector:"ol,ul",schema:{ol:Jn.ol,ul:Jn.ul},transform:function(e){return Object(D.createBlock)("core/list",Object(V.a)({},Object(D.getBlockAttributes)("core/list",e.outerHTML),{ordered:"OL"===e.nodeName}))}}].concat(Object(H.a)(["*","-"].map(function(e){return{type:"prefix",prefix:e,transform:function(e){return Object(D.createBlock)("core/list",{values:"[^\r]+?<\/pre>)/gm,function(e,t){var r=t;return r=(r=r.replace(/^ /gm,"¨0")).replace(/¨0/g,"")}),i.subParser("hashBlock")("","gim"),e=r.converter._dispatch("hashPreCodeTags.after",e,t,r)}),i.subParser("headers",function(e,t,r){"use strict";e=r.converter._dispatch("headers.before",e,t,r);var n=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),a=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,o=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(a,function(e,a){var o=i.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l="\n"+e+"\n",t,r)}),e=r.converter._dispatch("blockQuotes.after",e,t,r)}),i.subParser("codeBlocks",function(e,t,r){"use strict";e=r.converter._dispatch("codeBlocks.before",e,t,r);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(e,n,a){var o=n,s=a,c="\n";return o=i.subParser("outdent")(o,t,r),o=i.subParser("encodeCode")(o,t,r),o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(c=""),o="",i.subParser("hashBlock")(o,t,r)+s})).replace(/¨0/,""),e=r.converter._dispatch("codeBlocks.after",e,t,r)}),i.subParser("codeSpans",function(e,t,r){"use strict";return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,n,a,o){var s=o;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=n+""+o+c+"
"+(s=i.subParser("encodeCode")(s,t,r))+"
",s=i.subParser("hashHTMLSpans")(s,t,r)}),e=r.converter._dispatch("codeSpans.after",e,t,r)}),i.subParser("completeHTMLDocument",function(e,t,r){"use strict";if(!t.completeHTMLDocument)return e;e=r.converter._dispatch("completeHTMLDocument.before",e,t,r);var n="html",a="\n",i="",o='\n',s="",c="";for(var l in void 0!==r.metadata.parsed.doctype&&(a="\n","html"!==(n=r.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==n||(o='')),r.metadata.parsed)if(r.metadata.parsed.hasOwnProperty(l))switch(l.toLowerCase()){case"doctype":break;case"title":i=""+r.metadata.parsed.title+" \n";break;case"charset":o="html"===n||"html5"===n?'\n':'\n';break;case"language":case"lang":s=' lang="'+r.metadata.parsed[l]+'"',c+='\n';break;default:c+='\n'}return e=a+"\n\n"+i+o+c+"\n\n"+e.trim()+"\n\n",e=r.converter._dispatch("completeHTMLDocument.after",e,t,r)}),i.subParser("detab",function(e,t,r){"use strict";return e=(e=(e=(e=(e=(e=r.converter._dispatch("detab.before",e,t,r)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,function(e,t){for(var r=t,n=4-r.length%4,a=0;a/g,">"),e=r.converter._dispatch("encodeAmpsAndAngles.after",e,t,r)}),i.subParser("encodeBackslashEscapes",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,i.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)}),i.subParser("encodeCode",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeCode.after",e,t,r)}),i.subParser("escapeSpecialCharsWithinTagAttributes",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)})).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)}),e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)}),i.subParser("githubCodeBlocks",function(e,t,r){"use strict";return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,n,a,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=i.subParser("encodeCode")(o,t,r),o=" ",o=i.subParser("hashBlock")(o,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"})).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e}),i.subParser("hashBlock",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("hashBlock.before",e,t,r)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n",e=r.converter._dispatch("hashBlock.after",e,t,r)}),i.subParser("hashCodeTags",function(e,t,r){"use strict";e=r.converter._dispatch("hashCodeTags.before",e,t,r);return e=i.helper.replaceRecursiveRegExp(e,function(e,n,a,o){var s=a+i.subParser("encodeCode")(n,t,r)+o;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"},""+(o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
]*>","
","gim"),e=r.converter._dispatch("hashCodeTags.after",e,t,r)}),i.subParser("hashElement",function(e,t,r){"use strict";return function(e,t){var n=t;return n=(n=(n=n.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),n="\n\n¨K"+(r.gHtmlBlocks.push(n)-1)+"K\n\n"}}),i.subParser("hashHTMLBlocks",function(e,t,r){"use strict";e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var n=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],a=function(e,t,n,a){var i=e;return-1!==n.search(/\bmarkdown\b/)&&(i=n+r.converter.makeHtml(t)+a),"\n\n¨K"+(r.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,t){return"<"+t+">"}));for(var o=0;o]*>)","im"),l="<"+n[o]+"\\b[^>]*>",u=""+n[o]+">";-1!==(s=i.helper.regexIndexOf(e,c));){var d=i.helper.splitAtIndex(e,s),f=i.helper.replaceRecursiveRegExp(d[1],a,l,u,"im");if(f===d[1])break;e=d[0].concat(f)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=(e=i.helper.replaceRecursiveRegExp(e,function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=r.converter._dispatch("hashHTMLBlocks.after",e,t,r)}),i.subParser("hashHTMLSpans",function(e,t,r){"use strict";function n(e){return"¨C"+(r.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=r.converter._dispatch("hashHTMLSpans.before",e,t,r)).replace(/<[^>]+?\/>/gi,function(e){return n(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<[^>]+?>/gi,function(e){return n(e)}),e=r.converter._dispatch("hashHTMLSpans.after",e,t,r)}),i.subParser("unhashHTMLSpans",function(e,t,r){"use strict";e=r.converter._dispatch("unhashHTMLSpans.before",e,t,r);for(var n=0;n ]*>\\s* ]*>","^ {0,3}
\\s*
"),c+="
",a.push(c))}for(o=a.length,s=0;s]*>/.test(u)&&(d=!0)}a[s]=u}return e=(e=(e=a.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)}),i.subParser("runExtension",function(e,t,r,n){"use strict";if(e.filter)t=e.filter(t,n.converter,r);else if(e.regex){var a=e.regex;a instanceof RegExp||(a=new RegExp(a,"g")),t=t.replace(a,e.replace)}return t}),i.subParser("spanGamut",function(e,t,r){"use strict";return e=r.converter._dispatch("spanGamut.before",e,t,r),e=i.subParser("codeSpans")(e,t,r),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=i.subParser("encodeBackslashEscapes")(e,t,r),e=i.subParser("images")(e,t,r),e=i.subParser("anchors")(e,t,r),e=i.subParser("autoLinks")(e,t,r),e=i.subParser("simplifiedAutoLinks")(e,t,r),e=i.subParser("emoji")(e,t,r),e=i.subParser("underline")(e,t,r),e=i.subParser("italicsAndBold")(e,t,r),e=i.subParser("strikethrough")(e,t,r),e=i.subParser("ellipsis")(e,t,r),e=i.subParser("hashHTMLSpans")(e,t,r),e=i.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=r.converter._dispatch("spanGamut.after",e,t,r)}),i.subParser("strikethrough",function(e,t,r){"use strict";return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,n){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(n)}),e=r.converter._dispatch("strikethrough.after",e,t,r)),e}),i.subParser("stripLinkDefinitions",function(e,t,r){"use strict";var n=function(e,n,a,o,s,c,l){return n=n.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?r.gUrls[n]=a.replace(/\s/g,""):r.gUrls[n]=i.subParser("encodeAmpsAndAngles")(a,t,r),c?c+l:(l&&(r.gTitles[n]=l.replace(/"|'/g,""")),t.parseImgDimensions&&o&&s&&(r.gDimensions[n]={width:o,height:s}),"")};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+\/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,n)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,n)).replace(/¨0/,"")}),i.subParser("tables",function(e,t,r){"use strict";if(!t.tables)return e;function n(e,n){return""+i.subParser("spanGamut")(e,t,r)+" \n"}function a(e){var a,o=e.split("\n");for(a=0;a"+(c=i.subParser("spanGamut")(c,t,r))+"\n"));for(a=0;a\n\n\n",a=0;a\n";for(var i=0;i\n"}return r+=" \n\n"}(p,m)}return e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,i.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,a)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,a),e=r.converter._dispatch("tables.after",e,t,r)}),i.subParser("underline",function(e,t,r){"use strict";return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return""+t+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return""+t+""}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/(_)/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e}),i.subParser("unescapeSpecialChars",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("unescapeSpecialChars.before",e,t,r)).replace(/¨E(\d+)E/g,function(e,t){var r=parseInt(t);return String.fromCharCode(r)}),e=r.converter._dispatch("unescapeSpecialChars.after",e,t,r)}),i.subParser("makeMarkdown.blockquote",function(e,t){"use strict";var r="";if(e.hasChildNodes())for(var n=e.childNodes,a=n.length,o=0;o ")}),i.subParser("makeMarkdown.codeBlock",function(e,t){"use strict";var r=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+r+"\n"+t.preList[n]+"\n```"}),i.subParser("makeMarkdown.codeSpan",function(e){"use strict";return"`"+e.innerHTML+"`"}),i.subParser("makeMarkdown.emphasis",function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="*";for(var n=e.childNodes,a=n.length,o=0;o",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),i.subParser("makeMarkdown.links",function(e,t){"use strict";var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,a=n.length;r="[";for(var o=0;o",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r}),i.subParser("makeMarkdown.list",function(e,t,r){"use strict";var n="";if(!e.hasChildNodes())return"";for(var a=e.childNodes,o=a.length,s=e.getAttribute("start")||1,c=0;c"+t.preList[r]+""}),i.subParser("makeMarkdown.strikethrough",function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="~~";for(var n=e.childNodes,a=n.length,o=0;otr>th"),c=e.querySelectorAll("tbody>tr");for(r=0;rp&&(p=g)}for(r=0;r/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")});void 0===(n=function(){"use strict";return i}.call(t,r,t,e))||(e.exports=n)}).call(this)},19:function(e,t,r){"use strict";var n=r(33);function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"REMOVE_BLOCK_TYPES":return-1!==r.names.indexOf(t)?null:t;case e:return r.name||null}return t}}var h=f("SET_DEFAULT_BLOCK_NAME"),p=f("SET_FREEFORM_FALLBACK_BLOCK_NAME"),g=f("SET_UNREGISTERED_FALLBACK_BLOCK_NAME");var m=Object(i.combineReducers)({blockTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return Object(c.a)({},e,Object(l.keyBy)(Object(l.map)(t.blockTypes,function(e){return Object(l.omit)(e,"styles ")}),"name"));case"REMOVE_BLOCK_TYPES":return Object(l.omit)(e,t.names)}return e},blockStyles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return Object(c.a)({},e,Object(l.mapValues)(Object(l.keyBy)(t.blockTypes,"name"),function(t){return Object(l.uniqBy)(Object(s.a)(Object(l.get)(t,["styles"],[])).concat(Object(s.a)(Object(l.get)(e,[t.name],[]))),function(e){return e.name})}));case"ADD_BLOCK_STYLES":return Object(c.a)({},e,Object(o.a)({},t.blockName,Object(l.uniqBy)(Object(s.a)(Object(l.get)(e,[t.blockName],[])).concat(Object(s.a)(t.styles)),function(e){return e.name})));case"REMOVE_BLOCK_STYLES":return Object(c.a)({},e,Object(o.a)({},t.blockName,Object(l.filter)(Object(l.get)(e,[t.blockName],[]),function(e){return-1===t.styleNames.indexOf(e.name)})))}return e},defaultBlockName:h,freeformFallbackBlockName:p,unregisteredFallbackBlockName:g,categories:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CATEGORIES":return t.categories||[];case"UPDATE_CATEGORY":if(!t.category||Object(l.isEmpty)(t.category))return e;if(Object(l.find)(e,["slug",t.slug]))return Object(l.map)(e,function(e){return e.slug===t.slug?Object(c.a)({},e,t.category):e})}return e}}),b=r(31),_=Object(b.a)(function(e){return Object.values(e.blockTypes)},function(e){return[e.blockTypes]});function k(e,t){return e.blockTypes[t]}function w(e,t){return e.blockStyles[t]}function v(e){return e.categories}function y(e){return e.defaultBlockName}function j(e){return e.freeformFallbackBlockName}function O(e){return e.unregisteredFallbackBlockName}var x=Object(b.a)(function(e,t){return Object(l.map)(Object(l.filter)(e.blockTypes,function(e){return Object(l.includes)(e.parent,t)}),function(e){return e.name})},function(e){return[e.blockTypes]}),C=function(e,t,r,n){var a="string"==typeof t?k(e,t):t;return Object(l.get)(a,["supports",r],n)};function A(e,t,r,n){return!!C(e,t,r,n)}var S=function(e,t){return x(e,t).length>0},T=function(e,t){return Object(l.some)(x(e,t),function(t){return A(e,t,"inserter",!0)})};function E(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Object(l.castArray)(e)}}function P(e){return{type:"REMOVE_BLOCK_TYPES",names:Object(l.castArray)(e)}}function M(e,t){return{type:"ADD_BLOCK_STYLES",styles:Object(l.castArray)(t),blockName:e}}function N(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Object(l.castArray)(t),blockName:e}}function B(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function L(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function z(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function H(e){return{type:"SET_CATEGORIES",categories:e}}function D(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}Object(i.registerStore)("core/blocks",{reducer:m,selectors:n,actions:a});var I=r(57),V=r.n(I),R=r(23),F=r(45),q=r.n(F),$=r(0),U=["#191e23","#f8f9f9"];function G(e){var t=ie();if(e.name!==t)return!1;G.block&&G.block.name===t||(G.block=me(t));var r=G.block,n=oe(t);return Object(l.every)(n.attributes,function(t,n){return r.attributes[n]===e.attributes[n]})}function W(e){return!!e&&(Object(l.isString)(e)||Object($.isValidElement)(e)||Object(l.isFunction)(e)||e instanceof $.Component)}function K(e){if(e||(e="block-default"),W(e))return{src:e};if(Object(l.has)(e,["background"])){var t=q()(e.background);return Object(c.a)({},e,{foreground:e.foreground?e.foreground:Object(F.mostReadable)(t,U,{includeFallbackColors:!0,level:"AA",size:"large"}).toHexString(),shadowColor:t.setAlpha(.3).toRgbString()})}return e}function Y(e){return Object(l.isString)(e)?oe(e):e}var Z={};function Q(e){Z=e}function X(e,t){if(t=Object(c.a)({name:e},Object(l.get)(Z,e),t),"string"==typeof e)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(e))if(Object(i.select)("core/blocks").getBlockType(e))console.error('Block "'+e+'" is already registered.');else if((t=Object(R.applyFilters)("blocks.registerBlockType",t,e))&&Object(l.isFunction)(t.save))if("edit"in t&&!Object(l.isFunction)(t.edit))console.error('The "edit" property must be a valid function.');else if("keywords"in t&&t.keywords.length>3)console.error('The block "'+e+'" can have a maximum of 3 keywords.');else if("category"in t)if("category"in t&&!Object(l.some)(Object(i.select)("core/blocks").getCategories(),{slug:t.category}))console.error('The block "'+e+'" must have a registered category.');else if("title"in t&&""!==t.title)if("string"==typeof t.title){if(t.icon=K(t.icon),W(t.icon.src))return Object(i.dispatch)("core/blocks").addBlockTypes(t),t;console.error("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://wordpress.org/gutenberg/handbook/block-api/#icon-optional")}else console.error("Block titles must be strings.");else console.error('The block "'+e+'" must have a title.');else console.error('The block "'+e+'" must have a category.');else console.error('The "save" property must be specified and must be a valid function.');else console.error("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");else console.error("Block names must be strings.")}function J(e){var t=Object(i.select)("core/blocks").getBlockType(e);if(t)return Object(i.dispatch)("core/blocks").removeBlockTypes(e),t;console.error('Block "'+e+'" is not registered.')}function ee(e){Object(i.dispatch)("core/blocks").setFreeformFallbackBlockName(e)}function te(){return Object(i.select)("core/blocks").getFreeformFallbackBlockName()}function re(e){Object(i.dispatch)("core/blocks").setUnregisteredFallbackBlockName(e)}function ne(){return Object(i.select)("core/blocks").getUnregisteredFallbackBlockName()}function ae(e){Object(i.dispatch)("core/blocks").setDefaultBlockName(e)}function ie(){return Object(i.select)("core/blocks").getDefaultBlockName()}function oe(e){return Object(i.select)("core/blocks").getBlockType(e)}function se(){return Object(i.select)("core/blocks").getBlockTypes()}function ce(e,t,r){return Object(i.select)("core/blocks").getBlockSupport(e,t,r)}function le(e,t,r){return Object(i.select)("core/blocks").hasBlockSupport(e,t,r)}function ue(e){return"core/block"===e.name}var de=function(e){return Object(i.select)("core/blocks").getChildBlockNames(e)},fe=function(e){return Object(i.select)("core/blocks").hasChildBlocks(e)},he=function(e){return Object(i.select)("core/blocks").hasChildBlocksWithInserterSupport(e)},pe=function(e,t){Object(i.dispatch)("core/blocks").addBlockStyles(e,t)},ge=function(e,t){Object(i.dispatch)("core/blocks").removeBlockStyles(e,t)};function me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=oe(e),a=Object(l.reduce)(n.attributes,function(e,r,n){var a=t[n];return void 0!==a?e[n]=a:r.hasOwnProperty("default")&&(e[n]=r.default),-1!==["node","children"].indexOf(r.source)&&("string"==typeof e[n]?e[n]=[e[n]]:Array.isArray(e[n])||(e[n]=[])),e},{});return{clientId:V()(),name:e,isValid:!0,attributes:a,innerBlocks:r}}function be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=V()();return Object(c.a)({},e,{clientId:n,attributes:Object(c.a)({},e.attributes,t),innerBlocks:r||e.innerBlocks.map(function(e){return be(e)})})}var _e=function(e,t,r){if(Object(l.isEmpty)(r))return!1;if(!(!(r.length>1)||e.isMultiBlock))return!1;if(!("block"===e.type))return!1;var n=Object(l.first)(r);if(!("from"!==t||-1!==e.blocks.indexOf(n.name)))return!1;if(Object(l.isFunction)(e.isMatch)){var a=e.isMultiBlock?r.map(function(e){return e.attributes}):n.attributes;if(!e.isMatch(a))return!1}return!0},ke=function(e){if(Object(l.isEmpty)(e))return[];var t=se();return Object(l.filter)(t,function(t){return!!ye(je("from",t.name),function(t){return _e(t,"from",e)})})},we=function(e){if(Object(l.isEmpty)(e))return[];var t=je("to",oe(Object(l.first)(e).name).name),r=Object(l.filter)(t,function(t){return _e(t,"to",e)});return Object(l.flatMap)(r,function(e){return e.blocks}).map(function(e){return oe(e)})};function ve(e){if(Object(l.isEmpty)(e))return[];var t=Object(l.first)(e);if(e.length>1&&!Object(l.every)(e,{name:t.name}))return[];var r=ke(e),n=we(e);return Object(l.uniq)(Object(s.a)(r).concat(Object(s.a)(n)))}function ye(e,t){for(var r=Object(R.createHooks)(),n=function(n){var a=e[n];t(a)&&r.addFilter("transform","transform/"+n.toString(),function(e){return e||a},a.priority)},a=0;a1,a=r[0],i=a.name;if(n&&!Object(l.every)(r,function(e){return e.name===i}))return null;var o,s=je("from",t),u=ye(je("to",i),function(e){return"block"===e.type&&-1!==e.blocks.indexOf(t)&&(!n||e.isMultiBlock)})||ye(s,function(e){return"block"===e.type&&-1!==e.blocks.indexOf(i)&&(!n||e.isMultiBlock)});if(!u)return null;if(o=u.isMultiBlock?u.transform(r.map(function(e){return e.attributes})):u.transform(a.attributes),!Object(l.isObjectLike)(o))return null;if((o=Object(l.castArray)(o)).some(function(e){return!oe(e.name)}))return null;var d=Object(l.findIndex)(o,function(e){return e.name===t});return d<0?null:o.map(function(t,r){var n=Object(c.a)({},t,{clientId:r===d?a.clientId:t.clientId});return Object(R.applyFilters)("blocks.switchToBlockType.transformedBlock",n,e)})}var xe=r(25);var Ce,Ae=function(){return Ce||(Ce=document.implementation.createHTMLDocument("")),Ce};function Se(e,t){if(t){if("string"==typeof e){var r=Ae();r.body.innerHTML=e,e=r.body}if("function"==typeof t)return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(r,n){return r[n]=Se(e,t[n]),r},{})}}function Te(e,t){return 1===arguments.length&&(t=e,e=void 0),function(r){var n=r;if(e&&(n=r.querySelector(e)),n)return function(e,t){for(var r,n=t.split(".");r=n.shift();){if(!(r in e))return;e=e[r]}return e}(n,t)}}var Ee=r(58),Pe=r(183),Me=r(35),Ne=r(33),Be=r(36);var Le=r(10),ze=r(9),He=/[\t\n\f ]/,De=/[A-Za-z]/,Ie=/\r\n?/g;function Ve(e){return He.test(e)}function Re(e){return De.test(e)}function Fe(e,t){if(!e)throw new Error((t||"value")+" was null");return e}var qe=function(){function e(e,t){this.delegate=e,this.entityParser=t,this.state=null,this.input=null,this.index=-1,this.tagLine=-1,this.tagColumn=-1,this.line=-1,this.column=-1,this.states={beforeData:function(){"<"===this.peek()?(this.state="tagOpen",this.markTagStart(),this.consume()):(this.state="data",this.delegate.beginData())},data:function(){var e=this.peek();"<"===e?(this.delegate.finishData(),this.state="tagOpen",this.markTagStart(),this.consume()):"&"===e?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e))},tagOpen:function(){var e=this.consume();"!"===e?this.state="markupDeclaration":"/"===e?this.state="endTagOpen":Re(e)&&(this.state="tagName",this.delegate.beginStartTag(),this.delegate.appendToTagName(e.toLowerCase()))},markupDeclaration:function(){"-"===this.consume()&&"-"===this.input.charAt(this.index)&&(this.consume(),this.state="commentStart",this.delegate.beginComment())},commentStart:function(){var e=this.consume();"-"===e?this.state="commentStartDash":">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData(e),this.state="comment")},commentStartDash:function(){var e=this.consume();"-"===e?this.state="commentEnd":">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("-"),this.state="comment")},comment:function(){var e=this.consume();"-"===e?this.state="commentEndDash":this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.state="commentEnd":(this.delegate.appendToCommentData("-"+e),this.state="comment")},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("--"+e),this.state="comment")},tagName:function(){var e=this.consume();Ve(e)?this.state="beforeAttributeName":"/"===e?this.state="selfClosingStartTag":">"===e?(this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();Ve(e)?this.consume():"/"===e?(this.state="selfClosingStartTag",this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.state="attributeName",this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.state="attributeName",this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();Ve(e)?(this.state="afterAttributeName",this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===e?(this.state="beforeAttributeValue",this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();Ve(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===e?(this.consume(),this.state="beforeAttributeValue"):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="attributeName",this.delegate.beginAttribute(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();Ve(e)?this.consume():'"'===e?(this.state="attributeValueDoubleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.state="attributeValueSingleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeValueUnquoted",this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef('"')||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef("'")||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();Ve(e)?(this.delegate.finishAttributeValue(),this.consume(),this.state="beforeAttributeName"):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef(">")||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();Ve(e)?(this.consume(),this.state="beforeAttributeName"):"/"===e?(this.consume(),this.state="selfClosingStartTag"):">"===e?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},endTagOpen:function(){var e=this.consume();Re(e)&&(this.state="tagName",this.delegate.beginEndTag(),this.delegate.appendToTagName(e.toLowerCase()))}},this.reset()}return e.prototype.reset=function(){this.state="beforeData",this.input="",this.index=0,this.line=1,this.column=0,this.tagLine=-1,this.tagColumn=-1,this.delegate.reset()},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(Ie,"\n")}(e);this.index2&&void 0!==arguments[2]?arguments[2]:[],n=Y(e),a=n.save;if(a.prototype instanceof $.Component){var i=new a({attributes:t});a=i.render.bind(i)}var o=a({attributes:t,innerBlocks:r});if(Object(l.isObject)(o)&&Object(R.hasFilter)("blocks.getSaveContent.extraProps")){var s=Object(R.applyFilters)("blocks.getSaveContent.extraProps",Object(c.a)({},o.props),n,t);We()(s,o.props)||(o=Object($.cloneElement)(o,s))}return o=Object(R.applyFilters)("blocks.getSaveElement",o,n,t),Object($.createElement)(et,{innerBlocks:r},o)}function at(e,t,r){var n=Y(e);return Object($.renderToString)(nt(n,t,r))}function it(e){var t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=at(e.name,e.attributes,e.innerBlocks)}catch(e){}return t}function ot(e,t,r){var n=Object(l.isEmpty)(t)?"":function(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(t)+" ",a=Object(l.startsWith)(e,"core/")?e.slice(5):e;return r?"\x3c!-- wp:".concat(a," ").concat(n,"--\x3e\n")+r+"\n\x3c!-- /wp:".concat(a," --\x3e"):"\x3c!-- wp:".concat(a," ").concat(n,"/--\x3e")}function st(e){var t=e.name,r=it(e);switch(t){case te():case ne():return r;default:return ot(t,function(e,t){return Object(l.reduce)(e.attributes,function(e,r,n){var a=t[n];return void 0===a?e:void 0!==r.source?e:"default"in r&&r.default===a?e:(e[n]=a,e)},{})}(oe(t),e.attributes),r)}}function ct(e){return Object(l.castArray)(e).map(st).join("\n\n")}var lt=/[\t\n\r\v\f ]+/g,ut=/^[\t\n\r\v\f ]*$/,dt=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,ft=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],ht=ft.concat(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),pt=[l.identity,function(e){return bt(e).join(" ")}],gt=function(){function e(){Object(Le.a)(this,e)}return Object(ze.a)(e,[{key:"parse",value:function(e){return Object(Ue.decodeEntities)("&"+e+";")}}]),e}(),mt=function(){function e(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{},n=Y(e),a=Object(l.mapValues)(n.attributes,function(e,n){return function(e,t,r,n){var a,i=t.type;switch(t.source){case void 0:a=n?n[e]:void 0;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":a=Ft(r,t)}return void 0===i||Vt(a,Object(l.castArray)(i))||(a=void 0),void 0===a?t.default:a}(n,e,t,r)});return Object(R.applyFilters)("blocks.getBlockAttributes",a,n,t,r)}function $t(e){var t=e.blockName,r=e.attrs,n=e.innerBlocks,a=void 0===n?[]:n,i=e.innerHTML,o=te(),s=ne()||o;r=r||{},i=i.trim();var u=t||o;"core/cover-image"===u&&(u="core/cover"),"core/text"!==u&&"core/cover-text"!==u||(u="core/paragraph"),u===o&&(i=Object(Ee.autop)(i).trim());var d=oe(u);if(!d){var f=i;u&&(i=ot(u,r,i)),r={originalName:t,originalUndelimitedContent:f},d=oe(u=s)}a=a.map($t);var h=u===o||u===s;if(d&&(i||!h)){var p=me(u,qt(d,i,r),a);return h||(p.isValid=At(d,p.attributes,i)),p.originalContent=i,p=function(e){var t=oe(e.name),r=t.deprecated;if(!r||!r.length)return e;for(var n=e,a=n.originalContent,i=n.attributes,o=n.innerBlocks,s=0;s1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,function e(t,r,n,a){Array.from(t).forEach(function(t){e(t.childNodes,r,n,a),r.forEach(function(e){n.contains(t)&&e(t,n,a)})})}(n.body.childNodes,t,n,r),n.body.innerHTML}function ar(e,t,r){var n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,function e(t,r,n,a){Array.from(t).forEach(function(t){var i=t.nodeName.toLowerCase();if(!n.hasOwnProperty(i)||n[i].isMatch&&!n[i].isMatch(t))e(t.childNodes,r,n,a),a&&!Qt(t)&&t.nextElementSibling&&Object(Kt.insertAfter)(r.createElement("br"),t),Object(Kt.unwrap)(t);else if(t.nodeType===Jt){var o=n[i],s=o.attributes,c=void 0===s?[]:s,u=o.classes,d=void 0===u?[]:u,f=o.children,h=o.require,p=void 0===h?[]:h;if(rr(t)&&f)return void Object(Kt.remove)(t);if(t.hasAttributes()&&(Array.from(t.attributes).forEach(function(e){var r=e.name;"class"===r||Object(l.includes)(c,r)||t.removeAttribute(r)}),t.classList.length)){var g=d.map(function(e){return"string"==typeof e?function(t){return t===e}:e instanceof RegExp?function(t){return e.test(t)}:l.noop});Array.from(t.classList).forEach(function(e){g.some(function(t){return t(e)})||t.classList.remove(e)}),t.classList.length||t.removeAttribute("class")}if(t.hasChildNodes()){if("*"===f)return;if(f)p.length&&!t.querySelector(p.join(","))&&(e(t.childNodes,r,n,a),Object(Kt.unwrap)(t)),e(t.childNodes,r,f,a);else for(;t.firstChild;)Object(Kt.remove)(t.firstChild)}}})}(n.body.childNodes,n,t,r),n.body.innerHTML}var ir=window.Node,or=ir.ELEMENT_NODE,sr=ir.TEXT_NODE,cr=function(e){var t=document.implementation.createHTMLDocument(""),r=document.implementation.createHTMLDocument(""),n=t.body,a=r.body;for(n.innerHTML=e;n.firstChild;){var i=n.firstChild;i.nodeType===sr?i.nodeValue.trim()?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(i)):n.removeChild(i):i.nodeType===or?"BR"===i.nodeName?(i.nextSibling&&"BR"===i.nextSibling.nodeName&&(a.appendChild(r.createElement("P")),n.removeChild(i.nextSibling)),a.lastChild&&"P"===a.lastChild.nodeName&&a.lastChild.hasChildNodes()?a.lastChild.appendChild(i):n.removeChild(i)):"P"===i.nodeName?rr(i)?n.removeChild(i):a.appendChild(i):Qt(i)?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(i)):a.appendChild(i):n.removeChild(i)}return a.innerHTML},lr=window.Node.COMMENT_NODE,ur=function(e,t){if(e.nodeType===lr)if("nextpage"!==e.nodeValue){if(0===e.nodeValue.indexOf("more")){for(var r=e.nodeValue.slice(4).trim(),n=e,a=!1;n=n.nextSibling;)if(n.nodeType===lr&&"noteaser"===n.nodeValue){a=!0,Object(Kt.remove)(n);break}Object(Kt.replace)(e,function(e,t,r){var n=r.createElement("wp-block");n.dataset.block="core/more",e&&(n.dataset.customText=e);t&&(n.dataset.noTeaser="");return n}(r,a,t))}}else Object(Kt.replace)(e,function(e){var t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t))};function dr(e,t){return e.every(function(e){return function(e,t){if(Qt(e))return!0;if(!t)return!1;var r=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(function(e){return 0===Object(l.difference)([r,t],e).length})}(e,t)&&dr(Array.from(e.children),t)})}function fr(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}var hr=function(e,t){var r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;var n=Array.from(r.body.children);return!n.some(fr)&&dr(n,t)};var pr=function(e,t,r){if("SPAN"===e.nodeName){var n=e.style,a=n.fontWeight,i=n.fontStyle,o=n.textDecorationLine,s=n.verticalAlign;"bold"!==a&&"700"!==a||Object(Kt.wrap)(t.createElement("strong"),e),"italic"===i&&Object(Kt.wrap)(t.createElement("em"),e),"line-through"===o&&Object(Kt.wrap)(t.createElement("del"),e),"super"===s?Object(Kt.wrap)(t.createElement("sup"),e):"sub"===s&&Object(Kt.wrap)(t.createElement("sub"),e)}else"B"===e.nodeName?e=Object(Kt.replaceTag)(e,"strong"):"I"===e.nodeName?e=Object(Kt.replaceTag)(e,"em"):"A"===e.nodeName&&("_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")));Qt(e)&&e.hasChildNodes()&&Array.from(e.childNodes).some(function(e){return function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).hasOwnProperty(e.nodeName.toLowerCase())}(e,r)})&&Object(Kt.unwrap)(e)},gr=function(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)},mr=window.parseInt;function br(e){return"OL"===e.nodeName||"UL"===e.nodeName}var _r=function(e,t){if("P"===e.nodeName){var r=e.getAttribute("style");if(r&&-1!==r.indexOf("mso-list")){var n=/mso-list\s*:[^;]+level([0-9]+)/i.exec(r);if(n){var a=mr(n[1],10)-1||0,i=e.previousElementSibling;if(!i||!br(i)){var o=e.textContent.trim().slice(0,1),s=/[1iIaA]/.test(o),c=t.createElement(s?"ol":"ul");s&&c.setAttribute("type",o),e.parentNode.insertBefore(c,e)}var l=e.previousElementSibling,u=l.nodeName,d=t.createElement("li"),f=l;for(e.removeChild(e.firstElementChild);e.firstChild;)d.appendChild(e.firstChild);for(;a--;)br(f=f.lastElementChild||f)&&(f=f.lastElementChild||f);br(f)||(f=f.appendChild(t.createElement(u))),f.appendChild(d),e.parentNode.removeChild(e)}}}};function kr(e){return"OL"===e.nodeName||"UL"===e.nodeName}var wr=function(e){if(kr(e)){var t=e,r=e.previousElementSibling;if(r&&r.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode.removeChild(t)}var n,a=e.parentNode;if(a&&"LI"===a.nodeName&&1===a.children.length&&!/\S/.test((n=a,Object(s.a)(n.childNodes).map(function(e){var t=e.nodeValue;return void 0===t?"":t}).join("")))){var i=a,o=i.previousElementSibling,c=i.parentNode;o?(o.appendChild(t),c.removeChild(i)):(c.parentNode.insertBefore(t,c),c.parentNode.removeChild(c))}if(a&&kr(a)){var l=e.previousElementSibling;l?l.appendChild(e):Object(Kt.unwrap)(e)}}},vr=r(32),yr=window,jr=yr.atob,Or=yr.File,xr=function(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){var t,r=e.src.split(","),n=Object(xe.a)(r,2),a=n[0],i=n[1],o=a.slice(5).split(";"),s=Object(xe.a)(o,1)[0];if(!i||!s)return void(e.src="");try{t=jr(i)}catch(t){return void(e.src="")}for(var c=new Uint8Array(t.length),l=0;l1&&void 0!==arguments[1]?arguments[1]:0,n=ye(je("from"),function(e){return"shortcode"===e.type&&Object(l.some)(Object(l.castArray)(e.tag),function(e){return Object(Sr.regexp)(e).test(t)})});if(!n)return[t];var a,i=Object(l.castArray)(n.tag),o=Object(l.first)(i);if(a=Object(Sr.next)(o,t,r)){var u=t.substr(0,a.index);if(r=a.index+a.content.length,!Object(l.includes)(a.shortcode.content||"","<")&&!/(\n|)\s*$/.test(u))return e(t,r);var d=Object(l.mapValues)(Object(l.pickBy)(n.attributes,function(e){return e.shortcode}),function(e){return e.shortcode(a.shortcode.attrs,a)});return[u,me(n.blockName,qt(Object(c.a)({},oe(n.blockName),{attributes:n.attributes}),a.shortcode.content,d))].concat(Object(s.a)(e(t.substr(r))))}return[t]},Er=r(184),Pr=new(r.n(Er).a.Converter)({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});var Mr=function(e){return Pr.makeHtml(function(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,function(e,t,r,n){return"".concat(t,"\n").concat(r,"\n").concat(n)})}(e))},Nr=function(e){"IFRAME"===e.nodeName&&Object(Kt.remove)(e)},Br=window.console;function Lr(e){return e=ar(e=nr(e,[pr]),Zt(),{inline:!0}),Br.log("Processed inline HTML:\n\n",e),e}function zr(){return Object(l.filter)(je("from"),{type:"raw"}).map(function(e){return e.isMatch?e:Object(c.a)({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})})}function Hr(e){var t=e.html,r=e.rawTransforms,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=t,Array.from(n.body.children).map(function(e){var t=ye(r,function(t){return(0,t.isMatch)(e)});if(!t)return me("core/html",qt("core/html",e.outerHTML));var n=t.transform,a=t.blockName;return n?n(e):me(a,qt(a,e.outerHTML))})}function Dr(e){var t=e.HTML,r=void 0===t?"":t,n=e.plainText,a=void 0===n?"":n,i=e.mode,o=void 0===i?"AUTO":i,s=e.tagName,u=e.canUserUseUnfilteredHTML,d=void 0!==u&&u;if(r=r.replace(/]+>/,""),"INLINE"!==o&&-1!==r.indexOf("\x3c!-- wp:"))return Gt(r);if(String.prototype.normalize&&(r=r.normalize()),!a||r&&!function(e){return!/<(?!br[ \/>])/i.test(e)}(r)||(r=Mr(a),"AUTO"===o&&-1===a.indexOf("\n")&&0!==a.indexOf("
")&&0===r.indexOf("
")&&(o="INLINE")),"INLINE"===o)return Lr(r);var f=Tr(r),h=f.length>1;if("AUTO"===o&&!h&&hr(r,s))return Lr(r);var p=zr(),g=Zt(),m=tr(p),b=Object(l.compact)(Object(l.flatMap)(f,function(e){if("string"!=typeof e)return e;var t=[_r,gr,wr,xr,pr,ur,Ar,Cr];d||t.unshift(Nr);var r=Object(c.a)({},m,g);return e=ar(e=nr(e,t,m),r),e=cr(e),Br.log("Processed HTML piece:\n\n",e),Hr({html:e,rawTransforms:p})}));if("AUTO"===o&&1===b.length){var _=a.trim();if(""!==_&&-1===_.indexOf("\n"))return ar(it(b[0]),g)}return b}function Ir(e){var t=e.HTML,r=void 0===t?"":t;if(-1!==r.indexOf("\x3c!-- wp:"))return Gt(r);var n=Tr(r),a=zr(),i=tr(a);return Object(l.compact)(Object(l.flatMap)(n,function(e){return"string"!=typeof e?e:(e=nr(e,[wr,ur,Ar,Cr],i),Hr({html:e=cr(e),rawTransforms:a}))}))}function Vr(){return Object(i.select)("core/blocks").getCategories()}function Rr(e){Object(i.dispatch)("core/blocks").setCategories(e)}function Fr(e,t){Object(i.dispatch)("core/blocks").updateCategory(e,t)}function qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&Object(l.every)(t,function(t,r){var n=Object(xe.a)(t,3),a=n[0],i=n[2],o=e[r];return a===o.name&&qr(o.innerBlocks,i)})}function $r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?Object(l.map)(t,function(t,r){var n=Object(xe.a)(t,3),a=n[0],i=n[1],o=n[2],s=e[r];if(s&&s.name===a){var u=$r(s.innerBlocks,o);return Object(c.a)({},s,{innerBlocks:u})}var d=oe(a),f=function(e,t){return Object(l.mapValues)(t,function(t,r){return h(e[r],t)})},h=function(e,t){return r=e,"html"===Object(l.get)(r,["source"])&&Object(l.isArray)(t)?Object($.renderToString)(t):function(e){return"query"===Object(l.get)(e,["source"])}(e)&&t?t.map(function(t){return f(e.query,t)}):t;var r};return me(a,f(Object(l.get)(d,["attributes"],{}),i),$r([],o))}):e}r.d(t,"createBlock",function(){return me}),r.d(t,"cloneBlock",function(){return be}),r.d(t,"getPossibleBlockTransformations",function(){return ve}),r.d(t,"switchToBlockType",function(){return Oe}),r.d(t,"getBlockTransforms",function(){return je}),r.d(t,"findTransform",function(){return ye}),r.d(t,"parse",function(){return Wt}),r.d(t,"getBlockAttributes",function(){return qt}),r.d(t,"parseWithAttributeSchema",function(){return Ft}),r.d(t,"pasteHandler",function(){return Dr}),r.d(t,"rawHandler",function(){return Ir}),r.d(t,"getPhrasingContentSchema",function(){return Zt}),r.d(t,"serialize",function(){return ct}),r.d(t,"getBlockContent",function(){return it}),r.d(t,"getBlockDefaultClassName",function(){return tt}),r.d(t,"getBlockMenuDefaultClassName",function(){return rt}),r.d(t,"getSaveElement",function(){return nt}),r.d(t,"getSaveContent",function(){return at}),r.d(t,"isValidBlockContent",function(){return At}),r.d(t,"getCategories",function(){return Vr}),r.d(t,"setCategories",function(){return Rr}),r.d(t,"updateCategory",function(){return Fr}),r.d(t,"registerBlockType",function(){return X}),r.d(t,"unregisterBlockType",function(){return J}),r.d(t,"setFreeformContentHandlerName",function(){return ee}),r.d(t,"getFreeformContentHandlerName",function(){return te}),r.d(t,"setUnregisteredTypeHandlerName",function(){return re}),r.d(t,"getUnregisteredTypeHandlerName",function(){return ne}),r.d(t,"setDefaultBlockName",function(){return ae}),r.d(t,"getDefaultBlockName",function(){return ie}),r.d(t,"getBlockType",function(){return oe}),r.d(t,"getBlockTypes",function(){return se}),r.d(t,"getBlockSupport",function(){return ce}),r.d(t,"hasBlockSupport",function(){return le}),r.d(t,"isReusableBlock",function(){return ue}),r.d(t,"getChildBlockNames",function(){return de}),r.d(t,"hasChildBlocks",function(){return fe}),r.d(t,"hasChildBlocksWithInserterSupport",function(){return he}),r.d(t,"unstable__bootstrapServerSideBlockDefinitions",function(){return Q}),r.d(t,"registerBlockStyle",function(){return pe}),r.d(t,"unregisterBlockStyle",function(){return ge}),r.d(t,"isUnmodifiedDefaultBlock",function(){return G}),r.d(t,"normalizeIconObject",function(){return K}),r.d(t,"isValidIcon",function(){return W}),r.d(t,"doBlocksMatchTemplate",function(){return qr}),r.d(t,"synchronizeBlocksWithTemplate",function(){return $r}),r.d(t,"children",function(){return Pt}),r.d(t,"node",function(){return Dt}),r.d(t,"withBlockContentContext",function(){return Je})},31:function(e,t,r){"use strict";var n,a;function i(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function s(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=N(e,360),t=N(t,100),r=N(r,100),0===t)n=a=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;n=o(c,s,e+1/3),a=o(c,s,e),i=o(c,s,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,n,c),d=!0,f="hsl"),e.hasOwnProperty("a")&&(r=e.a));var h,p,g;return r=M(r),{ok:d,format:e.format||f,r:l(255,u(t.r,0)),g:l(255,u(t.g,0)),b:l(255,u(t.b,0)),a:r}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=c(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=r.ok,this._tc_id=s++}function h(e,t,r){e=N(e,255),t=N(t,255),r=N(r,255);var n,a,i=u(e,t,r),o=l(e,t,r),s=(i+o)/2;if(i==o)n=a=0;else{var c=i-o;switch(a=s>.5?c/(2-i-o):c/(i+o),i){case e:n=(t-r)/c+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(f(n));return i}function T(e,t){t=t||6;for(var r=f(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/t;t--;)o.push(f({h:n,s:a,v:i})),i=(i+s)%1;return o}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=M(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var i=[z(c(e).toString(16)),z(c(t).toString(16)),z(c(r).toString(16)),z(D(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*N(this._r,255))+"%",g:c(100*N(this._g,255))+"%",b:c(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%)":"rgba("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+m(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=f(e);r="#"+m(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(j,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(O,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:H(e[n]));e=r}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,r){r=0===r?0:r||50;var n=f(e).toRgb(),a=f(t).toRgb(),i=r/100;return f({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},f.readability=function(e,t){var r=f(e),n=f(t);return(a.max(r.getLuminance(),n.getLuminance())+.05)/(a.min(r.getLuminance(),n.getLuminance())+.05)},f.isReadable=function(e,t,r){var n,a,i=f.readability(e,t);switch(a=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},f.mostReadable=function(e,t,r){var n,a,i,o,s=null,c=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var l=0;lc&&(c=n,s=f(t[l]));return f.isReadable(e,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],r))};var E=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=f.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(E);function M(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,u(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function B(e){return l(1,u(0,e))}function L(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function H(e){return e<=1&&(e=100*e+"%"),e}function D(e){return a.round(255*parseFloat(e)).toString(16)}function I(e){return L(e)/255}var V,R,F,q=(R="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",F="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+R),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+R),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+R),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function $(e){return!!q.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(n=function(){return f}.call(t,r,t,e))||(e.exports=n)}(Math)},49:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},5:function(e,t){!function(){e.exports=this.wp.data}()},57:function(e,t,r){var n=r(77),a=r(78);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},58:function(e,t){!function(){e.exports=this.wp.autop}()},7:function(e,t){!function(){e.exports=this.wp.compose}()},77:function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var a=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),a[t]=e>>>((3&t)<<3)&255;return a}}},78:function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,a=r;return[a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]]].join("")}},8:function(e,t,r){"use strict";r.d(t,"a",function(){return a});var n=r(15);function a(e){for(var t=1;t (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: foo",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n].defaultValue);return r}var i={},o={},s={},c=a(!0),l="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:a(!0),allOn:function(){"use strict";var e=a(!0),t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=!0);return t}()};function d(e,t){"use strict";var r=t?"Error in "+t+" extension->":"Error in unnamed extension",n={valid:!0,error:""};i.helper.isArray(e)||(e=[e]);for(var a=0;a").replace(/&/g,"&")};var h=function(e,t,r,n){"use strict";var a,i,o,s,c,l=n||"",u=l.indexOf("g")>-1,d=new RegExp(t+"|"+r,"g"+l.replace(/g/g,"")),f=new RegExp(t,l.replace(/g/g,"")),h=[];do{for(a=0;o=d.exec(e);)if(f.test(o[0]))a++||(s=(i=d.lastIndex)-o[0].length);else if(a&&!--a){c=o.index+o[0].length;var p={left:{start:s,end:i},match:{start:i,end:o.index},right:{start:o.index,end:c},wholeMatch:{start:s,end:c}};if(h.push(p),!u)return h}}while(a&&(d.lastIndex=i));return h};i.helper.matchRecursiveRegExp=function(e,t,r,n){"use strict";for(var a=h(e,t,r,n),i=[],o=0;o0){var u=[];0!==s[0].wholeMatch.start&&u.push(e.slice(0,s[0].wholeMatch.start));for(var d=0;d=0?n+(r||0):n},i.helper.splitAtIndex=function(e,t){"use strict";if(!i.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},i.helper.encodeEmailAddress=function(e){"use strict";var t=[function(e){return""+e.charCodeAt(0)+";"},function(e){return""+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var r=Math.random();e=r>.9?t[2](e):r>.45?t[1](e):t[0](e)}return e})},i.helper.padEnd=function(e,t,r){"use strict";return t>>=0,r=String(r||" "),e.length>t?String(e):((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),String(e)+r.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),i.helper.regexes={asteriskDashAndColon:/([*_:~])/g},i.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨❤️👨",couple_with_heart_woman_woman:"👩❤️👩",couplekiss_man_man:"👨❤️💋👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩❤️💋👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨👦",family_man_boy_boy:"👨👦👦",family_man_girl:"👨👧",family_man_girl_boy:"👨👧👦",family_man_girl_girl:"👨👧👧",family_man_man_boy:"👨👨👦",family_man_man_boy_boy:"👨👨👦👦",family_man_man_girl:"👨👨👧",family_man_man_girl_boy:"👨👨👧👦",family_man_man_girl_girl:"👨👨👧👧",family_man_woman_boy_boy:"👨👩👦👦",family_man_woman_girl:"👨👩👧",family_man_woman_girl_boy:"👨👩👧👦",family_man_woman_girl_girl:"👨👩👧👧",family_woman_boy:"👩👦",family_woman_boy_boy:"👩👦👦",family_woman_girl:"👩👧",family_woman_girl_boy:"👩👧👦",family_woman_girl_girl:"👩👧👧",family_woman_woman_boy:"👩👩👦",family_woman_woman_boy_boy:"👩👩👦👦",family_woman_woman_girl:"👩👩👧",family_woman_woman_girl_boy:"👩👩👧👦",family_woman_woman_girl_girl:"👩👩👧👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨🎨",man_astronaut:"👨🚀",man_cartwheeling:"🤸♂️",man_cook:"👨🍳",man_dancing:"🕺",man_facepalming:"🤦♂️",man_factory_worker:"👨🏭",man_farmer:"👨🌾",man_firefighter:"👨🚒",man_health_worker:"👨⚕️",man_in_tuxedo:"🤵",man_judge:"👨⚖️",man_juggling:"🤹♂️",man_mechanic:"👨🔧",man_office_worker:"👨💼",man_pilot:"👨✈️",man_playing_handball:"🤾♂️",man_playing_water_polo:"🤽♂️",man_scientist:"👨🔬",man_shrugging:"🤷♂️",man_singer:"👨🎤",man_student:"👨🎓",man_teacher:"👨🏫",man_technologist:"👨💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩🎨",woman_astronaut:"👩🚀",woman_cartwheeling:"🤸♀️",woman_cook:"👩🍳",woman_facepalming:"🤦♀️",woman_factory_worker:"👩🏭",woman_farmer:"👩🌾",woman_firefighter:"👩🚒",woman_health_worker:"👩⚕️",woman_judge:"👩⚖️",woman_juggling:"🤹♀️",woman_mechanic:"👩🔧",woman_office_worker:"👩💼",woman_pilot:"👩✈️",woman_playing_handball:"🤾♀️",woman_playing_water_polo:"🤽♀️",woman_scientist:"👩🔬",woman_shrugging:"🤷♀️",woman_singer:"👩🎤",woman_student:"👩🎓",woman_teacher:"👩🏫",woman_technologist:"👩💻",woman_with_turban:"👳♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'',showdown:"S"},i.Converter=function(e){"use strict";var t={},r=[],n=[],a={},o=l,f={parsed:{},raw:"",format:""};function h(e,t){if(t=t||null,i.helper.isString(e)){if(t=e=i.helper.stdExtName(e),i.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new i.Converter));i.helper.isArray(e)||(e=[e]);var a=d(e,t);if(!a.valid)throw Error(a.error);for(var o=0;o [ \t]+,">¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div");r.innerHTML=e;var n={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],n=0;n'}else r.push(t[n].innerHTML),t[n].innerHTML="",t[n].setAttribute("prenum",n.toString());return r}(r)};!function e(t){for(var r=0;r? ?(['"].*['"])?\)$/m)>-1)o="";else if(!o){if(a||(a=n.toLowerCase().replace(/ ?\n/g," ")),o="#"+a,i.helper.isUndefined(r.gUrls[a]))return e;o=r.gUrls[a],i.helper.isUndefined(r.gTitles[a])||(l=r.gTitles[a])}var u='"+n+""};return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[([^\[\]]+)]()()()()()/g,n),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,function(e,r,n,a,o){if("\\"===n)return r+a;if(!i.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,o),c="";return t.openLinksInNewWindow&&(c=' target="¨E95Eblank"'),r+'"+a+""})),e=r.converter._dispatch("anchors.after",e,t,r)});var p=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,g=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,m=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,b=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-\/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,_=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,k=function(e){"use strict";return function(t,r,n,a,o,s,c){var l=n=n.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback),u="",d="",f=r||"",h=c||"";return/^www\./i.test(n)&&(n=n.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(u=s),e.openLinksInNewWindow&&(d=' target="¨E95Eblank"'),f+'"+l+""+u+h}},w=function(e,t){"use strict";return function(r,n,a){var o="mailto:";return n=n||"",a=i.subParser("unescapeSpecialChars")(a,e,t),e.encodeEmails?(o=i.helper.encodeEmailAddress(o+a),a=i.helper.encodeEmailAddress(a)):o+=a,n+''+a+""}};i.subParser("autoLinks",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("autoLinks.before",e,t,r)).replace(m,k(t))).replace(_,w(t,r)),e=r.converter._dispatch("autoLinks.after",e,t,r)}),i.subParser("simplifiedAutoLinks",function(e,t,r){"use strict";return t.simplifiedAutoLink?(e=r.converter._dispatch("simplifiedAutoLinks.before",e,t,r),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(g,k(t)):e.replace(p,k(t))).replace(b,w(t,r)),e=r.converter._dispatch("simplifiedAutoLinks.after",e,t,r)):e}),i.subParser("blockGamut",function(e,t,r){"use strict";return e=r.converter._dispatch("blockGamut.before",e,t,r),e=i.subParser("blockQuotes")(e,t,r),e=i.subParser("headers")(e,t,r),e=i.subParser("horizontalRule")(e,t,r),e=i.subParser("lists")(e,t,r),e=i.subParser("codeBlocks")(e,t,r),e=i.subParser("tables")(e,t,r),e=i.subParser("hashHTMLBlocks")(e,t,r),e=i.subParser("paragraphs")(e,t,r),e=r.converter._dispatch("blockGamut.after",e,t,r)}),i.subParser("blockQuotes",function(e,t,r){"use strict";e=r.converter._dispatch("blockQuotes.before",e,t,r),e+="\n\n";var n=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(n=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(n,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=i.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=i.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*[^\r]+?<\/pre>)/gm,function(e,t){var r=t;return r=(r=r.replace(/^ /gm,"¨0")).replace(/¨0/g,"")}),i.subParser("hashBlock")("\n"+e+"\n
",t,r)}),e=r.converter._dispatch("blockQuotes.after",e,t,r)}),i.subParser("codeBlocks",function(e,t,r){"use strict";e=r.converter._dispatch("codeBlocks.before",e,t,r);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(e,n,a){var o=n,s=a,c="\n";return o=i.subParser("outdent")(o,t,r),o=i.subParser("encodeCode")(o,t,r),o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(c=""),o=""+o+c+"
",i.subParser("hashBlock")(o,t,r)+s})).replace(/¨0/,""),e=r.converter._dispatch("codeBlocks.after",e,t,r)}),i.subParser("codeSpans",function(e,t,r){"use strict";return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,n,a,o){var s=o;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=n+""+(s=i.subParser("encodeCode")(s,t,r))+"
",s=i.subParser("hashHTMLSpans")(s,t,r)}),e=r.converter._dispatch("codeSpans.after",e,t,r)}),i.subParser("completeHTMLDocument",function(e,t,r){"use strict";if(!t.completeHTMLDocument)return e;e=r.converter._dispatch("completeHTMLDocument.before",e,t,r);var n="html",a="\n",i="",o='\n',s="",c="";for(var l in void 0!==r.metadata.parsed.doctype&&(a="\n","html"!==(n=r.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==n||(o='')),r.metadata.parsed)if(r.metadata.parsed.hasOwnProperty(l))switch(l.toLowerCase()){case"doctype":break;case"title":i=""+r.metadata.parsed.title+" \n";break;case"charset":o="html"===n||"html5"===n?'\n':'\n';break;case"language":case"lang":s=' lang="'+r.metadata.parsed[l]+'"',c+='\n';break;default:c+='\n'}return e=a+"\n\n"+i+o+c+"\n\n"+e.trim()+"\n\n",e=r.converter._dispatch("completeHTMLDocument.after",e,t,r)}),i.subParser("detab",function(e,t,r){"use strict";return e=(e=(e=(e=(e=(e=r.converter._dispatch("detab.before",e,t,r)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,function(e,t){for(var r=t,n=4-r.length%4,a=0;a/g,">"),e=r.converter._dispatch("encodeAmpsAndAngles.after",e,t,r)}),i.subParser("encodeBackslashEscapes",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,i.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)}),i.subParser("encodeCode",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeCode.after",e,t,r)}),i.subParser("escapeSpecialCharsWithinTagAttributes",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)})).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)}),e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)}),i.subParser("githubCodeBlocks",function(e,t,r){"use strict";return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,n,a,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=i.subParser("encodeCode")(o,t,r),o=""+(o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
",o=i.subParser("hashBlock")(o,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"})).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e}),i.subParser("hashBlock",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("hashBlock.before",e,t,r)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n",e=r.converter._dispatch("hashBlock.after",e,t,r)}),i.subParser("hashCodeTags",function(e,t,r){"use strict";e=r.converter._dispatch("hashCodeTags.before",e,t,r);return e=i.helper.replaceRecursiveRegExp(e,function(e,n,a,o){var s=a+i.subParser("encodeCode")(n,t,r)+o;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"},"]*>","
","gim"),e=r.converter._dispatch("hashCodeTags.after",e,t,r)}),i.subParser("hashElement",function(e,t,r){"use strict";return function(e,t){var n=t;return n=(n=(n=n.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),n="\n\n¨K"+(r.gHtmlBlocks.push(n)-1)+"K\n\n"}}),i.subParser("hashHTMLBlocks",function(e,t,r){"use strict";e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var n=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],a=function(e,t,n,a){var i=e;return-1!==n.search(/\bmarkdown\b/)&&(i=n+r.converter.makeHtml(t)+a),"\n\n¨K"+(r.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,t){return"<"+t+">"}));for(var o=0;o]*>)","im"),l="<"+n[o]+"\\b[^>]*>",u=""+n[o]+">";-1!==(s=i.helper.regexIndexOf(e,c));){var d=i.helper.splitAtIndex(e,s),f=i.helper.replaceRecursiveRegExp(d[1],a,l,u,"im");if(f===d[1])break;e=d[0].concat(f)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=(e=i.helper.replaceRecursiveRegExp(e,function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=r.converter._dispatch("hashHTMLBlocks.after",e,t,r)}),i.subParser("hashHTMLSpans",function(e,t,r){"use strict";function n(e){return"¨C"+(r.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=r.converter._dispatch("hashHTMLSpans.before",e,t,r)).replace(/<[^>]+?\/>/gi,function(e){return n(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<[^>]+?>/gi,function(e){return n(e)}),e=r.converter._dispatch("hashHTMLSpans.after",e,t,r)}),i.subParser("unhashHTMLSpans",function(e,t,r){"use strict";e=r.converter._dispatch("unhashHTMLSpans.before",e,t,r);for(var n=0;n]*>\\s*]*>","^ {0,3}
\\s*
","gim"),e=r.converter._dispatch("hashPreCodeTags.after",e,t,r)}),i.subParser("headers",function(e,t,r){"use strict";e=r.converter._dispatch("headers.before",e,t,r);var n=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),a=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,o=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(a,function(e,a){var o=i.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=""+o+" ";return i.subParser("hashBlock")(l,t,r)})).replace(o,function(e,a){var o=i.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=n+1,u=""+o+" ";return i.subParser("hashBlock")(u,t,r)});var s=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function c(e){var n,a;if(t.customizedHeaderId){var o=e.match(/\{([^{]+?)}\s*$/);o&&o[1]&&(e=o[1])}return n=e,a=i.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(n=a+n),n=t.ghCompatibleHeaderId?n.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?n.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():n.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(n=a+n),r.hashLinkCounts[n]?n=n+"-"+r.hashLinkCounts[n]++:r.hashLinkCounts[n]=1,n}return e=e.replace(s,function(e,a,o){var s=o;t.customizedHeaderId&&(s=o.replace(/\s?\{([^{]+?)}\s*$/,""));var l=i.subParser("spanGamut")(s,t,r),u=t.noHeaderId?"":' id="'+c(o)+'"',d=n-1+a.length,f=""+l+" ";return i.subParser("hashBlock")(f,t,r)}),e=r.converter._dispatch("headers.after",e,t,r)}),i.subParser("horizontalRule",function(e,t,r){"use strict";e=r.converter._dispatch("horizontalRule.before",e,t,r);var n=i.subParser("hashBlock")("
",t,r);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,n),e=r.converter._dispatch("horizontalRule.after",e,t,r)}),i.subParser("images",function(e,t,r){"use strict";function n(e,t,n,a,o,s,c,l){var u=r.gUrls,d=r.gTitles,f=r.gDimensions;if(n=n.toLowerCase(),l||(l=""),e.search(/\(\s*>? ?(['"].*['"])?\)$/m)>-1)a="";else if(""===a||null===a){if(""!==n&&null!==n||(n=t.toLowerCase().replace(/ ?\n/g," ")),a="#"+n,i.helper.isUndefined(u[n]))return e;a=u[n],i.helper.isUndefined(d[n])||(l=d[n]),i.helper.isUndefined(f[n])||(o=f[n].width,s=f[n].height)}t=t.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback);var h='"}return e=(e=(e=(e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?(data:.+?\/.+?;base64,[A-Za-z0-9+\/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function(e,t,r,a,i,o,s,c){return n(e,t,r,a=a.replace(/\s/g,""),i,o,0,c)})).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,n)).replace(/!\[([^\[\]]+)]()()()()()/g,n),e=r.converter._dispatch("images.after",e,t,r)}),i.subParser("italicsAndBold",function(e,t,r){"use strict";function n(e,t,r){return t+e+r}return e=r.converter._dispatch("italicsAndBold.before",e,t,r),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return n(t,"","")})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return n(t,"","")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,t){return n(t,"","")}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e}),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,t,r){return n(r,t+"","")})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,t,r){return n(r,t+"","")})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,t,r){return n(r,t+"","")}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e}),e=r.converter._dispatch("italicsAndBold.after",e,t,r)}),i.subParser("lists",function(e,t,r){"use strict";function n(e,n){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(a,function(e,n,a,s,c,l,u){u=u&&""!==u.trim();var d=i.subParser("outdent")(c,t,r),f="";return l&&t.tasklists&&(f=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e='"})),d=d.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(e){return"¨A"+e}),n||d.search(/\n{2,}/)>-1?(d=i.subParser("githubCodeBlocks")(d,t,r),d=i.subParser("blockGamut")(d,t,r)):(d=(d=i.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=i.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=o?i.subParser("paragraphs")(d,t,r):i.subParser("spanGamut")(d,t,r)),d=""+(d=d.replace("¨A",""))+" \n"})).replace(/¨0/g,""),r.gListLevel--,n&&(e=e.replace(/\s+$/,"")),e}function a(e,t){if("ol"===t){var r=e.match(/^ *(\d+)\./);if(r&&"1"!==r[1])return' start="'+r[1]+'"'}return""}function o(e,r,i){var o=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,c="ul"===r?o:s,l="";if(-1!==e.search(c))!function t(u){var d=u.search(c),f=a(e,r);-1!==d?(l+="\n\n<"+r+f+">\n"+n(u.slice(0,d),!!i)+""+r+">\n",c="ul"===(r="ul"===r?"ol":"ul")?o:s,t(u.slice(d))):l+="\n\n<"+r+f+">\n"+n(u,!!i)+""+r+">\n"}(e);else{var u=a(e,r);l="\n\n<"+r+u+">\n"+n(e,!!i)+""+r+">\n"}return l}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r){return o(t,r.search(/[*+-]/g)>-1?"ul":"ol",!0)}):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r,n){return o(r,n.search(/[*+-]/g)>-1?"ul":"ol",!1)})).replace(/¨0/,""),e=r.converter._dispatch("lists.after",e,t,r)}),i.subParser("metadata",function(e,t,r){"use strict";if(!t.metadata)return e;function n(e){r.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(e,t,n){return r.metadata.parsed[t]=n,""})}return e=(e=(e=(e=r.converter._dispatch("metadata.before",e,t,r)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(e,t,r){return n(r),"¨M"})).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(e,t,a){return t&&(r.metadata.format=t),n(a),"¨M"})).replace(/¨M/g,""),e=r.converter._dispatch("metadata.after",e,t,r)}),i.subParser("outdent",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("outdent.before",e,t,r)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),e=r.converter._dispatch("outdent.after",e,t,r)}),i.subParser("paragraphs",function(e,t,r){"use strict";for(var n=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),a=[],o=n.length,s=0;s=0?a.push(c):c.search(/\S/)>=0&&(c=(c=i.subParser("spanGamut")(c,t,r)).replace(/^([ \t]*)/g,""),c+="
",a.push(c))}for(o=a.length,s=0;s]*>\s*]*>/.test(u)&&(d=!0)}a[s]=u}return e=(e=(e=a.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)}),i.subParser("runExtension",function(e,t,r,n){"use strict";if(e.filter)t=e.filter(t,n.converter,r);else if(e.regex){var a=e.regex;a instanceof RegExp||(a=new RegExp(a,"g")),t=t.replace(a,e.replace)}return t}),i.subParser("spanGamut",function(e,t,r){"use strict";return e=r.converter._dispatch("spanGamut.before",e,t,r),e=i.subParser("codeSpans")(e,t,r),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=i.subParser("encodeBackslashEscapes")(e,t,r),e=i.subParser("images")(e,t,r),e=i.subParser("anchors")(e,t,r),e=i.subParser("autoLinks")(e,t,r),e=i.subParser("simplifiedAutoLinks")(e,t,r),e=i.subParser("emoji")(e,t,r),e=i.subParser("underline")(e,t,r),e=i.subParser("italicsAndBold")(e,t,r),e=i.subParser("strikethrough")(e,t,r),e=i.subParser("ellipsis")(e,t,r),e=i.subParser("hashHTMLSpans")(e,t,r),e=i.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=r.converter._dispatch("spanGamut.after",e,t,r)}),i.subParser("strikethrough",function(e,t,r){"use strict";return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,n){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(n)}),e=r.converter._dispatch("strikethrough.after",e,t,r)),e}),i.subParser("stripLinkDefinitions",function(e,t,r){"use strict";var n=function(e,n,a,o,s,c,l){return n=n.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?r.gUrls[n]=a.replace(/\s/g,""):r.gUrls[n]=i.subParser("encodeAmpsAndAngles")(a,t,r),c?c+l:(l&&(r.gTitles[n]=l.replace(/"|'/g,""")),t.parseImgDimensions&&o&&s&&(r.gDimensions[n]={width:o,height:s}),"")};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+\/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,n)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,n)).replace(/¨0/,"")}),i.subParser("tables",function(e,t,r){"use strict";if(!t.tables)return e;function n(e,n){return""+i.subParser("spanGamut")(e,t,r)+" \n"}function a(e){var a,o=e.split("\n");for(a=0;a"+(c=i.subParser("spanGamut")(c,t,r))+"\n"));for(a=0;a\n\n\n",a=0;a\n";for(var i=0;i\n"}return r+=" \n\n"}(p,m)}return e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,i.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,a)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,a),e=r.converter._dispatch("tables.after",e,t,r)}),i.subParser("underline",function(e,t,r){"use strict";return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return""+t+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return""+t+""}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/(_)/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e}),i.subParser("unescapeSpecialChars",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("unescapeSpecialChars.before",e,t,r)).replace(/¨E(\d+)E/g,function(e,t){var r=parseInt(t);return String.fromCharCode(r)}),e=r.converter._dispatch("unescapeSpecialChars.after",e,t,r)}),i.subParser("makeMarkdown.blockquote",function(e,t){"use strict";var r="";if(e.hasChildNodes())for(var n=e.childNodes,a=n.length,o=0;o ")}),i.subParser("makeMarkdown.codeBlock",function(e,t){"use strict";var r=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+r+"\n"+t.preList[n]+"\n```"}),i.subParser("makeMarkdown.codeSpan",function(e){"use strict";return"`"+e.innerHTML+"`"}),i.subParser("makeMarkdown.emphasis",function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="*";for(var n=e.childNodes,a=n.length,o=0;o",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),i.subParser("makeMarkdown.links",function(e,t){"use strict";var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,a=n.length;r="[";for(var o=0;o",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r}),i.subParser("makeMarkdown.list",function(e,t,r){"use strict";var n="";if(!e.hasChildNodes())return"";for(var a=e.childNodes,o=a.length,s=e.getAttribute("start")||1,c=0;c"+t.preList[r]+""}),i.subParser("makeMarkdown.strikethrough",function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="~~";for(var n=e.childNodes,a=n.length,o=0;otr>th"),c=e.querySelectorAll("tbody>tr");for(r=0;rp&&(p=g)}for(r=0;r/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")});void 0===(n=function(){"use strict";return i}.call(t,r,t,e))||(e.exports=n)}).call(this)},19:function(e,t,r){"use strict";var n=r(33);function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"REMOVE_BLOCK_TYPES":return-1!==r.names.indexOf(t)?null:t;case e:return r.name||null}return t}}var h=f("SET_DEFAULT_BLOCK_NAME"),p=f("SET_FREEFORM_FALLBACK_BLOCK_NAME"),g=f("SET_UNREGISTERED_FALLBACK_BLOCK_NAME");var m=Object(i.combineReducers)({blockTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return Object(c.a)({},e,Object(l.keyBy)(Object(l.map)(t.blockTypes,function(e){return Object(l.omit)(e,"styles ")}),"name"));case"REMOVE_BLOCK_TYPES":return Object(l.omit)(e,t.names)}return e},blockStyles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return Object(c.a)({},e,Object(l.mapValues)(Object(l.keyBy)(t.blockTypes,"name"),function(t){return Object(l.uniqBy)(Object(s.a)(Object(l.get)(t,["styles"],[])).concat(Object(s.a)(Object(l.get)(e,[t.name],[]))),function(e){return e.name})}));case"ADD_BLOCK_STYLES":return Object(c.a)({},e,Object(o.a)({},t.blockName,Object(l.uniqBy)(Object(s.a)(Object(l.get)(e,[t.blockName],[])).concat(Object(s.a)(t.styles)),function(e){return e.name})));case"REMOVE_BLOCK_STYLES":return Object(c.a)({},e,Object(o.a)({},t.blockName,Object(l.filter)(Object(l.get)(e,[t.blockName],[]),function(e){return-1===t.styleNames.indexOf(e.name)})))}return e},defaultBlockName:h,freeformFallbackBlockName:p,unregisteredFallbackBlockName:g,categories:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CATEGORIES":return t.categories||[];case"UPDATE_CATEGORY":if(!t.category||Object(l.isEmpty)(t.category))return e;if(Object(l.find)(e,["slug",t.slug]))return Object(l.map)(e,function(e){return e.slug===t.slug?Object(c.a)({},e,t.category):e})}return e}}),b=r(31),_=Object(b.a)(function(e){return Object.values(e.blockTypes)},function(e){return[e.blockTypes]});function k(e,t){return e.blockTypes[t]}function w(e,t){return e.blockStyles[t]}function v(e){return e.categories}function y(e){return e.defaultBlockName}function j(e){return e.freeformFallbackBlockName}function O(e){return e.unregisteredFallbackBlockName}var x=Object(b.a)(function(e,t){return Object(l.map)(Object(l.filter)(e.blockTypes,function(e){return Object(l.includes)(e.parent,t)}),function(e){return e.name})},function(e){return[e.blockTypes]}),C=function(e,t,r,n){var a="string"==typeof t?k(e,t):t;return Object(l.get)(a,["supports",r],n)};function A(e,t,r,n){return!!C(e,t,r,n)}var S=function(e,t){return x(e,t).length>0},T=function(e,t){return Object(l.some)(x(e,t),function(t){return A(e,t,"inserter",!0)})};function E(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Object(l.castArray)(e)}}function P(e){return{type:"REMOVE_BLOCK_TYPES",names:Object(l.castArray)(e)}}function M(e,t){return{type:"ADD_BLOCK_STYLES",styles:Object(l.castArray)(t),blockName:e}}function N(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Object(l.castArray)(t),blockName:e}}function B(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function L(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function z(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function H(e){return{type:"SET_CATEGORIES",categories:e}}function D(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}Object(i.registerStore)("core/blocks",{reducer:m,selectors:n,actions:a});var I=r(57),V=r.n(I),R=r(23),F=r(45),q=r.n(F),$=r(0),U=["#191e23","#f8f9f9"];function G(e){var t=ie();if(e.name!==t)return!1;G.block&&G.block.name===t||(G.block=me(t));var r=G.block,n=oe(t);return Object(l.every)(n.attributes,function(t,n){return r.attributes[n]===e.attributes[n]})}function W(e){return!!e&&(Object(l.isString)(e)||Object($.isValidElement)(e)||Object(l.isFunction)(e)||e instanceof $.Component)}function K(e){if(e||(e="block-default"),W(e))return{src:e};if(Object(l.has)(e,["background"])){var t=q()(e.background);return Object(c.a)({},e,{foreground:e.foreground?e.foreground:Object(F.mostReadable)(t,U,{includeFallbackColors:!0,level:"AA",size:"large"}).toHexString(),shadowColor:t.setAlpha(.3).toRgbString()})}return e}function Y(e){return Object(l.isString)(e)?oe(e):e}var Z={};function Q(e){Z=e}function X(e,t){if(t=Object(c.a)({name:e},Object(l.get)(Z,e),t),"string"==typeof e)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(e))if(Object(i.select)("core/blocks").getBlockType(e))console.error('Block "'+e+'" is already registered.');else if((t=Object(R.applyFilters)("blocks.registerBlockType",t,e))&&Object(l.isFunction)(t.save))if("edit"in t&&!Object(l.isFunction)(t.edit))console.error('The "edit" property must be a valid function.');else if("keywords"in t&&t.keywords.length>3)console.error('The block "'+e+'" can have a maximum of 3 keywords.');else if("category"in t)if("category"in t&&!Object(l.some)(Object(i.select)("core/blocks").getCategories(),{slug:t.category}))console.error('The block "'+e+'" must have a registered category.');else if("title"in t&&""!==t.title)if("string"==typeof t.title){if(t.icon=K(t.icon),W(t.icon.src))return Object(i.dispatch)("core/blocks").addBlockTypes(t),t;console.error("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://wordpress.org/gutenberg/handbook/block-api/#icon-optional")}else console.error("Block titles must be strings.");else console.error('The block "'+e+'" must have a title.');else console.error('The block "'+e+'" must have a category.');else console.error('The "save" property must be specified and must be a valid function.');else console.error("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");else console.error("Block names must be strings.")}function J(e){var t=Object(i.select)("core/blocks").getBlockType(e);if(t)return Object(i.dispatch)("core/blocks").removeBlockTypes(e),t;console.error('Block "'+e+'" is not registered.')}function ee(e){Object(i.dispatch)("core/blocks").setFreeformFallbackBlockName(e)}function te(){return Object(i.select)("core/blocks").getFreeformFallbackBlockName()}function re(e){Object(i.dispatch)("core/blocks").setUnregisteredFallbackBlockName(e)}function ne(){return Object(i.select)("core/blocks").getUnregisteredFallbackBlockName()}function ae(e){Object(i.dispatch)("core/blocks").setDefaultBlockName(e)}function ie(){return Object(i.select)("core/blocks").getDefaultBlockName()}function oe(e){return Object(i.select)("core/blocks").getBlockType(e)}function se(){return Object(i.select)("core/blocks").getBlockTypes()}function ce(e,t,r){return Object(i.select)("core/blocks").getBlockSupport(e,t,r)}function le(e,t,r){return Object(i.select)("core/blocks").hasBlockSupport(e,t,r)}function ue(e){return"core/block"===e.name}var de=function(e){return Object(i.select)("core/blocks").getChildBlockNames(e)},fe=function(e){return Object(i.select)("core/blocks").hasChildBlocks(e)},he=function(e){return Object(i.select)("core/blocks").hasChildBlocksWithInserterSupport(e)},pe=function(e,t){Object(i.dispatch)("core/blocks").addBlockStyles(e,t)},ge=function(e,t){Object(i.dispatch)("core/blocks").removeBlockStyles(e,t)};function me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=oe(e),a=Object(l.reduce)(n.attributes,function(e,r,n){var a=t[n];return void 0!==a?e[n]=a:r.hasOwnProperty("default")&&(e[n]=r.default),-1!==["node","children"].indexOf(r.source)&&("string"==typeof e[n]?e[n]=[e[n]]:Array.isArray(e[n])||(e[n]=[])),e},{});return{clientId:V()(),name:e,isValid:!0,attributes:a,innerBlocks:r}}function be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=V()();return Object(c.a)({},e,{clientId:n,attributes:Object(c.a)({},e.attributes,t),innerBlocks:r||e.innerBlocks.map(function(e){return be(e)})})}var _e=function(e,t,r){if(Object(l.isEmpty)(r))return!1;if(!(!(r.length>1)||e.isMultiBlock))return!1;if(!("block"===e.type))return!1;var n=Object(l.first)(r);if(!("from"!==t||-1!==e.blocks.indexOf(n.name)))return!1;if(Object(l.isFunction)(e.isMatch)){var a=e.isMultiBlock?r.map(function(e){return e.attributes}):n.attributes;if(!e.isMatch(a))return!1}return!0},ke=function(e){if(Object(l.isEmpty)(e))return[];var t=se();return Object(l.filter)(t,function(t){return!!ye(je("from",t.name),function(t){return _e(t,"from",e)})})},we=function(e){if(Object(l.isEmpty)(e))return[];var t=je("to",oe(Object(l.first)(e).name).name),r=Object(l.filter)(t,function(t){return _e(t,"to",e)});return Object(l.flatMap)(r,function(e){return e.blocks}).map(function(e){return oe(e)})};function ve(e){if(Object(l.isEmpty)(e))return[];var t=Object(l.first)(e);if(e.length>1&&!Object(l.every)(e,{name:t.name}))return[];var r=ke(e),n=we(e);return Object(l.uniq)(Object(s.a)(r).concat(Object(s.a)(n)))}function ye(e,t){for(var r=Object(R.createHooks)(),n=function(n){var a=e[n];t(a)&&r.addFilter("transform","transform/"+n.toString(),function(e){return e||a},a.priority)},a=0;a1,a=r[0],i=a.name;if(n&&!Object(l.every)(r,function(e){return e.name===i}))return null;var o,s=je("from",t),u=ye(je("to",i),function(e){return"block"===e.type&&-1!==e.blocks.indexOf(t)&&(!n||e.isMultiBlock)})||ye(s,function(e){return"block"===e.type&&-1!==e.blocks.indexOf(i)&&(!n||e.isMultiBlock)});if(!u)return null;if(o=u.isMultiBlock?u.transform(r.map(function(e){return e.attributes})):u.transform(a.attributes),!Object(l.isObjectLike)(o))return null;if((o=Object(l.castArray)(o)).some(function(e){return!oe(e.name)}))return null;var d=Object(l.findIndex)(o,function(e){return e.name===t});return d<0?null:o.map(function(t,r){var n=Object(c.a)({},t,{clientId:r===d?a.clientId:t.clientId});return Object(R.applyFilters)("blocks.switchToBlockType.transformedBlock",n,e)})}var xe=r(25);var Ce,Ae=function(){return Ce||(Ce=document.implementation.createHTMLDocument("")),Ce};function Se(e,t){if(t){if("string"==typeof e){var r=Ae();r.body.innerHTML=e,e=r.body}if("function"==typeof t)return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(r,n){return r[n]=Se(e,t[n]),r},{})}}function Te(e,t){return 1===arguments.length&&(t=e,e=void 0),function(r){var n=r;if(e&&(n=r.querySelector(e)),n)return function(e,t){for(var r,n=t.split(".");r=n.shift();){if(!(r in e))return;e=e[r]}return e}(n,t)}}var Ee=r(58),Pe=r(183),Me=r(35),Ne=r(33),Be=r(36);var Le=r(10),ze=r(9),He=/[\t\n\f ]/,De=/[A-Za-z]/,Ie=/\r\n?/g;function Ve(e){return He.test(e)}function Re(e){return De.test(e)}function Fe(e,t){if(!e)throw new Error((t||"value")+" was null");return e}var qe=function(){function e(e,t){this.delegate=e,this.entityParser=t,this.state=null,this.input=null,this.index=-1,this.tagLine=-1,this.tagColumn=-1,this.line=-1,this.column=-1,this.states={beforeData:function(){"<"===this.peek()?(this.state="tagOpen",this.markTagStart(),this.consume()):(this.state="data",this.delegate.beginData())},data:function(){var e=this.peek();"<"===e?(this.delegate.finishData(),this.state="tagOpen",this.markTagStart(),this.consume()):"&"===e?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e))},tagOpen:function(){var e=this.consume();"!"===e?this.state="markupDeclaration":"/"===e?this.state="endTagOpen":Re(e)&&(this.state="tagName",this.delegate.beginStartTag(),this.delegate.appendToTagName(e.toLowerCase()))},markupDeclaration:function(){"-"===this.consume()&&"-"===this.input.charAt(this.index)&&(this.consume(),this.state="commentStart",this.delegate.beginComment())},commentStart:function(){var e=this.consume();"-"===e?this.state="commentStartDash":">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData(e),this.state="comment")},commentStartDash:function(){var e=this.consume();"-"===e?this.state="commentEnd":">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("-"),this.state="comment")},comment:function(){var e=this.consume();"-"===e?this.state="commentEndDash":this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.state="commentEnd":(this.delegate.appendToCommentData("-"+e),this.state="comment")},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("--"+e),this.state="comment")},tagName:function(){var e=this.consume();Ve(e)?this.state="beforeAttributeName":"/"===e?this.state="selfClosingStartTag":">"===e?(this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();Ve(e)?this.consume():"/"===e?(this.state="selfClosingStartTag",this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.state="attributeName",this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.state="attributeName",this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();Ve(e)?(this.state="afterAttributeName",this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===e?(this.state="beforeAttributeValue",this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();Ve(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===e?(this.consume(),this.state="beforeAttributeValue"):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="attributeName",this.delegate.beginAttribute(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();Ve(e)?this.consume():'"'===e?(this.state="attributeValueDoubleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.state="attributeValueSingleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeValueUnquoted",this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef('"')||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef("'")||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();Ve(e)?(this.delegate.finishAttributeValue(),this.consume(),this.state="beforeAttributeName"):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef(">")||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();Ve(e)?(this.consume(),this.state="beforeAttributeName"):"/"===e?(this.consume(),this.state="selfClosingStartTag"):">"===e?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},endTagOpen:function(){var e=this.consume();Re(e)&&(this.state="tagName",this.delegate.beginEndTag(),this.delegate.appendToTagName(e.toLowerCase()))}},this.reset()}return e.prototype.reset=function(){this.state="beforeData",this.input="",this.index=0,this.line=1,this.column=0,this.tagLine=-1,this.tagColumn=-1,this.delegate.reset()},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(Ie,"\n")}(e);this.index2&&void 0!==arguments[2]?arguments[2]:[],n=Y(e),a=n.save;if(a.prototype instanceof $.Component){var i=new a({attributes:t});a=i.render.bind(i)}var o=a({attributes:t,innerBlocks:r});if(Object(l.isObject)(o)&&Object(R.hasFilter)("blocks.getSaveContent.extraProps")){var s=Object(R.applyFilters)("blocks.getSaveContent.extraProps",Object(c.a)({},o.props),n,t);We()(s,o.props)||(o=Object($.cloneElement)(o,s))}return o=Object(R.applyFilters)("blocks.getSaveElement",o,n,t),Object($.createElement)(et,{innerBlocks:r},o)}function at(e,t,r){var n=Y(e);return Object($.renderToString)(nt(n,t,r))}function it(e){var t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=at(e.name,e.attributes,e.innerBlocks)}catch(e){}return t}function ot(e,t,r){var n=Object(l.isEmpty)(t)?"":function(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(t)+" ",a=Object(l.startsWith)(e,"core/")?e.slice(5):e;return r?"\x3c!-- wp:".concat(a," ").concat(n,"--\x3e\n")+r+"\n\x3c!-- /wp:".concat(a," --\x3e"):"\x3c!-- wp:".concat(a," ").concat(n,"/--\x3e")}function st(e){var t=e.name,r=it(e);switch(t){case te():case ne():return r;default:return ot(t,function(e,t){return Object(l.reduce)(e.attributes,function(e,r,n){var a=t[n];return void 0===a?e:void 0!==r.source?e:"default"in r&&r.default===a?e:(e[n]=a,e)},{})}(oe(t),e.attributes),r)}}function ct(e){return Object(l.castArray)(e).map(st).join("\n\n")}var lt=/[\t\n\r\v\f ]+/g,ut=/^[\t\n\r\v\f ]*$/,dt=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,ft=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],ht=ft.concat(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),pt=[l.identity,function(e){return bt(e).join(" ")}],gt=function(){function e(){Object(Le.a)(this,e)}return Object(ze.a)(e,[{key:"parse",value:function(e){return Object(Ue.decodeEntities)("&"+e+";")}}]),e}(),mt=function(){function e(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{},n=Y(e),a=Object(l.mapValues)(n.attributes,function(e,n){return function(e,t,r,n){var a,i=t.type;switch(t.source){case void 0:a=n?n[e]:void 0;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":a=Ft(r,t)}return void 0===i||Vt(a,Object(l.castArray)(i))||(a=void 0),void 0===a?t.default:a}(n,e,t,r)});return Object(R.applyFilters)("blocks.getBlockAttributes",a,n,t,r)}function $t(e){var t=e.blockName,r=e.attrs,n=e.innerBlocks,a=void 0===n?[]:n,i=e.innerHTML,o=te(),s=ne()||o;r=r||{},i=i.trim();var u=t||o;"core/cover-image"===u&&(u="core/cover"),"core/text"!==u&&"core/cover-text"!==u||(u="core/paragraph"),u===o&&(i=Object(Ee.autop)(i).trim());var d=oe(u);if(!d){var f=i;u&&(i=ot(u,r,i)),r={originalName:t,originalUndelimitedContent:f},d=oe(u=s)}a=a.map($t);var h=u===o||u===s;if(d&&(i||!h)){var p=me(u,qt(d,i,r),a);return h||(p.isValid=At(d,p.attributes,i)),p.originalContent=i,p=function(e){var t=oe(e.name),r=t.deprecated;if(!r||!r.length)return e;for(var n=e,a=n.originalContent,i=n.attributes,o=n.innerBlocks,s=0;s1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,function e(t,r,n,a){Array.from(t).forEach(function(t){e(t.childNodes,r,n,a),r.forEach(function(e){n.contains(t)&&e(t,n,a)})})}(n.body.childNodes,t,n,r),n.body.innerHTML}function ar(e,t,r){var n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,function e(t,r,n,a){Array.from(t).forEach(function(t){var i=t.nodeName.toLowerCase();if(!n.hasOwnProperty(i)||n[i].isMatch&&!n[i].isMatch(t))e(t.childNodes,r,n,a),a&&!Qt(t)&&t.nextElementSibling&&Object(Kt.insertAfter)(r.createElement("br"),t),Object(Kt.unwrap)(t);else if(t.nodeType===Jt){var o=n[i],s=o.attributes,c=void 0===s?[]:s,u=o.classes,d=void 0===u?[]:u,f=o.children,h=o.require,p=void 0===h?[]:h;if(rr(t)&&f)return void Object(Kt.remove)(t);if(t.hasAttributes()&&(Array.from(t.attributes).forEach(function(e){var r=e.name;"class"===r||Object(l.includes)(c,r)||t.removeAttribute(r)}),t.classList.length)){var g=d.map(function(e){return"string"==typeof e?function(t){return t===e}:e instanceof RegExp?function(t){return e.test(t)}:l.noop});Array.from(t.classList).forEach(function(e){g.some(function(t){return t(e)})||t.classList.remove(e)}),t.classList.length||t.removeAttribute("class")}if(t.hasChildNodes()){if("*"===f)return;if(f)p.length&&!t.querySelector(p.join(","))&&(e(t.childNodes,r,n,a),Object(Kt.unwrap)(t)),e(t.childNodes,r,f,a);else for(;t.firstChild;)Object(Kt.remove)(t.firstChild)}}})}(n.body.childNodes,n,t,r),n.body.innerHTML}var ir=window.Node,or=ir.ELEMENT_NODE,sr=ir.TEXT_NODE,cr=function(e){var t=document.implementation.createHTMLDocument(""),r=document.implementation.createHTMLDocument(""),n=t.body,a=r.body;for(n.innerHTML=e;n.firstChild;){var i=n.firstChild;i.nodeType===sr?i.nodeValue.trim()?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(i)):n.removeChild(i):i.nodeType===or?"BR"===i.nodeName?(i.nextSibling&&"BR"===i.nextSibling.nodeName&&(a.appendChild(r.createElement("P")),n.removeChild(i.nextSibling)),a.lastChild&&"P"===a.lastChild.nodeName&&a.lastChild.hasChildNodes()?a.lastChild.appendChild(i):n.removeChild(i)):"P"===i.nodeName?rr(i)?n.removeChild(i):a.appendChild(i):Qt(i)?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(i)):a.appendChild(i):n.removeChild(i)}return a.innerHTML},lr=window.Node.COMMENT_NODE,ur=function(e,t){if(e.nodeType===lr)if("nextpage"!==e.nodeValue){if(0===e.nodeValue.indexOf("more")){for(var r=e.nodeValue.slice(4).trim(),n=e,a=!1;n=n.nextSibling;)if(n.nodeType===lr&&"noteaser"===n.nodeValue){a=!0,Object(Kt.remove)(n);break}Object(Kt.replace)(e,function(e,t,r){var n=r.createElement("wp-block");n.dataset.block="core/more",e&&(n.dataset.customText=e);t&&(n.dataset.noTeaser="");return n}(r,a,t))}}else Object(Kt.replace)(e,function(e){var t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t))};function dr(e,t){return e.every(function(e){return function(e,t){if(Qt(e))return!0;if(!t)return!1;var r=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(function(e){return 0===Object(l.difference)([r,t],e).length})}(e,t)&&dr(Array.from(e.children),t)})}function fr(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}var hr=function(e,t){var r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;var n=Array.from(r.body.children);return!n.some(fr)&&dr(n,t)};var pr=function(e,t,r){if("SPAN"===e.nodeName){var n=e.style,a=n.fontWeight,i=n.fontStyle,o=n.textDecorationLine,s=n.verticalAlign;"bold"!==a&&"700"!==a||Object(Kt.wrap)(t.createElement("strong"),e),"italic"===i&&Object(Kt.wrap)(t.createElement("em"),e),"line-through"===o&&Object(Kt.wrap)(t.createElement("del"),e),"super"===s?Object(Kt.wrap)(t.createElement("sup"),e):"sub"===s&&Object(Kt.wrap)(t.createElement("sub"),e)}else"B"===e.nodeName?e=Object(Kt.replaceTag)(e,"strong"):"I"===e.nodeName?e=Object(Kt.replaceTag)(e,"em"):"A"===e.nodeName&&("_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")));Qt(e)&&e.hasChildNodes()&&Array.from(e.childNodes).some(function(e){return function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).hasOwnProperty(e.nodeName.toLowerCase())}(e,r)})&&Object(Kt.unwrap)(e)},gr=function(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)},mr=window.parseInt;function br(e){return"OL"===e.nodeName||"UL"===e.nodeName}var _r=function(e,t){if("P"===e.nodeName){var r=e.getAttribute("style");if(r&&-1!==r.indexOf("mso-list")){var n=/mso-list\s*:[^;]+level([0-9]+)/i.exec(r);if(n){var a=mr(n[1],10)-1||0,i=e.previousElementSibling;if(!i||!br(i)){var o=e.textContent.trim().slice(0,1),s=/[1iIaA]/.test(o),c=t.createElement(s?"ol":"ul");s&&c.setAttribute("type",o),e.parentNode.insertBefore(c,e)}var l=e.previousElementSibling,u=l.nodeName,d=t.createElement("li"),f=l;for(e.removeChild(e.firstElementChild);e.firstChild;)d.appendChild(e.firstChild);for(;a--;)br(f=f.lastElementChild||f)&&(f=f.lastElementChild||f);br(f)||(f=f.appendChild(t.createElement(u))),f.appendChild(d),e.parentNode.removeChild(e)}}}};function kr(e){return"OL"===e.nodeName||"UL"===e.nodeName}var wr=function(e){if(kr(e)){var t=e,r=e.previousElementSibling;if(r&&r.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode.removeChild(t)}var n,a=e.parentNode;if(a&&"LI"===a.nodeName&&1===a.children.length&&!/\S/.test((n=a,Object(s.a)(n.childNodes).map(function(e){var t=e.nodeValue;return void 0===t?"":t}).join("")))){var i=a,o=i.previousElementSibling,c=i.parentNode;o?(o.appendChild(t),c.removeChild(i)):(c.parentNode.insertBefore(t,c),c.parentNode.removeChild(c))}if(a&&kr(a)){var l=e.previousElementSibling;l?l.appendChild(e):Object(Kt.unwrap)(e)}}},vr=r(32),yr=window,jr=yr.atob,Or=yr.File,xr=function(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){var t,r=e.src.split(","),n=Object(xe.a)(r,2),a=n[0],i=n[1],o=a.slice(5).split(";"),s=Object(xe.a)(o,1)[0];if(!i||!s)return void(e.src="");try{t=jr(i)}catch(t){return void(e.src="")}for(var c=new Uint8Array(t.length),l=0;l1&&void 0!==arguments[1]?arguments[1]:0,n=ye(je("from"),function(e){return"shortcode"===e.type&&Object(l.some)(Object(l.castArray)(e.tag),function(e){return Object(Sr.regexp)(e).test(t)})});if(!n)return[t];var a,i=Object(l.castArray)(n.tag),o=Object(l.first)(i);if(a=Object(Sr.next)(o,t,r)){var u=t.substr(0,a.index);if(r=a.index+a.content.length,!Object(l.includes)(a.shortcode.content||"","<")&&!/(\n|)\s*$/.test(u))return e(t,r);var d=Object(l.mapValues)(Object(l.pickBy)(n.attributes,function(e){return e.shortcode}),function(e){return e.shortcode(a.shortcode.attrs,a)});return[u,me(n.blockName,qt(Object(c.a)({},oe(n.blockName),{attributes:n.attributes}),a.shortcode.content,d))].concat(Object(s.a)(e(t.substr(r))))}return[t]},Er=r(184),Pr=new(r.n(Er).a.Converter)({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});var Mr=function(e){return Pr.makeHtml(function(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,function(e,t,r,n){return"".concat(t,"\n").concat(r,"\n").concat(n)})}(e))},Nr=function(e){"IFRAME"===e.nodeName&&Object(Kt.remove)(e)},Br=window.console;function Lr(e){return e=ar(e=nr(e,[pr]),Zt(),{inline:!0}),Br.log("Processed inline HTML:\n\n",e),e}function zr(){return Object(l.filter)(je("from"),{type:"raw"}).map(function(e){return e.isMatch?e:Object(c.a)({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})})}function Hr(e){var t=e.html,r=e.rawTransforms,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=t,Array.from(n.body.children).map(function(e){var t=ye(r,function(t){return(0,t.isMatch)(e)});if(!t)return me("core/html",qt("core/html",e.outerHTML));var n=t.transform,a=t.blockName;return n?n(e):me(a,qt(a,e.outerHTML))})}function Dr(e){var t=e.HTML,r=void 0===t?"":t,n=e.plainText,a=void 0===n?"":n,i=e.mode,o=void 0===i?"AUTO":i,s=e.tagName,u=e.canUserUseUnfilteredHTML,d=void 0!==u&&u;if(r=r.replace(/]+>/,""),"INLINE"!==o&&-1!==r.indexOf("\x3c!-- wp:"))return Gt(r);if(String.prototype.normalize&&(r=r.normalize()),!a||r&&!function(e){return!/<(?!br[ \/>])/i.test(e)}(r)||(r=Mr(a),"AUTO"===o&&-1===a.indexOf("\n")&&0!==a.indexOf("
")&&0===r.indexOf("
")&&(o="INLINE")),"INLINE"===o)return Lr(r);var f=Tr(r),h=f.length>1;if("AUTO"===o&&!h&&hr(r,s))return Lr(r);var p=zr(),g=Zt(),m=tr(p),b=Object(l.compact)(Object(l.flatMap)(f,function(e){if("string"!=typeof e)return e;var t=[_r,gr,wr,xr,pr,ur,Ar,Cr];d||t.unshift(Nr);var r=Object(c.a)({},m,g);return e=ar(e=nr(e,t,m),r),e=cr(e),Br.log("Processed HTML piece:\n\n",e),Hr({html:e,rawTransforms:p})}));if("AUTO"===o&&1===b.length){var _=a.trim();if(""!==_&&-1===_.indexOf("\n"))return ar(it(b[0]),g)}return b}function Ir(e){var t=e.HTML,r=void 0===t?"":t;if(-1!==r.indexOf("\x3c!-- wp:"))return Gt(r);var n=Tr(r),a=zr(),i=tr(a);return Object(l.compact)(Object(l.flatMap)(n,function(e){return"string"!=typeof e?e:(e=nr(e,[wr,ur,Ar,Cr],i),Hr({html:e=cr(e),rawTransforms:a}))}))}function Vr(){return Object(i.select)("core/blocks").getCategories()}function Rr(e){Object(i.dispatch)("core/blocks").setCategories(e)}function Fr(e,t){Object(i.dispatch)("core/blocks").updateCategory(e,t)}function qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&Object(l.every)(t,function(t,r){var n=Object(xe.a)(t,3),a=n[0],i=n[2],o=e[r];return a===o.name&&qr(o.innerBlocks,i)})}function $r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?Object(l.map)(t,function(t,r){var n=Object(xe.a)(t,3),a=n[0],i=n[1],o=n[2],s=e[r];if(s&&s.name===a){var u=$r(s.innerBlocks,o);return Object(c.a)({},s,{innerBlocks:u})}var d=oe(a),f=function(e,t){return Object(l.mapValues)(t,function(t,r){return h(e[r],t)})},h=function(e,t){return r=e,"html"===Object(l.get)(r,["source"])&&Object(l.isArray)(t)?Object($.renderToString)(t):function(e){return"query"===Object(l.get)(e,["source"])}(e)&&t?t.map(function(t){return f(e.query,t)}):t;var r};return me(a,f(Object(l.get)(d,["attributes"],{}),i),$r([],o))}):e}r.d(t,"createBlock",function(){return me}),r.d(t,"cloneBlock",function(){return be}),r.d(t,"getPossibleBlockTransformations",function(){return ve}),r.d(t,"switchToBlockType",function(){return Oe}),r.d(t,"getBlockTransforms",function(){return je}),r.d(t,"findTransform",function(){return ye}),r.d(t,"parse",function(){return Wt}),r.d(t,"getBlockAttributes",function(){return qt}),r.d(t,"parseWithAttributeSchema",function(){return Ft}),r.d(t,"pasteHandler",function(){return Dr}),r.d(t,"rawHandler",function(){return Ir}),r.d(t,"getPhrasingContentSchema",function(){return Zt}),r.d(t,"serialize",function(){return ct}),r.d(t,"getBlockContent",function(){return it}),r.d(t,"getBlockDefaultClassName",function(){return tt}),r.d(t,"getBlockMenuDefaultClassName",function(){return rt}),r.d(t,"getSaveElement",function(){return nt}),r.d(t,"getSaveContent",function(){return at}),r.d(t,"isValidBlockContent",function(){return At}),r.d(t,"getCategories",function(){return Vr}),r.d(t,"setCategories",function(){return Rr}),r.d(t,"updateCategory",function(){return Fr}),r.d(t,"registerBlockType",function(){return X}),r.d(t,"unregisterBlockType",function(){return J}),r.d(t,"setFreeformContentHandlerName",function(){return ee}),r.d(t,"getFreeformContentHandlerName",function(){return te}),r.d(t,"setUnregisteredTypeHandlerName",function(){return re}),r.d(t,"getUnregisteredTypeHandlerName",function(){return ne}),r.d(t,"setDefaultBlockName",function(){return ae}),r.d(t,"getDefaultBlockName",function(){return ie}),r.d(t,"getBlockType",function(){return oe}),r.d(t,"getBlockTypes",function(){return se}),r.d(t,"getBlockSupport",function(){return ce}),r.d(t,"hasBlockSupport",function(){return le}),r.d(t,"isReusableBlock",function(){return ue}),r.d(t,"getChildBlockNames",function(){return de}),r.d(t,"hasChildBlocks",function(){return fe}),r.d(t,"hasChildBlocksWithInserterSupport",function(){return he}),r.d(t,"unstable__bootstrapServerSideBlockDefinitions",function(){return Q}),r.d(t,"registerBlockStyle",function(){return pe}),r.d(t,"unregisterBlockStyle",function(){return ge}),r.d(t,"isUnmodifiedDefaultBlock",function(){return G}),r.d(t,"normalizeIconObject",function(){return K}),r.d(t,"isValidIcon",function(){return W}),r.d(t,"doBlocksMatchTemplate",function(){return qr}),r.d(t,"synchronizeBlocksWithTemplate",function(){return $r}),r.d(t,"children",function(){return Pt}),r.d(t,"node",function(){return Dt}),r.d(t,"withBlockContentContext",function(){return Je})},31:function(e,t,r){"use strict";var n,a;function i(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function s(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=N(e,360),t=N(t,100),r=N(r,100),0===t)n=a=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;n=o(c,s,e+1/3),a=o(c,s,e),i=o(c,s,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,n,c),d=!0,f="hsl"),e.hasOwnProperty("a")&&(r=e.a));var h,p,g;return r=M(r),{ok:d,format:e.format||f,r:l(255,u(t.r,0)),g:l(255,u(t.g,0)),b:l(255,u(t.b,0)),a:r}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=c(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=r.ok,this._tc_id=s++}function h(e,t,r){e=N(e,255),t=N(t,255),r=N(r,255);var n,a,i=u(e,t,r),o=l(e,t,r),s=(i+o)/2;if(i==o)n=a=0;else{var c=i-o;switch(a=s>.5?c/(2-i-o):c/(i+o),i){case e:n=(t-r)/c+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(f(n));return i}function T(e,t){t=t||6;for(var r=f(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/t;t--;)o.push(f({h:n,s:a,v:i})),i=(i+s)%1;return o}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=M(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var i=[z(c(e).toString(16)),z(c(t).toString(16)),z(c(r).toString(16)),z(D(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*N(this._r,255))+"%",g:c(100*N(this._g,255))+"%",b:c(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%)":"rgba("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+m(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=f(e);r="#"+m(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(j,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(O,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:H(e[n]));e=r}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,r){r=0===r?0:r||50;var n=f(e).toRgb(),a=f(t).toRgb(),i=r/100;return f({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},f.readability=function(e,t){var r=f(e),n=f(t);return(a.max(r.getLuminance(),n.getLuminance())+.05)/(a.min(r.getLuminance(),n.getLuminance())+.05)},f.isReadable=function(e,t,r){var n,a,i=f.readability(e,t);switch(a=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},f.mostReadable=function(e,t,r){var n,a,i,o,s=null,c=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var l=0;lc&&(c=n,s=f(t[l]));return f.isReadable(e,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],r))};var E=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=f.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(E);function M(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,u(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function B(e){return l(1,u(0,e))}function L(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function H(e){return e<=1&&(e=100*e+"%"),e}function D(e){return a.round(255*parseFloat(e)).toString(16)}function I(e){return L(e)/255}var V,R,F,q=(R="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",F="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+R),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+R),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+R),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function $(e){return!!q.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(n=function(){return f}.call(t,r,t,e))||(e.exports=n)}(Math)},49:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},5:function(e,t){!function(){e.exports=this.wp.data}()},57:function(e,t,r){var n=r(77),a=r(78);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},58:function(e,t){!function(){e.exports=this.wp.autop}()},7:function(e,t){!function(){e.exports=this.wp.compose}()},77:function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var a=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),a[t]=e>>>((3&t)<<3)&255;return a}}},78:function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,a=r;return[a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]]].join("")}},8:function(e,t,r){"use strict";r.d(t,"a",function(){return a});var n=r(15);function a(e){for(var t=1;t-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function c(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,c=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),"vertical"===(s=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),d()}var s;function l(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var r=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach(function(e){e.node.scrollTop=e.scrollTop}),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o0&&void 0!==arguments[0]?arguments[0]:{};return function(t){(e=Object(d.a)({},j,e)).shouldOverwriteState=Object(O.overSome)([e.shouldOverwriteState,function(t){return Object(O.includes)(e.ignoreTypes,t.type)}]);var n={past:[],present:t(void 0,{}),future:[],lastAction:null,shouldCreateUndoLevel:!1},r=e,o=r.resetTypes,i=void 0===o?[]:o,c=r.shouldOverwriteState,a=void 0===c?function(){return!1}:c;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,r=arguments.length>1?arguments[1]:void 0,o=e.past,c=e.present,s=e.future,l=e.lastAction,u=e.shouldCreateUndoLevel,p=l;switch(r.type){case"UNDO":return o.length?{past:Object(O.dropRight)(o),present:Object(O.last)(o),future:[c].concat(Object(b.a)(s)),lastAction:null,shouldCreateUndoLevel:!1}:e;case"REDO":return s.length?{past:Object(b.a)(o).concat([c]),present:Object(O.first)(s),future:Object(O.drop)(s),lastAction:null,shouldCreateUndoLevel:!1}:e;case"CREATE_UNDO_LEVEL":return Object(d.a)({},e,{lastAction:null,shouldCreateUndoLevel:!0})}var f=t(c,r);if(Object(O.includes)(i,r.type))return{past:[],present:f,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(c===f)return e;var h=o,m=p;return!u&&o.length&&a(r,p)||(h=Object(b.a)(o).concat([c]),m=r),{past:h,present:f,future:[],shouldCreateUndoLevel:!1,lastAction:m}}}},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n,r){var o=t(n,r),i=void 0===n||Object(O.includes)(e.resetTypes,r.type),c=n!==o;if(!c&&!i)return n;c&&void 0!==n||(o=Object(d.a)({},o));var a=Object(O.includes)(e.ignoreTypes,r.type);return o.isDirty=a?n.isDirty:!i&&c,o}}},_=n(1),E={insertUsage:{},isPublishSidebarEnabled:!0},S={alignWide:!1,colors:[{name:Object(_.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(_.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(_.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(_.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(_.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(_.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(_.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(_.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(_.__)("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:Object(_.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(_.__)("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],fontSizes:[{name:Object(_._x)("Small","font size name"),size:13,slug:"small"},{name:Object(_._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(_._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(_._x)("Large","font size name"),size:36,slug:"large"},{name:Object(_._x)("Huge","font size name"),size:48,slug:"huge"}],imageSizes:[{slug:"thumbnail",label:Object(_.__)("Thumbnail")},{slug:"medium",label:Object(_.__)("Medium")},{slug:"large",label:Object(_.__)("Large")},{slug:"full",label:Object(_.__)("Full Size")}],maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,richEditingEnabled:!0},C={};function w(e,t,n){return Object(b.a)(e.slice(0,n)).concat(Object(b.a)(Object(O.castArray)(t)),Object(b.a)(e.slice(n)))}function T(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(b.a)(e);return o.splice(t,r),w(o,e.slice(t,t+r),n)}var P=new Set(["meta"]);function I(e){return e&&"object"===Object(h.a)(e)&&"raw"in e?e.raw:e}function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(f.a)({},t,[]);return e.forEach(function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,B(o,r))}),n}function x(e,t){for(var n={},r=Object(b.a)(e);r.length;){var o=r.shift(),i=o.innerBlocks,c=Object(p.a)(o,["innerBlocks"]);r.push.apply(r,Object(b.a)(i)),n[c.clientId]=t(c)}return n}function L(e){return x(e,function(e){return Object(O.omit)(e,"attributes")})}function A(e){return x(e,function(e){return e.attributes})}function N(e,t){return e===t?Object(d.a)({},e):t}function R(e,t){return Object(O.isEqual)(Object(O.keys)(e),Object(O.keys)(t))}function D(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&e.clientId===t.clientId&&R(e.attributes,t.attributes)}function F(e,t){return"EDIT_POST"===e.type&&R(e.edits,t.edits)}var M=Object(O.flow)([l.combineReducers,function(e){return function(t,n){if(t&&"REMOVE_BLOCKS"===n.type){for(var r=Object(b.a)(n.clientIds),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_POST":return Object(O.reduce)(t.edits,function(t,n,r){return n!==e[r]&&(t=N(e,t),P.has(r)?t[r]=Object(d.a)({},t[r],n):t[r]=n),t},e);case"RESET_BLOCKS":return"content"in e?Object(O.omit)(e,"content"):e;case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===t.type?function(e){return t.edits[e]}:function(e){return I(t.post[e])};return Object(O.reduce)(e,function(t,r,o){return Object(O.isEqual)(r,n(o))?(delete(t=N(e,t))[o],t):t},e)}return e},blocks:Object(O.flow)([l.combineReducers,function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(O.reduce)(t[n],function(n,r){return Object(b.a)(n).concat([r],Object(b.a)(e(t,r)))},[])}(t.order);return Object(d.a)({},t,{byClientId:Object(d.a)({},Object(O.omit)(t.byClientId,r),L(n.blocks)),attributes:Object(d.a)({},Object(O.omit)(t.attributes,r),A(n.blocks)),order:Object(d.a)({},Object(O.omit)(t.order,r),B(n.blocks))})}return e(t,n)}},function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=Object(d.a)({},t)).attributes=Object(O.mapValues)(t.attributes,function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?Object(d.a)({},e,{ref:o}):e})}return e(t,n)}},k({resetTypes:["SETUP_EDITOR_STATE","REQUEST_POST_UPDATE_START"],ignoreTypes:["RECEIVE_BLOCKS","RESET_POST","UPDATE_POST"]})])({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return L(t.blocks);case"RECEIVE_BLOCKS":return Object(d.a)({},e,L(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(O.omit)(t.updates,"attributes");return Object(O.isEmpty)(n)?e:Object(d.a)({},e,Object(f.a)({},t.clientId,Object(d.a)({},e[t.clientId],n)));case"INSERT_BLOCKS":return Object(d.a)({},e,L(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(d.a)({},Object(O.omit)(e,t.clientIds),L(t.blocks)):e;case"REMOVE_BLOCKS":return Object(O.omit)(e,t.clientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return A(t.blocks);case"RECEIVE_BLOCKS":return Object(d.a)({},e,A(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Object(d.a)({},e,Object(f.a)({},t.clientId,Object(d.a)({},e[t.clientId],t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(!e[t.clientId])return e;var n=Object(O.reduce)(t.attributes,function(n,r,o){return r!==n[o]&&((n=N(e[t.clientId],n))[o]=r),n},e[t.clientId]);return n===e[t.clientId]?e:Object(d.a)({},e,Object(f.a)({},t.clientId,n));case"INSERT_BLOCKS":return Object(d.a)({},e,A(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(d.a)({},Object(O.omit)(e,t.clientIds),A(t.blocks)):e;case"REMOVE_BLOCKS":return Object(O.omit)(e,t.clientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return B(t.blocks);case"RECEIVE_BLOCKS":return Object(d.a)({},e,Object(O.omit)(B(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=t.blocks,i=e[r]||[],c=B(o,r),a=t.index,s=void 0===a?i.length:a;return Object(d.a)({},e,c,Object(f.a)({},r,w(i,c[r],s)));case"MOVE_BLOCK_TO_POSITION":var l,u=t.fromRootClientId,p=void 0===u?"":u,h=t.toRootClientId,m=void 0===h?"":h,v=t.clientId,g=t.index,j=void 0===g?e[m].length:g;if(p===m){var y=e[m].indexOf(v);return Object(d.a)({},e,Object(f.a)({},m,T(e[m],y,j)))}return Object(d.a)({},e,(l={},Object(f.a)(l,p,Object(O.without)(e[p],v)),Object(f.a)(l,m,w(e[m],v,j)),l));case"MOVE_BLOCKS_UP":var k=t.clientIds,_=t.rootClientId,E=void 0===_?"":_,S=Object(O.first)(k),C=e[E];if(!C.length||S===Object(O.first)(C))return e;var P=C.indexOf(S);return Object(d.a)({},e,Object(f.a)({},E,T(C,P,P-1,k.length)));case"MOVE_BLOCKS_DOWN":var I=t.clientIds,x=t.rootClientId,L=void 0===x?"":x,A=Object(O.first)(I),N=Object(O.last)(I),R=e[L];if(!R.length||N===Object(O.last)(R))return e;var D=R.indexOf(A);return Object(d.a)({},e,Object(f.a)({},L,T(R,D,D+1,I.length)));case"REPLACE_BLOCKS":var F=t.blocks,M=t.clientIds;if(!F)return e;var U=B(F);return Object(O.flow)([function(e){return Object(O.omit)(e,M)},function(e){return Object(d.a)({},e,Object(O.omit)(U,""))},function(e){return Object(O.mapValues)(e,function(e){return Object(O.reduce)(e,function(e,t){return t===M[0]?Object(b.a)(e).concat(Object(b.a)(U[""])):(-1===M.indexOf(t)&&e.push(t),e)},[])})}])(e);case"REMOVE_BLOCKS":return Object(O.flow)([function(e){return Object(O.omit)(e,t.clientIds)},function(e){return Object(O.mapValues)(e,function(e){return O.without.apply(void 0,[e].concat(Object(b.a)(t.clientIds)))})}])(e)}return e}})});var U=Object(l.combineReducers)({data:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_REUSABLE_BLOCKS":return Object(O.reduce)(t.results,function(t,n){var r=n.reusableBlock,o=r.id,i=r.title,c={clientId:n.parsedBlock.clientId,title:i};return Object(O.isEqual)(t[o],c)||((t=N(e,t))[o]=c),t},e);case"UPDATE_REUSABLE_BLOCK_TITLE":var n=t.id,r=t.title;return e[n]&&e[n].title!==r?Object(d.a)({},e,Object(f.a)({},n,Object(d.a)({},e[n],{title:r}))):e;case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=t.id,i=t.updatedId;if(o===i)return e;var c=e[o];return Object(d.a)({},Object(O.omit)(e,o),Object(f.a)({},i,c));case"REMOVE_REUSABLE_BLOCK":var a=t.id;return Object(O.omit)(e,a)}return e},isFetching:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_REUSABLE_BLOCKS":var n=t.id;return n?Object(d.a)({},e,Object(f.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(O.omit)(e,r)}return e},isSaving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_REUSABLE_BLOCK":return Object(d.a)({},e,Object(f.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(O.omit)(e,n)}return e}});var H=v()(Object(l.combineReducers)({editor:M,initialEdits:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR":if(!t.edits)break;return t.edits;case"SETUP_EDITOR_STATE":return"content"in e?Object(O.omit)(e,"content"):e;case"UPDATE_POST":return Object(O.reduce)(t.edits,function(t,n,r){return t.hasOwnProperty(r)?(delete(t=N(e,t))[r],t):t},e);case"RESET_POST":return C}return e},currentPost:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":var n;if(t.post)n=t.post;else{if(!t.edits)return e;n=Object(d.a)({},e,t.edits)}return Object(O.mapValues)(n,I)}return e},isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},blockSelection:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{start:null,end:null,isMultiSelecting:!1,isEnabled:!0,initialPosition:null},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return null!==e.start||null!==e.end||e.isMultiSelecting?Object(d.a)({},e,{start:null,end:null,isMultiSelecting:!1,initialPosition:null}):e;case"START_MULTI_SELECT":return e.isMultiSelecting?e:Object(d.a)({},e,{isMultiSelecting:!0,initialPosition:null});case"STOP_MULTI_SELECT":return e.isMultiSelecting?Object(d.a)({},e,{isMultiSelecting:!1,initialPosition:null}):e;case"MULTI_SELECT":return Object(d.a)({},e,{start:t.start,end:t.end,initialPosition:null});case"SELECT_BLOCK":return t.clientId===e.start&&t.clientId===e.end?e:Object(d.a)({},e,{start:t.clientId,end:t.clientId,initialPosition:t.initialPosition});case"INSERT_BLOCKS":return t.updateSelection?Object(d.a)({},e,{start:t.blocks[0].clientId,end:t.blocks[0].clientId,initialPosition:null,isMultiSelecting:!1}):e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.start)?Object(d.a)({},e,{start:null,end:null,initialPosition:null,isMultiSelecting:!1}):e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.start))return e;var n=Object(O.get)(t.blocks,[0,"clientId"],null);return n===e.start&&n===e.end?e:Object(d.a)({},e,{start:n,end:n,initialPosition:null,isMultiSelecting:!1});case"TOGGLE_SELECTION":return Object(d.a)({},e,{isEnabled:t.isSelectionEnabled})}return e},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return Object(d.a)({},e,Object(f.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(O.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(O.isEqual)(e[n],t.settings)?e:Object(d.a)({},e,Object(f.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(O.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return{rootClientId:t.rootClientId,index:t.index};case"HIDE_INSERTION_POINT":return null}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(function(e,n){var r=n.name,o={name:n.name};return Object(i.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),Object(d.a)({},e,{insertUsage:Object(d.a)({},e.insertUsage,Object(f.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})},e);case"REMOVE_REUSABLE_BLOCK":return Object(d.a)({},e,{insertUsage:Object(O.omitBy)(e.insertUsage,function(e){return e.insert.ref===t.id})});case"ENABLE_PUBLISH_SIDEBAR":return Object(d.a)({},e,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(d.a)({},e,{isPublishSidebarEnabled:!1})}return e},saving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_START":return{requesting:!0,successful:!1,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_SUCCESS":return{requesting:!1,successful:!0,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_FAILURE":return{requesting:!1,successful:!1,error:t.error,options:t.options||{}}}return e},postLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},reusableBlocks:U,template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return Object(d.a)({},e,{isValid:t.isValid})}return e},autosave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_AUTOSAVE":var n=t.post,r=["title","excerpt","content"].map(function(e){return I(n[e])}),o=Object(u.a)(r,3);return{title:o[0],excerpt:o[1],content:o[2]}}return e},previewLink:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_SUCCESS":return t.post.preview_link?t.post.preview_link:t.post.link?Object(g.addQueryArgs)(t.post.link,{preview:!0}):e;case"REQUEST_POST_UPDATE_START":if(e&&t.options.isPreview)return null}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return Object(d.a)({},e,t.settings)}return e},postSavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_SAVING":return Object(d.a)({},e,Object(f.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(O.omit)(e,t.lockName)}return e}})),V=n(87),K=n.n(V),z=n(190),W=n.n(z),q=n(44);function G(e,t){return{type:"SETUP_EDITOR",post:e,edits:t}}function $(e){return{type:"RESET_POST",post:e}}function Y(e){return{type:"RESET_AUTOSAVE",post:e}}function Q(e){return{type:"UPDATE_POST",edits:e}}function X(e,t){return{type:"SETUP_EDITOR_STATE",post:e,blocks:t}}function Z(e){return{type:"RESET_BLOCKS",blocks:e}}function J(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function ee(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientId:e,attributes:t}}function te(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function ne(e){return{type:"SELECT_BLOCK",initialPosition:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,clientId:e}}function re(){return{type:"START_MULTI_SELECT"}}function oe(){return{type:"STOP_MULTI_SELECT"}}function ie(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function ce(){return{type:"CLEAR_SELECTED_BLOCK"}}function ae(){return{type:"TOGGLE_SELECTION",isSelectionEnabled:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}function se(e,t){return{type:"REPLACE_BLOCKS",clientIds:Object(O.castArray)(e),blocks:Object(O.castArray)(t),time:Date.now()}}function le(e,t){return se(e,t)}function ue(e){return function(t,n){return{clientIds:Object(O.castArray)(t),type:e,rootClientId:n}}}var de=ue("MOVE_BLOCKS_DOWN"),pe=ue("MOVE_BLOCKS_UP");function be(e,t,n,r){return{type:"MOVE_BLOCK_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientId:e,index:r}}function fe(e,t,n){return he([e],t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function he(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return{type:"INSERT_BLOCKS",blocks:Object(O.castArray)(e),index:t,rootClientId:n,time:Date.now(),updateSelection:r}}function me(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function ve(){return{type:"HIDE_INSERTION_POINT"}}function Oe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function ge(){return{type:"SYNCHRONIZE_TEMPLATE"}}function je(e){return{type:"EDIT_POST",edits:e}}function ye(){return{type:"REQUEST_POST_UPDATE",options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function ke(){return{type:"REFRESH_POST"}}function _e(e,t){return{type:"TRASH_POST",postId:e,postType:t}}function Ee(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function Se(e){return ye(Object(d.a)({isAutosave:!0},e))}function Ce(){return{type:"REDO"}}function we(){return{type:"UNDO"}}function Te(){return{type:"CREATE_UNDO_LEVEL"}}function Pe(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"REMOVE_BLOCKS",clientIds:Object(O.castArray)(e),selectPrevious:t}}function Ie(e,t){return Pe([e],t)}function Be(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function xe(){return{type:"START_TYPING"}}function Le(){return{type:"STOP_TYPING"}}function Ae(){return{type:"ENTER_FORMATTED_TEXT"}}function Ne(){return{type:"EXIT_FORMATTED_TEXT"}}function Re(e){return{type:"UPDATE_POST_LOCK",lock:e}}function De(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function Fe(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function Me(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function Ue(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function He(e,t){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:e,title:t}}function Ve(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function Ke(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(O.castArray)(e)}}function ze(e,t,n){return fe(Object(i.createBlock)(Object(i.getDefaultBlockName)(),e),n,t)}function We(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function qe(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}function Ge(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function $e(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Ye(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Qe(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}var Xe=n(31),Ze=n(46),Je=n(58),et="post-update",tt=/%(?:postname|pagename)%/,nt=3,rt=2,ot=1,it=0,ct=6e4,at=[];function st(e){return e.editor.past.length>0}function lt(e){return e.editor.future.length>0}function ut(e){return"auto-draft"===ft(e).status}function dt(e){return e.editor.present.blocks.isDirty||"content"in e.editor.present.edits}function pt(e){return!!dt(e)||(Object.keys(e.editor.present.edits).length>0||or(e,pt))}function bt(e){return!pt(e)&&ut(e)}function ft(e){return e.currentPost}function ht(e){return e.currentPost.type}function mt(e){return ft(e).id||null}function vt(e){return Object(O.get)(ft(e),["_links","version-history",0,"count"],0)}function Ot(e){return Object(O.get)(ft(e),["_links","predecessor-version",0,"id"],null)}var gt=Object(Xe.a)(function(e){return Object(d.a)({},e.initialEdits,e.editor.present.edits)},function(e){return[e.editor.present.edits,e.initialEdits]}),jt=Object(Xe.a)(function(){return[]},function(e){return[e.editor]});function yt(e,t){var n=ft(e);if(n.hasOwnProperty(t))return n[t]}function kt(e,t){switch(t){case"content":return Hn(e)}var n=gt(e);return n.hasOwnProperty(t)?P.has(t)?Object(d.a)({},yt(e,t),n[t]):n[t]:yt(e,t)}function _t(e,t){if(!Lt(e))return null;var n=xt(e);return n.hasOwnProperty(t)?n[t]:void 0}function Et(e){return"private"===kt(e,"status")?"private":kt(e,"password")?"password":"public"}function St(e){return"pending"===ft(e).status}function Ct(e){var t=ft(e);return-1!==["publish","private"].indexOf(t.status)||"future"===t.status&&!Object(Ze.isInTheFuture)(new Date(Number(Object(Ze.getDate)(t.date))-ct))}function wt(e){return"future"===ft(e).status&&!Ct(e)}function Tt(e){var t=ft(e);return pt(e)||-1===["publish","private","future"].indexOf(t.status)}function Pt(e){return!Ln(e)&&(!!kt(e,"title")||!!kt(e,"excerpt")||!It(e))}function It(e){var t=Un(e);if(t.length&&!("content"in gt(e))){if(t.length>1)return!1;if(t[0].name!==Object(i.getFreeformContentHandlerName)())return!1}return!Hn(e)}function Bt(e){if(!Pt(e))return!1;if(!Lt(e))return!0;if(dt(e))return!0;var t=xt(e);return["title","excerpt"].some(function(n){return t[n]!==kt(e,n)})}function xt(e){return e.autosave}function Lt(e){return!!xt(e)}function At(e){var t=kt(e,"date"),n=new Date(Number(Object(Ze.getDate)(t))-ct);return Object(Ze.isInTheFuture)(n)}function Nt(e){var t=kt(e,"date"),n=kt(e,"modified"),r=kt(e,"status");return("draft"===r||"auto-draft"===r)&&t===n}var Rt=Object(Xe.a)(function(){return[]},function(e,t){return Object(O.map)(vn(e,t),function(t){return Ut(e,t)})});function Dt(e,t){var n=e.editor.present.blocks.byClientId[t];return n?n.name:null}function Ft(e,t){var n=e.editor.present.blocks.byClientId[t];return!!n&&n.isValid}var Mt=Object(Xe.a)(function(e,t){var n=e.editor.present.blocks.byClientId[t];if(!n)return null;var r=e.editor.present.blocks.attributes[t],o=Object(i.getBlockType)(n.name);return o&&(r=Object(O.reduce)(o.attributes,function(t,n,o){return"meta"===n.source&&(t===r&&(t=Object(d.a)({},t)),t[o]=function(e,t){return Object(O.has)(e,["editor","present","edits","meta",t])?Object(O.get)(e,["editor","present","edits","meta",t]):Object(O.get)(e,["currentPost","meta",t])}(e,n.meta)),t},r)),r},function(e,t){return[e.editor.present.blocks.byClientId[t],e.editor.present.blocks.attributes[t],e.editor.present.edits.meta,e.initialEdits.meta,e.currentPost.meta]}),Ut=Object(Xe.a)(function(e,t){var n=e.editor.present.blocks.byClientId[t];return n?Object(d.a)({},n,{attributes:Mt(e,t),innerBlocks:Vt(e,t)}):null},function(e,t){return Object(b.a)(Mt.getDependants(e,t)).concat([Rt(e,t)])}),Ht=Object(Xe.a)(function(e,t){var n=e.editor.present.blocks.byClientId[t];return n?Object(d.a)({},n,{attributes:Mt(e,t)}):null},function(e,t){return[e.editor.present.blocks.byClientId[t]].concat(Object(b.a)(Mt.getDependants(e,t)))});var Vt=Object(Xe.a)(function(e,t){return Object(O.map)(vn(e,t),function(t){return Ut(e,t)})},function(e){return[e.editor.present.blocks]}),Kt=function e(t,n){return Object(O.flatMap)(n,function(n){var r=vn(t,n);return Object(b.a)(r).concat(Object(b.a)(e(t,r)))})},zt=Object(Xe.a)(function(e){var t=vn(e);return Object(b.a)(t).concat(Object(b.a)(Kt(e,t)))},function(e){return[e.editor.present.blocks.order]}),Wt=Object(Xe.a)(function(e,t){var n=zt(e);return t?Object(O.reduce)(n,function(n,r){return e.editor.present.blocks.byClientId[r].name===t?n+1:n},0):n.length},function(e){return[e.editor.present.blocks.order,e.editor.present.blocks.byClientId]}),qt=Object(Xe.a)(function(e,t){return Object(O.map)(Object(O.castArray)(t),function(t){return Ut(e,t)})},function(e){return[e.editor.present.edits.meta,e.initialEdits.meta,e.currentPost.meta,e.editor.present.blocks]});function Gt(e,t){return vn(e,t).length}function $t(e){return e.blockSelection.start}function Yt(e){return e.blockSelection.end}function Qt(e){var t=an(e).length;return t||(e.blockSelection.start?1:0)}function Xt(e){var t=e.blockSelection,n=t.start,r=t.end;return!!n&&n===r}function Zt(e){var t=e.blockSelection,n=t.start,r=t.end;return n&&n===r&&e.editor.present.blocks.byClientId[n]?n:null}function Jt(e){var t=Zt(e);return t?Ut(e,t):null}var en=Object(Xe.a)(function(e,t){var n=e.editor.present.blocks.order;for(var r in n)if(Object(O.includes)(n[r],t))return r;return null},function(e){return[e.editor.present.blocks.order]}),tn=Object(Xe.a)(function(e,t){for(var n=t,r=t;n;)n=en(e,r=n);return r},function(e){return[e.editor.present.blocks.order]});function nn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Zt(e)),void 0===t&&(t=n<0?ln(e):un(e)),!t)return null;var r=en(e,t);if(null===r)return null;var o=e.editor.present.blocks.order[r],i=o.indexOf(t)+1*n;return i<0?null:i===o.length?null:o[i]}function rn(e,t){return nn(e,t,-1)}function on(e,t){return nn(e,t,1)}function cn(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?e.blockSelection.initialPosition:null}var an=Object(Xe.a)(function(e){var t=e.blockSelection,n=t.start,r=t.end;if(n===r)return[];var o=en(e,n);if(null===o)return[];var i=vn(e,o),c=i.indexOf(n),a=i.indexOf(r);return c>a?i.slice(a,c+1):i.slice(c,a+1)},function(e){return[e.editor.present.blocks.order,e.blockSelection.start,e.blockSelection.end]}),sn=Object(Xe.a)(function(e){var t=an(e);return t.length?t.map(function(t){return Ut(e,t)}):at},function(e){return Object(b.a)(an.getDependants(e)).concat([e.editor.present.blocks,e.editor.present.edits.meta,e.initialEdits.meta,e.currentPost.meta])});function ln(e){return Object(O.first)(an(e))||null}function un(e){return Object(O.last)(an(e))||null}var dn=Object(Xe.a)(function(e,t,n){for(var r=n;t!==r&&r;)r=en(e,r);return t===r},function(e){return[e.editor.present.blocks.order]});function pn(e,t){return ln(e)===t}function bn(e,t){return-1!==an(e).indexOf(t)}var fn=Object(Xe.a)(function(e,t){for(var n=t,r=!1;n&&!r;)r=bn(e,n=en(e,n));return r},function(e){return[e.editor.present.blocks.order,e.blockSelection.start,e.blockSelection.end]});function hn(e){var t=e.blockSelection,n=t.start;return n===t.end?null:n||null}function mn(e){var t=e.blockSelection,n=t.start,r=t.end;return n===r?null:r||null}function vn(e,t){return e.editor.present.blocks.order[t||""]||at}function On(e,t,n){return vn(e,n).indexOf(t)}function gn(e,t){var n=e.blockSelection,r=n.start;return r===n.end&&r===t}function jn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(O.some)(vn(e,t),function(t){return gn(e,t)||bn(e,t)||n&&jn(e,t,n)})}function yn(e,t){if(!t)return!1;var n=an(e),r=n.indexOf(t);return r>-1&&r2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(O.isBoolean)(e)?e:Object(O.isArray)(e)?Object(O.includes)(e,t):n},o=Object(i.getBlockType)(t);if(!o)return!1;if(!r(cr(e).allowedBlockTypes,t,!0))return!1;if(!!xn(e,n))return!1;var c=ir(e,n),a=r(Object(O.get)(c,["allowedBlocks"]),t),s=r(o.parent,Dt(e,n));return null!==a&&null!==s?a||s:null!==a?a:null===s||s},Kn=Object(Xe.a)(Vn,function(e,t,n){return[e.blockListSettings[n],e.editor.present.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]});function zn(e,t){return e.preferences.insertUsage[t]||null}var Wn=function(e,t,n){return!!Object(i.hasBlockSupport)(t,"inserter",!0)&&Vn(e,t.name,n)},qn=function(e,t,n){if(!Vn(e,"core/block",n))return!1;var r=Dt(e,t.clientId);return!!r&&(!!Object(i.getBlockType)(r)&&(!!Vn(e,r,n)&&!dn(e,t.clientId,n)))},Gn=Object(Xe.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?nt:t>0?rt:"common"===e?ot:it},r=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},o=Object(i.getBlockTypes)().filter(function(n){return Wn(e,n,t)}).map(function(t){var o=t.name,c=!1;Object(i.hasBlockSupport)(t.name,"multiple",!0)||(c=Object(O.some)(qt(e,zt(e)),{name:t.name}));var a=Object(O.isArray)(t.parent),s=zn(e,o)||{},l=s.time,u=s.count,d=void 0===u?0:u;return{id:o,name:t.name,initialAttributes:{},title:t.title,icon:t.icon,category:t.category,keywords:t.keywords,isDisabled:c,utility:n(t.category,d,a),frecency:r(l,d),hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(t.name)}}),c=Zn(e).filter(function(n){return qn(e,n,t)}).map(function(t){var o="core/block/".concat(t.id),c=Dt(e,t.clientId),a=Object(i.getBlockType)(c),s=zn(e,o)||{},l=s.time,u=s.count,d=void 0===u?0:u,p=n("reusable",d,!1),b=r(l,d);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:a.icon,category:"reusable",keywords:[],isDisabled:!1,utility:p,frecency:b}});return Object(O.orderBy)(Object(b.a)(o).concat(Object(b.a)(c)),["utility","frecency"],["desc","desc"])},function(e,t){return[e.blockListSettings[t],e.editor.present.blocks.byClientId,e.editor.present.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,e.reusableBlocks.data,Object(i.getBlockTypes)()]}),$n=Object(Xe.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return!!Object(O.some)(Object(i.getBlockTypes)(),function(n){return Wn(e,n,t)})||Object(O.some)(Zn(e),function(n){return qn(e,n,t)})},function(e,t){return[e.blockListSettings[t],e.editor.present.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,e.reusableBlocks.data,Object(i.getBlockTypes)()]}),Yn=Object(Xe.a)(function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return Object(d.a)({},n,{id:r?t:+t,isTemporary:r})},function(e,t){return[e.reusableBlocks.data[t]]});function Qn(e,t){return e.reusableBlocks.isSaving[t]||!1}function Xn(e,t){return!!e.reusableBlocks.isFetching[t]}function Zn(e){return Object(O.map)(e.reusableBlocks.data,function(t,n){return Yn(e,n)})}function Jn(e,t){var n=Object(O.find)(e.optimist,function(e){return e.beforeState&&Object(O.get)(e.action,["optimist","id"])===t});return n?n.beforeState:null}function er(e){if(!Ln(e))return!1;if(!Ct(e))return!1;var t=Jn(e,et);return!!t&&!Ct(t)}function tr(e){var t=kt(e,"permalink_template");return tt.test(t)}function nr(e){var t=rr(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return tr(e)?n+r+o:n}function rr(e){var t=kt(e,"permalink_template");if(!t)return null;var n=kt(e,"slug")||kt(e,"generated_slug"),r=t.split(tt),o=Object(u.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function or(e,t){var n=e.optimist;return!!n&&n.some(function(e){var n=e.beforeState;return n&&t(n)})}function ir(e,t){return e.blockListSettings[t]}function cr(e){return e.settings}function ar(e,t){return t?e.tokens[t]:e.tokens}function sr(e){return e.postLock.isLocked}function lr(e){return Object.keys(e.postSavingLock).length>0}function ur(e){return e.postLock.isTakeover}function dr(e){return e.postLock.user}function pr(e){return e.postLock.activePostLock}function br(e){return Object(O.has)(ft(e),["_links","wp:action-unfiltered-html"])}function fr(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:E.isPublishSidebarEnabled}var hr=n(38),mr=n(30),vr=n.n(mr),Or=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,c,a,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,o=n.dispatch,e.next=4,vr()({path:"/wp/v2/types/wp_block"});case 4:if(c=e.sent){e.next=7;break}return e.abrupt("return");case 7:if(e.prev=7,!r){e.next=15;break}return e.next=11,vr()({path:"/wp/v2/".concat(c.rest_base,"/").concat(r)});case 11:e.t0=e.sent,a=[e.t0],e.next=18;break;case 15:return e.next=17,vr()({path:"/wp/v2/".concat(c.rest_base,"?per_page=-1")});case 17:a=e.sent;case 18:(s=Object(O.compact)(Object(O.map)(a,function(e){if("publish"!==e.status||e.content.protected)return null;var t=Object(i.parse)(e.content.raw);return{reusableBlock:{id:e.id,title:I(e.title)},parsedBlock:1===t.length?t[0]:Object(i.createBlock)("core/template",{},t)}}))).length&&o(Fe(s)),o({type:"FETCH_REUSABLE_BLOCKS_SUCCESS",id:r}),e.next=26;break;case 23:e.prev=23,e.t1=e.catch(7),o({type:"FETCH_REUSABLE_BLOCKS_FAILURE",id:r,error:e.t1});case 26:case"end":return e.stop()}},e,this,[[7,23]])}));return function(t,n){return e.apply(this,arguments)}}(),gr=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,c,a,s,u,d,p,b,f,h,m,v,O,g;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vr()({path:"/wp/v2/types/wp_block"});case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:return o=t.id,c=n.dispatch,a=n.getState(),s=Yn(a,o),u=s.clientId,d=s.title,p=s.isTemporary,b=Ut(a,u),f=Object(i.serialize)("core/template"===b.name?b.innerBlocks:b),h=p?{title:d,content:f,status:"publish"}:{id:o,title:d,content:f,status:"publish"},m=p?"/wp/v2/".concat(r.rest_base):"/wp/v2/".concat(r.rest_base,"/").concat(o),v=p?"POST":"PUT",e.prev=14,e.next=17,vr()({path:m,data:h,method:v});case 17:O=e.sent,c({type:"SAVE_REUSABLE_BLOCK_SUCCESS",updatedId:O.id,id:o}),g=p?Object(_.__)("Block created."):Object(_.__)("Block updated."),Object(l.dispatch)("core/notices").createSuccessNotice(g,{id:"REUSABLE_BLOCK_NOTICE_ID"}),e.next=27;break;case 23:e.prev=23,e.t0=e.catch(14),c({type:"SAVE_REUSABLE_BLOCK_FAILURE",id:o}),Object(l.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 27:case"end":return e.stop()}},e,this,[[14,23]])}));return function(t,n){return e.apply(this,arguments)}}(),jr=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,c,a,s,u,d,p,f,h;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vr()({path:"/wp/v2/types/wp_block"});case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:if(o=t.id,c=n.getState,a=n.dispatch,(s=Yn(c(),o))&&!s.isTemporary){e.next=10;break}return e.abrupt("return");case 10:return u=Vt(c()),d=u.filter(function(e){return Object(i.isReusableBlock)(e)&&e.attributes.ref===o}),p=d.map(function(e){return e.clientId}),f=Object(O.uniqueId)(),a({type:"REMOVE_REUSABLE_BLOCK",id:o,optimist:{type:m.BEGIN,id:f}}),a(Pe(Object(b.a)(p).concat([s.clientId]))),e.prev=16,e.next=19,vr()({path:"/wp/v2/".concat(r.rest_base,"/").concat(o),method:"DELETE"});case 19:a({type:"DELETE_REUSABLE_BLOCK_SUCCESS",id:o,optimist:{type:m.COMMIT,id:f}}),h=Object(_.__)("Block deleted."),Object(l.dispatch)("core/notices").createSuccessNotice(h,{id:"REUSABLE_BLOCK_NOTICE_ID"}),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(16),a({type:"DELETE_REUSABLE_BLOCK_FAILURE",id:o,optimist:{type:m.REVERT,id:f}}),Object(l.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return e.stop()}},e,this,[[16,24]])}));return function(t,n){return e.apply(this,arguments)}}();function yr(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.getBlockInsertionParentClientId,n=void 0===t?Xr:t,r=e.getInserterItems,o=void 0===r?Zr:r,c=e.getSelectedBlockName,a=void 0===c?Jr:c;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){var e=a();return o(n()).filter(function(t){return e!==t.name})},getOptionKeywords:function(e){var t=e.title,n=e.keywords,r=void 0===n?[]:n;return[e.category].concat(Object(b.a)(r),[t])},getOptionLabel:function(e){var t=e.icon,n=e.title;return[Object(Br.createElement)(Qr,{key:"icon",icon:t,showColors:!0}),n]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes;return{action:"replace",value:Object(i.createBlock)(t,n)}},isOptionDisabled:function(e){return e.isDisabled}}}(),to={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),vr()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[Object(Br.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}),Object(Br.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(Br.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}},no=[{icon:"editor-alignleft",title:Object(_.__)("Align text left"),align:"left"},{icon:"editor-aligncenter",title:Object(_.__)("Align text center"),align:"center"},{icon:"editor-alignright",title:Object(_.__)("Align text right"),align:"right"}];var ro=Object(Ar.compose)(qr(function(e){return{clientId:e.clientId}}),Object(s.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,r=t.isLargeViewport,o=t.isCollapsed,i=e("core/editor"),c=i.getBlockRootClientId,a=i.getEditorSettings;return{isCollapsed:o||!r||!a().hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,r=e.onChange,o=e.alignmentControls,i=void 0===o?no:o;function c(e){return function(){return r(n===e?void 0:e)}}var a=Object(O.find)(i,function(e){return e.align===n});return Object(Br.createElement)(Vr.Toolbar,{isCollapsed:t,icon:a?a.icon:"editor-alignleft",label:Object(_.__)("Change Text Alignment"),controls:i.map(function(e){var t=e.align,r=n===t;return Object(d.a)({},e,{isActive:r,onClick:c(t)})})})}),oo={left:{icon:"align-left",title:Object(_.__)("Align left")},center:{icon:"align-center",title:Object(_.__)("Align center")},right:{icon:"align-right",title:Object(_.__)("Align right")},wide:{icon:"align-wide",title:Object(_.__)("Wide width")},full:{icon:"align-full-width",title:Object(_.__)("Full width")}},io=["left","center","right","wide","full"],co=["wide","full"];var ao=Object(Ar.compose)(qr(function(e){return{clientId:e.clientId}}),Object(s.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,r=t.isLargeViewport,o=t.isCollapsed,i=e("core/editor"),c=i.getBlockRootClientId,a=i.getEditorSettings;return{wideControlsEnabled:e("core/editor").getEditorSettings().alignWide,isCollapsed:o||!r||!a().hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,r=e.onChange,o=e.controls,i=void 0===o?io:o,c=e.wideControlsEnabled,a=void 0!==c&&c?i:i.filter(function(e){return-1===co.indexOf(e)}),s=oo[n];return Object(Br.createElement)(Vr.Toolbar,{isCollapsed:t,icon:s?s.icon:"align-left",label:Object(_.__)("Change Alignment"),controls:a.map(function(e){return Object(d.a)({},oo[e],{isActive:n===e,onClick:(t=e,function(){return r(n===t?void 0:t)})});var t})})}),so=Object(Vr.createSlotFill)("BlockControls"),lo=so.Fill,uo=so.Slot,po=Gr(function(e){var t=e.controls,n=e.children;return Object(Br.createElement)(lo,null,Object(Br.createElement)(Vr.Toolbar,{controls:t}),n)});po.Slot=uo;var bo=po,fo=Object(Vr.withFilters)("editor.BlockEdit")(function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(i.getBlockType)(r);if(!o)return null;var c=Object(i.hasBlockSupport)(o,"className",!0)?Object(i.getBlockDefaultClassName)(r):null,a=Lr()(c,n.className),s=o.edit||o.save;return Object(Br.createElement)(s,Object(Ir.a)({},e,{className:a}))}),ho=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).setFocusedElement=n.setFocusedElement.bind(Object(Hr.a)(Object(Hr.a)(n))),n.state={focusedElement:null,setFocusedElement:n.setFocusedElement},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"setFocusedElement",value:function(e){this.setState(function(t){return t.focusedElement===e?null:{focusedElement:e}})}},{key:"render",value:function(){return Object(Br.createElement)(Wr,{value:this.state},Object(Br.createElement)(fo,this.props))}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.clientId;return{name:e.name,isSelected:e.isSelected,clientId:t}}}]),t}(Br.Component),mo=Object(Vr.createSlotFill)("BlockFormatControls"),vo=mo.Fill,Oo=mo.Slot,go=Gr(vo);go.Slot=Oo;var jo=go,yo=n(16);function ko(e){var t=e.blocks,n=e.selectedBlockClientId,r=e.selectBlock,o=e.showNestedBlocks;return Object(Br.createElement)("ul",{className:"editor-block-navigation__list",role:"list"},Object(O.map)(t,function(e){var t=Object(i.getBlockType)(e.name),c=e.clientId===n;return Object(Br.createElement)("li",{key:e.clientId},Object(Br.createElement)("div",{className:"editor-block-navigation__item"},Object(Br.createElement)(Vr.Button,{className:Lr()("editor-block-navigation__item-button",{"is-selected":e.clientId===n}),onClick:function(){return r(e.clientId)},isSelected:c},Object(Br.createElement)(Qr,{icon:t.icon,showColors:!0}),t.title,c&&Object(Br.createElement)("span",{className:"screen-reader-text"},Object(_.__)("(selected block)")))),o&&!!e.innerBlocks&&!!e.innerBlocks.length&&Object(Br.createElement)(ko,{blocks:e.innerBlocks,selectedBlockClientId:n,selectBlock:r,showNestedBlocks:!0}))}))}var _o=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.getBlock,i=t.getBlocks,c=n();return{rootBlocks:i(),rootBlock:c?o(r(c)):null,selectedBlockClientId:c}}),Object(l.withDispatch)(function(e,t){var n=t.onSelect,r=void 0===n?O.noop:n;return{selectBlock:function(t){e("core/editor").selectBlock(t),r(t)}}}))(function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(Br.createElement)(Vr.NavigableMenu,{role:"presentation",className:"editor-block-navigation__container"},Object(Br.createElement)("p",{className:"editor-block-navigation__label"},Object(_.__)("Block Navigation")),i&&Object(Br.createElement)(ko,{blocks:[t],selectedBlockClientId:r,selectBlock:o,showNestedBlocks:!0}),!i&&Object(Br.createElement)(ko,{blocks:n,selectedBlockClientId:r,selectBlock:o}))}),Eo=Object(Br.createElement)(Vr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},Object(Br.createElement)(Vr.Path,{d:"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z"}));var So=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/editor").getBlockCount()}})(function(e){var t=e.hasBlocks;return Object(Br.createElement)(Vr.Dropdown,{renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.a)({},yo.rawShortcut.access("o"),r)}),Object(Br.createElement)(Vr.IconButton,{icon:Eo,"aria-expanded":n,onClick:t?r:void 0,label:Object(_.__)("Block Navigation"),className:"editor-block-navigation",shortcut:yo.displayShortcut.access("o"),"aria-disabled":!t}))},renderContent:function(e){var t=e.onClose;return Object(Br.createElement)(_o,{onSelect:t})}})}),Co=Object(Ar.createHigherOrderComponent)(Object(l.withSelect)(function(e,t){var n=e("core/editor").getEditorSettings(),r=void 0===t.colors?n.colors:t.colors,o=void 0===t.disableCustomColors?n.disableCustomColors:t.disableCustomColors;return{colors:r,disableCustomColors:o,hasColorsToChoose:!Object(O.isEmpty)(r)||!o}}),"withColorContext"),wo=Co(Vr.ColorPalette),To=n(45),Po=n.n(To),Io=function(e,t,n){if(t){var r=Object(O.find)(e,{slug:t});if(r)return r}return{color:n}},Bo=function(e,t){return Object(O.find)(e,{color:t})};function xo(e,t){if(e&&t)return"has-".concat(Object(O.kebabCase)(t),"-").concat(e)}var Lo=[],Ao=function(){for(var e=arguments.length,t=new Array(e),n=0;n=24?"large":"small"}))return null;var l=a.getBrightness()1?function(e,t,n,r,o){var i=t+1;if(o<0&&n)return Object(_.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(_.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(_.sprintf)(Object(_._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,i);if(o>0&&!r)return Object(_.sprintf)(Object(_._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,i)}(e,n,r,o,i):r&&o?Object(_.sprintf)(Object(_.__)("Block %s is the only block, and cannot be moved"),t):i>0&&!o?Object(_.sprintf)(Object(_.__)("Move %1$s block from position %2$d down to position %3$d"),t,c,c+1):i>0&&o?Object(_.sprintf)(Object(_.__)("Block %s is at the end of the content and can’t be moved down"),t):i<0&&!r?Object(_.sprintf)(Object(_.__)("Move %1$s block from position %2$d up to position %3$d"),t,c,c-1):i<0&&r?Object(_.sprintf)(Object(_.__)("Block %s is at the beginning of the content and can’t be moved up"),t):void 0}var zo=Object(Br.createElement)(Vr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Br.createElement)(Vr.Polygon,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),Wo=Object(Br.createElement)(Vr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Br.createElement)(Vr.Polygon,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),qo=Object(Br.createElement)(Vr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Br.createElement)(Vr.Path,{d:"M13,8c0.6,0,1-0.4,1-1s-0.4-1-1-1s-1,0.4-1,1S12.4,8,13,8z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,10 c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,10,5,10z M13,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S13.6,10,13,10z M9,6 C8.4,6,8,6.4,8,7s0.4,1,1,1s1-0.4,1-1S9.6,6,9,6z M9,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S9.6,10,9,10z"})),Go=Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlockIndex,i=r.getBlockRootClientId;return{index:o(n),rootClientId:i(n)}})(function(e){var t=e.children,n=e.clientId,r=e.rootClientId,o=e.blockElementId,i=e.index,c=e.onDragStart,a=e.onDragEnd,s={type:"block",srcIndex:i,srcRootClientId:r,srcClientId:n};return Object(Br.createElement)(Vr.Draggable,{elementId:o,transferData:s,onDragStart:c,onDragEnd:a},function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:r})})}),$o=function(e){var t=e.isVisible,n=e.className,r=e.icon,o=e.onDragStart,i=e.onDragEnd,c=e.blockElementId,a=e.clientId;if(!t)return null;var s=Lr()("editor-block-mover__control-drag-handle",n);return Object(Br.createElement)(Go,{clientId:a,blockElementId:c,onDragStart:o,onDragEnd:i},function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(Br.createElement)("div",{className:s,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},r)})},Yo=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onBlur=e.onBlur.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onFocus",value:function(){this.setState({isFocused:!0})}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.onMoveUp,n=e.onMoveDown,r=e.isFirst,o=e.isLast,i=e.isDraggable,c=e.onDragStart,a=e.onDragEnd,s=e.clientIds,l=e.blockElementId,u=e.blockType,d=e.firstIndex,p=e.isLocked,b=e.instanceId,f=e.isHidden,h=this.state.isFocused,m=Object(O.castArray)(s).length;return p||r&&o?null:Object(Br.createElement)("div",{className:Lr()("editor-block-mover",{"is-visible":h||!f})},Object(Br.createElement)(Vr.IconButton,{className:"editor-block-mover__control",onClick:r?null:t,icon:zo,label:Object(_.__)("Move up"),"aria-describedby":"editor-block-mover__up-description-".concat(b),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Br.createElement)($o,{className:"editor-block-mover__control",icon:qo,clientId:s,blockElementId:l,isVisible:i,onDragStart:c,onDragEnd:a}),Object(Br.createElement)(Vr.IconButton,{className:"editor-block-mover__control",onClick:o?null:n,icon:Wo,label:Object(_.__)("Move down"),"aria-describedby":"editor-block-mover__down-description-".concat(b),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Br.createElement)("span",{id:"editor-block-mover__up-description-".concat(b),className:"editor-block-mover__description"},Ko(m,u&&u.title,d,r,o,-1)),Object(Br.createElement)("span",{id:"editor-block-mover__down-description-".concat(b),className:"editor-block-mover__description"},Ko(m,u&&u.title,d,r,o,1)))}}]),t}(Br.Component),Qo=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlock,c=r.getBlockIndex,a=r.getTemplateLock,s=r.getBlockRootClientId,l=Object(O.first)(Object(O.castArray)(n)),u=o(l),d=s(Object(O.first)(Object(O.castArray)(n)));return{firstIndex:c(l,d),blockType:u?Object(i.getBlockType)(u.name):null,isLocked:"all"===a(d),rootClientId:d}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.rootClientId,o=e("core/editor"),i=o.moveBlocksDown,c=o.moveBlocksUp;return{onMoveDown:Object(O.partial)(i,n,r),onMoveUp:Object(O.partial)(c,n,r)}}),Ar.withInstanceId)(Yo);var Xo=Object(l.withSelect)(function(e){return{hasUploadPermissions:(0,e("core").hasUploadPermissions)()}})(function(e){var t=e.hasUploadPermissions,n=e.fallback,r=void 0===n?null:n,o=e.children;return t?o:r}),Zo=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onHTMLDrop=e.onHTMLDrop.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onDrop=e.onDrop.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"getInsertIndex",value:function(e){var t=this.props.index;if(void 0!==t)return"top"===e.y?t:t+1}},{key:"onFilesDrop",value:function(e,t){var n=Object(i.findTransform)(Object(i.getBlockTransforms)("from"),function(t){return"files"===t.type&&t.isMatch(e)});if(n){var r=this.getInsertIndex(t),o=n.transform(e,this.props.updateBlockAttributes);this.props.insertBlocks(o,r)}}},{key:"onHTMLDrop",value:function(e,t){var n=Object(i.pasteHandler)({HTML:e,mode:"BLOCKS"});n.length&&this.props.insertBlocks(n,this.getInsertIndex(t))}},{key:"onDrop",value:function(e,t){var n=this.props,r=n.rootClientId,o=n.clientId,i=n.index,c=n.getClientIdsOfDescendants,a=function(e){var t={srcRootClientId:null,srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),s=a.srcRootClientId,l=a.srcClientId,u=a.srcIndex,d=a.type;if("block"===d&&l!==o&&!function(e,t){return c([e]).some(function(e){return e===t})}(l,o)){var p,b,f=this.getInsertIndex(t),h=i&&u0&&Object(Br.createElement)("div",{className:"editor-warning__actions"},Br.Children.map(n,function(e,t){return Object(Br.createElement)("span",{key:t,className:"editor-warning__action"},e)}))),o&&Object(Br.createElement)(Vr.Dropdown,{className:"editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Br.createElement)(Vr.IconButton,{icon:"ellipsis",label:Object(_.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(Br.createElement)(Vr.MenuGroup,{label:Object(_.__)("More options")},o.map(function(e,t){return Object(Br.createElement)(Vr.MenuItem,{onClick:e.onClick,key:t},e.title)}))}}))},ti=n(191),ni=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,i=e.actionText,c=e.className;return Object(Br.createElement)("div",{className:c},Object(Br.createElement)("div",{className:"editor-block-compare__content"},Object(Br.createElement)("h2",{className:"editor-block-compare__heading"},t),Object(Br.createElement)("div",{className:"editor-block-compare__html"},n),Object(Br.createElement)("div",{className:"editor-block-compare__preview edit-post-visual-editor"},r)),Object(Br.createElement)("div",{className:"editor-block-compare__action"},Object(Br.createElement)(Vr.Button,{isLarge:!0,tabIndex:"0",onClick:o},i)))},ri=function(e){function t(){return Object(Rr.a)(this,t),Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"getDifference",value:function(e,t){return Object(ti.diffChars)(e,t).map(function(e,t){var n=Lr()({"editor-block-compare__added":e.added,"editor-block-compare__removed":e.removed});return Object(Br.createElement)("span",{key:t,className:n},e.value)})}},{key:"getOriginalContent",value:function(e){return{rawContent:e.originalContent,renderedContent:Object(i.getSaveElement)(e.name,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(O.castArray)(e),n=t.map(function(e){return Object(i.getSaveContent)(e.name,e.attributes,e.innerBlocks)}),r=t.map(function(e){return Object(i.getSaveElement)(e.name,e.attributes,e.innerBlocks)});return{rawContent:n.join(""),renderedContent:r}}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.onKeep,r=e.onConvert,o=e.convertor,i=e.convertButtonText,c=this.getOriginalContent(t),a=this.getConvertedContent(o(t)),s=this.getDifference(c.rawContent,a.rawContent);return Object(Br.createElement)("div",{className:"editor-block-compare__wrapper"},Object(Br.createElement)(ni,{title:Object(_.__)("Current"),className:"editor-block-compare__current",action:n,actionText:Object(_.__)("Convert to HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(Br.createElement)(ni,{title:Object(_.__)("After Conversion"),className:"editor-block-compare__converted",action:r,actionText:i,rawContent:s,renderedContent:a.renderedContent}))}}]),t}(Br.Component),oi=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onCompareClose=n.onCompareClose.bind(Object(Hr.a)(Object(Hr.a)(n))),n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.block,c=!!Object(i.getBlockType)("core/html"),a=this.state.compare,s=[{title:Object(_.__)("Convert to Classic Block"),onClick:r}];return a?Object(Br.createElement)(Vr.Modal,{title:Object(_.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare"},Object(Br.createElement)(ri,{block:o,onKeep:t,onConvert:n,convertor:ii,convertButtonText:Object(_.__)("Convert to Blocks")})):Object(Br.createElement)(ei,{actions:[Object(Br.createElement)(Vr.Button,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!c},Object(_._x)("Resolve","imperative verb")),c&&Object(Br.createElement)(Vr.Button,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},Object(_.__)("Convert to HTML"))],secondaryActions:s},Object(_.__)("This block contains unexpected or invalid content."))}}]),t}(Br.Component),ii=function(e){return Object(i.rawHandler)({HTML:e.originalContent})},ci=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId;return{block:e("core/editor").getBlock(n)}}),Object(l.withDispatch)(function(e,t){var n=t.block,r=e("core/editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(i.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(i.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,ii(n))}}})])(oi),ai=Object(Br.createElement)(ei,null,Object(_.__)("This block has encountered an error and cannot be previewed.")),si=function(){return ai},li=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={hasError:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),t}(Br.Component),ui=n(55),di=n.n(ui),pi=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onBlur=n.onBlur.bind(Object(Hr.a)(Object(Hr.a)(n))),n.state={html:e.block.isValid?Object(i.getBlockContent)(e.block):e.block.originalContent},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(e){Object(O.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:Object(i.getBlockContent)(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=Object(i.getBlockType)(this.props.block.name),n=Object(i.getBlockAttributes)(t,e,this.props.block.attributes),r=e||Object(i.getSaveContent)(t,n),o=!e||Object(i.isValidBlockContent)(t,n,r);this.props.onChange(this.props.clientId,n,r,o),e||this.setState({html:r})}},{key:"onChange",value:function(e){this.setState({html:e.target.value})}},{key:"render",value:function(){var e=this.state.html;return Object(Br.createElement)(di.a,{className:"editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(Br.Component),bi=Object(Ar.compose)([Object(l.withSelect)(function(e,t){return{block:e("core/editor").getBlock(t.clientId)}}),Object(l.withDispatch)(function(e){return{onChange:function(t,n,r,o){e("core/editor").updateBlock(t,{attributes:n,originalContent:r,isValid:o})}}})])(pi);var fi=Object(l.withSelect)(function(e,t){return{name:(0,e("core/editor").getBlockName)(t.clientId)}})(function(e){var t=e.name;if(!t)return null;var n=Object(i.getBlockType)(t);return n?n.title:null}),hi=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onBlur=e.onBlur.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onFocus",value:function(e){this.setState({isFocused:!0}),e.stopPropagation()}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.rootClientId;return Object(Br.createElement)("div",{className:"editor-block-list__breadcrumb"},Object(Br.createElement)(Vr.Toolbar,null,n&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(fi,{clientId:n}),Object(Br.createElement)("span",{className:"editor-block-list__descendant-arrow"})),Object(Br.createElement)(fi,{clientId:t})))}}]),t}(Br.Component),mi=Object(Ar.compose)([Object(l.withSelect)(function(e,t){return{rootClientId:(0,e("core/editor").getBlockRootClientId)(t.clientId)}})])(hi),vi=window,Oi=vi.Node,gi=vi.getSelection,ji=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(Object(Hr.a)(Object(Hr.a)(e))),e.focusSelection=e.focusSelection.bind(Object(Hr.a)(Object(Hr.a)(e))),e.switchOnKeyDown=Object(O.cond)([[Object(O.matchesProperty)(["keyCode"],yo.ESCAPE),e.focusSelection]]),e.toolbar=Object(Br.createRef)(),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"focusToolbar",value:function(){var e=Vo.focus.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=gi();if(e){var t=e.focusNode;t.nodeType!==Oi.ELEMENT_NODE&&(t=t.parentElement),t&&t.focus()}}},{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.focusToolbar()}},{key:"render",value:function(){var e=this.props,t=e.children,n=Object(p.a)(e,["children"]);return Object(Br.createElement)(Vr.NavigableMenu,Object(Ir.a)({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(O.omit)(n,["focusOnMount"])),Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(Br.Component);var yi=function(e){var t=e.focusOnMount;return Object(Br.createElement)(ji,{focusOnMount:t,className:"editor-block-contextual-toolbar","aria-label":Object(_.__)("Block tools")},Object(Br.createElement)(Vl,null))};var ki=Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getMultiSelectedBlockClientIds,i=r.isMultiSelecting,c=r.getBlockIndex,a=r.getBlockCount,s=o(),l=c(Object(O.first)(s),n),u=c(Object(O.last)(s),n);return{multiSelectedBlockClientIds:s,isSelecting:i(),isFirst:0===l,isLast:u+1===a()}})(function(e){var t=e.multiSelectedBlockClientIds,n=e.clientId,r=e.isSelecting,o=e.isFirst,i=e.isLast;return r?null:Object(Br.createElement)(Qo,{key:"mover",clientId:n,clientIds:t,isFirst:o,isLast:i})}),_i=n(59),Ei=n.n(_i);function Si(e){var t=e.name,n=e.attributes,r=Object(i.createBlock)(t,n);return Object(Br.createElement)(Vr.Disabled,{className:"editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object(Br.createElement)(ho,{name:t,focus:!1,attributes:r.attributes,setAttributes:O.noop}))}var Ci=function(e){return Object(Br.createElement)("div",{className:"editor-block-preview"},Object(Br.createElement)("div",{className:"editor-block-preview__title"},Object(_.__)("Preview")),Object(Br.createElement)(Si,e))};var wi=function(e){var t=e.icon,n=e.hasChildBlocksWithInserterSupport,r=e.onClick,o=e.isDisabled,i=e.title,c=e.className,a=Object(p.a)(e,["icon","hasChildBlocksWithInserterSupport","onClick","isDisabled","title","className"]),s=t?{backgroundColor:t.background,color:t.foreground}:{},l=t&&t.shadowColor?{backgroundColor:t.shadowColor}:{};return Object(Br.createElement)("li",{className:"editor-block-types-list__list-item"},Object(Br.createElement)("button",Object(Ir.a)({className:Lr()("editor-block-types-list__item",c,{"editor-block-types-list__item-has-children":n}),onClick:function(e){e.preventDefault(),r()},disabled:o,"aria-label":i},a),Object(Br.createElement)("span",{className:"editor-block-types-list__item-icon",style:s},Object(Br.createElement)(Qr,{icon:t,showColors:!0}),n&&Object(Br.createElement)("span",{className:"editor-block-types-list__item-icon-stack",style:l})),Object(Br.createElement)("span",{className:"editor-block-types-list__item-title"},i)))};var Ti=function(e){var t=e.items,n=e.onSelect,r=e.onHover,o=void 0===r?function(){}:r,c=e.children;return Object(Br.createElement)("ul",{role:"list",className:"editor-block-types-list"},t&&t.map(function(e){return Object(Br.createElement)(wi,{key:e.id,className:Object(i.getBlockMenuDefaultClassName)(e.id),icon:e.icon,hasChildBlocksWithInserterSupport:e.hasChildBlocksWithInserterSupport,onClick:function(){n(e),o(null)},onFocus:function(){return o(e)},onMouseEnter:function(){return o(e)},onMouseLeave:function(){return o(null)},onBlur:function(){return o(null)},isDisabled:e.isDisabled,title:e.title})}),c)};var Pi=Object(Ar.compose)(Object(Ar.ifCondition)(function(e){var t=e.items;return t&&t.length>0}),Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=(0,e("core/blocks").getBlockType)((0,e("core/editor").getBlockName)(n));return{rootBlockTitle:r&&r.title,rootBlockIcon:r&&r.icon}}))(function(e){var t=e.rootBlockIcon,n=e.rootBlockTitle,r=e.items,o=Object(p.a)(e,["rootBlockIcon","rootBlockTitle","items"]);return Object(Br.createElement)("div",{className:"editor-inserter__child-blocks"},(t||n)&&Object(Br.createElement)("div",{className:"editor-inserter__parent-block-header"},Object(Br.createElement)(Qr,{icon:t,showColors:!0}),n&&Object(Br.createElement)("h2",null,n)),Object(Br.createElement)(Ti,Object(Ir.a)({items:r},o)))}),Ii=function(e){var t=e.filterValue;return Object(Br.createElement)(Vr.Slot,{name:"Inserter.InlineElements",fillProps:{filterValue:t}},function(e){return!Object(O.isEmpty)(e)&&Object(Br.createElement)(Vr.PanelBody,{title:Object(_.__)("Inline Elements"),initialOpen:!1,className:"editor-inserter__inline-elements"},Object(Br.createElement)(Ti,null,e))})},Bi=function(e){return e.stopPropagation()},xi=function(e){return e=(e=(e=(e=Object(O.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Li=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onHover=e.onHover.bind(Object(Hr.a)(Object(Hr.a)(e))),e.panels={},e.inserterResults=Object(Br.createRef)(),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.props.fetchReusableBlocks(),this.filter()}},{key:"componentDidUpdate",value:function(e){e.items!==this.props.items&&this.filter(this.state.filterValue)}},{key:"onChangeSearchInput",value:function(e){this.filter(e.target.value)}},{key:"onHover",value:function(e){this.setState({hoveredItem:e});var t=this.props,n=t.showInsertionPoint,r=t.hideInsertionPoint;if(e){var o=this.props;n(o.rootClientId,o.index)}else r()}},{key:"bindPanel",value:function(e){var t=this;return function(n){t.panels[e]=n}}},{key:"onTogglePanel",value:function(e){var t=this;return function(){-1!==t.state.openPanels.indexOf(e)?t.setState({openPanels:Object(O.without)(t.state.openPanels,e)}):(t.setState({openPanels:Object(b.a)(t.state.openPanels).concat([e])}),t.props.setTimeout(function(){Ei()(t.panels[e],t.inserterResults.current,{alignWithTop:!0})}))}}},{key:"filter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.debouncedSpeak,r=t.items,o=t.rootChildBlocks,c=function(e,t){var n=xi(t),r=function(e){return-1!==xi(e).indexOf(n)},o=Object(i.getCategories)();return e.filter(function(e){var t=Object(O.find)(o,{slug:e.category});return r(e.title)||Object(O.some)(e.keywords,r)||t&&r(t.title)})}(r,e),a=Object(O.filter)(c,function(e){var t=e.name;return Object(O.includes)(o,t)}),s=[];if(!e){var l=this.props.maxSuggestedItems||9;s=Object(O.filter)(r,function(e){return e.utility>0}).slice(0,l)}var u=Object(O.filter)(c,{category:"reusable"}),d=function(e){return Object(O.findIndex)(Object(i.getCategories)(),function(t){return t.slug===e.category})},p=Object(O.flow)(function(e){return Object(O.filter)(e,function(e){return"reusable"!==e.category})},function(e){return Object(O.sortBy)(e,d)},function(e){return Object(O.groupBy)(e,"category")})(c),b=this.state.openPanels;if(e!==this.state.filterValue)if(e){if(u.length)b=["reusable"];else if(c.length){b=[Object(O.find)(Object(i.getCategories)(),function(e){var t=e.slug;return p[t]&&p[t].length}).slug]}}else b=["suggested"];this.setState({hoveredItem:null,childItems:a,filterValue:e,suggestedItems:s,reusableItems:u,itemsPerCategory:p,openPanels:b});var f=Object.keys(p).reduce(function(e,t){return e+p[t].length},0);n(Object(_.sprintf)(Object(_._n)("%d result found.","%d results found.",f),f),"assertive")}},{key:"onKeyDown",value:function(e){Object(O.includes)([yo.LEFT,yo.DOWN,yo.RIGHT,yo.UP,yo.BACKSPACE,yo.ENTER],e.keyCode)&&e.stopPropagation()}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.onSelect,o=t.rootClientId,c=this.state,a=c.childItems,s=c.filterValue,l=c.hoveredItem,u=c.suggestedItems,d=c.reusableItems,p=c.itemsPerCategory,b=c.openPanels,f=function(e){return-1!==b.indexOf(e)},h=!!s;return Object(Br.createElement)("div",{className:"editor-inserter__menu",onKeyPress:Bi,onKeyDown:this.onKeyDown},Object(Br.createElement)("label",{htmlFor:"editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(_.__)("Search for a block")),Object(Br.createElement)("input",{id:"editor-inserter__search-".concat(n),type:"search",placeholder:Object(_.__)("Search for a block"),className:"editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(Br.createElement)("div",{className:"editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":Object(_.__)("Available block types")},Object(Br.createElement)(Pi,{rootClientId:o,items:a,onSelect:r,onHover:this.onHover}),!!u.length&&Object(Br.createElement)(Vr.PanelBody,{title:Object(_._x)("Most Used","blocks"),opened:f("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(Br.createElement)(Ti,{items:u,onSelect:r,onHover:this.onHover})),Object(Br.createElement)(Ii,{filterValue:s}),Object(O.map)(Object(i.getCategories)(),function(t){var n=p[t.slug];return n&&n.length?Object(Br.createElement)(Vr.PanelBody,{key:t.slug,title:t.title,icon:t.icon,opened:h||f(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(Br.createElement)(Ti,{items:n,onSelect:r,onHover:e.onHover})):null}),!!d.length&&Object(Br.createElement)(Vr.PanelBody,{className:"editor-inserter__reusable-blocks-panel",title:Object(_.__)("Reusable"),opened:f("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(Br.createElement)(Ti,{items:d,onSelect:r,onHover:this.onHover}),Object(Br.createElement)("a",{className:"editor-inserter__manage-reusable-blocks",href:"edit.php?post_type=wp_block"},Object(_.__)("Manage All Reusable Blocks"))),Object(O.isEmpty)(u)&&Object(O.isEmpty)(d)&&Object(O.isEmpty)(p)&&Object(Br.createElement)("p",{className:"editor-inserter__no-results"},Object(_.__)("No blocks found."))),l&&Object(i.isReusableBlock)(l)&&Object(Br.createElement)(Ci,{name:l.name,attributes:l.initialAttributes}))}}]),t}(Br.Component),Ai=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getEditedPostAttribute,i=r.getSelectedBlock,c=r.getInserterItems,a=r.getBlockName,s=e("core/blocks").getChildBlockNames,l=a(n);return{selectedBlock:i(),rootChildBlocks:s(l),title:o("title"),items:c(n),rootClientId:n}}),Object(l.withDispatch)(function(e,t){var n=e("core/editor");return{fetchReusableBlocks:n.__experimentalFetchReusableBlocks,showInsertionPoint:n.showInsertionPoint,hideInsertionPoint:n.hideInsertionPoint,onSelect:function(n){var r=e("core/editor"),o=r.replaceBlocks,c=r.insertBlock,a=t.selectedBlock,s=t.index,l=t.rootClientId,u=n.name,d=n.initialAttributes,p=Object(i.createBlock)(u,d);a&&Object(i.isUnmodifiedDefaultBlock)(a)?o(a.clientId,p):c(p,s,l),t.onSelect()}}}),Vr.withSpokenMessages,Ar.withInstanceId,Ar.withSafeTimeout)(Li),Ni=function(e){var t=e.onToggle,n=e.disabled,r=e.isOpen;return Object(Br.createElement)(Vr.IconButton,{icon:"insert",label:Object(_.__)("Add block"),labelPosition:"bottom",onClick:t,className:"editor-inserter__toggle","aria-haspopup":"true","aria-expanded":r,disabled:n})},Ri=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onToggle=e.onToggle.bind(Object(Hr.a)(Object(Hr.a)(e))),e.renderToggle=e.renderToggle.bind(Object(Hr.a)(Object(Hr.a)(e))),e.renderContent=e.renderContent.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,i=r.renderToggle,c=void 0===i?Ni:i;return c({onToggle:t,isOpen:n,disabled:o})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.index;return Object(Br.createElement)(Ai,{onSelect:t,rootClientId:r,index:o})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.title;return Object(Br.createElement)(Vr.Dropdown,{className:"editor-inserter",contentClassName:"editor-inserter__popover",position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:n,renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),t}(Br.Component),Di=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=t.index,o=e("core/editor"),i=o.getEditedPostAttribute,c=o.getBlockInsertionPoint,a=o.hasInserterItems;if(void 0===n&&void 0===r){var s=c();n=s.rootClientId,r=s.index}return{title:i("title"),hasItems:a(n),rootClientId:n,index:r}}),Object(Ar.ifCondition)(function(e){return e.hasItems})])(Ri);var Fi=Object(s.ifViewportMatches)("< small")(function(e){var t=e.clientId;return Object(Br.createElement)("div",{className:"editor-block-list__block-mobile-toolbar"},Object(Br.createElement)(Di,null),Object(Br.createElement)(Qo,{clientIds:[t]}))}),Mi=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onFocusInserter=e.onFocusInserter.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onFocusInserter",value:function(e){e.stopPropagation(),this.setState({isInserterFocused:!0})}},{key:"onBlurInserter",value:function(){this.setState({isInserterFocused:!1})}},{key:"render",value:function(){var e=this.state.isInserterFocused,t=this.props,n=t.showInsertionPoint,r=t.rootClientId,o=t.insertIndex;return Object(Br.createElement)("div",{className:"editor-block-list__insertion-point"},n&&Object(Br.createElement)("div",{className:"editor-block-list__insertion-point-indicator"}),Object(Br.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:Lr()("editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(Br.createElement)(Di,{rootClientId:r,index:o})))}}]),t}(Br.Component),Ui=Object(l.withSelect)(function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/editor"),i=o.getBlockIndex,c=o.getBlockInsertionPoint,a=o.isBlockInsertionPointVisible,s=i(n,r),l=c();return{showInsertionPoint:a()&&l.index===s&&l.rootClientId===r,insertIndex:s}})(Mi),Hi=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Object(Hr.a)(Object(Hr.a)(e))),e.eventMap={},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"proxyEvent",value:function(e){var t=!!e.nativeEvent._blockHandled;e.nativeEvent._blockHandled=!0;var n=this.eventMap[e.type];t&&(n+="Handled"),this.props[n]&&this.props[n](e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.childHandledEvents,r=void 0===n?[]:n,o=t.forwardedRef,i=Object(p.a)(t,["childHandledEvents","forwardedRef"]),c=Object(O.reduce)(Object(b.a)(r).concat(Object(b.a)(Object.keys(i))),function(t,n){var r=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/);if(r){!!r[2]&&delete i[n];var o="on"+r[1];t[o]=e.proxyEvent,e.eventMap[r[1].toLowerCase()]=o}return t},{});return Object(Br.createElement)("div",Object(Ir.a)({ref:o},i,c))}}]),t}(Br.Component),Vi=function(e,t){return Object(Br.createElement)(Hi,Object(Ir.a)({},e,{forwardedRef:t}))};Vi.displayName="IgnoreNestedEvents";var Ki=Object(Br.forwardRef)(Vi);var zi=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getInserterItems,i=r.getTemplateLock;return{items:o(n),isLocked:!!i(n)}}),Object(l.withDispatch)(function(e,t){var n=t.clientId,r=t.rootClientId;return{onInsert:function(t){var o=t.name,c=t.initialAttributes,a=Object(i.createBlock)(o,c);n?e("core/editor").replaceBlocks(n,a):e("core/editor").insertBlock(a,void 0,r)}}}))(function(e){var t=e.items,n=e.isLocked,r=e.onInsert;if(n)return null;var o=Object(O.filter)(t,function(e){return!(e.isDisabled||e.name===Object(i.getDefaultBlockName)()&&Object(O.isEmpty)(e.initialAttributes))}).slice(0,3);return Object(Br.createElement)("div",{className:"editor-inserter-with-shortcuts"},o.map(function(e){return Object(Br.createElement)(Vr.IconButton,{key:e.id,className:"editor-inserter-with-shortcuts__block",onClick:function(){return r(e)},label:Object(_.sprintf)(Object(_.__)("Add %s"),e.title),icon:Object(Br.createElement)(Qr,{icon:e.icon})})}))}),Wi=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={hoverArea:null},e.onMouseLeave=e.onMouseLeave.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onMouseMove=e.onMouseMove.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentWillUnmount",value:function(){this.props.container&&this.toggleListeners(this.props.container,!1)}},{key:"componentDidMount",value:function(){this.props.container&&this.toggleListeners(this.props.container)}},{key:"componentDidUpdate",value:function(e){e.container!==this.props.container&&(e.container&&this.toggleListeners(e.container,!1),this.props.container&&this.toggleListeners(this.props.container,!0))}},{key:"toggleListeners",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?"addEventListener":"removeEventListener";e[t]("mousemove",this.onMouseMove),e[t]("mouseleave",this.onMouseLeave)}},{key:"onMouseLeave",value:function(){this.state.hoverArea&&this.setState({hoverArea:null})}},{key:"onMouseMove",value:function(e){var t=this.props,n=t.isRTL,r=t.container.getBoundingClientRect(),o=r.width,i=r.left,c=r.right,a=null;e.clientX-i0&&void 0!==arguments[0]?arguments[0]:t.clientId,n=arguments.length>1?arguments[1]:void 0;a(e,n)},onInsertBlocks:function(e,n){var r=t.rootClientId;l(e,n,r)},onInsertDefaultBlockAfter:function(){var e=t.order,n=t.rootClientId;u({},n,e+1)},onRemove:function(e){d(e)},onMerge:function(e){var n=t.clientId,o=r("core/editor"),i=o.getPreviousBlockClientId,c=o.getNextBlockClientId;if(e){var a=c(n);a&&p(n,a)}else{var s=i(n);s&&p(s,n)}},onReplace:function(e){b([t.clientId],e)},onMetaChange:function(e){f({meta:e})},onShiftSelection:function(){t.isSelectionEnabled&&(o()?s(o(),t.clientId):a(t.clientId))},toggleSelection:function(e){h(e)}}}),Xi=Object(Ar.compose)(Object(s.withViewportMatch)({isLargeViewport:"medium"}),Yi,Qi,Object(Vr.withFilters)("editor.BlockListBlock"))($i),Zi=n(49);var Ji=Object(Ar.compose)(Object(Ar.withState)({hovered:!1}),Object(l.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlockCount,o=n.getBlockName,c=n.isBlockValid,a=n.getEditorSettings,s=n.getTemplateLock,l=!r(t.rootClientId),u=o(t.lastBlockClientId)===Object(i.getDefaultBlockName)(),d=c(t.lastBlockClientId),p=a().bodyPlaceholder;return{isVisible:l||!u||!d,showPrompt:l,isLocked:!!s(t.rootClientId),placeholder:p}}),Object(l.withDispatch)(function(e,t){var n=e("core/editor"),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}}))(function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,i=e.placeholder,c=e.rootClientId,a=e.hovered,s=e.setState;if(t||!n)return null;var l=Object(Zi.decodeEntities)(i)||Object(_.__)("Start writing or type / to choose a block");return Object(Br.createElement)("div",{"data-root-client-id":c||"",className:"wp-block editor-default-block-appender",onMouseEnter:function(){return s({hovered:!0})},onMouseLeave:function(){return s({hovered:!1})}},Object(Br.createElement)(Jo,{rootClientId:c}),Object(Br.createElement)(di.a,{role:"button","aria-label":Object(_.__)("Add block"),className:"editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?l:""}),a&&Object(Br.createElement)(zi,{rootClientId:c}),Object(Br.createElement)(Di,{position:"top right"}))});var ec=Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getBlockOrder,c=r.canInsertBlockType;return{isLocked:!!(0,r.getTemplateLock)(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(i.getDefaultBlockName)(),n)}})(function(e){var t=e.blockClientIds,n=e.rootClientId,r=e.canInsertDefaultBlock;return e.isLocked?null:r?Object(Br.createElement)(Ki,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(Br.createElement)(Ji,{rootClientId:n,lastBlockClientId:Object(O.last)(t)})):Object(Br.createElement)("div",{className:"block-list-appender"},Object(Br.createElement)(Di,{rootClientId:n,renderToggle:function(e){var t=e.onToggle,n=e.disabled,r=e.isOpen;return Object(Br.createElement)(Vr.Button,{"aria-label":Object(_.__)("Add block"),onClick:t,className:"block-list-appender__toggle","aria-haspopup":"true","aria-expanded":r,disabled:n},Object(Br.createElement)(Vr.Dashicon,{icon:"insert"}))}}))}),tc=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onSelectionEnd=n.onSelectionEnd.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setBlockRef=n.setBlockRef.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setLastClientY=n.setLastClientY.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onPointerMove=Object(O.throttle)(n.onPointerMove.bind(Object(Hr.a)(Object(Hr.a)(n))),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("mousemove",this.setLastClientY)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mousemove",this.setLastClientY)}},{key:"setLastClientY",value:function(e){var t=e.clientY;this.lastClientY=t}},{key:"setBlockRef",value:function(e,t){null===e?delete this.nodes[t]:this.nodes=Object(d.a)({},this.nodes,Object(f.a)({},t,e))}},{key:"onPointerMove",value:function(e){var t=e.clientY;this.props.isMultiSelecting||this.props.onStartMultiSelect();var n=Gi(this.selectionAtStart).getBoundingClientRect();if(!(t>=n.top&&t<=n.bottom)){var r=t-n.top,o=Object(O.findLast)(this.coordMapKeys,function(e){return e0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return!function(e,t){return void 0!==t.disableCustomColors?t.disableCustomColors:e}(t,n)||(n.colors||e).length>0}(t,n,e)})})(function(e){var t=e.children,n=e.colors,r=e.colorSettings,o=e.disableCustomColors,i=e.title,c=Object(p.a)(e,["children","colors","colorSettings","disableCustomColors","title"]),a=Object(Br.createElement)("span",{className:"".concat("editor-panel-color-settings","__panel-title")},i,function(e,t){return e.map(function(e,n){var r=e.value,o=e.label,i=e.colors;if(!r)return null;var c=Bo(i||t,r),a=c&&c.name,s=Object(_.sprintf)(vc,o.toLowerCase(),a||r);return Object(Br.createElement)(Vr.ColorIndicator,{key:n,colorValue:r,"aria-label":s})})}(r,n));return Object(Br.createElement)(Vr.PanelBody,Object(Ir.a)({className:"editor-panel-color-settings",title:a},c),r.map(function(e,t){return Object(Br.createElement)(mc,Object(Ir.a)({key:t},Object(d.a)({colors:n,disableCustomColors:o},e)))}),t)}),gc=Co(Oc);var jc=function(e){var t=e.onChange,n=e.className,r=Object(p.a)(e,["onChange","className"]);return Object(Br.createElement)(di.a,Object(Ir.a)({className:Lr()("editor-plain-text",n),onChange:function(e){return t(e.target.value)}},r))},yc=n(41),kc=n.n(yc),_c=n(32),Ec=n(65),Sc=n.n(Ec),Cc=Object(l.withSelect)(function(e){return{formatTypes:(0,e("core/rich-text").getFormatTypes)()}})(function(e){var t=e.formatTypes,n=e.onChange,r=e.value;return Object(Br.createElement)(Br.Fragment,null,t.map(function(e){var t=e.name,o=e.edit;if(!o)return null;var i=Object(a.getActiveFormat)(r,t),c=void 0!==i,s=c&&i.attributes||{};return Object(Br.createElement)(o,{key:t,isActive:c,activeAttributes:s,value:r,onChange:n})}))}),wc=function(e){var t=e.controls;return Object(Br.createElement)("div",{className:"editor-format-toolbar"},Object(Br.createElement)(Vr.Toolbar,null,t.map(function(e){return Object(Br.createElement)(Vr.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})}),Object(Br.createElement)(Vr.Slot,{name:"RichText.ToolbarControls"})))},Tc=n(192),Pc=n.n(Tc),Ic=function(e){return Object(O.pickBy)(e,function(e,t){return n=t,Object(O.startsWith)(n,"aria-")&&!Object(O.isNil)(e);var n})},Bc=window.getSelection,xc=window.Node.TEXT_NODE,Lc=window.navigator.userAgent;var Ac=Lc.indexOf("Trident")>=0,Nc=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onFocus=e.onFocus.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(Hr.a)(Object(Hr.a)(e))),e.initialize=e.initialize.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onFocus",value:function(){this.props.onFocus&&this.props.onFocus(),this.initialize()}},{key:"shouldComponentUpdate",value:function(e){var t=this;this.configureIsPlaceholderVisible(e.isPlaceholderVisible),Object(O.isEqual)(this.props.style,e.style)||(this.editorNode.setAttribute("style",""),Object.assign(this.editorNode.style,e.style)),Object(O.isEqual)(this.props.className,e.className)||(this.editorNode.className=Lr()(e.className,"editor-rich-text__tinymce"));var n=function(e,t){var n=Object(O.keys)(Ic(e)),r=Object(O.keys)(Ic(t));return{removedKeys:Object(O.difference)(n,r),updatedKeys:r.filter(function(n){return!Object(O.isEqual)(e[n],t[n])})}}(this.props,e),r=n.removedKeys,o=n.updatedKeys;return r.forEach(function(e){return t.editorNode.removeAttribute(e)}),o.forEach(function(n){return t.editorNode.setAttribute(n,e[n])}),!1}},{key:"componentWillUnmount",value:function(){this.editor&&(this.editor.destroy(),delete this.editor)}},{key:"configureIsPlaceholderVisible",value:function(e){var t=String(!!e);this.editorNode.getAttribute("data-is-placeholder-visible")!==t&&this.editorNode.setAttribute("data-is-placeholder-visible",t)}},{key:"initialize",value:function(){var e=this;if(!this.initialize.called){this.initialize.called=!0;var t=this.props.multilineTag,n={theme:!1,inline:!0,toolbar:!1,browser_spellcheck:!0,entity_encoding:"raw",convert_urls:!1,verify_html:!1,inline_boundaries_selector:"a[href],code,b,i,strong,em,del,ins,sup,sub",plugins:[],forced_root_block:t||!1,custom_undo_redo_levels:1,lists_indent_on_tab:!1};"li"===t&&n.plugins.push("lists"),Pc.a.init(Object(d.a)({},n,{target:this.editorNode,setup:function(t){var n;e.editor=t,e.props.onSetup(t),t.on("preinit",function(){n=t.dom.setHTML,t.dom.setHTML=function(){}}),t.on("init",function(){["z","y"].forEach(function(e){t.shortcuts.remove("meta+".concat(e))}),t.shortcuts.remove("meta+shift+z"),["b","i","u"].forEach(function(e){t.shortcuts.remove("meta+".concat(e))}),[1,2,3,4,5,6,7,8,9].forEach(function(e){t.shortcuts.remove("access+".concat(e))}),t.dom.setHTML=n,Ac&&document.activeElement!==e.editorNode&&document.activeElement.contains(e.editorNode)&&e.editorNode.focus()}),t.on("keydown",e.onKeyDown,!0)}}))}}},{key:"bindEditorNode",value:function(e){this.editorNode=e,this.props.setRef&&this.props.setRef(e),Ac&&(e?this.removeInternetExplorerInputFix=function(e){function t(e){e.stopImmediatePropagation();var t=document.createEvent("Event");t.initEvent("input",!0,!1),t.data=e.data,e.target.dispatchEvent(t)}function n(t){var n=t.target,r=t.keyCode;if((yo.BACKSPACE===r||yo.DELETE===r)&&e.contains(n)){var o=document.createEvent("Event");o.initEvent("input",!0,!1),o.data=null,n.dispatchEvent(o)}}return e.addEventListener("textinput",t),document.addEventListener("keyup",n,!0),function(){e.removeEventListener("textinput",t),document.removeEventListener("keyup",n,!0)}}(e):this.removeInternetExplorerInputFix())}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=t===yo.DELETE||t===yo.BACKSPACE;if(t===yo.ENTER||n&&Object(Vo.isEntirelySelected)(this.editorNode))return e.preventDefault(),!1;if(t===yo.LEFT||t===yo.RIGHT){var r=Bc().focusNode,o=r.nodeType,i=r.nodeValue;if(o===xc)if(1===i.length&&"\ufeff"===i[0])r[e.keyCode===yo.LEFT?"previousSibling":"nextSibling"]||(e.preventDefault=O.noop)}}},{key:"render",value:function(){var e,t=Ic(this.props),n=this.props,r=n.tagName,o=void 0===r?"div":r,i=n.style,c=n.record,a=n.valueToEditableHTML,s=n.className,l=n.isPlaceholderVisible,u=n.onPaste,p=n.onInput,b=n.onKeyDown,h=n.onCompositionEnd,m=n.onBlur;return"table"!==o&&(t.role="textbox",t["aria-multiline"]=!0),Object(Br.createElement)(o,Object(d.a)({},t,(e={className:Lr()(s,"editor-rich-text__tinymce"),contentEditable:!0},Object(f.a)(e,"data-is-placeholder-visible",l),Object(f.a)(e,"ref",this.bindEditorNode),Object(f.a)(e,"style",i),Object(f.a)(e,"suppressContentEditableWarning",!0),Object(f.a)(e,"dangerouslySetInnerHTML",{__html:a(c)}),Object(f.a)(e,"onPaste",u),Object(f.a)(e,"onInput",p),Object(f.a)(e,"onFocus",this.onFocus),Object(f.a)(e,"onBlur",m),Object(f.a)(e,"onKeyDown",b),Object(f.a)(e,"onCompositionEnd",h),e)))}}]),t}(Br.Component);var Rc=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onUse=e.onUse.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onUse",value:function(){return this.props.onUse(),!1}},{key:"render",value:function(){var e=this.props,t=e.character,n=e.type;return Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.a)({},yo.rawShortcut[n](t),this.onUse)})}}]),t}(Br.Component);function Dc(e){return!e.selection||e.selection.getNode().closest("ol,ul")===e.getBody()}function Fc(e,t,n){if(document.activeElement!==e.getBody())return t===n;var r=e.selection.getNode().closest("ol,ul");return r?r.nodeName.toLowerCase()===t:void 0}var Mc=function(e){var t=e.editor,n=e.onTagNameChange,r=e.tagName,o=e.onSyncDOM;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Rc,{type:"primary",character:"[",onUse:function(){t.execCommand("Outdent"),o()}}),Object(Br.createElement)(Rc,{type:"primary",character:"]",onUse:function(){t.execCommand("Indent"),o()}}),Object(Br.createElement)(Rc,{type:"primary",character:"m",onUse:function(){t.execCommand("Indent"),o()}}),Object(Br.createElement)(Rc,{type:"primaryShift",character:"m",onUse:function(){t.execCommand("Outdent"),o()}}),Object(Br.createElement)(jo,null,Object(Br.createElement)(Vr.Toolbar,{controls:[{icon:"editor-ul",title:Object(_.__)("Convert to unordered list"),isActive:Fc(t,"ul",r),onClick:function(){Dc(t)?n("ul"):(t.execCommand("InsertUnorderedList"),o())}},{icon:"editor-ol",title:Object(_.__)("Convert to ordered list"),isActive:Fc(t,"ol",r),onClick:function(){Dc(t)?n("ol"):(t.execCommand("InsertOrderedList"),o())}},{icon:"editor-outdent",title:Object(_.__)("Outdent list item"),onClick:function(){t.execCommand("Outdent"),o()}},{icon:"editor-indent",title:Object(_.__)("Indent list item"),onClick:function(){t.execCommand("Indent"),o()}}]})))},Uc=[yo.rawShortcut.primary("z"),yo.rawShortcut.primaryShift("z"),yo.rawShortcut.primary("y")],Hc=Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(O.fromPairs)(Uc.map(function(e){return[e,function(e){return e.preventDefault()}]}))}),Vc=function(){return Hc};function Kc(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,i=Object(p.a)(e,["name","shortcutType","shortcutCharacter"]),c="RichText.ToolbarControls";return n&&(c+=".".concat(n)),r&&o&&(t=yo.displayShortcut[r](o)),Object(Br.createElement)(Vr.Fill,{name:c},Object(Br.createElement)(Vr.ToolbarButton,Object(Ir.a)({},i,{shortcut:t})))}var zc=Object(l.withSelect)(function(e,t){var n=t.name;return{formatType:e("core/rich-text").getFormatType(n)}})(function(e){return Object(Br.createElement)(Vr.Fill,{name:"Inserter.InlineElements"},function(t){var n=t.filterValue,r=e.formatType,o=r.keywords,c=void 0===o?[]:o,a=r.title;return c.push(a,e.title),n&&!function(e,t){return e.some(function(e){return-1!==xi(e).indexOf(xi(t))})}(c,n)?null:Object(Br.createElement)(wi,Object(Ir.a)({},e,{icon:Object(i.normalizeIconObject)(e.icon)}))})}),Wc=window.getSelection,qc=function(e){function t(e){var n,r=e.value,o=e.onReplace,c=e.multiline;return Object(Rr.a)(this,t),n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments)),!0!==c&&"p"!==c&&"li"!==c||(n.multilineTag=!0===c?"p":c),"li"===n.multilineTag&&(n.multilineWrapperTags=["ul","ol"]),n.props.onSplit?(n.onSplit=n.props.onSplit,Sc()("wp.editor.RichText onSplit prop",{plugin:"Gutenberg",alternative:"wp.editor.RichText unstableOnSplit prop"})):n.props.unstableOnSplit&&(n.onSplit=n.props.unstableOnSplit),n.onSetup=n.onSetup.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onFocus=n.onFocus.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onBlur=n.onBlur.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onChange=n.onChange.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onDeleteKeyDown=n.onDeleteKeyDown.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onPaste=n.onPaste.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onCreateUndoLevel=n.onCreateUndoLevel.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setFocusedElement=n.setFocusedElement.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onInput=n.onInput.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onCompositionEnd=n.onCompositionEnd.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onSelectionChange=n.onSelectionChange.bind(Object(Hr.a)(Object(Hr.a)(n))),n.getRecord=n.getRecord.bind(Object(Hr.a)(Object(Hr.a)(n))),n.createRecord=n.createRecord.bind(Object(Hr.a)(Object(Hr.a)(n))),n.applyRecord=n.applyRecord.bind(Object(Hr.a)(Object(Hr.a)(n))),n.isEmpty=n.isEmpty.bind(Object(Hr.a)(Object(Hr.a)(n))),n.valueToFormat=n.valueToFormat.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setRef=n.setRef.bind(Object(Hr.a)(Object(Hr.a)(n))),n.valueToEditableHTML=n.valueToEditableHTML.bind(Object(Hr.a)(Object(Hr.a)(n))),n.formatToValue=kc()(n.formatToValue.bind(Object(Hr.a)(Object(Hr.a)(n))),{size:1}),n.savedContent=r,n.patterns=function(e){var t=e.onReplace,n=e.valueToFormat,r=e.onCreateUndoLevel,o=e.onChange,c=Object(i.getBlockTransforms)("from").filter(function(e){return"prefix"===e.type});return[function(e){if(!t)return e;var o=Object(a.getSelectionStart)(e),s=Object(a.getTextContent)(e),l=s.slice(o-1,o);if(!/\s/.test(l))return e;var u=s.slice(0,o).trim(),d=Object(i.findTransform)(c,function(e){var t=e.prefix;return u===t});if(!d)return e;var p=n(Object(a.slice)(e,o,s.length)),b=d.transform(p);return r(),t([b]),e},function(e){var t=Object(a.getSelectionStart)(e),n=Object(a.getTextContent)(e);if("`"!==n.slice(t-1,t))return e;var r=n.slice(0,t-1).lastIndexOf("`");if(-1===r)return e;var i=r,c=t-2;return i===c?e:(o(e),e=Object(a.remove)(e,i,i+1),e=Object(a.remove)(e,c,c+1),e=Object(a.applyFormat)(e,{type:"code"},i,c))}]}({onReplace:o,onCreateUndoLevel:n.onCreateUndoLevel,valueToFormat:n.valueToFormat,onChange:n.onChange}),n.enterPatterns=Object(i.getBlockTransforms)("from").filter(function(e){return"enter"===e.type}),n.state={},n.usedDeprecatedChildrenSource=Array.isArray(r),n.lastHistoryValue=r,n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentWillUnmount",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"setRef",value:function(e){this.editableRef=e}},{key:"onSetup",value:function(e){this.editor=e}},{key:"setFocusedElement",value:function(){this.props.setFocusedElement&&this.props.setFocusedElement(this.props.instanceId)}},{key:"getRecord",value:function(){var e=this.formatToValue(this.props.value),t=e.formats,n=e.text,r=this.state;return{formats:t,text:n,start:r.start,end:r.end}}},{key:"createRecord",value:function(){var e=Wc().getRangeAt(0);return Object(a.create)({element:this.editableRef,range:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,removeNode:function(e){return"all"===e.getAttribute("data-mce-bogus")},unwrapNode:function(e){return!!e.getAttribute("data-mce-bogus")},removeAttribute:function(e){return 0===e.indexOf("data-mce-")},filterString:function(e){return e.replace("\ufeff","")},prepareEditableTree:this.props.prepareEditableTree})}},{key:"applyRecord",value:function(e){Object(a.apply)({value:e,current:this.editableRef,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,createLinePadding:function(e){var t=e.createElement("br");return t.setAttribute("data-mce-bogus","1"),t},prepareEditableTree:this.props.prepareEditableTree})}},{key:"isEmpty",value:function(){return Object(a.isEmpty)(this.formatToValue(this.props.value))}},{key:"onPaste",value:function(e){var t=e.clipboardData,n=t.items,r=t.files;n=Object(O.isNil)(n)?[]:n,r=Object(O.isNil)(r)?[]:r;var o="",c="";try{o=t.getData("text/plain"),c=t.getData("text/html")}catch(e){try{c=t.getData("Text")}catch(e){return}}e.preventDefault(),window.console.log("Received HTML:\n\n",c),window.console.log("Received plain text:\n\n",o);var s=Object(O.find)(Object(b.a)(n).concat(Object(b.a)(r)),function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)});if(s&&!c){var l=s.getAsFile?s.getAsFile():s,u=Object(i.pasteHandler)({HTML:''),mode:"BLOCKS",tagName:this.props.tagName}),d=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",l),void(d?this.props.onReplace(u):this.onSplit&&this.splitContent(u))}var p=this.getRecord();if(!Object(a.isCollapsed)(p)){var f=(c||o).replace(/<[^>]+>/g,"").trim();if(Object(g.isURL)(f))return this.onChange(Object(a.applyFormat)(p,{type:"a",attributes:{href:Object(Zi.decodeEntities)(f)}})),void window.console.log("Created link:\n\n",f)}var h=this.props.onReplace&&this.isEmpty(),m="INLINE";h?m="BLOCKS":this.onSplit&&(m="AUTO");var v=Object(i.pasteHandler)({HTML:c,plainText:o,mode:m,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof v){var j=Object(a.create)({html:v});this.onChange(Object(a.insert)(p,j))}else if(this.onSplit){if(!v.length)return;h?this.props.onReplace(v):this.splitContent(v,{paste:!0})}}},{key:"onFocus",value:function(){var e=this.props.unstableOnFocus;e&&e(),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onBlur",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"onInput",value:function(e){if(!e.nativeEvent.isComposing){var t=this.createRecord(),n=this.patterns.reduce(function(e,t){return t(e)},t);this.onChange(n,{withoutHistory:!0}),this.props.clearTimeout(this.onInput.timeout),this.onInput.timeout=this.props.setTimeout(this.onCreateUndoLevel,1e3)}}},{key:"onCompositionEnd",value:function(){this.onChange(this.createRecord())}},{key:"onSelectionChange",value:function(){var e=this.createRecord(),t=e.start,n=e.end,r=e.formats;if(t!==this.state.start||n!==this.state.end){var o=this.props.isCaretWithinFormattedText;!o&&r[t]?this.props.onEnterFormattedText():o&&!r[t]&&this.props.onExitFormattedText(),this.setState({start:t,end:n})}}},{key:"onChangeEditableValue",value:function(e){var t=e.formats,n=e.text;Object(O.get)(this.props,["onChangeEditableValue"],[]).forEach(function(e){e(t,n)})}},{key:"onChange",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).withoutHistory;this.applyRecord(e);var n=e.start,r=e.end;this.onChangeEditableValue(e),this.savedContent=this.valueToFormat(e),this.props.onChange(this.savedContent),this.setState({start:n,end:r}),t||this.onCreateUndoLevel()}},{key:"onCreateUndoLevel",value:function(){this.lastHistoryValue!==this.savedContent&&(this.props.onCreateUndoLevel(),this.lastHistoryValue=this.savedContent)}},{key:"onDeleteKeyDown",value:function(e){var t=this.props,n=t.onMerge,r=t.onRemove;if(n||r){var o=e.keyCode===yo.BACKSPACE;if(Object(a.isCollapsed)(this.createRecord())){var i=this.isEmpty();(i||Object(Vo.isHorizontalEdge)(this.editableRef,o))&&(n&&n(!o),r&&i&&o&&r(!o),e.preventDefault())}}}},{key:"onKeyDown",value:function(e){var t=e.keyCode;if(t===yo.DELETE||t===yo.BACKSPACE){var n,r=this.createRecord(),o=Object(a.getSelectionStart)(r),c=Object(a.getSelectionEnd)(r);if(0===o&&0!==c&&c===r.text.length)return this.onChange(Object(a.remove)(r)),void e.preventDefault();if(this.multilineTag)t===yo.BACKSPACE?Object(a.charAt)(r,o-1)===a.LINE_SEPARATOR&&(n=Object(a.remove)(r,Object(a.isCollapsed)(r)?o-1:o,c)):Object(a.charAt)(r,c)===a.LINE_SEPARATOR&&(n=Object(a.remove)(r,o,Object(a.isCollapsed)(r)?c+1:c)),n&&(this.onChange(n),e.preventDefault());this.onDeleteKeyDown(e)}else if(t===yo.ENTER){e.preventDefault();var s=this.createRecord();if(this.props.onReplace){var l=Object(a.getTextContent)(s),u=Object(i.findTransform)(this.enterPatterns,function(e){return e.regExp.test(l)});if(u)return void this.props.onReplace([u.transform({content:l})])}if(this.multilineTag)this.onSplit&&Object(a.isEmptyLine)(s)?this.onSplit.apply(this,Object(b.a)(Object(a.split)(s).map(this.valueToFormat))):this.onChange(Object(a.insertLineSeparator)(s));else if(e.shiftKey||!this.onSplit){var d=Object(a.getTextContent)(s),p=d.length,f="\n";s.end!==p||"\n"===d.charAt(p-1)&&0!==p||(f="\n\n"),this.onChange(Object(a.insert)(s,f))}else this.splitContent()}}},{key:"splitContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.onSplit){var n=this.createRecord(),r=Object(a.split)(n),o=Object(u.a)(r,2),i=o[0],c=o[1];Object(a.isEmpty)(c)?i=n:Object(a.isEmpty)(i)&&(c=n),t.paste&&(i=Object(a.isEmpty)(i)?null:i,c=Object(a.isEmpty)(c)?null:c),i&&(i=this.valueToFormat(i)),c&&(c=this.valueToFormat(c)),this.onSplit.apply(this,[i,c].concat(Object(b.a)(e)))}}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,r=n.tagName,o=n.value,i=n.isSelected;if(r===e.tagName&&o!==e.value&&o!==this.savedContent){if(Array.isArray(o)&&Object(O.isEqual)(o,this.savedContent))return;var c=this.formatToValue(o);if(i){var s=this.formatToValue(e.value),l=Object(a.getTextContent)(s).length;c.start=l,c.end=l}this.applyRecord(c),this.savedContent=o}if(Object.keys(this.props).some(function(n){return 0===n.indexOf("format_")&&(Object(O.isPlainObject)(t.props[n])?Object.keys(t.props[n]).some(function(r){return t.props[n][r]!==e[n][r]}):t.props[n]!==e[n])})){var u=this.formatToValue(o);i&&(u.start=this.state.start,u.end=this.state.end),this.applyRecord(u)}}},{key:"getFormatProps",value:function(){return Object(O.pickBy)(this.props,function(e,t){return t.startsWith("format_")})}},{key:"formatToValue",value:function(e){return Array.isArray(e)?Object(a.create)({html:i.children.toHTML(e),multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):"string"===this.props.format?Object(a.create)({html:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):null===e?Object(a.create)():e}},{key:"valueToEditableHTML",value:function(e){return Object(a.unstableToDom)({value:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,createLinePadding:function(e){var t=e.createElement("br");return t.setAttribute("data-mce-bogus","1"),t},prepareEditableTree:this.props.prepareEditableTree}).body.innerHTML}},{key:"removeEditorOnlyFormats",value:function(e){return this.props.formatTypes.forEach(function(t){t.__experimentalCreatePrepareEditableTree&&(e=Object(a.removeFormat)(e,t.name,0,e.text.length))}),e}},{key:"valueToFormat",value:function(e){return e=this.removeEditorOnlyFormats(e),this.usedDeprecatedChildrenSource?i.children.fromDOM(Object(a.unstableToDom)({value:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}).body.childNodes):"string"===this.props.format?Object(a.toHTMLString)({value:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):e}},{key:"render",value:function(){var e=this,t=this.props,n=t.tagName,r=void 0===n?"div":n,o=t.style,i=t.wrapperClassName,c=t.className,a=t.inlineToolbar,s=void 0!==a&&a,l=t.formattingControls,u=t.placeholder,d=t.keepPlaceholderOnFocus,p=void 0!==d&&d,b=t.isSelected,f=t.autocompleters,h=t.onTagNameChange,m=this.multilineTag,v=Ic(this.props),O=["editor",r].join(),g=u&&(!b||p)&&this.isEmpty(),j=Lr()(i,"editor-rich-text"),y=this.getRecord();return Object(Br.createElement)("div",{className:j,onFocus:this.setFocusedElement},b&&this.editor&&"li"===this.multilineTag&&Object(Br.createElement)(Mc,{editor:this.editor,onTagNameChange:h,tagName:r,onSyncDOM:function(){return e.onChange(e.createRecord())}}),b&&!s&&Object(Br.createElement)(jo,null,Object(Br.createElement)(wc,{controls:l})),b&&s&&Object(Br.createElement)(Vr.IsolatedEventContainer,{className:"editor-rich-text__inline-toolbar"},Object(Br.createElement)(wc,{controls:l})),Object(Br.createElement)(Yr,{onReplace:this.props.onReplace,completers:f,record:y,onChange:this.onChange},function(t){var n=t.listBoxId,i=t.activeId;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Nc,Object(Ir.a)({tagName:r,onSetup:e.onSetup,style:o,record:y,valueToEditableHTML:e.valueToEditableHTML,isPlaceholderVisible:g,"aria-label":u,"aria-autocomplete":"list","aria-owns":n,"aria-activedescendant":i},v,{className:c,key:O,onPaste:e.onPaste,onInput:e.onInput,onCompositionEnd:e.onCompositionEnd,onKeyDown:e.onKeyDown,onFocus:e.onFocus,onBlur:e.onBlur,multilineTag:e.multilineTag,multilineWrapperTags:e.multilineWrapperTags,setRef:e.setRef})),g&&Object(Br.createElement)(r,{className:Lr()("editor-rich-text__tinymce",c),style:o},m?Object(Br.createElement)(m,null,u):u),b&&Object(Br.createElement)(Cc,{value:y,onChange:e.onChange}))}),b&&Object(Br.createElement)(Vc,null))}}]),t}(Br.Component);qc.defaultProps={formattingControls:["bold","italic","link","strikethrough"],format:"string",value:""};var Gc=Object(Ar.compose)([Ar.withInstanceId,qr(function(e,t){return!1===t.isSelected?{clientId:e.clientId}:!0===t.isSelected?{isSelected:e.isSelected,clientId:e.clientId}:{isSelected:e.isSelected&&e.focusedElement===t.instanceId,setFocusedElement:e.setFocusedElement,clientId:e.clientId}}),Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.canUserUseUnfilteredHTML,r=t.isCaretWithinFormattedText,o=e("core/rich-text").getFormatTypes;return{canUserUseUnfilteredHTML:n(),isCaretWithinFormattedText:r(),formatTypes:o()}}),Object(l.withDispatch)(function(e){var t=e("core/editor");return{onCreateUndoLevel:t.createUndoLevel,onRedo:t.redo,onUndo:t.undo,onEnterFormattedText:t.enterFormattedText,onExitFormattedText:t.exitFormattedText}}),Ar.withSafeTimeout,Object(Vr.withFilters)("experimentalRichText")])(qc);Gc.Content=function(e){var t,n=e.value,r=e.tagName,o=e.multiline,c=Object(p.a)(e,["value","tagName","multiline"]),a=n;!0!==o&&"p"!==o&&"li"!==o||(t=!0===o?"p":o),Array.isArray(n)&&(a=i.children.toHTML(n)),!a&&t&&(a="<".concat(t,">").concat(t,">"));var s=Object(Br.createElement)(Br.RawHTML,null,a);return r?Object(Br.createElement)(r,Object(O.omit)(c,["format"]),s):s},Gc.isEmpty=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(e)&&!e||0===e.length},Gc.Content.defaultProps={format:"string",value:""};var $c=Gc,Yc=function(e){var t=e.urlQueryArgs,n=void 0===t?{}:t,r=Object(p.a)(e,["urlQueryArgs"]),o=Object(l.select)("core/editor").getCurrentPostId;return n=Object(d.a)({post_id:o()},n),Object(Br.createElement)(Vr.ServerSideRender,Object(Ir.a)({urlQueryArgs:n},r))},Qc=Object(Vr.withFilters)("editor.MediaUpload")(function(){return null}),Xc=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={isSettingsExpanded:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"toggleSettingsVisibility",value:function(){this.setState({isSettingsExpanded:!this.state.isSettingsExpanded})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.renderSettings,r=e.onClose,o=e.onClickOutside,i=e.position,c=void 0===i?"bottom center":i,a=e.focusOnMount,s=void 0===a?"firstElement":a,l=this.state.isSettingsExpanded,u=!!n&&l;return Object(Br.createElement)(Vr.Popover,{className:"editor-url-popover",focusOnMount:s,position:c,onClose:r,onClickOutside:o},Object(Br.createElement)("div",{className:"editor-url-popover__row"},t,!!n&&Object(Br.createElement)(Vr.IconButton,{className:"editor-url-popover__settings-toggle",icon:"ellipsis",label:Object(_.__)("Link Settings"),onClick:this.toggleSettingsVisibility,"aria-expanded":l})),u&&Object(Br.createElement)("div",{className:"editor-url-popover__row editor-url-popover__settings"},n()))}}]),t}(Br.Component);function Zc(){return(Zc=Object(hr.a)(regeneratorRuntime.mark(function e(t){var n,r,o,i,c,a,s,l,p,f,h,m,v,g,j,y,k,E,S,C,w,T,P,I,B,x,L,A,N;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.allowedTypes,r=t.additionalData,o=void 0===r?{}:r,i=t.filesList,c=t.maxUploadFileSize,a=t.onError,s=void 0===a?O.noop:a,l=t.onFileChange,p=t.wpAllowedMimeTypes,f=void 0===p?null:p,h=Object(b.a)(i),m=[],v=function(e,t){Object(_c.revokeBlobURL)(Object(O.get)(m,[e,"url"])),m[e]=t,l(Object(O.compact)(m))},g=function(e){return!n||Object(O.some)(n,function(t){return Object(O.includes)(t,"/")?t===e:Object(O.startsWith)(e,"".concat(t,"/"))})},j=(R=f)?Object(O.flatMap)(R,function(e,t){var n=e.split("/"),r=Object(u.a)(n,1)[0],o=t.split("|");return[e].concat(Object(b.a)(Object(O.map)(o,function(e){return"".concat(r,"/").concat(e)})))}):R,y=function(e){return Object(O.includes)(j,e)},k=function(e){e.message=[Object(Br.createElement)("strong",{key:"filename"},e.file.name),": ",e.message],s(e)},E=[],S=!0,C=!1,w=void 0,e.prev=12,T=h[Symbol.iterator]();case 14:if(S=(P=T.next()).done){e.next=34;break}if(I=P.value,!j||y(I.type)){e.next=19;break}return k({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:Object(_.__)("Sorry, this file type is not permitted for security reasons."),file:I}),e.abrupt("continue",31);case 19:if(g(I.type)){e.next=22;break}return k({code:"MIME_TYPE_NOT_SUPPORTED",message:Object(_.__)("Sorry, this file type is not supported here."),file:I}),e.abrupt("continue",31);case 22:if(!(c&&I.size>c)){e.next=25;break}return k({code:"SIZE_ABOVE_LIMIT",message:Object(_.__)("This file exceeds the maximum upload size for this site."),file:I}),e.abrupt("continue",31);case 25:if(!(I.size<=0)){e.next=28;break}return k({code:"EMPTY_FILE",message:Object(_.__)("This file is empty."),file:I}),e.abrupt("continue",31);case 28:E.push(I),m.push({url:Object(_c.createBlobURL)(I)}),l(m);case 31:S=!0,e.next=14;break;case 34:e.next=40;break;case 36:e.prev=36,e.t0=e.catch(12),C=!0,w=e.t0;case 40:e.prev=40,e.prev=41,S||null==T.return||T.return();case 43:if(e.prev=43,!C){e.next=46;break}throw w;case 46:return e.finish(43);case 47:return e.finish(40);case 48:B=0;case 49:if(!(B0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(O.flatMap)(t,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Object(d.a)({},t,{path:n,level:t.attributes.level,isEmpty:Oa(t)}):e(t.innerBlocks,Object(b.a)(n).concat([t]))})}(n);if(c.length<1)return null;var s=1,l=i&&r,u=Object(O.countBy)(c,"level")[1]>1;return Object(Br.createElement)("div",{className:"document-outline"},Object(Br.createElement)("ul",null,l&&Object(Br.createElement)(ba,{level:Object(_.__)("Title"),isValid:!0,onClick:function(){var e=document.querySelector(".editor-post-title__input");e&&e.focus()}},r),c.map(function(e,t){var n=e.level>s+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(u||l));return s=e.level,Object(Br.createElement)(ba,{key:t,level:"H".concat(e.level),isValid:r,onClick:function(){return t=e.clientId,o(t);var t},path:e.path},e.isEmpty?fa:Object(a.getTextContent)(Object(a.create)({html:e.attributes.content})),n&&ha,1===e.level&&u&&va,l&&1===e.level&&!u&&ma)})))});var ja=Object(l.withSelect)(function(e){return{blocks:e("core/editor").getBlocks()}})(function(e){var t=e.blocks,n=e.children;return Object(O.filter)(t,function(e){return"core/heading"===e.name}).length<1?null:n});var ya=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlocksByClientId,o=n.getBlockIndex,c=n.getTemplateLock,a=n.getBlockRootClientId,s=r(t.clientIds),l=Object(O.every)(s,function(e){return!!e&&Object(i.hasBlockSupport)(e.name,"multiple",!0)}),u=a(t.clientIds[0]);return{firstSelectedIndex:o(Object(O.first)(Object(O.castArray)(t.clientIds)),u),lastSelectedIndex:o(Object(O.last)(Object(O.castArray)(t.clientIds)),u),isLocked:!!c(u),blocks:s,canDuplicate:l,rootClientId:u,extraProps:t}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.rootClientId,o=t.blocks,c=t.firstSelectedIndex,a=t.lastSelectedIndex,s=t.isLocked,l=t.canDuplicate,u=e("core/editor"),d=u.insertBlocks,p=u.multiSelect,b=u.removeBlocks,f=u.insertDefaultBlock;return{onDuplicate:function(){if(!s&&l){var e=o.map(function(e){return Object(i.cloneBlock)(e)});d(e,a+1,r),e.length>1&&p(Object(O.first)(e).clientId,Object(O.last)(e).clientId)}},onRemove:function(){s||b(n)},onInsertBefore:function(){s||f({},r,c)},onInsertAfter:function(){s||f({},r,a+1)}}})])(function(e){var t=e.onDuplicate,n=e.onRemove,r=e.onInsertBefore,o=e.onInsertAfter,i=e.isLocked,c=e.canDuplicate;return(0,e.children)({onDuplicate:t,onRemove:n,onInsertAfter:o,onInsertBefore:r,isLocked:i,canDuplicate:c})}),ka=function(e){return e.preventDefault(),e},_a={duplicate:{raw:yo.rawShortcut.primaryShift("d"),display:yo.displayShortcut.primaryShift("d")},removeBlock:{raw:yo.rawShortcut.access("z"),display:yo.displayShortcut.access("z")},insertBefore:{raw:yo.rawShortcut.primaryAlt("t"),display:yo.displayShortcut.primaryAlt("t")},insertAfter:{raw:yo.rawShortcut.primaryAlt("y"),display:yo.displayShortcut.primaryAlt("y")}},Ea=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).selectAll=e.selectAll.bind(Object(Hr.a)(Object(Hr.a)(e))),e.undoOrRedo=e.undoOrRedo.bind(Object(Hr.a)(Object(Hr.a)(e))),e.save=e.save.bind(Object(Hr.a)(Object(Hr.a)(e))),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Object(Hr.a)(Object(Hr.a)(e))),e.clearMultiSelection=e.clearMultiSelection.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"selectAll",value:function(e){var t=this.props,n=t.rootBlocksClientIds,r=t.onMultiSelect;e.preventDefault(),r(Object(O.first)(n),Object(O.last)(n))}},{key:"undoOrRedo",value:function(e){var t=this.props,n=t.onRedo,r=t.onUndo;e.shiftKey?n():r(),e.preventDefault()}},{key:"save",value:function(e){e.preventDefault(),this.props.onSave()}},{key:"deleteSelectedBlocks",value:function(e){var t=this.props,n=t.selectedBlockClientIds,r=t.hasMultiSelection,o=t.onRemove,i=t.isLocked;r&&(e.preventDefault(),i||o(n))}},{key:"clearMultiSelection",value:function(){var e=this.props,t=e.hasMultiSelection,n=e.clearSelectedBlock;t&&(n(),window.getSelection().removeAllRanges())}},{key:"render",value:function(){var e,t=this.props.selectedBlockClientIds;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Vr.KeyboardShortcuts,{shortcuts:(e={},Object(f.a)(e,yo.rawShortcut.primary("a"),this.selectAll),Object(f.a)(e,yo.rawShortcut.primary("z"),this.undoOrRedo),Object(f.a)(e,yo.rawShortcut.primaryShift("z"),this.undoOrRedo),Object(f.a)(e,"backspace",this.deleteSelectedBlocks),Object(f.a)(e,"del",this.deleteSelectedBlocks),Object(f.a)(e,"escape",this.clearMultiSelection),e)}),Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.a)({},yo.rawShortcut.primary("s"),this.save)}),t.length>0&&Object(Br.createElement)(ya,{clientIds:t},function(e){var t,n=e.onDuplicate,r=e.onRemove,o=e.onInsertAfter,i=e.onInsertBefore;return Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(t={},Object(f.a)(t,_a.duplicate.raw,Object(O.flow)(ka,n)),Object(f.a)(t,_a.removeBlock.raw,Object(O.flow)(ka,r)),Object(f.a)(t,_a.insertBefore.raw,Object(O.flow)(ka,i)),Object(f.a)(t,_a.insertAfter.raw,Object(O.flow)(ka,o)),t)})}))}}]),t}(Br.Component),Sa=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getBlockOrder,r=t.getMultiSelectedBlockClientIds,o=t.hasMultiSelection,i=t.isEditedPostDirty,c=t.getBlockRootClientId,a=t.getTemplateLock,s=(0,t.getSelectedBlockClientId)(),l=s?[s]:r();return{rootBlocksClientIds:n(),hasMultiSelection:o(),isLocked:Object(O.some)(l,function(e){return!!a(c(e))}),isDirty:i(),selectedBlockClientIds:l}}),Object(l.withDispatch)(function(e,t){var n=e("core/editor"),r=n.clearSelectedBlock,o=n.multiSelect,i=n.redo,c=n.undo,a=n.removeBlocks,s=n.savePost;return{onSave:function(){t.isDirty&&s()},clearSelectedBlock:r,onMultiSelect:o,onRedo:i,onUndo:c,onRemove:a}})])(Ea);var Ca=Object(Ar.compose)([Object(l.withSelect)(function(e){return{hasRedo:e("core/editor").hasEditorRedo()}}),Object(l.withDispatch)(function(e){return{redo:e("core/editor").redo}})])(function(e){var t=e.hasRedo,n=e.redo;return Object(Br.createElement)(Vr.IconButton,{icon:"redo",label:Object(_.__)("Redo"),shortcut:yo.displayShortcut.primaryShift("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__redo"})});var wa=Object(Ar.compose)([Object(l.withSelect)(function(e){return{hasUndo:e("core/editor").hasEditorUndo()}}),Object(l.withDispatch)(function(e){return{undo:e("core/editor").undo}})])(function(e){var t=e.hasUndo,n=e.undo;return Object(Br.createElement)(Vr.IconButton,{icon:"undo",label:Object(_.__)("Undo"),shortcut:yo.displayShortcut.primary("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__undo"})});var Ta=Object(Ar.compose)([Object(l.withSelect)(function(e){return{isValid:e("core/editor").isValidTemplate()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:t.synchronizeTemplate}})])(function(e){var t=e.isValid,n=Object(p.a)(e,["isValid"]);return t?null:Object(Br.createElement)(Vr.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(Br.createElement)("p",null,Object(_.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(Br.createElement)("div",null,Object(Br.createElement)(Vr.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(_.__)("Keep it as is")),Object(Br.createElement)(Vr.Button,{onClick:function(){window.confirm(Object(_.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(_.__)("Reset the template"))))});var Pa=Object(Ar.compose)([Object(l.withSelect)(function(e){return{notices:e("core/notices").getNotices()}}),Object(l.withDispatch)(function(e){return{onRemove:e("core/notices").removeNotice}})])(function(e){return Object(Br.createElement)(Vr.NoticeList,e,Object(Br.createElement)(Ta,null))});var Ia=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=e("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}})(function(e){var t=e.availableTemplates,n=e.postType,r=e.children;return!Object(O.get)(n,["supports","page-attributes"],!1)&&Object(O.isEmpty)(t)?null:r});var Ba=Object(l.withSelect)(function(e){var t=e("core/editor").getEditedPostAttribute;return{postType:(0,e("core").getPostType)(t("type"))}})(function(e){var t=e.postType,n=e.children,r=e.supportKeys,o=!0;return t&&(o=Object(O.some)(Object(O.castArray)(r),function(e){return!!t.supports[e]})),o?n:null}),xa=Object(Ar.withState)({orderInput:null})(function(e){var t=e.onUpdateOrder,n=e.order,r=void 0===n?0:n,o=e.orderInput,i=e.setState,c=null===o?r:o;return Object(Br.createElement)(Vr.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(_.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(O.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})});var La=Object(Ar.compose)([Object(l.withSelect)(function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}}),Object(l.withDispatch)(function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}})])(function(e){return Object(Br.createElement)(Ba,{supportKeys:"page-attributes"},Object(Br.createElement)(xa,e))});function Aa(e){var t=Object(O.groupBy)(e,"parent");return function e(n){return n.map(function(n){var r=t[n.id];return Object(d.a)({},n,{children:r&&r.length?e(r):[]})})}(t[0]||[])}var Na=Object(l.withSelect)(function(e){var t=e("core"),n=t.getPostType,r=t.getEntityRecords,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,a=c("type"),s=n(a),l=i(),u=Object(O.get)(s,["hierarchical"],!1),d={per_page:-1,exclude:l,parent_exclude:l,orderby:"menu_order",order:"asc"};return{parent:c("parent"),items:u?r("postType",a,d):[],postType:s}}),Ra=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateParent:function(e){t({parent:e||0})}}}),Da=Object(Ar.compose)([Na,Ra])(function(e){var t=e.parent,n=e.postType,r=e.items,o=e.onUpdateParent,i=Object(O.get)(n,["hierarchical"],!1),c=Object(O.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!c||!a.length)return null;var s=Aa(a.map(function(e){return{id:e.id,parent:e.parent,name:e.title.raw?e.title.raw:"#".concat(e.id," (").concat(Object(_.__)("no title"),")")}}));return Object(Br.createElement)(Vr.TreeSelect,{label:c,noOptionLabel:"(".concat(Object(_.__)("no parent"),")"),tree:s,selectedId:t,onChange:o})});var Fa=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(l.withDispatch)(function(e){return{onUpdate:function(t){e("core/editor").editPost({template:t||""})}}}))(function(e){var t=e.availableTemplates,n=e.selectedTemplate,r=e.onUpdate;return Object(O.isEmpty)(t)?null:Object(Br.createElement)(Vr.SelectControl,{label:Object(_.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(O.map)(t,function(e,t){return{value:t,label:e}})})});var Ma=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(O.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}}),Ar.withInstanceId])(function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||n.length<2?null:Object(Br.createElement)(Ba,{supportKeys:"author"},r)}),Ua=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).setAuthorId=e.setAuthorId.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"setAuthorId",value:function(e){var t=this.props.onUpdateAuthor,n=e.target.value;t(Number(n))}},{key:"render",value:function(){var e=this.props,t=e.postAuthor,n=e.instanceId,r=e.authors,o="post-author-selector-"+n;return Object(Br.createElement)(Ma,null,Object(Br.createElement)("label",{htmlFor:o},Object(_.__)("Author")),Object(Br.createElement)("select",{id:o,value:t,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(e){return Object(Br.createElement)("option",{key:e.id,value:e.id},e.name)})))}}]),t}(Br.Component),Ha=Object(Ar.compose)([Object(l.withSelect)(function(e){return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:e("core").getAuthors()}}),Object(l.withDispatch)(function(e){return{onUpdateAuthor:function(t){e("core/editor").editPost({author:t})}}}),Ar.withInstanceId])(Ua);var Va=Object(Ar.compose)([Object(l.withSelect)(function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(p.a)(e,["commentStatus"]);return Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Ka=Object(Ar.compose)([Object(l.withSelect)(function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}}),Object(l.withDispatch)(function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}})])(function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(Br.createElement)("div",{className:"editor-post-excerpt"},Object(Br.createElement)(Vr.TextareaControl,{label:Object(_.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(Br.createElement)(Vr.ExternalLink,{href:"https://codex.wordpress.org/Excerpt"},Object(_.__)("Learn more about manual excerpts")))});var za=function(e){return Object(Br.createElement)(Ba,Object(Ir.a)({},e,{supportKeys:"excerpt"}))};var Wa=Object(l.withSelect)(function(e){var t=e("core").getThemeSupports;return{postType:(0,e("core/editor").getEditedPostAttribute)("type"),themeSupports:t()}})(function(e){var t=e.themeSupports,n=e.children,r=e.postType,o=e.supportKeys;return Object(O.some)(Object(O.castArray)(o),function(e){var n=Object(O.get)(t,[e],!1);return"post-thumbnails"===e&&Object(O.isArray)(n)?Object(O.includes)(n,r):n})?n:null});var qa=function(e){return Object(Br.createElement)(Wa,{supportKeys:"post-thumbnails"},Object(Br.createElement)(Ba,Object(Ir.a)({},e,{supportKeys:"thumbnail"})))},Ga=["image"],$a=Object(_.__)("Featured Image"),Ya=Object(_.__)("Set featured image"),Qa=Object(_.__)("Remove image");var Xa=Object(l.withSelect)(function(e){var t=e("core"),n=t.getMedia,r=t.getPostType,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,a=c("featured_media");return{media:a?n(a):null,currentPostId:i(),postType:r(c("type")),featuredImageId:a}}),Za=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateImage:function(e){t({featured_media:e.id})},onRemoveImage:function(){t({featured_media:0})}}}),Ja=Object(Ar.compose)(Xa,Za,Object(Vr.withFilters)("editor.PostFeaturedImage"))(function(e){var t,n,r,o=e.currentPostId,i=e.featuredImageId,c=e.onUpdateImage,a=e.onRemoveImage,s=e.media,l=e.postType,u=Object(O.get)(l,["labels"],{}),d=Object(Br.createElement)("p",null,Object(_.__)("To edit the featured image, you need permission to upload media."));if(s){var p=Object(Nr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",s.id,o);Object(O.has)(s,["media_details","sizes",p])?(t=s.media_details.sizes[p].width,n=s.media_details.sizes[p].height,r=s.media_details.sizes[p].source_url):(t=s.media_details.width,n=s.media_details.height,r=s.source_url)}return Object(Br.createElement)(qa,null,Object(Br.createElement)("div",{className:"editor-post-featured-image"},!!i&&Object(Br.createElement)(Xo,{fallback:d},Object(Br.createElement)(Qc,{title:u.featured_image||$a,onSelect:c,allowedTypes:Ga,modalClass:"editor-post-featured-image__media-modal",render:function(e){var o=e.open;return Object(Br.createElement)(Vr.Button,{className:"editor-post-featured-image__preview",onClick:o,"aria-label":Object(_.__)("Edit or update the image")},s&&Object(Br.createElement)(Vr.ResponsiveWrapper,{naturalWidth:t,naturalHeight:n},Object(Br.createElement)("img",{src:r,alt:""})),!s&&Object(Br.createElement)(Vr.Spinner,null))},value:i})),!!i&&s&&!s.isLoading&&Object(Br.createElement)(Xo,null,Object(Br.createElement)(Qc,{title:u.featured_image||$a,onSelect:c,allowedTypes:Ga,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(Br.createElement)(Vr.Button,{onClick:t,isDefault:!0,isLarge:!0},Object(_.__)("Replace image"))}})),!i&&Object(Br.createElement)("div",null,Object(Br.createElement)(Xo,{fallback:d},Object(Br.createElement)(Qc,{title:u.featured_image||$a,onSelect:c,allowedTypes:Ga,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(Br.createElement)(Vr.Button,{className:"editor-post-featured-image__toggle",onClick:t},u.set_featured_image||Ya)}}))),!!i&&Object(Br.createElement)(Xo,null,Object(Br.createElement)(Vr.Button,{onClick:a,isLink:!0,isDestructive:!0},u.remove_featured_image||Qa))))});var es=Object(l.withSelect)(function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}})(function(e){var t=e.disablePostFormats,n=Object(p.a)(e,["disablePostFormats"]);return!t&&Object(Br.createElement)(Ba,Object(Ir.a)({},n,{supportKeys:"post-formats"}))}),ts=[{id:"aside",caption:Object(_.__)("Aside")},{id:"gallery",caption:Object(_.__)("Gallery")},{id:"link",caption:Object(_.__)("Link")},{id:"image",caption:Object(_.__)("Image")},{id:"quote",caption:Object(_.__)("Quote")},{id:"standard",caption:Object(_.__)("Standard")},{id:"status",caption:Object(_.__)("Status")},{id:"video",caption:Object(_.__)("Video")},{id:"audio",caption:Object(_.__)("Audio")},{id:"chat",caption:Object(_.__)("Chat")}];var ns=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=n("format"),i=e("core").getThemeSupports();return{postFormat:o,supportedFormats:Object(O.union)([o],Object(O.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(l.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),Ar.withInstanceId])(function(e){var t=e.onUpdatePostFormat,n=e.postFormat,r=void 0===n?"standard":n,o=e.supportedFormats,i=e.suggestedFormat,c="post-format-selector-"+e.instanceId,a=ts.filter(function(e){return Object(O.includes)(o,e.id)}),s=Object(O.find)(a,function(e){return e.id===i});return Object(Br.createElement)(es,null,Object(Br.createElement)("div",{className:"editor-post-format"},Object(Br.createElement)("div",{className:"editor-post-format__content"},Object(Br.createElement)("label",{htmlFor:c},Object(_.__)("Post Format")),Object(Br.createElement)(Vr.SelectControl,{value:r,onChange:function(e){return t(e)},id:c,options:a.map(function(e){return{label:e.caption,value:e.id}})})),s&&s.id!==r&&Object(Br.createElement)("div",{className:"editor-post-format__suggestion"},Object(_.__)("Suggestion:")," ",Object(Br.createElement)(Vr.Button,{isLink:!0,onClick:function(){return t(s.id)}},s.caption))))});var rs=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(e){var t=e.lastRevisionId,n=e.revisionsCount,r=e.children;return!t||n<2?null:Object(Br.createElement)(Ba,{supportKeys:"revisions"},r)});var os=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(e){var t=e.lastRevisionId,n=e.revisionsCount;return Object(Br.createElement)(rs,null,Object(Br.createElement)(Vr.IconButton,{href:ta("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(_.sprintf)(Object(_._n)("%d Revision","%d Revisions",n),n)))}),is=n(99),cs=n.n(is);var as=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).openPreviewWindow=e.openPreviewWindow.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props.previewLink;t&&!e.previewLink&&this.setPreviewWindowLink(t)}},{key:"setPreviewWindowLink",value:function(e){var t=this.previewWindow;t&&!t.closed&&(t.location=e)}},{key:"getWindowTarget",value:function(){var e=this.props.postId;return"wp-preview-".concat(e)}},{key:"openPreviewWindow",value:function(e){var t,n;(e.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable)?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),t=this.previewWindow.document,n=Object(Br.renderToString)(Object(Br.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(Br.createElement)(Vr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(Br.createElement)(Vr.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),Object(Br.createElement)(Vr.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),Object(Br.createElement)("p",null,Object(_.__)("Generating preview…")))),n+='\n\t\t\n\t',t.write(n),t.title=Object(_.__)("Generating preview…"),t.close()):this.setPreviewWindowLink(e.target.href)}},{key:"render",value:function(){var e=this.props,t=e.previewLink,n=e.currentPostLink,r=e.isSaveable,o=t||n;return Object(Br.createElement)(Vr.Button,{isLarge:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(_._x)("Preview","imperative verb"),Object(Br.createElement)("span",{className:"screen-reader-text"},Object(_.__)("(opens in a new tab)")),Object(Br.createElement)(c.DotTip,{tipId:"core/editor.preview"},Object(_.__)("Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.")))}}]),t}(Br.Component),ss=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.forcePreviewLink,r=t.forceIsAutosaveable,o=e("core/editor"),i=o.getCurrentPostId,c=o.getCurrentPostAttribute,a=o.getEditedPostAttribute,s=o.isEditedPostSaveable,l=o.isEditedPostAutosaveable,u=o.getEditedPostPreviewLink,d=e("core").getPostType,p=u(),b=d(a("type"));return{postId:i(),currentPostLink:c("link"),previewLink:void 0!==n?n:p,isSaveable:s(),isAutosaveable:r||l(),isViewable:Object(O.get)(b,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}}),Object(l.withDispatch)(function(e){return{autosave:e("core/editor").autosave,savePost:e("core/editor").savePost}}),Object(Ar.ifCondition)(function(e){return e.isViewable})])(as),ls=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).sendPostLock=e.sendPostLock.bind(Object(Hr.a)(Object(Hr.a)(e))),e.receivePostLock=e.receivePostLock.bind(Object(Hr.a)(Object(Hr.a)(e))),e.releasePostLock=e.releasePostLock.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){cs()(document).on("heartbeat-send.refresh-lock",this.sendPostLock).on("heartbeat-tick.refresh-lock",this.receivePostLock)}},{key:"componentWillUnmount",value:function(){cs()(document).off("heartbeat-send.refresh-lock",this.sendPostLock).off("heartbeat-tick.refresh-lock",this.receivePostLock)}},{key:"sendPostLock",value:function(e,t){var n=this.props,r=n.isLocked,o=n.activePostLock,i=n.postId;r||(t["wp-refresh-post-lock"]={lock:o,post_id:i})}},{key:"receivePostLock",value:function(e,t){if(t["wp-refresh-post-lock"]){var n=this.props,r=n.autosave,o=n.updatePostLock,i=t["wp-refresh-post-lock"];i.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{avatar:i.lock_error.avatar_src}})):i.new_lock&&o({isLocked:!1,activePostLock:i.new_lock})}}},{key:"releasePostLock",value:function(){var e=this.props,t=e.isLocked,n=e.activePostLock,r=e.postLockUtils,o=e.postId;if(!t&&n){var i={action:"wp-remove-post-lock",_wpnonce:r.unlockNonce,post_ID:o,active_post_lock:n};cs.a.post({async:!1,url:r.ajaxUrl,data:i})}}},{key:"render",value:function(){var e=this.props,t=e.user,n=e.postId,r=e.isLocked,o=e.isTakeover,i=e.postLockUtils,c=e.postType;if(!r)return null;var a=t.name,s=t.avatar,l=Object(g.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),u=ta("edit.php",{post_type:Object(O.get)(c,["slug"])}),d=Object(O.get)(c,["labels","all_items"]);return Object(Br.createElement)(Vr.Modal,{title:o?Object(_.__)("Someone else has taken over this post."):Object(_.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissable:!1,className:"editor-post-locked-modal"},!!s&&Object(Br.createElement)("img",{src:s,alt:Object(_.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,a?Object(_.sprintf)(Object(_.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),a):Object(_.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Vr.Button,{isPrimary:!0,isLarge:!0,href:u},d))),!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,a?Object(_.sprintf)(Object(_.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(_.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Vr.Button,{isDefault:!0,isLarge:!0,href:u},d),Object(Br.createElement)(ss,null),Object(Br.createElement)(Vr.Button,{isPrimary:!0,isLarge:!0,href:l},Object(_.__)("Take Over")))))}}]),t}(Br.Component),us=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditorSettings,r=t.isPostLocked,o=t.isPostLockTakeover,i=t.getPostLockUser,c=t.getCurrentPostId,a=t.getActivePostLock,s=t.getEditedPostAttribute,l=e("core").getPostType;return{isLocked:r(),isTakeover:o(),user:i(),postId:c(),postLockUtils:n().postLockUtils,activePostLock:a(),postType:l(s("type"))}}),Object(l.withDispatch)(function(e){var t=e("core/editor");return{autosave:t.autosave,updatePostLock:t.updatePostLock}}),Object(Ar.withGlobalEvents)({beforeunload:"releasePostLock"}))(ls);var ds=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(O.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}}))(function(e){var t=e.hasPublishAction,n=e.isPublished,r=e.children;return n||!t?null:r});var ps=Object(Ar.compose)(Object(l.withSelect)(function(e){return{status:e("core/editor").getEditedPostAttribute("status")}}),Object(l.withDispatch)(function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}}))(function(e){var t=e.status,n=e.onUpdateStatus;return Object(Br.createElement)(ds,null,Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Pending Review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))});var bs=Object(Ar.compose)([Object(l.withSelect)(function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(p.a)(e,["pingStatus"]);return Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})});var fs=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.forceIsSaving,r=e("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,c=r.isSavingPost,a=r.isPublishingPost,s=r.getCurrentPost,l=r.getCurrentPostType,u=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||c(),isPublishing:a(),hasPublishAction:Object(O.get)(s(),["_links","wp:action-publish"],!1),postType:l(),isAutosaving:u()}})])(function(e){var t=e.isPublished,n=e.isBeingScheduled,r=e.isSaving,o=e.isPublishing,i=e.hasPublishAction,c=e.isAutosaving;return o?Object(_.__)("Publishing…"):t&&r&&!c?Object(_.__)("Updating…"):n&&r&&!c?Object(_.__)("Scheduling…"):i?t?Object(_.__)("Update"):n?Object(_.__)("Schedule"):Object(_.__)("Publish"):Object(_.__)("Submit for Review")}),hs=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).buttonNode=Object(Br.createRef)(),n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var e,t=this.props,n=t.forceIsDirty,r=t.forceIsSaving,o=t.hasPublishAction,i=t.isBeingScheduled,a=t.isOpen,s=t.isPostSavingLocked,l=t.isPublishable,u=t.isPublished,d=t.isSaveable,p=t.isSaving,b=t.isToggle,f=t.onSave,h=t.onStatusChange,m=t.onSubmit,v=void 0===m?O.noop:m,g=t.onToggle,j=t.visibility,y=p||r||!d||s||!l&&!n;e=o?i?"future":"private"===j?"private":"publish":"pending";var k={"aria-disabled":y,className:"editor-post-publish-button",isBusy:p&&u,isLarge:!0,isPrimary:!0,onClick:function(){y||(v(),h(e),f())}},E={"aria-disabled":u||p||r||!d||!l&&!n,"aria-expanded":a,className:"editor-post-publish-panel__toggle",isBusy:p&&u,isPrimary:!0,onClick:g},S=i?Object(_.__)("Schedule…"):Object(_.__)("Publish…"),C=Object(Br.createElement)(fs,{forceIsSaving:r}),w=b?E:k,T=b?S:C;return Object(Br.createElement)(Vr.Button,Object(Ir.a)({ref:this.buttonNode},w),T,Object(Br.createElement)(c.DotTip,{tipId:"core/editor.publish"},Object(_.__)("Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.")))}}]),t}(Br.Component),ms=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isEditedPostBeingScheduled,o=t.getEditedPostVisibility,i=t.isCurrentPostPublished,c=t.isEditedPostSaveable,a=t.isEditedPostPublishable,s=t.isPostSavingLocked,l=t.getCurrentPost,u=t.getCurrentPostType;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:c(),isPostSavingLocked:s(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(O.get)(l(),["_links","wp:action-publish"],!1),postType:u()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e})},onSave:t.savePost}})])(hs),vs=[{value:"public",label:Object(_.__)("Public"),info:Object(_.__)("Visible to everyone.")},{value:"private",label:Object(_.__)("Private"),info:Object(_.__)("Only visible to site admins and editors.")},{value:"password",label:Object(_.__)("Password Protected"),info:Object(_.__)("Protected with a password you choose. Only those with the password can view this post.")}],Os=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).setPublic=n.setPublic.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setPrivate=n.setPrivate.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setPasswordProtected=n.setPasswordProtected.bind(Object(Hr.a)(Object(Hr.a)(n))),n.updatePassword=n.updatePassword.bind(Object(Hr.a)(Object(Hr.a)(n))),n.state={hasPassword:!!e.password},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"setPublic",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r),this.setState({hasPassword:!1})}},{key:"setPrivate",value:function(){if(window.confirm(Object(_.__)("Would you like to privately publish this post now?"))){var e=this.props,t=e.onUpdateVisibility,n=e.onSave;t("private"),this.setState({hasPassword:!1}),n()}}},{key:"setPasswordProtected",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r,e.password||""),this.setState({hasPassword:!0})}},{key:"updatePassword",value:function(e){var t=this.props,n=t.status;(0,t.onUpdateVisibility)(n,e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.visibility,n=e.password,r=e.instanceId,o={public:{onSelect:this.setPublic,checked:"public"===t&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===t},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(Br.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(Br.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(_.__)("Post Visibility")),vs.map(function(e){var t=e.value,n=e.label,i=e.info;return Object(Br.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(Br.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-".concat(r),value:t,onChange:o[t].onSelect,checked:o[t].checked,id:"editor-post-".concat(t,"-").concat(r),"aria-describedby":"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-radio"}),Object(Br.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(Br.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(Br.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(Br.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(_.__)("Create password")),Object(Br.createElement)("input",{className:"editor-post-visibility__dialog-password-input",id:"editor-post-visibility__dialog-password-input-".concat(r),type:"text",onChange:this.updatePassword,value:n,placeholder:Object(_.__)("Use a secure password")}))]}}]),t}(Br.Component),gs=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.savePost,r=t.editPost;return{onSave:n,onUpdateVisibility:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r({status:e,password:t})}}}),Ar.withInstanceId])(Os);var js=Object(l.withSelect)(function(e){return{visibility:e("core/editor").getEditedPostVisibility()}})(function(e){var t=e.visibility;return Object(O.find)(vs,{value:t}).label});var ys=Object(Ar.compose)([Object(l.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date")}}),Object(l.withDispatch)(function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}})])(function(e){var t=e.date,n=e.onUpdateDate,r=Object(Ze.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(Br.createElement)(Vr.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:n,is12Hour:o})});var ks=Object(l.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date"),isFloating:e("core/editor").isEditedPostDateFloating()}})(function(e){var t=e.date,n=e.isFloating,r=Object(Ze.__experimentalGetSettings)();return t&&!n?Object(Ze.dateI18n)(r.formats.datetimeAbbreviated,t):Object(_.__)("Immediately")}),_s={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},Es=function(e,t){return e.toLowerCase()===t.toLowerCase()},Ss=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(Hr.a)(Object(Hr.a)(e))),e.searchTerms=Object(O.throttle)(e.searchTerms.bind(Object(Hr.a)(Object(Hr.a)(e))),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={loading:!1,availableTerms:[],selectedTerms:[]},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){var e=this;Object(O.isEmpty)(this.props.terms)||(this.setState({loading:!1}),this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then(function(){e.setState({loading:!1})},function(t){"abort"!==t.statusText&&e.setState({loading:!1})}))}},{key:"componentWillUnmount",value:function(){Object(O.invoke)(this.initRequest,["abort"]),Object(O.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){e.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=Object(d.a)({},_s,t),o=vr()({path:Object(g.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(function(t){e.setState(function(e){return{availableTerms:e.availableTerms.concat(t.filter(function(t){return!Object(O.find)(e.availableTerms,function(e){return e.id===t.id})}))}}),e.updateSelectedTerms(e.props.terms)}),o}},{key:"updateSelectedTerms",value:function(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(t,n){var r=Object(O.find)(e.state.availableTerms,function(e){return e.id===n});return r&&t.push(r.name),t},[]);this.setState({selectedTerms:t})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy;return vr()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:e}}).catch(function(r){return"term_exists"===r.code?(t.addRequest=vr()({path:Object(g.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(d.a)({},_s,{search:e}))}),t.addRequest.then(function(t){return Object(O.find)(t,function(t){return Es(t.name,e)})})):Promise.reject(r)})}},{key:"onChange",value:function(e){var t=this,n=Object(O.uniqBy)(e,function(e){return e.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(e){return!Object(O.find)(t.state.availableTerms,function(t){return Es(t.name,e)})}),o=function(e,t){return e.map(function(e){return Object(O.find)(t,function(t){return Es(t.name,e)}).id})};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then(function(e){var r=t.state.availableTerms.concat(e);return t.setState({availableTerms:r}),t.props.onUpdateTerms(o(n,r),t.props.taxonomy.rest_base)})}},{key:"searchTerms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(O.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:e})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy;if(!e.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,c=r.selectedTerms,a=i.map(function(e){return e.name}),s=Object(O.get)(n,["labels","add_new_item"],"post_tag"===t?Object(_.__)("Add New Tag"):Object(_.__)("Add New Term")),l=Object(O.get)(n,["labels","singular_name"],"post_tag"===t?Object(_.__)("Tag"):Object(_.__)("Term")),u=Object(_.sprintf)(Object(_._x)("%s added","term"),l),d=Object(_.sprintf)(Object(_._x)("%s removed","term"),l),p=Object(_.sprintf)(Object(_._x)("Remove %s","term"),l);return Object(Br.createElement)(Vr.FormTokenField,{value:c,displayTransform:O.unescape,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:s,messages:{added:u,removed:d,remove:p}})}}]),t}(Br.Component),Cs=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(O.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(O.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(f.a)({},n,t))}}}),Object(Vr.withFilters)("editor.PostTaxonomyType"))(Ss),ws=function(){var e=[Object(_.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(_.__)("Add tags"))];return Object(Br.createElement)(Vr.PanelBody,{initialOpen:!1,title:e},Object(Br.createElement)("p",null,Object(_.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(Br.createElement)(Cs,{slug:"post_tag"}))},Ts=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).state={hadTagsWhenOpeningThePanel:e.hasTags},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(Br.createElement)(ws,null)}}]),t}(Br.Component),Ps=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPostType(),n=e("core").getTaxonomy("post_tag"),r=n&&e("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(O.some)(n.types,function(e){return e===t}),hasTags:r&&r.length}}),Object(Ar.ifCondition)(function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t}))(Ts),Is=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(Br.createElement)(Vr.Button,{isLink:!0,onClick:function(){return r(t)}},n)},Bs=function(e,t){var n=ts.filter(function(t){return Object(O.includes)(e,t.id)});return Object(O.find)(n,function(e){return e.id===t})},xs=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(O.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:Bs(o,r())}}),Object(l.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),Object(Ar.ifCondition)(function(e){var t=e.suggestion,n=e.currentPostFormat;return t&&t.id!==n}))(function(e){var t=e.suggestion,n=e.onUpdatePostFormat,r=[Object(_.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(_.__)("Use a post format"))];return Object(Br.createElement)(Vr.PanelBody,{initialOpen:!1,title:r},Object(Br.createElement)("p",null,Object(_.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),Object(Br.createElement)("p",null,Object(Br.createElement)(Is,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(_.sprintf)(Object(_.__)('Apply the "%1$s" format.'),t.caption)})))});var Ls=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(O.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}})(function(e){var t,n,r=e.hasPublishAction,o=e.isBeingScheduled,i=e.children;return r?o?(t=Object(_.__)("Are you ready to schedule?"),n=Object(_.__)("Your work will be published at the specified date and time.")):(t=Object(_.__)("Are you ready to publish?"),n=Object(_.__)("Double-check your settings before publishing.")):(t=Object(_.__)("Are you ready to submit for review?"),n=Object(_.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(Br.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(Br.createElement)("div",null,Object(Br.createElement)("strong",null,t)),Object(Br.createElement)("p",null,n),r&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Vr.PanelBody,{initialOpen:!1,title:[Object(_.__)("Visibility:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(js,null))]},Object(Br.createElement)(gs,null)),Object(Br.createElement)(Vr.PanelBody,{initialOpen:!1,title:[Object(_.__)("Publish:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(ks,null))]},Object(Br.createElement)(ys,null)),Object(Br.createElement)(xs,null),Object(Br.createElement)(Ps,null),i))}),As=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onSelectInput=e.onSelectInput.bind(Object(Hr.a)(Object(Hr.a)(e))),e.postLink=Object(Br.createRef)(),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var e=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout(function(){e.setState({showCopyConfirmation:!1})},4e3)}},{key:"onSelectInput",value:function(e){e.target.select()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.isScheduled,r=e.post,o=e.postType,i=Object(O.get)(o,["labels","singular_name"]),c=Object(O.get)(o,["labels","view_item"]),a=n?Object(Br.createElement)(Br.Fragment,null,Object(_.__)("is now scheduled. It will go live on")," ",Object(Br.createElement)(ks,null),"."):Object(_.__)("is now live.");return Object(Br.createElement)("div",{className:"post-publish-panel__postpublish"},Object(Br.createElement)(Vr.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(Br.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(_.__)("(no title)"))," ",a),Object(Br.createElement)(Vr.PanelBody,null,Object(Br.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(Br.createElement)("strong",null,Object(_.__)("What’s next?"))),Object(Br.createElement)(Vr.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(_.sprintf)(Object(_.__)("%s address"),i),value:r.link,onFocus:this.onSelectInput}),Object(Br.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(Br.createElement)(Vr.Button,{isDefault:!0,href:r.link},c),Object(Br.createElement)(Vr.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(_.__)("Copied!"):Object(_.__)("Copy Link")))),t)}}]),t}(Br.Component),Ns=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getCurrentPost,o=t.isCurrentPostScheduled,i=e("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}})(As),Rs=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var e=this.props,t=e.onClose,n=e.hasPublishAction,r=e.isPostTypeViewable;n&&r||t()}},{key:"render",value:function(){var e=this.props,t=e.forceIsDirty,n=e.forceIsSaving,r=e.isBeingScheduled,o=e.isPublished,i=e.isPublishSidebarEnabled,c=e.isScheduled,a=e.isSaving,s=e.onClose,l=e.onTogglePublishSidebar,u=e.PostPublishExtension,d=e.PrePublishExtension,b=Object(p.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),f=Object(O.omit)(b,["hasPublishAction","isDirty","isPostTypeViewable"]),h=o||c&&r,m=!h&&!a,v=h&&!a;return Object(Br.createElement)("div",Object(Ir.a)({className:"editor-post-publish-panel"},f),Object(Br.createElement)("div",{className:"editor-post-publish-panel__header"},v?Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-published"},c?Object(_.__)("Scheduled"):Object(_.__)("Published")):Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(Br.createElement)(ms,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n}),Object(Br.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(Br.createElement)(Vr.IconButton,{"aria-expanded":!0,onClick:s,icon:"no-alt",label:Object(_.__)("Close panel")})),Object(Br.createElement)("div",{className:"editor-post-publish-panel__content"},m&&Object(Br.createElement)(Ls,null,d&&Object(Br.createElement)(d,null)),v&&Object(Br.createElement)(Ns,{focusOnMount:!0},u&&Object(Br.createElement)(u,null)),a&&Object(Br.createElement)(Vr.Spinner,null)),Object(Br.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Always show pre-publish checks."),checked:i,onChange:l})))}}]),t}(Br.Component),Ds=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core").getPostType,n=e("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,c=n.isCurrentPostScheduled,a=n.isEditedPostBeingScheduled,s=n.isEditedPostDirty,l=n.isSavingPost,u=e("core/editor").isPublishSidebarEnabled,d=t(o("type"));return{hasPublishAction:Object(O.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(O.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:s(),isPublished:i(),isPublishSidebarEnabled:u(),isSaving:l(),isScheduled:c()}}),Object(l.withDispatch)(function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}}),Vr.withFocusReturn,Vr.withConstrainedTabbing])(Rs);var Fs=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isCurrentPostPublished,o=t.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost,r=t.savePost;return{onClick:function(){n({status:"draft"}),r()}}})])(function(e){var t=e.isSaving,n=e.isPublished,r=e.isScheduled,o=e.onClick;return n||r?Object(Br.createElement)(Vr.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(_.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(_.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},Object(_.__)("Switch to Draft")):null}),Ms=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={forceSavedMessage:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this;e.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout(function(){t.setState({forceSavedMessage:!1})},1e3))}},{key:"render",value:function(){var e=this.props,t=e.post,n=e.isNew,r=e.isScheduled,o=e.isPublished,i=e.isDirty,c=e.isSaving,a=e.isSaveable,s=e.onSave,l=e.isAutosaving,u=e.isPending,d=e.isLargeViewport,p=this.state.forceSavedMessage;if(c){var b=Lr()("editor-post-saved-state","is-saving",{"is-autosaving":l});return Object(Br.createElement)("span",{className:b},Object(Br.createElement)(Vr.Dashicon,{icon:"cloud"}),l?Object(_.__)("Autosaving"):Object(_.__)("Saving"))}if(o||r)return Object(Br.createElement)(Fs,null);if(!a)return null;if(p||!n&&!i)return Object(Br.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(Br.createElement)(Vr.Dashicon,{icon:"saved"}),Object(_.__)("Saved"));if(!Object(O.get)(t,["_links","wp:action-publish"],!1)&&u)return null;var f=u?Object(_.__)("Save as Pending"):Object(_.__)("Save Draft");return d?Object(Br.createElement)(Vr.Button,{className:"editor-post-save-draft",onClick:s,shortcut:yo.displayShortcut.primary("s"),isTertiary:!0},f):Object(Br.createElement)(Vr.IconButton,{className:"editor-post-save-draft",label:f,onClick:s,shortcut:yo.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),t}(Br.Component),Us=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.forceIsDirty,r=t.forceIsSaving,o=e("core/editor"),i=o.isEditedPostNew,c=o.isCurrentPostPublished,a=o.isCurrentPostScheduled,s=o.isEditedPostDirty,l=o.isSavingPost,u=o.isEditedPostSaveable,d=o.getCurrentPost,p=o.isAutosavingPost,b=o.getEditedPostAttribute;return{post:d(),isNew:i(),isPublished:c(),isScheduled:a(),isDirty:n||s(),isSaving:r||l(),isSaveable:u(),isAutosaving:p(),isPending:"pending"===b("status")}}),Object(l.withDispatch)(function(e){return{onSave:e("core/editor").savePost}}),Ar.withSafeTimeout,Object(s.withViewportMatch)({isLargeViewport:"medium"})])(Ms);var Hs=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(O.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction,n=e.children;return t?n:null});var Vs=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(O.get)(t,["_links","wp:action-sticky"],!1),postType:e("core/editor").getCurrentPostType()}})])(function(e){var t=e.hasStickyAction,n=e.postType,r=e.children;return"post"===n&&t?r:null});var Ks=Object(Ar.compose)([Object(l.withSelect)(function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}}),Object(l.withDispatch)(function(e){return{onUpdateSticky:function(t){e("core/editor").editPost({sticky:t})}}})])(function(e){var t=e.onUpdateSticky,n=e.postSticky,r=void 0!==n&&n;return Object(Br.createElement)(Vs,null,Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Stick to the Front Page"),checked:r,onChange:function(){return t(!r)}}))}),zs={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},Ws=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).findTerm=e.findTerm.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onChange=e.onChange.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onChangeFormName=e.onChangeFormName.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onChangeFormParent=e.onChangeFormParent.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onAddTerm=e.onAddTerm.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onToggleForm=e.onToggleForm.bind(Object(Hr.a)(Object(Hr.a)(e))),e.setFilterValue=e.setFilterValue.bind(Object(Hr.a)(Object(Hr.a)(e))),e.sortBySelected=e.sortBySelected.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onChange",value:function(e){var t=this.props,n=t.onUpdateTerms,r=t.terms,o=void 0===r?[]:r,i=t.taxonomy,c=parseInt(e.target.value,10);n(-1!==o.indexOf(c)?Object(O.without)(o,c):Object(b.a)(o).concat([c]),i.rest_base)}},{key:"onChangeFormName",value:function(e){var t=""===e.target.value.trim()?"":e.target.value;this.setState({formName:t})}},{key:"onChangeFormParent",value:function(e){this.setState({formParent:e})}},{key:"onToggleForm",value:function(){this.setState(function(e){return{showForm:!e.showForm}})}},{key:"findTerm",value:function(e,t,n){return Object(O.find)(e,function(e){return(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()})}},{key:"onAddTerm",value:function(e){var t=this;e.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,c=n.slug,a=this.state,s=a.formName,l=a.formParent,u=a.adding,p=a.availableTerms;if(""!==s&&!u){var f=this.findTerm(p,l,s);if(f)return Object(O.some)(i,function(e){return e===f.id})||r(Object(b.a)(i).concat([f.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=vr()({path:"/wp/v2/".concat(o.rest_base),method:"POST",data:{name:s,parent:l||void 0}}),this.addRequest.catch(function(e){return"term_exists"===e.code?(t.addRequest=vr()({path:Object(g.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(d.a)({},zs,{parent:l||0,search:s}))}),t.addRequest.then(function(e){return t.findTerm(e,l,s)})):Promise.reject(e)}).then(function(e){var n=!!Object(O.find)(t.state.availableTerms,function(t){return t.id===e.id})?t.state.availableTerms:[e].concat(Object(b.a)(t.state.availableTerms)),a=Object(_.sprintf)(Object(_._x)("%s added","term"),Object(O.get)(t.props.taxonomy,["labels","singular_name"],"category"===c?Object(_.__)("Category"):Object(_.__)("Term")));t.props.speak(a,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:t.sortBySelected(Aa(n))}),r(Object(b.a)(i).concat([e.id]),o.rest_base)},function(e){"abort"!==e.statusText&&(t.addRequest=null,t.setState({adding:!1}))})}}},{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){Object(O.invoke)(this.fetchRequest,["abort"]),Object(O.invoke)(this.addRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){this.props.taxonomy!==e.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var e=this,t=this.props.taxonomy;t&&(this.fetchRequest=vr()({path:Object(g.addQueryArgs)("/wp/v2/".concat(t.rest_base),zs)}),this.fetchRequest.then(function(t){var n=e.sortBySelected(Aa(t));e.fetchRequest=null,e.setState({loading:!1,availableTermsTree:n,availableTerms:t})},function(t){"abort"!==t.statusText&&(e.fetchRequest=null,e.setState({loading:!1}))}))}},{key:"sortBySelected",value:function(e){var t=this.props.terms,n=function e(n){return-1!==t.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(e).filter(function(e){return e}).length>0)};return e.sort(function(e,t){var r=n(e),o=n(t);return r===o?0:r&&!o?-1:!r&&o?1:0}),e}},{key:"setFilterValue",value:function(e){var t=this.state.availableTermsTree,n=e.target.value,r=t.map(this.getFilterMatcher(n)).filter(function(e){return e});this.setState({filterValue:n,filteredTermsTree:r});var o=function e(t){for(var n=0,r=0;r0&&(r.children=r.children.map(t).filter(function(e){return e})),(-1!==r.name.toLowerCase().indexOf(e)||r.children.length>0)&&r}}},{key:"renderTerms",value:function(e){var t=this,n=this.props.terms,r=void 0===n?[]:n;return e.map(function(e){var n="editor-post-taxonomies-hierarchical-term-".concat(e.id);return Object(Br.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(Br.createElement)("input",{id:n,className:"editor-post-taxonomies__hierarchical-terms-input",type:"checkbox",checked:-1!==r.indexOf(e.id),value:e.id,onChange:t.onChange}),Object(Br.createElement)("label",{htmlFor:n},Object(O.unescape)(e.name)),!!e.children.length&&Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},t.renderTerms(e.children)))})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy,r=e.instanceId,o=e.hasCreateAction;if(!e.hasAssignAction)return null;var i=this.state,c=i.availableTermsTree,a=i.availableTerms,s=i.filteredTermsTree,l=i.formName,u=i.formParent,d=i.loading,p=i.showForm,b=i.filterValue,f=function(e,r,o){return Object(O.get)(n,["labels",e],"category"===t?r:o)},h=f("add_new_item",Object(_.__)("Add new category"),Object(_.__)("Add new term")),m=f("new_item_name",Object(_.__)("Add new category"),Object(_.__)("Add new term")),v=f("parent_item",Object(_.__)("Parent Category"),Object(_.__)("Parent Term")),g="— ".concat(v," —"),j=h,y="editor-post-taxonomies__hierarchical-terms-input-".concat(r),k="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),E=Object(_.sprintf)(Object(_._x)("Search %s","term"),Object(O.get)(this.props.taxonomy,["name"],"category"===t?Object(_.__)("Categories"):Object(_.__)("Terms"))),S=Object(_.sprintf)(Object(_._x)("Available %s","term"),Object(O.get)(this.props.taxonomy,["name"],"category"===t?Object(_.__)("Categories"):Object(_.__)("Terms"))),C=a.length>=8;return[C&&Object(Br.createElement)("label",{key:"filter-label",htmlFor:k},E),C&&Object(Br.createElement)("input",{type:"search",id:k,value:b,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":S},this.renderTerms(""!==b?s:c)),!d&&o&&Object(Br.createElement)(Vr.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},h),p&&Object(Br.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(Br.createElement)("label",{htmlFor:y,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(Br.createElement)("input",{type:"text",id:y,className:"editor-post-taxonomies__hierarchical-terms-input",value:l,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(Br.createElement)(Vr.TreeSelect,{label:v,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:u,tree:c}),Object(Br.createElement)(Vr.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},j))]}}]),t}(Br.Component),qs=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(O.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(O.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(f.a)({},n,t))}}}),Vr.withSpokenMessages,Ar.withInstanceId,Object(Vr.withFilters)("editor.PostTaxonomyType")])(Ws);var Gs=Object(Ar.compose)([Object(l.withSelect)(function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}})])(function(e){var t=e.postType,n=e.taxonomies,r=e.taxonomyWrapper,o=void 0===r?O.identity:r,i=Object(O.filter)(n,function(e){return Object(O.includes)(e.types,t)});return Object(O.filter)(i,function(e){return e.visibility.show_ui}).map(function(e){var t=e.hierarchical?qs:Cs;return Object(Br.createElement)(Br.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(Br.createElement)(t,{slug:e.slug}),e))})});var $s=Object(Ar.compose)([Object(l.withSelect)(function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}})])(function(e){var t=e.postType,n=e.taxonomies,r=e.children;return Object(O.some)(n,function(e){return Object(O.includes)(e.types,t)})?r:null}),Ys=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).edit=e.edit.bind(Object(Hr.a)(Object(Hr.a)(e))),e.stopEditing=e.stopEditing.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"edit",value:function(e){var t=e.target.value;this.props.onChange(t),this.setState({value:t,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var e=this.state.value,t=this.props.instanceId;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("label",{htmlFor:"post-content-".concat(t),className:"screen-reader-text"},Object(_.__)("Type text or HTML")),Object(Br.createElement)(di.a,{autoComplete:"off",dir:"auto",value:e,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(t),placeholder:Object(_.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),t}(Br.Component),Qs=Object(Ar.compose)([Object(l.withSelect)(function(e){return{value:(0,e("core/editor").getEditedPostContent)()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost,r=t.resetBlocks;return{onChange:function(e){n({content:e})},onPersist:function(e){r(Object(i.parse)(e))}}}),Ar.withInstanceId])(Ys),Xs=function(e){function t(e){var n,r=e.permalinkParts,o=e.slug;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(Hr.a)(Object(Hr.a)(n))),n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onSavePermalink",value:function(e){var t=na(this.state.editedPostName);e.preventDefault(),this.props.onSave(),t!==this.props.postName&&(this.props.editPost({slug:t}),this.setState({editedPostName:t}))}},{key:"render",value:function(){var e=this,t=this.props.permalinkParts,n=t.prefix,r=t.suffix,o=this.state.editedPostName;return Object(Br.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(Br.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(Br.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(Br.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(_.__)("Edit post permalink"),value:o,onChange:function(t){return e.setState({editedPostName:t.target.value})},type:"text",autoFocus:!0}),Object(Br.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),""),Object(Br.createElement)(Vr.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(_.__)("Save")))}}]),t}(Br.Component),Zs=Object(Ar.compose)([Object(l.withSelect)(function(e){return{permalinkParts:(0,e("core/editor").getPermalinkParts)()}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(Xs),Js=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).addVisibilityCheck=e.addVisibilityCheck.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onVisibilityChange=e.onVisibilityChange.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={isCopied:!1,isEditingPermalink:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"addVisibilityCheck",value:function(){window.addEventListener("visibilitychange",this.onVisibilityChange)}},{key:"onVisibilityChange",value:function(){var e=this.props,t=e.isEditable,n=e.refreshPost;t||"visible"!==document.visibilityState||n()}},{key:"componentDidUpdate",value:function(e,t){t.isEditingPermalink&&!this.state.isEditingPermalink&&this.linkElement.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("visibilitychange",this.addVisibilityCheck)}},{key:"render",value:function(){var e=this,t=this.props,n=t.isEditable,r=t.isNew,o=t.isPublished,i=t.isViewable,c=t.permalinkParts,a=t.postLink,s=t.postSlug,l=t.postID,u=t.postTitle;if(r||!i||!c||!a)return null;var d=this.state,p=d.isCopied,b=d.isEditingPermalink,f=p?Object(_.__)("Permalink copied"):Object(_.__)("Copy the permalink"),h=c.prefix,m=c.suffix,v=s||na(u)||l,O=n?h+v+m:h;return Object(Br.createElement)("div",{className:"editor-post-permalink"},Object(Br.createElement)(Vr.ClipboardButton,{className:Lr()("editor-post-permalink__copy",{"is-copied":p}),text:O,label:f,onCopy:function(){return e.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(Br.createElement)("span",{className:"editor-post-permalink__label"},Object(_.__)("Permalink:")),!b&&Object(Br.createElement)(Vr.ExternalLink,{className:"editor-post-permalink__link",href:o?O:a,target:"_blank",ref:function(t){return e.linkElement=t}},Object(g.safeDecodeURI)(O),""),b&&Object(Br.createElement)(Zs,{slug:v,onSave:function(){return e.setState({isEditingPermalink:!1})}}),n&&!b&&Object(Br.createElement)(Vr.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return e.setState({isEditingPermalink:!0})}},Object(_.__)("Edit")),!n&&Object(Br.createElement)(Vr.Button,{className:"editor-post-permalink__change",isLarge:!0,href:ta("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(_.__)("Change Permalinks")))}}]),t}(Br.Component),el=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.isPermalinkEditable,o=t.getCurrentPost,i=t.getPermalinkParts,c=t.getEditedPostAttribute,a=t.isCurrentPostPublished,s=e("core").getPostType,l=o(),u=l.id,d=l.link,p=s(c("type"));return{isNew:n(),postLink:d,permalinkParts:i(),postSlug:c("slug"),isEditable:r(),isPublished:a(),postTitle:c("title"),postID:u,isViewable:Object(O.get)(p,["viewable"],!1)}}),Object(l.withDispatch)(function(e){return{refreshPost:e("core/editor").refreshPost}})])(Js),tl=/[\r\n]+/g,nl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onSelect=e.onSelect.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onUnselect=e.onUnselect.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(Hr.a)(Object(Hr.a)(e))),e.redirectHistory=e.redirectHistory.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={isSelected:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"handleFocusOutside",value:function(){this.onUnselect()}},{key:"onSelect",value:function(){this.setState({isSelected:!0}),this.props.clearSelectedBlock()}},{key:"onUnselect",value:function(){this.setState({isSelected:!1})}},{key:"onChange",value:function(e){var t=e.target.value.replace(tl," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===yo.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(e){e.shiftKey?this.props.onRedo():this.props.onUndo(),e.preventDefault()}},{key:"render",value:function(){var e=this.props,t=e.hasFixedToolbar,n=e.isCleanNewPost,r=e.isFocusMode,o=e.isPostTypeViewable,i=e.instanceId,c=e.placeholder,a=e.title,s=this.state.isSelected,l=Lr()("wp-block editor-post-title__block",{"is-selected":s,"is-focus-mode":r,"has-fixed-toolbar":t}),u=Object(Zi.decodeEntities)(c);return Object(Br.createElement)(Ba,{supportKeys:"title"},Object(Br.createElement)("div",{className:"editor-post-title"},Object(Br.createElement)("div",{className:l},Object(Br.createElement)(Vr.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(Br.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},u||Object(_.__)("Add title")),Object(Br.createElement)(di.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:a,onChange:this.onChange,placeholder:u||Object(_.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),s&&o&&Object(Br.createElement)(el,null))))}}]),t}(Br.Component),rl=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=t.isCleanNewPost,i=(0,e("core").getPostType)(n("type")),c=r(),a=c.titlePlaceholder,s=c.focusMode,l=c.hasFixedToolbar;return{isCleanNewPost:o(),title:n("title"),isPostTypeViewable:Object(O.get)(i,["viewable"],!1),placeholder:a,isFocusMode:s,hasFixedToolbar:l}}),ol=Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.insertDefaultBlock,r=t.editPost,o=t.clearSelectedBlock;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(e){r({title:e})},onUndo:t.undo,onRedo:t.redo,clearSelectedBlock:o}}),il=Object(Ar.compose)(rl,ol,Ar.withInstanceId,Vr.withFocusOutside)(nl);var cl=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}}),Object(l.withDispatch)(function(e){return{trashPost:e("core/editor").trashPost}})])(function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(p.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(Br.createElement)(Vr.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(_.__)("Move to trash"))});var al=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId;return{isNew:n(),postId:r()}})(function(e){var t=e.isNew,n=e.postId,r=e.children;return t||!n?null:r});var sl=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(O.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})}),ll=n(97);var ul=Object(l.withSelect)(function(e){return{content:e("core/editor").getEditedPostAttribute("content")}})(function(e){var t=e.content,n=Object(_._x)("words","Word count type. Do not translate!");return Object(Br.createElement)("span",{className:"word-count"},Object(ll.count)(t,n))});var dl=Object(l.withSelect)(function(e){var t=e("core/editor").getGlobalBlockCount;return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}})(function(e){var t=e.headingCount,n=e.paragraphCount,r=e.numberOfBlocks;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("div",{className:"table-of-contents__counts",role:"note","aria-label":Object(_.__)("Document Statistics"),tabIndex:"0"},Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Words"),Object(Br.createElement)(ul,null)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Headings"),Object(Br.createElement)("span",{className:"table-of-contents__number"},t)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Paragraphs"),Object(Br.createElement)("span",{className:"table-of-contents__number"},n)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Blocks"),Object(Br.createElement)("span",{className:"table-of-contents__number"},r))),t>0&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("hr",null),Object(Br.createElement)("span",{className:"table-of-contents__title"},Object(_.__)("Document Outline")),Object(Br.createElement)(ga,null)))});var pl=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/editor").getBlockCount()}})(function(e){var t=e.hasBlocks;return Object(Br.createElement)(Vr.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(Br.createElement)(Vr.IconButton,{onClick:t?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(_.__)("Content structure"),labelPosition:"bottom","aria-disabled":!t})},renderContent:function(){return Object(Br.createElement)(dl,null)}})}),bl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(e){if(this.props.isDirty)return e.returnValue=Object(_.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),t}(Br.Component),fl=Object(l.withSelect)(function(e){return{isDirty:e("core/editor").isEditedPostDirty()}})(bl),hl=Object(l.withSelect)(function(e){return{selectedBlockClientId:e("core/editor").getBlockSelectionStart()}})(function(e){var t=e.selectedBlockClientId;return t&&Object(Br.createElement)(Vr.Button,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block",onClick:function(){Gi(t).closest(".editor-block-list__block").focus()}},Object(_.__)("Skip to the selected block"))}),ml=n(124),vl=n.n(ml);function Ol(e,t,n){var r=new vl.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}var gl=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor").getBlock,o=e("core/blocks").getBlockStyles,i=r(n);return{name:i.name,attributes:i.attributes,className:i.attributes.className||"",styles:o(i.name)}}),Object(l.withDispatch)(function(e,t){var n=t.clientId;return{onChangeClassName:function(t){e("core/editor").updateBlockAttributes(n,{className:t})}}})])(function(e){var t=e.styles,n=e.className,r=e.onChangeClassName,o=e.name,i=e.attributes,c=e.onSwitch,a=void 0===c?O.noop:c,s=e.onHoverClassName,l=void 0===s?O.noop:s;if(!t||0===t.length)return null;var u=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,c=new vl.a(t).values()[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;if(-1!==a.indexOf("is-style-")){var s=a.substring(9),l=Object(O.find)(e,{name:s});if(l)return l}}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}return Object(O.find)(e,"isDefault")}(t,n);function p(e){var t=Ol(n,u,e);r(t),a()}return Object(Br.createElement)("div",{className:"editor-block-styles"},t.map(function(e){var t=Ol(n,u,e);return Object(Br.createElement)("div",{key:e.name,className:Lr()("editor-block-styles__item",{"is-active":u===e}),onClick:function(){return p(e)},onKeyDown:function(t){yo.ENTER!==t.keyCode&&yo.SPACE!==t.keyCode||(t.preventDefault(),p(e))},onMouseEnter:function(){return l(t)},onMouseLeave:function(){return l(null)},role:"button",tabIndex:"0","aria-label":e.label||e.name},Object(Br.createElement)("div",{className:"editor-block-styles__item-preview"},Object(Br.createElement)(Si,{name:o,attributes:Object(d.a)({},i,{className:t})})),Object(Br.createElement)("div",{className:"editor-block-styles__item-label"},e.label||e.name))}))});var jl=Object(l.withSelect)(function(e){return{blocks:(0,e("core/editor").getMultiSelectedBlocks)()}})(function(e){var t=e.blocks,n=Object(ll.count)(Object(i.serialize)(t),"words");return Object(Br.createElement)("div",{className:"editor-multi-selection-inspector__card"},Object(Br.createElement)(Qr,{icon:Object(Br.createElement)(Vr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Br.createElement)(Vr.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),showColors:!0}),Object(Br.createElement)("div",{className:"editor-multi-selection-inspector__card-content"},Object(Br.createElement)("div",{className:"editor-multi-selection-inspector__card-title"},Object(_.sprintf)(Object(_._n)("%d block","%d blocks",t.length),t.length)),Object(Br.createElement)("div",{className:"editor-multi-selection-inspector__card-description"},Object(_.sprintf)(Object(_._n)("%d word","%d words",n),n))))}),yl=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,c=e("core/blocks").getBlockStyles,a=n(),s=a&&o(a),l=a&&Object(i.getBlockType)(s),u=a&&c(s);return{count:r(),hasBlockStyles:u&&u.length>0,selectedBlockName:s,selectedBlockClientId:a,blockType:l}})(function(e){var t=e.selectedBlockClientId,n=e.selectedBlockName,r=e.blockType,o=e.count,c=e.hasBlockStyles;if(o>1)return Object(Br.createElement)(jl,null);var a=n===Object(i.getUnregisteredTypeHandlerName)();return r&&t&&!a?Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("div",{className:"editor-block-inspector__card"},Object(Br.createElement)(Qr,{icon:r.icon,showColors:!0}),Object(Br.createElement)("div",{className:"editor-block-inspector__card-content"},Object(Br.createElement)("div",{className:"editor-block-inspector__card-title"},r.title),Object(Br.createElement)("div",{className:"editor-block-inspector__card-description"},r.description))),c&&Object(Br.createElement)("div",null,Object(Br.createElement)(Vr.PanelBody,{title:Object(_.__)("Styles"),initialOpen:!1},Object(Br.createElement)(gl,{clientId:t}))),Object(Br.createElement)("div",null,Object(Br.createElement)(fc.Slot,null)),Object(Br.createElement)("div",null,Object(Br.createElement)(lc.Slot,null,function(e){return!Object(O.isEmpty)(e)&&Object(Br.createElement)(Vr.PanelBody,{className:"editor-block-inspector__advanced",title:Object(_.__)("Advanced"),initialOpen:!1},e)})),Object(Br.createElement)(hl,{key:"back"})):Object(Br.createElement)("span",{className:"editor-block-inspector__no-blocks"},Object(_.__)("No block selected."))}),kl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Object(Hr.a)(Object(Hr.a)(e))),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,r=t.hasMultiSelection,o=t.clearSelectedBlock,i=n||r;e.target===this.container&&i&&o()}},{key:"render",value:function(){return Object(Br.createElement)("div",Object(Ir.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(O.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}(Br.Component),_l=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}}),Object(l.withDispatch)(function(e){return{clearSelectedBlock:e("core/editor").clearSelectedBlock}})])(kl);var El=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlock,c=r.getBlockMode,a=o(n);return{mode:c(n),blockType:a?Object(i.getBlockType)(a.name):null}}),Object(l.withDispatch)(function(e,t){var n=t.onToggle,r=void 0===n?O.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/editor").toggleBlockMode(o),r()}}})])(function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o;if(!Object(i.hasBlockSupport)(t,"html",!0))return null;var a="visual"===n?Object(_.__)("Edit as HTML"):Object(_.__)("Edit visually");return Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:r,icon:"html",label:c?a:void 0},!c&&a)});var Sl=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlocksByClientId,c=r.canInsertBlockType,a=r.__experimentalGetReusableBlock,s=o(n),l=c("core/block")&&Object(O.every)(s,function(e){return!!e&&e.isValid&&Object(i.hasBlockSupport)(e.name,"reusable",!0)});return{isVisible:l,isStaticBlock:l&&(1!==s.length||!Object(i.isReusableBlock)(s[0])||!a(s[0].attributes.ref))}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?O.noop:r,i=e("core/editor"),c=i.__experimentalConvertBlockToReusable,a=i.__experimentalConvertBlockToStatic;return{onConvertToStatic:function(){1===n.length&&(a(n[0]),o())},onConvertToReusable:function(){c(n),o()}}})])(function(e){var t=e.isVisible,n=e.isStaticBlock,r=e.onConvertToStatic,o=e.onConvertToReusable;return t?Object(Br.createElement)(Br.Fragment,null,n&&Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(_.__)("Add to Reusable Blocks")),!n&&Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(_.__)("Convert to Regular Block"))):null});var Cl=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlock,c=r.__experimentalGetReusableBlock,a=o(n);return{reusableBlock:a&&Object(i.isReusableBlock)(a)?c(a.attributes.ref):null}}),Object(l.withDispatch)(function(e,t){var n=t.onToggle,r=void 0===n?O.noop:n,o=e("core/editor").__experimentalDeleteReusableBlock;return{onDelete:function(e){window.confirm(Object(_.__)("Are you sure you want to delete this Reusable Block?\n\nIt will be permanently removed from all posts and pages that use it."))&&(o(e),r())}}})])(function(e){var t=e.reusableBlock,n=e.onDelete;return t?Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",icon:"no",disabled:t.isTemporary,onClick:function(){return n(t.id)}},Object(_.__)("Remove from Reusable Blocks")):null});function wl(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(_.__)("Convert to Blocks");return Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:n,icon:"screenoptions",label:r?o:void 0},!r&&o)}var Tl=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.getBlockContent)(n)}))}}}))(wl),Pl=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor").getBlock(n);return{block:r,shouldRender:r&&r.name===Object(i.getFreeformContentHandlerName)()}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.serialize)(n)}))}}}))(wl),Il=Object(Vr.createSlotFill)("_BlockSettingsMenuFirstItem"),Bl=Il.Fill,xl=Il.Slot;Bl.Slot=xl;var Ll=Bl,Al=Object(Vr.createSlotFill)("_BlockSettingsMenuPluginsExtension"),Nl=Al.Fill,Rl=Al.Slot;Nl.Slot=Rl;var Dl=Nl;var Fl=Object(l.withDispatch)(function(e){var t=e("core/editor").selectBlock;return{onSelect:function(e){t(e)}}})(function(e){var t=e.clientIds,n=e.onSelect,r=Object(O.castArray)(t),o=r.length,i=r[0];return Object(Br.createElement)(ya,{clientIds:t},function(e){var r=e.onDuplicate,c=e.onRemove,a=e.onInsertAfter,s=e.onInsertBefore,l=e.canDuplicate,u=e.isLocked;return Object(Br.createElement)(Vr.Dropdown,{contentClassName:"editor-block-settings-menu__popover",position:"bottom right",renderToggle:function(e){var t=e.onToggle,r=e.isOpen,c=Lr()("editor-block-settings-menu__toggle",{"is-opened":r}),a=r?Object(_.__)("Hide options"):Object(_.__)("More options");return Object(Br.createElement)(Vr.Toolbar,{controls:[{icon:"ellipsis",title:a,onClick:function(){1===o&&n(i),t()},className:c,extraProps:{"aria-expanded":r}}]})},renderContent:function(e){var n=e.onClose;return Object(Br.createElement)(Vr.NavigableMenu,{className:"editor-block-settings-menu__content"},Object(Br.createElement)(Ll.Slot,{fillProps:{onClose:n}}),1===o&&Object(Br.createElement)(Pl,{clientId:i}),1===o&&Object(Br.createElement)(Tl,{clientId:i}),!u&&l&&Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:r,icon:"admin-page",shortcut:_a.duplicate.display},Object(_.__)("Duplicate")),!u&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:s,icon:"insert-before",shortcut:_a.insertBefore.display},Object(_.__)("Insert Before")),Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:a,icon:"insert-after",shortcut:_a.insertAfter.display},Object(_.__)("Insert After"))),1===o&&Object(Br.createElement)(El,{clientId:i,onToggle:n}),Object(Br.createElement)(Sl,{clientIds:t,onToggle:n}),Object(Br.createElement)(Dl.Slot,{fillProps:{clientIds:t,onClose:n}}),Object(Br.createElement)("div",{className:"editor-block-settings-menu__separator"}),1===o&&Object(Br.createElement)(Cl,{clientId:i,onToggle:n}),!u&&Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:c,icon:"trash",shortcut:_a.removeBlock.display},Object(_.__)("Remove Block")))}})})}),Ml=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,r=t.onTransform,o=t.inserterItems,c=t.hasBlockStyles,a=this.state.hoveredClassName;if(!n||!n.length)return null;var s=Object(O.mapKeys)(o,function(e){return e.name}),l=Object(O.orderBy)(Object(O.filter)(Object(i.getPossibleBlockTransformations)(n),function(e){return e&&!!s[e.name]}),function(e){return s[e.name].frecency},"desc"),u=n[0].name,p=Object(i.getBlockType)(u);return c||l.length?Object(Br.createElement)(Vr.Dropdown,{position:"bottom right",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:function(e){var t=e.onToggle,r=e.isOpen,o=1===n.length?Object(_.__)("Change block type"):Object(_.sprintf)(Object(_._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(Br.createElement)(Vr.Toolbar,null,Object(Br.createElement)(Vr.IconButton,{className:"editor-block-switcher__toggle",onClick:t,"aria-haspopup":"true","aria-expanded":r,label:o,tooltip:o,onKeyDown:function(e){r||e.keyCode!==yo.DOWN||(e.preventDefault(),e.stopPropagation(),t())}},Object(Br.createElement)(Qr,{icon:p.icon,showColors:!0}),Object(Br.createElement)(Vr.SVG,{className:"editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Br.createElement)(Vr.Path,{d:"M6.5 8.9c.6-.6 1.4-.9 2.2-.9h6.9l-1.3 1.3 1.4 1.4L19.4 7l-3.7-3.7-1.4 1.4L15.6 6H8.7c-1.4 0-2.6.5-3.6 1.5l-2.8 2.8 1.4 1.4 2.8-2.8zm13.8 2.4l-2.8 2.8c-.6.6-1.3.9-2.1.9h-7l1.3-1.3-1.4-1.4L4.6 16l3.7 3.7 1.4-1.4L8.4 17h6.9c1.3 0 2.6-.5 3.5-1.5l2.8-2.8-1.3-1.4z"}))))},renderContent:function(t){var o=t.onClose;return Object(Br.createElement)(Br.Fragment,null,c&&Object(Br.createElement)(Vr.PanelBody,{title:Object(_.__)("Block Styles"),initialOpen:!0},Object(Br.createElement)(gl,{clientId:n[0].clientId,onSwitch:o,onHoverClassName:e.onHoverClassName})),0!==l.length&&Object(Br.createElement)(Vr.PanelBody,{title:Object(_.__)("Transform To:"),initialOpen:!0},Object(Br.createElement)(Ti,{items:l.map(function(e){return{id:e.name,icon:e.icon,title:e.title,hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(e.name)}}),onSelect:function(e){r(n,e.id),o()}})),null!==a&&Object(Br.createElement)(Ci,{name:n[0].name,attributes:Object(d.a)({},n[0].attributes,{className:a})}))}}):n.length>1?null:Object(Br.createElement)(Vr.Toolbar,null,Object(Br.createElement)(Vr.IconButton,{disabled:!0,className:"editor-block-switcher__no-switcher-icon",label:Object(_.__)("Block icon")},Object(Br.createElement)(Qr,{icon:p.icon,showColors:!0})))}}]),t}(Br.Component),Ul=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlocksByClientId,i=r.getBlockRootClientId,c=r.getInserterItems,a=e("core/blocks").getBlockStyles,s=i(Object(O.first)(Object(O.castArray)(n))),l=o(n),u=l&&1===l.length?l[0]:null,d=u&&a(u.name);return{blocks:l,inserterItems:c(s),hasBlockStyles:d&&d.length>0}}),Object(l.withDispatch)(function(e,t){return{onTransform:function(n,r){e("core/editor").replaceBlocks(t.clientIds,Object(i.switchToBlockType)(n,r))}}}))(Ml);var Hl=Object(l.withSelect)(function(e){var t=e("core/editor").getMultiSelectedBlockClientIds();return{isMultiBlockSelection:t.length>1,selectedBlockClientIds:t}})(function(e){var t=e.isMultiBlockSelection,n=e.selectedBlockClientIds;return t?Object(Br.createElement)(Ul,{key:"switcher",clientIds:n}):null});var Vl=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getBlockMode,o=t.getMultiSelectedBlockClientIds,i=t.isBlockValid,c=n();return{blockClientIds:c?[c]:o(),isValid:c?i(c):null,mode:c?r(c):null}})(function(e){var t=e.blockClientIds,n=e.isValid,r=e.mode;return 0===t.length?null:t.length>1?Object(Br.createElement)("div",{className:"editor-block-toolbar"},Object(Br.createElement)(Hl,null),Object(Br.createElement)(Fl,{clientIds:t})):Object(Br.createElement)("div",{className:"editor-block-toolbar"},"visual"===r&&n&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Ul,{clientIds:t}),Object(Br.createElement)(bo.Slot,null),Object(Br.createElement)(jo.Slot,null)),Object(Br.createElement)(Fl,{clientIds:t}))}),Kl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onCopy=function(t){return e.props.onCopy(t)},e.onCut=function(t){return e.props.onCut(t)},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){document.addEventListener("copy",this.onCopy),document.addEventListener("cut",this.onCut)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("copy",this.onCopy),document.removeEventListener("cut",this.onCut)}},{key:"render",value:function(){return null}}]),t}(Br.Component),zl=Object(Ar.compose)([Object(l.withDispatch)(function(e,t,n){var r=(0,n.select)("core/editor"),o=r.getBlocksByClientId,c=r.getMultiSelectedBlockClientIds,a=r.getSelectedBlockClientId,s=r.hasMultiSelection,l=e("core/editor").removeBlocks,u=function(e){var t=a()?[a()]:c();if(0!==t.length&&(s()||!Object(Vo.documentHasSelection)())){var n=Object(i.serialize)(o(t));e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",n),e.preventDefault()}};return{onCopy:u,onCut:function(e){if(u(e),s()){var t=a()?[a()]:c();l(t)}}}})])(Kl),Wl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).reboot=e.reboot.bind(Object(Hr.a)(Object(Hr.a)(e))),e.getContent=e.getContent.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={error:null},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidCatch",value:function(e){this.setState({error:e})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(l.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(Br.createElement)(ei,{className:"editor-error-boundary",actions:[Object(Br.createElement)(Vr.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(_.__)("Attempt Recovery")),Object(Br.createElement)(Vr.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(_.__)("Copy Post Text")),Object(Br.createElement)(Vr.ClipboardButton,{key:"copy-error",text:e.stack,isLarge:!0},Object(_.__)("Copy Error"))]},Object(_.__)("The editor has encountered an unexpected error.")):this.props.children}}]),t}(Br.Component),ql=function(e){function t(){return Object(Rr.a)(this,t),Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=Gi(e);if(t){var n=Object(Vo.getScrollContainer)(t);n&&Ei()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}(Br.Component),Gl=Object(l.withSelect)(function(e){return{extentClientId:(0,e("core/editor").getLastMultiSelectedBlockClientId)()}})(ql),$l=[yo.UP,yo.RIGHT,yo.DOWN,yo.LEFT,yo.ENTER,yo.BACKSPACE];var Yl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Object(Hr.a)(Object(Hr.a)(e))),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Object(Hr.a)(Object(Hr.a)(e))),e.startTypingInTextField=e.startTypingInTextField.bind(Object(Hr.a)(Object(Hr.a)(e))),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Object(Hr.a)(Object(Hr.a)(e))),e.stopTypingOnEscapeKey=e.stopTypingOnEscapeKey.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onKeyDown=Object(O.over)([e.startTypingInTextField,e.stopTypingOnEscapeKey]),e.lastMouseMove=null,e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.toggleEventBindings(this.props.isTyping)}},{key:"componentDidUpdate",value:function(e){this.props.isTyping!==e.isTyping&&this.toggleEventBindings(this.props.isTyping)}},{key:"componentWillUnmount",value:function(){this.toggleEventBindings(!1)}},{key:"toggleEventBindings",value:function(e){var t=e?"addEventListener":"removeEventListener";document[t]("selectionchange",this.stopTypingOnSelectionUncollapse),document[t]("mousemove",this.stopTypingOnMouseMove)}},{key:"stopTypingOnMouseMove",value:function(e){var t=e.clientX,n=e.clientY;if(this.lastMouseMove){var r=this.lastMouseMove,o=r.clientX,i=r.clientY;o===t&&i===n||this.props.onStopTyping()}this.lastMouseMove={clientX:t,clientY:n}}},{key:"stopTypingOnSelectionUncollapse",value:function(){var e=window.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||this.props.onStopTyping()}},{key:"stopTypingOnEscapeKey",value:function(e){this.props.isTyping&&e.keyCode===yo.ESCAPE&&this.props.onStopTyping()}},{key:"startTypingInTextField",value:function(e){var t=this.props,n=t.isTyping,r=t.onStartTyping,o=e.type,i=e.target;n||!Object(Vo.isTextField)(i)||i.closest(".editor-block-toolbar")||("keydown"!==o||function(e){var t=e.keyCode;return!e.shiftKey&&Object(O.includes)($l,t)}(e))&&r()}},{key:"stopTypingOnNonTextField",value:function(e){var t=this;e.persist(),this.props.setTimeout(function(){var n=t.props,r=n.isTyping,o=n.onStopTyping,i=e.target;r&&!Object(Vo.isTextField)(i)&&o()})}},{key:"render",value:function(){var e=this.props.children;return Object(Br.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.onKeyDown},e)}}]),t}(Br.Component),Ql=Object(Ar.compose)([Object(l.withSelect)(function(e){return{isTyping:(0,e("core/editor").isTyping)()}}),Object(l.withDispatch)(function(e){var t=e("core/editor");return{onStartTyping:t.startTyping,onStopTyping:t.stopTyping}}),Ar.withSafeTimeout])(Yl),Xl=function(e){function t(){return Object(Rr.a)(this,t),Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props,n=t.blockOrder,r=t.selectionStart;return n!==e.blockOrder&&r?this.getOffset(r):null}},{key:"componentDidUpdate",value:function(e,t,n){n&&this.restorePreviousOffset(n)}},{key:"getOffset",value:function(e){var t=Gi(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=Gi(this.props.selectionStart);if(t){var n=Object(Vo.getScrollContainer)(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}(Br.Component),Zl=Object(l.withSelect)(function(e){return{blockOrder:e("core/editor").getBlockOrder(),selectionStart:e("core/editor").getBlockSelectionStart()}})(Xl),Jl=window.getSelection,eu=Object(O.overEvery)([Vo.isTextField,Vo.focus.tabbable.isTabbableIndex]);var tu=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(Hr.a)(Object(Hr.a)(e))),e.bindContainer=e.bindContainer.bind(Object(Hr.a)(Object(Hr.a)(e))),e.clearVerticalRect=e.clearVerticalRect.bind(Object(Hr.a)(Object(Hr.a)(e))),e.focusLastTextField=e.focusLastTextField.bind(Object(Hr.a)(Object(Hr.a)(e))),e.verticalRect=null,e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearVerticalRect",value:function(){this.verticalRect=null}},{key:"getClosestTabbable",value:function(e,t){var n=Vo.focus.focusable.find(this.container);return t&&(n=Object(O.reverse)(n)),n=n.slice(n.indexOf(e)+1),Object(O.find)(n,function t(n,r,o){if(!Vo.focus.tabbable.isTabbableIndex(n))return!1;if(Object(Vo.isTextField)(n))return!0;if(!n.classList.contains("editor-block-list__block"))return!1;if(function(e){return!!e.querySelector(".editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var i,c=1;(i=o[r+c])&&n.contains(i);c++)if(t(i,r+c,o))return!1;return!0})}},{key:"expandSelection",value:function(e){var t=this.props,n=t.selectedBlockClientId,r=t.selectionStartClientId,o=t.selectionBeforeEndClientId,i=t.selectionAfterEndClientId,c=e?o:i;c&&this.props.onMultiSelect(r||n,c)}},{key:"moveSelection",value:function(e){var t=this.props,n=t.selectedFirstClientId,r=t.selectedLastClientId,o=e?n:r;o&&this.props.onSelectBlock(o)}},{key:"isTabbableEdge",value:function(e,t){var n,r,o=this.getClosestTabbable(e,t);return!(o&&(n=e,r=o,n.closest("[data-block]")===r.closest("[data-block]")))}},{key:"onKeyDown",value:function(e){var t=this.props,n=t.hasMultiSelection,r=t.onMultiSelect,o=t.blocks,i=e.keyCode,c=e.target,a=i===yo.UP,s=i===yo.DOWN,l=i===yo.LEFT,u=i===yo.RIGHT,d=a||l,p=l||u,b=a||s,f=p||b,h=e.shiftKey,m=h||e.ctrlKey||e.altKey||e.metaKey,v=b?Vo.isVerticalEdge:Vo.isHorizontalEdge;if(!f)return yo.isKeyboardEvent.primary(e)&&(this.isEntirelySelected=Object(Vo.isEntirelySelected)(c)),void(yo.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?this.isEntirelySelected:Object(Vo.isEntirelySelected)(c))&&(r(Object(O.first)(o),Object(O.last)(o)),e.preventDefault()),this.isEntirelySelected=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===yo.UP||t===yo.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,i,m))if(b?this.verticalRect||(this.verticalRect=Object(Vo.computeCaretRect)(c)):this.verticalRect=null,h&&(n||this.isTabbableEdge(c,d)&&v(c,d)))this.expandSelection(d),e.preventDefault();else if(n)this.moveSelection(d),e.preventDefault();else if(b&&Object(Vo.isVerticalEdge)(c,d)){var g=this.getClosestTabbable(c,d);g&&(Object(Vo.placeCaretAtVerticalEdge)(g,d,this.verticalRect),e.preventDefault())}else if(p&&Jl().isCollapsed&&Object(Vo.isHorizontalEdge)(c,d)){var j=this.getClosestTabbable(c,d);Object(Vo.placeCaretAtHorizontalEdge)(j,d),e.preventDefault()}}},{key:"focusLastTextField",value:function(){var e=Vo.focus.focusable.find(this.container),t=Object(O.findLast)(e,eu);t&&Object(Vo.placeCaretAtHorizontalEdge)(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object(Br.createElement)("div",{className:"editor-writing-flow"},Object(Br.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object(Br.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:this.focusLastTextField,className:"wp-block editor-writing-flow__click-redirect"}))}}]),t}(Br.Component),nu=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,i=t.getPreviousBlockClientId,c=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,s=t.getLastMultiSelectedBlockClientId,l=t.hasMultiSelection,u=t.getBlockOrder,d=n(),p=r(),b=o();return{selectedBlockClientId:d,selectionStartClientId:p,selectionBeforeEndClientId:i(b||d),selectionAfterEndClientId:c(b||d),selectedFirstClientId:a(),selectedLastClientId:s(),hasMultiSelection:l(),blocks:u()}}),Object(l.withDispatch)(function(e){var t=e("core/editor");return{onMultiSelect:t.multiSelect,onSelectBlock:t.selectBlock}})])(tu),ru=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g,ou=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new c(e),b(),t}}function c(e){this.start=e,this.end={line:n,column:r},this.source=t.source}c.prototype.content=e;var a=[];function s(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function l(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,n=[];for(b(),f(n);e.length&&"}"!==e.charAt(0)&&(t=C()||w());)!1!==t&&(n.push(t),f(n));return n}function p(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function b(){p(/^\s*/)}function f(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");var c=e.slice(2,n-2);return r+=2,o(c),e=e.slice(n),r+=2,t({type:"comment",comment:c})}}function v(){var e=p(/^([^{]+)/);if(e)return iu(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function O(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=iu(t[0]),!p(/^:\s*/))return s("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(ru,""),value:n?iu(n[0]).replace(ru,""):""});return p(/^[;\s]*/),r}}function g(){var e,t=[];if(!l())return s("missing '{'");for(f(t);e=O();)!1!==e&&(t.push(e),f(t));return u()?t:s("missing '}'")}function j(){for(var e,t=[],n=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:g()})}var y,k=S("import"),_=S("charset"),E=S("namespace");function S(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=p(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function C(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return s("@keyframes missing name");var r,o=t[1];if(!l())return s("@keyframes missing '{'");for(var c=f();r=j();)c.push(r),c=c.concat(f());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:c}):s("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var n=iu(t[1]);if(!l())return s("@media missing '{'");var r=f().concat(d());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:iu(t[1]),media:iu(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var n=iu(t[1]);if(!l())return s("@supports missing '{'");var r=f().concat(d());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}}()||k()||_()||E()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=iu(t[1]),r=iu(t[2]);if(!l())return s("@document missing '{'");var o=f().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!l())return s("@page missing '{'");for(var n,r=f();n=O();)r.push(n),r=r.concat(f());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!l())return s("@host missing '{'");var t=f().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!l())return s("@font-face missing '{'");for(var t,n=f();t=O();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}}()}function w(){var e=i(),t=v();return t?(f(),e({type:"rule",selectors:t,declarations:g()})):s("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i in t){var c=t[i];Array.isArray(c)?c.forEach(function(t){e(t,o)}):c&&"object"===Object(h.a)(c)&&e(c,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((y=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:y,parsingErrors:a}}))};function iu(e){return e?e.replace(/^\s+|\s+$/g,""):""}var cu=n(98),au=n.n(cu),su=lu;function lu(e){this.options=e||{}}lu.prototype.emit=function(e){return e},lu.prototype.visit=function(e){return this[e.type](e)},lu.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Object(d.a)({},n,{selectors:n.selectors.map(function(n){return Object(O.includes)(t,n.trim())?n:n.match(ku)?n.replace(/^(body|html)/,e):e+" "+n})}):n}},Eu=function(e){function t(e){var n;return Object(Rr.a)(this,t),n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments)),e.recovery?Object(Fr.a)(n):(e.updateEditorSettings(e.settings),e.updatePostLock(e.settings.postLock),e.setupEditor(e.post,e.initialEdits),e.settings.autosave&&e.createWarningNotice(Object(_.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(_.__)("View the autosave"),url:e.settings.autosave.editLink}]}),n)}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.props.settings.styles&&Object(O.map)(this.props.settings.styles,function(e){var t=e.css,n=e.baseURL,r=[_u(".editor-styles-wrapper")];n&&r.push(yu(n));var o=vu(t,Object(Ar.compose)(r));if(o){var i=document.createElement("style");i.innerHTML=o,document.body.appendChild(i)}})}},{key:"componentDidUpdate",value:function(e){this.props.settings!==e.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"render",value:function(){var e=this.props.children,t=[[Vr.SlotFillProvider],[Vr.DropZoneProvider]];return Object(O.flow)(t.map(function(e){var t=Object(u.a)(e,2),n=t[0],r=t[1];return function(e){return Object(Br.createElement)(n,r,e)}}))(e)}}]),t}(Br.Component),Su=Object(l.withDispatch)(function(e){var t=e("core/editor");return{setupEditor:t.setupEditor,updateEditorSettings:t.updateEditorSettings,updatePostLock:t.updatePostLock,createWarningNotice:e("core/notices").createWarningNotice}})(Eu),Cu=["left","center","right","wide","full"],wu=["wide","full"];function Tu(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?e:!0===e?Cu:[],!r||!0===e&&!n?O.without.apply(void 0,[t].concat(wu)):t}var Pu=Object(Ar.createHigherOrderComponent)(function(e){return function(t){var n=t.name,r=Tu(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(Br.createElement)(bo,{key:"align-controls"},Object(Br.createElement)(ao,{value:t.attributes.align,onChange:function(e){if(!e){var n=Object(i.getBlockType)(t.name);Object(O.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:r})),Object(Br.createElement)(e,Object(Ir.a)({key:"edit"},t))]}},"withToolbarControls"),Iu=Object(Ar.createHigherOrderComponent)(Object(Ar.compose)([Object(l.withSelect)(function(e){return{hasWideEnabled:!!(0,e("core/editor").getEditorSettings)().alignWide}}),function(e){return function(t){var n=t.name,r=t.attributes,o=t.hasWideEnabled,c=r.align,a=Tu(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0),o),s=t.wrapperProps;return Object(O.includes)(a,c)&&(s=Object(d.a)({},s,{"data-align":c})),Object(Br.createElement)(e,Object(Ir.a)({},t,{wrapperProps:s}))}}]));Object(Nr.addFilter)("blocks.registerBlockType","core/align/addAttribute",function(e){return Object(O.has)(e.attributes,["align","type"])?e:(Object(i.hasBlockSupport)(e,"align")&&(e.attributes=Object(O.assign)(e.attributes,{align:{type:"string"}})),e)}),Object(Nr.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Iu),Object(Nr.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Pu),Object(Nr.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",function(e,t,n){var r=n.align,o=Object(i.getBlockSupport)(t,"align"),c=Object(i.hasBlockSupport)(t,"alignWide",!0);return Object(O.includes)(Tu(o,c),r)&&(e.className=Lr()("align".concat(r),e.className)),e});var Bu=/[\s#]/g;var xu=Object(Ar.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(e,t),Object(Br.createElement)(lc,null,Object(Br.createElement)(Vr.TextControl,{label:Object(_.__)("HTML Anchor"),help:Object(_.__)("Anchors lets you link directly to a section on a page."),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(Bu,"-"),t.setAttributes({anchor:e})}}))):Object(Br.createElement)(e,t)}},"withInspectorControl");Object(Nr.addFilter)("blocks.registerBlockType","core/anchor/attribute",function(e){return Object(i.hasBlockSupport)(e,"anchor")&&(e.attributes=Object(O.assign)(e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e}),Object(Nr.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",xu),Object(Nr.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e});var Lu=Object(Ar.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(e,t),Object(Br.createElement)(lc,null,Object(Br.createElement)(Vr.TextControl,{label:Object(_.__)("Additional CSS Class"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:e})}}))):Object(Br.createElement)(e,t)}},"withInspectorControl");function Au(e){e="".concat(e,"");var t=Object(i.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(Nr.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",function(e){return Object(i.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=Object(O.assign)(e.attributes,{className:{type:"string"}})),e}),Object(Nr.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Lu),Object(Nr.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=Lr()(e.className,n.className)),e}),Object(Nr.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",function(e,t,n){if(Object(i.hasBlockSupport)(t,"customClassName",!0)){var r=Object(O.omit)(e,["className"]),o=Object(i.getSaveContent)(t,r),c=Au(o),a=Au(n),s=Object(O.difference)(a,c);s.length?e.className=s.join(" "):o&&delete e.className}return e});var Nu=[to],Ru=Object(O.once)(function(){return Object(l.dispatch)("core/editor").__experimentalFetchReusableBlocks()});Object(Nr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(e,t){return e||(e=Nu.map(O.clone),t===Object(i.getDefaultBlockName)()&&(e.push(Object(O.clone)(eo)),Ru())),e}),Object(Nr.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",function(e,t){return Object(i.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(O.uniq)([Object(i.getBlockDefaultClassName)(t.name)].concat(Object(b.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(i.getBlockDefaultClassName)(t.name)),e}),n.d(t,"Autocomplete",function(){return Yr}),n.d(t,"AlignmentToolbar",function(){return ro}),n.d(t,"BlockAlignmentToolbar",function(){return ao}),n.d(t,"BlockControls",function(){return bo}),n.d(t,"BlockEdit",function(){return ho}),n.d(t,"BlockFormatControls",function(){return jo}),n.d(t,"BlockNavigationDropdown",function(){return So}),n.d(t,"BlockIcon",function(){return Qr}),n.d(t,"ColorPalette",function(){return wo}),n.d(t,"withColorContext",function(){return Co}),n.d(t,"ContrastChecker",function(){return No}),n.d(t,"InnerBlocks",function(){return oc}),n.d(t,"InspectorAdvancedControls",function(){return lc}),n.d(t,"InspectorControls",function(){return fc}),n.d(t,"PanelColorSettings",function(){return gc}),n.d(t,"PlainText",function(){return jc}),n.d(t,"RichText",function(){return $c}),n.d(t,"RichTextShortcut",function(){return Rc}),n.d(t,"RichTextToolbarButton",function(){return Kc}),n.d(t,"RichTextInserterItem",function(){return zc}),n.d(t,"ServerSideRender",function(){return Yc}),n.d(t,"MediaPlaceholder",function(){return ca}),n.d(t,"MediaUpload",function(){return Qc}),n.d(t,"MediaUploadCheck",function(){return Xo}),n.d(t,"URLInput",function(){return la}),n.d(t,"URLInputButton",function(){return ua}),n.d(t,"URLPopover",function(){return Xc}),n.d(t,"AutosaveMonitor",function(){return pa}),n.d(t,"DocumentOutline",function(){return ga}),n.d(t,"DocumentOutlineCheck",function(){return ja}),n.d(t,"EditorGlobalKeyboardShortcuts",function(){return Sa}),n.d(t,"EditorHistoryRedo",function(){return Ca}),n.d(t,"EditorHistoryUndo",function(){return wa}),n.d(t,"EditorNotices",function(){return Pa}),n.d(t,"PageAttributesCheck",function(){return Ia}),n.d(t,"PageAttributesOrder",function(){return La}),n.d(t,"PageAttributesParent",function(){return Da}),n.d(t,"PageTemplate",function(){return Fa}),n.d(t,"PostAuthor",function(){return Ha}),n.d(t,"PostAuthorCheck",function(){return Ma}),n.d(t,"PostComments",function(){return Va}),n.d(t,"PostExcerpt",function(){return Ka}),n.d(t,"PostExcerptCheck",function(){return za}),n.d(t,"PostFeaturedImage",function(){return Ja}),n.d(t,"PostFeaturedImageCheck",function(){return qa}),n.d(t,"PostFormat",function(){return ns}),n.d(t,"PostFormatCheck",function(){return es}),n.d(t,"PostLastRevision",function(){return os}),n.d(t,"PostLastRevisionCheck",function(){return rs}),n.d(t,"PostLockedModal",function(){return us}),n.d(t,"PostPendingStatus",function(){return ps}),n.d(t,"PostPendingStatusCheck",function(){return ds}),n.d(t,"PostPingbacks",function(){return bs}),n.d(t,"PostPreviewButton",function(){return ss}),n.d(t,"PostPublishButton",function(){return ms}),n.d(t,"PostPublishButtonLabel",function(){return fs}),n.d(t,"PostPublishPanel",function(){return Ds}),n.d(t,"PostSavedState",function(){return Us}),n.d(t,"PostSchedule",function(){return ys}),n.d(t,"PostScheduleCheck",function(){return Hs}),n.d(t,"PostScheduleLabel",function(){return ks}),n.d(t,"PostSticky",function(){return Ks}),n.d(t,"PostStickyCheck",function(){return Vs}),n.d(t,"PostSwitchToDraftButton",function(){return Fs}),n.d(t,"PostTaxonomies",function(){return Gs}),n.d(t,"PostTaxonomiesCheck",function(){return $s}),n.d(t,"PostTextEditor",function(){return Qs}),n.d(t,"PostTitle",function(){return il}),n.d(t,"PostTrash",function(){return cl}),n.d(t,"PostTrashCheck",function(){return al}),n.d(t,"PostTypeSupportCheck",function(){return Ba}),n.d(t,"PostVisibility",function(){return gs}),n.d(t,"PostVisibilityLabel",function(){return js}),n.d(t,"PostVisibilityCheck",function(){return sl}),n.d(t,"TableOfContents",function(){return pl}),n.d(t,"UnsavedChangesWarning",function(){return fl}),n.d(t,"WordCount",function(){return ul}),n.d(t,"BlockInspector",function(){return yl}),n.d(t,"BlockList",function(){return nc}),n.d(t,"BlockMover",function(){return Qo}),n.d(t,"BlockSelectionClearer",function(){return _l}),n.d(t,"BlockSettingsMenu",function(){return Fl}),n.d(t,"_BlockSettingsMenuFirstItem",function(){return Ll}),n.d(t,"_BlockSettingsMenuPluginsExtension",function(){return Dl}),n.d(t,"BlockTitle",function(){return fi}),n.d(t,"BlockToolbar",function(){return Vl}),n.d(t,"CopyHandler",function(){return zl}),n.d(t,"DefaultBlockAppender",function(){return Ji}),n.d(t,"ErrorBoundary",function(){return Wl}),n.d(t,"Inserter",function(){return Di}),n.d(t,"MultiBlocksSwitcher",function(){return Hl}),n.d(t,"MultiSelectScrollIntoView",function(){return Gl}),n.d(t,"NavigableToolbar",function(){return ji}),n.d(t,"ObserveTyping",function(){return Ql}),n.d(t,"PreserveScrollInReorder",function(){return Zl}),n.d(t,"SkipToSelectedBlock",function(){return hl}),n.d(t,"Warning",function(){return ei}),n.d(t,"WritingFlow",function(){return nu}),n.d(t,"EditorProvider",function(){return Su}),n.d(t,"blockAutocompleter",function(){return eo}),n.d(t,"userAutocompleter",function(){return to}),n.d(t,"getColorClassName",function(){return xo}),n.d(t,"getColorObjectByAttributeValues",function(){return Io}),n.d(t,"getColorObjectByColorValue",function(){return Bo}),n.d(t,"withColors",function(){return Ao}),n.d(t,"getFontSize",function(){return Ro}),n.d(t,"getFontSizeClass",function(){return Do}),n.d(t,"FontSizePicker",function(){return Fo}),n.d(t,"withFontSizes",function(){return Mo}),n.d(t,"mediaUpload",function(){return ea}),n.d(t,"cleanForSlug",function(){return na})}]);
\ No newline at end of file
+*/o=[e,t],void 0===(i="function"==typeof(r=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function c(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,c=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),"vertical"===(s=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),d()}var s;function l(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var r=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach(function(e){e.node.scrollTop=e.scrollTop}),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o0&&void 0!==arguments[0]?arguments[0]:{};return function(t){(e=Object(d.a)({},j,e)).shouldOverwriteState=Object(O.overSome)([e.shouldOverwriteState,function(t){return Object(O.includes)(e.ignoreTypes,t.type)}]);var n={past:[],present:t(void 0,{}),future:[],lastAction:null,shouldCreateUndoLevel:!1},r=e,o=r.resetTypes,i=void 0===o?[]:o,c=r.shouldOverwriteState,a=void 0===c?function(){return!1}:c;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,r=arguments.length>1?arguments[1]:void 0,o=e.past,c=e.present,s=e.future,l=e.lastAction,u=e.shouldCreateUndoLevel,p=l;switch(r.type){case"UNDO":return o.length?{past:Object(O.dropRight)(o),present:Object(O.last)(o),future:[c].concat(Object(b.a)(s)),lastAction:null,shouldCreateUndoLevel:!1}:e;case"REDO":return s.length?{past:Object(b.a)(o).concat([c]),present:Object(O.first)(s),future:Object(O.drop)(s),lastAction:null,shouldCreateUndoLevel:!1}:e;case"CREATE_UNDO_LEVEL":return Object(d.a)({},e,{lastAction:null,shouldCreateUndoLevel:!0})}var f=t(c,r);if(Object(O.includes)(i,r.type))return{past:[],present:f,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(c===f)return e;var h=o,m=p;return!u&&o.length&&a(r,p)||(h=Object(b.a)(o).concat([c]),m=r),{past:h,present:f,future:[],shouldCreateUndoLevel:!1,lastAction:m}}}},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n,r){var o=t(n,r),i=void 0===n||Object(O.includes)(e.resetTypes,r.type),c=n!==o;if(!c&&!i)return n;c&&void 0!==n||(o=Object(d.a)({},o));var a=Object(O.includes)(e.ignoreTypes,r.type);return o.isDirty=a?n.isDirty:!i&&c,o}}},_=n(1),E={insertUsage:{},isPublishSidebarEnabled:!0},S={alignWide:!1,colors:[{name:Object(_.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(_.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(_.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(_.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(_.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(_.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(_.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(_.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(_.__)("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:Object(_.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(_.__)("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],fontSizes:[{name:Object(_._x)("Small","font size name"),size:13,slug:"small"},{name:Object(_._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(_._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(_._x)("Large","font size name"),size:36,slug:"large"},{name:Object(_._x)("Huge","font size name"),size:48,slug:"huge"}],imageSizes:[{slug:"thumbnail",label:Object(_.__)("Thumbnail")},{slug:"medium",label:Object(_.__)("Medium")},{slug:"large",label:Object(_.__)("Large")},{slug:"full",label:Object(_.__)("Full Size")}],maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,richEditingEnabled:!0},C={};function w(e,t,n){return Object(b.a)(e.slice(0,n)).concat(Object(b.a)(Object(O.castArray)(t)),Object(b.a)(e.slice(n)))}function T(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(b.a)(e);return o.splice(t,r),w(o,e.slice(t,t+r),n)}var P=new Set(["meta"]);function I(e){return e&&"object"===Object(h.a)(e)&&"raw"in e?e.raw:e}function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(f.a)({},t,[]);return e.forEach(function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,B(o,r))}),n}function x(e,t){for(var n={},r=Object(b.a)(e);r.length;){var o=r.shift(),i=o.innerBlocks,c=Object(p.a)(o,["innerBlocks"]);r.push.apply(r,Object(b.a)(i)),n[c.clientId]=t(c)}return n}function L(e){return x(e,function(e){return Object(O.omit)(e,"attributes")})}function A(e){return x(e,function(e){return e.attributes})}function N(e,t){return e===t?Object(d.a)({},e):t}function R(e,t){return Object(O.isEqual)(Object(O.keys)(e),Object(O.keys)(t))}function D(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&e.clientId===t.clientId&&R(e.attributes,t.attributes)}function F(e,t){return"EDIT_POST"===e.type&&R(e.edits,t.edits)}var M=Object(O.flow)([l.combineReducers,function(e){return function(t,n){if(t&&"REMOVE_BLOCKS"===n.type){for(var r=Object(b.a)(n.clientIds),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_POST":return Object(O.reduce)(t.edits,function(t,n,r){return n!==e[r]&&(t=N(e,t),P.has(r)?t[r]=Object(d.a)({},t[r],n):t[r]=n),t},e);case"RESET_BLOCKS":return"content"in e?Object(O.omit)(e,"content"):e;case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===t.type?function(e){return t.edits[e]}:function(e){return I(t.post[e])};return Object(O.reduce)(e,function(t,r,o){return Object(O.isEqual)(r,n(o))?(delete(t=N(e,t))[o],t):t},e)}return e},blocks:Object(O.flow)([l.combineReducers,function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(O.reduce)(t[n],function(n,r){return Object(b.a)(n).concat([r],Object(b.a)(e(t,r)))},[])}(t.order);return Object(d.a)({},t,{byClientId:Object(d.a)({},Object(O.omit)(t.byClientId,r),L(n.blocks)),attributes:Object(d.a)({},Object(O.omit)(t.attributes,r),A(n.blocks)),order:Object(d.a)({},Object(O.omit)(t.order,r),B(n.blocks))})}return e(t,n)}},function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=Object(d.a)({},t)).attributes=Object(O.mapValues)(t.attributes,function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?Object(d.a)({},e,{ref:o}):e})}return e(t,n)}},k({resetTypes:["SETUP_EDITOR_STATE","REQUEST_POST_UPDATE_START"],ignoreTypes:["RECEIVE_BLOCKS","RESET_POST","UPDATE_POST"]})])({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return L(t.blocks);case"RECEIVE_BLOCKS":return Object(d.a)({},e,L(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(O.omit)(t.updates,"attributes");return Object(O.isEmpty)(n)?e:Object(d.a)({},e,Object(f.a)({},t.clientId,Object(d.a)({},e[t.clientId],n)));case"INSERT_BLOCKS":return Object(d.a)({},e,L(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(d.a)({},Object(O.omit)(e,t.clientIds),L(t.blocks)):e;case"REMOVE_BLOCKS":return Object(O.omit)(e,t.clientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return A(t.blocks);case"RECEIVE_BLOCKS":return Object(d.a)({},e,A(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Object(d.a)({},e,Object(f.a)({},t.clientId,Object(d.a)({},e[t.clientId],t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(!e[t.clientId])return e;var n=Object(O.reduce)(t.attributes,function(n,r,o){return r!==n[o]&&((n=N(e[t.clientId],n))[o]=r),n},e[t.clientId]);return n===e[t.clientId]?e:Object(d.a)({},e,Object(f.a)({},t.clientId,n));case"INSERT_BLOCKS":return Object(d.a)({},e,A(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(d.a)({},Object(O.omit)(e,t.clientIds),A(t.blocks)):e;case"REMOVE_BLOCKS":return Object(O.omit)(e,t.clientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return B(t.blocks);case"RECEIVE_BLOCKS":return Object(d.a)({},e,Object(O.omit)(B(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=t.blocks,i=e[r]||[],c=B(o,r),a=t.index,s=void 0===a?i.length:a;return Object(d.a)({},e,c,Object(f.a)({},r,w(i,c[r],s)));case"MOVE_BLOCK_TO_POSITION":var l,u=t.fromRootClientId,p=void 0===u?"":u,h=t.toRootClientId,m=void 0===h?"":h,v=t.clientId,g=t.index,j=void 0===g?e[m].length:g;if(p===m){var y=e[m].indexOf(v);return Object(d.a)({},e,Object(f.a)({},m,T(e[m],y,j)))}return Object(d.a)({},e,(l={},Object(f.a)(l,p,Object(O.without)(e[p],v)),Object(f.a)(l,m,w(e[m],v,j)),l));case"MOVE_BLOCKS_UP":var k=t.clientIds,_=t.rootClientId,E=void 0===_?"":_,S=Object(O.first)(k),C=e[E];if(!C.length||S===Object(O.first)(C))return e;var P=C.indexOf(S);return Object(d.a)({},e,Object(f.a)({},E,T(C,P,P-1,k.length)));case"MOVE_BLOCKS_DOWN":var I=t.clientIds,x=t.rootClientId,L=void 0===x?"":x,A=Object(O.first)(I),N=Object(O.last)(I),R=e[L];if(!R.length||N===Object(O.last)(R))return e;var D=R.indexOf(A);return Object(d.a)({},e,Object(f.a)({},L,T(R,D,D+1,I.length)));case"REPLACE_BLOCKS":var F=t.blocks,M=t.clientIds;if(!F)return e;var U=B(F);return Object(O.flow)([function(e){return Object(O.omit)(e,M)},function(e){return Object(d.a)({},e,Object(O.omit)(U,""))},function(e){return Object(O.mapValues)(e,function(e){return Object(O.reduce)(e,function(e,t){return t===M[0]?Object(b.a)(e).concat(Object(b.a)(U[""])):(-1===M.indexOf(t)&&e.push(t),e)},[])})}])(e);case"REMOVE_BLOCKS":return Object(O.flow)([function(e){return Object(O.omit)(e,t.clientIds)},function(e){return Object(O.mapValues)(e,function(e){return O.without.apply(void 0,[e].concat(Object(b.a)(t.clientIds)))})}])(e)}return e}})});var U=Object(l.combineReducers)({data:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_REUSABLE_BLOCKS":return Object(O.reduce)(t.results,function(t,n){var r=n.reusableBlock,o=r.id,i=r.title,c={clientId:n.parsedBlock.clientId,title:i};return Object(O.isEqual)(t[o],c)||((t=N(e,t))[o]=c),t},e);case"UPDATE_REUSABLE_BLOCK_TITLE":var n=t.id,r=t.title;return e[n]&&e[n].title!==r?Object(d.a)({},e,Object(f.a)({},n,Object(d.a)({},e[n],{title:r}))):e;case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=t.id,i=t.updatedId;if(o===i)return e;var c=e[o];return Object(d.a)({},Object(O.omit)(e,o),Object(f.a)({},i,c));case"REMOVE_REUSABLE_BLOCK":var a=t.id;return Object(O.omit)(e,a)}return e},isFetching:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_REUSABLE_BLOCKS":var n=t.id;return n?Object(d.a)({},e,Object(f.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(O.omit)(e,r)}return e},isSaving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_REUSABLE_BLOCK":return Object(d.a)({},e,Object(f.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(O.omit)(e,n)}return e}});var H=v()(Object(l.combineReducers)({editor:M,initialEdits:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR":if(!t.edits)break;return t.edits;case"SETUP_EDITOR_STATE":return"content"in e?Object(O.omit)(e,"content"):e;case"UPDATE_POST":return Object(O.reduce)(t.edits,function(t,n,r){return t.hasOwnProperty(r)?(delete(t=N(e,t))[r],t):t},e);case"RESET_POST":return C}return e},currentPost:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":var n;if(t.post)n=t.post;else{if(!t.edits)return e;n=Object(d.a)({},e,t.edits)}return Object(O.mapValues)(n,I)}return e},isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},blockSelection:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{start:null,end:null,isMultiSelecting:!1,isEnabled:!0,initialPosition:null},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return null!==e.start||null!==e.end||e.isMultiSelecting?Object(d.a)({},e,{start:null,end:null,isMultiSelecting:!1,initialPosition:null}):e;case"START_MULTI_SELECT":return e.isMultiSelecting?e:Object(d.a)({},e,{isMultiSelecting:!0,initialPosition:null});case"STOP_MULTI_SELECT":return e.isMultiSelecting?Object(d.a)({},e,{isMultiSelecting:!1,initialPosition:null}):e;case"MULTI_SELECT":return Object(d.a)({},e,{start:t.start,end:t.end,initialPosition:null});case"SELECT_BLOCK":return t.clientId===e.start&&t.clientId===e.end?e:Object(d.a)({},e,{start:t.clientId,end:t.clientId,initialPosition:t.initialPosition});case"INSERT_BLOCKS":return t.updateSelection?Object(d.a)({},e,{start:t.blocks[0].clientId,end:t.blocks[0].clientId,initialPosition:null,isMultiSelecting:!1}):e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.start)?Object(d.a)({},e,{start:null,end:null,initialPosition:null,isMultiSelecting:!1}):e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.start))return e;var n=Object(O.get)(t.blocks,[0,"clientId"],null);return n===e.start&&n===e.end?e:Object(d.a)({},e,{start:n,end:n,initialPosition:null,isMultiSelecting:!1});case"TOGGLE_SELECTION":return Object(d.a)({},e,{isEnabled:t.isSelectionEnabled})}return e},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return Object(d.a)({},e,Object(f.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(O.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(O.isEqual)(e[n],t.settings)?e:Object(d.a)({},e,Object(f.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(O.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return{rootClientId:t.rootClientId,index:t.index};case"HIDE_INSERTION_POINT":return null}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(function(e,n){var r=n.name,o={name:n.name};return Object(i.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),Object(d.a)({},e,{insertUsage:Object(d.a)({},e.insertUsage,Object(f.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})},e);case"REMOVE_REUSABLE_BLOCK":return Object(d.a)({},e,{insertUsage:Object(O.omitBy)(e.insertUsage,function(e){return e.insert.ref===t.id})});case"ENABLE_PUBLISH_SIDEBAR":return Object(d.a)({},e,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(d.a)({},e,{isPublishSidebarEnabled:!1})}return e},saving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_START":return{requesting:!0,successful:!1,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_SUCCESS":return{requesting:!1,successful:!0,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_FAILURE":return{requesting:!1,successful:!1,error:t.error,options:t.options||{}}}return e},postLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},reusableBlocks:U,template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return Object(d.a)({},e,{isValid:t.isValid})}return e},autosave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_AUTOSAVE":var n=t.post,r=["title","excerpt","content"].map(function(e){return I(n[e])}),o=Object(u.a)(r,3);return{title:o[0],excerpt:o[1],content:o[2]}}return e},previewLink:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_SUCCESS":return t.post.preview_link?t.post.preview_link:t.post.link?Object(g.addQueryArgs)(t.post.link,{preview:!0}):e;case"REQUEST_POST_UPDATE_START":if(e&&t.options.isPreview)return null}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return Object(d.a)({},e,t.settings)}return e},postSavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_SAVING":return Object(d.a)({},e,Object(f.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(O.omit)(e,t.lockName)}return e}})),V=n(87),K=n.n(V),z=n(190),W=n.n(z),q=n(44);function G(e,t){return{type:"SETUP_EDITOR",post:e,edits:t}}function $(e){return{type:"RESET_POST",post:e}}function Y(e){return{type:"RESET_AUTOSAVE",post:e}}function Q(e){return{type:"UPDATE_POST",edits:e}}function X(e,t){return{type:"SETUP_EDITOR_STATE",post:e,blocks:t}}function Z(e){return{type:"RESET_BLOCKS",blocks:e}}function J(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function ee(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientId:e,attributes:t}}function te(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function ne(e){return{type:"SELECT_BLOCK",initialPosition:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,clientId:e}}function re(){return{type:"START_MULTI_SELECT"}}function oe(){return{type:"STOP_MULTI_SELECT"}}function ie(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function ce(){return{type:"CLEAR_SELECTED_BLOCK"}}function ae(){return{type:"TOGGLE_SELECTION",isSelectionEnabled:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}function se(e,t){return{type:"REPLACE_BLOCKS",clientIds:Object(O.castArray)(e),blocks:Object(O.castArray)(t),time:Date.now()}}function le(e,t){return se(e,t)}function ue(e){return function(t,n){return{clientIds:Object(O.castArray)(t),type:e,rootClientId:n}}}var de=ue("MOVE_BLOCKS_DOWN"),pe=ue("MOVE_BLOCKS_UP");function be(e,t,n,r){return{type:"MOVE_BLOCK_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientId:e,index:r}}function fe(e,t,n){return he([e],t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function he(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return{type:"INSERT_BLOCKS",blocks:Object(O.castArray)(e),index:t,rootClientId:n,time:Date.now(),updateSelection:r}}function me(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function ve(){return{type:"HIDE_INSERTION_POINT"}}function Oe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function ge(){return{type:"SYNCHRONIZE_TEMPLATE"}}function je(e){return{type:"EDIT_POST",edits:e}}function ye(){return{type:"REQUEST_POST_UPDATE",options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function ke(){return{type:"REFRESH_POST"}}function _e(e,t){return{type:"TRASH_POST",postId:e,postType:t}}function Ee(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function Se(e){return ye(Object(d.a)({isAutosave:!0},e))}function Ce(){return{type:"REDO"}}function we(){return{type:"UNDO"}}function Te(){return{type:"CREATE_UNDO_LEVEL"}}function Pe(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"REMOVE_BLOCKS",clientIds:Object(O.castArray)(e),selectPrevious:t}}function Ie(e,t){return Pe([e],t)}function Be(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function xe(){return{type:"START_TYPING"}}function Le(){return{type:"STOP_TYPING"}}function Ae(){return{type:"ENTER_FORMATTED_TEXT"}}function Ne(){return{type:"EXIT_FORMATTED_TEXT"}}function Re(e){return{type:"UPDATE_POST_LOCK",lock:e}}function De(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function Fe(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function Me(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function Ue(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function He(e,t){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:e,title:t}}function Ve(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function Ke(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(O.castArray)(e)}}function ze(e,t,n){return fe(Object(i.createBlock)(Object(i.getDefaultBlockName)(),e),n,t)}function We(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function qe(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}function Ge(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function $e(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Ye(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Qe(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}var Xe=n(31),Ze=n(46),Je=n(58),et="post-update",tt=/%(?:postname|pagename)%/,nt=3,rt=2,ot=1,it=0,ct=6e4,at=[];function st(e){return e.editor.past.length>0}function lt(e){return e.editor.future.length>0}function ut(e){return"auto-draft"===ft(e).status}function dt(e){return e.editor.present.blocks.isDirty||"content"in e.editor.present.edits}function pt(e){return!!dt(e)||(Object.keys(e.editor.present.edits).length>0||or(e,pt))}function bt(e){return!pt(e)&&ut(e)}function ft(e){return e.currentPost}function ht(e){return e.currentPost.type}function mt(e){return ft(e).id||null}function vt(e){return Object(O.get)(ft(e),["_links","version-history",0,"count"],0)}function Ot(e){return Object(O.get)(ft(e),["_links","predecessor-version",0,"id"],null)}var gt=Object(Xe.a)(function(e){return Object(d.a)({},e.initialEdits,e.editor.present.edits)},function(e){return[e.editor.present.edits,e.initialEdits]}),jt=Object(Xe.a)(function(){return[]},function(e){return[e.editor]});function yt(e,t){var n=ft(e);if(n.hasOwnProperty(t))return n[t]}function kt(e,t){switch(t){case"content":return Hn(e)}var n=gt(e);return n.hasOwnProperty(t)?P.has(t)?Object(d.a)({},yt(e,t),n[t]):n[t]:yt(e,t)}function _t(e,t){if(!Lt(e))return null;var n=xt(e);return n.hasOwnProperty(t)?n[t]:void 0}function Et(e){return"private"===kt(e,"status")?"private":kt(e,"password")?"password":"public"}function St(e){return"pending"===ft(e).status}function Ct(e){var t=ft(e);return-1!==["publish","private"].indexOf(t.status)||"future"===t.status&&!Object(Ze.isInTheFuture)(new Date(Number(Object(Ze.getDate)(t.date))-ct))}function wt(e){return"future"===ft(e).status&&!Ct(e)}function Tt(e){var t=ft(e);return pt(e)||-1===["publish","private","future"].indexOf(t.status)}function Pt(e){return!Ln(e)&&(!!kt(e,"title")||!!kt(e,"excerpt")||!It(e))}function It(e){var t=Un(e);if(t.length&&!("content"in gt(e))){if(t.length>1)return!1;if(t[0].name!==Object(i.getFreeformContentHandlerName)())return!1}return!Hn(e)}function Bt(e){if(!Pt(e))return!1;if(!Lt(e))return!0;if(dt(e))return!0;var t=xt(e);return["title","excerpt"].some(function(n){return t[n]!==kt(e,n)})}function xt(e){return e.autosave}function Lt(e){return!!xt(e)}function At(e){var t=kt(e,"date"),n=new Date(Number(Object(Ze.getDate)(t))-ct);return Object(Ze.isInTheFuture)(n)}function Nt(e){var t=kt(e,"date"),n=kt(e,"modified"),r=kt(e,"status");return("draft"===r||"auto-draft"===r)&&t===n}var Rt=Object(Xe.a)(function(){return[]},function(e,t){return Object(O.map)(vn(e,t),function(t){return Ut(e,t)})});function Dt(e,t){var n=e.editor.present.blocks.byClientId[t];return n?n.name:null}function Ft(e,t){var n=e.editor.present.blocks.byClientId[t];return!!n&&n.isValid}var Mt=Object(Xe.a)(function(e,t){var n=e.editor.present.blocks.byClientId[t];if(!n)return null;var r=e.editor.present.blocks.attributes[t],o=Object(i.getBlockType)(n.name);return o&&(r=Object(O.reduce)(o.attributes,function(t,n,o){return"meta"===n.source&&(t===r&&(t=Object(d.a)({},t)),t[o]=function(e,t){return Object(O.has)(e,["editor","present","edits","meta",t])?Object(O.get)(e,["editor","present","edits","meta",t]):Object(O.get)(e,["currentPost","meta",t])}(e,n.meta)),t},r)),r},function(e,t){return[e.editor.present.blocks.byClientId[t],e.editor.present.blocks.attributes[t],e.editor.present.edits.meta,e.initialEdits.meta,e.currentPost.meta]}),Ut=Object(Xe.a)(function(e,t){var n=e.editor.present.blocks.byClientId[t];return n?Object(d.a)({},n,{attributes:Mt(e,t),innerBlocks:Vt(e,t)}):null},function(e,t){return Object(b.a)(Mt.getDependants(e,t)).concat([Rt(e,t)])}),Ht=Object(Xe.a)(function(e,t){var n=e.editor.present.blocks.byClientId[t];return n?Object(d.a)({},n,{attributes:Mt(e,t)}):null},function(e,t){return[e.editor.present.blocks.byClientId[t]].concat(Object(b.a)(Mt.getDependants(e,t)))});var Vt=Object(Xe.a)(function(e,t){return Object(O.map)(vn(e,t),function(t){return Ut(e,t)})},function(e){return[e.editor.present.blocks]}),Kt=function e(t,n){return Object(O.flatMap)(n,function(n){var r=vn(t,n);return Object(b.a)(r).concat(Object(b.a)(e(t,r)))})},zt=Object(Xe.a)(function(e){var t=vn(e);return Object(b.a)(t).concat(Object(b.a)(Kt(e,t)))},function(e){return[e.editor.present.blocks.order]}),Wt=Object(Xe.a)(function(e,t){var n=zt(e);return t?Object(O.reduce)(n,function(n,r){return e.editor.present.blocks.byClientId[r].name===t?n+1:n},0):n.length},function(e){return[e.editor.present.blocks.order,e.editor.present.blocks.byClientId]}),qt=Object(Xe.a)(function(e,t){return Object(O.map)(Object(O.castArray)(t),function(t){return Ut(e,t)})},function(e){return[e.editor.present.edits.meta,e.initialEdits.meta,e.currentPost.meta,e.editor.present.blocks]});function Gt(e,t){return vn(e,t).length}function $t(e){return e.blockSelection.start}function Yt(e){return e.blockSelection.end}function Qt(e){var t=an(e).length;return t||(e.blockSelection.start?1:0)}function Xt(e){var t=e.blockSelection,n=t.start,r=t.end;return!!n&&n===r}function Zt(e){var t=e.blockSelection,n=t.start,r=t.end;return n&&n===r&&e.editor.present.blocks.byClientId[n]?n:null}function Jt(e){var t=Zt(e);return t?Ut(e,t):null}var en=Object(Xe.a)(function(e,t){var n=e.editor.present.blocks.order;for(var r in n)if(Object(O.includes)(n[r],t))return r;return null},function(e){return[e.editor.present.blocks.order]}),tn=Object(Xe.a)(function(e,t){for(var n=t,r=t;n;)n=en(e,r=n);return r},function(e){return[e.editor.present.blocks.order]});function nn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Zt(e)),void 0===t&&(t=n<0?ln(e):un(e)),!t)return null;var r=en(e,t);if(null===r)return null;var o=e.editor.present.blocks.order[r],i=o.indexOf(t)+1*n;return i<0?null:i===o.length?null:o[i]}function rn(e,t){return nn(e,t,-1)}function on(e,t){return nn(e,t,1)}function cn(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?e.blockSelection.initialPosition:null}var an=Object(Xe.a)(function(e){var t=e.blockSelection,n=t.start,r=t.end;if(n===r)return[];var o=en(e,n);if(null===o)return[];var i=vn(e,o),c=i.indexOf(n),a=i.indexOf(r);return c>a?i.slice(a,c+1):i.slice(c,a+1)},function(e){return[e.editor.present.blocks.order,e.blockSelection.start,e.blockSelection.end]}),sn=Object(Xe.a)(function(e){var t=an(e);return t.length?t.map(function(t){return Ut(e,t)}):at},function(e){return Object(b.a)(an.getDependants(e)).concat([e.editor.present.blocks,e.editor.present.edits.meta,e.initialEdits.meta,e.currentPost.meta])});function ln(e){return Object(O.first)(an(e))||null}function un(e){return Object(O.last)(an(e))||null}var dn=Object(Xe.a)(function(e,t,n){for(var r=n;t!==r&&r;)r=en(e,r);return t===r},function(e){return[e.editor.present.blocks.order]});function pn(e,t){return ln(e)===t}function bn(e,t){return-1!==an(e).indexOf(t)}var fn=Object(Xe.a)(function(e,t){for(var n=t,r=!1;n&&!r;)r=bn(e,n=en(e,n));return r},function(e){return[e.editor.present.blocks.order,e.blockSelection.start,e.blockSelection.end]});function hn(e){var t=e.blockSelection,n=t.start;return n===t.end?null:n||null}function mn(e){var t=e.blockSelection,n=t.start,r=t.end;return n===r?null:r||null}function vn(e,t){return e.editor.present.blocks.order[t||""]||at}function On(e,t,n){return vn(e,n).indexOf(t)}function gn(e,t){var n=e.blockSelection,r=n.start;return r===n.end&&r===t}function jn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(O.some)(vn(e,t),function(t){return gn(e,t)||bn(e,t)||n&&jn(e,t,n)})}function yn(e,t){if(!t)return!1;var n=an(e),r=n.indexOf(t);return r>-1&&r2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(O.isBoolean)(e)?e:Object(O.isArray)(e)?Object(O.includes)(e,t):n},o=Object(i.getBlockType)(t);if(!o)return!1;if(!r(cr(e).allowedBlockTypes,t,!0))return!1;if(!!xn(e,n))return!1;var c=ir(e,n),a=r(Object(O.get)(c,["allowedBlocks"]),t),s=r(o.parent,Dt(e,n));return null!==a&&null!==s?a||s:null!==a?a:null===s||s},Kn=Object(Xe.a)(Vn,function(e,t,n){return[e.blockListSettings[n],e.editor.present.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]});function zn(e,t){return e.preferences.insertUsage[t]||null}var Wn=function(e,t,n){return!!Object(i.hasBlockSupport)(t,"inserter",!0)&&Vn(e,t.name,n)},qn=function(e,t,n){if(!Vn(e,"core/block",n))return!1;var r=Dt(e,t.clientId);return!!r&&(!!Object(i.getBlockType)(r)&&(!!Vn(e,r,n)&&!dn(e,t.clientId,n)))},Gn=Object(Xe.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?nt:t>0?rt:"common"===e?ot:it},r=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},o=Object(i.getBlockTypes)().filter(function(n){return Wn(e,n,t)}).map(function(t){var o=t.name,c=!1;Object(i.hasBlockSupport)(t.name,"multiple",!0)||(c=Object(O.some)(qt(e,zt(e)),{name:t.name}));var a=Object(O.isArray)(t.parent),s=zn(e,o)||{},l=s.time,u=s.count,d=void 0===u?0:u;return{id:o,name:t.name,initialAttributes:{},title:t.title,icon:t.icon,category:t.category,keywords:t.keywords,isDisabled:c,utility:n(t.category,d,a),frecency:r(l,d),hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(t.name)}}),c=Zn(e).filter(function(n){return qn(e,n,t)}).map(function(t){var o="core/block/".concat(t.id),c=Dt(e,t.clientId),a=Object(i.getBlockType)(c),s=zn(e,o)||{},l=s.time,u=s.count,d=void 0===u?0:u,p=n("reusable",d,!1),b=r(l,d);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:a.icon,category:"reusable",keywords:[],isDisabled:!1,utility:p,frecency:b}});return Object(O.orderBy)(Object(b.a)(o).concat(Object(b.a)(c)),["utility","frecency"],["desc","desc"])},function(e,t){return[e.blockListSettings[t],e.editor.present.blocks.byClientId,e.editor.present.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,e.reusableBlocks.data,Object(i.getBlockTypes)()]}),$n=Object(Xe.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return!!Object(O.some)(Object(i.getBlockTypes)(),function(n){return Wn(e,n,t)})||Object(O.some)(Zn(e),function(n){return qn(e,n,t)})},function(e,t){return[e.blockListSettings[t],e.editor.present.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,e.reusableBlocks.data,Object(i.getBlockTypes)()]}),Yn=Object(Xe.a)(function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return Object(d.a)({},n,{id:r?t:+t,isTemporary:r})},function(e,t){return[e.reusableBlocks.data[t]]});function Qn(e,t){return e.reusableBlocks.isSaving[t]||!1}function Xn(e,t){return!!e.reusableBlocks.isFetching[t]}function Zn(e){return Object(O.map)(e.reusableBlocks.data,function(t,n){return Yn(e,n)})}function Jn(e,t){var n=Object(O.find)(e.optimist,function(e){return e.beforeState&&Object(O.get)(e.action,["optimist","id"])===t});return n?n.beforeState:null}function er(e){if(!Ln(e))return!1;if(!Ct(e))return!1;var t=Jn(e,et);return!!t&&!Ct(t)}function tr(e){var t=kt(e,"permalink_template");return tt.test(t)}function nr(e){var t=rr(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return tr(e)?n+r+o:n}function rr(e){var t=kt(e,"permalink_template");if(!t)return null;var n=kt(e,"slug")||kt(e,"generated_slug"),r=t.split(tt),o=Object(u.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function or(e,t){var n=e.optimist;return!!n&&n.some(function(e){var n=e.beforeState;return n&&t(n)})}function ir(e,t){return e.blockListSettings[t]}function cr(e){return e.settings}function ar(e,t){return t?e.tokens[t]:e.tokens}function sr(e){return e.postLock.isLocked}function lr(e){return Object.keys(e.postSavingLock).length>0}function ur(e){return e.postLock.isTakeover}function dr(e){return e.postLock.user}function pr(e){return e.postLock.activePostLock}function br(e){return Object(O.has)(ft(e),["_links","wp:action-unfiltered-html"])}function fr(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:E.isPublishSidebarEnabled}var hr=n(38),mr=n(30),vr=n.n(mr),Or=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,c,a,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,o=n.dispatch,e.next=4,vr()({path:"/wp/v2/types/wp_block"});case 4:if(c=e.sent){e.next=7;break}return e.abrupt("return");case 7:if(e.prev=7,!r){e.next=15;break}return e.next=11,vr()({path:"/wp/v2/".concat(c.rest_base,"/").concat(r)});case 11:e.t0=e.sent,a=[e.t0],e.next=18;break;case 15:return e.next=17,vr()({path:"/wp/v2/".concat(c.rest_base,"?per_page=-1")});case 17:a=e.sent;case 18:(s=Object(O.compact)(Object(O.map)(a,function(e){if("publish"!==e.status||e.content.protected)return null;var t=Object(i.parse)(e.content.raw);return{reusableBlock:{id:e.id,title:I(e.title)},parsedBlock:1===t.length?t[0]:Object(i.createBlock)("core/template",{},t)}}))).length&&o(Fe(s)),o({type:"FETCH_REUSABLE_BLOCKS_SUCCESS",id:r}),e.next=26;break;case 23:e.prev=23,e.t1=e.catch(7),o({type:"FETCH_REUSABLE_BLOCKS_FAILURE",id:r,error:e.t1});case 26:case"end":return e.stop()}},e,this,[[7,23]])}));return function(t,n){return e.apply(this,arguments)}}(),gr=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,c,a,s,u,d,p,b,f,h,m,v,O,g;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vr()({path:"/wp/v2/types/wp_block"});case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:return o=t.id,c=n.dispatch,a=n.getState(),s=Yn(a,o),u=s.clientId,d=s.title,p=s.isTemporary,b=Ut(a,u),f=Object(i.serialize)("core/template"===b.name?b.innerBlocks:b),h=p?{title:d,content:f,status:"publish"}:{id:o,title:d,content:f,status:"publish"},m=p?"/wp/v2/".concat(r.rest_base):"/wp/v2/".concat(r.rest_base,"/").concat(o),v=p?"POST":"PUT",e.prev=14,e.next=17,vr()({path:m,data:h,method:v});case 17:O=e.sent,c({type:"SAVE_REUSABLE_BLOCK_SUCCESS",updatedId:O.id,id:o}),g=p?Object(_.__)("Block created."):Object(_.__)("Block updated."),Object(l.dispatch)("core/notices").createSuccessNotice(g,{id:"REUSABLE_BLOCK_NOTICE_ID"}),e.next=27;break;case 23:e.prev=23,e.t0=e.catch(14),c({type:"SAVE_REUSABLE_BLOCK_FAILURE",id:o}),Object(l.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 27:case"end":return e.stop()}},e,this,[[14,23]])}));return function(t,n){return e.apply(this,arguments)}}(),jr=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,c,a,s,u,d,p,f,h;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vr()({path:"/wp/v2/types/wp_block"});case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:if(o=t.id,c=n.getState,a=n.dispatch,(s=Yn(c(),o))&&!s.isTemporary){e.next=10;break}return e.abrupt("return");case 10:return u=Vt(c()),d=u.filter(function(e){return Object(i.isReusableBlock)(e)&&e.attributes.ref===o}),p=d.map(function(e){return e.clientId}),f=Object(O.uniqueId)(),a({type:"REMOVE_REUSABLE_BLOCK",id:o,optimist:{type:m.BEGIN,id:f}}),a(Pe(Object(b.a)(p).concat([s.clientId]))),e.prev=16,e.next=19,vr()({path:"/wp/v2/".concat(r.rest_base,"/").concat(o),method:"DELETE"});case 19:a({type:"DELETE_REUSABLE_BLOCK_SUCCESS",id:o,optimist:{type:m.COMMIT,id:f}}),h=Object(_.__)("Block deleted."),Object(l.dispatch)("core/notices").createSuccessNotice(h,{id:"REUSABLE_BLOCK_NOTICE_ID"}),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(16),a({type:"DELETE_REUSABLE_BLOCK_FAILURE",id:o,optimist:{type:m.REVERT,id:f}}),Object(l.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return e.stop()}},e,this,[[16,24]])}));return function(t,n){return e.apply(this,arguments)}}();function yr(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.getBlockInsertionParentClientId,n=void 0===t?Xr:t,r=e.getInserterItems,o=void 0===r?Zr:r,c=e.getSelectedBlockName,a=void 0===c?Jr:c;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){var e=a();return o(n()).filter(function(t){return e!==t.name})},getOptionKeywords:function(e){var t=e.title,n=e.keywords,r=void 0===n?[]:n;return[e.category].concat(Object(b.a)(r),[t])},getOptionLabel:function(e){var t=e.icon,n=e.title;return[Object(Br.createElement)(Qr,{key:"icon",icon:t,showColors:!0}),n]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes;return{action:"replace",value:Object(i.createBlock)(t,n)}},isOptionDisabled:function(e){return e.isDisabled}}}(),to={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),vr()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[Object(Br.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}),Object(Br.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(Br.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}},no=[{icon:"editor-alignleft",title:Object(_.__)("Align text left"),align:"left"},{icon:"editor-aligncenter",title:Object(_.__)("Align text center"),align:"center"},{icon:"editor-alignright",title:Object(_.__)("Align text right"),align:"right"}];var ro=Object(Ar.compose)(qr(function(e){return{clientId:e.clientId}}),Object(s.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,r=t.isLargeViewport,o=t.isCollapsed,i=e("core/editor"),c=i.getBlockRootClientId,a=i.getEditorSettings;return{isCollapsed:o||!r||!a().hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,r=e.onChange,o=e.alignmentControls,i=void 0===o?no:o;function c(e){return function(){return r(n===e?void 0:e)}}var a=Object(O.find)(i,function(e){return e.align===n});return Object(Br.createElement)(Vr.Toolbar,{isCollapsed:t,icon:a?a.icon:"editor-alignleft",label:Object(_.__)("Change Text Alignment"),controls:i.map(function(e){var t=e.align,r=n===t;return Object(d.a)({},e,{isActive:r,onClick:c(t)})})})}),oo={left:{icon:"align-left",title:Object(_.__)("Align left")},center:{icon:"align-center",title:Object(_.__)("Align center")},right:{icon:"align-right",title:Object(_.__)("Align right")},wide:{icon:"align-wide",title:Object(_.__)("Wide width")},full:{icon:"align-full-width",title:Object(_.__)("Full width")}},io=["left","center","right","wide","full"],co=["wide","full"];var ao=Object(Ar.compose)(qr(function(e){return{clientId:e.clientId}}),Object(s.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,r=t.isLargeViewport,o=t.isCollapsed,i=e("core/editor"),c=i.getBlockRootClientId,a=i.getEditorSettings;return{wideControlsEnabled:e("core/editor").getEditorSettings().alignWide,isCollapsed:o||!r||!a().hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,r=e.onChange,o=e.controls,i=void 0===o?io:o,c=e.wideControlsEnabled,a=void 0!==c&&c?i:i.filter(function(e){return-1===co.indexOf(e)}),s=oo[n];return Object(Br.createElement)(Vr.Toolbar,{isCollapsed:t,icon:s?s.icon:"align-left",label:Object(_.__)("Change Alignment"),controls:a.map(function(e){return Object(d.a)({},oo[e],{isActive:n===e,onClick:(t=e,function(){return r(n===t?void 0:t)})});var t})})}),so=Object(Vr.createSlotFill)("BlockControls"),lo=so.Fill,uo=so.Slot,po=Gr(function(e){var t=e.controls,n=e.children;return Object(Br.createElement)(lo,null,Object(Br.createElement)(Vr.Toolbar,{controls:t}),n)});po.Slot=uo;var bo=po,fo=Object(Vr.withFilters)("editor.BlockEdit")(function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(i.getBlockType)(r);if(!o)return null;var c=Object(i.hasBlockSupport)(o,"className",!0)?Object(i.getBlockDefaultClassName)(r):null,a=Lr()(c,n.className),s=o.edit||o.save;return Object(Br.createElement)(s,Object(Ir.a)({},e,{className:a}))}),ho=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).setFocusedElement=n.setFocusedElement.bind(Object(Hr.a)(Object(Hr.a)(n))),n.state={focusedElement:null,setFocusedElement:n.setFocusedElement},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"setFocusedElement",value:function(e){this.setState(function(t){return t.focusedElement===e?null:{focusedElement:e}})}},{key:"render",value:function(){return Object(Br.createElement)(Wr,{value:this.state},Object(Br.createElement)(fo,this.props))}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.clientId;return{name:e.name,isSelected:e.isSelected,clientId:t}}}]),t}(Br.Component),mo=Object(Vr.createSlotFill)("BlockFormatControls"),vo=mo.Fill,Oo=mo.Slot,go=Gr(vo);go.Slot=Oo;var jo=go,yo=n(16);function ko(e){var t=e.blocks,n=e.selectedBlockClientId,r=e.selectBlock,o=e.showNestedBlocks;return Object(Br.createElement)("ul",{className:"editor-block-navigation__list",role:"list"},Object(O.map)(t,function(e){var t=Object(i.getBlockType)(e.name),c=e.clientId===n;return Object(Br.createElement)("li",{key:e.clientId},Object(Br.createElement)("div",{className:"editor-block-navigation__item"},Object(Br.createElement)(Vr.Button,{className:Lr()("editor-block-navigation__item-button",{"is-selected":e.clientId===n}),onClick:function(){return r(e.clientId)},isSelected:c},Object(Br.createElement)(Qr,{icon:t.icon,showColors:!0}),t.title,c&&Object(Br.createElement)("span",{className:"screen-reader-text"},Object(_.__)("(selected block)")))),o&&!!e.innerBlocks&&!!e.innerBlocks.length&&Object(Br.createElement)(ko,{blocks:e.innerBlocks,selectedBlockClientId:n,selectBlock:r,showNestedBlocks:!0}))}))}var _o=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.getBlock,i=t.getBlocks,c=n();return{rootBlocks:i(),rootBlock:c?o(r(c)):null,selectedBlockClientId:c}}),Object(l.withDispatch)(function(e,t){var n=t.onSelect,r=void 0===n?O.noop:n;return{selectBlock:function(t){e("core/editor").selectBlock(t),r(t)}}}))(function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(Br.createElement)(Vr.NavigableMenu,{role:"presentation",className:"editor-block-navigation__container"},Object(Br.createElement)("p",{className:"editor-block-navigation__label"},Object(_.__)("Block Navigation")),i&&Object(Br.createElement)(ko,{blocks:[t],selectedBlockClientId:r,selectBlock:o,showNestedBlocks:!0}),!i&&Object(Br.createElement)(ko,{blocks:n,selectedBlockClientId:r,selectBlock:o}))}),Eo=Object(Br.createElement)(Vr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},Object(Br.createElement)(Vr.Path,{d:"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z"}));var So=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/editor").getBlockCount()}})(function(e){var t=e.hasBlocks;return Object(Br.createElement)(Vr.Dropdown,{renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.a)({},yo.rawShortcut.access("o"),r)}),Object(Br.createElement)(Vr.IconButton,{icon:Eo,"aria-expanded":n,onClick:t?r:void 0,label:Object(_.__)("Block Navigation"),className:"editor-block-navigation",shortcut:yo.displayShortcut.access("o"),"aria-disabled":!t}))},renderContent:function(e){var t=e.onClose;return Object(Br.createElement)(_o,{onSelect:t})}})}),Co=Object(Ar.createHigherOrderComponent)(Object(l.withSelect)(function(e,t){var n=e("core/editor").getEditorSettings(),r=void 0===t.colors?n.colors:t.colors,o=void 0===t.disableCustomColors?n.disableCustomColors:t.disableCustomColors;return{colors:r,disableCustomColors:o,hasColorsToChoose:!Object(O.isEmpty)(r)||!o}}),"withColorContext"),wo=Co(Vr.ColorPalette),To=n(45),Po=n.n(To),Io=function(e,t,n){if(t){var r=Object(O.find)(e,{slug:t});if(r)return r}return{color:n}},Bo=function(e,t){return Object(O.find)(e,{color:t})};function xo(e,t){if(e&&t)return"has-".concat(Object(O.kebabCase)(t),"-").concat(e)}var Lo=[],Ao=function(){for(var e=arguments.length,t=new Array(e),n=0;n=24?"large":"small"}))return null;var l=a.getBrightness()1?function(e,t,n,r,o){var i=t+1;if(o<0&&n)return Object(_.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(_.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(_.sprintf)(Object(_._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,i);if(o>0&&!r)return Object(_.sprintf)(Object(_._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,i)}(e,n,r,o,i):r&&o?Object(_.sprintf)(Object(_.__)("Block %s is the only block, and cannot be moved"),t):i>0&&!o?Object(_.sprintf)(Object(_.__)("Move %1$s block from position %2$d down to position %3$d"),t,c,c+1):i>0&&o?Object(_.sprintf)(Object(_.__)("Block %s is at the end of the content and can’t be moved down"),t):i<0&&!r?Object(_.sprintf)(Object(_.__)("Move %1$s block from position %2$d up to position %3$d"),t,c,c-1):i<0&&r?Object(_.sprintf)(Object(_.__)("Block %s is at the beginning of the content and can’t be moved up"),t):void 0}var zo=Object(Br.createElement)(Vr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Br.createElement)(Vr.Polygon,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),Wo=Object(Br.createElement)(Vr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Br.createElement)(Vr.Polygon,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),qo=Object(Br.createElement)(Vr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Br.createElement)(Vr.Path,{d:"M13,8c0.6,0,1-0.4,1-1s-0.4-1-1-1s-1,0.4-1,1S12.4,8,13,8z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,10 c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,10,5,10z M13,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S13.6,10,13,10z M9,6 C8.4,6,8,6.4,8,7s0.4,1,1,1s1-0.4,1-1S9.6,6,9,6z M9,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S9.6,10,9,10z"})),Go=Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlockIndex,i=r.getBlockRootClientId;return{index:o(n),rootClientId:i(n)}})(function(e){var t=e.children,n=e.clientId,r=e.rootClientId,o=e.blockElementId,i=e.index,c=e.onDragStart,a=e.onDragEnd,s={type:"block",srcIndex:i,srcRootClientId:r,srcClientId:n};return Object(Br.createElement)(Vr.Draggable,{elementId:o,transferData:s,onDragStart:c,onDragEnd:a},function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:r})})}),$o=function(e){var t=e.isVisible,n=e.className,r=e.icon,o=e.onDragStart,i=e.onDragEnd,c=e.blockElementId,a=e.clientId;if(!t)return null;var s=Lr()("editor-block-mover__control-drag-handle",n);return Object(Br.createElement)(Go,{clientId:a,blockElementId:c,onDragStart:o,onDragEnd:i},function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(Br.createElement)("div",{className:s,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},r)})},Yo=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onBlur=e.onBlur.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onFocus",value:function(){this.setState({isFocused:!0})}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.onMoveUp,n=e.onMoveDown,r=e.isFirst,o=e.isLast,i=e.isDraggable,c=e.onDragStart,a=e.onDragEnd,s=e.clientIds,l=e.blockElementId,u=e.blockType,d=e.firstIndex,p=e.isLocked,b=e.instanceId,f=e.isHidden,h=this.state.isFocused,m=Object(O.castArray)(s).length;return p||r&&o?null:Object(Br.createElement)("div",{className:Lr()("editor-block-mover",{"is-visible":h||!f})},Object(Br.createElement)(Vr.IconButton,{className:"editor-block-mover__control",onClick:r?null:t,icon:zo,label:Object(_.__)("Move up"),"aria-describedby":"editor-block-mover__up-description-".concat(b),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Br.createElement)($o,{className:"editor-block-mover__control",icon:qo,clientId:s,blockElementId:l,isVisible:i,onDragStart:c,onDragEnd:a}),Object(Br.createElement)(Vr.IconButton,{className:"editor-block-mover__control",onClick:o?null:n,icon:Wo,label:Object(_.__)("Move down"),"aria-describedby":"editor-block-mover__down-description-".concat(b),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Br.createElement)("span",{id:"editor-block-mover__up-description-".concat(b),className:"editor-block-mover__description"},Ko(m,u&&u.title,d,r,o,-1)),Object(Br.createElement)("span",{id:"editor-block-mover__down-description-".concat(b),className:"editor-block-mover__description"},Ko(m,u&&u.title,d,r,o,1)))}}]),t}(Br.Component),Qo=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlock,c=r.getBlockIndex,a=r.getTemplateLock,s=r.getBlockRootClientId,l=Object(O.first)(Object(O.castArray)(n)),u=o(l),d=s(Object(O.first)(Object(O.castArray)(n)));return{firstIndex:c(l,d),blockType:u?Object(i.getBlockType)(u.name):null,isLocked:"all"===a(d),rootClientId:d}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.rootClientId,o=e("core/editor"),i=o.moveBlocksDown,c=o.moveBlocksUp;return{onMoveDown:Object(O.partial)(i,n,r),onMoveUp:Object(O.partial)(c,n,r)}}),Ar.withInstanceId)(Yo);var Xo=Object(l.withSelect)(function(e){return{hasUploadPermissions:(0,e("core").hasUploadPermissions)()}})(function(e){var t=e.hasUploadPermissions,n=e.fallback,r=void 0===n?null:n,o=e.children;return t?o:r}),Zo=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onHTMLDrop=e.onHTMLDrop.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onDrop=e.onDrop.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"getInsertIndex",value:function(e){var t=this.props.index;if(void 0!==t)return"top"===e.y?t:t+1}},{key:"onFilesDrop",value:function(e,t){var n=Object(i.findTransform)(Object(i.getBlockTransforms)("from"),function(t){return"files"===t.type&&t.isMatch(e)});if(n){var r=this.getInsertIndex(t),o=n.transform(e,this.props.updateBlockAttributes);this.props.insertBlocks(o,r)}}},{key:"onHTMLDrop",value:function(e,t){var n=Object(i.pasteHandler)({HTML:e,mode:"BLOCKS"});n.length&&this.props.insertBlocks(n,this.getInsertIndex(t))}},{key:"onDrop",value:function(e,t){var n=this.props,r=n.rootClientId,o=n.clientId,i=n.index,c=n.getClientIdsOfDescendants,a=function(e){var t={srcRootClientId:null,srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),s=a.srcRootClientId,l=a.srcClientId,u=a.srcIndex,d=a.type;if("block"===d&&l!==o&&!function(e,t){return c([e]).some(function(e){return e===t})}(l,o)){var p,b,f=this.getInsertIndex(t),h=i&&u0&&Object(Br.createElement)("div",{className:"editor-warning__actions"},Br.Children.map(n,function(e,t){return Object(Br.createElement)("span",{key:t,className:"editor-warning__action"},e)}))),o&&Object(Br.createElement)(Vr.Dropdown,{className:"editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Br.createElement)(Vr.IconButton,{icon:"ellipsis",label:Object(_.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(Br.createElement)(Vr.MenuGroup,{label:Object(_.__)("More options")},o.map(function(e,t){return Object(Br.createElement)(Vr.MenuItem,{onClick:e.onClick,key:t},e.title)}))}}))},ti=n(191),ni=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,i=e.actionText,c=e.className;return Object(Br.createElement)("div",{className:c},Object(Br.createElement)("div",{className:"editor-block-compare__content"},Object(Br.createElement)("h2",{className:"editor-block-compare__heading"},t),Object(Br.createElement)("div",{className:"editor-block-compare__html"},n),Object(Br.createElement)("div",{className:"editor-block-compare__preview edit-post-visual-editor"},r)),Object(Br.createElement)("div",{className:"editor-block-compare__action"},Object(Br.createElement)(Vr.Button,{isLarge:!0,tabIndex:"0",onClick:o},i)))},ri=function(e){function t(){return Object(Rr.a)(this,t),Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"getDifference",value:function(e,t){return Object(ti.diffChars)(e,t).map(function(e,t){var n=Lr()({"editor-block-compare__added":e.added,"editor-block-compare__removed":e.removed});return Object(Br.createElement)("span",{key:t,className:n},e.value)})}},{key:"getOriginalContent",value:function(e){return{rawContent:e.originalContent,renderedContent:Object(i.getSaveElement)(e.name,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(O.castArray)(e),n=t.map(function(e){return Object(i.getSaveContent)(e.name,e.attributes,e.innerBlocks)}),r=t.map(function(e){return Object(i.getSaveElement)(e.name,e.attributes,e.innerBlocks)});return{rawContent:n.join(""),renderedContent:r}}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.onKeep,r=e.onConvert,o=e.convertor,i=e.convertButtonText,c=this.getOriginalContent(t),a=this.getConvertedContent(o(t)),s=this.getDifference(c.rawContent,a.rawContent);return Object(Br.createElement)("div",{className:"editor-block-compare__wrapper"},Object(Br.createElement)(ni,{title:Object(_.__)("Current"),className:"editor-block-compare__current",action:n,actionText:Object(_.__)("Convert to HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(Br.createElement)(ni,{title:Object(_.__)("After Conversion"),className:"editor-block-compare__converted",action:r,actionText:i,rawContent:s,renderedContent:a.renderedContent}))}}]),t}(Br.Component),oi=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onCompareClose=n.onCompareClose.bind(Object(Hr.a)(Object(Hr.a)(n))),n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.block,c=!!Object(i.getBlockType)("core/html"),a=this.state.compare,s=[{title:Object(_.__)("Convert to Classic Block"),onClick:r}];return a?Object(Br.createElement)(Vr.Modal,{title:Object(_.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare"},Object(Br.createElement)(ri,{block:o,onKeep:t,onConvert:n,convertor:ii,convertButtonText:Object(_.__)("Convert to Blocks")})):Object(Br.createElement)(ei,{actions:[Object(Br.createElement)(Vr.Button,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!c},Object(_._x)("Resolve","imperative verb")),c&&Object(Br.createElement)(Vr.Button,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},Object(_.__)("Convert to HTML"))],secondaryActions:s},Object(_.__)("This block contains unexpected or invalid content."))}}]),t}(Br.Component),ii=function(e){return Object(i.rawHandler)({HTML:e.originalContent})},ci=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId;return{block:e("core/editor").getBlock(n)}}),Object(l.withDispatch)(function(e,t){var n=t.block,r=e("core/editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(i.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(i.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,ii(n))}}})])(oi),ai=Object(Br.createElement)(ei,null,Object(_.__)("This block has encountered an error and cannot be previewed.")),si=function(){return ai},li=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={hasError:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),t}(Br.Component),ui=n(55),di=n.n(ui),pi=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onBlur=n.onBlur.bind(Object(Hr.a)(Object(Hr.a)(n))),n.state={html:e.block.isValid?Object(i.getBlockContent)(e.block):e.block.originalContent},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(e){Object(O.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:Object(i.getBlockContent)(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=Object(i.getBlockType)(this.props.block.name),n=Object(i.getBlockAttributes)(t,e,this.props.block.attributes),r=e||Object(i.getSaveContent)(t,n),o=!e||Object(i.isValidBlockContent)(t,n,r);this.props.onChange(this.props.clientId,n,r,o),e||this.setState({html:r})}},{key:"onChange",value:function(e){this.setState({html:e.target.value})}},{key:"render",value:function(){var e=this.state.html;return Object(Br.createElement)(di.a,{className:"editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(Br.Component),bi=Object(Ar.compose)([Object(l.withSelect)(function(e,t){return{block:e("core/editor").getBlock(t.clientId)}}),Object(l.withDispatch)(function(e){return{onChange:function(t,n,r,o){e("core/editor").updateBlock(t,{attributes:n,originalContent:r,isValid:o})}}})])(pi);var fi=Object(l.withSelect)(function(e,t){return{name:(0,e("core/editor").getBlockName)(t.clientId)}})(function(e){var t=e.name;if(!t)return null;var n=Object(i.getBlockType)(t);return n?n.title:null}),hi=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onBlur=e.onBlur.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onFocus",value:function(e){this.setState({isFocused:!0}),e.stopPropagation()}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.rootClientId;return Object(Br.createElement)("div",{className:"editor-block-list__breadcrumb"},Object(Br.createElement)(Vr.Toolbar,null,n&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(fi,{clientId:n}),Object(Br.createElement)("span",{className:"editor-block-list__descendant-arrow"})),Object(Br.createElement)(fi,{clientId:t})))}}]),t}(Br.Component),mi=Object(Ar.compose)([Object(l.withSelect)(function(e,t){return{rootClientId:(0,e("core/editor").getBlockRootClientId)(t.clientId)}})])(hi),vi=window,Oi=vi.Node,gi=vi.getSelection,ji=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(Object(Hr.a)(Object(Hr.a)(e))),e.focusSelection=e.focusSelection.bind(Object(Hr.a)(Object(Hr.a)(e))),e.switchOnKeyDown=Object(O.cond)([[Object(O.matchesProperty)(["keyCode"],yo.ESCAPE),e.focusSelection]]),e.toolbar=Object(Br.createRef)(),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"focusToolbar",value:function(){var e=Vo.focus.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=gi();if(e){var t=e.focusNode;t.nodeType!==Oi.ELEMENT_NODE&&(t=t.parentElement),t&&t.focus()}}},{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.focusToolbar()}},{key:"render",value:function(){var e=this.props,t=e.children,n=Object(p.a)(e,["children"]);return Object(Br.createElement)(Vr.NavigableMenu,Object(Ir.a)({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(O.omit)(n,["focusOnMount"])),Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(Br.Component);var yi=function(e){var t=e.focusOnMount;return Object(Br.createElement)(ji,{focusOnMount:t,className:"editor-block-contextual-toolbar","aria-label":Object(_.__)("Block tools")},Object(Br.createElement)(ql,null))};var ki=Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getMultiSelectedBlockClientIds,i=r.isMultiSelecting,c=r.getBlockIndex,a=r.getBlockCount,s=o(),l=c(Object(O.first)(s),n),u=c(Object(O.last)(s),n);return{multiSelectedBlockClientIds:s,isSelecting:i(),isFirst:0===l,isLast:u+1===a()}})(function(e){var t=e.multiSelectedBlockClientIds,n=e.clientId,r=e.isSelecting,o=e.isFirst,i=e.isLast;return r?null:Object(Br.createElement)(Qo,{key:"mover",clientId:n,clientIds:t,isFirst:o,isLast:i})}),_i=n(59),Ei=n.n(_i);function Si(e){var t=e.name,n=e.attributes,r=Object(i.createBlock)(t,n);return Object(Br.createElement)(Vr.Disabled,{className:"editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object(Br.createElement)(ho,{name:t,focus:!1,attributes:r.attributes,setAttributes:O.noop}))}var Ci=function(e){return Object(Br.createElement)("div",{className:"editor-block-preview"},Object(Br.createElement)("div",{className:"editor-block-preview__title"},Object(_.__)("Preview")),Object(Br.createElement)(Si,e))};var wi=function(e){var t=e.icon,n=e.hasChildBlocksWithInserterSupport,r=e.onClick,o=e.isDisabled,i=e.title,c=e.className,a=Object(p.a)(e,["icon","hasChildBlocksWithInserterSupport","onClick","isDisabled","title","className"]),s=t?{backgroundColor:t.background,color:t.foreground}:{},l=t&&t.shadowColor?{backgroundColor:t.shadowColor}:{};return Object(Br.createElement)("li",{className:"editor-block-types-list__list-item"},Object(Br.createElement)("button",Object(Ir.a)({className:Lr()("editor-block-types-list__item",c,{"editor-block-types-list__item-has-children":n}),onClick:function(e){e.preventDefault(),r()},disabled:o,"aria-label":i},a),Object(Br.createElement)("span",{className:"editor-block-types-list__item-icon",style:s},Object(Br.createElement)(Qr,{icon:t,showColors:!0}),n&&Object(Br.createElement)("span",{className:"editor-block-types-list__item-icon-stack",style:l})),Object(Br.createElement)("span",{className:"editor-block-types-list__item-title"},i)))};var Ti=function(e){var t=e.items,n=e.onSelect,r=e.onHover,o=void 0===r?function(){}:r,c=e.children;return Object(Br.createElement)("ul",{role:"list",className:"editor-block-types-list"},t&&t.map(function(e){return Object(Br.createElement)(wi,{key:e.id,className:Object(i.getBlockMenuDefaultClassName)(e.id),icon:e.icon,hasChildBlocksWithInserterSupport:e.hasChildBlocksWithInserterSupport,onClick:function(){n(e),o(null)},onFocus:function(){return o(e)},onMouseEnter:function(){return o(e)},onMouseLeave:function(){return o(null)},onBlur:function(){return o(null)},isDisabled:e.isDisabled,title:e.title})}),c)};var Pi=Object(Ar.compose)(Object(Ar.ifCondition)(function(e){var t=e.items;return t&&t.length>0}),Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=(0,e("core/blocks").getBlockType)((0,e("core/editor").getBlockName)(n));return{rootBlockTitle:r&&r.title,rootBlockIcon:r&&r.icon}}))(function(e){var t=e.rootBlockIcon,n=e.rootBlockTitle,r=e.items,o=Object(p.a)(e,["rootBlockIcon","rootBlockTitle","items"]);return Object(Br.createElement)("div",{className:"editor-inserter__child-blocks"},(t||n)&&Object(Br.createElement)("div",{className:"editor-inserter__parent-block-header"},Object(Br.createElement)(Qr,{icon:t,showColors:!0}),n&&Object(Br.createElement)("h2",null,n)),Object(Br.createElement)(Ti,Object(Ir.a)({items:r},o)))}),Ii=function(e){var t=e.filterValue;return Object(Br.createElement)(Vr.Slot,{name:"Inserter.InlineElements",fillProps:{filterValue:t}},function(e){return!Object(O.isEmpty)(e)&&Object(Br.createElement)(Vr.PanelBody,{title:Object(_.__)("Inline Elements"),initialOpen:!1,className:"editor-inserter__inline-elements"},Object(Br.createElement)(Ti,null,e))})},Bi=function(e){return e.stopPropagation()},xi=function(e){return e=(e=(e=(e=Object(O.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Li=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onHover=e.onHover.bind(Object(Hr.a)(Object(Hr.a)(e))),e.panels={},e.inserterResults=Object(Br.createRef)(),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.props.fetchReusableBlocks(),this.filter()}},{key:"componentDidUpdate",value:function(e){e.items!==this.props.items&&this.filter(this.state.filterValue)}},{key:"onChangeSearchInput",value:function(e){this.filter(e.target.value)}},{key:"onHover",value:function(e){this.setState({hoveredItem:e});var t=this.props,n=t.showInsertionPoint,r=t.hideInsertionPoint;if(e){var o=this.props;n(o.rootClientId,o.index)}else r()}},{key:"bindPanel",value:function(e){var t=this;return function(n){t.panels[e]=n}}},{key:"onTogglePanel",value:function(e){var t=this;return function(){-1!==t.state.openPanels.indexOf(e)?t.setState({openPanels:Object(O.without)(t.state.openPanels,e)}):(t.setState({openPanels:Object(b.a)(t.state.openPanels).concat([e])}),t.props.setTimeout(function(){Ei()(t.panels[e],t.inserterResults.current,{alignWithTop:!0})}))}}},{key:"filter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.debouncedSpeak,r=t.items,o=t.rootChildBlocks,c=function(e,t){var n=xi(t),r=function(e){return-1!==xi(e).indexOf(n)},o=Object(i.getCategories)();return e.filter(function(e){var t=Object(O.find)(o,{slug:e.category});return r(e.title)||Object(O.some)(e.keywords,r)||t&&r(t.title)})}(r,e),a=Object(O.filter)(c,function(e){var t=e.name;return Object(O.includes)(o,t)}),s=[];if(!e){var l=this.props.maxSuggestedItems||9;s=Object(O.filter)(r,function(e){return e.utility>0}).slice(0,l)}var u=Object(O.filter)(c,{category:"reusable"}),d=function(e){return Object(O.findIndex)(Object(i.getCategories)(),function(t){return t.slug===e.category})},p=Object(O.flow)(function(e){return Object(O.filter)(e,function(e){return"reusable"!==e.category})},function(e){return Object(O.sortBy)(e,d)},function(e){return Object(O.groupBy)(e,"category")})(c),b=this.state.openPanels;if(e!==this.state.filterValue)if(e){if(u.length)b=["reusable"];else if(c.length){b=[Object(O.find)(Object(i.getCategories)(),function(e){var t=e.slug;return p[t]&&p[t].length}).slug]}}else b=["suggested"];this.setState({hoveredItem:null,childItems:a,filterValue:e,suggestedItems:s,reusableItems:u,itemsPerCategory:p,openPanels:b});var f=Object.keys(p).reduce(function(e,t){return e+p[t].length},0);n(Object(_.sprintf)(Object(_._n)("%d result found.","%d results found.",f),f),"assertive")}},{key:"onKeyDown",value:function(e){Object(O.includes)([yo.LEFT,yo.DOWN,yo.RIGHT,yo.UP,yo.BACKSPACE,yo.ENTER],e.keyCode)&&e.stopPropagation()}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.onSelect,o=t.rootClientId,c=this.state,a=c.childItems,s=c.filterValue,l=c.hoveredItem,u=c.suggestedItems,d=c.reusableItems,p=c.itemsPerCategory,b=c.openPanels,f=function(e){return-1!==b.indexOf(e)},h=!!s;return Object(Br.createElement)("div",{className:"editor-inserter__menu",onKeyPress:Bi,onKeyDown:this.onKeyDown},Object(Br.createElement)("label",{htmlFor:"editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(_.__)("Search for a block")),Object(Br.createElement)("input",{id:"editor-inserter__search-".concat(n),type:"search",placeholder:Object(_.__)("Search for a block"),className:"editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(Br.createElement)("div",{className:"editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":Object(_.__)("Available block types")},Object(Br.createElement)(Pi,{rootClientId:o,items:a,onSelect:r,onHover:this.onHover}),!!u.length&&Object(Br.createElement)(Vr.PanelBody,{title:Object(_._x)("Most Used","blocks"),opened:f("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(Br.createElement)(Ti,{items:u,onSelect:r,onHover:this.onHover})),Object(Br.createElement)(Ii,{filterValue:s}),Object(O.map)(Object(i.getCategories)(),function(t){var n=p[t.slug];return n&&n.length?Object(Br.createElement)(Vr.PanelBody,{key:t.slug,title:t.title,icon:t.icon,opened:h||f(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(Br.createElement)(Ti,{items:n,onSelect:r,onHover:e.onHover})):null}),!!d.length&&Object(Br.createElement)(Vr.PanelBody,{className:"editor-inserter__reusable-blocks-panel",title:Object(_.__)("Reusable"),opened:f("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(Br.createElement)(Ti,{items:d,onSelect:r,onHover:this.onHover}),Object(Br.createElement)("a",{className:"editor-inserter__manage-reusable-blocks",href:"edit.php?post_type=wp_block"},Object(_.__)("Manage All Reusable Blocks"))),Object(O.isEmpty)(u)&&Object(O.isEmpty)(d)&&Object(O.isEmpty)(p)&&Object(Br.createElement)("p",{className:"editor-inserter__no-results"},Object(_.__)("No blocks found."))),l&&Object(i.isReusableBlock)(l)&&Object(Br.createElement)(Ci,{name:l.name,attributes:l.initialAttributes}))}}]),t}(Br.Component),Ai=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getEditedPostAttribute,i=r.getSelectedBlock,c=r.getInserterItems,a=r.getBlockName,s=e("core/blocks").getChildBlockNames,l=a(n);return{selectedBlock:i(),rootChildBlocks:s(l),title:o("title"),items:c(n),rootClientId:n}}),Object(l.withDispatch)(function(e,t){var n=e("core/editor");return{fetchReusableBlocks:n.__experimentalFetchReusableBlocks,showInsertionPoint:n.showInsertionPoint,hideInsertionPoint:n.hideInsertionPoint,onSelect:function(n){var r=e("core/editor"),o=r.replaceBlocks,c=r.insertBlock,a=t.selectedBlock,s=t.index,l=t.rootClientId,u=n.name,d=n.initialAttributes,p=Object(i.createBlock)(u,d);a&&Object(i.isUnmodifiedDefaultBlock)(a)?o(a.clientId,p):c(p,s,l),t.onSelect()}}}),Vr.withSpokenMessages,Ar.withInstanceId,Ar.withSafeTimeout)(Li),Ni=function(e){var t=e.onToggle,n=e.disabled,r=e.isOpen;return Object(Br.createElement)(Vr.IconButton,{icon:"insert",label:Object(_.__)("Add block"),labelPosition:"bottom",onClick:t,className:"editor-inserter__toggle","aria-haspopup":"true","aria-expanded":r,disabled:n})},Ri=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onToggle=e.onToggle.bind(Object(Hr.a)(Object(Hr.a)(e))),e.renderToggle=e.renderToggle.bind(Object(Hr.a)(Object(Hr.a)(e))),e.renderContent=e.renderContent.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,i=r.renderToggle,c=void 0===i?Ni:i;return c({onToggle:t,isOpen:n,disabled:o})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.index;return Object(Br.createElement)(Ai,{onSelect:t,rootClientId:r,index:o})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.title;return Object(Br.createElement)(Vr.Dropdown,{className:"editor-inserter",contentClassName:"editor-inserter__popover",position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:n,renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),t}(Br.Component),Di=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=t.index,o=e("core/editor"),i=o.getEditedPostAttribute,c=o.getBlockInsertionPoint,a=o.hasInserterItems;if(void 0===n&&void 0===r){var s=c();n=s.rootClientId,r=s.index}return{title:i("title"),hasItems:a(n),rootClientId:n,index:r}}),Object(Ar.ifCondition)(function(e){return e.hasItems})])(Ri);var Fi=Object(s.ifViewportMatches)("< small")(function(e){var t=e.clientId;return Object(Br.createElement)("div",{className:"editor-block-list__block-mobile-toolbar"},Object(Br.createElement)(Di,null),Object(Br.createElement)(Qo,{clientIds:[t]}))}),Mi=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onFocusInserter=e.onFocusInserter.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onFocusInserter",value:function(e){e.stopPropagation(),this.setState({isInserterFocused:!0})}},{key:"onBlurInserter",value:function(){this.setState({isInserterFocused:!1})}},{key:"render",value:function(){var e=this.state.isInserterFocused,t=this.props,n=t.showInsertionPoint,r=t.rootClientId,o=t.insertIndex;return Object(Br.createElement)("div",{className:"editor-block-list__insertion-point"},n&&Object(Br.createElement)("div",{className:"editor-block-list__insertion-point-indicator"}),Object(Br.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:Lr()("editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(Br.createElement)(Di,{rootClientId:r,index:o})))}}]),t}(Br.Component),Ui=Object(l.withSelect)(function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/editor"),i=o.getBlockIndex,c=o.getBlockInsertionPoint,a=o.isBlockInsertionPointVisible,s=i(n,r),l=c();return{showInsertionPoint:a()&&l.index===s&&l.rootClientId===r,insertIndex:s}})(Mi),Hi=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Object(Hr.a)(Object(Hr.a)(e))),e.eventMap={},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"proxyEvent",value:function(e){var t=!!e.nativeEvent._blockHandled;e.nativeEvent._blockHandled=!0;var n=this.eventMap[e.type];t&&(n+="Handled"),this.props[n]&&this.props[n](e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.childHandledEvents,r=void 0===n?[]:n,o=t.forwardedRef,i=Object(p.a)(t,["childHandledEvents","forwardedRef"]),c=Object(O.reduce)(Object(b.a)(r).concat(Object(b.a)(Object.keys(i))),function(t,n){var r=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/);if(r){!!r[2]&&delete i[n];var o="on"+r[1];t[o]=e.proxyEvent,e.eventMap[r[1].toLowerCase()]=o}return t},{});return Object(Br.createElement)("div",Object(Ir.a)({ref:o},i,c))}}]),t}(Br.Component),Vi=function(e,t){return Object(Br.createElement)(Hi,Object(Ir.a)({},e,{forwardedRef:t}))};Vi.displayName="IgnoreNestedEvents";var Ki=Object(Br.forwardRef)(Vi);var zi=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getInserterItems,i=r.getTemplateLock;return{items:o(n),isLocked:!!i(n)}}),Object(l.withDispatch)(function(e,t){var n=t.clientId,r=t.rootClientId;return{onInsert:function(t){var o=t.name,c=t.initialAttributes,a=Object(i.createBlock)(o,c);n?e("core/editor").replaceBlocks(n,a):e("core/editor").insertBlock(a,void 0,r)}}}))(function(e){var t=e.items,n=e.isLocked,r=e.onInsert;if(n)return null;var o=Object(O.filter)(t,function(e){return!(e.isDisabled||e.name===Object(i.getDefaultBlockName)()&&Object(O.isEmpty)(e.initialAttributes))}).slice(0,3);return Object(Br.createElement)("div",{className:"editor-inserter-with-shortcuts"},o.map(function(e){return Object(Br.createElement)(Vr.IconButton,{key:e.id,className:"editor-inserter-with-shortcuts__block",onClick:function(){return r(e)},label:Object(_.sprintf)(Object(_.__)("Add %s"),e.title),icon:Object(Br.createElement)(Qr,{icon:e.icon})})}))}),Wi=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={hoverArea:null},e.onMouseLeave=e.onMouseLeave.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onMouseMove=e.onMouseMove.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentWillUnmount",value:function(){this.props.container&&this.toggleListeners(this.props.container,!1)}},{key:"componentDidMount",value:function(){this.props.container&&this.toggleListeners(this.props.container)}},{key:"componentDidUpdate",value:function(e){e.container!==this.props.container&&(e.container&&this.toggleListeners(e.container,!1),this.props.container&&this.toggleListeners(this.props.container,!0))}},{key:"toggleListeners",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?"addEventListener":"removeEventListener";e[t]("mousemove",this.onMouseMove),e[t]("mouseleave",this.onMouseLeave)}},{key:"onMouseLeave",value:function(){this.state.hoverArea&&this.setState({hoverArea:null})}},{key:"onMouseMove",value:function(e){var t=this.props,n=t.isRTL,r=t.container.getBoundingClientRect(),o=r.width,i=r.left,c=r.right,a=null;e.clientX-i0&&void 0!==arguments[0]?arguments[0]:t.clientId,n=arguments.length>1?arguments[1]:void 0;a(e,n)},onInsertBlocks:function(e,n){var r=t.rootClientId;l(e,n,r)},onInsertDefaultBlockAfter:function(){var e=t.order,n=t.rootClientId;u({},n,e+1)},onRemove:function(e){d(e)},onMerge:function(e){var n=t.clientId,o=r("core/editor"),i=o.getPreviousBlockClientId,c=o.getNextBlockClientId;if(e){var a=c(n);a&&p(n,a)}else{var s=i(n);s&&p(s,n)}},onReplace:function(e){b([t.clientId],e)},onMetaChange:function(e){f({meta:e})},onShiftSelection:function(){t.isSelectionEnabled&&(o()?s(o(),t.clientId):a(t.clientId))},toggleSelection:function(e){h(e)}}}),Xi=Object(Ar.compose)(Object(s.withViewportMatch)({isLargeViewport:"medium"}),Yi,Qi,Object(Vr.withFilters)("editor.BlockListBlock"))($i),Zi=n(49);var Ji=Object(Ar.compose)(Object(Ar.withState)({hovered:!1}),Object(l.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlockCount,o=n.getBlockName,c=n.isBlockValid,a=n.getEditorSettings,s=n.getTemplateLock,l=!r(t.rootClientId),u=o(t.lastBlockClientId)===Object(i.getDefaultBlockName)(),d=c(t.lastBlockClientId),p=a().bodyPlaceholder;return{isVisible:l||!u||!d,showPrompt:l,isLocked:!!s(t.rootClientId),placeholder:p}}),Object(l.withDispatch)(function(e,t){var n=e("core/editor"),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}}))(function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,i=e.placeholder,c=e.rootClientId,a=e.hovered,s=e.setState;if(t||!n)return null;var l=Object(Zi.decodeEntities)(i)||Object(_.__)("Start writing or type / to choose a block");return Object(Br.createElement)("div",{"data-root-client-id":c||"",className:"wp-block editor-default-block-appender",onMouseEnter:function(){return s({hovered:!0})},onMouseLeave:function(){return s({hovered:!1})}},Object(Br.createElement)(Jo,{rootClientId:c}),Object(Br.createElement)(di.a,{role:"button","aria-label":Object(_.__)("Add block"),className:"editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?l:""}),a&&Object(Br.createElement)(zi,{rootClientId:c}),Object(Br.createElement)(Di,{position:"top right"}))});var ec=Object(l.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getBlockOrder,c=r.canInsertBlockType;return{isLocked:!!(0,r.getTemplateLock)(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(i.getDefaultBlockName)(),n)}})(function(e){var t=e.blockClientIds,n=e.rootClientId,r=e.canInsertDefaultBlock;return e.isLocked?null:r?Object(Br.createElement)(Ki,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(Br.createElement)(Ji,{rootClientId:n,lastBlockClientId:Object(O.last)(t)})):Object(Br.createElement)("div",{className:"block-list-appender"},Object(Br.createElement)(Di,{rootClientId:n,renderToggle:function(e){var t=e.onToggle,n=e.disabled,r=e.isOpen;return Object(Br.createElement)(Vr.Button,{"aria-label":Object(_.__)("Add block"),onClick:t,className:"block-list-appender__toggle","aria-haspopup":"true","aria-expanded":r,disabled:n},Object(Br.createElement)(Vr.Dashicon,{icon:"insert"}))}}))}),tc=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onSelectionEnd=n.onSelectionEnd.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setBlockRef=n.setBlockRef.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setLastClientY=n.setLastClientY.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onPointerMove=Object(O.throttle)(n.onPointerMove.bind(Object(Hr.a)(Object(Hr.a)(n))),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("mousemove",this.setLastClientY)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mousemove",this.setLastClientY)}},{key:"setLastClientY",value:function(e){var t=e.clientY;this.lastClientY=t}},{key:"setBlockRef",value:function(e,t){null===e?delete this.nodes[t]:this.nodes=Object(d.a)({},this.nodes,Object(f.a)({},t,e))}},{key:"onPointerMove",value:function(e){var t=e.clientY;this.props.isMultiSelecting||this.props.onStartMultiSelect();var n=Gi(this.selectionAtStart).getBoundingClientRect();if(!(t>=n.top&&t<=n.bottom)){var r=t-n.top,o=Object(O.findLast)(this.coordMapKeys,function(e){return e0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return!function(e,t){return void 0!==t.disableCustomColors?t.disableCustomColors:e}(t,n)||(n.colors||e).length>0}(t,n,e)})})(function(e){var t=e.children,n=e.colors,r=e.colorSettings,o=e.disableCustomColors,i=e.title,c=Object(p.a)(e,["children","colors","colorSettings","disableCustomColors","title"]),a=Object(Br.createElement)("span",{className:"".concat("editor-panel-color-settings","__panel-title")},i,function(e,t){return e.map(function(e,n){var r=e.value,o=e.label,i=e.colors;if(!r)return null;var c=Bo(i||t,r),a=c&&c.name,s=Object(_.sprintf)(vc,o.toLowerCase(),a||r);return Object(Br.createElement)(Vr.ColorIndicator,{key:n,colorValue:r,"aria-label":s})})}(r,n));return Object(Br.createElement)(Vr.PanelBody,Object(Ir.a)({className:"editor-panel-color-settings",title:a},c),r.map(function(e,t){return Object(Br.createElement)(mc,Object(Ir.a)({key:t},Object(d.a)({colors:n,disableCustomColors:o},e)))}),t)}),gc=Co(Oc);var jc=function(e){var t=e.onChange,n=e.className,r=Object(p.a)(e,["onChange","className"]);return Object(Br.createElement)(di.a,Object(Ir.a)({className:Lr()("editor-plain-text",n),onChange:function(e){return t(e.target.value)}},r))},yc=n(41),kc=n.n(yc),_c=n(32),Ec=n(65),Sc=n.n(Ec),Cc=Object(l.withSelect)(function(e){return{formatTypes:(0,e("core/rich-text").getFormatTypes)()}})(function(e){var t=e.formatTypes,n=e.onChange,r=e.value;return Object(Br.createElement)(Br.Fragment,null,t.map(function(e){var t=e.name,o=e.edit;if(!o)return null;var i=Object(a.getActiveFormat)(r,t),c=void 0!==i,s=c&&i.attributes||{};return Object(Br.createElement)(o,{key:t,isActive:c,activeAttributes:s,value:r,onChange:n})}))}),wc=function(e){var t=e.controls;return Object(Br.createElement)("div",{className:"editor-format-toolbar"},Object(Br.createElement)(Vr.Toolbar,null,t.map(function(e){return Object(Br.createElement)(Vr.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})}),Object(Br.createElement)(Vr.Slot,{name:"RichText.ToolbarControls"})))},Tc=n(192),Pc=n.n(Tc),Ic=function(e){return Object(O.pickBy)(e,function(e,t){return n=t,Object(O.startsWith)(n,"aria-")&&!Object(O.isNil)(e);var n})},Bc=window.getSelection,xc=window.Node.TEXT_NODE,Lc=window.navigator.userAgent;var Ac=Lc.indexOf("Trident")>=0,Nc=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onFocus=e.onFocus.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(Hr.a)(Object(Hr.a)(e))),e.initialize=e.initialize.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onFocus",value:function(){this.props.onFocus&&this.props.onFocus(),this.initialize()}},{key:"shouldComponentUpdate",value:function(e){var t=this;this.configureIsPlaceholderVisible(e.isPlaceholderVisible),Object(O.isEqual)(this.props.style,e.style)||(this.editorNode.setAttribute("style",""),Object.assign(this.editorNode.style,e.style)),Object(O.isEqual)(this.props.className,e.className)||(this.editorNode.className=Lr()(e.className,"editor-rich-text__tinymce"));var n=function(e,t){var n=Object(O.keys)(Ic(e)),r=Object(O.keys)(Ic(t));return{removedKeys:Object(O.difference)(n,r),updatedKeys:r.filter(function(n){return!Object(O.isEqual)(e[n],t[n])})}}(this.props,e),r=n.removedKeys,o=n.updatedKeys;return r.forEach(function(e){return t.editorNode.removeAttribute(e)}),o.forEach(function(n){return t.editorNode.setAttribute(n,e[n])}),!1}},{key:"componentWillUnmount",value:function(){this.editor&&(this.editor.destroy(),delete this.editor)}},{key:"configureIsPlaceholderVisible",value:function(e){var t=String(!!e);this.editorNode.getAttribute("data-is-placeholder-visible")!==t&&this.editorNode.setAttribute("data-is-placeholder-visible",t)}},{key:"initialize",value:function(){var e=this;if(!this.initialize.called){this.initialize.called=!0;var t={theme:!1,inline:!0,toolbar:!1,browser_spellcheck:!0,entity_encoding:"raw",convert_urls:!1,verify_html:!1,inline_boundaries_selector:"a[href],code,b,i,strong,em,del,ins,sup,sub",plugins:[],forced_root_block:this.props.multilineTag||!1,custom_undo_redo_levels:1,lists_indent_on_tab:!1};Pc.a.init(Object(d.a)({},t,{target:this.editorNode,setup:function(t){var n;e.editor=t,t.on("preinit",function(){n=t.dom.setHTML,t.dom.setHTML=function(){}}),t.on("init",function(){["z","y"].forEach(function(e){t.shortcuts.remove("meta+".concat(e))}),t.shortcuts.remove("meta+shift+z"),["b","i","u"].forEach(function(e){t.shortcuts.remove("meta+".concat(e))}),[1,2,3,4,5,6,7,8,9].forEach(function(e){t.shortcuts.remove("access+".concat(e))}),t.dom.setHTML=n,Ac&&document.activeElement!==e.editorNode&&document.activeElement.contains(e.editorNode)&&e.editorNode.focus()}),t.on("keydown",e.onKeyDown,!0)}}))}}},{key:"bindEditorNode",value:function(e){this.editorNode=e,this.props.setRef&&this.props.setRef(e),Ac&&(e?this.removeInternetExplorerInputFix=function(e){function t(e){e.stopImmediatePropagation();var t=document.createEvent("Event");t.initEvent("input",!0,!1),t.data=e.data,e.target.dispatchEvent(t)}function n(t){var n=t.target,r=t.keyCode;if((yo.BACKSPACE===r||yo.DELETE===r)&&e.contains(n)){var o=document.createEvent("Event");o.initEvent("input",!0,!1),o.data=null,n.dispatchEvent(o)}}return e.addEventListener("textinput",t),document.addEventListener("keyup",n,!0),function(){e.removeEventListener("textinput",t),document.removeEventListener("keyup",n,!0)}}(e):this.removeInternetExplorerInputFix())}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=t===yo.DELETE||t===yo.BACKSPACE;if(t===yo.ENTER||n&&Object(Vo.isEntirelySelected)(this.editorNode))return e.preventDefault(),!1;if(t===yo.LEFT||t===yo.RIGHT){var r=Bc().focusNode,o=r.nodeType,i=r.nodeValue;if(o===xc)if(1===i.length&&"\ufeff"===i[0])r[e.keyCode===yo.LEFT?"previousSibling":"nextSibling"]||(e.preventDefault=O.noop)}}},{key:"render",value:function(){var e,t=Ic(this.props),n=this.props,r=n.tagName,o=void 0===r?"div":r,i=n.style,c=n.record,a=n.valueToEditableHTML,s=n.className,l=n.isPlaceholderVisible,u=n.onPaste,p=n.onInput,b=n.onKeyDown,h=n.onCompositionEnd,m=n.onBlur;return"table"!==o&&(t.role="textbox",t["aria-multiline"]=!0),Object(Br.createElement)(o,Object(d.a)({},t,(e={className:Lr()(s,"editor-rich-text__tinymce"),contentEditable:!0},Object(f.a)(e,"data-is-placeholder-visible",l),Object(f.a)(e,"ref",this.bindEditorNode),Object(f.a)(e,"style",i),Object(f.a)(e,"suppressContentEditableWarning",!0),Object(f.a)(e,"dangerouslySetInnerHTML",{__html:a(c)}),Object(f.a)(e,"onPaste",u),Object(f.a)(e,"onInput",p),Object(f.a)(e,"onFocus",this.onFocus),Object(f.a)(e,"onBlur",m),Object(f.a)(e,"onKeyDown",b),Object(f.a)(e,"onCompositionEnd",h),e)))}}]),t}(Br.Component);var Rc=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onUse=e.onUse.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onUse",value:function(){return this.props.onUse(),!1}},{key:"render",value:function(){var e=this.props,t=e.character,n=e.type;return Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.a)({},yo.rawShortcut[n](t),this.onUse)})}}]),t}(Br.Component),Dc=window.Node,Fc=Dc.TEXT_NODE,Mc=Dc.ELEMENT_NODE;function Uc(){var e=window.getSelection();if(0!==e.rangeCount){var t=e.getRangeAt(0).startContainer;if(t.nodeType===Fc&&(t=t.parentNode),t.nodeType===Mc){var n=t.closest("*[contenteditable]");if(n&&n.contains(t))return t.closest("ol,ul")}}}function Hc(){var e=Uc();return!e||"true"===e.contentEditable}function Vc(e,t){var n=Uc();return n?n.nodeName.toLowerCase()===e:e===t}var Kc=function(e){var t=e.onTagNameChange,n=e.tagName,r=e.value,o=e.onChange;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Rc,{type:"primary",character:"[",onUse:function(){o(Object(a.outdentListItems)(r))}}),Object(Br.createElement)(Rc,{type:"primary",character:"]",onUse:function(){o(Object(a.indentListItems)(r,{type:n}))}}),Object(Br.createElement)(Rc,{type:"primary",character:"m",onUse:function(){o(Object(a.indentListItems)(r,{type:n}))}}),Object(Br.createElement)(Rc,{type:"primaryShift",character:"m",onUse:function(){o(Object(a.outdentListItems)(r))}}),Object(Br.createElement)(jo,null,Object(Br.createElement)(Vr.Toolbar,{controls:[{icon:"editor-ul",title:Object(_.__)("Convert to unordered list"),isActive:Vc("ul",n),onClick:function(){o(Object(a.changeListType)(r,{type:"ul"})),Hc()&&t("ul")}},{icon:"editor-ol",title:Object(_.__)("Convert to ordered list"),isActive:Vc("ol",n),onClick:function(){o(Object(a.changeListType)(r,{type:"ol"})),Hc()&&t("ol")}},{icon:"editor-outdent",title:Object(_.__)("Outdent list item"),onClick:function(){o(Object(a.outdentListItems)(r))}},{icon:"editor-indent",title:Object(_.__)("Indent list item"),onClick:function(){o(Object(a.indentListItems)(r,{type:n}))}}]})))},zc=[yo.rawShortcut.primary("z"),yo.rawShortcut.primaryShift("z"),yo.rawShortcut.primary("y")],Wc=Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(O.fromPairs)(zc.map(function(e){return[e,function(e){return e.preventDefault()}]}))}),qc=function(){return Wc};function Gc(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,i=Object(p.a)(e,["name","shortcutType","shortcutCharacter"]),c="RichText.ToolbarControls";return n&&(c+=".".concat(n)),r&&o&&(t=yo.displayShortcut[r](o)),Object(Br.createElement)(Vr.Fill,{name:c},Object(Br.createElement)(Vr.ToolbarButton,Object(Ir.a)({},i,{shortcut:t})))}var $c=Object(l.withSelect)(function(e,t){var n=t.name;return{formatType:e("core/rich-text").getFormatType(n)}})(function(e){return Object(Br.createElement)(Vr.Fill,{name:"Inserter.InlineElements"},function(t){var n=t.filterValue,r=e.formatType,o=r.keywords,c=void 0===o?[]:o,a=r.title;return c.push(a,e.title),n&&!function(e,t){return e.some(function(e){return-1!==xi(e).indexOf(xi(t))})}(c,n)?null:Object(Br.createElement)(wi,Object(Ir.a)({},e,{icon:Object(i.normalizeIconObject)(e.icon)}))})}),Yc=window.getSelection,Qc=function(e){function t(e){var n,r=e.value,o=e.onReplace,c=e.multiline;return Object(Rr.a)(this,t),n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments)),!0!==c&&"p"!==c&&"li"!==c||(n.multilineTag=!0===c?"p":c),"li"===n.multilineTag&&(n.multilineWrapperTags=["ul","ol"]),n.props.onSplit?(n.onSplit=n.props.onSplit,Sc()("wp.editor.RichText onSplit prop",{plugin:"Gutenberg",alternative:"wp.editor.RichText unstableOnSplit prop"})):n.props.unstableOnSplit&&(n.onSplit=n.props.unstableOnSplit),n.onFocus=n.onFocus.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onBlur=n.onBlur.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onChange=n.onChange.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onDeleteKeyDown=n.onDeleteKeyDown.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onPaste=n.onPaste.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onCreateUndoLevel=n.onCreateUndoLevel.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setFocusedElement=n.setFocusedElement.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onInput=n.onInput.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onCompositionEnd=n.onCompositionEnd.bind(Object(Hr.a)(Object(Hr.a)(n))),n.onSelectionChange=n.onSelectionChange.bind(Object(Hr.a)(Object(Hr.a)(n))),n.getRecord=n.getRecord.bind(Object(Hr.a)(Object(Hr.a)(n))),n.createRecord=n.createRecord.bind(Object(Hr.a)(Object(Hr.a)(n))),n.applyRecord=n.applyRecord.bind(Object(Hr.a)(Object(Hr.a)(n))),n.isEmpty=n.isEmpty.bind(Object(Hr.a)(Object(Hr.a)(n))),n.valueToFormat=n.valueToFormat.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setRef=n.setRef.bind(Object(Hr.a)(Object(Hr.a)(n))),n.valueToEditableHTML=n.valueToEditableHTML.bind(Object(Hr.a)(Object(Hr.a)(n))),n.formatToValue=kc()(n.formatToValue.bind(Object(Hr.a)(Object(Hr.a)(n))),{size:1}),n.savedContent=r,n.patterns=function(e){var t=e.onReplace,n=e.valueToFormat,r=e.onCreateUndoLevel,o=e.onChange,c=Object(i.getBlockTransforms)("from").filter(function(e){return"prefix"===e.type});return[function(e){if(!t)return e;var o=Object(a.getSelectionStart)(e),s=Object(a.getTextContent)(e),l=s.slice(o-1,o);if(!/\s/.test(l))return e;var u=s.slice(0,o).trim(),d=Object(i.findTransform)(c,function(e){var t=e.prefix;return u===t});if(!d)return e;var p=n(Object(a.slice)(e,o,s.length)),b=d.transform(p);return r(),t([b]),e},function(e){var t=Object(a.getSelectionStart)(e),n=Object(a.getTextContent)(e);if("`"!==n.slice(t-1,t))return e;var r=n.slice(0,t-1).lastIndexOf("`");if(-1===r)return e;var i=r,c=t-2;return i===c?e:(o(e),e=Object(a.remove)(e,i,i+1),e=Object(a.remove)(e,c,c+1),e=Object(a.applyFormat)(e,{type:"code"},i,c))}]}({onReplace:o,onCreateUndoLevel:n.onCreateUndoLevel,valueToFormat:n.valueToFormat,onChange:n.onChange}),n.enterPatterns=Object(i.getBlockTransforms)("from").filter(function(e){return"enter"===e.type}),n.state={},n.usedDeprecatedChildrenSource=Array.isArray(r),n.lastHistoryValue=r,n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentWillUnmount",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"setRef",value:function(e){this.editableRef=e}},{key:"setFocusedElement",value:function(){this.props.setFocusedElement&&this.props.setFocusedElement(this.props.instanceId)}},{key:"getRecord",value:function(){var e=this.formatToValue(this.props.value),t=e.formats,n=e.text,r=this.state;return{formats:t,text:n,start:r.start,end:r.end}}},{key:"createRecord",value:function(){var e=Yc().getRangeAt(0);return Object(a.create)({element:this.editableRef,range:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,removeNode:function(e){return"all"===e.getAttribute("data-mce-bogus")},unwrapNode:function(e){return!!e.getAttribute("data-mce-bogus")},removeAttribute:function(e){return 0===e.indexOf("data-mce-")},filterString:function(e){return e.replace("\ufeff","")},prepareEditableTree:this.props.prepareEditableTree})}},{key:"applyRecord",value:function(e){Object(a.apply)({value:e,current:this.editableRef,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,createLinePadding:function(e){var t=e.createElement("br");return t.setAttribute("data-mce-bogus","1"),t},prepareEditableTree:this.props.prepareEditableTree})}},{key:"isEmpty",value:function(){return Object(a.isEmpty)(this.formatToValue(this.props.value))}},{key:"onPaste",value:function(e){var t=e.clipboardData,n=t.items,r=t.files;n=Object(O.isNil)(n)?[]:n,r=Object(O.isNil)(r)?[]:r;var o="",c="";try{o=t.getData("text/plain"),c=t.getData("text/html")}catch(e){try{c=t.getData("Text")}catch(e){return}}e.preventDefault(),window.console.log("Received HTML:\n\n",c),window.console.log("Received plain text:\n\n",o);var s=Object(O.find)(Object(b.a)(n).concat(Object(b.a)(r)),function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)});if(s&&!c){var l=s.getAsFile?s.getAsFile():s,u=Object(i.pasteHandler)({HTML:''),mode:"BLOCKS",tagName:this.props.tagName}),d=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",l),void(d?this.props.onReplace(u):this.onSplit&&this.splitContent(u))}var p=this.getRecord();if(!Object(a.isCollapsed)(p)){var f=(c||o).replace(/<[^>]+>/g,"").trim();if(Object(g.isURL)(f))return this.onChange(Object(a.applyFormat)(p,{type:"a",attributes:{href:Object(Zi.decodeEntities)(f)}})),void window.console.log("Created link:\n\n",f)}var h=this.props.onReplace&&this.isEmpty(),m="INLINE";h?m="BLOCKS":this.onSplit&&(m="AUTO");var v=Object(i.pasteHandler)({HTML:c,plainText:o,mode:m,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof v){var j=Object(a.create)({html:v});this.onChange(Object(a.insert)(p,j))}else if(this.onSplit){if(!v.length)return;h?this.props.onReplace(v):this.splitContent(v,{paste:!0})}}},{key:"onFocus",value:function(){var e=this.props.unstableOnFocus;e&&e(),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onBlur",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"onInput",value:function(e){if(!e.nativeEvent.isComposing){var t=this.createRecord(),n=this.patterns.reduce(function(e,t){return t(e)},t);this.onChange(n,{withoutHistory:!0}),this.props.clearTimeout(this.onInput.timeout),this.onInput.timeout=this.props.setTimeout(this.onCreateUndoLevel,1e3)}}},{key:"onCompositionEnd",value:function(){this.onChange(this.createRecord())}},{key:"onSelectionChange",value:function(){var e=this.createRecord(),t=e.start,n=e.end,r=e.formats;if(t!==this.state.start||n!==this.state.end){var o=this.props.isCaretWithinFormattedText;!o&&r[t]?this.props.onEnterFormattedText():o&&!r[t]&&this.props.onExitFormattedText(),this.setState({start:t,end:n})}}},{key:"onChangeEditableValue",value:function(e){var t=e.formats,n=e.text;Object(O.get)(this.props,["onChangeEditableValue"],[]).forEach(function(e){e(t,n)})}},{key:"onChange",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).withoutHistory;this.applyRecord(e);var n=e.start,r=e.end;this.onChangeEditableValue(e),this.savedContent=this.valueToFormat(e),this.props.onChange(this.savedContent),this.setState({start:n,end:r}),t||this.onCreateUndoLevel()}},{key:"onCreateUndoLevel",value:function(){this.lastHistoryValue!==this.savedContent&&(this.props.onCreateUndoLevel(),this.lastHistoryValue=this.savedContent)}},{key:"onDeleteKeyDown",value:function(e){var t=this.props,n=t.onMerge,r=t.onRemove;if(n||r){var o=e.keyCode===yo.BACKSPACE;if(Object(a.isCollapsed)(this.createRecord())){var i=this.isEmpty();(i||Object(Vo.isHorizontalEdge)(this.editableRef,o))&&(n&&n(!o),r&&i&&o&&r(!o),e.preventDefault())}}}},{key:"onKeyDown",value:function(e){var t=e.keyCode;if(t===yo.DELETE||t===yo.BACKSPACE){var n,r=this.createRecord(),o=Object(a.getSelectionStart)(r),c=Object(a.getSelectionEnd)(r);if(0===o&&0!==c&&c===r.text.length)return this.onChange(Object(a.remove)(r)),void e.preventDefault();if(this.multilineTag)t===yo.BACKSPACE?Object(a.charAt)(r,o-1)===a.LINE_SEPARATOR&&(n=Object(a.remove)(r,Object(a.isCollapsed)(r)?o-1:o,c)):Object(a.charAt)(r,c)===a.LINE_SEPARATOR&&(n=Object(a.remove)(r,o,Object(a.isCollapsed)(r)?c+1:c)),n&&(this.onChange(n),e.preventDefault());this.onDeleteKeyDown(e)}else if(t===yo.ENTER){e.preventDefault();var s=this.createRecord();if(this.props.onReplace){var l=Object(a.getTextContent)(s),u=Object(i.findTransform)(this.enterPatterns,function(e){return e.regExp.test(l)});if(u)return void this.props.onReplace([u.transform({content:l})])}if(this.multilineTag)this.onSplit&&Object(a.isEmptyLine)(s)?this.onSplit.apply(this,Object(b.a)(Object(a.split)(s).map(this.valueToFormat))):this.onChange(Object(a.insertLineSeparator)(s));else if(e.shiftKey||!this.onSplit){var d=Object(a.getTextContent)(s),p=d.length,f="\n";s.end!==p||"\n"===d.charAt(p-1)&&0!==p||(f="\n\n"),this.onChange(Object(a.insert)(s,f))}else this.splitContent()}}},{key:"splitContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.onSplit){var n=this.createRecord(),r=Object(a.split)(n),o=Object(u.a)(r,2),i=o[0],c=o[1];Object(a.isEmpty)(c)?i=n:Object(a.isEmpty)(i)&&(c=n),t.paste&&(i=Object(a.isEmpty)(i)?null:i,c=Object(a.isEmpty)(c)?null:c),i&&(i=this.valueToFormat(i)),c&&(c=this.valueToFormat(c)),this.onSplit.apply(this,[i,c].concat(Object(b.a)(e)))}}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,r=n.tagName,o=n.value,i=n.isSelected;if(r===e.tagName&&o!==e.value&&o!==this.savedContent){if(Array.isArray(o)&&Object(O.isEqual)(o,this.savedContent))return;var c=this.formatToValue(o);if(i){var s=this.formatToValue(e.value),l=Object(a.getTextContent)(s).length;c.start=l,c.end=l}this.applyRecord(c),this.savedContent=o}if(Object.keys(this.props).some(function(n){return 0===n.indexOf("format_")&&(Object(O.isPlainObject)(t.props[n])?Object.keys(t.props[n]).some(function(r){return t.props[n][r]!==e[n][r]}):t.props[n]!==e[n])})){var u=this.formatToValue(o);i&&(u.start=this.state.start,u.end=this.state.end),this.applyRecord(u)}}},{key:"getFormatProps",value:function(){return Object(O.pickBy)(this.props,function(e,t){return t.startsWith("format_")})}},{key:"formatToValue",value:function(e){return Array.isArray(e)?Object(a.create)({html:i.children.toHTML(e),multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):"string"===this.props.format?Object(a.create)({html:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):null===e?Object(a.create)():e}},{key:"valueToEditableHTML",value:function(e){return Object(a.unstableToDom)({value:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,createLinePadding:function(e){var t=e.createElement("br");return t.setAttribute("data-mce-bogus","1"),t},prepareEditableTree:this.props.prepareEditableTree}).body.innerHTML}},{key:"removeEditorOnlyFormats",value:function(e){return this.props.formatTypes.forEach(function(t){t.__experimentalCreatePrepareEditableTree&&(e=Object(a.removeFormat)(e,t.name,0,e.text.length))}),e}},{key:"valueToFormat",value:function(e){return e=this.removeEditorOnlyFormats(e),this.usedDeprecatedChildrenSource?i.children.fromDOM(Object(a.unstableToDom)({value:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}).body.childNodes):"string"===this.props.format?Object(a.toHTMLString)({value:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):e}},{key:"render",value:function(){var e=this,t=this.props,n=t.tagName,r=void 0===n?"div":n,o=t.style,i=t.wrapperClassName,c=t.className,a=t.inlineToolbar,s=void 0!==a&&a,l=t.formattingControls,u=t.placeholder,d=t.keepPlaceholderOnFocus,p=void 0!==d&&d,b=t.isSelected,f=t.autocompleters,h=t.onTagNameChange,m=this.multilineTag,v=Ic(this.props),O=["editor",r].join(),g=u&&(!b||p)&&this.isEmpty(),j=Lr()(i,"editor-rich-text"),y=this.getRecord();return Object(Br.createElement)("div",{className:j,onFocus:this.setFocusedElement},b&&"li"===this.multilineTag&&Object(Br.createElement)(Kc,{onTagNameChange:h,tagName:r,value:y,onChange:this.onChange}),b&&!s&&Object(Br.createElement)(jo,null,Object(Br.createElement)(wc,{controls:l})),b&&s&&Object(Br.createElement)(Vr.IsolatedEventContainer,{className:"editor-rich-text__inline-toolbar"},Object(Br.createElement)(wc,{controls:l})),Object(Br.createElement)(Yr,{onReplace:this.props.onReplace,completers:f,record:y,onChange:this.onChange},function(t){var n=t.listBoxId,i=t.activeId;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Nc,Object(Ir.a)({tagName:r,style:o,record:y,valueToEditableHTML:e.valueToEditableHTML,isPlaceholderVisible:g,"aria-label":u,"aria-autocomplete":"list","aria-owns":n,"aria-activedescendant":i},v,{className:c,key:O,onPaste:e.onPaste,onInput:e.onInput,onCompositionEnd:e.onCompositionEnd,onKeyDown:e.onKeyDown,onFocus:e.onFocus,onBlur:e.onBlur,multilineTag:e.multilineTag,multilineWrapperTags:e.multilineWrapperTags,setRef:e.setRef})),g&&Object(Br.createElement)(r,{className:Lr()("editor-rich-text__tinymce",c),style:o},m?Object(Br.createElement)(m,null,u):u),b&&Object(Br.createElement)(Cc,{value:y,onChange:e.onChange}))}),b&&Object(Br.createElement)(qc,null))}}]),t}(Br.Component);Qc.defaultProps={formattingControls:["bold","italic","link","strikethrough"],format:"string",value:""};var Xc=Object(Ar.compose)([Ar.withInstanceId,qr(function(e,t){return!1===t.isSelected?{clientId:e.clientId}:!0===t.isSelected?{isSelected:e.isSelected,clientId:e.clientId}:{isSelected:e.isSelected&&e.focusedElement===t.instanceId,setFocusedElement:e.setFocusedElement,clientId:e.clientId}}),Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.canUserUseUnfilteredHTML,r=t.isCaretWithinFormattedText,o=e("core/rich-text").getFormatTypes;return{canUserUseUnfilteredHTML:n(),isCaretWithinFormattedText:r(),formatTypes:o()}}),Object(l.withDispatch)(function(e){var t=e("core/editor");return{onCreateUndoLevel:t.createUndoLevel,onRedo:t.redo,onUndo:t.undo,onEnterFormattedText:t.enterFormattedText,onExitFormattedText:t.exitFormattedText}}),Ar.withSafeTimeout,Object(Vr.withFilters)("experimentalRichText")])(Qc);Xc.Content=function(e){var t,n=e.value,r=e.tagName,o=e.multiline,c=Object(p.a)(e,["value","tagName","multiline"]),a=n;!0!==o&&"p"!==o&&"li"!==o||(t=!0===o?"p":o),Array.isArray(n)&&(a=i.children.toHTML(n)),!a&&t&&(a="<".concat(t,">").concat(t,">"));var s=Object(Br.createElement)(Br.RawHTML,null,a);return r?Object(Br.createElement)(r,Object(O.omit)(c,["format"]),s):s},Xc.isEmpty=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(e)&&!e||0===e.length},Xc.Content.defaultProps={format:"string",value:""};var Zc=Xc,Jc=function(e){var t=e.urlQueryArgs,n=void 0===t?{}:t,r=Object(p.a)(e,["urlQueryArgs"]),o=Object(l.select)("core/editor").getCurrentPostId;return n=Object(d.a)({post_id:o()},n),Object(Br.createElement)(Vr.ServerSideRender,Object(Ir.a)({urlQueryArgs:n},r))},ea=Object(Vr.withFilters)("editor.MediaUpload")(function(){return null}),ta=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={isSettingsExpanded:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"toggleSettingsVisibility",value:function(){this.setState({isSettingsExpanded:!this.state.isSettingsExpanded})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.renderSettings,r=e.onClose,o=e.onClickOutside,i=e.position,c=void 0===i?"bottom center":i,a=e.focusOnMount,s=void 0===a?"firstElement":a,l=this.state.isSettingsExpanded,u=!!n&&l;return Object(Br.createElement)(Vr.Popover,{className:"editor-url-popover",focusOnMount:s,position:c,onClose:r,onClickOutside:o},Object(Br.createElement)("div",{className:"editor-url-popover__row"},t,!!n&&Object(Br.createElement)(Vr.IconButton,{className:"editor-url-popover__settings-toggle",icon:"ellipsis",label:Object(_.__)("Link Settings"),onClick:this.toggleSettingsVisibility,"aria-expanded":l})),u&&Object(Br.createElement)("div",{className:"editor-url-popover__row editor-url-popover__settings"},n()))}}]),t}(Br.Component);function na(){return(na=Object(hr.a)(regeneratorRuntime.mark(function e(t){var n,r,o,i,c,a,s,l,p,f,h,m,v,g,j,y,k,E,S,C,w,T,P,I,B,x,L,A,N;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.allowedTypes,r=t.additionalData,o=void 0===r?{}:r,i=t.filesList,c=t.maxUploadFileSize,a=t.onError,s=void 0===a?O.noop:a,l=t.onFileChange,p=t.wpAllowedMimeTypes,f=void 0===p?null:p,h=Object(b.a)(i),m=[],v=function(e,t){Object(_c.revokeBlobURL)(Object(O.get)(m,[e,"url"])),m[e]=t,l(Object(O.compact)(m))},g=function(e){return!n||Object(O.some)(n,function(t){return Object(O.includes)(t,"/")?t===e:Object(O.startsWith)(e,"".concat(t,"/"))})},j=(R=f)?Object(O.flatMap)(R,function(e,t){var n=e.split("/"),r=Object(u.a)(n,1)[0],o=t.split("|");return[e].concat(Object(b.a)(Object(O.map)(o,function(e){return"".concat(r,"/").concat(e)})))}):R,y=function(e){return Object(O.includes)(j,e)},k=function(e){e.message=[Object(Br.createElement)("strong",{key:"filename"},e.file.name),": ",e.message],s(e)},E=[],S=!0,C=!1,w=void 0,e.prev=12,T=h[Symbol.iterator]();case 14:if(S=(P=T.next()).done){e.next=34;break}if(I=P.value,!j||y(I.type)){e.next=19;break}return k({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:Object(_.__)("Sorry, this file type is not permitted for security reasons."),file:I}),e.abrupt("continue",31);case 19:if(g(I.type)){e.next=22;break}return k({code:"MIME_TYPE_NOT_SUPPORTED",message:Object(_.__)("Sorry, this file type is not supported here."),file:I}),e.abrupt("continue",31);case 22:if(!(c&&I.size>c)){e.next=25;break}return k({code:"SIZE_ABOVE_LIMIT",message:Object(_.__)("This file exceeds the maximum upload size for this site."),file:I}),e.abrupt("continue",31);case 25:if(!(I.size<=0)){e.next=28;break}return k({code:"EMPTY_FILE",message:Object(_.__)("This file is empty."),file:I}),e.abrupt("continue",31);case 28:E.push(I),m.push({url:Object(_c.createBlobURL)(I)}),l(m);case 31:S=!0,e.next=14;break;case 34:e.next=40;break;case 36:e.prev=36,e.t0=e.catch(12),C=!0,w=e.t0;case 40:e.prev=40,e.prev=41,S||null==T.return||T.return();case 43:if(e.prev=43,!C){e.next=46;break}throw w;case 46:return e.finish(43);case 47:return e.finish(40);case 48:B=0;case 49:if(!(B0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(O.flatMap)(t,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Object(d.a)({},t,{path:n,level:t.attributes.level,isEmpty:ka(t)}):e(t.innerBlocks,Object(b.a)(n).concat([t]))})}(n);if(c.length<1)return null;var s=1,l=i&&r,u=Object(O.countBy)(c,"level")[1]>1;return Object(Br.createElement)("div",{className:"document-outline"},Object(Br.createElement)("ul",null,l&&Object(Br.createElement)(va,{level:Object(_.__)("Title"),isValid:!0,onClick:function(){var e=document.querySelector(".editor-post-title__input");e&&e.focus()}},r),c.map(function(e,t){var n=e.level>s+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(u||l));return s=e.level,Object(Br.createElement)(va,{key:t,level:"H".concat(e.level),isValid:r,onClick:function(){return t=e.clientId,o(t);var t},path:e.path},e.isEmpty?Oa:Object(a.getTextContent)(Object(a.create)({html:e.attributes.content})),n&&ga,1===e.level&&u&&ya,l&&1===e.level&&!u&&ja)})))});var Ea=Object(l.withSelect)(function(e){return{blocks:e("core/editor").getBlocks()}})(function(e){var t=e.blocks,n=e.children;return Object(O.filter)(t,function(e){return"core/heading"===e.name}).length<1?null:n});var Sa=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlocksByClientId,o=n.getBlockIndex,c=n.getTemplateLock,a=n.getBlockRootClientId,s=r(t.clientIds),l=Object(O.every)(s,function(e){return!!e&&Object(i.hasBlockSupport)(e.name,"multiple",!0)}),u=a(t.clientIds[0]);return{firstSelectedIndex:o(Object(O.first)(Object(O.castArray)(t.clientIds)),u),lastSelectedIndex:o(Object(O.last)(Object(O.castArray)(t.clientIds)),u),isLocked:!!c(u),blocks:s,canDuplicate:l,rootClientId:u,extraProps:t}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.rootClientId,o=t.blocks,c=t.firstSelectedIndex,a=t.lastSelectedIndex,s=t.isLocked,l=t.canDuplicate,u=e("core/editor"),d=u.insertBlocks,p=u.multiSelect,b=u.removeBlocks,f=u.insertDefaultBlock;return{onDuplicate:function(){if(!s&&l){var e=o.map(function(e){return Object(i.cloneBlock)(e)});d(e,a+1,r),e.length>1&&p(Object(O.first)(e).clientId,Object(O.last)(e).clientId)}},onRemove:function(){s||b(n)},onInsertBefore:function(){s||f({},r,c)},onInsertAfter:function(){s||f({},r,a+1)}}})])(function(e){var t=e.onDuplicate,n=e.onRemove,r=e.onInsertBefore,o=e.onInsertAfter,i=e.isLocked,c=e.canDuplicate;return(0,e.children)({onDuplicate:t,onRemove:n,onInsertAfter:o,onInsertBefore:r,isLocked:i,canDuplicate:c})}),Ca=function(e){return e.preventDefault(),e},wa={duplicate:{raw:yo.rawShortcut.primaryShift("d"),display:yo.displayShortcut.primaryShift("d")},removeBlock:{raw:yo.rawShortcut.access("z"),display:yo.displayShortcut.access("z")},insertBefore:{raw:yo.rawShortcut.primaryAlt("t"),display:yo.displayShortcut.primaryAlt("t")},insertAfter:{raw:yo.rawShortcut.primaryAlt("y"),display:yo.displayShortcut.primaryAlt("y")}},Ta=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).selectAll=e.selectAll.bind(Object(Hr.a)(Object(Hr.a)(e))),e.undoOrRedo=e.undoOrRedo.bind(Object(Hr.a)(Object(Hr.a)(e))),e.save=e.save.bind(Object(Hr.a)(Object(Hr.a)(e))),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Object(Hr.a)(Object(Hr.a)(e))),e.clearMultiSelection=e.clearMultiSelection.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"selectAll",value:function(e){var t=this.props,n=t.rootBlocksClientIds,r=t.onMultiSelect;e.preventDefault(),r(Object(O.first)(n),Object(O.last)(n))}},{key:"undoOrRedo",value:function(e){var t=this.props,n=t.onRedo,r=t.onUndo;e.shiftKey?n():r(),e.preventDefault()}},{key:"save",value:function(e){e.preventDefault(),this.props.onSave()}},{key:"deleteSelectedBlocks",value:function(e){var t=this.props,n=t.selectedBlockClientIds,r=t.hasMultiSelection,o=t.onRemove,i=t.isLocked;r&&(e.preventDefault(),i||o(n))}},{key:"clearMultiSelection",value:function(){var e=this.props,t=e.hasMultiSelection,n=e.clearSelectedBlock;t&&(n(),window.getSelection().removeAllRanges())}},{key:"render",value:function(){var e,t=this.props.selectedBlockClientIds;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Vr.KeyboardShortcuts,{shortcuts:(e={},Object(f.a)(e,yo.rawShortcut.primary("a"),this.selectAll),Object(f.a)(e,yo.rawShortcut.primary("z"),this.undoOrRedo),Object(f.a)(e,yo.rawShortcut.primaryShift("z"),this.undoOrRedo),Object(f.a)(e,"backspace",this.deleteSelectedBlocks),Object(f.a)(e,"del",this.deleteSelectedBlocks),Object(f.a)(e,"escape",this.clearMultiSelection),e)}),Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.a)({},yo.rawShortcut.primary("s"),this.save)}),t.length>0&&Object(Br.createElement)(Sa,{clientIds:t},function(e){var t,n=e.onDuplicate,r=e.onRemove,o=e.onInsertAfter,i=e.onInsertBefore;return Object(Br.createElement)(Vr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(t={},Object(f.a)(t,wa.duplicate.raw,Object(O.flow)(Ca,n)),Object(f.a)(t,wa.removeBlock.raw,Object(O.flow)(Ca,r)),Object(f.a)(t,wa.insertBefore.raw,Object(O.flow)(Ca,i)),Object(f.a)(t,wa.insertAfter.raw,Object(O.flow)(Ca,o)),t)})}))}}]),t}(Br.Component),Pa=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getBlockOrder,r=t.getMultiSelectedBlockClientIds,o=t.hasMultiSelection,i=t.isEditedPostDirty,c=t.getBlockRootClientId,a=t.getTemplateLock,s=(0,t.getSelectedBlockClientId)(),l=s?[s]:r();return{rootBlocksClientIds:n(),hasMultiSelection:o(),isLocked:Object(O.some)(l,function(e){return!!a(c(e))}),isDirty:i(),selectedBlockClientIds:l}}),Object(l.withDispatch)(function(e,t){var n=e("core/editor"),r=n.clearSelectedBlock,o=n.multiSelect,i=n.redo,c=n.undo,a=n.removeBlocks,s=n.savePost;return{onSave:function(){t.isDirty&&s()},clearSelectedBlock:r,onMultiSelect:o,onRedo:i,onUndo:c,onRemove:a}})])(Ta);var Ia=Object(Ar.compose)([Object(l.withSelect)(function(e){return{hasRedo:e("core/editor").hasEditorRedo()}}),Object(l.withDispatch)(function(e){return{redo:e("core/editor").redo}})])(function(e){var t=e.hasRedo,n=e.redo;return Object(Br.createElement)(Vr.IconButton,{icon:"redo",label:Object(_.__)("Redo"),shortcut:yo.displayShortcut.primaryShift("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__redo"})});var Ba=Object(Ar.compose)([Object(l.withSelect)(function(e){return{hasUndo:e("core/editor").hasEditorUndo()}}),Object(l.withDispatch)(function(e){return{undo:e("core/editor").undo}})])(function(e){var t=e.hasUndo,n=e.undo;return Object(Br.createElement)(Vr.IconButton,{icon:"undo",label:Object(_.__)("Undo"),shortcut:yo.displayShortcut.primary("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__undo"})});var xa=Object(Ar.compose)([Object(l.withSelect)(function(e){return{isValid:e("core/editor").isValidTemplate()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:t.synchronizeTemplate}})])(function(e){var t=e.isValid,n=Object(p.a)(e,["isValid"]);return t?null:Object(Br.createElement)(Vr.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(Br.createElement)("p",null,Object(_.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(Br.createElement)("div",null,Object(Br.createElement)(Vr.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(_.__)("Keep it as is")),Object(Br.createElement)(Vr.Button,{onClick:function(){window.confirm(Object(_.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(_.__)("Reset the template"))))});var La=Object(Ar.compose)([Object(l.withSelect)(function(e){return{notices:e("core/notices").getNotices()}}),Object(l.withDispatch)(function(e){return{onRemove:e("core/notices").removeNotice}})])(function(e){return Object(Br.createElement)(Vr.NoticeList,e,Object(Br.createElement)(xa,null))});var Aa=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=e("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}})(function(e){var t=e.availableTemplates,n=e.postType,r=e.children;return!Object(O.get)(n,["supports","page-attributes"],!1)&&Object(O.isEmpty)(t)?null:r});var Na=Object(l.withSelect)(function(e){var t=e("core/editor").getEditedPostAttribute;return{postType:(0,e("core").getPostType)(t("type"))}})(function(e){var t=e.postType,n=e.children,r=e.supportKeys,o=!0;return t&&(o=Object(O.some)(Object(O.castArray)(r),function(e){return!!t.supports[e]})),o?n:null}),Ra=Object(Ar.withState)({orderInput:null})(function(e){var t=e.onUpdateOrder,n=e.order,r=void 0===n?0:n,o=e.orderInput,i=e.setState,c=null===o?r:o;return Object(Br.createElement)(Vr.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(_.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(O.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})});var Da=Object(Ar.compose)([Object(l.withSelect)(function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}}),Object(l.withDispatch)(function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}})])(function(e){return Object(Br.createElement)(Na,{supportKeys:"page-attributes"},Object(Br.createElement)(Ra,e))});function Fa(e){var t=Object(O.groupBy)(e,"parent");return function e(n){return n.map(function(n){var r=t[n.id];return Object(d.a)({},n,{children:r&&r.length?e(r):[]})})}(t[0]||[])}var Ma=Object(l.withSelect)(function(e){var t=e("core"),n=t.getPostType,r=t.getEntityRecords,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,a=c("type"),s=n(a),l=i(),u=Object(O.get)(s,["hierarchical"],!1),d={per_page:-1,exclude:l,parent_exclude:l,orderby:"menu_order",order:"asc"};return{parent:c("parent"),items:u?r("postType",a,d):[],postType:s}}),Ua=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateParent:function(e){t({parent:e||0})}}}),Ha=Object(Ar.compose)([Ma,Ua])(function(e){var t=e.parent,n=e.postType,r=e.items,o=e.onUpdateParent,i=Object(O.get)(n,["hierarchical"],!1),c=Object(O.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!c||!a.length)return null;var s=Fa(a.map(function(e){return{id:e.id,parent:e.parent,name:e.title.raw?e.title.raw:"#".concat(e.id," (").concat(Object(_.__)("no title"),")")}}));return Object(Br.createElement)(Vr.TreeSelect,{label:c,noOptionLabel:"(".concat(Object(_.__)("no parent"),")"),tree:s,selectedId:t,onChange:o})});var Va=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(l.withDispatch)(function(e){return{onUpdate:function(t){e("core/editor").editPost({template:t||""})}}}))(function(e){var t=e.availableTemplates,n=e.selectedTemplate,r=e.onUpdate;return Object(O.isEmpty)(t)?null:Object(Br.createElement)(Vr.SelectControl,{label:Object(_.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(O.map)(t,function(e,t){return{value:t,label:e}})})});var Ka=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(O.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}}),Ar.withInstanceId])(function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||n.length<2?null:Object(Br.createElement)(Na,{supportKeys:"author"},r)}),za=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).setAuthorId=e.setAuthorId.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"setAuthorId",value:function(e){var t=this.props.onUpdateAuthor,n=e.target.value;t(Number(n))}},{key:"render",value:function(){var e=this.props,t=e.postAuthor,n=e.instanceId,r=e.authors,o="post-author-selector-"+n;return Object(Br.createElement)(Ka,null,Object(Br.createElement)("label",{htmlFor:o},Object(_.__)("Author")),Object(Br.createElement)("select",{id:o,value:t,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(e){return Object(Br.createElement)("option",{key:e.id,value:e.id},e.name)})))}}]),t}(Br.Component),Wa=Object(Ar.compose)([Object(l.withSelect)(function(e){return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:e("core").getAuthors()}}),Object(l.withDispatch)(function(e){return{onUpdateAuthor:function(t){e("core/editor").editPost({author:t})}}}),Ar.withInstanceId])(za);var qa=Object(Ar.compose)([Object(l.withSelect)(function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(p.a)(e,["commentStatus"]);return Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Ga=Object(Ar.compose)([Object(l.withSelect)(function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}}),Object(l.withDispatch)(function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}})])(function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(Br.createElement)("div",{className:"editor-post-excerpt"},Object(Br.createElement)(Vr.TextareaControl,{label:Object(_.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(Br.createElement)(Vr.ExternalLink,{href:"https://codex.wordpress.org/Excerpt"},Object(_.__)("Learn more about manual excerpts")))});var $a=function(e){return Object(Br.createElement)(Na,Object(Ir.a)({},e,{supportKeys:"excerpt"}))};var Ya=Object(l.withSelect)(function(e){var t=e("core").getThemeSupports;return{postType:(0,e("core/editor").getEditedPostAttribute)("type"),themeSupports:t()}})(function(e){var t=e.themeSupports,n=e.children,r=e.postType,o=e.supportKeys;return Object(O.some)(Object(O.castArray)(o),function(e){var n=Object(O.get)(t,[e],!1);return"post-thumbnails"===e&&Object(O.isArray)(n)?Object(O.includes)(n,r):n})?n:null});var Qa=function(e){return Object(Br.createElement)(Ya,{supportKeys:"post-thumbnails"},Object(Br.createElement)(Na,Object(Ir.a)({},e,{supportKeys:"thumbnail"})))},Xa=["image"],Za=Object(_.__)("Featured Image"),Ja=Object(_.__)("Set featured image"),es=Object(_.__)("Remove image");var ts=Object(l.withSelect)(function(e){var t=e("core"),n=t.getMedia,r=t.getPostType,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,a=c("featured_media");return{media:a?n(a):null,currentPostId:i(),postType:r(c("type")),featuredImageId:a}}),ns=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateImage:function(e){t({featured_media:e.id})},onRemoveImage:function(){t({featured_media:0})}}}),rs=Object(Ar.compose)(ts,ns,Object(Vr.withFilters)("editor.PostFeaturedImage"))(function(e){var t,n,r,o=e.currentPostId,i=e.featuredImageId,c=e.onUpdateImage,a=e.onRemoveImage,s=e.media,l=e.postType,u=Object(O.get)(l,["labels"],{}),d=Object(Br.createElement)("p",null,Object(_.__)("To edit the featured image, you need permission to upload media."));if(s){var p=Object(Nr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",s.id,o);Object(O.has)(s,["media_details","sizes",p])?(t=s.media_details.sizes[p].width,n=s.media_details.sizes[p].height,r=s.media_details.sizes[p].source_url):(t=s.media_details.width,n=s.media_details.height,r=s.source_url)}return Object(Br.createElement)(Qa,null,Object(Br.createElement)("div",{className:"editor-post-featured-image"},!!i&&Object(Br.createElement)(Xo,{fallback:d},Object(Br.createElement)(ea,{title:u.featured_image||Za,onSelect:c,allowedTypes:Xa,modalClass:"editor-post-featured-image__media-modal",render:function(e){var o=e.open;return Object(Br.createElement)(Vr.Button,{className:"editor-post-featured-image__preview",onClick:o,"aria-label":Object(_.__)("Edit or update the image")},s&&Object(Br.createElement)(Vr.ResponsiveWrapper,{naturalWidth:t,naturalHeight:n},Object(Br.createElement)("img",{src:r,alt:""})),!s&&Object(Br.createElement)(Vr.Spinner,null))},value:i})),!!i&&s&&!s.isLoading&&Object(Br.createElement)(Xo,null,Object(Br.createElement)(ea,{title:u.featured_image||Za,onSelect:c,allowedTypes:Xa,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(Br.createElement)(Vr.Button,{onClick:t,isDefault:!0,isLarge:!0},Object(_.__)("Replace image"))}})),!i&&Object(Br.createElement)("div",null,Object(Br.createElement)(Xo,{fallback:d},Object(Br.createElement)(ea,{title:u.featured_image||Za,onSelect:c,allowedTypes:Xa,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(Br.createElement)(Vr.Button,{className:"editor-post-featured-image__toggle",onClick:t},u.set_featured_image||Ja)}}))),!!i&&Object(Br.createElement)(Xo,null,Object(Br.createElement)(Vr.Button,{onClick:a,isLink:!0,isDestructive:!0},u.remove_featured_image||es))))});var os=Object(l.withSelect)(function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}})(function(e){var t=e.disablePostFormats,n=Object(p.a)(e,["disablePostFormats"]);return!t&&Object(Br.createElement)(Na,Object(Ir.a)({},n,{supportKeys:"post-formats"}))}),is=[{id:"aside",caption:Object(_.__)("Aside")},{id:"gallery",caption:Object(_.__)("Gallery")},{id:"link",caption:Object(_.__)("Link")},{id:"image",caption:Object(_.__)("Image")},{id:"quote",caption:Object(_.__)("Quote")},{id:"standard",caption:Object(_.__)("Standard")},{id:"status",caption:Object(_.__)("Status")},{id:"video",caption:Object(_.__)("Video")},{id:"audio",caption:Object(_.__)("Audio")},{id:"chat",caption:Object(_.__)("Chat")}];var cs=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=n("format"),i=e("core").getThemeSupports();return{postFormat:o,supportedFormats:Object(O.union)([o],Object(O.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(l.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),Ar.withInstanceId])(function(e){var t=e.onUpdatePostFormat,n=e.postFormat,r=void 0===n?"standard":n,o=e.supportedFormats,i=e.suggestedFormat,c="post-format-selector-"+e.instanceId,a=is.filter(function(e){return Object(O.includes)(o,e.id)}),s=Object(O.find)(a,function(e){return e.id===i});return Object(Br.createElement)(os,null,Object(Br.createElement)("div",{className:"editor-post-format"},Object(Br.createElement)("div",{className:"editor-post-format__content"},Object(Br.createElement)("label",{htmlFor:c},Object(_.__)("Post Format")),Object(Br.createElement)(Vr.SelectControl,{value:r,onChange:function(e){return t(e)},id:c,options:a.map(function(e){return{label:e.caption,value:e.id}})})),s&&s.id!==r&&Object(Br.createElement)("div",{className:"editor-post-format__suggestion"},Object(_.__)("Suggestion:")," ",Object(Br.createElement)(Vr.Button,{isLink:!0,onClick:function(){return t(s.id)}},s.caption))))});var as=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(e){var t=e.lastRevisionId,n=e.revisionsCount,r=e.children;return!t||n<2?null:Object(Br.createElement)(Na,{supportKeys:"revisions"},r)});var ss=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(e){var t=e.lastRevisionId,n=e.revisionsCount;return Object(Br.createElement)(as,null,Object(Br.createElement)(Vr.IconButton,{href:ia("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(_.sprintf)(Object(_._n)("%d Revision","%d Revisions",n),n)))}),ls=n(99),us=n.n(ls);var ds=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).openPreviewWindow=e.openPreviewWindow.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props.previewLink;t&&!e.previewLink&&this.setPreviewWindowLink(t)}},{key:"setPreviewWindowLink",value:function(e){var t=this.previewWindow;t&&!t.closed&&(t.location=e)}},{key:"getWindowTarget",value:function(){var e=this.props.postId;return"wp-preview-".concat(e)}},{key:"openPreviewWindow",value:function(e){var t,n;(e.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable)?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),t=this.previewWindow.document,n=Object(Br.renderToString)(Object(Br.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(Br.createElement)(Vr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(Br.createElement)(Vr.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),Object(Br.createElement)(Vr.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),Object(Br.createElement)("p",null,Object(_.__)("Generating preview…")))),n+='\n\t\t\n\t',t.write(n),t.title=Object(_.__)("Generating preview…"),t.close()):this.setPreviewWindowLink(e.target.href)}},{key:"render",value:function(){var e=this.props,t=e.previewLink,n=e.currentPostLink,r=e.isSaveable,o=t||n;return Object(Br.createElement)(Vr.Button,{isLarge:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(_._x)("Preview","imperative verb"),Object(Br.createElement)("span",{className:"screen-reader-text"},Object(_.__)("(opens in a new tab)")),Object(Br.createElement)(c.DotTip,{tipId:"core/editor.preview"},Object(_.__)("Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.")))}}]),t}(Br.Component),ps=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.forcePreviewLink,r=t.forceIsAutosaveable,o=e("core/editor"),i=o.getCurrentPostId,c=o.getCurrentPostAttribute,a=o.getEditedPostAttribute,s=o.isEditedPostSaveable,l=o.isEditedPostAutosaveable,u=o.getEditedPostPreviewLink,d=e("core").getPostType,p=u(),b=d(a("type"));return{postId:i(),currentPostLink:c("link"),previewLink:void 0!==n?n:p,isSaveable:s(),isAutosaveable:r||l(),isViewable:Object(O.get)(b,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}}),Object(l.withDispatch)(function(e){return{autosave:e("core/editor").autosave,savePost:e("core/editor").savePost}}),Object(Ar.ifCondition)(function(e){return e.isViewable})])(ds),bs=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).sendPostLock=e.sendPostLock.bind(Object(Hr.a)(Object(Hr.a)(e))),e.receivePostLock=e.receivePostLock.bind(Object(Hr.a)(Object(Hr.a)(e))),e.releasePostLock=e.releasePostLock.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){us()(document).on("heartbeat-send.refresh-lock",this.sendPostLock).on("heartbeat-tick.refresh-lock",this.receivePostLock)}},{key:"componentWillUnmount",value:function(){us()(document).off("heartbeat-send.refresh-lock",this.sendPostLock).off("heartbeat-tick.refresh-lock",this.receivePostLock)}},{key:"sendPostLock",value:function(e,t){var n=this.props,r=n.isLocked,o=n.activePostLock,i=n.postId;r||(t["wp-refresh-post-lock"]={lock:o,post_id:i})}},{key:"receivePostLock",value:function(e,t){if(t["wp-refresh-post-lock"]){var n=this.props,r=n.autosave,o=n.updatePostLock,i=t["wp-refresh-post-lock"];i.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{avatar:i.lock_error.avatar_src}})):i.new_lock&&o({isLocked:!1,activePostLock:i.new_lock})}}},{key:"releasePostLock",value:function(){var e=this.props,t=e.isLocked,n=e.activePostLock,r=e.postLockUtils,o=e.postId;if(!t&&n){var i={action:"wp-remove-post-lock",_wpnonce:r.unlockNonce,post_ID:o,active_post_lock:n};us.a.post({async:!1,url:r.ajaxUrl,data:i})}}},{key:"render",value:function(){var e=this.props,t=e.user,n=e.postId,r=e.isLocked,o=e.isTakeover,i=e.postLockUtils,c=e.postType;if(!r)return null;var a=t.name,s=t.avatar,l=Object(g.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),u=ia("edit.php",{post_type:Object(O.get)(c,["slug"])}),d=Object(O.get)(c,["labels","all_items"]);return Object(Br.createElement)(Vr.Modal,{title:o?Object(_.__)("Someone else has taken over this post."):Object(_.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissable:!1,className:"editor-post-locked-modal"},!!s&&Object(Br.createElement)("img",{src:s,alt:Object(_.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,a?Object(_.sprintf)(Object(_.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),a):Object(_.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Vr.Button,{isPrimary:!0,isLarge:!0,href:u},d))),!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,a?Object(_.sprintf)(Object(_.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(_.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Vr.Button,{isDefault:!0,isLarge:!0,href:u},d),Object(Br.createElement)(ps,null),Object(Br.createElement)(Vr.Button,{isPrimary:!0,isLarge:!0,href:l},Object(_.__)("Take Over")))))}}]),t}(Br.Component),fs=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditorSettings,r=t.isPostLocked,o=t.isPostLockTakeover,i=t.getPostLockUser,c=t.getCurrentPostId,a=t.getActivePostLock,s=t.getEditedPostAttribute,l=e("core").getPostType;return{isLocked:r(),isTakeover:o(),user:i(),postId:c(),postLockUtils:n().postLockUtils,activePostLock:a(),postType:l(s("type"))}}),Object(l.withDispatch)(function(e){var t=e("core/editor");return{autosave:t.autosave,updatePostLock:t.updatePostLock}}),Object(Ar.withGlobalEvents)({beforeunload:"releasePostLock"}))(bs);var hs=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(O.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}}))(function(e){var t=e.hasPublishAction,n=e.isPublished,r=e.children;return n||!t?null:r});var ms=Object(Ar.compose)(Object(l.withSelect)(function(e){return{status:e("core/editor").getEditedPostAttribute("status")}}),Object(l.withDispatch)(function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}}))(function(e){var t=e.status,n=e.onUpdateStatus;return Object(Br.createElement)(hs,null,Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Pending Review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))});var vs=Object(Ar.compose)([Object(l.withSelect)(function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(p.a)(e,["pingStatus"]);return Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})});var Os=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.forceIsSaving,r=e("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,c=r.isSavingPost,a=r.isPublishingPost,s=r.getCurrentPost,l=r.getCurrentPostType,u=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||c(),isPublishing:a(),hasPublishAction:Object(O.get)(s(),["_links","wp:action-publish"],!1),postType:l(),isAutosaving:u()}})])(function(e){var t=e.isPublished,n=e.isBeingScheduled,r=e.isSaving,o=e.isPublishing,i=e.hasPublishAction,c=e.isAutosaving;return o?Object(_.__)("Publishing…"):t&&r&&!c?Object(_.__)("Updating…"):n&&r&&!c?Object(_.__)("Scheduling…"):i?t?Object(_.__)("Update"):n?Object(_.__)("Schedule"):Object(_.__)("Publish"):Object(_.__)("Submit for Review")}),gs=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).buttonNode=Object(Br.createRef)(),n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var e,t=this.props,n=t.forceIsDirty,r=t.forceIsSaving,o=t.hasPublishAction,i=t.isBeingScheduled,a=t.isOpen,s=t.isPostSavingLocked,l=t.isPublishable,u=t.isPublished,d=t.isSaveable,p=t.isSaving,b=t.isToggle,f=t.onSave,h=t.onStatusChange,m=t.onSubmit,v=void 0===m?O.noop:m,g=t.onToggle,j=t.visibility,y=p||r||!d||s||!l&&!n;e=o?i?"future":"private"===j?"private":"publish":"pending";var k={"aria-disabled":y,className:"editor-post-publish-button",isBusy:p&&u,isLarge:!0,isPrimary:!0,onClick:function(){y||(v(),h(e),f())}},E={"aria-disabled":u||p||r||!d||!l&&!n,"aria-expanded":a,className:"editor-post-publish-panel__toggle",isBusy:p&&u,isPrimary:!0,onClick:g},S=i?Object(_.__)("Schedule…"):Object(_.__)("Publish…"),C=Object(Br.createElement)(Os,{forceIsSaving:r}),w=b?E:k,T=b?S:C;return Object(Br.createElement)(Vr.Button,Object(Ir.a)({ref:this.buttonNode},w),T,Object(Br.createElement)(c.DotTip,{tipId:"core/editor.publish"},Object(_.__)("Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.")))}}]),t}(Br.Component),js=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isEditedPostBeingScheduled,o=t.getEditedPostVisibility,i=t.isCurrentPostPublished,c=t.isEditedPostSaveable,a=t.isEditedPostPublishable,s=t.isPostSavingLocked,l=t.getCurrentPost,u=t.getCurrentPostType;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:c(),isPostSavingLocked:s(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(O.get)(l(),["_links","wp:action-publish"],!1),postType:u()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e})},onSave:t.savePost}})])(gs),ys=[{value:"public",label:Object(_.__)("Public"),info:Object(_.__)("Visible to everyone.")},{value:"private",label:Object(_.__)("Private"),info:Object(_.__)("Only visible to site admins and editors.")},{value:"password",label:Object(_.__)("Password Protected"),info:Object(_.__)("Protected with a password you choose. Only those with the password can view this post.")}],ks=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).setPublic=n.setPublic.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setPrivate=n.setPrivate.bind(Object(Hr.a)(Object(Hr.a)(n))),n.setPasswordProtected=n.setPasswordProtected.bind(Object(Hr.a)(Object(Hr.a)(n))),n.updatePassword=n.updatePassword.bind(Object(Hr.a)(Object(Hr.a)(n))),n.state={hasPassword:!!e.password},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"setPublic",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r),this.setState({hasPassword:!1})}},{key:"setPrivate",value:function(){if(window.confirm(Object(_.__)("Would you like to privately publish this post now?"))){var e=this.props,t=e.onUpdateVisibility,n=e.onSave;t("private"),this.setState({hasPassword:!1}),n()}}},{key:"setPasswordProtected",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r,e.password||""),this.setState({hasPassword:!0})}},{key:"updatePassword",value:function(e){var t=this.props,n=t.status;(0,t.onUpdateVisibility)(n,e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.visibility,n=e.password,r=e.instanceId,o={public:{onSelect:this.setPublic,checked:"public"===t&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===t},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(Br.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(Br.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(_.__)("Post Visibility")),ys.map(function(e){var t=e.value,n=e.label,i=e.info;return Object(Br.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(Br.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-".concat(r),value:t,onChange:o[t].onSelect,checked:o[t].checked,id:"editor-post-".concat(t,"-").concat(r),"aria-describedby":"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-radio"}),Object(Br.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(Br.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(Br.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(Br.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(_.__)("Create password")),Object(Br.createElement)("input",{className:"editor-post-visibility__dialog-password-input",id:"editor-post-visibility__dialog-password-input-".concat(r),type:"text",onChange:this.updatePassword,value:n,placeholder:Object(_.__)("Use a secure password")}))]}}]),t}(Br.Component),_s=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.savePost,r=t.editPost;return{onSave:n,onUpdateVisibility:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r({status:e,password:t})}}}),Ar.withInstanceId])(ks);var Es=Object(l.withSelect)(function(e){return{visibility:e("core/editor").getEditedPostVisibility()}})(function(e){var t=e.visibility;return Object(O.find)(ys,{value:t}).label});var Ss=Object(Ar.compose)([Object(l.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date")}}),Object(l.withDispatch)(function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}})])(function(e){var t=e.date,n=e.onUpdateDate,r=Object(Ze.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(Br.createElement)(Vr.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:n,is12Hour:o})});var Cs=Object(l.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date"),isFloating:e("core/editor").isEditedPostDateFloating()}})(function(e){var t=e.date,n=e.isFloating,r=Object(Ze.__experimentalGetSettings)();return t&&!n?Object(Ze.dateI18n)(r.formats.datetimeAbbreviated,t):Object(_.__)("Immediately")}),ws={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},Ts=function(e,t){return e.toLowerCase()===t.toLowerCase()},Ps=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(Hr.a)(Object(Hr.a)(e))),e.searchTerms=Object(O.throttle)(e.searchTerms.bind(Object(Hr.a)(Object(Hr.a)(e))),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={loading:!1,availableTerms:[],selectedTerms:[]},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){var e=this;Object(O.isEmpty)(this.props.terms)||(this.setState({loading:!1}),this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then(function(){e.setState({loading:!1})},function(t){"abort"!==t.statusText&&e.setState({loading:!1})}))}},{key:"componentWillUnmount",value:function(){Object(O.invoke)(this.initRequest,["abort"]),Object(O.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){e.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=Object(d.a)({},ws,t),o=vr()({path:Object(g.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(function(t){e.setState(function(e){return{availableTerms:e.availableTerms.concat(t.filter(function(t){return!Object(O.find)(e.availableTerms,function(e){return e.id===t.id})}))}}),e.updateSelectedTerms(e.props.terms)}),o}},{key:"updateSelectedTerms",value:function(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(t,n){var r=Object(O.find)(e.state.availableTerms,function(e){return e.id===n});return r&&t.push(r.name),t},[]);this.setState({selectedTerms:t})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy;return vr()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:e}}).catch(function(r){return"term_exists"===r.code?(t.addRequest=vr()({path:Object(g.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(d.a)({},ws,{search:e}))}),t.addRequest.then(function(t){return Object(O.find)(t,function(t){return Ts(t.name,e)})})):Promise.reject(r)})}},{key:"onChange",value:function(e){var t=this,n=Object(O.uniqBy)(e,function(e){return e.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(e){return!Object(O.find)(t.state.availableTerms,function(t){return Ts(t.name,e)})}),o=function(e,t){return e.map(function(e){return Object(O.find)(t,function(t){return Ts(t.name,e)}).id})};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then(function(e){var r=t.state.availableTerms.concat(e);return t.setState({availableTerms:r}),t.props.onUpdateTerms(o(n,r),t.props.taxonomy.rest_base)})}},{key:"searchTerms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(O.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:e})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy;if(!e.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,c=r.selectedTerms,a=i.map(function(e){return e.name}),s=Object(O.get)(n,["labels","add_new_item"],"post_tag"===t?Object(_.__)("Add New Tag"):Object(_.__)("Add New Term")),l=Object(O.get)(n,["labels","singular_name"],"post_tag"===t?Object(_.__)("Tag"):Object(_.__)("Term")),u=Object(_.sprintf)(Object(_._x)("%s added","term"),l),d=Object(_.sprintf)(Object(_._x)("%s removed","term"),l),p=Object(_.sprintf)(Object(_._x)("Remove %s","term"),l);return Object(Br.createElement)(Vr.FormTokenField,{value:c,displayTransform:O.unescape,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:s,messages:{added:u,removed:d,remove:p}})}}]),t}(Br.Component),Is=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(O.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(O.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(f.a)({},n,t))}}}),Object(Vr.withFilters)("editor.PostTaxonomyType"))(Ps),Bs=function(){var e=[Object(_.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(_.__)("Add tags"))];return Object(Br.createElement)(Vr.PanelBody,{initialOpen:!1,title:e},Object(Br.createElement)("p",null,Object(_.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(Br.createElement)(Is,{slug:"post_tag"}))},xs=function(e){function t(e){var n;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).call(this,e))).state={hadTagsWhenOpeningThePanel:e.hasTags},n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(Br.createElement)(Bs,null)}}]),t}(Br.Component),Ls=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPostType(),n=e("core").getTaxonomy("post_tag"),r=n&&e("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(O.some)(n.types,function(e){return e===t}),hasTags:r&&r.length}}),Object(Ar.ifCondition)(function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t}))(xs),As=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(Br.createElement)(Vr.Button,{isLink:!0,onClick:function(){return r(t)}},n)},Ns=function(e,t){var n=is.filter(function(t){return Object(O.includes)(e,t.id)});return Object(O.find)(n,function(e){return e.id===t})},Rs=Object(Ar.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(O.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:Ns(o,r())}}),Object(l.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),Object(Ar.ifCondition)(function(e){var t=e.suggestion,n=e.currentPostFormat;return t&&t.id!==n}))(function(e){var t=e.suggestion,n=e.onUpdatePostFormat,r=[Object(_.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(_.__)("Use a post format"))];return Object(Br.createElement)(Vr.PanelBody,{initialOpen:!1,title:r},Object(Br.createElement)("p",null,Object(_.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),Object(Br.createElement)("p",null,Object(Br.createElement)(As,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(_.sprintf)(Object(_.__)('Apply the "%1$s" format.'),t.caption)})))});var Ds=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(O.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}})(function(e){var t,n,r=e.hasPublishAction,o=e.isBeingScheduled,i=e.children;return r?o?(t=Object(_.__)("Are you ready to schedule?"),n=Object(_.__)("Your work will be published at the specified date and time.")):(t=Object(_.__)("Are you ready to publish?"),n=Object(_.__)("Double-check your settings before publishing.")):(t=Object(_.__)("Are you ready to submit for review?"),n=Object(_.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(Br.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(Br.createElement)("div",null,Object(Br.createElement)("strong",null,t)),Object(Br.createElement)("p",null,n),r&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Vr.PanelBody,{initialOpen:!1,title:[Object(_.__)("Visibility:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(Es,null))]},Object(Br.createElement)(_s,null)),Object(Br.createElement)(Vr.PanelBody,{initialOpen:!1,title:[Object(_.__)("Publish:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(Cs,null))]},Object(Br.createElement)(Ss,null)),Object(Br.createElement)(Rs,null),Object(Br.createElement)(Ls,null),i))}),Fs=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onSelectInput=e.onSelectInput.bind(Object(Hr.a)(Object(Hr.a)(e))),e.postLink=Object(Br.createRef)(),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var e=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout(function(){e.setState({showCopyConfirmation:!1})},4e3)}},{key:"onSelectInput",value:function(e){e.target.select()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.isScheduled,r=e.post,o=e.postType,i=Object(O.get)(o,["labels","singular_name"]),c=Object(O.get)(o,["labels","view_item"]),a=n?Object(Br.createElement)(Br.Fragment,null,Object(_.__)("is now scheduled. It will go live on")," ",Object(Br.createElement)(Cs,null),"."):Object(_.__)("is now live.");return Object(Br.createElement)("div",{className:"post-publish-panel__postpublish"},Object(Br.createElement)(Vr.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(Br.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(_.__)("(no title)"))," ",a),Object(Br.createElement)(Vr.PanelBody,null,Object(Br.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(Br.createElement)("strong",null,Object(_.__)("What’s next?"))),Object(Br.createElement)(Vr.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(_.sprintf)(Object(_.__)("%s address"),i),value:r.link,onFocus:this.onSelectInput}),Object(Br.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(Br.createElement)(Vr.Button,{isDefault:!0,href:r.link},c),Object(Br.createElement)(Vr.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(_.__)("Copied!"):Object(_.__)("Copy Link")))),t)}}]),t}(Br.Component),Ms=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getCurrentPost,o=t.isCurrentPostScheduled,i=e("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}})(Fs),Us=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var e=this.props,t=e.onClose,n=e.hasPublishAction,r=e.isPostTypeViewable;n&&r||t()}},{key:"render",value:function(){var e=this.props,t=e.forceIsDirty,n=e.forceIsSaving,r=e.isBeingScheduled,o=e.isPublished,i=e.isPublishSidebarEnabled,c=e.isScheduled,a=e.isSaving,s=e.onClose,l=e.onTogglePublishSidebar,u=e.PostPublishExtension,d=e.PrePublishExtension,b=Object(p.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),f=Object(O.omit)(b,["hasPublishAction","isDirty","isPostTypeViewable"]),h=o||c&&r,m=!h&&!a,v=h&&!a;return Object(Br.createElement)("div",Object(Ir.a)({className:"editor-post-publish-panel"},f),Object(Br.createElement)("div",{className:"editor-post-publish-panel__header"},v?Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-published"},c?Object(_.__)("Scheduled"):Object(_.__)("Published")):Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(Br.createElement)(js,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n}),Object(Br.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(Br.createElement)(Vr.IconButton,{"aria-expanded":!0,onClick:s,icon:"no-alt",label:Object(_.__)("Close panel")})),Object(Br.createElement)("div",{className:"editor-post-publish-panel__content"},m&&Object(Br.createElement)(Ds,null,d&&Object(Br.createElement)(d,null)),v&&Object(Br.createElement)(Ms,{focusOnMount:!0},u&&Object(Br.createElement)(u,null)),a&&Object(Br.createElement)(Vr.Spinner,null)),Object(Br.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Always show pre-publish checks."),checked:i,onChange:l})))}}]),t}(Br.Component),Hs=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core").getPostType,n=e("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,c=n.isCurrentPostScheduled,a=n.isEditedPostBeingScheduled,s=n.isEditedPostDirty,l=n.isSavingPost,u=e("core/editor").isPublishSidebarEnabled,d=t(o("type"));return{hasPublishAction:Object(O.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(O.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:s(),isPublished:i(),isPublishSidebarEnabled:u(),isSaving:l(),isScheduled:c()}}),Object(l.withDispatch)(function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}}),Vr.withFocusReturn,Vr.withConstrainedTabbing])(Us);var Vs=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isCurrentPostPublished,o=t.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost,r=t.savePost;return{onClick:function(){n({status:"draft"}),r()}}})])(function(e){var t=e.isSaving,n=e.isPublished,r=e.isScheduled,o=e.onClick;return n||r?Object(Br.createElement)(Vr.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(_.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(_.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},Object(_.__)("Switch to Draft")):null}),Ks=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={forceSavedMessage:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this;e.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout(function(){t.setState({forceSavedMessage:!1})},1e3))}},{key:"render",value:function(){var e=this.props,t=e.post,n=e.isNew,r=e.isScheduled,o=e.isPublished,i=e.isDirty,c=e.isSaving,a=e.isSaveable,s=e.onSave,l=e.isAutosaving,u=e.isPending,d=e.isLargeViewport,p=this.state.forceSavedMessage;if(c){var b=Lr()("editor-post-saved-state","is-saving",{"is-autosaving":l});return Object(Br.createElement)("span",{className:b},Object(Br.createElement)(Vr.Dashicon,{icon:"cloud"}),l?Object(_.__)("Autosaving"):Object(_.__)("Saving"))}if(o||r)return Object(Br.createElement)(Vs,null);if(!a)return null;if(p||!n&&!i)return Object(Br.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(Br.createElement)(Vr.Dashicon,{icon:"saved"}),Object(_.__)("Saved"));if(!Object(O.get)(t,["_links","wp:action-publish"],!1)&&u)return null;var f=u?Object(_.__)("Save as Pending"):Object(_.__)("Save Draft");return d?Object(Br.createElement)(Vr.Button,{className:"editor-post-save-draft",onClick:s,shortcut:yo.displayShortcut.primary("s"),isTertiary:!0},f):Object(Br.createElement)(Vr.IconButton,{className:"editor-post-save-draft",label:f,onClick:s,shortcut:yo.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),t}(Br.Component),zs=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.forceIsDirty,r=t.forceIsSaving,o=e("core/editor"),i=o.isEditedPostNew,c=o.isCurrentPostPublished,a=o.isCurrentPostScheduled,s=o.isEditedPostDirty,l=o.isSavingPost,u=o.isEditedPostSaveable,d=o.getCurrentPost,p=o.isAutosavingPost,b=o.getEditedPostAttribute;return{post:d(),isNew:i(),isPublished:c(),isScheduled:a(),isDirty:n||s(),isSaving:r||l(),isSaveable:u(),isAutosaving:p(),isPending:"pending"===b("status")}}),Object(l.withDispatch)(function(e){return{onSave:e("core/editor").savePost}}),Ar.withSafeTimeout,Object(s.withViewportMatch)({isLargeViewport:"medium"})])(Ks);var Ws=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(O.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction,n=e.children;return t?n:null});var qs=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(O.get)(t,["_links","wp:action-sticky"],!1),postType:e("core/editor").getCurrentPostType()}})])(function(e){var t=e.hasStickyAction,n=e.postType,r=e.children;return"post"===n&&t?r:null});var Gs=Object(Ar.compose)([Object(l.withSelect)(function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}}),Object(l.withDispatch)(function(e){return{onUpdateSticky:function(t){e("core/editor").editPost({sticky:t})}}})])(function(e){var t=e.onUpdateSticky,n=e.postSticky,r=void 0!==n&&n;return Object(Br.createElement)(qs,null,Object(Br.createElement)(Vr.CheckboxControl,{label:Object(_.__)("Stick to the Front Page"),checked:r,onChange:function(){return t(!r)}}))}),$s={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},Ys=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).findTerm=e.findTerm.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onChange=e.onChange.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onChangeFormName=e.onChangeFormName.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onChangeFormParent=e.onChangeFormParent.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onAddTerm=e.onAddTerm.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onToggleForm=e.onToggleForm.bind(Object(Hr.a)(Object(Hr.a)(e))),e.setFilterValue=e.setFilterValue.bind(Object(Hr.a)(Object(Hr.a)(e))),e.sortBySelected=e.sortBySelected.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onChange",value:function(e){var t=this.props,n=t.onUpdateTerms,r=t.terms,o=void 0===r?[]:r,i=t.taxonomy,c=parseInt(e.target.value,10);n(-1!==o.indexOf(c)?Object(O.without)(o,c):Object(b.a)(o).concat([c]),i.rest_base)}},{key:"onChangeFormName",value:function(e){var t=""===e.target.value.trim()?"":e.target.value;this.setState({formName:t})}},{key:"onChangeFormParent",value:function(e){this.setState({formParent:e})}},{key:"onToggleForm",value:function(){this.setState(function(e){return{showForm:!e.showForm}})}},{key:"findTerm",value:function(e,t,n){return Object(O.find)(e,function(e){return(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()})}},{key:"onAddTerm",value:function(e){var t=this;e.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,c=n.slug,a=this.state,s=a.formName,l=a.formParent,u=a.adding,p=a.availableTerms;if(""!==s&&!u){var f=this.findTerm(p,l,s);if(f)return Object(O.some)(i,function(e){return e===f.id})||r(Object(b.a)(i).concat([f.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=vr()({path:"/wp/v2/".concat(o.rest_base),method:"POST",data:{name:s,parent:l||void 0}}),this.addRequest.catch(function(e){return"term_exists"===e.code?(t.addRequest=vr()({path:Object(g.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(d.a)({},$s,{parent:l||0,search:s}))}),t.addRequest.then(function(e){return t.findTerm(e,l,s)})):Promise.reject(e)}).then(function(e){var n=!!Object(O.find)(t.state.availableTerms,function(t){return t.id===e.id})?t.state.availableTerms:[e].concat(Object(b.a)(t.state.availableTerms)),a=Object(_.sprintf)(Object(_._x)("%s added","term"),Object(O.get)(t.props.taxonomy,["labels","singular_name"],"category"===c?Object(_.__)("Category"):Object(_.__)("Term")));t.props.speak(a,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:t.sortBySelected(Fa(n))}),r(Object(b.a)(i).concat([e.id]),o.rest_base)},function(e){"abort"!==e.statusText&&(t.addRequest=null,t.setState({adding:!1}))})}}},{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){Object(O.invoke)(this.fetchRequest,["abort"]),Object(O.invoke)(this.addRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){this.props.taxonomy!==e.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var e=this,t=this.props.taxonomy;t&&(this.fetchRequest=vr()({path:Object(g.addQueryArgs)("/wp/v2/".concat(t.rest_base),$s)}),this.fetchRequest.then(function(t){var n=e.sortBySelected(Fa(t));e.fetchRequest=null,e.setState({loading:!1,availableTermsTree:n,availableTerms:t})},function(t){"abort"!==t.statusText&&(e.fetchRequest=null,e.setState({loading:!1}))}))}},{key:"sortBySelected",value:function(e){var t=this.props.terms,n=function e(n){return-1!==t.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(e).filter(function(e){return e}).length>0)};return e.sort(function(e,t){var r=n(e),o=n(t);return r===o?0:r&&!o?-1:!r&&o?1:0}),e}},{key:"setFilterValue",value:function(e){var t=this.state.availableTermsTree,n=e.target.value,r=t.map(this.getFilterMatcher(n)).filter(function(e){return e});this.setState({filterValue:n,filteredTermsTree:r});var o=function e(t){for(var n=0,r=0;r0&&(r.children=r.children.map(t).filter(function(e){return e})),(-1!==r.name.toLowerCase().indexOf(e)||r.children.length>0)&&r}}},{key:"renderTerms",value:function(e){var t=this,n=this.props.terms,r=void 0===n?[]:n;return e.map(function(e){var n="editor-post-taxonomies-hierarchical-term-".concat(e.id);return Object(Br.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(Br.createElement)("input",{id:n,className:"editor-post-taxonomies__hierarchical-terms-input",type:"checkbox",checked:-1!==r.indexOf(e.id),value:e.id,onChange:t.onChange}),Object(Br.createElement)("label",{htmlFor:n},Object(O.unescape)(e.name)),!!e.children.length&&Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},t.renderTerms(e.children)))})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy,r=e.instanceId,o=e.hasCreateAction;if(!e.hasAssignAction)return null;var i=this.state,c=i.availableTermsTree,a=i.availableTerms,s=i.filteredTermsTree,l=i.formName,u=i.formParent,d=i.loading,p=i.showForm,b=i.filterValue,f=function(e,r,o){return Object(O.get)(n,["labels",e],"category"===t?r:o)},h=f("add_new_item",Object(_.__)("Add new category"),Object(_.__)("Add new term")),m=f("new_item_name",Object(_.__)("Add new category"),Object(_.__)("Add new term")),v=f("parent_item",Object(_.__)("Parent Category"),Object(_.__)("Parent Term")),g="— ".concat(v," —"),j=h,y="editor-post-taxonomies__hierarchical-terms-input-".concat(r),k="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),E=Object(_.sprintf)(Object(_._x)("Search %s","term"),Object(O.get)(this.props.taxonomy,["name"],"category"===t?Object(_.__)("Categories"):Object(_.__)("Terms"))),S=Object(_.sprintf)(Object(_._x)("Available %s","term"),Object(O.get)(this.props.taxonomy,["name"],"category"===t?Object(_.__)("Categories"):Object(_.__)("Terms"))),C=a.length>=8;return[C&&Object(Br.createElement)("label",{key:"filter-label",htmlFor:k},E),C&&Object(Br.createElement)("input",{type:"search",id:k,value:b,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":S},this.renderTerms(""!==b?s:c)),!d&&o&&Object(Br.createElement)(Vr.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},h),p&&Object(Br.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(Br.createElement)("label",{htmlFor:y,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(Br.createElement)("input",{type:"text",id:y,className:"editor-post-taxonomies__hierarchical-terms-input",value:l,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(Br.createElement)(Vr.TreeSelect,{label:v,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:u,tree:c}),Object(Br.createElement)(Vr.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},j))]}}]),t}(Br.Component),Qs=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(O.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(O.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(f.a)({},n,t))}}}),Vr.withSpokenMessages,Ar.withInstanceId,Object(Vr.withFilters)("editor.PostTaxonomyType")])(Ys);var Xs=Object(Ar.compose)([Object(l.withSelect)(function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}})])(function(e){var t=e.postType,n=e.taxonomies,r=e.taxonomyWrapper,o=void 0===r?O.identity:r,i=Object(O.filter)(n,function(e){return Object(O.includes)(e.types,t)});return Object(O.filter)(i,function(e){return e.visibility.show_ui}).map(function(e){var t=e.hierarchical?Qs:Is;return Object(Br.createElement)(Br.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(Br.createElement)(t,{slug:e.slug}),e))})});var Zs=Object(Ar.compose)([Object(l.withSelect)(function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}})])(function(e){var t=e.postType,n=e.taxonomies,r=e.children;return Object(O.some)(n,function(e){return Object(O.includes)(e.types,t)})?r:null}),Js=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).edit=e.edit.bind(Object(Hr.a)(Object(Hr.a)(e))),e.stopEditing=e.stopEditing.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"edit",value:function(e){var t=e.target.value;this.props.onChange(t),this.setState({value:t,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var e=this.state.value,t=this.props.instanceId;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("label",{htmlFor:"post-content-".concat(t),className:"screen-reader-text"},Object(_.__)("Type text or HTML")),Object(Br.createElement)(di.a,{autoComplete:"off",dir:"auto",value:e,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(t),placeholder:Object(_.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),t}(Br.Component),el=Object(Ar.compose)([Object(l.withSelect)(function(e){return{value:(0,e("core/editor").getEditedPostContent)()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost,r=t.resetBlocks;return{onChange:function(e){n({content:e})},onPersist:function(e){r(Object(i.parse)(e))}}}),Ar.withInstanceId])(Js),tl=function(e){function t(e){var n,r=e.permalinkParts,o=e.slug;return Object(Rr.a)(this,t),(n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(Hr.a)(Object(Hr.a)(n))),n}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onSavePermalink",value:function(e){var t=ca(this.state.editedPostName);e.preventDefault(),this.props.onSave(),t!==this.props.postName&&(this.props.editPost({slug:t}),this.setState({editedPostName:t}))}},{key:"render",value:function(){var e=this,t=this.props.permalinkParts,n=t.prefix,r=t.suffix,o=this.state.editedPostName;return Object(Br.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(Br.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(Br.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(Br.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(_.__)("Edit post permalink"),value:o,onChange:function(t){return e.setState({editedPostName:t.target.value})},type:"text",autoFocus:!0}),Object(Br.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),""),Object(Br.createElement)(Vr.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(_.__)("Save")))}}]),t}(Br.Component),nl=Object(Ar.compose)([Object(l.withSelect)(function(e){return{permalinkParts:(0,e("core/editor").getPermalinkParts)()}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(tl),rl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).addVisibilityCheck=e.addVisibilityCheck.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onVisibilityChange=e.onVisibilityChange.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={isCopied:!1,isEditingPermalink:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"addVisibilityCheck",value:function(){window.addEventListener("visibilitychange",this.onVisibilityChange)}},{key:"onVisibilityChange",value:function(){var e=this.props,t=e.isEditable,n=e.refreshPost;t||"visible"!==document.visibilityState||n()}},{key:"componentDidUpdate",value:function(e,t){t.isEditingPermalink&&!this.state.isEditingPermalink&&this.linkElement.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("visibilitychange",this.addVisibilityCheck)}},{key:"render",value:function(){var e=this,t=this.props,n=t.isEditable,r=t.isNew,o=t.isPublished,i=t.isViewable,c=t.permalinkParts,a=t.postLink,s=t.postSlug,l=t.postID,u=t.postTitle;if(r||!i||!c||!a)return null;var d=this.state,p=d.isCopied,b=d.isEditingPermalink,f=p?Object(_.__)("Permalink copied"):Object(_.__)("Copy the permalink"),h=c.prefix,m=c.suffix,v=s||ca(u)||l,O=n?h+v+m:h;return Object(Br.createElement)("div",{className:"editor-post-permalink"},Object(Br.createElement)(Vr.ClipboardButton,{className:Lr()("editor-post-permalink__copy",{"is-copied":p}),text:O,label:f,onCopy:function(){return e.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(Br.createElement)("span",{className:"editor-post-permalink__label"},Object(_.__)("Permalink:")),!b&&Object(Br.createElement)(Vr.ExternalLink,{className:"editor-post-permalink__link",href:o?O:a,target:"_blank",ref:function(t){return e.linkElement=t}},Object(g.safeDecodeURI)(O),""),b&&Object(Br.createElement)(nl,{slug:v,onSave:function(){return e.setState({isEditingPermalink:!1})}}),n&&!b&&Object(Br.createElement)(Vr.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return e.setState({isEditingPermalink:!0})}},Object(_.__)("Edit")),!n&&Object(Br.createElement)(Vr.Button,{className:"editor-post-permalink__change",isLarge:!0,href:ia("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(_.__)("Change Permalinks")))}}]),t}(Br.Component),ol=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.isPermalinkEditable,o=t.getCurrentPost,i=t.getPermalinkParts,c=t.getEditedPostAttribute,a=t.isCurrentPostPublished,s=e("core").getPostType,l=o(),u=l.id,d=l.link,p=s(c("type"));return{isNew:n(),postLink:d,permalinkParts:i(),postSlug:c("slug"),isEditable:r(),isPublished:a(),postTitle:c("title"),postID:u,isViewable:Object(O.get)(p,["viewable"],!1)}}),Object(l.withDispatch)(function(e){return{refreshPost:e("core/editor").refreshPost}})])(rl),il=/[\r\n]+/g,cl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onSelect=e.onSelect.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onUnselect=e.onUnselect.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(Hr.a)(Object(Hr.a)(e))),e.redirectHistory=e.redirectHistory.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={isSelected:!1},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"handleFocusOutside",value:function(){this.onUnselect()}},{key:"onSelect",value:function(){this.setState({isSelected:!0}),this.props.clearSelectedBlock()}},{key:"onUnselect",value:function(){this.setState({isSelected:!1})}},{key:"onChange",value:function(e){var t=e.target.value.replace(il," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===yo.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(e){e.shiftKey?this.props.onRedo():this.props.onUndo(),e.preventDefault()}},{key:"render",value:function(){var e=this.props,t=e.hasFixedToolbar,n=e.isCleanNewPost,r=e.isFocusMode,o=e.isPostTypeViewable,i=e.instanceId,c=e.placeholder,a=e.title,s=this.state.isSelected,l=Lr()("wp-block editor-post-title__block",{"is-selected":s,"is-focus-mode":r,"has-fixed-toolbar":t}),u=Object(Zi.decodeEntities)(c);return Object(Br.createElement)(Na,{supportKeys:"title"},Object(Br.createElement)("div",{className:"editor-post-title"},Object(Br.createElement)("div",{className:l},Object(Br.createElement)(Vr.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(Br.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},u||Object(_.__)("Add title")),Object(Br.createElement)(di.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:a,onChange:this.onChange,placeholder:u||Object(_.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),s&&o&&Object(Br.createElement)(ol,null))))}}]),t}(Br.Component),al=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=t.isCleanNewPost,i=(0,e("core").getPostType)(n("type")),c=r(),a=c.titlePlaceholder,s=c.focusMode,l=c.hasFixedToolbar;return{isCleanNewPost:o(),title:n("title"),isPostTypeViewable:Object(O.get)(i,["viewable"],!1),placeholder:a,isFocusMode:s,hasFixedToolbar:l}}),sl=Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.insertDefaultBlock,r=t.editPost,o=t.clearSelectedBlock;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(e){r({title:e})},onUndo:t.undo,onRedo:t.redo,clearSelectedBlock:o}}),ll=Object(Ar.compose)(al,sl,Ar.withInstanceId,Vr.withFocusOutside)(cl);var ul=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}}),Object(l.withDispatch)(function(e){return{trashPost:e("core/editor").trashPost}})])(function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(p.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(Br.createElement)(Vr.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(_.__)("Move to trash"))});var dl=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId;return{isNew:n(),postId:r()}})(function(e){var t=e.isNew,n=e.postId,r=e.children;return t||!n?null:r});var pl=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(O.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})}),bl=n(97);var fl=Object(l.withSelect)(function(e){return{content:e("core/editor").getEditedPostAttribute("content")}})(function(e){var t=e.content,n=Object(_._x)("words","Word count type. Do not translate!");return Object(Br.createElement)("span",{className:"word-count"},Object(bl.count)(t,n))});var hl=Object(l.withSelect)(function(e){var t=e("core/editor").getGlobalBlockCount;return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}})(function(e){var t=e.headingCount,n=e.paragraphCount,r=e.numberOfBlocks;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("div",{className:"table-of-contents__counts",role:"note","aria-label":Object(_.__)("Document Statistics"),tabIndex:"0"},Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Words"),Object(Br.createElement)(fl,null)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Headings"),Object(Br.createElement)("span",{className:"table-of-contents__number"},t)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Paragraphs"),Object(Br.createElement)("span",{className:"table-of-contents__number"},n)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Blocks"),Object(Br.createElement)("span",{className:"table-of-contents__number"},r))),t>0&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("hr",null),Object(Br.createElement)("span",{className:"table-of-contents__title"},Object(_.__)("Document Outline")),Object(Br.createElement)(_a,null)))});var ml=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/editor").getBlockCount()}})(function(e){var t=e.hasBlocks;return Object(Br.createElement)(Vr.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(Br.createElement)(Vr.IconButton,{onClick:t?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(_.__)("Content structure"),labelPosition:"bottom","aria-disabled":!t})},renderContent:function(){return Object(Br.createElement)(hl,null)}})}),vl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(e){if(this.props.isDirty)return e.returnValue=Object(_.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),t}(Br.Component),Ol=Object(l.withSelect)(function(e){return{isDirty:e("core/editor").isEditedPostDirty()}})(vl),gl=Object(l.withSelect)(function(e){return{selectedBlockClientId:e("core/editor").getBlockSelectionStart()}})(function(e){var t=e.selectedBlockClientId;return t&&Object(Br.createElement)(Vr.Button,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block",onClick:function(){Gi(t).closest(".editor-block-list__block").focus()}},Object(_.__)("Skip to the selected block"))}),jl=n(124),yl=n.n(jl);function kl(e,t,n){var r=new yl.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}var _l=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor").getBlock,o=e("core/blocks").getBlockStyles,i=r(n);return{name:i.name,attributes:i.attributes,className:i.attributes.className||"",styles:o(i.name)}}),Object(l.withDispatch)(function(e,t){var n=t.clientId;return{onChangeClassName:function(t){e("core/editor").updateBlockAttributes(n,{className:t})}}})])(function(e){var t=e.styles,n=e.className,r=e.onChangeClassName,o=e.name,i=e.attributes,c=e.onSwitch,a=void 0===c?O.noop:c,s=e.onHoverClassName,l=void 0===s?O.noop:s;if(!t||0===t.length)return null;var u=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,c=new yl.a(t).values()[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;if(-1!==a.indexOf("is-style-")){var s=a.substring(9),l=Object(O.find)(e,{name:s});if(l)return l}}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}return Object(O.find)(e,"isDefault")}(t,n);function p(e){var t=kl(n,u,e);r(t),a()}return Object(Br.createElement)("div",{className:"editor-block-styles"},t.map(function(e){var t=kl(n,u,e);return Object(Br.createElement)("div",{key:e.name,className:Lr()("editor-block-styles__item",{"is-active":u===e}),onClick:function(){return p(e)},onKeyDown:function(t){yo.ENTER!==t.keyCode&&yo.SPACE!==t.keyCode||(t.preventDefault(),p(e))},onMouseEnter:function(){return l(t)},onMouseLeave:function(){return l(null)},role:"button",tabIndex:"0","aria-label":e.label||e.name},Object(Br.createElement)("div",{className:"editor-block-styles__item-preview"},Object(Br.createElement)(Si,{name:o,attributes:Object(d.a)({},i,{className:t})})),Object(Br.createElement)("div",{className:"editor-block-styles__item-label"},e.label||e.name))}))});var El=Object(l.withSelect)(function(e){return{blocks:(0,e("core/editor").getMultiSelectedBlocks)()}})(function(e){var t=e.blocks,n=Object(bl.count)(Object(i.serialize)(t),"words");return Object(Br.createElement)("div",{className:"editor-multi-selection-inspector__card"},Object(Br.createElement)(Qr,{icon:Object(Br.createElement)(Vr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Br.createElement)(Vr.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),showColors:!0}),Object(Br.createElement)("div",{className:"editor-multi-selection-inspector__card-content"},Object(Br.createElement)("div",{className:"editor-multi-selection-inspector__card-title"},Object(_.sprintf)(Object(_._n)("%d block","%d blocks",t.length),t.length)),Object(Br.createElement)("div",{className:"editor-multi-selection-inspector__card-description"},Object(_.sprintf)(Object(_._n)("%d word","%d words",n),n))))}),Sl=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,c=e("core/blocks").getBlockStyles,a=n(),s=a&&o(a),l=a&&Object(i.getBlockType)(s),u=a&&c(s);return{count:r(),hasBlockStyles:u&&u.length>0,selectedBlockName:s,selectedBlockClientId:a,blockType:l}})(function(e){var t=e.selectedBlockClientId,n=e.selectedBlockName,r=e.blockType,o=e.count,c=e.hasBlockStyles;if(o>1)return Object(Br.createElement)(El,null);var a=n===Object(i.getUnregisteredTypeHandlerName)();return r&&t&&!a?Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("div",{className:"editor-block-inspector__card"},Object(Br.createElement)(Qr,{icon:r.icon,showColors:!0}),Object(Br.createElement)("div",{className:"editor-block-inspector__card-content"},Object(Br.createElement)("div",{className:"editor-block-inspector__card-title"},r.title),Object(Br.createElement)("div",{className:"editor-block-inspector__card-description"},r.description))),c&&Object(Br.createElement)("div",null,Object(Br.createElement)(Vr.PanelBody,{title:Object(_.__)("Styles"),initialOpen:!1},Object(Br.createElement)(_l,{clientId:t}))),Object(Br.createElement)("div",null,Object(Br.createElement)(fc.Slot,null)),Object(Br.createElement)("div",null,Object(Br.createElement)(lc.Slot,null,function(e){return!Object(O.isEmpty)(e)&&Object(Br.createElement)(Vr.PanelBody,{className:"editor-block-inspector__advanced",title:Object(_.__)("Advanced"),initialOpen:!1},e)})),Object(Br.createElement)(gl,{key:"back"})):Object(Br.createElement)("span",{className:"editor-block-inspector__no-blocks"},Object(_.__)("No block selected."))}),Cl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Object(Hr.a)(Object(Hr.a)(e))),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,r=t.hasMultiSelection,o=t.clearSelectedBlock,i=n||r;e.target===this.container&&i&&o()}},{key:"render",value:function(){return Object(Br.createElement)("div",Object(Ir.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(O.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}(Br.Component),wl=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}}),Object(l.withDispatch)(function(e){return{clearSelectedBlock:e("core/editor").clearSelectedBlock}})])(Cl);var Tl=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlock,c=r.getBlockMode,a=o(n);return{mode:c(n),blockType:a?Object(i.getBlockType)(a.name):null}}),Object(l.withDispatch)(function(e,t){var n=t.onToggle,r=void 0===n?O.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/editor").toggleBlockMode(o),r()}}})])(function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o;if(!Object(i.hasBlockSupport)(t,"html",!0))return null;var a="visual"===n?Object(_.__)("Edit as HTML"):Object(_.__)("Edit visually");return Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:r,icon:"html",label:c?a:void 0},!c&&a)});var Pl=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlocksByClientId,c=r.canInsertBlockType,a=r.__experimentalGetReusableBlock,s=o(n),l=c("core/block")&&Object(O.every)(s,function(e){return!!e&&e.isValid&&Object(i.hasBlockSupport)(e.name,"reusable",!0)});return{isVisible:l,isStaticBlock:l&&(1!==s.length||!Object(i.isReusableBlock)(s[0])||!a(s[0].attributes.ref))}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?O.noop:r,i=e("core/editor"),c=i.__experimentalConvertBlockToReusable,a=i.__experimentalConvertBlockToStatic;return{onConvertToStatic:function(){1===n.length&&(a(n[0]),o())},onConvertToReusable:function(){c(n),o()}}})])(function(e){var t=e.isVisible,n=e.isStaticBlock,r=e.onConvertToStatic,o=e.onConvertToReusable;return t?Object(Br.createElement)(Br.Fragment,null,n&&Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(_.__)("Add to Reusable Blocks")),!n&&Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(_.__)("Convert to Regular Block"))):null});var Il=Object(Ar.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlock,c=r.__experimentalGetReusableBlock,a=o(n);return{reusableBlock:a&&Object(i.isReusableBlock)(a)?c(a.attributes.ref):null}}),Object(l.withDispatch)(function(e,t){var n=t.onToggle,r=void 0===n?O.noop:n,o=e("core/editor").__experimentalDeleteReusableBlock;return{onDelete:function(e){window.confirm(Object(_.__)("Are you sure you want to delete this Reusable Block?\n\nIt will be permanently removed from all posts and pages that use it."))&&(o(e),r())}}})])(function(e){var t=e.reusableBlock,n=e.onDelete;return t?Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",icon:"no",disabled:t.isTemporary,onClick:function(){return n(t.id)}},Object(_.__)("Remove from Reusable Blocks")):null});function Bl(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(_.__)("Convert to Blocks");return Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:n,icon:"screenoptions",label:r?o:void 0},!r&&o)}var xl=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.getBlockContent)(n)}))}}}))(Bl),Ll=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor").getBlock(n);return{block:r,shouldRender:r&&r.name===Object(i.getFreeformContentHandlerName)()}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.serialize)(n)}))}}}))(Bl),Al=Object(Vr.createSlotFill)("_BlockSettingsMenuFirstItem"),Nl=Al.Fill,Rl=Al.Slot;Nl.Slot=Rl;var Dl=Nl,Fl=Object(Vr.createSlotFill)("_BlockSettingsMenuPluginsExtension"),Ml=Fl.Fill,Ul=Fl.Slot;Ml.Slot=Ul;var Hl=Ml;var Vl=Object(l.withDispatch)(function(e){var t=e("core/editor").selectBlock;return{onSelect:function(e){t(e)}}})(function(e){var t=e.clientIds,n=e.onSelect,r=Object(O.castArray)(t),o=r.length,i=r[0];return Object(Br.createElement)(Sa,{clientIds:t},function(e){var r=e.onDuplicate,c=e.onRemove,a=e.onInsertAfter,s=e.onInsertBefore,l=e.canDuplicate,u=e.isLocked;return Object(Br.createElement)(Vr.Dropdown,{contentClassName:"editor-block-settings-menu__popover",position:"bottom right",renderToggle:function(e){var t=e.onToggle,r=e.isOpen,c=Lr()("editor-block-settings-menu__toggle",{"is-opened":r}),a=r?Object(_.__)("Hide options"):Object(_.__)("More options");return Object(Br.createElement)(Vr.Toolbar,{controls:[{icon:"ellipsis",title:a,onClick:function(){1===o&&n(i),t()},className:c,extraProps:{"aria-expanded":r}}]})},renderContent:function(e){var n=e.onClose;return Object(Br.createElement)(Vr.NavigableMenu,{className:"editor-block-settings-menu__content"},Object(Br.createElement)(Dl.Slot,{fillProps:{onClose:n}}),1===o&&Object(Br.createElement)(Ll,{clientId:i}),1===o&&Object(Br.createElement)(xl,{clientId:i}),!u&&l&&Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:r,icon:"admin-page",shortcut:wa.duplicate.display},Object(_.__)("Duplicate")),!u&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:s,icon:"insert-before",shortcut:wa.insertBefore.display},Object(_.__)("Insert Before")),Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:a,icon:"insert-after",shortcut:wa.insertAfter.display},Object(_.__)("Insert After"))),1===o&&Object(Br.createElement)(Tl,{clientId:i,onToggle:n}),Object(Br.createElement)(Pl,{clientIds:t,onToggle:n}),Object(Br.createElement)(Hl.Slot,{fillProps:{clientIds:t,onClose:n}}),Object(Br.createElement)("div",{className:"editor-block-settings-menu__separator"}),1===o&&Object(Br.createElement)(Il,{clientId:i,onToggle:n}),!u&&Object(Br.createElement)(Vr.MenuItem,{className:"editor-block-settings-menu__control",onClick:c,icon:"trash",shortcut:wa.removeBlock.display},Object(_.__)("Remove Block")))}})})}),Kl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(Hr.a)(Object(Hr.a)(e))),e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,r=t.onTransform,o=t.inserterItems,c=t.hasBlockStyles,a=this.state.hoveredClassName;if(!n||!n.length)return null;var s=Object(O.mapKeys)(o,function(e){return e.name}),l=Object(O.orderBy)(Object(O.filter)(Object(i.getPossibleBlockTransformations)(n),function(e){return e&&!!s[e.name]}),function(e){return s[e.name].frecency},"desc"),u=n[0].name,p=Object(i.getBlockType)(u);return c||l.length?Object(Br.createElement)(Vr.Dropdown,{position:"bottom right",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:function(e){var t=e.onToggle,r=e.isOpen,o=1===n.length?Object(_.__)("Change block type"):Object(_.sprintf)(Object(_._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(Br.createElement)(Vr.Toolbar,null,Object(Br.createElement)(Vr.IconButton,{className:"editor-block-switcher__toggle",onClick:t,"aria-haspopup":"true","aria-expanded":r,label:o,tooltip:o,onKeyDown:function(e){r||e.keyCode!==yo.DOWN||(e.preventDefault(),e.stopPropagation(),t())}},Object(Br.createElement)(Qr,{icon:p.icon,showColors:!0}),Object(Br.createElement)(Vr.SVG,{className:"editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Br.createElement)(Vr.Path,{d:"M6.5 8.9c.6-.6 1.4-.9 2.2-.9h6.9l-1.3 1.3 1.4 1.4L19.4 7l-3.7-3.7-1.4 1.4L15.6 6H8.7c-1.4 0-2.6.5-3.6 1.5l-2.8 2.8 1.4 1.4 2.8-2.8zm13.8 2.4l-2.8 2.8c-.6.6-1.3.9-2.1.9h-7l1.3-1.3-1.4-1.4L4.6 16l3.7 3.7 1.4-1.4L8.4 17h6.9c1.3 0 2.6-.5 3.5-1.5l2.8-2.8-1.3-1.4z"}))))},renderContent:function(t){var o=t.onClose;return Object(Br.createElement)(Br.Fragment,null,c&&Object(Br.createElement)(Vr.PanelBody,{title:Object(_.__)("Block Styles"),initialOpen:!0},Object(Br.createElement)(_l,{clientId:n[0].clientId,onSwitch:o,onHoverClassName:e.onHoverClassName})),0!==l.length&&Object(Br.createElement)(Vr.PanelBody,{title:Object(_.__)("Transform To:"),initialOpen:!0},Object(Br.createElement)(Ti,{items:l.map(function(e){return{id:e.name,icon:e.icon,title:e.title,hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(e.name)}}),onSelect:function(e){r(n,e.id),o()}})),null!==a&&Object(Br.createElement)(Ci,{name:n[0].name,attributes:Object(d.a)({},n[0].attributes,{className:a})}))}}):n.length>1?null:Object(Br.createElement)(Vr.Toolbar,null,Object(Br.createElement)(Vr.IconButton,{disabled:!0,className:"editor-block-switcher__no-switcher-icon",label:Object(_.__)("Block icon")},Object(Br.createElement)(Qr,{icon:p.icon,showColors:!0})))}}]),t}(Br.Component),zl=Object(Ar.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlocksByClientId,i=r.getBlockRootClientId,c=r.getInserterItems,a=e("core/blocks").getBlockStyles,s=i(Object(O.first)(Object(O.castArray)(n))),l=o(n),u=l&&1===l.length?l[0]:null,d=u&&a(u.name);return{blocks:l,inserterItems:c(s),hasBlockStyles:d&&d.length>0}}),Object(l.withDispatch)(function(e,t){return{onTransform:function(n,r){e("core/editor").replaceBlocks(t.clientIds,Object(i.switchToBlockType)(n,r))}}}))(Kl);var Wl=Object(l.withSelect)(function(e){var t=e("core/editor").getMultiSelectedBlockClientIds();return{isMultiBlockSelection:t.length>1,selectedBlockClientIds:t}})(function(e){var t=e.isMultiBlockSelection,n=e.selectedBlockClientIds;return t?Object(Br.createElement)(zl,{key:"switcher",clientIds:n}):null});var ql=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getBlockMode,o=t.getMultiSelectedBlockClientIds,i=t.isBlockValid,c=n();return{blockClientIds:c?[c]:o(),isValid:c?i(c):null,mode:c?r(c):null}})(function(e){var t=e.blockClientIds,n=e.isValid,r=e.mode;return 0===t.length?null:t.length>1?Object(Br.createElement)("div",{className:"editor-block-toolbar"},Object(Br.createElement)(Wl,null),Object(Br.createElement)(Vl,{clientIds:t})):Object(Br.createElement)("div",{className:"editor-block-toolbar"},"visual"===r&&n&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(zl,{clientIds:t}),Object(Br.createElement)(bo.Slot,null),Object(Br.createElement)(jo.Slot,null)),Object(Br.createElement)(Vl,{clientIds:t}))}),Gl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onCopy=function(t){return e.props.onCopy(t)},e.onCut=function(t){return e.props.onCut(t)},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){document.addEventListener("copy",this.onCopy),document.addEventListener("cut",this.onCut)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("copy",this.onCopy),document.removeEventListener("cut",this.onCut)}},{key:"render",value:function(){return null}}]),t}(Br.Component),$l=Object(Ar.compose)([Object(l.withDispatch)(function(e,t,n){var r=(0,n.select)("core/editor"),o=r.getBlocksByClientId,c=r.getMultiSelectedBlockClientIds,a=r.getSelectedBlockClientId,s=r.hasMultiSelection,l=e("core/editor").removeBlocks,u=function(e){var t=a()?[a()]:c();if(0!==t.length&&(s()||!Object(Vo.documentHasSelection)())){var n=Object(i.serialize)(o(t));e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",n),e.preventDefault()}};return{onCopy:u,onCut:function(e){if(u(e),s()){var t=a()?[a()]:c();l(t)}}}})])(Gl),Yl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).reboot=e.reboot.bind(Object(Hr.a)(Object(Hr.a)(e))),e.getContent=e.getContent.bind(Object(Hr.a)(Object(Hr.a)(e))),e.state={error:null},e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidCatch",value:function(e){this.setState({error:e})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(l.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(Br.createElement)(ei,{className:"editor-error-boundary",actions:[Object(Br.createElement)(Vr.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(_.__)("Attempt Recovery")),Object(Br.createElement)(Vr.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(_.__)("Copy Post Text")),Object(Br.createElement)(Vr.ClipboardButton,{key:"copy-error",text:e.stack,isLarge:!0},Object(_.__)("Copy Error"))]},Object(_.__)("The editor has encountered an unexpected error.")):this.props.children}}]),t}(Br.Component),Ql=function(e){function t(){return Object(Rr.a)(this,t),Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=Gi(e);if(t){var n=Object(Vo.getScrollContainer)(t);n&&Ei()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}(Br.Component),Xl=Object(l.withSelect)(function(e){return{extentClientId:(0,e("core/editor").getLastMultiSelectedBlockClientId)()}})(Ql),Zl=[yo.UP,yo.RIGHT,yo.DOWN,yo.LEFT,yo.ENTER,yo.BACKSPACE];var Jl=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Object(Hr.a)(Object(Hr.a)(e))),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Object(Hr.a)(Object(Hr.a)(e))),e.startTypingInTextField=e.startTypingInTextField.bind(Object(Hr.a)(Object(Hr.a)(e))),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Object(Hr.a)(Object(Hr.a)(e))),e.stopTypingOnEscapeKey=e.stopTypingOnEscapeKey.bind(Object(Hr.a)(Object(Hr.a)(e))),e.onKeyDown=Object(O.over)([e.startTypingInTextField,e.stopTypingOnEscapeKey]),e.lastMouseMove=null,e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.toggleEventBindings(this.props.isTyping)}},{key:"componentDidUpdate",value:function(e){this.props.isTyping!==e.isTyping&&this.toggleEventBindings(this.props.isTyping)}},{key:"componentWillUnmount",value:function(){this.toggleEventBindings(!1)}},{key:"toggleEventBindings",value:function(e){var t=e?"addEventListener":"removeEventListener";document[t]("selectionchange",this.stopTypingOnSelectionUncollapse),document[t]("mousemove",this.stopTypingOnMouseMove)}},{key:"stopTypingOnMouseMove",value:function(e){var t=e.clientX,n=e.clientY;if(this.lastMouseMove){var r=this.lastMouseMove,o=r.clientX,i=r.clientY;o===t&&i===n||this.props.onStopTyping()}this.lastMouseMove={clientX:t,clientY:n}}},{key:"stopTypingOnSelectionUncollapse",value:function(){var e=window.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||this.props.onStopTyping()}},{key:"stopTypingOnEscapeKey",value:function(e){this.props.isTyping&&e.keyCode===yo.ESCAPE&&this.props.onStopTyping()}},{key:"startTypingInTextField",value:function(e){var t=this.props,n=t.isTyping,r=t.onStartTyping,o=e.type,i=e.target;n||!Object(Vo.isTextField)(i)||i.closest(".editor-block-toolbar")||("keydown"!==o||function(e){var t=e.keyCode;return!e.shiftKey&&Object(O.includes)(Zl,t)}(e))&&r()}},{key:"stopTypingOnNonTextField",value:function(e){var t=this;e.persist(),this.props.setTimeout(function(){var n=t.props,r=n.isTyping,o=n.onStopTyping,i=e.target;r&&!Object(Vo.isTextField)(i)&&o()})}},{key:"render",value:function(){var e=this.props.children;return Object(Br.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.onKeyDown},e)}}]),t}(Br.Component),eu=Object(Ar.compose)([Object(l.withSelect)(function(e){return{isTyping:(0,e("core/editor").isTyping)()}}),Object(l.withDispatch)(function(e){var t=e("core/editor");return{onStartTyping:t.startTyping,onStopTyping:t.stopTyping}}),Ar.withSafeTimeout])(Jl),tu=function(e){function t(){return Object(Rr.a)(this,t),Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props,n=t.blockOrder,r=t.selectionStart;return n!==e.blockOrder&&r?this.getOffset(r):null}},{key:"componentDidUpdate",value:function(e,t,n){n&&this.restorePreviousOffset(n)}},{key:"getOffset",value:function(e){var t=Gi(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=Gi(this.props.selectionStart);if(t){var n=Object(Vo.getScrollContainer)(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}(Br.Component),nu=Object(l.withSelect)(function(e){return{blockOrder:e("core/editor").getBlockOrder(),selectionStart:e("core/editor").getBlockSelectionStart()}})(tu),ru=window.getSelection,ou=Object(O.overEvery)([Vo.isTextField,Vo.focus.tabbable.isTabbableIndex]);var iu=function(e){function t(){var e;return Object(Rr.a)(this,t),(e=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(Hr.a)(Object(Hr.a)(e))),e.bindContainer=e.bindContainer.bind(Object(Hr.a)(Object(Hr.a)(e))),e.clearVerticalRect=e.clearVerticalRect.bind(Object(Hr.a)(Object(Hr.a)(e))),e.focusLastTextField=e.focusLastTextField.bind(Object(Hr.a)(Object(Hr.a)(e))),e.verticalRect=null,e}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearVerticalRect",value:function(){this.verticalRect=null}},{key:"getClosestTabbable",value:function(e,t){var n=Vo.focus.focusable.find(this.container);return t&&(n=Object(O.reverse)(n)),n=n.slice(n.indexOf(e)+1),Object(O.find)(n,function t(n,r,o){if(!Vo.focus.tabbable.isTabbableIndex(n))return!1;if(Object(Vo.isTextField)(n))return!0;if(!n.classList.contains("editor-block-list__block"))return!1;if(function(e){return!!e.querySelector(".editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var i,c=1;(i=o[r+c])&&n.contains(i);c++)if(t(i,r+c,o))return!1;return!0})}},{key:"expandSelection",value:function(e){var t=this.props,n=t.selectedBlockClientId,r=t.selectionStartClientId,o=t.selectionBeforeEndClientId,i=t.selectionAfterEndClientId,c=e?o:i;c&&this.props.onMultiSelect(r||n,c)}},{key:"moveSelection",value:function(e){var t=this.props,n=t.selectedFirstClientId,r=t.selectedLastClientId,o=e?n:r;o&&this.props.onSelectBlock(o)}},{key:"isTabbableEdge",value:function(e,t){var n,r,o=this.getClosestTabbable(e,t);return!(o&&(n=e,r=o,n.closest("[data-block]")===r.closest("[data-block]")))}},{key:"onKeyDown",value:function(e){var t=this.props,n=t.hasMultiSelection,r=t.onMultiSelect,o=t.blocks,i=e.keyCode,c=e.target,a=i===yo.UP,s=i===yo.DOWN,l=i===yo.LEFT,u=i===yo.RIGHT,d=a||l,p=l||u,b=a||s,f=p||b,h=e.shiftKey,m=h||e.ctrlKey||e.altKey||e.metaKey,v=b?Vo.isVerticalEdge:Vo.isHorizontalEdge;if(!f)return yo.isKeyboardEvent.primary(e)&&(this.isEntirelySelected=Object(Vo.isEntirelySelected)(c)),void(yo.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?this.isEntirelySelected:Object(Vo.isEntirelySelected)(c))&&(r(Object(O.first)(o),Object(O.last)(o)),e.preventDefault()),this.isEntirelySelected=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===yo.UP||t===yo.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,i,m))if(b?this.verticalRect||(this.verticalRect=Object(Vo.computeCaretRect)(c)):this.verticalRect=null,h&&(n||this.isTabbableEdge(c,d)&&v(c,d)))this.expandSelection(d),e.preventDefault();else if(n)this.moveSelection(d),e.preventDefault();else if(b&&Object(Vo.isVerticalEdge)(c,d)){var g=this.getClosestTabbable(c,d);g&&(Object(Vo.placeCaretAtVerticalEdge)(g,d,this.verticalRect),e.preventDefault())}else if(p&&ru().isCollapsed&&Object(Vo.isHorizontalEdge)(c,d)){var j=this.getClosestTabbable(c,d);Object(Vo.placeCaretAtHorizontalEdge)(j,d),e.preventDefault()}}},{key:"focusLastTextField",value:function(){var e=Vo.focus.focusable.find(this.container),t=Object(O.findLast)(e,ou);t&&Object(Vo.placeCaretAtHorizontalEdge)(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object(Br.createElement)("div",{className:"editor-writing-flow"},Object(Br.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object(Br.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:this.focusLastTextField,className:"wp-block editor-writing-flow__click-redirect"}))}}]),t}(Br.Component),cu=Object(Ar.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,i=t.getPreviousBlockClientId,c=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,s=t.getLastMultiSelectedBlockClientId,l=t.hasMultiSelection,u=t.getBlockOrder,d=n(),p=r(),b=o();return{selectedBlockClientId:d,selectionStartClientId:p,selectionBeforeEndClientId:i(b||d),selectionAfterEndClientId:c(b||d),selectedFirstClientId:a(),selectedLastClientId:s(),hasMultiSelection:l(),blocks:u()}}),Object(l.withDispatch)(function(e){var t=e("core/editor");return{onMultiSelect:t.multiSelect,onSelectBlock:t.selectBlock}})])(iu),au=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g,su=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new c(e),b(),t}}function c(e){this.start=e,this.end={line:n,column:r},this.source=t.source}c.prototype.content=e;var a=[];function s(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function l(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,n=[];for(b(),f(n);e.length&&"}"!==e.charAt(0)&&(t=C()||w());)!1!==t&&(n.push(t),f(n));return n}function p(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function b(){p(/^\s*/)}function f(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");var c=e.slice(2,n-2);return r+=2,o(c),e=e.slice(n),r+=2,t({type:"comment",comment:c})}}function v(){var e=p(/^([^{]+)/);if(e)return lu(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function O(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=lu(t[0]),!p(/^:\s*/))return s("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(au,""),value:n?lu(n[0]).replace(au,""):""});return p(/^[;\s]*/),r}}function g(){var e,t=[];if(!l())return s("missing '{'");for(f(t);e=O();)!1!==e&&(t.push(e),f(t));return u()?t:s("missing '}'")}function j(){for(var e,t=[],n=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:g()})}var y,k=S("import"),_=S("charset"),E=S("namespace");function S(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=p(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function C(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return s("@keyframes missing name");var r,o=t[1];if(!l())return s("@keyframes missing '{'");for(var c=f();r=j();)c.push(r),c=c.concat(f());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:c}):s("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var n=lu(t[1]);if(!l())return s("@media missing '{'");var r=f().concat(d());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:lu(t[1]),media:lu(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var n=lu(t[1]);if(!l())return s("@supports missing '{'");var r=f().concat(d());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}}()||k()||_()||E()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=lu(t[1]),r=lu(t[2]);if(!l())return s("@document missing '{'");var o=f().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!l())return s("@page missing '{'");for(var n,r=f();n=O();)r.push(n),r=r.concat(f());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!l())return s("@host missing '{'");var t=f().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!l())return s("@font-face missing '{'");for(var t,n=f();t=O();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}}()}function w(){var e=i(),t=v();return t?(f(),e({type:"rule",selectors:t,declarations:g()})):s("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i in t){var c=t[i];Array.isArray(c)?c.forEach(function(t){e(t,o)}):c&&"object"===Object(h.a)(c)&&e(c,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((y=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:y,parsingErrors:a}}))};function lu(e){return e?e.replace(/^\s+|\s+$/g,""):""}var uu=n(98),du=n.n(uu),pu=bu;function bu(e){this.options=e||{}}bu.prototype.emit=function(e){return e},bu.prototype.visit=function(e){return this[e.type](e)},bu.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Object(d.a)({},n,{selectors:n.selectors.map(function(n){return Object(O.includes)(t,n.trim())?n:n.match(Cu)?n.replace(/^(body|html)/,e):e+" "+n})}):n}},Tu=function(e){function t(e){var n;return Object(Rr.a)(this,t),n=Object(Fr.a)(this,Object(Mr.a)(t).apply(this,arguments)),e.recovery?Object(Fr.a)(n):(e.updateEditorSettings(e.settings),e.updatePostLock(e.settings.postLock),e.setupEditor(e.post,e.initialEdits),e.settings.autosave&&e.createWarningNotice(Object(_.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(_.__)("View the autosave"),url:e.settings.autosave.editLink}]}),n)}return Object(Ur.a)(t,e),Object(Dr.a)(t,[{key:"componentDidMount",value:function(){this.props.settings.styles&&Object(O.map)(this.props.settings.styles,function(e){var t=e.css,n=e.baseURL,r=[wu(".editor-styles-wrapper")];n&&r.push(Su(n));var o=yu(t,Object(Ar.compose)(r));if(o){var i=document.createElement("style");i.innerHTML=o,document.body.appendChild(i)}})}},{key:"componentDidUpdate",value:function(e){this.props.settings!==e.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"render",value:function(){var e=this.props.children,t=[[Vr.SlotFillProvider],[Vr.DropZoneProvider]];return Object(O.flow)(t.map(function(e){var t=Object(u.a)(e,2),n=t[0],r=t[1];return function(e){return Object(Br.createElement)(n,r,e)}}))(e)}}]),t}(Br.Component),Pu=Object(l.withDispatch)(function(e){var t=e("core/editor");return{setupEditor:t.setupEditor,updateEditorSettings:t.updateEditorSettings,updatePostLock:t.updatePostLock,createWarningNotice:e("core/notices").createWarningNotice}})(Tu),Iu=["left","center","right","wide","full"],Bu=["wide","full"];function xu(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?e:!0===e?Iu:[],!r||!0===e&&!n?O.without.apply(void 0,[t].concat(Bu)):t}var Lu=Object(Ar.createHigherOrderComponent)(function(e){return function(t){var n=t.name,r=xu(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(Br.createElement)(bo,{key:"align-controls"},Object(Br.createElement)(ao,{value:t.attributes.align,onChange:function(e){if(!e){var n=Object(i.getBlockType)(t.name);Object(O.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:r})),Object(Br.createElement)(e,Object(Ir.a)({key:"edit"},t))]}},"withToolbarControls"),Au=Object(Ar.createHigherOrderComponent)(Object(Ar.compose)([Object(l.withSelect)(function(e){return{hasWideEnabled:!!(0,e("core/editor").getEditorSettings)().alignWide}}),function(e){return function(t){var n=t.name,r=t.attributes,o=t.hasWideEnabled,c=r.align,a=xu(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0),o),s=t.wrapperProps;return Object(O.includes)(a,c)&&(s=Object(d.a)({},s,{"data-align":c})),Object(Br.createElement)(e,Object(Ir.a)({},t,{wrapperProps:s}))}}]));Object(Nr.addFilter)("blocks.registerBlockType","core/align/addAttribute",function(e){return Object(O.has)(e.attributes,["align","type"])?e:(Object(i.hasBlockSupport)(e,"align")&&(e.attributes=Object(O.assign)(e.attributes,{align:{type:"string"}})),e)}),Object(Nr.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Au),Object(Nr.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Lu),Object(Nr.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",function(e,t,n){var r=n.align,o=Object(i.getBlockSupport)(t,"align"),c=Object(i.hasBlockSupport)(t,"alignWide",!0);return Object(O.includes)(xu(o,c),r)&&(e.className=Lr()("align".concat(r),e.className)),e});var Nu=/[\s#]/g;var Ru=Object(Ar.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(e,t),Object(Br.createElement)(lc,null,Object(Br.createElement)(Vr.TextControl,{label:Object(_.__)("HTML Anchor"),help:Object(_.__)("Anchors lets you link directly to a section on a page."),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(Nu,"-"),t.setAttributes({anchor:e})}}))):Object(Br.createElement)(e,t)}},"withInspectorControl");Object(Nr.addFilter)("blocks.registerBlockType","core/anchor/attribute",function(e){return Object(i.hasBlockSupport)(e,"anchor")&&(e.attributes=Object(O.assign)(e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e}),Object(Nr.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Ru),Object(Nr.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e});var Du=Object(Ar.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(e,t),Object(Br.createElement)(lc,null,Object(Br.createElement)(Vr.TextControl,{label:Object(_.__)("Additional CSS Class"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:e})}}))):Object(Br.createElement)(e,t)}},"withInspectorControl");function Fu(e){e="".concat(e,"");var t=Object(i.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(Nr.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",function(e){return Object(i.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=Object(O.assign)(e.attributes,{className:{type:"string"}})),e}),Object(Nr.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Du),Object(Nr.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=Lr()(e.className,n.className)),e}),Object(Nr.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",function(e,t,n){if(Object(i.hasBlockSupport)(t,"customClassName",!0)){var r=Object(O.omit)(e,["className"]),o=Object(i.getSaveContent)(t,r),c=Fu(o),a=Fu(n),s=Object(O.difference)(a,c);s.length?e.className=s.join(" "):o&&delete e.className}return e});var Mu=[to],Uu=Object(O.once)(function(){return Object(l.dispatch)("core/editor").__experimentalFetchReusableBlocks()});Object(Nr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(e,t){return e||(e=Mu.map(O.clone),t===Object(i.getDefaultBlockName)()&&(e.push(Object(O.clone)(eo)),Uu())),e}),Object(Nr.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",function(e,t){return Object(i.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(O.uniq)([Object(i.getBlockDefaultClassName)(t.name)].concat(Object(b.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(i.getBlockDefaultClassName)(t.name)),e}),n.d(t,"Autocomplete",function(){return Yr}),n.d(t,"AlignmentToolbar",function(){return ro}),n.d(t,"BlockAlignmentToolbar",function(){return ao}),n.d(t,"BlockControls",function(){return bo}),n.d(t,"BlockEdit",function(){return ho}),n.d(t,"BlockFormatControls",function(){return jo}),n.d(t,"BlockNavigationDropdown",function(){return So}),n.d(t,"BlockIcon",function(){return Qr}),n.d(t,"ColorPalette",function(){return wo}),n.d(t,"withColorContext",function(){return Co}),n.d(t,"ContrastChecker",function(){return No}),n.d(t,"InnerBlocks",function(){return oc}),n.d(t,"InspectorAdvancedControls",function(){return lc}),n.d(t,"InspectorControls",function(){return fc}),n.d(t,"PanelColorSettings",function(){return gc}),n.d(t,"PlainText",function(){return jc}),n.d(t,"RichText",function(){return Zc}),n.d(t,"RichTextShortcut",function(){return Rc}),n.d(t,"RichTextToolbarButton",function(){return Gc}),n.d(t,"RichTextInserterItem",function(){return $c}),n.d(t,"ServerSideRender",function(){return Jc}),n.d(t,"MediaPlaceholder",function(){return ua}),n.d(t,"MediaUpload",function(){return ea}),n.d(t,"MediaUploadCheck",function(){return Xo}),n.d(t,"URLInput",function(){return ba}),n.d(t,"URLInputButton",function(){return fa}),n.d(t,"URLPopover",function(){return ta}),n.d(t,"AutosaveMonitor",function(){return ma}),n.d(t,"DocumentOutline",function(){return _a}),n.d(t,"DocumentOutlineCheck",function(){return Ea}),n.d(t,"EditorGlobalKeyboardShortcuts",function(){return Pa}),n.d(t,"EditorHistoryRedo",function(){return Ia}),n.d(t,"EditorHistoryUndo",function(){return Ba}),n.d(t,"EditorNotices",function(){return La}),n.d(t,"PageAttributesCheck",function(){return Aa}),n.d(t,"PageAttributesOrder",function(){return Da}),n.d(t,"PageAttributesParent",function(){return Ha}),n.d(t,"PageTemplate",function(){return Va}),n.d(t,"PostAuthor",function(){return Wa}),n.d(t,"PostAuthorCheck",function(){return Ka}),n.d(t,"PostComments",function(){return qa}),n.d(t,"PostExcerpt",function(){return Ga}),n.d(t,"PostExcerptCheck",function(){return $a}),n.d(t,"PostFeaturedImage",function(){return rs}),n.d(t,"PostFeaturedImageCheck",function(){return Qa}),n.d(t,"PostFormat",function(){return cs}),n.d(t,"PostFormatCheck",function(){return os}),n.d(t,"PostLastRevision",function(){return ss}),n.d(t,"PostLastRevisionCheck",function(){return as}),n.d(t,"PostLockedModal",function(){return fs}),n.d(t,"PostPendingStatus",function(){return ms}),n.d(t,"PostPendingStatusCheck",function(){return hs}),n.d(t,"PostPingbacks",function(){return vs}),n.d(t,"PostPreviewButton",function(){return ps}),n.d(t,"PostPublishButton",function(){return js}),n.d(t,"PostPublishButtonLabel",function(){return Os}),n.d(t,"PostPublishPanel",function(){return Hs}),n.d(t,"PostSavedState",function(){return zs}),n.d(t,"PostSchedule",function(){return Ss}),n.d(t,"PostScheduleCheck",function(){return Ws}),n.d(t,"PostScheduleLabel",function(){return Cs}),n.d(t,"PostSticky",function(){return Gs}),n.d(t,"PostStickyCheck",function(){return qs}),n.d(t,"PostSwitchToDraftButton",function(){return Vs}),n.d(t,"PostTaxonomies",function(){return Xs}),n.d(t,"PostTaxonomiesCheck",function(){return Zs}),n.d(t,"PostTextEditor",function(){return el}),n.d(t,"PostTitle",function(){return ll}),n.d(t,"PostTrash",function(){return ul}),n.d(t,"PostTrashCheck",function(){return dl}),n.d(t,"PostTypeSupportCheck",function(){return Na}),n.d(t,"PostVisibility",function(){return _s}),n.d(t,"PostVisibilityLabel",function(){return Es}),n.d(t,"PostVisibilityCheck",function(){return pl}),n.d(t,"TableOfContents",function(){return ml}),n.d(t,"UnsavedChangesWarning",function(){return Ol}),n.d(t,"WordCount",function(){return fl}),n.d(t,"BlockInspector",function(){return Sl}),n.d(t,"BlockList",function(){return nc}),n.d(t,"BlockMover",function(){return Qo}),n.d(t,"BlockSelectionClearer",function(){return wl}),n.d(t,"BlockSettingsMenu",function(){return Vl}),n.d(t,"_BlockSettingsMenuFirstItem",function(){return Dl}),n.d(t,"_BlockSettingsMenuPluginsExtension",function(){return Hl}),n.d(t,"BlockTitle",function(){return fi}),n.d(t,"BlockToolbar",function(){return ql}),n.d(t,"CopyHandler",function(){return $l}),n.d(t,"DefaultBlockAppender",function(){return Ji}),n.d(t,"ErrorBoundary",function(){return Yl}),n.d(t,"Inserter",function(){return Di}),n.d(t,"MultiBlocksSwitcher",function(){return Wl}),n.d(t,"MultiSelectScrollIntoView",function(){return Xl}),n.d(t,"NavigableToolbar",function(){return ji}),n.d(t,"ObserveTyping",function(){return eu}),n.d(t,"PreserveScrollInReorder",function(){return nu}),n.d(t,"SkipToSelectedBlock",function(){return gl}),n.d(t,"Warning",function(){return ei}),n.d(t,"WritingFlow",function(){return cu}),n.d(t,"EditorProvider",function(){return Pu}),n.d(t,"blockAutocompleter",function(){return eo}),n.d(t,"userAutocompleter",function(){return to}),n.d(t,"getColorClassName",function(){return xo}),n.d(t,"getColorObjectByAttributeValues",function(){return Io}),n.d(t,"getColorObjectByColorValue",function(){return Bo}),n.d(t,"withColors",function(){return Ao}),n.d(t,"getFontSize",function(){return Ro}),n.d(t,"getFontSizeClass",function(){return Do}),n.d(t,"FontSizePicker",function(){return Fo}),n.d(t,"withFontSizes",function(){return Mo}),n.d(t,"mediaUpload",function(){return oa}),n.d(t,"cleanForSlug",function(){return ca})}]);
\ No newline at end of file
diff --git a/wp-includes/js/dist/rich-text.js b/wp-includes/js/dist/rich-text.js
index 66a6c08ad7..dee199e42d 100644
--- a/wp-includes/js/dist/rich-text.js
+++ b/wp-includes/js/dist/rich-text.js
@@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["richText"] =
/******/
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 308);
+/******/ return __webpack_require__(__webpack_require__.s = 307);
/******/ })
/************************************************************************/
/******/ ({
@@ -211,7 +211,7 @@ function _typeof(obj) {
/***/ }),
-/***/ 308:
+/***/ 307:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -456,10 +456,15 @@ function isFormatEqual(format1, format2) {
}
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/normalise-formats.js
+/**
+ * External dependencies
+ */
+
/**
* Internal dependencies
*/
+
/**
* Normalises formats: ensures subsequent equal formats have the same reference.
*
@@ -473,21 +478,20 @@ function normaliseFormats(_ref) {
text = _ref.text,
start = _ref.start,
end = _ref.end;
- var newFormats = formats.slice(0);
- newFormats.forEach(function (formatsAtIndex, index) {
- var lastFormatsAtIndex = newFormats[index - 1];
-
- if (lastFormatsAtIndex) {
- var newFormatsAtIndex = formatsAtIndex.slice(0);
- newFormatsAtIndex.forEach(function (format, formatIndex) {
- var lastFormat = lastFormatsAtIndex[formatIndex];
-
- if (isFormatEqual(format, lastFormat)) {
- newFormatsAtIndex[formatIndex] = lastFormat;
- }
+ var refs = [];
+ var newFormats = formats.map(function (formatsAtIndex) {
+ return formatsAtIndex.map(function (format) {
+ var equalRef = Object(external_lodash_["find"])(refs, function (ref) {
+ return isFormatEqual(ref, format);
});
- newFormats[index] = newFormatsAtIndex;
- }
+
+ if (equalRef) {
+ return equalRef;
+ }
+
+ refs.push(format);
+ return format;
+ });
});
return {
formats: newFormats,
@@ -2776,6 +2780,333 @@ function unregisterFormatType(name) {
return oldFormat;
}
+// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/get-line-index.js
+/**
+ * Internal dependencies
+ */
+
+/**
+ * Gets the currently selected line index, or the first line index if the
+ * selection spans over multiple items.
+ *
+ * @param {Object} value Value to get the line index from.
+ * @param {boolean} startIndex Optional index that should be contained by the
+ * line. Defaults to the selection start of the
+ * value.
+ *
+ * @return {?boolean} The line index. Undefined if not found.
+ */
+
+function getLineIndex(_ref) {
+ var start = _ref.start,
+ text = _ref.text;
+ var startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start;
+ var index = startIndex;
+
+ while (index--) {
+ if (text[index] === LINE_SEPARATOR) {
+ return index;
+ }
+ }
+}
+
+// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/indent-list-items.js
+/**
+ * Internal dependencies
+ */
+
+
+
+/**
+ * Gets the line index of the first previous list item with higher indentation.
+ *
+ * @param {Object} value Value to search.
+ * @param {number} lineIndex Line index of the list item to compare with.
+ *
+ * @return {boolean} The line index.
+ */
+
+function getTargetLevelLineIndex(_ref, lineIndex) {
+ var text = _ref.text,
+ formats = _ref.formats;
+ var startFormats = formats[lineIndex] || [];
+ var index = lineIndex;
+
+ while (index-- >= 0) {
+ if (text[index] !== LINE_SEPARATOR) {
+ continue;
+ }
+
+ var formatsAtIndex = formats[index] || []; // Return the first line index that is one level higher. If the level is
+ // lower or equal, there is no result.
+
+ if (formatsAtIndex.length === startFormats.length + 1) {
+ return index;
+ } else if (formatsAtIndex.length <= startFormats.length) {
+ return;
+ }
+ }
+}
+/**
+ * Indents any selected list items if possible.
+ *
+ * @param {Object} value Value to change.
+ * @param {Object} rootFormat
+ *
+ * @return {Object} The changed value.
+ */
+
+
+function indentListItems(value, rootFormat) {
+ var lineIndex = getLineIndex(value); // There is only one line, so the line cannot be indented.
+
+ if (lineIndex === undefined) {
+ return value;
+ }
+
+ var text = value.text,
+ formats = value.formats,
+ start = value.start,
+ end = value.end;
+ var previousLineIndex = getLineIndex(value, lineIndex);
+ var formatsAtLineIndex = formats[lineIndex] || [];
+ var formatsAtPreviousLineIndex = formats[previousLineIndex] || []; // The the indentation of the current line is greater than previous line,
+ // then the line cannot be furter indented.
+
+ if (formatsAtLineIndex.length > formatsAtPreviousLineIndex.length) {
+ return value;
+ }
+
+ var newFormats = formats.slice();
+ var targetLevelLineIndex = getTargetLevelLineIndex(value, lineIndex);
+
+ for (var index = lineIndex; index < end; index++) {
+ if (text[index] !== LINE_SEPARATOR) {
+ continue;
+ } // Get the previous list, and if there's a child list, take over the
+ // formats. If not, duplicate the last level and create a new level.
+
+
+ if (targetLevelLineIndex) {
+ var targetFormats = formats[targetLevelLineIndex] || [];
+ newFormats[index] = targetFormats.concat((newFormats[index] || []).slice(targetFormats.length - 1));
+ } else {
+ var _targetFormats = formats[previousLineIndex] || [];
+
+ var lastformat = _targetFormats[_targetFormats.length - 1] || rootFormat;
+ newFormats[index] = _targetFormats.concat([lastformat], (newFormats[index] || []).slice(_targetFormats.length));
+ }
+ }
+
+ return normaliseFormats({
+ text: text,
+ formats: newFormats,
+ start: start,
+ end: end
+ });
+}
+
+// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/get-parent-line-index.js
+/**
+ * Internal dependencies
+ */
+
+/**
+ * Gets the index of the first parent list. To get the parent list formats, we
+ * go through every list item until we find one with exactly one format type
+ * less.
+ *
+ * @param {Object} value Value to search.
+ * @param {number} lineIndex Line index of a child list item.
+ *
+ * @return {Array} The parent list line index.
+ */
+
+function getParentLineIndex(_ref, lineIndex) {
+ var text = _ref.text,
+ formats = _ref.formats;
+ var startFormats = formats[lineIndex] || [];
+ var index = lineIndex;
+
+ while (index-- >= 0) {
+ if (text[index] !== LINE_SEPARATOR) {
+ continue;
+ }
+
+ var formatsAtIndex = formats[index] || [];
+
+ if (formatsAtIndex.length === startFormats.length - 1) {
+ return index;
+ }
+ }
+}
+
+// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/get-last-child-index.js
+/**
+ * Internal dependencies
+ */
+
+/**
+ * Gets the line index of the last child in the list.
+ *
+ * @param {Object} value Value to search.
+ * @param {number} lineIndex Line index of a list item in the list.
+ *
+ * @return {Array} The index of the last child.
+ */
+
+function getLastChildIndex(_ref, lineIndex) {
+ var text = _ref.text,
+ formats = _ref.formats;
+ var lineFormats = formats[lineIndex] || []; // Use the given line index in case there are no next children.
+
+ var childIndex = lineIndex; // `lineIndex` could be `undefined` if it's the first line.
+
+ for (var index = lineIndex || 0; index < text.length; index++) {
+ // We're only interested in line indices.
+ if (text[index] !== LINE_SEPARATOR) {
+ continue;
+ }
+
+ var formatsAtIndex = formats[index] || []; // If the amout of formats is equal or more, store it, then return the
+ // last one if the amount of formats is less.
+
+ if (formatsAtIndex.length >= lineFormats.length) {
+ childIndex = index;
+ } else {
+ return childIndex;
+ }
+ } // If the end of the text is reached, return the last child index.
+
+
+ return childIndex;
+}
+
+// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/outdent-list-items.js
+/**
+ * Internal dependencies
+ */
+
+
+
+
+
+/**
+ * Outdents any selected list items if possible.
+ *
+ * @param {Object} value Value to change.
+ *
+ * @return {Object} The changed value.
+ */
+
+function outdentListItems(value) {
+ var text = value.text,
+ formats = value.formats,
+ start = value.start,
+ end = value.end;
+ var startingLineIndex = getLineIndex(value, start); // Return early if the starting line index cannot be further outdented.
+
+ if (formats[startingLineIndex] === undefined) {
+ return value;
+ }
+
+ var newFormats = formats.slice(0);
+ var parentFormats = formats[getParentLineIndex(value, startingLineIndex)] || [];
+ var endingLineIndex = getLineIndex(value, end);
+ var lastChildIndex = getLastChildIndex(value, endingLineIndex); // Outdent all list items from the starting line index until the last child
+ // index of the ending list. All children of the ending list need to be
+ // outdented, otherwise they'll be orphaned.
+
+ for (var index = startingLineIndex; index <= lastChildIndex; index++) {
+ // Skip indices that are not line separators.
+ if (text[index] !== LINE_SEPARATOR) {
+ continue;
+ } // In the case of level 0, the formats at the index are undefined.
+
+
+ var currentFormats = newFormats[index] || []; // Omit the indentation level where the selection starts.
+
+ newFormats[index] = parentFormats.concat(currentFormats.slice(parentFormats.length + 1));
+
+ if (newFormats[index].length === 0) {
+ delete newFormats[index];
+ }
+ }
+
+ return normaliseFormats({
+ text: text,
+ formats: newFormats,
+ start: start,
+ end: end
+ });
+}
+
+// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/change-list-type.js
+/**
+ * Internal dependencies
+ */
+
+
+
+
+/**
+ * Changes the list type of the selected indented list, if any. Looks at the
+ * currently selected list item and takes the parent list, then changes the list
+ * type of this list. When multiple lines are selected, the parent lists are
+ * takes and changed.
+ *
+ * @param {Object} value Value to change.
+ * @param {Object} newFormat The new list format object. Choose between
+ * `{ type: 'ol' }` and `{ type: 'ul' }`.
+ *
+ * @return {Object} The changed value.
+ */
+
+function changeListType(value, newFormat) {
+ var text = value.text,
+ formats = value.formats,
+ start = value.start,
+ end = value.end;
+ var startingLineIndex = getLineIndex(value, start);
+ var startLineFormats = formats[startingLineIndex] || [];
+ var endLineFormats = formats[getLineIndex(value, end)] || [];
+ var startIndex = getParentLineIndex(value, startingLineIndex);
+ var newFormats = formats.slice(0);
+ var startCount = startLineFormats.length - 1;
+ var endCount = endLineFormats.length - 1;
+ var changed;
+
+ for (var index = startIndex + 1 || 0; index < text.length; index++) {
+ if (text[index] !== LINE_SEPARATOR) {
+ continue;
+ }
+
+ if ((newFormats[index] || []).length <= startCount) {
+ break;
+ }
+
+ if (!newFormats[index]) {
+ continue;
+ }
+
+ changed = true;
+ newFormats[index] = newFormats[index].map(function (format, i) {
+ return i < startCount || i > endCount ? format : newFormat;
+ });
+ }
+
+ if (!changed) {
+ return value;
+ }
+
+ return normaliseFormats({
+ text: text,
+ formats: newFormats,
+ start: start,
+ end: end
+ });
+}
+
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/index.js
/* concated harmony reexport applyFormat */__webpack_require__.d(__webpack_exports__, "applyFormat", function() { return applyFormat; });
/* concated harmony reexport charAt */__webpack_require__.d(__webpack_exports__, "charAt", function() { return charAt; });
@@ -2804,6 +3135,12 @@ function unregisterFormatType(name) {
/* concated harmony reexport toggleFormat */__webpack_require__.d(__webpack_exports__, "toggleFormat", function() { return toggleFormat; });
/* concated harmony reexport LINE_SEPARATOR */__webpack_require__.d(__webpack_exports__, "LINE_SEPARATOR", function() { return LINE_SEPARATOR; });
/* concated harmony reexport unregisterFormatType */__webpack_require__.d(__webpack_exports__, "unregisterFormatType", function() { return unregisterFormatType; });
+/* concated harmony reexport indentListItems */__webpack_require__.d(__webpack_exports__, "indentListItems", function() { return indentListItems; });
+/* concated harmony reexport outdentListItems */__webpack_require__.d(__webpack_exports__, "outdentListItems", function() { return outdentListItems; });
+/* concated harmony reexport changeListType */__webpack_require__.d(__webpack_exports__, "changeListType", function() { return changeListType; });
+
+
+
diff --git a/wp-includes/js/dist/rich-text.min.js b/wp-includes/js/dist/rich-text.min.js
index be3eb60d7e..57f7347e60 100644
--- a/wp-includes/js/dist/rich-text.min.js
+++ b/wp-includes/js/dist/rich-text.min.js
@@ -1 +1 @@
-this.wp=this.wp||{},this.wp.richText=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=308)}({0:function(e,t){!function(){e.exports=this.wp.element}()},15:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",function(){return n})},18:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return Object(i.a)({},e,Object(c.keyBy)(t.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(c.omit)(e,t.names)}return e}}),l=r(31),s=Object(l.a)(function(e){return Object.values(e.formatTypes)},function(e){return[e.formatTypes]});function f(e,t){return e.formatTypes[t]}function d(e,t){return Object(c.find)(s(e),function(e){var r=e.tagName;return t===r})}function p(e,t){return Object(c.find)(s(e),function(e){var r=e.className;return null!==r&&" ".concat(t," ").indexOf(" ".concat(r," "))>=0})}function m(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Object(c.castArray)(e)}}function v(e){return{type:"REMOVE_FORMAT_TYPES",names:Object(c.castArray)(e)}}function g(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;var r=e.attributes,n=t.attributes;if(r===n)return!0;if(!r||!n)return!1;var a=Object.keys(r),o=Object.keys(n);if(a.length!==o.length)return!1;for(var i=a.length,c=0;c2&&void 0!==arguments[2]?arguments[2]:a,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o,l=r.slice(0);if(i===u){var s=Object(c.find)(l[i],{type:t.type});if(!s){var f=l[i-1]||[];return{formats:r,text:n,start:a,end:o,formatPlaceholder:{index:i,format:Object(c.find)(f,{type:t.type})?void 0:t}}}for(;Object(c.find)(l[i],s);)y(l,i,t),i--;for(u++;Object(c.find)(l[u],s);)y(l,u,t),u++}else for(var d=i;d0&&void 0!==arguments[0]?arguments[0]:{},t=e.element,r=e.text,n=e.html,a=e.range,o=e.multilineTag,i=e.multilineWrapperTags,c=e.removeNode,u=e.unwrapNode,l=e.filterString,s=e.removeAttribute;return"string"==typeof r&&r.length>0?{formats:Array(r.length),text:r}:("string"==typeof n&&n.length>0&&(t=S(document,n)),"object"!==Object(j.a)(t)?{formats:[],text:""}:o?V({element:t,range:a,multilineTag:o,multilineWrapperTags:i,removeNode:c,unwrapNode:u,filterString:l,removeAttribute:s}):k({element:t,range:a,removeNode:c,unwrapNode:u,filterString:l,removeAttribute:s}))}function I(e,t,r,n){if(r){var a=t.parentNode,o=r.startContainer,i=r.startOffset,c=r.endContainer,u=r.endOffset,l=e.text.length;void 0!==n.start?e.start=l+n.start:t===o&&t.nodeType===A?e.start=l+i:a===o&&t===o.childNodes[i]?e.start=l:a===o&&t===o.childNodes[i-1]?e.start=l+n.text.length:t===o&&(e.start=l),void 0!==n.end?e.end=l+n.end:t===c&&t.nodeType===A?e.end=l+u:a===c&&t===c.childNodes[u-1]?e.end=l+n.text.length:a===c&&t===c.childNodes[u]?e.end=l:t===c&&(e.end=l+u)}}function M(e,t,r){if(t){var n=t.startContainer,a=t.endContainer,o=t.startOffset,i=t.endOffset;return e===n&&(o=r(e.nodeValue.slice(0,o)).length),e===a&&(i=r(e.nodeValue.slice(0,i)).length),{startContainer:n,startOffset:o,endContainer:a,endOffset:i}}}function k(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,o=e.currentWrapperTags,i=void 0===o?[]:o,c=e.removeNode,u=e.unwrapNode,l=e.filterString,s=e.removeAttribute,f={formats:[],text:""};if(!t)return f;if(!t.hasChildNodes())return I(f,t,r,{formats:[],text:""}),f;for(var d=t.childNodes.length,p=function(e){return e=e.replace(/[\n\r\t]+/g," "),l&&(e=l(e)),e},m=0;m0){var b=s.length>0?[s]:[,];f.formats=f.formats.concat(b),f.text+=w}I(f,m,r,v),f.formats=f.formats.concat(v.formats),f.text+=v.text}}return f}function R(e){var t=e.element,r=e.removeAttribute;if(t.hasAttributes()){for(var n,a=t.attributes.length,o=0;o1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof t&&(t=L({text:t})),h(e.reduce(function(e,r){var n=r.formats,a=r.text;return{text:e.text+t.text+a,formats:e.formats.concat(t.formats,n)}}))}var $=r(15),U=r(18),X=r(0),Z=r(41),K=r.n(Z),J=r(23),Q=r(7),ee=[];function te(e,t){if("string"==typeof(t=Object(i.a)({name:e},t)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if(Object(o.select)("core/rich-text").getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){var r=Object(o.select)("core/rich-text").getFormatTypeForBareElement(t.tagName);if(r)return void window.console.error('Format "'.concat(r.name,'" is already registered to handle bare tag name "').concat(t.tagName,'".'))}else{var n=Object(o.select)("core/rich-text").getFormatTypeForClassName(t.className);if(n)return void window.console.error('Format "'.concat(n.name,'" is already registered to handle class name "').concat(t.className,'".'))}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title){Object(o.dispatch)("core/rich-text").addFormatTypes(t);var a=K()(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,t=arguments.length>1?arguments[1]:void 0;return Object(O.a)(e).concat([t])});return t.__experimentalGetPropsForEditableTreePreparation&&Object(J.addFilter)("experimentalRichText",e,function(r){var n=r;(t.__experimentalCreatePrepareEditableTree||t.__experimentalCreateFormatToValue||t.__experimentalCreateValueToFormat)&&(n=function(n){var o={};if(t.__experimentalCreatePrepareEditableTree&&(o.prepareEditableTree=a(n.prepareEditableTree,t.__experimentalCreatePrepareEditableTree(n["format_".concat(e)],{richTextIdentifier:n.identifier,blockClientId:n.clientId}))),t.__experimentalCreateOnChangeEditableValue){var c=Object.keys(n).reduce(function(t,r){var a=n[r],o="format_".concat(e,"_dispatch_");r.startsWith(o)&&(t[r.replace(o,"")]=a);return t},{});o.onChangeEditableValue=a(n.onChangeEditableValue,t.__experimentalCreateOnChangeEditableValue(Object(i.a)({},n["format_".concat(e)],c),{richTextIdentifier:n.identifier,blockClientId:n.clientId}))}return Object(X.createElement)(r,Object(U.a)({},n,o))});var u=[Object(o.withSelect)(function(r,n){var a=n.clientId,o=n.identifier;return Object($.a)({},"format_".concat(e),t.__experimentalGetPropsForEditableTreePreparation(r,{richTextIdentifier:o,blockClientId:a}))})];return t.__experimentalGetPropsForEditableTreeChangeHandler&&u.push(Object(o.withDispatch)(function(r,n){var a=n.clientId,o=n.identifier,i=t.__experimentalGetPropsForEditableTreeChangeHandler(r,{richTextIdentifier:o,blockClientId:a});return Object(c.mapKeys)(i,function(t,r){return"format_".concat(e,"_dispatch_").concat(r)})})),Object(Q.compose)(u)(n)}),t}window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function re(e,t){var r=e.formats,n=e.text,a=e.start,o=e.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o,l=r.slice(0);if(i===u){for(var s=Object(c.find)(l[i],{type:t});Object(c.find)(l[i],s);)ne(l,i,t),i--;for(u++;Object(c.find)(l[u],s);)ne(l,u,t),u++}else for(var f=i;f2&&void 0!==arguments[2]?arguments[2]:a,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;"string"==typeof t&&(t=L({text:t}));var u=i+t.text.length;return h({formats:r.slice(0,i).concat(t.formats,r.slice(c)),text:n.slice(0,i)+t.text+n.slice(c),start:u,end:u})}function oe(e,t,r){return ae(e,L(),t,r)}function ie(e,t,r){var n=e.formats,a=e.text,o=e.start,i=e.end;return a=a.replace(t,function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),c=1;c1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=G(e).slice(0,t).lastIndexOf(w),a=e.formats[n],o=[,];return a&&(o=[a]),ae(e,{formats:o,text:w},t,r)}var ue="";function le(e,t,r,n){return ae(e,{text:ue,formats:[[Object(i.a)({},t,{object:!0})]]},r,n)}function se(e){var t=e.formats,r=e.text,n=e.start,a=e.end,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;return void 0===o||void 0===i?{formats:t,text:r}:{formats:t.slice(o,i),text:r.slice(o,i)}}function fe(e,t){var r=e.formats,n=e.text,a=e.start,o=e.end;if("string"!=typeof t)return function(e){var t=e.formats,r=e.text,n=e.start,a=e.end,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,c={formats:t.slice(0,o),text:r.slice(0,o)},u={formats:t.slice(i),text:r.slice(i),start:0,end:0};return[ie(c,/\u2028+$/,""),ie(u,/^\u2028+/,"")]}.apply(void 0,arguments);var i=0;return n.split(t).map(function(e){var n=i,c={formats:r.slice(n,n+e.length),text:e};return i+=t.length+e.length,void 0!==a&&void 0!==o&&(a>=n&&an&&(c.start=0),o>=n&&oi&&(c.end=e.length)),c})}function de(e){var t=e.type,r=e.attributes,n=e.unregisteredAttributes,a=e.object,c=function(e){return Object(o.select)("core/rich-text").getFormatType(e)}(t);if(!c)return{type:t,attributes:r,object:a};var u=Object(i.a)({},n);for(var l in r){var s=c.attributes[l];s?u[s]=r[l]:u[l]=r[l]}return c.className&&(u.class?u.class="".concat(c.className," ").concat(u.class):u.class=c.className),{type:c.tagName,object:c.object,attributes:u}}function pe(e){var t,r,n,a=e.value,o=e.multilineTag,i=e.multilineWrapperTags,c=void 0===i?[]:i,u=e.createEmpty,l=e.append,s=e.getLastChild,f=e.getParent,d=e.isText,p=e.getText,m=e.remove,v=e.appendText,g=e.onStartIndex,h=e.onEndIndex,b=e.isEditableTree,y=a.formats,x=a.text,T=a.start,j=a.end,_=a.formatPlaceholder,C=y.length+1,S=u(),F={type:o};function A(e,t){if(b&&_&&_.index===t){var r=f(e);e=void 0===_.format?f(r):l(r,de(_.format)),e=l(e,E)}return e}o?(l(l(S,{type:o}),""),r=t=[F]):l(S,"");for(var P=function(e){var a=x.charAt(e),i=y[e];o&&(i=a===w?t=(i||[]).reduce(function(e,t){return a===w&&-1!==c.indexOf(t.type)&&(e.push(t),e.push(F)),e},[F]):Object(O.a)(t).concat(Object(O.a)(i||[])));var u=s(S);if(n===w){for(var b=u;!d(b);)b=s(b);g&&T===e&&g(S,b),h&&j===e&&h(S,b)}if(i&&i.forEach(function(e,t){if(!u||!r||e!==r[t]||a===w&&i.length-1===t){var n=f(u),o=l(n,de(e));d(u)&&0===p(u).length&&m(u),u=l(e.object?n:o,"")}else u=s(u)}),a===w)return r=i,n=a,"continue";u=A(u,0),0===e&&(g&&0===T&&g(S,u),h&&0===j&&h(S,u)),a!==N&&("\n"===a?(u=l(f(u),{type:"br",object:!0}),u=l(f(u),"")):d(u)?v(u,a):u=l(f(u),a)),u=A(u,e+1),g&&T===e+1&&g(S,u),h&&j===e+1&&h(S,u),r=i,n=a},D=0;D1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}var ye=function(){return S(document,"")};function xe(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));var r=t,n=r.type,a=r.attributes;if(n)for(var o in t=e.ownerDocument.createElement(n),a)t.setAttribute(o,a[o]);return e.appendChild(t)}function Te(e,t){e.appendData(t)}function Oe(e){return e.lastChild}function je(e){return e.parentNode}function we(e){return e.nodeType===ve}function Ne(e){return e.nodeValue}function Ee(e){return e.parentNode.removeChild(e)}function _e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.reduce(function(e,r){return r(e,t.text)},t.formats)}function Ce(e){var t=e.value,r=e.multilineTag,n=e.multilineWrapperTags,a=e.createLinePadding,o=e.prepareEditableTree,c=[],u=[],l=pe({value:Object(i.a)({},t,{formats:_e(o,t)}),multilineTag:r,multilineWrapperTags:n,createEmpty:ye,append:xe,getLastChild:Oe,getParent:je,isText:we,getText:Ne,remove:Ee,appendText:Te,onStartIndex:function(e,t){c=he(t,e,[t.nodeValue.length])},onEndIndex:function(e,t){u=he(t,e,[t.nodeValue.length])},isEditableTree:!0});return a&&function e(t){for(var r=t.element,n=t.createLinePadding,a=t.multilineWrapperTags,o=r.childNodes.length,i=r.ownerDocument,c=0;c0){if(f=l,d=u.getRangeAt(0),f.startContainer===d.startContainer&&f.startOffset===d.startOffset&&f.endContainer===d.endContainer&&f.endOffset===d.endOffset)return;u.removeAllRanges()}var f,d;u.addRange(l)}(o,r)}var Fe=r(61);function Ae(e){return Re(pe({value:e.value,multilineTag:e.multilineTag,multilineWrapperTags:e.multilineWrapperTags,createEmpty:Pe,append:We,getLastChild:De,getParent:Ie,isText:Me,getText:ke,remove:Ve,appendText:Le}).children)}function Pe(){return{}}function De(e){var t=e.children;return t&&t[t.length-1]}function We(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function Le(e,t){e.text+=t}function Ie(e){return e.parent}function Me(e){return"string"==typeof e.text}function ke(e){return e.text}function Ve(e){var t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function Re(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return void 0===e.text?function(e){var t=e.type,r=e.attributes,n=e.object,a=e.children,o="";for(var i in r)Object(Fe.isValidAttributeName)(i)&&(o+=" ".concat(i,'="').concat(Object(Fe.escapeAttribute)(r[i]),'"'));return n?"<".concat(t).concat(o,">"):"<".concat(t).concat(o,">").concat(Re(a),"").concat(t,">")}(e):Object(Fe.escapeHTML)(e.text)}).join("")}function ze(e,t){return z(e,t.type)?re(e,t.type):b(e,t)}function Be(e){var t=Object(o.select)("core/rich-text").getFormatType(e);if(t)return t.__experimentalCreatePrepareEditableTree&&t.__experimentalGetPropsForEditableTreePreparation&&Object(J.removeFilter)("experimentalRichText",e),Object(o.dispatch)("core/rich-text").removeFormatTypes(e),t;window.console.error("Format ".concat(e," is not registered."))}r.d(t,"applyFormat",function(){return b}),r.d(t,"charAt",function(){return x}),r.d(t,"concat",function(){return T}),r.d(t,"create",function(){return L}),r.d(t,"getActiveFormat",function(){return z}),r.d(t,"getSelectionEnd",function(){return B}),r.d(t,"getSelectionStart",function(){return H}),r.d(t,"getTextContent",function(){return G}),r.d(t,"isCollapsed",function(){return Y}),r.d(t,"isEmpty",function(){return _}),r.d(t,"isEmptyLine",function(){return C}),r.d(t,"join",function(){return q}),r.d(t,"registerFormatType",function(){return te}),r.d(t,"removeFormat",function(){return re}),r.d(t,"remove",function(){return oe}),r.d(t,"replace",function(){return ie}),r.d(t,"insert",function(){return ae}),r.d(t,"insertLineSeparator",function(){return ce}),r.d(t,"insertObject",function(){return le}),r.d(t,"slice",function(){return se}),r.d(t,"split",function(){return fe}),r.d(t,"apply",function(){return Se}),r.d(t,"unstableToDom",function(){return Ce}),r.d(t,"toHTMLString",function(){return Ae}),r.d(t,"toggleFormat",function(){return ze}),r.d(t,"LINE_SEPARATOR",function(){return w}),r.d(t,"unregisterFormatType",function(){return Be})},31:function(e,t,r){"use strict";var n,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function c(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return Object(i.a)({},e,Object(c.keyBy)(t.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(c.omit)(e,t.names)}return e}}),l=r(31),s=Object(l.a)(function(e){return Object.values(e.formatTypes)},function(e){return[e.formatTypes]});function f(e,t){return e.formatTypes[t]}function d(e,t){return Object(c.find)(s(e),function(e){var r=e.tagName;return t===r})}function p(e,t){return Object(c.find)(s(e),function(e){var r=e.className;return null!==r&&" ".concat(t," ").indexOf(" ".concat(r," "))>=0})}function m(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Object(c.castArray)(e)}}function v(e){return{type:"REMOVE_FORMAT_TYPES",names:Object(c.castArray)(e)}}function g(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;var r=e.attributes,n=t.attributes;if(r===n)return!0;if(!r||!n)return!1;var a=Object.keys(r),o=Object.keys(n);if(a.length!==o.length)return!1;for(var i=a.length,c=0;c2&&void 0!==arguments[2]?arguments[2]:a,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o,l=r.slice(0);if(i===u){var s=Object(c.find)(l[i],{type:t.type});if(!s){var f=l[i-1]||[];return{formats:r,text:n,start:a,end:o,formatPlaceholder:{index:i,format:Object(c.find)(f,{type:t.type})?void 0:t}}}for(;Object(c.find)(l[i],s);)y(l,i,t),i--;for(u++;Object(c.find)(l[u],s);)y(l,u,t),u++}else for(var d=i;d0&&void 0!==arguments[0]?arguments[0]:{},t=e.element,r=e.text,n=e.html,a=e.range,o=e.multilineTag,i=e.multilineWrapperTags,c=e.removeNode,u=e.unwrapNode,l=e.filterString,s=e.removeAttribute;return"string"==typeof r&&r.length>0?{formats:Array(r.length),text:r}:("string"==typeof n&&n.length>0&&(t=S(document,n)),"object"!==Object(j.a)(t)?{formats:[],text:""}:o?V({element:t,range:a,multilineTag:o,multilineWrapperTags:i,removeNode:c,unwrapNode:u,filterString:l,removeAttribute:s}):k({element:t,range:a,removeNode:c,unwrapNode:u,filterString:l,removeAttribute:s}))}function I(e,t,r,n){if(r){var a=t.parentNode,o=r.startContainer,i=r.startOffset,c=r.endContainer,u=r.endOffset,l=e.text.length;void 0!==n.start?e.start=l+n.start:t===o&&t.nodeType===A?e.start=l+i:a===o&&t===o.childNodes[i]?e.start=l:a===o&&t===o.childNodes[i-1]?e.start=l+n.text.length:t===o&&(e.start=l),void 0!==n.end?e.end=l+n.end:t===c&&t.nodeType===A?e.end=l+u:a===c&&t===c.childNodes[u-1]?e.end=l+n.text.length:a===c&&t===c.childNodes[u]?e.end=l:t===c&&(e.end=l+u)}}function M(e,t,r){if(t){var n=t.startContainer,a=t.endContainer,o=t.startOffset,i=t.endOffset;return e===n&&(o=r(e.nodeValue.slice(0,o)).length),e===a&&(i=r(e.nodeValue.slice(0,i)).length),{startContainer:n,startOffset:o,endContainer:a,endOffset:i}}}function k(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,o=e.currentWrapperTags,i=void 0===o?[]:o,c=e.removeNode,u=e.unwrapNode,l=e.filterString,s=e.removeAttribute,f={formats:[],text:""};if(!t)return f;if(!t.hasChildNodes())return I(f,t,r,{formats:[],text:""}),f;for(var d=t.childNodes.length,p=function(e){return e=e.replace(/[\n\r\t]+/g," "),l&&(e=l(e)),e},m=0;m0){var b=s.length>0?[s]:[,];f.formats=f.formats.concat(b),f.text+=w}I(f,m,r,v),f.formats=f.formats.concat(v.formats),f.text+=v.text}}return f}function R(e){var t=e.element,r=e.removeAttribute;if(t.hasAttributes()){for(var n,a=t.attributes.length,o=0;o1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof t&&(t=L({text:t})),h(e.reduce(function(e,r){var n=r.formats,a=r.text;return{text:e.text+t.text+a,formats:e.formats.concat(t.formats,n)}}))}var $=r(15),U=r(18),X=r(0),Z=r(41),K=r.n(Z),J=r(23),Q=r(7),ee=[];function te(e,t){if("string"==typeof(t=Object(i.a)({name:e},t)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if(Object(o.select)("core/rich-text").getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){var r=Object(o.select)("core/rich-text").getFormatTypeForBareElement(t.tagName);if(r)return void window.console.error('Format "'.concat(r.name,'" is already registered to handle bare tag name "').concat(t.tagName,'".'))}else{var n=Object(o.select)("core/rich-text").getFormatTypeForClassName(t.className);if(n)return void window.console.error('Format "'.concat(n.name,'" is already registered to handle class name "').concat(t.className,'".'))}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title){Object(o.dispatch)("core/rich-text").addFormatTypes(t);var a=K()(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,t=arguments.length>1?arguments[1]:void 0;return Object(O.a)(e).concat([t])});return t.__experimentalGetPropsForEditableTreePreparation&&Object(J.addFilter)("experimentalRichText",e,function(r){var n=r;(t.__experimentalCreatePrepareEditableTree||t.__experimentalCreateFormatToValue||t.__experimentalCreateValueToFormat)&&(n=function(n){var o={};if(t.__experimentalCreatePrepareEditableTree&&(o.prepareEditableTree=a(n.prepareEditableTree,t.__experimentalCreatePrepareEditableTree(n["format_".concat(e)],{richTextIdentifier:n.identifier,blockClientId:n.clientId}))),t.__experimentalCreateOnChangeEditableValue){var c=Object.keys(n).reduce(function(t,r){var a=n[r],o="format_".concat(e,"_dispatch_");r.startsWith(o)&&(t[r.replace(o,"")]=a);return t},{});o.onChangeEditableValue=a(n.onChangeEditableValue,t.__experimentalCreateOnChangeEditableValue(Object(i.a)({},n["format_".concat(e)],c),{richTextIdentifier:n.identifier,blockClientId:n.clientId}))}return Object(X.createElement)(r,Object(U.a)({},n,o))});var u=[Object(o.withSelect)(function(r,n){var a=n.clientId,o=n.identifier;return Object($.a)({},"format_".concat(e),t.__experimentalGetPropsForEditableTreePreparation(r,{richTextIdentifier:o,blockClientId:a}))})];return t.__experimentalGetPropsForEditableTreeChangeHandler&&u.push(Object(o.withDispatch)(function(r,n){var a=n.clientId,o=n.identifier,i=t.__experimentalGetPropsForEditableTreeChangeHandler(r,{richTextIdentifier:o,blockClientId:a});return Object(c.mapKeys)(i,function(t,r){return"format_".concat(e,"_dispatch_").concat(r)})})),Object(Q.compose)(u)(n)}),t}window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function re(e,t){var r=e.formats,n=e.text,a=e.start,o=e.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o,l=r.slice(0);if(i===u){for(var s=Object(c.find)(l[i],{type:t});Object(c.find)(l[i],s);)ne(l,i,t),i--;for(u++;Object(c.find)(l[u],s);)ne(l,u,t),u++}else for(var f=i;f2&&void 0!==arguments[2]?arguments[2]:a,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;"string"==typeof t&&(t=L({text:t}));var u=i+t.text.length;return h({formats:r.slice(0,i).concat(t.formats,r.slice(c)),text:n.slice(0,i)+t.text+n.slice(c),start:u,end:u})}function oe(e,t,r){return ae(e,L(),t,r)}function ie(e,t,r){var n=e.formats,a=e.text,o=e.start,i=e.end;return a=a.replace(t,function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),c=1;c1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=G(e).slice(0,t).lastIndexOf(w),a=e.formats[n],o=[,];return a&&(o=[a]),ae(e,{formats:o,text:w},t,r)}var ue="";function le(e,t,r,n){return ae(e,{text:ue,formats:[[Object(i.a)({},t,{object:!0})]]},r,n)}function se(e){var t=e.formats,r=e.text,n=e.start,a=e.end,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;return void 0===o||void 0===i?{formats:t,text:r}:{formats:t.slice(o,i),text:r.slice(o,i)}}function fe(e,t){var r=e.formats,n=e.text,a=e.start,o=e.end;if("string"!=typeof t)return function(e){var t=e.formats,r=e.text,n=e.start,a=e.end,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,c={formats:t.slice(0,o),text:r.slice(0,o)},u={formats:t.slice(i),text:r.slice(i),start:0,end:0};return[ie(c,/\u2028+$/,""),ie(u,/^\u2028+/,"")]}.apply(void 0,arguments);var i=0;return n.split(t).map(function(e){var n=i,c={formats:r.slice(n,n+e.length),text:e};return i+=t.length+e.length,void 0!==a&&void 0!==o&&(a>=n&&an&&(c.start=0),o>=n&&oi&&(c.end=e.length)),c})}function de(e){var t=e.type,r=e.attributes,n=e.unregisteredAttributes,a=e.object,c=function(e){return Object(o.select)("core/rich-text").getFormatType(e)}(t);if(!c)return{type:t,attributes:r,object:a};var u=Object(i.a)({},n);for(var l in r){var s=c.attributes[l];s?u[s]=r[l]:u[l]=r[l]}return c.className&&(u.class?u.class="".concat(c.className," ").concat(u.class):u.class=c.className),{type:c.tagName,object:c.object,attributes:u}}function pe(e){var t,r,n,a=e.value,o=e.multilineTag,i=e.multilineWrapperTags,c=void 0===i?[]:i,u=e.createEmpty,l=e.append,s=e.getLastChild,f=e.getParent,d=e.isText,p=e.getText,m=e.remove,v=e.appendText,g=e.onStartIndex,h=e.onEndIndex,b=e.isEditableTree,y=a.formats,x=a.text,T=a.start,j=a.end,_=a.formatPlaceholder,C=y.length+1,S=u(),F={type:o};function A(e,t){if(b&&_&&_.index===t){var r=f(e);e=void 0===_.format?f(r):l(r,de(_.format)),e=l(e,E)}return e}o?(l(l(S,{type:o}),""),r=t=[F]):l(S,"");for(var P=function(e){var a=x.charAt(e),i=y[e];o&&(i=a===w?t=(i||[]).reduce(function(e,t){return a===w&&-1!==c.indexOf(t.type)&&(e.push(t),e.push(F)),e},[F]):Object(O.a)(t).concat(Object(O.a)(i||[])));var u=s(S);if(n===w){for(var b=u;!d(b);)b=s(b);g&&T===e&&g(S,b),h&&j===e&&h(S,b)}if(i&&i.forEach(function(e,t){if(!u||!r||e!==r[t]||a===w&&i.length-1===t){var n=f(u),o=l(n,de(e));d(u)&&0===p(u).length&&m(u),u=l(e.object?n:o,"")}else u=s(u)}),a===w)return r=i,n=a,"continue";u=A(u,0),0===e&&(g&&0===T&&g(S,u),h&&0===j&&h(S,u)),a!==N&&("\n"===a?(u=l(f(u),{type:"br",object:!0}),u=l(f(u),"")):d(u)?v(u,a):u=l(f(u),a)),u=A(u,e+1),g&&T===e+1&&g(S,u),h&&j===e+1&&h(S,u),r=i,n=a},D=0;D1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}var ye=function(){return S(document,"")};function xe(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));var r=t,n=r.type,a=r.attributes;if(n)for(var o in t=e.ownerDocument.createElement(n),a)t.setAttribute(o,a[o]);return e.appendChild(t)}function Te(e,t){e.appendData(t)}function Oe(e){return e.lastChild}function je(e){return e.parentNode}function we(e){return e.nodeType===ve}function Ne(e){return e.nodeValue}function Ee(e){return e.parentNode.removeChild(e)}function _e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.reduce(function(e,r){return r(e,t.text)},t.formats)}function Ce(e){var t=e.value,r=e.multilineTag,n=e.multilineWrapperTags,a=e.createLinePadding,o=e.prepareEditableTree,c=[],u=[],l=pe({value:Object(i.a)({},t,{formats:_e(o,t)}),multilineTag:r,multilineWrapperTags:n,createEmpty:ye,append:xe,getLastChild:Oe,getParent:je,isText:we,getText:Ne,remove:Ee,appendText:Te,onStartIndex:function(e,t){c=he(t,e,[t.nodeValue.length])},onEndIndex:function(e,t){u=he(t,e,[t.nodeValue.length])},isEditableTree:!0});return a&&function e(t){for(var r=t.element,n=t.createLinePadding,a=t.multilineWrapperTags,o=r.childNodes.length,i=r.ownerDocument,c=0;c0){if(f=l,d=u.getRangeAt(0),f.startContainer===d.startContainer&&f.startOffset===d.startOffset&&f.endContainer===d.endContainer&&f.endOffset===d.endOffset)return;u.removeAllRanges()}var f,d;u.addRange(l)}(o,r)}var Fe=r(61);function Ae(e){return Re(pe({value:e.value,multilineTag:e.multilineTag,multilineWrapperTags:e.multilineWrapperTags,createEmpty:Pe,append:We,getLastChild:De,getParent:Ie,isText:Me,getText:ke,remove:Ve,appendText:Le}).children)}function Pe(){return{}}function De(e){var t=e.children;return t&&t[t.length-1]}function We(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function Le(e,t){e.text+=t}function Ie(e){return e.parent}function Me(e){return"string"==typeof e.text}function ke(e){return e.text}function Ve(e){var t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function Re(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return void 0===e.text?function(e){var t=e.type,r=e.attributes,n=e.object,a=e.children,o="";for(var i in r)Object(Fe.isValidAttributeName)(i)&&(o+=" ".concat(i,'="').concat(Object(Fe.escapeAttribute)(r[i]),'"'));return n?"<".concat(t).concat(o,">"):"<".concat(t).concat(o,">").concat(Re(a),"").concat(t,">")}(e):Object(Fe.escapeHTML)(e.text)}).join("")}function ze(e,t){return z(e,t.type)?re(e,t.type):b(e,t)}function Be(e){var t=Object(o.select)("core/rich-text").getFormatType(e);if(t)return t.__experimentalCreatePrepareEditableTree&&t.__experimentalGetPropsForEditableTreePreparation&&Object(J.removeFilter)("experimentalRichText",e),Object(o.dispatch)("core/rich-text").removeFormatTypes(e),t;window.console.error("Format ".concat(e," is not registered."))}function He(e){for(var t=e.start,r=e.text,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;n--;)if(r[n]===w)return n}function Ge(e,t){var r=He(e);if(void 0===r)return e;var n=e.text,a=e.formats,o=e.start,i=e.end,c=He(e,r),u=a[r]||[],l=a[c]||[];if(u.length>l.length)return e;for(var s=a.slice(),f=function(e,t){for(var r=e.text,n=e.formats,a=n[t]||[],o=t;o-- >=0;)if(r[o]===w){var i=n[o]||[];if(i.length===a.length+1)return o;if(i.length<=a.length)return}}(e,r),d=r;d=0;){if(r[o]===w)if((n[o]||[]).length===a.length-1)return o}}function qe(e){var t=e.text,r=e.formats,n=e.start,a=e.end,o=He(e,n);if(void 0===r[o])return e;for(var i=r.slice(0),c=r[Ye(e,o)]||[],u=function(e,t){for(var r=e.text,n=e.formats,a=n[t]||[],o=t,i=t||0;i=a.length))return o;o=i}return o}(e,He(e,a)),l=o;l<=u;l++)if(t[l]===w){var s=i[l]||[];i[l]=c.concat(s.slice(c.length+1)),0===i[l].length&&delete i[l]}return h({text:t,formats:i,start:n,end:a})}function $e(e,t){for(var r,n=e.text,a=e.formats,o=e.start,i=e.end,c=He(e,o),u=a[c]||[],l=a[He(e,i)]||[],s=Ye(e,c),f=a.slice(0),d=u.length-1,p=l.length-1,m=s+1||0;mp?e:t}))}return r?h({text:n,formats:f,start:o,end:i}):e}r.d(t,"applyFormat",function(){return b}),r.d(t,"charAt",function(){return x}),r.d(t,"concat",function(){return T}),r.d(t,"create",function(){return L}),r.d(t,"getActiveFormat",function(){return z}),r.d(t,"getSelectionEnd",function(){return B}),r.d(t,"getSelectionStart",function(){return H}),r.d(t,"getTextContent",function(){return G}),r.d(t,"isCollapsed",function(){return Y}),r.d(t,"isEmpty",function(){return _}),r.d(t,"isEmptyLine",function(){return C}),r.d(t,"join",function(){return q}),r.d(t,"registerFormatType",function(){return te}),r.d(t,"removeFormat",function(){return re}),r.d(t,"remove",function(){return oe}),r.d(t,"replace",function(){return ie}),r.d(t,"insert",function(){return ae}),r.d(t,"insertLineSeparator",function(){return ce}),r.d(t,"insertObject",function(){return le}),r.d(t,"slice",function(){return se}),r.d(t,"split",function(){return fe}),r.d(t,"apply",function(){return Se}),r.d(t,"unstableToDom",function(){return Ce}),r.d(t,"toHTMLString",function(){return Ae}),r.d(t,"toggleFormat",function(){return ze}),r.d(t,"LINE_SEPARATOR",function(){return w}),r.d(t,"unregisterFormatType",function(){return Be}),r.d(t,"indentListItems",function(){return Ge}),r.d(t,"outdentListItems",function(){return qe}),r.d(t,"changeListType",function(){return $e})},31:function(e,t,r){"use strict";var n,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function c(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n '2.2.8',
'a11y' => '2.0.2',
- 'annotations' => '1.0.6',
+ 'annotations' => '1.0.8',
'autop' => '2.0.2',
'blob' => '2.1.0',
- 'block-library' => '2.2.13',
+ 'block-library' => '2.2.15',
'block-serialization-default-parser' => '2.0.4',
'blocks' => '6.0.5',
- 'components' => '7.0.6',
+ 'components' => '7.0.8',
'compose' => '3.0.1',
'core-data' => '2.0.17',
'data' => '4.2.1',
@@ -240,22 +240,22 @@ function wp_default_packages_scripts( &$scripts ) {
'deprecated' => '2.0.5',
'dom' => '2.0.8',
'dom-ready' => '2.0.2',
- 'edit-post' => '3.1.8',
- 'editor' => '9.0.8',
+ 'edit-post' => '3.1.10',
+ 'editor' => '9.0.10',
'element' => '2.1.9',
'escape-html' => '1.0.1',
- 'format-library' => '1.2.11',
+ 'format-library' => '1.2.13',
'hooks' => '2.0.5',
'html-entities' => '2.0.4',
'i18n' => '3.1.1',
'is-shallow-equal' => '1.1.5',
'keycodes' => '2.0.6',
- 'list-reusable-blocks' => '1.1.19',
+ 'list-reusable-blocks' => '1.1.21',
'notices' => '1.1.3',
- 'nux' => '3.0.7',
+ 'nux' => '3.0.9',
'plugins' => '2.0.10',
'redux-routine' => '3.0.4',
- 'rich-text' => '3.0.5',
+ 'rich-text' => '3.0.7',
'shortcode' => '2.0.2',
'token-list' => '1.1.0',
'url' => '2.3.3',
@@ -379,7 +379,6 @@ function wp_default_packages_scripts( &$scripts ) {
'editor' => array(
'jquery',
'lodash',
- 'wp-tinymce-lists',
'wp-a11y',
'wp-api-fetch',
'wp-blob',
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 36eebf38fb..42b595c03e 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
-$wp_version = '5.1-beta2-44710';
+$wp_version = '5.1-beta2-44711';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.