this.wp=this.wp||{},this.wp.blockLibrary=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=290)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},100:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},101:function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},102:function(e,t,n){"use strict";t.decode=t.parse=n(103),t.encode=t.stringify=n(104)},103:function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var c={};if("string"!=typeof e||0===e.length)return c;var i=/\+/g;e=e.split(t);var l=1e3;a&&"number"==typeof a.maxKeys&&(l=a.maxKeys);var s=e.length;l>0&&s>l&&(s=l);for(var u=0;u=0?(b=p.substr(0,g),m=p.substr(g+1)):(b=p,m=""),d=decodeURIComponent(b),h=decodeURIComponent(m),r(c,d)?o(c[d])?c[d].push(h):c[d]=[c[d],h]:c[d]=h}return c};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},104:function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?a(c(e),function(c){var i=encodeURIComponent(r(c))+n;return o(e[c])?a(e[c],function(e){return i+encodeURIComponent(r(e))}).join(t):i+encodeURIComponent(r(e[c]))}).join(t):i?encodeURIComponent(r(i))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",function(){return r})},21:function(e,t){!function(){e.exports=this.wp.richText}()},24:function(e,t,n){"use strict";var r=n(36);var o=n(37);function a(e,t){return Object(r.a)(e)||function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||Object(o.a)()}n.d(t,"a",function(){return a})},27:function(e,t){!function(){e.exports=this.wp.deprecated}()},29:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",function(){return o})},290:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"name",function(){return be}),n.d(r,"settings",function(){return me});var o={};n.r(o),n.d(o,"name",function(){return Ce}),n.d(o,"settings",function(){return xe});var a={};n.r(a),n.d(a,"getLevelFromHeadingNodeName",function(){return Ne}),n.d(a,"name",function(){return Re}),n.d(a,"settings",function(){return Ie});var c={};n.r(c),n.d(c,"name",function(){return Me}),n.d(c,"settings",function(){return Pe});var i={};n.r(i),n.d(i,"name",function(){return Qe}),n.d(i,"settings",function(){return Ye});var l={};n.r(l),n.d(l,"name",function(){return Ze}),n.d(l,"settings",function(){return Je});var s={};n.r(s),n.d(s,"name",function(){return nt}),n.d(s,"settings",function(){return rt});var u={};n.r(u),n.d(u,"name",function(){return st}),n.d(u,"settings",function(){return bt});var b={};n.r(b),n.d(b,"name",function(){return ht}),n.d(b,"settings",function(){return pt});var m={};n.r(m),n.d(m,"name",function(){return gt}),n.d(m,"settings",function(){return Ot});var d={};n.r(d),n.d(d,"name",function(){return yt}),n.d(d,"settings",function(){return wt});var h={};n.r(h),n.d(h,"name",function(){return Ct}),n.d(h,"settings",function(){return kt});var p={};n.r(p),n.d(p,"name",function(){return xt}),n.d(p,"settings",function(){return Tt});var g={};n.r(g),n.d(g,"getEmbedEdit",function(){return Ht}),n.d(g,"name",function(){return Ut}),n.d(g,"settings",function(){return Gt}),n.d(g,"common",function(){return $t}),n.d(g,"others",function(){return Qt});var O={};n.r(O),n.d(O,"name",function(){return en}),n.d(O,"settings",function(){return tn});var f={};n.r(f),n.d(f,"name",function(){return nn}),n.d(f,"settings",function(){return rn});var j={};n.r(j),n.d(j,"name",function(){return bn}),n.d(j,"settings",function(){return mn});var v={};n.r(v),n.d(v,"name",function(){return hn}),n.d(v,"settings",function(){return pn});var y={};n.r(y),n.d(y,"name",function(){return vn}),n.d(y,"settings",function(){return yn});var w={};n.r(w),n.d(w,"name",function(){return En}),n.d(w,"settings",function(){return _n});var C={};n.r(C),n.d(C,"name",function(){return Sn}),n.d(C,"settings",function(){return Tn});var k={};n.r(k),n.d(k,"name",function(){return Bn}),n.d(k,"settings",function(){return An});var E={};n.r(E),n.d(E,"name",function(){return Rn}),n.d(E,"settings",function(){return In});var _={};n.r(_),n.d(_,"name",function(){return Ln}),n.d(_,"settings",function(){return zn});var x={};n.r(x),n.d(x,"name",function(){return Fn}),n.d(x,"settings",function(){return Un});var S={};n.r(S),n.d(S,"name",function(){return $n}),n.d(S,"settings",function(){return Qn});var T={};n.r(T),n.d(T,"name",function(){return Yn}),n.d(T,"settings",function(){return Zn});var N={};n.r(N),n.d(N,"name",function(){return Xn}),n.d(N,"settings",function(){return er});var B={};n.r(B),n.d(B,"name",function(){return tr}),n.d(B,"settings",function(){return nr});var A={};n.r(A),n.d(A,"name",function(){return ar}),n.d(A,"settings",function(){return cr});var R={};n.r(R),n.d(R,"name",function(){return br}),n.d(R,"settings",function(){return mr});var I={};n.r(I),n.d(I,"name",function(){return dr}),n.d(I,"settings",function(){return hr});var L={};n.r(L),n.d(L,"name",function(){return pr}),n.d(L,"settings",function(){return gr});var z={};n.r(z),n.d(z,"name",function(){return Or}),n.d(z,"settings",function(){return fr});var M={};n.r(M),n.d(M,"name",function(){return Cr}),n.d(M,"settings",function(){return kr});var P={};n.r(P),n.d(P,"name",function(){return _r}),n.d(P,"settings",function(){return xr});var H=n(19),D=(n(78),n(11)),F=n(15),U=n(8),V=n(0),W=n(16),q=n.n(W),K=n(2),G=n(1),$=n(7),Q=n(4),Y=n(18),Z=n(10),J=n(9),X=n(12),ee=n(13),te=n(14),ne=n(3),re=n(6),oe=n(5),ae=window.getComputedStyle,ce=Object(Q.withFallbackStyles)(function(e,t){var n=t.attributes,r=n.textColor,o=n.backgroundColor,a=n.fontSize,c=n.customFontSize,i=e.querySelector('[contenteditable="true"]'),l=i?ae(i):null;return{fallbackBackgroundColor:o||!l?void 0:l.backgroundColor,fallbackTextColor:r||!l?void 0:l.color,fallbackFontSize:a||c||!l?void 0:parseInt(l.fontSize)||void 0}}),ie=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onReplace=e.onReplace.bind(Object(ne.a)(Object(ne.a)(e))),e.toggleDropCap=e.toggleDropCap.bind(Object(ne.a)(Object(ne.a)(e))),e.splitBlock=e.splitBlock.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"onReplace",value:function(e){var t=this.props,n=t.attributes,r=t.onReplace;r(e.map(function(e,t){return 0===t&&"core/paragraph"===e.name?Object(U.a)({},e,{attributes:Object(U.a)({},n,e.attributes)}):e}))}},{key:"toggleDropCap",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({dropCap:!t.dropCap})}},{key:"getDropCapHelp",value:function(e){return e?Object(G.__)("Showing large initial letter."):Object(G.__)("Toggle to show a large initial letter.")}},{key:"splitBlock",value:function(e,t){for(var n=this.props,r=n.attributes,o=n.insertBlocksAfter,a=n.setAttributes,c=n.onReplace,i=arguments.length,l=new Array(i>2?i-2:0),s=2;se,n=this.image.height/this.image.width,r=t?e:this.image.width,o=t?e*n:this.image.height;this.setState({width:r,height:o})}},{key:"render",value:function(){var e={imageWidth:this.image&&this.image.width,imageHeight:this.image&&this.image.height,containerWidth:this.container&&this.container.clientWidth,containerHeight:this.container&&this.container.clientHeight,imageWidthWithinContainer:this.state.width,imageHeightWithinContainer:this.state.height};return Object(V.createElement)("div",{ref:this.bindContainer},this.props.children(e))}}]),t}(V.Component),Oe=Object(re.withGlobalEvents)({resize:"calculateSize"})(ge),fe=["image"],je=function(e){return Object(K.pick)(e,["alt","id","link","url","caption"])},ve=function(e,t){return!e&&Object(de.isBlobURL)(t)},ye=function(e){function t(e){var n,r=e.attributes;return Object(Z.a)(this,t),(n=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).updateAlt=n.updateAlt.bind(Object(ne.a)(Object(ne.a)(n))),n.updateAlignment=n.updateAlignment.bind(Object(ne.a)(Object(ne.a)(n))),n.onFocusCaption=n.onFocusCaption.bind(Object(ne.a)(Object(ne.a)(n))),n.onImageClick=n.onImageClick.bind(Object(ne.a)(Object(ne.a)(n))),n.onSelectImage=n.onSelectImage.bind(Object(ne.a)(Object(ne.a)(n))),n.onSelectURL=n.onSelectURL.bind(Object(ne.a)(Object(ne.a)(n))),n.updateImageURL=n.updateImageURL.bind(Object(ne.a)(Object(ne.a)(n))),n.updateWidth=n.updateWidth.bind(Object(ne.a)(Object(ne.a)(n))),n.updateHeight=n.updateHeight.bind(Object(ne.a)(Object(ne.a)(n))),n.updateDimensions=n.updateDimensions.bind(Object(ne.a)(Object(ne.a)(n))),n.onSetCustomHref=n.onSetCustomHref.bind(Object(ne.a)(Object(ne.a)(n))),n.onSetLinkDestination=n.onSetLinkDestination.bind(Object(ne.a)(Object(ne.a)(n))),n.toggleIsEditing=n.toggleIsEditing.bind(Object(ne.a)(Object(ne.a)(n))),n.state={captionFocused:!1,isEditing:!r.url},n}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.id,o=t.url,a=void 0===o?"":o;if(ve(r,a)){var c=Object(de.getBlobByURL)(a);c&&Object($.mediaUpload)({filesList:[c],onFileChange:function(e){var t=Object(he.a)(e,1)[0];n(je(t))},allowedTypes:fe})}}},{key:"componentDidUpdate",value:function(e){var t=e.attributes,n=t.id,r=t.url,o=void 0===r?"":r,a=this.props.attributes,c=a.id,i=a.url,l=void 0===i?"":i;ve(n,o)&&!ve(c,l)&&Object(de.revokeBlobURL)(l),!this.props.isSelected&&e.isSelected&&this.state.captionFocused&&this.setState({captionFocused:!1})}},{key:"onSelectImage",value:function(e){e&&e.url?(this.setState({isEditing:!1}),this.props.setAttributes(Object(U.a)({},je(e),{width:void 0,height:void 0}))):this.props.setAttributes({url:void 0,alt:void 0,id:void 0,caption:void 0})}},{key:"onSetLinkDestination",value:function(e){var t;t="none"===e?void 0:"media"===e?this.props.attributes.url:"attachment"===e?this.props.image&&this.props.image.link:this.props.attributes.href,this.props.setAttributes({linkDestination:e,href:t})}},{key:"onSelectURL",value:function(e){e!==this.props.attributes.url&&this.props.setAttributes({url:e,id:void 0}),this.setState({isEditing:!1})}},{key:"onSetCustomHref",value:function(e){this.props.setAttributes({href:e})}},{key:"onFocusCaption",value:function(){this.state.captionFocused||this.setState({captionFocused:!0})}},{key:"onImageClick",value:function(){this.state.captionFocused&&this.setState({captionFocused:!1})}},{key:"updateAlt",value:function(e){this.props.setAttributes({alt:e})}},{key:"updateAlignment",value:function(e){var t=-1!==["wide","full"].indexOf(e)?{width:void 0,height:void 0}:{};this.props.setAttributes(Object(U.a)({},t,{align:e}))}},{key:"updateImageURL",value:function(e){this.props.setAttributes({url:e,width:void 0,height:void 0})}},{key:"updateWidth",value:function(e){this.props.setAttributes({width:parseInt(e,10)})}},{key:"updateHeight",value:function(e){this.props.setAttributes({height:parseInt(e,10)})}},{key:"updateDimensions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return function(){e.props.setAttributes({width:t,height:n})}}},{key:"getAvailableSizes",value:function(){return Object(K.get)(this.props.image,["media_details","sizes"],{})}},{key:"getLinkDestinationOptions",value:function(){return[{value:"none",label:Object(G.__)("None")},{value:"media",label:Object(G.__)("Media File")},{value:"attachment",label:Object(G.__)("Attachment Page")},{value:"custom",label:Object(G.__)("Custom URL")}]}},{key:"toggleIsEditing",value:function(){this.setState({isEditing:!this.state.isEditing})}},{key:"render",value:function(){var e,t=this,n=this.state.isEditing,r=this.props,o=r.attributes,a=r.setAttributes,c=r.isLargeViewport,i=r.isSelected,l=r.className,s=r.maxWidth,u=r.noticeOperations,b=r.noticeUI,m=r.toggleSelection,d=r.isRTL,h=o.url,p=o.alt,g=o.caption,O=o.align,f=o.id,j=o.href,v=o.linkDestination,y=o.width,w=o.height,C=function(e,t){return t&&!e&&!Object(de.isBlobURL)(t)}(f,h);h&&(e=C?Object(V.createElement)(Q.Toolbar,null,Object(V.createElement)(Q.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(G.__)("Edit image"),onClick:this.toggleIsEditing,icon:"edit"})):Object(V.createElement)(Q.Toolbar,null,Object(V.createElement)($.MediaUpload,{onSelect:this.onSelectImage,allowedTypes:fe,value:f,render:function(e){var t=e.open;return Object(V.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(G.__)("Edit image"),icon:"edit",onClick:t})}})));var k=Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.BlockAlignmentToolbar,{value:O,onChange:this.updateAlignment}),e);if(n){var E=C?h:void 0;return Object(V.createElement)(V.Fragment,null,k,Object(V.createElement)($.MediaPlaceholder,{icon:"format-image",labels:{title:Object(G.__)("Image"),name:Object(G.__)("an image")},className:l,onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,notices:b,onError:u.createErrorNotice,accept:"image/*",allowedTypes:fe,value:{id:f,src:E}}))}var _=q()(l,{"is-transient":Object(de.isBlobURL)(h),"is-resized":!!y||!!w,"is-focused":i}),x=this.getAvailableSizes(),S=-1===["wide","full"].indexOf(O)&&c,T="custom"!==v,N=function(e,n){return Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Image Settings")},Object(V.createElement)(Q.TextareaControl,{label:Object(G.__)("Alt Text (Alternative Text)"),value:p,onChange:t.updateAlt,help:Object(G.__)("Describe the purpose of the image. Leave empty if the image is not a key part of the content.")}),!Object(K.isEmpty)(x)&&Object(V.createElement)(Q.SelectControl,{label:Object(G.__)("Image Size"),value:h,options:Object(K.map)(x,function(e,t){return{value:e.source_url,label:Object(K.startCase)(t)}}),onChange:t.updateImageURL}),S&&Object(V.createElement)("div",{className:"block-library-image__dimensions"},Object(V.createElement)("p",{className:"block-library-image__dimensions__row"},Object(G.__)("Image Dimensions")),Object(V.createElement)("div",{className:"block-library-image__dimensions__row"},Object(V.createElement)(Q.TextControl,{type:"number",className:"block-library-image__dimensions__width",label:Object(G.__)("Width"),value:void 0!==y?y:"",placeholder:e,min:1,onChange:t.updateWidth}),Object(V.createElement)(Q.TextControl,{type:"number",className:"block-library-image__dimensions__height",label:Object(G.__)("Height"),value:void 0!==w?w:"",placeholder:n,min:1,onChange:t.updateHeight})),Object(V.createElement)("div",{className:"block-library-image__dimensions__row"},Object(V.createElement)(Q.ButtonGroup,{"aria-label":Object(G.__)("Image Size")},[25,50,75,100].map(function(r){var o=Math.round(e*(r/100)),a=Math.round(n*(r/100)),c=y===o&&w===a;return Object(V.createElement)(Q.Button,{key:r,isSmall:!0,isPrimary:c,"aria-pressed":c,onClick:t.updateDimensions(o,a)},r,"%")})),Object(V.createElement)(Q.Button,{isSmall:!0,onClick:t.updateDimensions()},Object(G.__)("Reset"))))),Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Link Settings")},Object(V.createElement)(Q.SelectControl,{label:Object(G.__)("Link To"),value:v,options:t.getLinkDestinationOptions(),onChange:t.onSetLinkDestination}),"none"!==v&&Object(V.createElement)(Q.TextControl,{label:Object(G.__)("Link URL"),value:j||"",onChange:t.onSetCustomHref,placeholder:T?void 0:"https://",disabled:T})))};return Object(V.createElement)(V.Fragment,null,k,Object(V.createElement)("figure",{className:_},Object(V.createElement)(Oe,{src:h,dirtynessTrigger:O},function(e){var n=e.imageWidthWithinContainer,r=e.imageHeightWithinContainer,o=e.imageWidth,c=e.imageHeight,i=Object(V.createElement)("img",{src:h,alt:p,onClick:t.onImageClick});if(!S||!n)return Object(V.createElement)(V.Fragment,null,N(o,c),Object(V.createElement)("div",{style:{width:y,height:w}},i));var l=y||n,u=w||r,b=o/c,g=o a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"}},Ee={img:{attributes:["src","alt"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},_e={figure:{require:["img"],children:Object(U.a)({},Ee,{a:{attributes:["href"],children:Ee},figcaption:{children:Object(D.getPhrasingContentSchema)()}})}},xe={title:Object(G.__)("Image"),description:Object(G.__)("They’re worth 1,000 words! Insert a single image."),icon:Object(V.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)(Q.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object(V.createElement)(Q.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),category:"common",keywords:[Object(G.__)("photo")],attributes:ke,transforms:{from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("img")},schema:_e,transform:function(e){var t=e.className+" "+e.querySelector("img").className,n=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),r=n?n[1]:void 0,o=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),a=o?Number(o[1]):void 0,c=e.querySelector("a"),i=c&&c.href?"custom":void 0,l=c&&c.href?c.href:void 0,s=Object(D.getBlockType)("core/image"),u=Object(D.getBlockAttributes)(s,e.outerHTML,{align:r,id:a,linkDestination:i,href:l});return Object(D.createBlock)("core/image",u)}},{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("image/")},transform:function(e){var t=e[0];return Object(D.createBlock)("core/image",{url:Object(de.createBlobURL)(t)})}},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,t){return t.shortcode.content.replace(/\s*]*>\s/,"")}},href:{type:"string",source:"attribute",attribute:"href",selector:"a"},id:{type:"number",shortcode:function(e){var t=e.named.id;if(t)return parseInt(t.replace("attachment_",""),10)}},align:{type:"string",shortcode:function(e){var t=e.named.align;return(void 0===t?"alignnone":t).replace("align","")}}}}]},getEditWrapperProps:function(e){var t=e.align,n=e.width;if("left"===t||"center"===t||"right"===t||"wide"===t||"full"===t)return{"data-align":t,"data-resized":!!n}},edit:we,save:function(e){var t,n=e.attributes,r=n.url,o=n.alt,a=n.caption,c=n.align,i=n.href,l=n.width,s=n.height,u=n.id,b=q()((t={},Object(F.a)(t,"align".concat(c),c),Object(F.a)(t,"is-resized",l||s),t)),m=Object(V.createElement)("img",{src:r,alt:o,className:u?"wp-image-".concat(u):null,width:l,height:s}),d=Object(V.createElement)(V.Fragment,null,i?Object(V.createElement)("a",{href:i},m):m,!$.RichText.isEmpty(a)&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:a}));return"left"===c||"right"===c||"center"===c?Object(V.createElement)("div",null,Object(V.createElement)("figure",{className:b},d)):Object(V.createElement)("figure",{className:b},d)},deprecated:[{attributes:ke,save:function(e){var t,n=e.attributes,r=n.url,o=n.alt,a=n.caption,c=n.align,i=n.href,l=n.width,s=n.height,u=n.id,b=q()((t={},Object(F.a)(t,"align".concat(c),c),Object(F.a)(t,"is-resized",l||s),t)),m=Object(V.createElement)("img",{src:r,alt:o,className:u?"wp-image-".concat(u):null,width:l,height:s});return Object(V.createElement)("figure",{className:b},i?Object(V.createElement)("a",{href:i},m):m,!$.RichText.isEmpty(a)&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:a}))}},{attributes:ke,save:function(e){var t=e.attributes,n=t.url,r=t.alt,o=t.caption,a=t.align,c=t.href,i=t.width,l=t.height,s=t.id,u=Object(V.createElement)("img",{src:n,alt:r,className:s?"wp-image-".concat(s):null,width:i,height:l});return Object(V.createElement)("figure",{className:a?"align".concat(a):null},c?Object(V.createElement)("a",{href:c},u):u,!$.RichText.isEmpty(o)&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:o}))}},{attributes:ke,save:function(e){var t=e.attributes,n=t.url,r=t.alt,o=t.caption,a=t.align,c=t.href,i=t.width,l=t.height,s=i||l?{width:i,height:l}:{},u=Object(V.createElement)("img",Object(Y.a)({src:n,alt:r},s)),b={};return i?b={width:i}:"left"!==a&&"right"!==a||(b={maxWidth:"50%"}),Object(V.createElement)("figure",{className:a?"align".concat(a):null,style:b},c?Object(V.createElement)("a",{href:c},u):u,!$.RichText.isEmpty(o)&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:o}))}}]},Se=n(20),Te=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:"createLevelControl",value:function(e,t,n){return{icon:"heading",title:Object(G.sprintf)(Object(G.__)("Heading %d"),e),isActive:e===t,onClick:function(){return n(e)},subscript:String(e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.minLevel,r=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object(V.createElement)(Q.Toolbar,{controls:Object(K.range)(n,r).map(function(t){return e.createLevelControl(t,o,a)})})}}]),t}(V.Component);function Ne(e){return Number(e.substr(1))}var Be={className:!1,anchor:!0},Ae={content:{source:"html",selector:"h1,h2,h3,h4,h5,h6"},level:{type:"number",default:2},align:{type:"string"},placeholder:{type:"string"}},Re="core/heading",Ie={title:Object(G.__)("Heading"),description:Object(G.__)("Introduce topics and help visitors (and search engines!) understand how your content is organized."),icon:Object(V.createElement)(Q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(V.createElement)(Q.Path,{d:"M5 4v3h5.5v12h3V7H19V4z"}),Object(V.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"})),category:"common",keywords:[Object(G.__)("title"),Object(G.__)("subtitle")],supports:Be,attributes:Ae,transforms:{from:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return Object(D.createBlock)("core/heading",{content:t})}},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:{h1:{children:Object(D.getPhrasingContentSchema)()},h2:{children:Object(D.getPhrasingContentSchema)()},h3:{children:Object(D.getPhrasingContentSchema)()},h4:{children:Object(D.getPhrasingContentSchema)()},h5:{children:Object(D.getPhrasingContentSchema)()},h6:{children:Object(D.getPhrasingContentSchema)()}},transform:function(e){return Object(D.createBlock)("core/heading",Object(U.a)({},Object(D.getBlockAttributes)(Object(D.getBlockType)("core/heading"),e.outerHTML),{level:Ne(e.nodeName)}))}},{type:"pattern",regExp:/^(#{2,6})\s/,transform:function(e){var t=e.content,n=e.match[1].length;return Object(D.createBlock)("core/heading",{level:n,content:t})}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return Object(D.createBlock)("core/paragraph",{content:t})}}]},deprecated:[{supports:Be,attributes:Object(U.a)({},Object(K.omit)(Ae,["level"]),{nodeName:{type:"string",source:"property",selector:"h1,h2,h3,h4,h5,h6",property:"nodeName",default:"H2"}}),migrate:function(e){var t=e.nodeName,n=Object(Se.a)(e,["nodeName"]);return Object(U.a)({},n,{level:Ne(t)})},save:function(e){var t=e.attributes,n=t.align,r=t.nodeName,o=t.content;return Object(V.createElement)($.RichText.Content,{tagName:r.toLowerCase(),style:{textAlign:n},value:o})}}],merge:function(e,t){return{content:e.content+t.content}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.mergeBlocks,o=e.insertBlocksAfter,a=e.onReplace,c=e.className,i=t.align,l=t.content,s=t.level,u=t.placeholder,b="h"+s;return Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)(Te,{minLevel:2,maxLevel:5,selectedLevel:s,onChange:function(e){return n({level:e})}})),Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Heading Settings")},Object(V.createElement)("p",null,Object(G.__)("Level")),Object(V.createElement)(Te,{minLevel:1,maxLevel:7,selectedLevel:s,onChange:function(e){return n({level:e})}}),Object(V.createElement)("p",null,Object(G.__)("Text Alignment")),Object(V.createElement)($.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}}))),Object(V.createElement)($.RichText,{wrapperClassName:"wp-block-heading",tagName:b,value:l,onChange:function(e){return n({content:e})},onMerge:r,onSplit:o?function(e,t){n({content:e});for(var r=arguments.length,a=new Array(r>2?r-2:0),c=2;c".concat(t,"

")})}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(D.createBlock)("core/quote",{value:t,citation:n})}},{type:"pattern",regExp:/^>\s/,transform:function(e){var t=e.content;return Object(D.createBlock)("core/quote",{value:"

".concat(t,"

")})}},{type:"raw",selector:"blockquote",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&&r.push.apply(r,Object(H.a)(Object(Le.split)(Object(Le.create)({html:t,multilineTag:"p"}),"\u2028").map(function(e){return Object(D.createBlock)("core/paragraph",{content:Object(Le.toHTMLString)(e)})}))),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(Se.a)(e,["value","citation"]);if("

"===t)return Object(D.createBlock)("core/heading",{content:n});var o=Object(Le.split)(Object(Le.create)({html:t,multilineTag:"p"}),"\u2028"),a=o.slice(1);return[Object(D.createBlock)("core/heading",{content:Object(Le.toHTMLString)(o[0])}),Object(D.createBlock)("core/quote",Object(U.a)({},r,{citation:n,value:Object(Le.toHTMLString)(a.length?Object(Le.join)(o.slice(1),"\u2028"):Object(Le.create)(),"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(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}})),Object(V.createElement)("blockquote",{className:c,style:{textAlign:i}},Object(V.createElement)($.RichText,{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(G.__)("Write quote…")}),(!$.RichText.isEmpty(s)||r)&&Object(V.createElement)($.RichText,{value:s,onChange:function(e){return n({citation:e})},placeholder:Object(G.__)("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(V.createElement)("blockquote",{style:{textAlign:n||null}},Object(V.createElement)($.RichText.Content,{multiline:!0,value:r}),!$.RichText.isEmpty(o)&&Object(V.createElement)($.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){var n=t.value,r=t.citation;return n&&"

"!==n?Object(U.a)({},e,{value:e.value+n,citation:e.citation+r}):Object(U.a)({},e,{citation:e.citation+r})},deprecated:[{attributes:Object(U.a)({},ze,{style:{type:"number",default:1}}),migrate:function(e){return 2===e.style?Object(U.a)({},Object(K.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(V.createElement)("blockquote",{className:2===a?"is-large":"",style:{textAlign:n||null}},Object(V.createElement)($.RichText.Content,{multiline:!0,value:r}),!$.RichText.isEmpty(o)&&Object(V.createElement)($.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Object(U.a)({},ze,{citation:{source:"html",selector:"footer"},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(V.createElement)("blockquote",{className:"blocks-quote-style-".concat(a),style:{textAlign:n||null}},Object(V.createElement)($.RichText.Content,{multiline:!0,value:r}),!$.RichText.isEmpty(o)&&Object(V.createElement)($.RichText.Content,{tagName:"footer",value:o}))}}]},He=n(17),De=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!==[He.BACKSPACE,He.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;switch(a){case"media":e=n;break;case"attachment":e=c}var b=n?Object(V.createElement)("img",{src:n,alt:r,"data-id":o,onClick:this.onImageClick}):Object(V.createElement)(Q.Spinner,null),m=q()({"is-selected":i,"is-transient":Object(de.isBlobURL)(n)});return Object(V.createElement)("figure",{className:m,tabIndex:"-1",onKeyDown:this.onKeyDown,ref:this.bindContainer},i&&Object(V.createElement)("div",{className:"block-library-gallery-item__inline-menu"},Object(V.createElement)(Q.IconButton,{icon:"no-alt",onClick:s,className:"blocks-gallery-item__remove",label:Object(G.__)("Remove Image")})),e?Object(V.createElement)("a",{href:e},b):b,!$.RichText.isEmpty(l)||i?Object(V.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(G.__)("Write caption…"),value:l,isSelected:this.state.captionSelected,onChange:function(e){return u({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}):null)}}]),t}(V.Component),Fe=Object(oe.withSelect)(function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}})(De),Ue=[{value:"attachment",label:Object(G.__)("Attachment Page")},{value:"media",label:Object(G.__)("Media File")},{value:"none",label:Object(G.__)("None")}],Ve=["image"];function We(e){return Math.min(3,e.images.length)}var qe=function(e){return Object(K.pick)(e,["alt","id","link","url","caption"])},Ke=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.state={selectedImage:null},e}return Object(te.a)(t,e),Object(J.a)(t,[{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(K.filter)(t.props.attributes.images,function(t,n){return e!==n}),r=t.props.attributes.columns;t.setState({selectedImage:null}),t.props.setAttributes({images:n,columns:r?Math.min(n.length,r):r})}}},{key:"onSelectImages",value:function(e){this.props.setAttributes({images:e.map(function(e){return qe(e)})})}},{key:"setLinkTo",value:function(e){this.props.setAttributes({linkTo:e})}},{key:"setColumnsNumber",value:function(e){this.props.setAttributes({columns:e})}},{key:"toggleImageCrop",value:function(){this.props.setAttributes({imageCrop:!this.props.attributes.imageCrop})}},{key:"getImageCropHelp",value:function(e){return e?Object(G.__)("Thumbnails are cropped to align."):Object(G.__)("Thumbnails are not cropped.")}},{key:"setImageAttributes",value:function(e,t){var n=this.props,r=n.attributes.images,o=n.setAttributes;r[e]&&o({images:Object(H.a)(r.slice(0,e)).concat([Object(U.a)({},r[e],t)],Object(H.a)(r.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,r=n.noticeOperations,o=n.setAttributes;Object($.mediaUpload)({allowedTypes:Ve,filesList:e,onFileChange:function(e){var n=e.map(function(e){return qe(e)});o({images:t.concat(n)})},onError:r.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?We(n):l,u=n.align,b=n.imageCrop,m=n.linkTo,d=Object(V.createElement)(Q.DropZone,{onFilesDrop:this.addFiles}),h=Object(V.createElement)($.BlockControls,null,!!i.length&&Object(V.createElement)(Q.Toolbar,null,Object(V.createElement)($.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:Ve,multiple:!0,gallery:!0,value:i.map(function(e){return e.id}),render:function(e){var t=e.open;return Object(V.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(G.__)("Edit Gallery"),icon:"edit",onClick:t})}})));return 0===i.length?Object(V.createElement)(V.Fragment,null,h,Object(V.createElement)($.MediaPlaceholder,{icon:"format-gallery",className:o,labels:{title:Object(G.__)("Gallery"),name:Object(G.__)("images")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:Ve,multiple:!0,notices:c,onError:a.createErrorNotice})):Object(V.createElement)(V.Fragment,null,h,Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Gallery Settings")},i.length>1&&Object(V.createElement)(Q.RangeControl,{label:Object(G.__)("Columns"),value:s,onChange:this.setColumnsNumber,min:1,max:Math.min(8,i.length)}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Crop Images"),checked:!!b,onChange:this.toggleImageCrop,help:this.getImageCropHelp}),Object(V.createElement)(Q.SelectControl,{label:Object(G.__)("Link To"),value:m,onChange:this.setLinkTo,options:Ue}))),c,Object(V.createElement)("ul",{className:"".concat(o," align").concat(u," columns-").concat(s," ").concat(b?"is-cropped":"")},d,i.map(function(t,n){return Object(V.createElement)("li",{className:"blocks-gallery-item",key:t.id||t.url},Object(V.createElement)(Fe,{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}))}),r&&Object(V.createElement)("li",{className:"blocks-gallery-item has-add-item-button"},Object(V.createElement)(Q.FormFileUpload,{multiple:!0,isLarge:!0,className:"block-library-gallery-add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},Object(G.__)("Upload an image")))))}}]),t}(V.Component),Ge=Object(Q.withNotices)(Ke),$e={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:{source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},Qe="core/gallery",Ye={title:Object(G.__)("Gallery"),description:Object(G.__)("Display multiple images in an elegantly organized tiled layout."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M20 4v12H8V4h12m0-2H8L6 4v12l2 2h12l2-2V4l-2-2z"}),Object(V.createElement)("path",{d:"M12 12l1 2 3-3 3 4H9z"}),Object(V.createElement)("path",{d:"M2 6v14l2 2h14v-2H4V6H2z"}))),category:"common",keywords:[Object(G.__)("images"),Object(G.__)("photos")],attributes:$e,supports:{align:!0},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:function(e){var t=Object(K.filter)(e,function(e){var t=e.id,n=e.url;return t&&n});return t.length>0?Object(D.createBlock)("core/gallery",{images:t.map(function(e){return{id:e.id,url:e.url,alt:e.alt,caption:e.caption}})}):Object(D.createBlock)("core/gallery")}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:function(e){var t=e.named.ids;return t?t.split(",").map(function(e){return{id:parseInt(e,10)}}):[]}},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(K.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 qe({url:Object(de.createBlobURL)(e)})})});return Object($.mediaUpload)({filesList:e,onFileChange:function(e){t(n.clientId,{images:e.map(function(e){return qe(e)})})},allowedTypes:["image"]}),n}}],to:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.images;return t.length>0?t.map(function(e){var t=e.id,n=e.url,r=e.alt,o=e.caption;return Object(D.createBlock)("core/image",{id:t,url:n,alt:r,caption:o})}):Object(D.createBlock)("core/image")}}]},edit:Ge,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?We(t):r,a=t.imageCrop,c=t.linkTo;return Object(V.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(V.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(V.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(V.createElement)("figure",null,t?Object(V.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:e.caption})))}))},deprecated:[{attributes:$e,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?We(t):r,a=t.imageCrop,c=t.linkTo;return Object(V.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(V.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link});return Object(V.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(V.createElement)("figure",null,t?Object(V.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:e.caption})))}))}},{attributes:Object(U.a)({},$e,{images:Object(U.a)({},$e.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?We(t):r,a=t.align,c=t.imageCrop,i=t.linkTo;return Object(V.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(V.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object(V.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object(V.createElement)("a",{href:t},n):n)}))}}]};var Ze="core/archives",Je={title:Object(G.__)("Archives"),description:Object(G.__)("Display a monthly archive of your site’s Posts."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("g",null,Object(V.createElement)("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(V.createElement)(V.Fragment,null,Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Archives Settings")},Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Display as Dropdown"),checked:a,onChange:function(){return n({displayAsDropdown:!a})}}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Show Post Counts"),checked:o,onChange:function(){return n({showPostCounts:!o})}}))),Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.BlockAlignmentToolbar,{value:r,onChange:function(e){n({align:e})},controls:["left","center","right"]})),Object(V.createElement)(Q.Disabled,null,Object(V.createElement)($.ServerSideRender,{block:"core/archives",attributes:t})))},save:function(){return null}},Xe=["audio"],et=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:Xe})}}},{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;e!==n.src&&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(V.createElement)($.MediaPlaceholder,{icon:"media-audio",labels:{title:Object(G.__)("Audio"),name:Object(G.__)("an 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:Xe,value:this.props.attributes,notices:m,onError:b.createErrorNotice}):Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)(Q.Toolbar,null,Object(V.createElement)(Q.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(G.__)("Edit audio"),onClick:h,icon:"edit"}))),Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Audio Settings")},Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:o}),Object(V.createElement)(Q.SelectControl,{label:Object(G.__)("Preload"),value:void 0!==a?a:"none",onChange:function(e){return l({preload:"none"!==e?e:void 0})},options:[{value:"auto",label:Object(G.__)("Auto")},{value:"metadata",label:Object(G.__)("Metadata")},{value:"none",label:Object(G.__)("None")}]}))),Object(V.createElement)("figure",{className:u},Object(V.createElement)(Q.Disabled,null,Object(V.createElement)("audio",{controls:"controls",src:c})),(!$.RichText.isEmpty(r)||s)&&Object(V.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(G.__)("Write caption…"),value:r,onChange:function(e){return l({caption:e})},inlineToolbar:!0})))}}]),t}(V.Component),tt=Object(Q.withNotices)(et),nt="core/audio",rt={title:Object(G.__)("Audio"),description:Object(G.__)("Embed an audio file and a simple audio player."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)("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:{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(V.createElement)("figure",null,Object(V.createElement)("audio",{controls:"controls",src:c,autoPlay:n,loop:o,preload:a}),!$.RichText.isEmpty(r)&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:r}))}},ot=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:ot(e).backgroundColor,fallbackTextColor:a||!c?void 0:ot(c).color}}),ct=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(V.createElement)(V.Fragment,null,Object(V.createElement)("div",{className:b,title:h,ref:this.bindRef},Object(V.createElement)($.RichText,{placeholder:Object(G.__)("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(V.createElement)($.InspectorControls,null,Object(V.createElement)($.PanelColorSettings,{title:Object(G.__)("Color Settings"),colorSettings:[{value:r.color,onChange:a,label:Object(G.__)("Background Color")},{value:o.color,onChange:c,label:Object(G.__)("Text Color")}]},Object(V.createElement)($.ContrastChecker,{isLargeText:!0,textColor:o.color,backgroundColor:r.color,fallbackBackgroundColor:i,fallbackTextColor:l})))),u&&Object(V.createElement)("form",{className:"block-library-button__inline-link",onSubmit:function(e){return e.preventDefault()}},Object(V.createElement)(Q.Dashicon,{icon:"admin-links"}),Object(V.createElement)($.URLInput,{value:d,onChange:function(e){return s({url:e})}}),Object(V.createElement)(Q.IconButton,{icon:"editor-break",label:Object(G.__)("Apply"),type:"submit"})))}}]),t}(V.Component),it=Object(re.compose)([Object($.withColors)("backgroundColor",{textColor:"color"}),at])(ct),lt={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{source:"html",selector:"a"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},st="core/button",ut=function(e){return Object(K.omit)(Object(U.a)({},e,{customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0}),["color","textColor"])},bt={title:Object(G.__)("Button"),description:Object(G.__)("Want visitors to click to subscribe, buy, or read more? Get their attention with a button."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M19 6H5L3 8v8l2 2h14l2-2V8l-2-2zm0 10H5V8h14v8z"}))),category:"layout",attributes:lt,supports:{align:!0,alignWide:!1},styles:[{name:"default",label:Object(G.__)("Rounded"),isDefault:!0},{name:"outline",label:Object(G.__)("Outline")},{name:"squared",label:Object(G.__)("Squared")}],edit:it,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(V.createElement)("div",null,Object(V.createElement)($.RichText.Content,{tagName:"a",className:m,href:r,title:a,style:d,value:o}))},deprecated:[{attributes:Object(U.a)({},Object(K.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(V.createElement)("div",{className:"align".concat(a)},Object(V.createElement)($.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:o,style:c,value:r}))},migrate:ut},{attributes:Object(U.a)({},Object(K.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(V.createElement)("div",{className:"align".concat(a),style:{backgroundColor:c}},Object(V.createElement)($.RichText.Content,{tagName:"a",href:n,title:o,style:{color:i},value:r}))},migrate:ut}]},mt=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(K.unescape)(e.name).trim():Object(G.__)("(Untitled)")}},{key:"renderCategoryList",value:function(){var e=this,t=this.props.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object(V.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(V.createElement)("li",{key:e.id},Object(V.createElement)("a",{href:e.link,target:"_blank"},this.renderCategoryName(e)),a&&Object(V.createElement)("span",{className:"".concat(this.props.className,"__post-count")}," ","(",e.count,")"),o&&!!c.length&&Object(V.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.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object(V.createElement)("select",{className:"".concat(this.props.className,"__dropdown")},n.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(V.createElement)("option",{key:e.id},Object(K.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(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Categories Settings")},Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Display as Dropdown"),checked:a,onChange:this.toggleDisplayAsDropdown}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Show Hierarchy"),checked:c,onChange:this.toggleShowHierarchy}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Show Post Counts"),checked:i,onChange:this.toggleShowPostCounts})));return r?Object(V.createElement)(V.Fragment,null,l,Object(V.createElement)(Q.Placeholder,{icon:"admin-post",label:Object(G.__)("Categories")},Object(V.createElement)(Q.Spinner,null))):Object(V.createElement)(V.Fragment,null,l,Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.BlockAlignmentToolbar,{value:o,onChange:function(e){n({align:e})},controls:["left","center","right","full"]})),Object(V.createElement)("div",{className:this.props.className},a?this.renderCategoryDropdown():this.renderCategoryList()))}}]),t}(V.Component),dt=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])}})(mt),ht="core/categories",pt={title:Object(G.__)("Categories"),description:Object(G.__)("Display a list of all your site’s categories."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)("path",{d:"M12,2l-5.5,9h11L12,2z M12,5.84L13.93,9h-3.87L12,5.84z"}),Object(V.createElement)("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(V.createElement)("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:dt,save:function(){return null}};var gt="core/code",Ot={title:Object(G.__)("Code"),description:Object(G.__)("Add text that respects your spacing and tabs -- perfect for displaying code."),icon:Object(V.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)(Q.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.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:"pattern",trigger:"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(V.createElement)("div",{className:r},Object(V.createElement)($.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(G.__)("Write code…"),"aria-label":Object(G.__)("Code")}))},save:function(e){var t=e.attributes;return Object(V.createElement)("pre",null,Object(V.createElement)("code",null,t.content))}},ft=n(51),jt=["core/column"],vt=n.n(ft)()(function(e){return Object(K.times)(e,function(){return["core/column"]})}),yt="core/columns",wt={title:Object(G.__)("Columns"),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M21 4H3L2 5v14l1 1h18l1-1V5l-1-1zM8 18H4V6h4v12zm6 0h-4V6h4v12zm6 0h-4V6h4v12z"}))),category:"layout",attributes:{columns:{type:"number",default:2}},description:Object(G.__)("Add a block that displays content in multiple columns, then add whatever content blocks you’d like."),supports:{align:["wide","full"]},deprecated:[{attributes:{columns:{type:"number",default:2}},isEligible:function(e,t){return t.some(Object(K.property)(["attributes","layout"]))},migrate:function(e,t){return[e,t.reduce(function(e,t){var n,r,o,a=t.attributes.layout;return e[n=a&&(r=a.match(/^column-(\d+)$/))?Number(r[1])-1:0]||(e[n]=[]),e[n].push((o=t,Object(U.a)({},o,{attributes:Object(K.omit)(o.attributes,["layout"])}))),e},[]).map(function(e){return Object(D.createBlock)("core/column",{},e)})]},save:function(e){var t=e.attributes.columns;return Object(V.createElement)("div",{className:"has-".concat(t,"-columns")},Object(V.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(V.createElement)(V.Fragment,null,Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,null,Object(V.createElement)(Q.RangeControl,{label:Object(G.__)("Columns"),value:o,onChange:function(e){n({columns:e})},min:2,max:6}))),Object(V.createElement)("div",{className:a},Object(V.createElement)($.InnerBlocks,{template:vt(o),templateLock:"all",allowedBlocks:jt})))},save:function(e){var t=e.attributes.columns;return Object(V.createElement)("div",{className:"has-".concat(t,"-columns")},Object(V.createElement)($.InnerBlocks.Content,null))}},Ct="core/column",kt={title:Object(G.__)("Column"),parent:["core/columns"],icon:Object(V.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("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(G.__)("A single column within a columns block."),category:"common",supports:{inserter:!1},edit:function(){return Object(V.createElement)($.InnerBlocks,{templateLock:!1})},save:function(){return Object(V.createElement)("div",null,Object(V.createElement)($.InnerBlocks.Content,null))}},Et=["left","center","right","wide","full"],_t={title:{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"}},xt="core/cover",St=["image","video"],Tt={title:Object(G.__)("Cover"),description:Object(G.__)("Add a full-width image or video, and layer text over it — great for headers."),icon:Object(V.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(V.createElement)("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(V.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"})),category:"common",attributes:_t,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!==Et.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(U.a)({},"image"===u?Bt(g):{},{backgroundColor:i.color}),v=q()(o,"center"!==b&&"has-".concat(b,"-content"),Nt(m),{"has-background-dim":0!==m,"has-parallax":d}),y=Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.BlockAlignmentToolbar,{value:s,onChange:function(e){return n({align:e})}}),!!g&&Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.AlignmentToolbar,{value:b,onChange:function(e){n({contentAlign:e})}}),Object(V.createElement)(Q.Toolbar,null,Object(V.createElement)($.MediaUpload,{onSelect:O,allowedTypes:St,value:h,render:function(e){var t=e.open;return Object(V.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(G.__)("Edit media"),icon:"edit",onClick:t})}})))),!!g&&Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Cover Settings")},"image"===u&&Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Fixed Background"),checked:d,onChange:function(){return n({hasParallax:!d})}}),Object(V.createElement)($.PanelColorSettings,{title:Object(G.__)("Overlay"),initialOpen:!0,colorSettings:[{value:i.color,onChange:l,label:Object(G.__)("Overlay Color")}]},Object(V.createElement)(Q.RangeControl,{label:Object(G.__)("Background Opacity"),value:m,onChange:function(e){return n({dimRatio:e})},min:0,max:100,step:10})))));if(!g){var w=!$.RichText.isEmpty(p),C=w?void 0:"format-image",k=w?Object(V.createElement)($.RichText,{tagName:"h2",value:p,onChange:f,inlineToolbar:!0}):Object(G.__)("Cover");return Object(V.createElement)(V.Fragment,null,y,Object(V.createElement)($.MediaPlaceholder,{icon:C,className:o,labels:{title:k,name:Object(G.__)("an image or a video")},onSelect:O,accept:"image/*,video/*",allowedTypes:St,notices:c,onError:a.createErrorNotice}))}return Object(V.createElement)(V.Fragment,null,y,Object(V.createElement)("div",{"data-url":g,style:j,className:v},"video"===u&&Object(V.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:g}),(!$.RichText.isEmpty(p)||r)&&Object(V.createElement)($.RichText,{tagName:"p",className:"wp-block-cover-text",placeholder:Object(G.__)("Write title…"),value:p,onChange:f,inlineToolbar:!0})))}),save:function(e){var t=e.attributes,n=e.className,r=t.align,o=t.backgroundType,a=t.contentAlign,c=t.customOverlayColor,i=t.dimRatio,l=t.hasParallax,s=t.overlayColor,u=t.title,b=t.url,m=Object($.getColorClassName)("background-color",s),d="image"===o?Bt(b):{};m||(d.backgroundColor=c);var h=q()(n,Nt(i),m,Object(F.a)({"has-background-dim":0!==i,"has-parallax":l},"has-".concat(a,"-content"),"center"!==a),r?"align".concat(r):null);return Object(V.createElement)("div",{className:h,style:d},"video"===o&&b&&Object(V.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:b}),!$.RichText.isEmpty(u)&&Object(V.createElement)($.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:u}))},deprecated:[{attributes:Object(U.a)({},_t),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=Bt(n);u||(b.backgroundColor=s);var m=q()("wp-block-cover-image",Nt(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(V.createElement)("div",{className:m,style:b},!$.RichText.isEmpty(r)&&Object(V.createElement)($.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r}))}},{attributes:Object(U.a)({},_t,{title:{source:"html",selector:"h2"}}),save:function(e){var t=e.attributes,n=e.className,r=t.url,o=t.title,a=t.hasParallax,c=t.dimRatio,i=t.align,l=Bt(r),s=q()(n,Nt(c),{"has-background-dim":0!==c,"has-parallax":a},i?"align".concat(i):null);return Object(V.createElement)("section",{className:s,style:l},Object(V.createElement)($.RichText.Content,{tagName:"h2",value:o}))}}]};function Nt(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}function Bt(e){return e?{backgroundImage:"url(".concat(e,")")}:{}}var At=n(74),Rt=n(63),It=n.n(Rt),Lt=["facebook.com"],zt=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],Mt=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some(function(t){return e.match(t)})},Pt=function(e){for(var t=$t.concat(Qt),n=0;n1&&void 0!==arguments[1])||arguments[1],n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;var r=n.body.querySelector("iframe");if(r&&r.height&&r.width)for(var o=(r.width/r.height).toFixed(2),a=0;a=i.ratio)return c={},Object(F.a)(c,i.className,t),Object(F.a)(c,"wp-has-aspect-ratio",t),c}return this.props.attributes.className}},{key:"setAspectRatioClassNames",value:function(e){if(this.props.attributes.allowResponsive){var t=It()(this.props.attributes.className,this.getAspectRatioClassNames(e));this.props.setAttributes({className:t})}}},{key:"getAttributesFromPreview",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r={},o=t.type,a=void 0===o?"rich":o,c=t.html,i=t.provider_name,l=Object(K.kebabCase)(Object(K.toLower)(""!==i?i:e));return Object(K.includes)(c,'class="wp-embedded-content" data-secret')&&(a="wp-embed"),(c||"photo"===a)&&(r.type=a,r.providerNameSlug=l),r.className=It()(this.props.attributes.className,this.getAspectRatioClassNames(c,n)),r}},{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(G.__)("Videos and other content automatically resizes."):Object(G.__)("Content is fixed size.")}},{key:"toggleResponsive",value:function(){var e=this.props.attributes,t=e.allowResponsive,n=e.className,r=this.props.preview.html,o=this.getAspectRatioClassNames(r,!t);this.props.setAttributes({allowResponsive:!t,className:It()(n,o)})}},{key:"render",value:function(){var n=this,r=this.state,o=r.url,a=r.editingURL,c=this.props.attributes,i=c.caption,l=c.type,s=c.allowResponsive,u=this.props,b=u.fetching,m=u.setAttributes,d=u.isSelected,h=u.className,p=u.preview,g=u.cannotEmbed,O=u.supportsResponsive,f=Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)(Q.Toolbar,null,p&&!g&&Object(V.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(G.__)("Edit URL"),icon:"edit",onClick:this.switchBackToURLInput}))),O&&Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Media Settings"),className:"blocks-responsive"},Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Automatically scale content"),checked:s,help:this.getResponsiveHelp,onChange:this.toggleResponsive}))));if(b)return Object(V.createElement)("div",{className:"wp-block-embed is-loading"},Object(V.createElement)(Q.Spinner,null),Object(V.createElement)("p",null,Object(G.__)("Embedding…")));var j=Object(G.sprintf)(Object(G.__)("%s URL"),e);if(!p||g||a)return Object(V.createElement)(Q.Placeholder,{icon:Object(V.createElement)($.BlockIcon,{icon:t,showColors:!0}),label:j,className:"wp-block-embed"},Object(V.createElement)("form",{onSubmit:this.setUrl},Object(V.createElement)("input",{type:"url",value:o||"",className:"components-placeholder__input","aria-label":j,placeholder:Object(G.__)("Enter URL to embed here…"),onChange:function(e){return n.setState({url:e.target.value})}}),Object(V.createElement)(Q.Button,{isLarge:!0,type:"submit"},Object(G.__)("Embed")),g&&Object(V.createElement)("p",{className:"components-placeholder__error"},Object(G.__)("Sorry, we could not embed that content."))));var v="photo"===l?this.getPhotoHtml(p):p.html,y=p.scripts,w=Object(At.parse)(o),C=Object(K.includes)(Lt,w.host.replace(/^www\./,"")),k=Object(G.sprintf)(Object(G.__)("Embedded content from %s"),w.host),E=It()(l,h),_="wp-embed"===l?Object(V.createElement)("div",{className:"wp-block-embed__wrapper",dangerouslySetInnerHTML:{__html:v}}):Object(V.createElement)("div",{className:"wp-block-embed__wrapper"},Object(V.createElement)(Q.SandBox,{html:v,scripts:y,title:k,type:E}));return Object(V.createElement)("figure",{className:It()(h,"wp-block-embed",{"is-type-video":"video"===l})},f,C?Object(V.createElement)(Q.Placeholder,{icon:Object(V.createElement)($.BlockIcon,{icon:t,showColors:!0}),label:j},Object(V.createElement)("p",{className:"components-placeholder__error"},Object(V.createElement)("a",{href:o},o)),Object(V.createElement)("p",{className:"components-placeholder__error"},Object(G.__)("Previews for this are unavailable in the editor, sorry!"))):_,(!$.RichText.isEmpty(i)||d)&&Object(V.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(G.__)("Write caption…"),value:i,onChange:function(e){return m({caption:e})},inlineToolbar:!0}))}}]),r}(V.Component)}var Dt={url:{type:"string"},caption:{source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0}};function Ft(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;return{title:t,description:n||Object(G.sprintf)(Object(G.__)("Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube."),t),icon:r,category:a,keywords:l,attributes:Dt,supports:Object(U.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,supportsResponsive:b["responsive-embeds"],cannotEmbed:p}}))(Ht(t,r)),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=It()("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(V.createElement)("figure",{className:i},Object(V.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(r,"\n")),!$.RichText.isEmpty(o)&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:o}))},deprecated:[{attributes:Dt,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=It()("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(V.createElement)("figure",{className:i},"\n".concat(r,"\n"),!$.RichText.isEmpty(o)&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:o}))}}]}}var Ut="core/embed",Vt=Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)("path",{d:"M19,4H5C3.89,4,3,4.9,3,6v12c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.11,4,19,4z M19,18H5V8h14V18z"})),Wt=Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("path",{d:"M21 3H3L1 5v14l2 2h18l2-2V5l-2-2zm0 16H3V5h18v14zM8 15a3 3 0 0 1 4-3V6h5v2h-3v7a3 3 0 0 1-6 0z"})),qt=Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)("path",{d:"M21,4H3C1.9,4,1,4.9,1,6v12c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V6C23,4.9,22.1,4,21,4z M21,18H3V6h18V18z"}),Object(V.createElement)("polygon",{points:"14.5 11 11 15.51 8.5 12.5 5 17 19 17"})),Kt=Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)("path",{d:"m10 8v8l5-4-5-4zm9-5h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2zm0 16h-14v-14h14v14z"})),Gt=Ft({title:Object(G.__)("Embed"),description:Object(G.__)("The Embed block allows you to easily add videos, images, tweets, audio, and other content to your post or page."),icon:Vt,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()})}}]}}),$t=[{name:"core-embed/twitter",settings:Ft({title:"Twitter",icon:{foreground:"#1da1f2",src:Object(V.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})))},keywords:["tweet"]}),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i]},{name:"core-embed/youtube",settings:Ft({title:"YouTube",icon:{foreground:"#ff0000",src:Object(V.createElement)("svg",{viewBox:"0 0 24 24"},Object(V.createElement)("path",{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"}))},keywords:[Object(G.__)("music"),Object(G.__)("video")]}),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i]},{name:"core-embed/facebook",settings:Ft({title:"Facebook",icon:{foreground:"#3b5998",src:Object(V.createElement)("svg",{viewBox:"0 0 24 24"},Object(V.createElement)("path",{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"}))}}),patterns:[/^https?:\/\/www\.facebook.com\/.+/i]},{name:"core-embed/instagram",settings:Ft({title:"Instagram",icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24"},Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"}))),keywords:[Object(G.__)("image")]}),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i]},{name:"core-embed/wordpress",settings:Ft({title:"WordPress",icon:{foreground:"#0073AA",src:Object(V.createElement)("svg",{viewBox:"0 0 24 24"},Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})))},keywords:[Object(G.__)("post"),Object(G.__)("blog")]})},{name:"core-embed/soundcloud",settings:Ft({title:"SoundCloud",icon:Wt,keywords:[Object(G.__)("music"),Object(G.__)("audio")]}),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i]},{name:"core-embed/spotify",settings:Ft({title:"Spotify",icon:{foreground:"#1db954",src:Object(V.createElement)("svg",{viewBox:"0 0 24 24"},Object(V.createElement)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"}))},keywords:[Object(G.__)("music"),Object(G.__)("audio")]}),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i]},{name:"core-embed/flickr",settings:Ft({title:"Flickr",icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24"},Object(V.createElement)("path",{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})),keywords:[Object(G.__)("image")]}),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i]},{name:"core-embed/vimeo",settings:Ft({title:"Vimeo",icon:{foreground:"#1ab7ea",src:Object(V.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})))},keywords:[Object(G.__)("video")]}),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i]}],Qt=[{name:"core-embed/animoto",settings:Ft({title:"Animoto",icon:Kt}),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i]},{name:"core-embed/cloudup",settings:Ft({title:"Cloudup",icon:Vt}),patterns:[/^https?:\/\/cloudup\.com\/.+/i]},{name:"core-embed/collegehumor",settings:Ft({title:"CollegeHumor",icon:Kt}),patterns:[/^https?:\/\/(www\.)?collegehumor\.com\/.+/i]},{name:"core-embed/dailymotion",settings:Ft({title:"Dailymotion",icon:Kt}),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i]},{name:"core-embed/funnyordie",settings:Ft({title:"Funny or Die",icon:Kt}),patterns:[/^https?:\/\/(www\.)?funnyordie\.com\/.+/i]},{name:"core-embed/hulu",settings:Ft({title:"Hulu",icon:Kt}),patterns:[/^https?:\/\/(www\.)?hulu\.com\/.+/i]},{name:"core-embed/imgur",settings:Ft({title:"Imgur",icon:qt}),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i]},{name:"core-embed/issuu",settings:Ft({title:"Issuu",icon:Vt}),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i]},{name:"core-embed/kickstarter",settings:Ft({title:"Kickstarter",icon:Vt}),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i]},{name:"core-embed/meetup-com",settings:Ft({title:"Meetup.com",icon:Vt}),patterns:[/^https?:\/\/(www\.)?meetu(\.ps|p\.com)\/.+/i]},{name:"core-embed/mixcloud",settings:Ft({title:"Mixcloud",icon:Wt,keywords:[Object(G.__)("music"),Object(G.__)("audio")]}),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i]},{name:"core-embed/photobucket",settings:Ft({title:"Photobucket",icon:qt}),patterns:[/^http:\/\/g?i*\.photobucket\.com\/.+/i]},{name:"core-embed/polldaddy",settings:Ft({title:"Polldaddy",icon:Vt}),patterns:[/^https?:\/\/(www\.)?polldaddy\.com\/.+/i]},{name:"core-embed/reddit",settings:Ft({title:"Reddit",icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24"},Object(V.createElement)("path",{d:"M22 11.816c0-1.256-1.02-2.277-2.277-2.277-.593 0-1.122.24-1.526.613-1.48-.965-3.455-1.594-5.647-1.69l1.17-3.702 3.18.75c.01 1.027.847 1.86 1.877 1.86 1.035 0 1.877-.84 1.877-1.877 0-1.035-.842-1.877-1.877-1.877-.77 0-1.43.466-1.72 1.13L13.55 3.92c-.204-.047-.4.067-.46.26l-1.35 4.27c-2.317.037-4.412.67-5.97 1.67-.402-.355-.917-.58-1.493-.58C3.02 9.54 2 10.56 2 11.815c0 .814.433 1.523 1.078 1.925-.037.222-.06.445-.06.673 0 3.292 4.01 5.97 8.94 5.97s8.94-2.678 8.94-5.97c0-.214-.02-.424-.052-.632.687-.39 1.154-1.12 1.154-1.964zm-3.224-7.422c.606 0 1.1.493 1.1 1.1s-.493 1.1-1.1 1.1-1.1-.494-1.1-1.1.493-1.1 1.1-1.1zm-16 7.422c0-.827.673-1.5 1.5-1.5.313 0 .598.103.838.27-.85.675-1.477 1.478-1.812 2.36-.32-.274-.525-.676-.525-1.13zm9.183 7.79c-4.502 0-8.165-2.33-8.165-5.193S7.457 9.22 11.96 9.22s8.163 2.33 8.163 5.193-3.663 5.193-8.164 5.193zM20.635 13c-.326-.89-.948-1.7-1.797-2.383.247-.186.55-.3.882-.3.827 0 1.5.672 1.5 1.5 0 .482-.23.91-.586 1.184zm-11.64 1.704c-.76 0-1.397-.616-1.397-1.376 0-.76.636-1.397 1.396-1.397.76 0 1.376.638 1.376 1.398 0 .76-.616 1.376-1.376 1.376zm7.405-1.376c0 .76-.615 1.376-1.375 1.376s-1.4-.616-1.4-1.376c0-.76.64-1.397 1.4-1.397.76 0 1.376.638 1.376 1.398zm-1.17 3.38c.15.152.15.398 0 .55-.675.674-1.728 1.002-3.22 1.002l-.01-.002-.012.002c-1.492 0-2.544-.328-3.218-1.002-.152-.152-.152-.398 0-.55.152-.152.4-.15.55 0 .52.52 1.394.775 2.67.775l.01.002.01-.002c1.276 0 2.15-.253 2.67-.775.15-.152.398-.152.55 0z"}))}),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i]},{name:"core-embed/reverbnation",settings:Ft({title:"ReverbNation",icon:Wt}),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i]},{name:"core-embed/screencast",settings:Ft({title:"Screencast",icon:Kt}),patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i]},{name:"core-embed/scribd",settings:Ft({title:"Scribd",icon:Vt}),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i]},{name:"core-embed/slideshare",settings:Ft({title:"Slideshare",icon:Vt}),patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i]},{name:"core-embed/smugmug",settings:Ft({title:"SmugMug",icon:qt}),patterns:[/^https?:\/\/(www\.)?smugmug\.com\/.+/i]},{name:"core-embed/speaker",settings:Ft({title:"Speaker",icon:Wt,supports:{inserter:!1}}),patterns:[]},{name:"core-embed/speaker-deck",settings:Ft({title:"Speaker Deck",icon:Vt,transform:[{type:"block",blocks:["core-embed/speaker"],transform:function(e){return Object(D.createBlock)("core-embed/speaker-deck",{content:e})}}]}),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i]},{name:"core-embed/ted",settings:Ft({title:"TED",icon:Kt}),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i]},{name:"core-embed/tumblr",settings:Ft({title:"Tumblr",icon:{foreground:"#35465c",src:Object(V.createElement)("svg",{viewBox:"0 0 24 24"},Object(V.createElement)("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-5.57 14.265c-2.445.042-3.37-1.742-3.37-2.998V10.6H8.922V9.15c1.703-.615 2.113-2.15 2.21-3.026.006-.06.053-.084.08-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.13 1.08 1.107.3-.008.698-.094.907-.194l.54 1.6c-.205.297-1.12.642-1.946.657z"}))}}),patterns:[/^https?:\/\/(www\.)?tumblr\.com\/.+/i]},{name:"core-embed/videopress",settings:Ft({title:"VideoPress",icon:Kt,keywords:[Object(G.__)("video")]}),patterns:[/^https?:\/\/videopress\.com\/.+/i]},{name:"core-embed/wordpress-tv",settings:Ft({title:"WordPress.tv",icon:Kt}),patterns:[/^https?:\/\/wordpress\.tv\/.+/i]}];function Yt(e){return e?Object(G.__)("The download button is visible."):Object(G.__)("The download button is hidden.")}function Zt(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(G.__)("URL")}];return s&&(u=[{value:i,label:Object(G.__)("Media File")},{value:s,label:Object(G.__)("Attachment Page")}]),Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Text Link Settings")},Object(V.createElement)(Q.SelectControl,{label:Object(G.__)("Link To"),value:l,options:u,onChange:o}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Open in New Tab"),checked:n,onChange:a})),Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Download Button Settings")},Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Show Download Button"),help:Yt,checked:r,onChange:c}))))}var 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))).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(V.createElement)($.MediaPlaceholder,{icon:"media-default",labels:{title:Object(G.__)("File"),name:Object(G.__)("a file")},onSelect:this.onSelectFile,notices:a,onError:c.createErrorNotice,accept:"*"});var j=q()(t,{"is-transient":Object(de.isBlobURL)(s)});return Object(V.createElement)(V.Fragment,null,Object(V.createElement)(Zt,Object(Y.a)({hrefs:{href:s,textLinkHref:u,attachmentPage:f}},{openInNewWindow:!!b,showDownloadButton:m,changeLinkDestinationOption:this.changeLinkDestinationOption,changeOpenInNewWindow:this.changeOpenInNewWindow,changeShowDownloadButton:this.changeShowDownloadButton})),Object(V.createElement)($.BlockControls,null,Object(V.createElement)(Q.Toolbar,null,Object(V.createElement)($.MediaUpload,{onSelect:this.onSelectFile,value:h,render:function(e){var t=e.open;return Object(V.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(G.__)("Edit file"),onClick:t,icon:"edit"})}}))),Object(V.createElement)("div",{className:j},Object(V.createElement)("div",{className:"".concat(t,"__content-wrapper")},Object(V.createElement)($.RichText,{wrapperClassName:"".concat(t,"__textlink"),tagName:"div",value:l,placeholder:Object(G.__)("Write file name…"),keepPlaceholderOnFocus:!0,formattingControls:[],onChange:function(e){return o({fileName:e})}}),m&&Object(V.createElement)("div",{className:"".concat(t,"__button-richtext-wrapper")},Object(V.createElement)($.RichText,{tagName:"div",className:"".concat(t,"__button"),value:d,formattingControls:[],placeholder:Object(G.__)("Add text…"),keepPlaceholderOnFocus:!0,onChange:function(e){return o({downloadButtonText:e})}}))),n&&Object(V.createElement)(Q.ClipboardButton,{isDefault:!0,text:s,className:"".concat(t,"__copy-url-button"),onCopy:this.confirmCopyURL,onFinishCopy:this.resetCopyConfirmation},O?Object(G.__)("Copied!"):Object(G.__)("Copy URL"))))}}]),t}(V.Component),Xt=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])(Jt),en="core/file",tn={title:Object(G.__)("File"),description:Object(G.__)("Add a link to a file that visitors can download."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("path",{d:"M9 6l2 2h9v10H4V6h5m1-2H4L2 6v12l2 2h16l2-2V8l-2-2h-8l-2-2z"})),category:"common",keywords:[Object(G.__)("document"),Object(G.__)("pdf")],attributes:{id:{type:"number"},href:{type:"string"},fileName:{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:{source:"html",selector:"a[download]",default:Object(G.__)("Download")}},supports:{align:!0},transforms:{from:[{type:"files",isMatch:function(e){return 1===e.length},priority:15,transform:function(e){var t=e[0],n=Object(de.createBlobURL)(t);return Object(D.createBlock)("core/file",{href:n,fileName:t.name,textLinkHref:n})}},{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(K.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(K.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(K.includes)(n.mime_type,"image")},transform:function(e){return Object(D.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id})}}]},edit:Xt,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(V.createElement)("div",null,!$.RichText.isEmpty(r)&&Object(V.createElement)("a",{href:o,target:a,rel:!!a&&"noreferrer noopener"},Object(V.createElement)($.RichText.Content,{value:r})),c&&Object(V.createElement)("a",{href:n,className:"wp-block-file__button",download:Object(Le.getTextContent)(Object(Le.create)({html:r}))},Object(V.createElement)($.RichText.Content,{value:i})))}},nn="core/html",rn={title:Object(G.__)("Custom HTML"),description:Object(G.__)("Add your own HTML (and view it right here as you edit!)."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("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(G.__)("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(V.createElement)("div",{className:"wp-block-html"},Object(V.createElement)($.BlockControls,null,Object(V.createElement)("div",{className:"components-toolbar"},Object(V.createElement)("button",{className:"components-tab-button ".concat(o?"":"is-active"),onClick:function(){return r({isPreview:!1})}},Object(V.createElement)("span",null,"HTML")),Object(V.createElement)("button",{className:"components-tab-button ".concat(o?"is-active":""),onClick:function(){return r({isPreview:!0})}},Object(V.createElement)("span",null,Object(G.__)("Preview"))))),Object(V.createElement)(Q.Disabled.Consumer,null,function(e){return o||e?Object(V.createElement)(Q.SandBox,{html:t.content}):Object(V.createElement)($.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(G.__)("Write HTML…"),"aria-label":Object(G.__)("HTML")})}))}),save:function(e){var t=e.attributes;return Object(V.createElement)(V.RawHTML,null,t.content)}},on=["image","video"],an=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(V.createElement)($.BlockControls,null,Object(V.createElement)(Q.Toolbar,null,Object(V.createElement)($.MediaUpload,{onSelect:n,allowedTypes:on,value:t,render:function(e){var t=e.open;return Object(V.createElement)(Q.IconButton,{className:"components-toolbar__control",label:Object(G.__)("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(V.createElement)(V.Fragment,null,this.renderToolbarEditButton(),Object(V.createElement)("figure",{className:r},Object(V.createElement)("img",{src:n,alt:t})))}},{key:"renderVideo",value:function(){var e=this.props,t=e.mediaUrl,n=e.className;return Object(V.createElement)(V.Fragment,null,this.renderToolbarEditButton(),Object(V.createElement)("figure",{className:n},Object(V.createElement)("video",{controls:!0,src:t})))}},{key:"renderPlaceholder",value:function(){var e=this.props,t=e.onSelectMedia,n=e.className;return Object(V.createElement)($.MediaPlaceholder,{icon:"format-image",labels:{title:Object(G.__)("Media area"),name:Object(G.__)("a media file (image or video)")},className:n,onSelect:t,accept:"image/*,video/*",allowedTypes:on})}},{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(V.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}(V.Component),cn=["core/button","core/paragraph","core/heading","core/list"],ln=[["core/paragraph",{fontSize:"large",placeholder:"Content…"}]],sn=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=this.props.setAttributes;t=e.media_type?"image"===e.media_type?"image":"video":e.type,n({mediaAlt:e.alt,mediaId:e.id,mediaType:t,mediaUrl: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(V.createElement)(an,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=this.props,t=e.attributes,n=e.className,r=e.backgroundColor,o=e.setAttributes,a=e.setBackgroundColor,c=t.mediaPosition,i=t.mediaWidth,l=this.state.mediaWidth,s=q()(n,Object(F.a)({"has-media-on-the-right":"right"===c},r.class,r.class)),u="".concat(l||i,"%"),b={gridTemplateColumns:"right"===c?"auto ".concat(u):"".concat(u," auto"),backgroundColor:r.color},m=[{value:r.color,onChange:a,label:Object(G.__)("Background Color")}],d=[{icon:"align-pull-left",title:Object(G.__)("Show media on left"),isActive:"left"===c,onClick:function(){return o({mediaPosition:"left"})}},{icon:"align-pull-right",title:Object(G.__)("Show media on right"),isActive:"right"===c,onClick:function(){return o({mediaPosition:"right"})}}];return Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.InspectorControls,null,Object(V.createElement)($.PanelColorSettings,{title:Object(G.__)("Color Settings"),initialOpen:!1,colorSettings:m})),Object(V.createElement)($.BlockControls,null,Object(V.createElement)(Q.Toolbar,{controls:d})),Object(V.createElement)("div",{className:s,style:b},this.renderMediaArea(),Object(V.createElement)($.InnerBlocks,{allowedBlocks:cn,template:ln})))}}]),t}(V.Component),un=Object($.withColors)("backgroundColor")(sn),bn="core/media-text",mn={title:Object(G.__)("Media & Text"),icon:Object(V.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(V.createElement)("path",{d:"M13 17h8v-2h-8v2zM3 19h8V5H3v14zM13 9h8V7h-8v2zm0 4h8v-2h-8v2z"})),category:"layout",keywords:[Object(G.__)("image"),Object(G.__)("video"),Object(G.__)("half")],attributes:{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}},supports:{align:["wide","full"]},edit:un,save:function(e){var t,n=e.attributes,r=n.backgroundColor,o=n.customBackgroundColor,a=n.mediaAlt,c=n.mediaPosition,i=n.mediaType,l=n.mediaUrl,s=n.mediaWidth,u={image:function(){return Object(V.createElement)("img",{src:l,alt:a})},video:function(){return Object(V.createElement)("video",{controls:!0,src:l})}},b=Object($.getColorClassName)("background-color",r),m=q()(Object(F.a)({"has-media-on-the-right":"right"===c},b,b));50!==s&&(t="right"===c?"auto ".concat(s,"%"):"".concat(s,"% auto"));var d={backgroundColor:b?void 0:o,gridTemplateColumns:t};return Object(V.createElement)("div",{className:m,style:d},Object(V.createElement)("figure",{className:"wp-block-media-text__media"},(u[i]||K.noop)()),Object(V.createElement)("div",{className:"wp-block-media-text__content"},Object(V.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(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.BlockAlignmentToolbar,{value:t,onChange:this.setAlignment})),Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Latest Comments Settings")},Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Display Avatar"),checked:r,onChange:this.toggleDisplayAvatar}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Display Date"),checked:o,onChange:this.toggleDisplayDate}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Display Excerpt"),checked:a,onChange:this.toggleDisplayExcerpt}),Object(V.createElement)(Q.RangeControl,{label:Object(G.__)("Number of Comments"),value:n,onChange:this.setCommentsToShow,min:1,max:100}))),Object(V.createElement)(Q.Disabled,null,Object(V.createElement)($.ServerSideRender,{block:"core/latest-comments",attributes:this.props.attributes})))}}]),t}(V.Component),hn="core/latest-comments",pn={title:Object(G.__)("Latest Comments"),description:Object(G.__)("Show a list of your site’s most recent comments."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M22 4l-2-2H4L2 4v12l2 2h14l4 4V4zm-2 0v13l-1-1H4V4h16z"}),Object(V.createElement)("path",{d:"M6 12h12v2H6zM6 9h12v2H6zM6 6h12v2H6z"}))),category:"widgets",keywords:[Object(G.__)("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}},gn=n(45),On=n(49),fn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).toggleDisplayPostDate=e.toggleDisplayPostDate.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"toggleDisplayPostDate",value:function(){var e=this.props.attributes.displayPostDate;(0,this.props.setAttributes)({displayPostDate:!e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.categoriesList,o=t.setAttributes,a=t.latestPosts,c=n.displayPostDate,i=n.align,l=n.postLayout,s=n.columns,u=n.order,b=n.orderBy,m=n.categories,d=n.postsToShow,h=Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Latest Posts Settings")},Object(V.createElement)(Q.QueryControls,Object(Y.a)({order:u,orderBy:b},{numberOfItems:d,categoriesList:r,selectedCategoryId:m,onOrderChange:function(e){return o({order:e})},onOrderByChange:function(e){return o({orderBy:e})},onCategoryChange:function(e){return o({categories:""!==e?e:void 0})},onNumberOfItemsChange:function(e){return o({postsToShow:e})}})),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Display post date"),checked:c,onChange:this.toggleDisplayPostDate}),"grid"===l&&Object(V.createElement)(Q.RangeControl,{label:Object(G.__)("Columns"),value:s,onChange:function(e){return o({columns:e})},min:2,max:p?Math.min(6,a.length):6}))),p=Array.isArray(a)&&a.length;if(!p)return Object(V.createElement)(V.Fragment,null,h,Object(V.createElement)(Q.Placeholder,{icon:"admin-post",label:Object(G.__)("Latest Posts")},Array.isArray(a)?Object(G.__)("No posts found."):Object(V.createElement)(Q.Spinner,null)));var g=a.length>d?a.slice(0,d):a,O=[{icon:"list-view",title:Object(G.__)("List View"),onClick:function(){return o({postLayout:"list"})},isActive:"list"===l},{icon:"grid-view",title:Object(G.__)("Grid View"),onClick:function(){return o({postLayout:"grid"})},isActive:"grid"===l}],f=Object(gn.getSettings)().formats.date;return Object(V.createElement)(V.Fragment,null,h,Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.BlockAlignmentToolbar,{value:i,onChange:function(e){o({align:e})},controls:["center","wide","full"]}),Object(V.createElement)(Q.Toolbar,{controls:O})),Object(V.createElement)("ul",{className:q()(this.props.className,Object(F.a)({"is-grid":"grid"===l},"columns-".concat(s),"grid"===l))},g.map(function(t,n){return Object(V.createElement)("li",{key:n},Object(V.createElement)("a",{href:t.link,target:"_blank"},Object(On.decodeEntities)(t.title.rendered.trim())||Object(G.__)("(Untitled)")),c&&t.date_gmt&&Object(V.createElement)("time",{dateTime:Object(gn.format)("c",t.date_gmt),className:"".concat(e.props.className,"__post-date")},Object(gn.dateI18n)(f,t.date_gmt)))})))}}]),t}(V.Component),jn=Object(oe.withSelect)(function(e,t){var n=t.attributes,r=n.postsToShow,o=n.order,a=n.orderBy,c=n.categories,i=e("core").getEntityRecords;return{latestPosts:i("postType","post",Object(K.pickBy)({categories:c,order:o,orderby:a,per_page:r},function(e){return!Object(K.isUndefined)(e)})),categoriesList:i("taxonomy","category",{per_page:100})}})(fn),vn="core/latest-posts",yn={title:Object(G.__)("Latest Posts"),description:Object(G.__)("Display a list of your most recent posts."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)("rect",{x:"11",y:"7",width:"6",height:"2"}),Object(V.createElement)("rect",{x:"11",y:"11",width:"6",height:"2"}),Object(V.createElement)("rect",{x:"11",y:"15",width:"6",height:"2"}),Object(V.createElement)("rect",{x:"7",y:"7",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"7",y:"11",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"7",y:"15",width:"2",height:"2"}),Object(V.createElement)("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(G.__)("recent posts")],supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if("left"===t||"right"===t||"wide"===t||"full"===t)return{"data-align":t}},edit:jn,save:function(){return null}},wn=Object(U.a)({},Object(D.getPhrasingContentSchema)(),{ul:{},ol:{attributes:["type"]}});["ul","ol"].forEach(function(e){wn[e].children={li:{children:wn}}});var Cn={className:!1},kn={ordered:{type:"boolean",default:!1},values:{source:"html",selector:"ol,ul",multiline:"li"}},En="core/list",_n={title:Object(G.__)("List"),description:Object(G.__)("Numbers, bullets, up to you. Add a list of items."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("g",null,Object(V.createElement)("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(G.__)("bullet list"),Object(G.__)("ordered list"),Object(G.__)("numbered list")],attributes:kn,supports:Cn,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(D.createBlock)("core/list",{values:Object(Le.toHTMLString)(Object(Le.join)(e.map(function(e){var t=e.content;return Object(Le.replace)(Object(Le.create)({html:t}),/\n/g,"\u2028")}),"\u2028"),"li")})}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.value;return Object(D.createBlock)("core/list",{values:Object(Le.toHTMLString)(Object(Le.create)({html:t,multilineTag:"p"}),"li")})}},{type:"raw",selector:"ol,ul",schema:{ol:wn.ol,ul:wn.ul},transform:function(e){return Object(D.createBlock)("core/list",Object(U.a)({},Object(D.getBlockAttributes)(Object(D.getBlockType)("core/list"),e.outerHTML),{ordered:"OL"===e.nodeName}))}},{type:"pattern",regExp:/^[*-]\s/,transform:function(e){var t=e.content;return Object(D.createBlock)("core/list",{values:"
  • ".concat(t,"
  • ")})}},{type:"pattern",regExp:/^1[.)]\s/,transform:function(e){var t=e.content;return Object(D.createBlock)("core/list",{ordered:!0,values:"
  • ".concat(t,"
  • ")})}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.values;return Object(Le.split)(Object(Le.create)({html:t,multilineTag:"li"}),"\u2028").map(function(e){return Object(D.createBlock)("core/paragraph",{content:Object(Le.toHTMLString)(e)})})}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.values;return Object(D.createBlock)("core/quote",{value:Object(Le.toHTMLString)(Object(Le.create)({html:t,multilineTag:"li"}),"p")})}}]},deprecated:[{supports:Cn,attributes:Object(U.a)({},Object(K.omit)(kn,["ordered"]),{nodeName:{type:"string",source:"property",selector:"ol,ul",property:"nodeName",default:"UL"}}),migrate:function(e){var t=e.nodeName,n=Object(Se.a)(e,["nodeName"]);return Object(U.a)({},n,{ordered:"OL"===t})},save:function(e){var t=e.attributes,n=t.nodeName,r=t.values;return Object(V.createElement)($.RichText.Content,{tagName:n.toLowerCase(),value:r})}}],merge:function(e,t){var n=t.values;return n&&"
  • "!==n?Object(U.a)({},e,{values:e.values+n}):e},edit:function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).setupEditor=e.setupEditor.bind(Object(ne.a)(Object(ne.a)(e))),e.getEditorSettings=e.getEditorSettings.bind(Object(ne.a)(Object(ne.a)(e))),e.setNextValues=e.setNextValues.bind(Object(ne.a)(Object(ne.a)(e))),e.state={internalListType:null},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"findInternalListType",value:function(e){var t=e.parents,n=Object(K.find)(t,function(e){return"UL"===e.nodeName||"OL"===e.nodeName});return n?n.nodeName:null}},{key:"setupEditor",value:function(e){var t=this;e.on("nodeChange",function(e){t.setState({internalListType:t.findInternalListType(e)})});var n=window.navigator.browserLanguage||window.navigator.language;!/^(?:fr|nl|sv|ru|de|es|it)/.test(n)?(e.shortcuts.add("meta+219","Decrease indent","Outdent"),e.shortcuts.add("meta+221","Increase indent","Indent")):(e.shortcuts.add("meta+shift+m","Decrease indent","Outdent"),e.shortcuts.add("meta+m","Increase indent","Indent")),this.editor=e}},{key:"createSetListType",value:function(e,t){var n=this;return function(){var r=n.props.setAttributes,o=n.state.internalListType;o?o!==e&&n.editor&&n.editor.execCommand(t):r({ordered:"OL"===e})}}},{key:"createExecCommand",value:function(e){var t=this;return function(){t.editor&&t.editor.execCommand(e)}}},{key:"getEditorSettings",value:function(e){return Object(U.a)({},e,{plugins:(e.plugins||[]).concat("lists"),lists_indent_on_tab:!1})}},{key:"setNextValues",value:function(e){this.props.setAttributes({values:e})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.insertBlocksAfter,r=e.setAttributes,o=e.mergeBlocks,a=e.onReplace,c=e.className,i=t.ordered,l=t.values,s=i?"ol":"ul";return Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,{controls:[{icon:"editor-ul",title:Object(G.__)("Convert to unordered list"),isActive:!i,onClick:this.createSetListType("UL","InsertUnorderedList")},{icon:"editor-ol",title:Object(G.__)("Convert to ordered list"),isActive:i,onClick:this.createSetListType("OL","InsertOrderedList")},{icon:"editor-outdent",title:Object(G.__)("Outdent list item"),onClick:this.createExecCommand("Outdent")},{icon:"editor-indent",title:Object(G.__)("Indent list item"),onClick:this.createExecCommand("Indent")}]}),Object(V.createElement)($.RichText,{multiline:"li",tagName:s,unstableGetSettings:this.getEditorSettings,unstableOnSetup:this.setupEditor,onChange:this.setNextValues,value:l,wrapperClassName:"block-library-list",className:c,placeholder:Object(G.__)("Write list…"),onMerge:o,onSplit:n?function(e,t){for(var o=arguments.length,a=new Array(o>2?o-2:0),c=2;c"!==t&&a.push(Object(D.createBlock)("core/list",{ordered:i,values:t})),r({values:e}),n(a)}:void 0,onRemove:function(){return a([])}}))}}]),t}(V.Component),save:function(e){var t=e.attributes,n=t.ordered,r=t.values,o=n?"ol":"ul";return Object(V.createElement)($.RichText.Content,{tagName:o,value:r,multiline:"li"})}};var xn=Object(oe.withDispatch)(function(e,t){var n=t.clientId,r=t.attributes,o=e("core/editor").replaceBlock;return{convertToHTML:function(){o(n,Object(D.createBlock)("core/html",{content:r.originalUndelimitedContent}))}}})(function(e){var t,n=e.attributes,r=e.convertToHTML,o=n.originalName,a=n.originalUndelimitedContent,c=!!a,i=Object(D.getBlockType)("core/html"),l=[];return c&&i?(t=Object(G.sprintf)(Object(G.__)('Your site doesn\'t include support for the "%s" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'),o),l.push(Object(V.createElement)(Q.Button,{key:"convert",onClick:r,isLarge:!0,isPrimary:!0},Object(G.__)("Keep as HTML")))):t=Object(G.sprintf)(Object(G.__)('Your site doesn\'t include support for the "%s" block. You can leave this block intact or remove it entirely.'),o),Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.Warning,{actions:l},t),Object(V.createElement)(V.RawHTML,null,a))}),Sn="core/missing",Tn={name:Sn,category:"common",title:Object(G.__)("Unrecognized Block"),description:Object(G.__)("Your site doesn't include support for this block."),supports:{className:!1,customClassName:!1,inserter:!1,html:!1},attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"html"}},edit:xn,save:function(e){var t=e.attributes;return Object(V.createElement)(V.RawHTML,null,t.originalContent)}},Nn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onChangeInput=e.onChangeInput.bind(Object(ne.a)(Object(ne.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(ne.a)(Object(ne.a)(e))),e.state={defaultText:Object(G.__)("Read more")},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"onChangeInput",value:function(e){this.setState({defaultText:""});var t=0===e.target.value.length?void 0:e.target.value;this.props.setAttributes({customText:t})}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=this.props.insertBlocksAfter;t===He.ENTER&&n([Object(D.createBlock)(Object(D.getDefaultBlockName)())])}},{key:"render",value:function(){var e=this.props.attributes,t=e.customText,n=e.noTeaser,r=this.props.setAttributes,o=this.state.defaultText,a=void 0!==t?t:o,c=a.length+1;return Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,null,Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)('Hide the teaser before the "More" tag'),checked:!!n,onChange:function(){return r({noTeaser:!n})}}))),Object(V.createElement)("div",{className:"wp-block-more"},Object(V.createElement)("input",{type:"text",value:a,size:c,onChange:this.onChangeInput,onKeyDown:this.onKeyDown})))}}]),t}(V.Component),Bn="core/more",An={title:Object(G._x)("More","block name"),description:Object(G.__)('Want to show only part of this post on your blog’s home page? Insert a "More" block where you want the split.'),icon:Object(V.createElement)(Q.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)(Q.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)(Q.G,null,Object(V.createElement)(Q.Path,{d:"M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z"}))),category:"layout",supports:{customClassName:!1,className:!1,html:!1,multiple:!1},attributes:{customText:{type:"string"},noTeaser:{type:"boolean",default:!1}},transforms:{from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:function(e){return e.dataset&&"core/more"===e.dataset.block},transform:function(e){var t=e.dataset,n=t.customText,r=t.noTeaser,o={};return n&&(o.customText=n),""===r&&(o.noTeaser=!0),Object(D.createBlock)("core/more",o)}}]},edit:Nn,save:function(e){var t=e.attributes,n=t.customText,r=t.noTeaser,o=n?"\x3c!--more ".concat(n,"--\x3e"):"\x3c!--more--\x3e",a=r?"\x3c!--noteaser--\x3e":"";return Object(V.createElement)(V.RawHTML,null,Object(K.compact)([o,a]).join("\n"))}},Rn="core/nextpage",In={title:Object(G.__)("Page break"),description:Object(G.__)("This block allows you to set break points on your post. Visitors of your blog are then presented with content split into multiple pages."),icon:Object(V.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M9 12h6v-2H9zm-7 0h5v-2H2zm15 0h5v-2h-5zm3 2v2l-6 6H6a2 2 0 0 1-2-2v-6h2v6h6v-4a2 2 0 0 1 2-2h6zM4 8V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4h-2V4H6v4z"}))),category:"layout",keywords:[Object(G.__)("next page"),Object(G.__)("pagination")],supports:{customClassName:!1,className:!1,html:!1},attributes:{},transforms:{from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:function(e){return e.dataset&&"core/nextpage"===e.dataset.block},transform:function(){return Object(D.createBlock)("core/nextpage",{})}}]},edit:function(){return Object(V.createElement)("div",{className:"wp-block-nextpage"},Object(V.createElement)("span",null,Object(G.__)("Page break")))},save:function(){return Object(V.createElement)(V.RawHTML,null,"\x3c!--nextpage--\x3e")}},Ln="core/preformatted",zn={title:Object(G.__)("Preformatted"),description:Object(G.__)("Add text that respects your spacing and tabs, and also allows styling."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)("path",{d:"M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"}),Object(V.createElement)("rect",{x:"6",y:"10",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"6",y:"14",width:"8",height:"2"}),Object(V.createElement)("rect",{x:"16",y:"14",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"10",y:"10",width:"8",height:"2"})),category:"formatting",attributes:{content:{source:"html",selector:"pre"}},transforms:{from:[{type:"block",blocks:["core/code","core/paragraph"],transform:function(e){var t=e.content;return Object(D.createBlock)("core/preformatted",{content:t})}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName)},schema:{pre:{children:Object(D.getPhrasingContentSchema)()}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(D.createBlock)("core/paragraph",e)}}]},edit:function(e){var t=e.attributes,n=e.mergeBlocks,r=e.setAttributes,o=e.className,a=t.content;return Object(V.createElement)($.RichText,{tagName:"pre",value:a,onChange:function(e){r({content:e})},placeholder:Object(G.__)("Write preformatted text…"),wrapperClassName:o,onMerge:n})},save:function(e){var t=e.attributes.content;return Object(V.createElement)($.RichText.Content,{tagName:"pre",value:t})},merge:function(e,t){return{content:e.content+t.content}}},Mn="is-style-".concat("solid-color"),Pn=function(e){function t(e){var n;return Object(Z.a)(this,t),(n=Object(X.a)(this,Object(ee.a)(t).call(this,e))).wasTextColorAutomaticallyComputed=!1,n.pullQuoteMainColorSetter=n.pullQuoteMainColorSetter.bind(Object(ne.a)(Object(ne.a)(n))),n.pullQuoteTextColorSetter=n.pullQuoteTextColorSetter.bind(Object(ne.a)(Object(ne.a)(n))),n}return Object(te.a)(t,e),Object(J.a)(t,[{key:"pullQuoteMainColorSetter",value:function(e){var t=this.props,n=t.colorUtils,r=t.textColor,o=t.setTextColor;(0,t.setMainColor)(e),r.color&&!this.wasTextColorAutomaticallyComputed||(this.wasTextColorAutomaticallyComputed=!0,o(n.getMostReadableColor(e)))}},{key:"pullQuoteTextColorSetter",value:function(e){(0,this.props.setTextColor)(e),this.wasTextColorAutomaticallyComputed=!1}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.mainColor,r=e.textColor,o=e.setAttributes,a=e.isSelected,c=e.className,i=t.value,l=t.citation,s=Object(K.includes)(c,Mn),u=s?{backgroundColor:n.color}:{borderColor:n.color},b={color:r.color},m=r.color?q()("has-text-color",Object(F.a)({},r.class,r.class)):void 0;return Object(V.createElement)(V.Fragment,null,Object(V.createElement)("figure",{style:u,className:q()(c,Object(F.a)({},n.class,s&&n.class))},Object(V.createElement)("blockquote",{style:b,className:m},Object(V.createElement)($.RichText,{multiline:!0,value:i,onChange:function(e){return o({value:e})},placeholder:Object(G.__)("Write quote…"),wrapperClassName:"block-library-pullquote__content"}),(!$.RichText.isEmpty(l)||a)&&Object(V.createElement)($.RichText,{value:l,placeholder:Object(G.__)("Write citation…"),onChange:function(e){return o({citation:e})},className:"wp-block-pullquote__citation"}))),Object(V.createElement)($.InspectorControls,null,Object(V.createElement)($.PanelColorSettings,{title:Object(G.__)("Color Settings"),colorSettings:[{value:n.color,onChange:this.pullQuoteMainColorSetter,label:Object(G.__)("Main Color")},{value:r.color,onChange:this.pullQuoteTextColorSetter,label:Object(G.__)("Text Color")}]},s&&Object(V.createElement)($.ContrastChecker,Object(Y.a)({textColor:r.color,backgroundColor:n.color},{isLargeText:!1})))))}}]),t}(V.Component),Hn=Object($.withColors)({mainColor:"background-color",textColor:"color"})(Pn),Dn={value:{source:"html",selector:"blockquote",multiline:"p"},citation:{source:"html",selector:"cite"},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},Fn="core/pullquote",Un={title:Object(G.__)("Pullquote"),description:Object(G.__)("Highlight a quote from your post or page by displaying it as a graphic element."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)("polygon",{points:"21 18 2 18 2 20 21 20"}),Object(V.createElement)("path",{d:"m19 10v4h-15v-4h15m1-2h-17c-0.55 0-1 0.45-1 1v6c0 0.55 0.45 1 1 1h17c0.55 0 1-0.45 1-1v-6c0-0.55-0.45-1-1-1z"}),Object(V.createElement)("polygon",{points:"21 4 2 4 2 6 21 6"})),category:"formatting",attributes:Dn,styles:[{name:"default",label:Object(G.__)("Regular"),isDefault:!0},{name:"solid-color",label:Object(G.__)("Solid Color")}],supports:{align:["left","right","wide","full"]},edit:Hn,save:function(e){var t,n,r=e.attributes,o=r.mainColor,a=r.customMainColor,c=r.textColor,i=r.customTextColor,l=r.value,s=r.citation,u=r.className;if(Object(K.includes)(u,Mn))(t=Object($.getColorClassName)("background-color",o))||(n={backgroundColor:a});else if(a)n={borderColor:a};else if(o){var b=Object(K.get)(Object(oe.select)("core/editor").getEditorSettings(),["colors"],[]);n={borderColor:Object($.getColorObjectByAttributeValues)(b,o).color}}var m=Object($.getColorClassName)("color",c),d=c||i?q()("has-text-color",Object(F.a)({},m,m)):void 0,h=m?void 0:{color:i};return Object(V.createElement)("figure",{className:t,style:n},Object(V.createElement)("blockquote",{className:d,style:h},Object(V.createElement)($.RichText.Content,{value:l,multiline:!0}),!$.RichText.isEmpty(s)&&Object(V.createElement)($.RichText.Content,{tagName:"cite",value:s})))},deprecated:[{attributes:Object(U.a)({},Dn),save:function(e){var t=e.attributes,n=t.value,r=t.citation;return Object(V.createElement)("blockquote",null,Object(V.createElement)($.RichText.Content,{value:n,multiline:!0}),!$.RichText.isEmpty(r)&&Object(V.createElement)($.RichText.Content,{tagName:"cite",value:r}))}},{attributes:Object(U.a)({},Dn,{citation:{source:"html",selector:"footer"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.value,r=t.citation,o=t.align;return Object(V.createElement)("blockquote",{className:"align".concat(o)},Object(V.createElement)($.RichText.Content,{value:n,multiline:!0}),!$.RichText.isEmpty(r)&&Object(V.createElement)($.RichText.Content,{tagName:"footer",value:r}))}}]},Vn=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).titleField=Object(V.createRef)(),e.editButton=Object(V.createRef)(),e.handleFormSubmit=e.handleFormSubmit.bind(Object(ne.a)(Object(ne.a)(e))),e.handleTitleChange=e.handleTitleChange.bind(Object(ne.a)(Object(ne.a)(e))),e.handleTitleKeyDown=e.handleTitleKeyDown.bind(Object(ne.a)(Object(ne.a)(e))),e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentDidMount",value:function(){this.props.isEditing&&this.titleField.current&&this.titleField.current.select()}},{key:"componentDidUpdate",value:function(e){!e.isEditing&&this.props.isEditing&&this.titleField.current.select(),!e.isEditing&&!e.isSaving||this.props.isEditing||this.props.isSaving||this.editButton.current.focus()}},{key:"handleFormSubmit",value:function(e){e.preventDefault(),this.props.onSave()}},{key:"handleTitleChange",value:function(e){this.props.onChangeTitle(e.target.value)}},{key:"handleTitleKeyDown",value:function(e){e.keyCode===He.ESCAPE&&(e.stopPropagation(),this.props.onCancel())}},{key:"render",value:function(){var e=this.props,t=e.isEditing,n=e.title,r=e.isSaving,o=e.onEdit,a=e.instanceId;return Object(V.createElement)(V.Fragment,null,!t&&!r&&Object(V.createElement)("div",{className:"reusable-block-edit-panel"},Object(V.createElement)("b",{className:"reusable-block-edit-panel__info"},n),Object(V.createElement)(Q.Button,{ref:this.editButton,isLarge:!0,className:"reusable-block-edit-panel__button",onClick:o},Object(G.__)("Edit"))),(t||r)&&Object(V.createElement)("form",{className:"reusable-block-edit-panel",onSubmit:this.handleFormSubmit},Object(V.createElement)("label",{htmlFor:"reusable-block-edit-panel__title-".concat(a),className:"reusable-block-edit-panel__label"},Object(G.__)("Name:")),Object(V.createElement)("input",{ref:this.titleField,type:"text",disabled:r,className:"reusable-block-edit-panel__title",value:n,onChange:this.handleTitleChange,onKeyDown:this.handleTitleKeyDown,id:"reusable-block-edit-panel__title-".concat(a)}),Object(V.createElement)(Q.Button,{type:"submit",isLarge:!0,isBusy:r,disabled:!n||r,className:"reusable-block-edit-panel__button"},Object(G.__)("Save"))))}}]),t}(V.Component),Wn=Object(re.withInstanceId)(Vn);var qn=function(e){var t=e.title,n=Object(G.sprintf)(Object(G.__)("Reusable Block: %s"),t);return Object(V.createElement)(Q.Tooltip,{text:n},Object(V.createElement)("span",{className:"reusable-block-indicator"},Object(V.createElement)(Q.Dashicon,{icon:"controls-repeat"})))},Kn=function(e){function t(e){var n,r=e.reusableBlock;return Object(Z.a)(this,t),(n=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).startEditing=n.startEditing.bind(Object(ne.a)(Object(ne.a)(n))),n.stopEditing=n.stopEditing.bind(Object(ne.a)(Object(ne.a)(n))),n.setAttributes=n.setAttributes.bind(Object(ne.a)(Object(ne.a)(n))),n.setTitle=n.setTitle.bind(Object(ne.a)(Object(ne.a)(n))),n.save=n.save.bind(Object(ne.a)(Object(ne.a)(n))),r&&r.isTemporary?n.state={isEditing:!0,title:r.title,changedAttributes:{}}:n.state={isEditing:!1,title:null,changedAttributes:null},n}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentDidMount",value:function(){this.props.reusableBlock||this.props.fetchReusableBlock()}},{key:"startEditing",value:function(){var e=this.props.reusableBlock;this.setState({isEditing:!0,title:e.title,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,title:null,changedAttributes:null})}},{key:"setAttributes",value:function(e){this.setState(function(t){if(null!==t.changedAttributes)return{changedAttributes:Object(U.a)({},t.changedAttributes,e)}})}},{key:"setTitle",value:function(e){this.setState({title:e})}},{key:"save",value:function(){var e=this.props,t=e.reusableBlock,n=e.onUpdateTitle,r=e.updateAttributes,o=e.block,a=e.onSave,c=this.state,i=c.title,l=c.changedAttributes;i!==t.title&&n(i),r(o.clientId,l),a(),this.stopEditing()}},{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.reusableBlock,r=e.block,o=e.isFetching,a=e.isSaving,c=this.state,i=c.isEditing,l=c.title,s=c.changedAttributes;if(!n&&o)return Object(V.createElement)(Q.Placeholder,null,Object(V.createElement)(Q.Spinner,null));if(!n||!r)return Object(V.createElement)(Q.Placeholder,null,Object(G.__)("Block has been deleted or is unavailable."));var u=Object(V.createElement)($.BlockEdit,Object(Y.a)({},this.props,{isSelected:i&&t,clientId:r.clientId,name:r.name,attributes:Object(U.a)({},r.attributes,s),setAttributes:i?this.setAttributes:K.noop}));return i||(u=Object(V.createElement)(Q.Disabled,null,u)),Object(V.createElement)(V.Fragment,null,(t||i)&&Object(V.createElement)(Wn,{isEditing:i,title:null!==l?l:n.title,isSaving:a&&!n.isTemporary,onEdit:this.startEditing,onChangeTitle:this.setTitle,onSave:this.save,onCancel:this.stopEditing}),!t&&!i&&Object(V.createElement)(qn,{title:n.title}),u)}}]),t}(V.Component),Gn=Object(re.compose)([Object(oe.withSelect)(function(e,t){var n=e("core/editor"),r=n.getReusableBlock,o=n.isFetchingReusableBlock,a=n.isSavingReusableBlock,c=n.getBlock,i=t.attributes.ref,l=r(i);return{reusableBlock:l,isFetching:o(i),isSaving:a(i),block:l?c(l.clientId):null}}),Object(oe.withDispatch)(function(e,t){var n=e("core/editor"),r=n.fetchReusableBlocks,o=n.updateBlockAttributes,a=n.updateReusableBlockTitle,c=n.saveReusableBlock,i=t.attributes.ref;return{fetchReusableBlock:Object(K.partial)(r,i),updateAttributes:o,onUpdateTitle:Object(K.partial)(a,i),onSave:Object(K.partial)(c,i)}})])(Kn),$n="core/block",Qn={title:Object(G.__)("Reusable Block"),category:"reusable",description:Object(G.__)("Create content, and save it to reuse across your site. Update the block, and the changes apply everywhere it’s used."),attributes:{ref:{type:"number"}},supports:{customClassName:!1,html:!1,inserter:!1},edit:Gn,save:function(){return null}},Yn="core/separator",Zn={title:Object(G.__)("Separator"),description:Object(G.__)("Insert a horizontal line where you want to create a break between ideas."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("path",{d:"M19 13H5v-2h14v2z"})),category:"layout",keywords:[Object(G.__)("horizontal-line"),"hr",Object(G.__)("divider")],styles:[{name:"default",label:Object(G.__)("Short Line"),isDefault:!0},{name:"wide",label:Object(G.__)("Wide Line")},{name:"dots",label:Object(G.__)("Dots")}],transforms:{from:[{type:"pattern",trigger:"enter",regExp:/^-{3,}$/,transform:function(){return Object(D.createBlock)("core/separator")}},{type:"raw",selector:"hr",schema:{hr:{}}}]},edit:function(e){var t=e.className;return Object(V.createElement)("hr",{className:t})},save:function(){return Object(V.createElement)("hr",null)}},Jn=n(58),Xn="core/shortcode",er={title:Object(G.__)("Shortcode"),description:Object(G.__)("Add a shortcode -- a WordPress-specific snippet of code written between square brackets."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M8.5,21.4l1.9,0.5l5.2-19.3l-1.9-0.5L8.5,21.4z M3,19h4v-2H5V7h2V5H3V19z M17,5v2h2v10h-2v2h4V5H17z"})),category:"widgets",attributes:{text:{type:"string",source:"text"}},transforms:{from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:function(e,t){var n=t.content;return Object(Jn.removep)(Object(Jn.autop)(n))}}},priority:20}]},supports:{customClassName:!1,className:!1,html:!1},edit:Object(re.withInstanceId)(function(e){var t=e.attributes,n=e.setAttributes,r=e.instanceId,o="blocks-shortcode-input-".concat(r);return Object(V.createElement)("div",{className:"wp-block-shortcode"},Object(V.createElement)("label",{htmlFor:o},Object(V.createElement)(Q.Dashicon,{icon:"shortcode"}),Object(G.__)("Shortcode")),Object(V.createElement)($.PlainText,{className:"input-control",id:o,value:t.text,placeholder:Object(G.__)("Write shortcode here…"),onChange:function(e){return n({text:e})}}))}),save:function(e){var t=e.attributes;return Object(V.createElement)(V.RawHTML,null,t.text)}},tr="core/spacer",nr={title:Object(G.__)("Spacer"),description:Object(G.__)("Add an element with empty space and custom height."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"}))),category:"layout",attributes:{height:{type:"number",default:100}},edit:Object(re.withInstanceId)(function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,o=e.toggleSelection,a=e.instanceId,c=t.height,i="block-spacer-height-input-".concat(a);return Object(V.createElement)(V.Fragment,null,Object(V.createElement)(Q.ResizableBox,{className:q()("block-library-spacer__resize-container",{"is-selected":n}),size:{height:c},minHeight:"20",enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStop:function(e,t,n,a){r({height:parseInt(c+a.height,10)}),o(!0)},onResizeStart:function(){o(!1)}}),Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Spacer Settings")},Object(V.createElement)(Q.BaseControl,{label:Object(G.__)("Height in pixels"),id:i},Object(V.createElement)("input",{type:"number",id:i,onChange:function(e){r({height:parseInt(e.target.value,10)})},value:c,min:"20",step:"10"})))))}),save:function(e){var t=e.attributes;return Object(V.createElement)("div",{style:{height:t.height},"aria-hidden":!0})}},rr=n(27),or=n.n(rr),ar="core/subhead",cr={title:Object(G.__)("Subheading (deprecated)"),description:Object(G.__)("This block is deprecated. Please use the Paragraph block instead."),icon:Object(V.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(V.createElement)("path",{d:"M7.1 6l-.5 3h4.5L9.4 19h3l1.8-10h4.5l.5-3H7.1z"})),category:"common",supports:{inserter:!1,multiple:!1},attributes:{content:{source:"html",selector:"p"},align:{type:"string"}},transforms:{to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(D.createBlock)("core/paragraph",e)}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.align,a=t.content,c=t.placeholder;return or()("The Subheading block",{alternative:"the Paragraph block",plugin:"Gutenberg"}),Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.AlignmentToolbar,{value:o,onChange:function(e){n({align:e})}})),Object(V.createElement)($.RichText,{tagName:"p",value:a,onChange:function(e){n({content:e})},style:{textAlign:o},className:r,placeholder:c||Object(G.__)("Write subheading…")}))},save:function(e){var t=e.attributes,n=e.className,r=t.align,o=t.content;return Object(V.createElement)($.RichText.Content,{tagName:"p",className:n,style:{textAlign:r},value:o})}};var ir=function(e){function t(){var e;return Object(Z.a)(this,t),(e=Object(X.a)(this,Object(ee.a)(t).apply(this,arguments))).onCreateTable=e.onCreateTable.bind(Object(ne.a)(Object(ne.a)(e))),e.onChangeFixedLayout=e.onChangeFixedLayout.bind(Object(ne.a)(Object(ne.a)(e))),e.onChange=e.onChange.bind(Object(ne.a)(Object(ne.a)(e))),e.onChangeInitialColumnCount=e.onChangeInitialColumnCount.bind(Object(ne.a)(Object(ne.a)(e))),e.onChangeInitialRowCount=e.onChangeInitialRowCount.bind(Object(ne.a)(Object(ne.a)(e))),e.renderSection=e.renderSection.bind(Object(ne.a)(Object(ne.a)(e))),e.getTableControls=e.getTableControls.bind(Object(ne.a)(Object(ne.a)(e))),e.onInsertRow=e.onInsertRow.bind(Object(ne.a)(Object(ne.a)(e))),e.onInsertRowBefore=e.onInsertRowBefore.bind(Object(ne.a)(Object(ne.a)(e))),e.onInsertRowAfter=e.onInsertRowAfter.bind(Object(ne.a)(Object(ne.a)(e))),e.onDeleteRow=e.onDeleteRow.bind(Object(ne.a)(Object(ne.a)(e))),e.onInsertColumn=e.onInsertColumn.bind(Object(ne.a)(Object(ne.a)(e))),e.onInsertColumnBefore=e.onInsertColumnBefore.bind(Object(ne.a)(Object(ne.a)(e))),e.onInsertColumnAfter=e.onInsertColumnAfter.bind(Object(ne.a)(Object(ne.a)(e))),e.onDeleteColumn=e.onDeleteColumn.bind(Object(ne.a)(Object(ne.a)(e))),e.state={initialRowCount:2,initialColumnCount:2,selectedCell:null},e}return Object(te.a)(t,e),Object(J.a)(t,[{key:"onChangeInitialColumnCount",value:function(e){this.setState({initialColumnCount:e})}},{key:"onChangeInitialRowCount",value:function(e){this.setState({initialRowCount:e})}},{key:"onCreateTable",value:function(e){e.preventDefault();var t,n,r,o=this.props.setAttributes,a=this.state,c=a.initialRowCount,i=a.initialColumnCount;c=parseInt(c,10)||2,i=parseInt(i,10)||2,o((n=(t={rowCount:c,columnCount:i}).rowCount,r=t.columnCount,{body:Object(K.times)(n,function(){return{cells:Object(K.times)(r,function(){return{content:"",tag:"td"}})}})}))}},{key:"onChangeFixedLayout",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({hasFixedLayout:!t.hasFixedLayout})}},{key:"onChange",value:function(e){var t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes;(0,n.setAttributes)(function(e,t){var n=t.section,r=t.rowIndex,o=t.columnIndex,a=t.content;return Object(F.a)({},n,e[n].map(function(e,t){return t!==r?e:{cells:e.cells.map(function(e,t){return t!==o?e:Object(U.a)({},e,{content:a})})}}))}(r,{section:t.section,rowIndex:t.rowIndex,columnIndex:t.columnIndex,content:e}))}}},{key:"onInsertRow",value:function(e){var t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes,o=n.setAttributes,a=t.section,c=t.rowIndex;this.setState({selectedCell:null}),o(function(e,t){var n=t.section,r=t.rowIndex,o=e[n][0].cells.length;return Object(F.a)({},n,Object(H.a)(e[n].slice(0,r)).concat([{cells:Object(K.times)(o,function(){return{content:"",tag:"td"}})}],Object(H.a)(e[n].slice(r))))}(r,{section:a,rowIndex:c+e}))}}},{key:"onInsertRowBefore",value:function(){this.onInsertRow(0)}},{key:"onInsertRowAfter",value:function(){this.onInsertRow(1)}},{key:"onDeleteRow",value:function(){var e=this.state.selectedCell;if(e){var t=this.props,n=t.attributes,r=t.setAttributes,o=e.section,a=e.rowIndex;this.setState({selectedCell:null}),r(function(e,t){var n=t.section,r=t.rowIndex;return Object(F.a)({},n,e[n].filter(function(e,t){return t!==r}))}(n,{section:o,rowIndex:a}))}}},{key:"onInsertColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes,o=n.setAttributes,a=t.section,c=t.columnIndex;this.setState({selectedCell:null}),o(function(e,t){var n=t.section,r=t.columnIndex;return Object(F.a)({},n,e[n].map(function(e){return{cells:Object(H.a)(e.cells.slice(0,r)).concat([{content:"",tag:"td"}],Object(H.a)(e.cells.slice(r)))}}))}(r,{section:a,columnIndex:c+e}))}}},{key:"onInsertColumnBefore",value:function(){this.onInsertColumn(0)}},{key:"onInsertColumnAfter",value:function(){this.onInsertColumn(1)}},{key:"onDeleteColumn",value:function(){var e=this.state.selectedCell;if(e){var t=this.props,n=t.attributes,r=t.setAttributes,o=e.section,a=e.columnIndex;this.setState({selectedCell:null}),r(function(e,t){var n=t.section,r=t.columnIndex;return Object(F.a)({},n,e[n].map(function(e){return{cells:e.cells.filter(function(e,t){return t!==r})}}).filter(function(e){return e.cells.length}))}(n,{section:o,columnIndex:a}))}}},{key:"createOnFocus",value:function(e){var t=this;return function(){t.setState({selectedCell:e})}}},{key:"getTableControls",value:function(){var e=this.state.selectedCell;return[{icon:"table-row-before",title:Object(G.__)("Add Row Before"),isDisabled:!e,onClick:this.onInsertRowBefore},{icon:"table-row-after",title:Object(G.__)("Add Row After"),isDisabled:!e,onClick:this.onInsertRowAfter},{icon:"table-row-delete",title:Object(G.__)("Delete Row"),isDisabled:!e,onClick:this.onDeleteRow},{icon:"table-col-before",title:Object(G.__)("Add Column Before"),isDisabled:!e,onClick:this.onInsertColumnBefore},{icon:"table-col-after",title:Object(G.__)("Add Column After"),isDisabled:!e,onClick:this.onInsertColumnAfter},{icon:"table-col-delete",title:Object(G.__)("Delete Column"),isDisabled:!e,onClick:this.onDeleteColumn}]}},{key:"renderSection",value:function(e){var t=this,n=e.type,r=e.rows;if(!r.length)return null;var o="t".concat(n),a=this.state.selectedCell;return Object(V.createElement)(o,null,r.map(function(e,r){var o=e.cells;return Object(V.createElement)("tr",{key:r},o.map(function(e,o){var c=e.content,i=e.tag,l=a&&n===a.section&&r===a.rowIndex&&o===a.columnIndex,s={section:n,rowIndex:r,columnIndex:o},u=q()({"is-selected":l});return Object(V.createElement)(i,{key:o,className:u},Object(V.createElement)($.RichText,{className:"wp-block-table__cell-content",value:c,onChange:t.onChange,unstableOnFocus:t.createOnFocus(s)}))}))}))}},{key:"componentDidUpdate",value:function(){var e=this.props.isSelected,t=this.state.selectedCell;!e&&t&&this.setState({selectedCell:null})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,r=this.state,o=r.initialRowCount,a=r.initialColumnCount,c=t.hasFixedLayout,i=t.head,l=t.body,s=t.foot,u=!i.length&&!l.length&&!s.length,b=this.renderSection;if(u)return Object(V.createElement)("form",{onSubmit:this.onCreateTable},Object(V.createElement)(Q.TextControl,{type:"number",label:Object(G.__)("Column Count"),value:a,onChange:this.onChangeInitialColumnCount,min:"1"}),Object(V.createElement)(Q.TextControl,{type:"number",label:Object(G.__)("Row Count"),value:o,onChange:this.onChangeInitialRowCount,min:"1"}),Object(V.createElement)(Q.Button,{isPrimary:!0,type:"submit"},Object(G.__)("Create")));var m=q()(n,{"has-fixed-layout":c});return Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)(Q.Toolbar,null,Object(V.createElement)(Q.DropdownMenu,{icon:"editor-table",label:Object(G.__)("Edit Table"),controls:this.getTableControls()}))),Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Table Settings"),className:"blocks-table-settings"},Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Fixed width table cells"),checked:!!c,onChange:this.onChangeFixedLayout}))),Object(V.createElement)("table",{className:m},Object(V.createElement)(b,{type:"head",rows:i}),Object(V.createElement)(b,{type:"body",rows:l}),Object(V.createElement)(b,{type:"foot",rows:s})))}}]),t}(V.Component),lr={tr:{children:{th:{children:Object(D.getPhrasingContentSchema)()},td:{children:Object(D.getPhrasingContentSchema)()}}}},sr={table:{children:{thead:{children:lr},tfoot:{children:lr},tbody:{children:lr}}}};function ur(e){return{type:"array",default:[],source:"query",selector:"t".concat(e," tr"),query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{source:"html"},tag:{type:"string",default:"td",source:"tag"}}}}}}var br="core/table",mr={title:Object(G.__)("Table"),description:Object(G.__)("Insert a table -- perfect for sharing charts and data."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M20 3H5L3 5v14l2 2h15l2-2V5l-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z"}))),category:"formatting",attributes:{hasFixedLayout:{type:"boolean",default:!1},head:ur("head"),body:ur("body"),foot:ur("foot")},styles:[{name:"regular",label:Object(G.__)("Regular"),isDefault:!0},{name:"stripes",label:Object(G.__)("Stripes")}],supports:{align:!0},transforms:{from:[{type:"raw",selector:"table",schema:sr}]},edit:ir,save:function(e){var t=e.attributes,n=t.hasFixedLayout,r=t.head,o=t.body,a=t.foot;if(!r.length&&!o.length&&!a.length)return null;var c=q()({"has-fixed-layout":n}),i=function(e){var t=e.type,n=e.rows;if(!n.length)return null;var r="t".concat(t);return Object(V.createElement)(r,null,n.map(function(e,t){var n=e.cells;return Object(V.createElement)("tr",{key:t},n.map(function(e,t){var n=e.content,r=e.tag;return Object(V.createElement)($.RichText.Content,{tagName:r,value:n,key:t})}))}))};return Object(V.createElement)("table",{className:c},Object(V.createElement)(i,{type:"head",rows:r}),Object(V.createElement)(i,{type:"body",rows:o}),Object(V.createElement)(i,{type:"foot",rows:a}))}},dr="core/template",hr={title:Object(G.__)("Reusable Template"),category:"reusable",description:Object(G.__)("Template block used as a container."),icon:Object(V.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(V.createElement)("rect",{x:"0",fill:"none",width:"24",height:"24"}),Object(V.createElement)("g",null,Object(V.createElement)("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),supports:{customClassName:!1,html:!1,inserter:!1},edit:function(){return Object(V.createElement)($.InnerBlocks,null)},save:function(){return Object(V.createElement)($.InnerBlocks.Content,null)}},pr="core/text-columns",gr={supports:{inserter:!1},title:Object(G.__)("Text Columns (deprecated)"),description:Object(G.__)("This block is deprecated. Please use the Columns block instead."),icon:"columns",category:"layout",attributes:{content:{type:"array",source:"query",selector:"p",query:{children:{source:"html"}},default:[{},{}]},columns:{type:"number",default:2},width:{type:"string"}},transforms:{to:[{type:"block",blocks:["core/columns"],transform:function(e){var t=e.className,n=e.columns,r=e.content,o=e.width;return Object(D.createBlock)("core/columns",{align:"wide"===o||"full"===o?o:void 0,className:t,columns:n},r.map(function(e){var t=e.children;return Object(D.createBlock)("core/column",{},[Object(D.createBlock)("core/paragraph",{content:t})])}))}}]},getEditWrapperProps:function(e){var t=e.width;if("wide"===t||"full"===t)return{"data-align":t}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.width,a=t.content,c=t.columns;return or()("The Text Columns block",{alternative:"the Columns block",plugin:"Gutenberg"}),Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.BlockAlignmentToolbar,{value:o,onChange:function(e){return n({width:e})},controls:["center","wide","full"]})),Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,null,Object(V.createElement)(Q.RangeControl,{label:Object(G.__)("Columns"),value:c,onChange:function(e){return n({columns:e})},min:2,max:4}))),Object(V.createElement)("div",{className:"".concat(r," align").concat(o," columns-").concat(c)},Object(K.times)(c,function(e){return Object(V.createElement)("div",{className:"wp-block-column",key:"column-".concat(e)},Object(V.createElement)($.RichText,{tagName:"p",value:Object(K.get)(a,[e,"children"]),onChange:function(t){n({content:Object(H.a)(a.slice(0,e)).concat([{children:t}],Object(H.a)(a.slice(e+1)))})},placeholder:Object(G.__)("New Column")}))})))},save:function(e){var t=e.attributes,n=t.width,r=t.content,o=t.columns;return Object(V.createElement)("div",{className:"align".concat(n," columns-").concat(o)},Object(K.times)(o,function(e){return Object(V.createElement)("div",{className:"wp-block-column",key:"column-".concat(e)},Object(V.createElement)($.RichText.Content,{tagName:"p",value:Object(K.get)(r,[e,"children"])}))}))}},Or="core/verse",fr={title:Object(G.__)("Verse"),description:Object(G.__)("A block for haiku? Why not? Blocks for all the things! (See what we did here?)"),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("path",{d:"M3 17v4h4l11-11-4-4L3 17zm3 2H5v-1l9-9 1 1-9 9zM21 6l-3-3h-1l-2 2 4 4 2-2V6z"})),category:"formatting",keywords:[Object(G.__)("poetry")],attributes:{content:{source:"html",selector:"pre"},textAlign:{type:"string"}},transforms:{from:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(D.createBlock)("core/verse",e)}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(D.createBlock)("core/paragraph",e)}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=e.mergeBlocks,a=t.textAlign,c=t.content;return Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)($.AlignmentToolbar,{value:a,onChange:function(e){n({textAlign:e})}})),Object(V.createElement)($.RichText,{tagName:"pre",value:c,onChange:function(e){n({content:e})},style:{textAlign:a},placeholder:Object(G.__)("Write…"),wrapperClassName:r,onMerge:o}))},save:function(e){var t=e.attributes,n=e.className,r=t.textAlign,o=t.content;return Object(V.createElement)($.RichText.Content,{tagName:"pre",className:n,style:{textAlign:r},value:o})},merge:function(e,t){return{content:e.content+t.content}}},jr=["video"],vr=["image"],yr=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.videoPlayer=Object(V.createRef)(),e.posterImageButton=Object(V.createRef)(),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.onSelectPoster=e.onSelectPoster.bind(Object(ne.a)(Object(ne.a)(e))),e.onRemovePoster=e.onRemovePoster.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].url;o({src:t})},onError:function(t){e.setState({editing:!0}),r.createErrorNotice(t)},allowedTypes:jr})}}},{key:"componentDidUpdate",value:function(e){this.props.attributes.poster!==e.attributes.poster&&this.videoPlayer.current.load()}},{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;e!==n.src&&r({src:e,id:void 0}),this.setState({editing:!1})}},{key:"onSelectPoster",value:function(e){(0,this.props.setAttributes)({poster:e.url})}},{key:"onRemovePoster",value:function(){(0,this.props.setAttributes)({poster:""}),this.posterImageButton.current.focus()}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.autoplay,r=t.caption,o=t.controls,a=t.loop,c=t.muted,i=t.poster,l=t.preload,s=t.src,u=this.props,b=u.setAttributes,m=u.isSelected,d=u.className,h=u.noticeOperations,p=u.noticeUI,g=this.state.editing,O=function(){e.setState({editing:!0})};return g?Object(V.createElement)($.MediaPlaceholder,{icon:"media-video",labels:{title:Object(G.__)("Video"),name:Object(G.__)("a video")},className:d,onSelect:function(t){if(!t||!t.url)return b({src:void 0,id:void 0}),void O();b({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"video/*",allowedTypes:jr,value:this.props.attributes,notices:p,onError:h.createErrorNotice}):Object(V.createElement)(V.Fragment,null,Object(V.createElement)($.BlockControls,null,Object(V.createElement)(Q.Toolbar,null,Object(V.createElement)(Q.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(G.__)("Edit video"),onClick:O,icon:"edit"}))),Object(V.createElement)($.InspectorControls,null,Object(V.createElement)(Q.PanelBody,{title:Object(G.__)("Video Settings")},Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:a}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Muted"),onChange:this.toggleAttribute("muted"),checked:c}),Object(V.createElement)(Q.ToggleControl,{label:Object(G.__)("Playback Controls"),onChange:this.toggleAttribute("controls"),checked:o}),Object(V.createElement)(Q.SelectControl,{label:Object(G.__)("Preload"),value:l,onChange:function(e){return b({preload:e})},options:[{value:"auto",label:Object(G.__)("Auto")},{value:"metadata",label:Object(G.__)("Metadata")},{value:"none",label:Object(G.__)("None")}]}),Object(V.createElement)(Q.BaseControl,{className:"editor-video-poster-control",label:Object(G.__)("Poster Image")},Object(V.createElement)($.MediaUpload,{title:Object(G.__)("Select Poster Image"),onSelect:this.onSelectPoster,allowedTypes:vr,render:function(t){var n=t.open;return Object(V.createElement)(Q.Button,{isDefault:!0,onClick:n,ref:e.posterImageButton},e.props.attributes.poster?Object(G.__)("Replace image"):Object(G.__)("Select Poster Image"))}}),!!this.props.attributes.poster&&Object(V.createElement)(Q.Button,{onClick:this.onRemovePoster,isLink:!0,isDestructive:!0},Object(G.__)("Remove Poster Image"))))),Object(V.createElement)("figure",{className:d},Object(V.createElement)(Q.Disabled,null,Object(V.createElement)("video",{controls:o,poster:i,src:s,ref:this.videoPlayer})),(!$.RichText.isEmpty(r)||m)&&Object(V.createElement)($.RichText,{tagName:"figcaption",placeholder:Object(G.__)("Write caption…"),value:r,onChange:function(e){return b({caption:e})},inlineToolbar:!0})))}}]),t}(V.Component),wr=Object(Q.withNotices)(yr),Cr="core/video",kr={title:Object(G.__)("Video"),description:Object(G.__)("Embed a video file and a simple video player."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(V.createElement)("path",{d:"M4 6l2 4h14v8H4V6m18-2h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4L2 6v12l2 2h16l2-2V4z"})),keywords:[Object(G.__)("movie")],category:"common",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{source:"html",selector:"figcaption"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src"}},transforms:{from:[{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("video/")},transform:function(e){var t=e[0];return Object(D.createBlock)("core/video",{src:Object(de.createBlobURL)(t)})}}]},supports:{align:!0},edit:wr,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.controls,a=t.loop,c=t.muted,i=t.poster,l=t.preload,s=t.src;return Object(V.createElement)("figure",null,s&&Object(V.createElement)("video",{autoPlay:n,controls:o,loop:a,muted:c,poster:i,preload:"metadata"!==l?l:void 0,src:s}),!$.RichText.isEmpty(r)&&Object(V.createElement)($.RichText.Content,{tagName:"figcaption",value:r}))}};var Er=function(e){function t(e){var n;return Object(Z.a)(this,t),(n=Object(X.a)(this,Object(ee.a)(t).call(this,e))).initialize=n.initialize.bind(Object(ne.a)(Object(ne.a)(n))),n.onSetup=n.onSetup.bind(Object(ne.a)(Object(ne.a)(n))),n.focus=n.focus.bind(Object(ne.a)(Object(ne.a)(n))),n}return Object(te.a)(t,e),Object(J.a)(t,[{key:"componentDidMount",value:function(){var e=window.wpEditorL10n.tinymce,t=e.baseURL,n=e.suffix;window.tinymce.EditorManager.overrideDefaults({base_url:t,suffix:n}),"complete"===document.readyState?this.initialize():window.addEventListener("DOMContentLoaded",this.initialize)}},{key:"componentWillUnmount",value:function(){window.addEventListener("DOMContentLoaded",this.initialize),wp.oldEditor.remove("editor-".concat(this.props.clientId))}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.clientId,r=t.attributes.content,o=window.tinymce.get("editor-".concat(n));e.attributes.content!==r&&o.setContent(r||"")}},{key:"initialize",value:function(){var e=this.props.clientId,t=window.wpEditorL10n.tinymce.settings;wp.oldEditor.initialize("editor-".concat(e),{tinymce:Object(U.a)({},t,{inline:!0,content_css:!1,fixed_toolbar_container:"#toolbar-".concat(e),setup:this.onSetup})})}},{key:"onSetup",value:function(e){var t=this,n=this.props,r=n.attributes.content,o=n.setAttributes,a=this.ref;this.editor=e,e.on("BeforeExecCommand",function(e){"WP_Help"===e.command&&e.preventDefault()}),r&&e.on("loadContent",function(){return e.setContent(r)}),e.on("blur",function(){return o({content:e.getContent()}),!1}),e.on("keydown",function(n){n.keyCode!==He.BACKSPACE&&n.keyCode!==He.DELETE||!function(e){var t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(t.props.onReplace([]),n.preventDefault(),n.stopImmediatePropagation()),n.altKey&&n.keyCode===He.F10&&n.stopPropagation()}),e.addButton("kitchensink",{tooltip:Object(G._x)("More","button to expand options"),icon:"dashicon dashicons-editor-kitchensink",onClick:function(){var t=!this.active();this.active(t),e.dom.toggleClass(a,"has-advanced-toolbar",t)}}),e.addButton("wp_add_media",{tooltip:Object(G.__)("Insert Media"),icon:"dashicon dashicons-admin-media",cmd:"WP_Medialib"}),e.on("init",function(){var e=t.editor.getBody();document.activeElement===e&&(e.blur(),t.editor.focus())})}},{key:"focus",value:function(){this.editor&&this.editor.focus()}},{key:"onToolbarKeyDown",value:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}},{key:"render",value:function(){var e=this,t=this.props.clientId;return[Object(V.createElement)("div",{key:"toolbar",id:"toolbar-".concat(t),ref:function(t){return e.ref=t},className:"block-library-classic__toolbar",onClick:this.focus,"data-placeholder":Object(G.__)("Classic"),onKeyDown:this.onToolbarKeyDown}),Object(V.createElement)("div",{key:"editor",id:"editor-".concat(t),className:"wp-block-freeform block-library-rich-text__tinymce"})]}}]),t}(V.Component),_r="core/freeform",xr={title:Object(G.__)("Classic"),description:Object(G.__)("It’s the classic WordPress editor and it’s a block! Drop the editor right in."),icon:Object(V.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(V.createElement)("path",{d:"M0,0h24v24H0V0z M0,0h24v24H0V0z",fill:"none"}),Object(V.createElement)("path",{d:"m20 7v10h-16v-10h16m0-2h-16c-1.1 0-1.99 0.9-1.99 2l-0.01 10c0 1.1 0.9 2 2 2h16c1.1 0 2-0.9 2-2v-10c0-1.1-0.9-2-2-2z"}),Object(V.createElement)("rect",{x:"11",y:"8",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"11",y:"11",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"8",y:"8",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"8",y:"11",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"5",y:"11",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"5",y:"8",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"8",y:"14",width:"8",height:"2"}),Object(V.createElement)("rect",{x:"14",y:"11",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"14",y:"8",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"17",y:"11",width:"2",height:"2"}),Object(V.createElement)("rect",{x:"17",y:"8",width:"2",height:"2"})),category:"formatting",attributes:{content:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1},edit:Er,save:function(e){var t=e.attributes.content;return Object(V.createElement)(V.RawHTML,null,t)}};n.d(t,"registerCoreBlocks",function(){return Sr});var Sr=function(){[r,o,a,i,w,c,N,l,s,u,b,m,d,h,p,g].concat(Object(H.a)($t),Object(H.a)(Qt),[O,window.wp&&window.wp.oldEditor?P:null,f,j,v,y,C,k,E,_,x,T,S,B,A,R,I,L,z,M]).forEach(function(e){if(e){var t=e.name,n=e.settings;Object(D.registerBlockType)(t,n)}}),Object(D.setDefaultBlockName)(be),window.wp&&window.wp.oldEditor&&Object(D.setFreeformContentHandlerName)(_r),Object(D.setUnregisteredTypeHandlerName)(Sn)}},3:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},32:function(e,t){!function(){e.exports=this.wp.blob}()},33:function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",function(){return r})},36:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return r})},37:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",function(){return r})},39:function(e,t){!function(){e.exports=this.wp.viewport}()},4:function(e,t){!function(){e.exports=this.wp.components}()},45:function(e,t){!function(){e.exports=this.wp.date}()},49:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},5:function(e,t){!function(){e.exports=this.wp.data}()},51:function(e,t,n){e.exports=function(e,t){var n,r,o,a=0;function c(){var t,c,i=r,l=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(c=0;c",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),b=["%","/","?",";","#"].concat(u),m=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},O={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},f=n(102);function j(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),i=-1!==a&&a127?R+="x":R+=A[I];if(!R.match(d)){var z=N.slice(0,x),M=N.slice(x+1),P=A.match(h);P&&(z.push(P[1]),M.unshift(P[2])),M.length&&(j="/"+M.join(".")+j),this.hostname=z.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=r.toASCII(this.hostname));var H=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+H,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==j[0]&&(j="/"+j))}if(!p[w])for(x=0,B=u.length;x0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!C.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=C.slice(-1)[0],_=(n.host||e.host||C.length>1)&&("."===E||".."===E)||""===E,x=0,S=C.length;S>=0;S--)"."===(E=C[S])?C.splice(S,1):".."===E?(C.splice(S,1),x++):x&&(C.splice(S,1),x--);if(!y&&!w)for(;x--;x)C.unshift("..");!y||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),_&&"/"!==C.join("/").substr(-1)&&C.push("");var T,N=""===C[0]||C[0]&&"/"===C[0].charAt(0);k&&(n.hostname=n.host=N?"":C.length?C.shift():"",(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift()));return(y=y||n.host&&C.length)&&!N&&C.unshift(""),C.length?n.pathname=C.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},78:function(e,t){!function(){e.exports=this.wp.coreData}()},8:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(15);function o(e){for(var t=1;t= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=s-u,w=Math.floor,C=String.fromCharCode;function k(e){throw new RangeError(v[e])}function E(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function _(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+E((e=e.replace(j,".")).split("."),t).join(".")}function x(e){for(var t,n,r=[],o=0,a=e.length;o=55296&&t<=56319&&o65535&&(t+=C((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=C(e)}).join("")}function T(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function N(e,t,n){var r=0;for(e=n?w(e/d):e>>1,e+=w(e/t);e>y*b>>1;r+=s)e=w(e/y);return w(r+(y+1)*e/(e+m))}function B(e){var t,n,r,o,a,c,i,m,d,O,f,j=[],v=e.length,y=0,C=p,E=h;for((n=e.lastIndexOf(g))<0&&(n=0),r=0;r=128&&k("not-basic"),j.push(e.charCodeAt(r));for(o=n>0?n+1:0;o=v&&k("invalid-input"),((m=(f=e.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:s)>=s||m>w((l-y)/c))&&k("overflow"),y+=m*c,!(m<(d=i<=E?u:i>=E+b?b:i-E));i+=s)c>w(l/(O=s-d))&&k("overflow"),c*=O;E=N(y-a,t=j.length+1,0==a),w(y/t)>l-C&&k("overflow"),C+=w(y/t),y%=t,j.splice(y++,0,C)}return S(j)}function A(e){var t,n,r,o,a,c,i,m,d,O,f,j,v,y,E,_=[];for(j=(e=x(e)).length,t=p,n=0,a=h,c=0;c=t&&fw((l-n)/(v=r+1))&&k("overflow"),n+=(i-t)*v,t=i,c=0;cl&&k("overflow"),f==t){for(m=n,d=s;!(m<(O=d<=a?u:d>=a+b?b:d-a));d+=s)E=m-O,y=s-O,_.push(C(T(O+E%y,0))),m=w(E/y);_.push(C(T(m,0))),a=N(n,v,r==o),n=0,++r}++n,++t}return _.join("")}i={version:"1.4.1",ucs2:{decode:x,encode:S},decode:B,encode:A,toASCII:function(e){return _(e,function(e){return f.test(e)?"xn--"+A(e):e})},toUnicode:function(e){return _(e,function(e){return O.test(e)?B(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(100)(e),n(53))}});