File Editor
Directories:
.. (Back)
vendor
Files:
a11y.js
a11y.min.js
annotations.js
annotations.min.js
api-fetch.js
api-fetch.min.js
autop.js
autop.min.js
blob.js
blob.min.js
block-editor.js
block-editor.min.js
block-library.js
block-library.min.js
block-serialization-default-parser.js
block-serialization-default-parser.min.js
blocks.js
blocks.min.js
components.js
components.min.js
compose.js
compose.min.js
core-data.js
core-data.min.js
data-controls.js
data-controls.min.js
data.js
data.min.js
date.js
date.min.js
deprecated.js
deprecated.min.js
dom-ready.js
dom-ready.min.js
dom.js
dom.min.js
edit-post.js
edit-post.min.js
editor.js
editor.min.js
element.js
element.min.js
escape-html.js
escape-html.min.js
format-library.js
format-library.min.js
hooks.js
hooks.min.js
html-entities.js
html-entities.min.js
i18n.js
i18n.min.js
is-shallow-equal.js
is-shallow-equal.min.js
keycodes.js
keycodes.min.js
list-reusable-blocks.js
list-reusable-blocks.min.js
media-utils.js
media-utils.min.js
notices.js
notices.min.js
nux.js
nux.min.js
plugins.js
plugins.min.js
priority-queue.js
priority-queue.min.js
redux-routine.js
redux-routine.min.js
rich-text.js
rich-text.min.js
server-side-render.js
server-side-render.min.js
shortcode.js
shortcode.min.js
token-list.js
token-list.min.js
url.js
url.min.js
viewport.js
viewport.min.js
wordcount.js
wordcount.min.js
Create New File
Create
Edit File: block-library.min.js
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="K51g")}({"1CF3":function(e,t){!function(){e.exports=this.wp.dom}()},"1OyB":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}))},"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"25BE":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}))},"4JlD":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<e.length;r++)n.push(t(e[r],r));return n}var c=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},"4eJC":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<l;c++)if(i.args[c]!==arguments[c]){i=i.next;continue e}return i!==r&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=r,i.prev=null,r.prev=i,r=i),i.val}i=i.next}for(t=new Array(l),c=0;c<l;c++)t[c]=arguments[c];return i={args:t,val:e.apply(null,t)},r?(r.prev=i,i.next=r):o=i,a===n?(o=o.prev).next=null:a++,r=i,i.val}return t&&t.maxSize&&(n=t.maxSize),c.clear=function(){r=null,o=null,a=0},c}},"A/WM":function(e,t,n){var r; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function o(e,o){if(o){var a=typeof o;"string"===a?function(e,t){for(var n=t.split(r),o=n.length,a=0;a<o;++a)e[n[a]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===a?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,o):"number"===a&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=new e;t(a,r);var c=[];for(var i in a)a[i]&&c.push(i);return c.join(" ")}}();e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},CxY0:function(e,t,n){"use strict";var r=n("nYho"),o=n("Nehr");function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=O,t.resolve=function(e,t){return O(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?O(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=O(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var c=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\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},f={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n("s4NR");function O(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&&a<e.indexOf("#")?"?":"#",s=e.split(i);s[0]=s[0].replace(/\\/g,"/");var O=e=s.join(i);if(O=O.trim(),!n&&1===e.split("#").length){var j=l.exec(O);if(j)return this.path=O,this.href=O,this.pathname=j[1],j[2]?(this.search=j[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var y=c.exec(O);if(y){var _=(y=y[0]).toLowerCase();this.protocol=_,O=O.substr(y.length)}if(n||y||O.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===O.substr(0,2);!k||y&&g[y]||(O=O.substr(2),this.slashes=!0)}if(!g[y]&&(k||y&&!f[y])){for(var C,w,E=-1,x=0;x<m.length;x++){-1!==(S=O.indexOf(m[x]))&&(-1===E||S<E)&&(E=S)}-1!==(w=-1===E?O.lastIndexOf("@"):O.lastIndexOf("@",E))&&(C=O.slice(0,w),O=O.slice(w+1),this.auth=decodeURIComponent(C)),E=-1;for(x=0;x<b.length;x++){var S;-1!==(S=O.indexOf(b[x]))&&(-1===E||S<E)&&(E=S)}-1===E&&(E=O.length),this.host=O.slice(0,E),O=O.slice(E),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var N=this.hostname.split(/\./),R=(x=0,N.length);x<R;x++){var A=N[x];if(A&&!A.match(d)){for(var B="",I=0,M=A.length;I<M;I++)A.charCodeAt(I)>127?B+="x":B+=A[I];if(!B.match(d)){var P=N.slice(0,x),L=N.slice(x+1),H=A.match(h);H&&(P.push(H[1]),L.unshift(H[2])),L.length&&(O="/"+L.join(".")+O),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=r.toASCII(this.hostname));var z=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+z,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==O[0]&&(O="/"+O))}if(!p[_])for(x=0,R=u.length;x<R;x++){var V=u[x];if(-1!==O.indexOf(V)){var F=encodeURIComponent(V);F===V&&(F=escape(V)),O=O.split(V).join(F)}}var U=O.indexOf("#");-1!==U&&(this.hash=O.substr(U),O=O.slice(0,U));var q=O.indexOf("?");if(-1!==q?(this.search=O.substr(q),this.query=O.substr(q+1),t&&(this.query=v.parse(this.query)),O=O.slice(0,q)):t&&(this.search="",this.query={}),O&&(this.pathname=O),f[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){z=this.pathname||"";var W=this.search||"";this.path=z+W}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,c="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(c=v.stringify(this.query));var i=this.search||c&&"?"+c||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||f[t])&&!1!==a?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),i&&"?"!==i.charAt(0)&&(i="?"+i),t+a+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(i=i.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(O(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(o.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var n=new a,r=Object.keys(this),c=0;c<r.length;c++){var i=r[c];n[i]=this[i]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),s=0;s<l.length;s++){var u=l[s];"protocol"!==u&&(n[u]=e[u])}return f[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!f[e.protocol]){for(var b=Object.keys(e),m=0;m<b.length;m++){var d=b[m];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var p=n.pathname||"",v=n.search||"";n.path=p+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var O=n.pathname&&"/"===n.pathname.charAt(0),j=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=j||O||n.host&&e.pathname,_=y,k=n.pathname&&n.pathname.split("/")||[],C=(h=e.pathname&&e.pathname.split("/")||[],n.protocol&&!f[n.protocol]);if(C&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),y=y&&(""===h[0]||""===k[0])),j)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,k=h;else if(h.length)k||(k=[]),k.pop(),k=k.concat(h),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(C)n.hostname=n.host=k.shift(),(T=!!(n.host&&n.host.indexOf("@")>0)&&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(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=k.slice(-1)[0],E=(n.host||e.host||k.length>1)&&("."===w||".."===w)||""===w,x=0,S=k.length;S>=0;S--)"."===(w=k[S])?k.splice(S,1):".."===w?(k.splice(S,1),x++):x&&(k.splice(S,1),x--);if(!y&&!_)for(;x--;x)k.unshift("..");!y||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),E&&"/"!==k.join("/").substr(-1)&&k.push("");var T,N=""===k[0]||k[0]&&"/"===k[0].charAt(0);C&&(n.hostname=n.host=N?"":k.length?k.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&&k.length)&&!N&&k.unshift(""),k.length?n.pathname=k.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)}},DSFK:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},FEKF:function(e,t,n){ /*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */ e.exports=function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(e,t){return function(e){if(Array.isArray(e))return e}(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)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}return function(){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n)}var r,o,a;return r=n,(o=[{key:"getColorAsync",value:function(e,t,n){e.complete?t.call(e,this.getColor(e,n),n&&n.data):this._bindImageEvents(e,t,n)}},{key:"getColor",value:function(e,t){t=t||{};var n=this._getDefaultColor(t),r=this._getOriginalSize(e),o=this._prepareSizeAndPosition(r,t),a=null,c=n;if(!(o.srcWidth&&o.srcHeight&&o.destWidth&&o.destHeight))return this._prepareResult(n,new Error("FastAverageColor: Incorrect sizes."));if(!this._ctx&&(this._canvas=this._makeCanvas(),this._ctx=this._canvas.getContext&&this._canvas.getContext("2d"),!this._ctx))return this._prepareResult(n,new Error("FastAverageColor: Canvas Context 2D is not supported in this browser."));this._canvas.width=o.destWidth,this._canvas.height=o.destHeight;try{this._ctx.clearRect(0,0,o.destWidth,o.destHeight),this._ctx.drawImage(e,o.srcLeft,o.srcTop,o.srcWidth,o.srcHeight,0,0,o.destWidth,o.destHeight);var i=this._ctx.getImageData(0,0,o.destWidth,o.destHeight).data;c=this.getColorFromArray4(i,t)}catch(e){a=e}return this._prepareResult(c,a)}},{key:"getColorFromArray4",value:function(e,t){t=t||{};var n=e.length;if(n<4)return this._getDefaultColor(t);var r=n-n%4,o=4*(t.step||1),a="_"+(t.algorithm||"sqrt")+"Algorithm";if("function"!=typeof this[a])throw new Error("FastAverageColor: ".concat(t.algorithm," is unknown algorithm."));return this[a](e,r,o)}},{key:"destroy",value:function(){delete this._canvas,delete this._ctx}},{key:"_getDefaultColor",value:function(e){return this._getOption(e,"defaultColor",[255,255,255,255])}},{key:"_getOption",value:function(e,t,n){return void 0===e[t]?n:e[t]}},{key:"_prepareSizeAndPosition",value:function(e,t){var n,r=this._getOption(t,"left",0),o=this._getOption(t,"top",0),a=this._getOption(t,"width",e.width),c=this._getOption(t,"height",e.height),i=a,l=c;return"precision"===t.mode||(a>c?(n=a/c,i=100,l=Math.round(i/n)):(n=c/a,l=100,i=Math.round(l/n)),(i>a||l>c||i<10||l<10)&&(i=a,l=c)),{srcLeft:r,srcTop:o,srcWidth:a,srcHeight:c,destWidth:i,destHeight:l}}},{key:"_simpleAlgorithm",value:function(e,t,n){for(var r=0,o=0,a=0,c=0,i=0,l=0;l<t;l+=n){var s=e[l+3];r+=e[l]*s,o+=e[l+1]*s,a+=e[l+2]*s,c+=s,i++}return c?[Math.round(r/c),Math.round(o/c),Math.round(a/c),Math.round(c/i)]:[0,0,0,0]}},{key:"_sqrtAlgorithm",value:function(e,t,n){for(var r=0,o=0,a=0,c=0,i=0,l=0;l<t;l+=n){var s=e[l],u=e[l+1],b=e[l+2],m=e[l+3];r+=s*s*m,o+=u*u*m,a+=b*b*m,c+=m,i++}return c?[Math.round(Math.sqrt(r/c)),Math.round(Math.sqrt(o/c)),Math.round(Math.sqrt(a/c)),Math.round(c/i)]:[0,0,0,0]}},{key:"_dominantAlgorithm",value:function(e,n,r){for(var o={},a=0;a<n;a+=r){var c=e[a],i=e[a+1],l=e[a+2],s=e[a+3],u=Math.round(c/24)+","+Math.round(i/24)+","+Math.round(l/24);o[u]?o[u]=[o[u][0]+c*s,o[u][1]+i*s,o[u][2]+l*s,o[u][3]+s,o[u][4]+1]:o[u]=[c*s,i*s,l*s,s,1]}var b=t(Object.keys(o).map((function(e){return o[e]})).sort((function(e,t){var n=e[4],r=t[4];return n>r?-1:n===r?0:1}))[0],5),m=b[0],d=b[1],h=b[2],p=b[3],g=b[4];return p?[Math.round(m/p),Math.round(d/p),Math.round(h/p),Math.round(p/g)]:[0,0,0,0]}},{key:"_bindImageEvents",value:function(e,t,n){var r=this,o=(n=n||{})&&n.data,a=this._getDefaultColor(n),c=function(){s(),t.call(e,r.getColor(e,n),o)},i=function(){s(),t.call(e,r._prepareResult(a,new Error("Image error")),o)},l=function(){s(),t.call(e,r._prepareResult(a,new Error("Image abort")),o)},s=function(){e.removeEventListener("load",c),e.removeEventListener("error",i),e.removeEventListener("abort",l)};e.addEventListener("load",c),e.addEventListener("error",i),e.addEventListener("abort",l)}},{key:"_prepareResult",value:function(e,t){var n=e.slice(0,3),r=[].concat(n,e[3]/255),o=this._isDark(e);return{error:t,value:e,rgb:"rgb("+n.join(",")+")",rgba:"rgba("+r.join(",")+")",hex:this._arrayToHex(n),hexa:this._arrayToHex(e),isDark:o,isLight:!o}}},{key:"_getOriginalSize",value:function(e){return e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}},{key:"_toHex",value:function(e){var t=e.toString(16);return 1===t.length?"0"+t:t}},{key:"_arrayToHex",value:function(e){return"#"+e.map(this._toHex).join("")}},{key:"_isDark",value:function(e){return(299*e[0]+587*e[1]+114*e[2])/1e3<128}},{key:"_makeCanvas",value:function(){return"undefined"==typeof window?new OffscreenCanvas(1,1):document.createElement("canvas")}}])&&e(r.prototype,o),a&&e(r,a),n}()}()},Ff2n:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},FqII:function(e,t){!function(){e.exports=this.wp.date}()},GRId:function(e,t){!function(){e.exports=this.wp.element}()},HSyU:function(e,t){!function(){e.exports=this.wp.blocks}()},JREk:function(e,t){!function(){e.exports=this.wp.serverSideRender}()},JX7q: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}))},Ji7U:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},K51g:function(e,t,n){"use strict";n.r(t),n.d(t,"registerCoreBlocks",(function(){return di})),n.d(t,"__experimentalRegisterExperimentalCoreBlocks",(function(){return hi}));var r={};n.r(r),n.d(r,"metadata",(function(){return ve})),n.d(r,"name",(function(){return Oe})),n.d(r,"settings",(function(){return je}));var o={};n.r(o),n.d(o,"metadata",(function(){return ft})),n.d(o,"name",(function(){return vt})),n.d(o,"settings",(function(){return Ot}));var a={};n.r(a),n.d(a,"metadata",(function(){return St})),n.d(a,"name",(function(){return Tt})),n.d(a,"settings",(function(){return Nt}));var c={};n.r(c),n.d(c,"metadata",(function(){return Lt})),n.d(c,"name",(function(){return Ht})),n.d(c,"settings",(function(){return zt}));var i={};n.r(i),n.d(i,"metadata",(function(){return en})),n.d(i,"name",(function(){return tn})),n.d(i,"settings",(function(){return nn}));var l={};n.r(l),n.d(l,"name",(function(){return cn})),n.d(l,"settings",(function(){return ln}));var s={};n.r(s),n.d(s,"metadata",(function(){return hn})),n.d(s,"name",(function(){return pn})),n.d(s,"settings",(function(){return gn}));var u={};n.r(u),n.d(u,"metadata",(function(){return En})),n.d(u,"name",(function(){return xn})),n.d(u,"settings",(function(){return Sn}));var b={};n.r(b),n.d(b,"name",(function(){return In})),n.d(b,"settings",(function(){return Mn}));var m={};n.r(m),n.d(m,"name",(function(){return zn})),n.d(m,"settings",(function(){return Dn}));var d={};n.r(d),n.d(d,"metadata",(function(){return $n})),n.d(d,"name",(function(){return Qn})),n.d(d,"settings",(function(){return Jn}));var h={};n.r(h),n.d(h,"metadata",(function(){return mr})),n.d(h,"name",(function(){return dr})),n.d(h,"settings",(function(){return hr}));var p={};n.r(p),n.d(p,"metadata",(function(){return fr})),n.d(p,"name",(function(){return vr})),n.d(p,"settings",(function(){return Or}));var g={};n.r(g),n.d(g,"metadata",(function(){return Hr})),n.d(g,"name",(function(){return zr})),n.d(g,"settings",(function(){return Dr}));var f={};n.r(f),n.d(f,"name",(function(){return Qr})),n.d(f,"settings",(function(){return Jr})),n.d(f,"common",(function(){return Xr})),n.d(f,"others",(function(){return eo}));var v={};n.r(v),n.d(v,"metadata",(function(){return co})),n.d(v,"name",(function(){return io})),n.d(v,"settings",(function(){return lo}));var O={};n.r(O),n.d(O,"metadata",(function(){return ho})),n.d(O,"name",(function(){return po})),n.d(O,"settings",(function(){return go}));var j={};n.r(j),n.d(j,"metadata",(function(){return To})),n.d(j,"name",(function(){return No})),n.d(j,"settings",(function(){return Ro}));var y={};n.r(y),n.d(y,"name",(function(){return Io})),n.d(y,"settings",(function(){return Mo}));var _={};n.r(_),n.d(_,"name",(function(){return Uo})),n.d(_,"settings",(function(){return qo}));var k={};n.r(k),n.d(k,"metadata",(function(){return Yo})),n.d(k,"name",(function(){return $o})),n.d(k,"settings",(function(){return Qo}));var C={};n.r(C),n.d(C,"metadata",(function(){return ea})),n.d(C,"name",(function(){return ta})),n.d(C,"settings",(function(){return na}));var w={};n.r(w),n.d(w,"metadata",(function(){return ca})),n.d(w,"name",(function(){return ia})),n.d(w,"settings",(function(){return la}));var E={};n.r(E),n.d(E,"metadata",(function(){return ba})),n.d(E,"name",(function(){return ma})),n.d(E,"settings",(function(){return da}));var x={};n.r(x),n.d(x,"metadata",(function(){return ga})),n.d(x,"name",(function(){return fa})),n.d(x,"settings",(function(){return va}));var S={};n.r(S),n.d(S,"metadata",(function(){return Ea})),n.d(S,"name",(function(){return xa})),n.d(S,"settings",(function(){return Sa}));var T={};n.r(T),n.d(T,"name",(function(){return Ia})),n.d(T,"settings",(function(){return Ma}));var N={};n.r(N),n.d(N,"name",(function(){return La})),n.d(N,"settings",(function(){return Ha}));var R={};n.r(R),n.d(R,"name",(function(){return za})),n.d(R,"settings",(function(){return Da}));var A={};n.r(A),n.d(A,"metadata",(function(){return qa})),n.d(A,"name",(function(){return Wa})),n.d(A,"settings",(function(){return Ga}));var B={};n.r(B),n.d(B,"metadata",(function(){return $a})),n.d(B,"name",(function(){return Qa})),n.d(B,"settings",(function(){return Ja}));var I={};n.r(I),n.d(I,"name",(function(){return rc})),n.d(I,"settings",(function(){return oc}));var M={};n.r(M),n.d(M,"metadata",(function(){return ic})),n.d(M,"name",(function(){return lc})),n.d(M,"settings",(function(){return sc}));var P={};n.r(P),n.d(P,"metadata",(function(){return hc})),n.d(P,"name",(function(){return pc})),n.d(P,"settings",(function(){return gc}));var L={};n.r(L),n.d(L,"metadata",(function(){return Ic})),n.d(L,"name",(function(){return Mc})),n.d(L,"settings",(function(){return Pc}));var H={};n.r(H),n.d(H,"metadata",(function(){return Hc})),n.d(H,"name",(function(){return zc})),n.d(H,"settings",(function(){return Dc}));var z={};n.r(z),n.d(z,"metadata",(function(){return qc})),n.d(z,"name",(function(){return Wc})),n.d(z,"settings",(function(){return Gc}));var D={};n.r(D),n.d(D,"metadata",(function(){return Xc})),n.d(D,"name",(function(){return ei})),n.d(D,"settings",(function(){return ti}));var V={};n.r(V),n.d(V,"name",(function(){return oi})),n.d(V,"settings",(function(){return ai}));var F={};n.r(F),n.d(F,"metadata",(function(){return si})),n.d(F,"name",(function(){return ui})),n.d(F,"settings",(function(){return bi}));var U=n("KQm4"),q=n("rePB"),W=(n("jZUy"),n("axFQ")),G=(n("jSdM"),n("HSyU")),K=n("l3Sj"),Z=n("vpQ4"),Y=n("GRId"),$=n("TSYQ"),Q=n.n($),J=n("YLtl"),X={className:!1},ee={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},direction:{type:"string",enum:["ltr","rtl"]}},te=[{supports:X,attributes:ee,save:function(e){var t,n=e.attributes,r=n.align,o=n.content,a=n.dropCap,c=n.backgroundColor,i=n.textColor,l=n.customBackgroundColor,s=n.customTextColor,u=n.fontSize,b=n.customFontSize,m=n.direction,d=Object(W.getColorClassName)("color",i),h=Object(W.getColorClassName)("background-color",c),p=Object(W.getFontSizeClass)(u),g=Q()((t={"has-text-color":i||s,"has-background":c||l,"has-drop-cap":a},Object(q.a)(t,p,p),Object(q.a)(t,d,d),Object(q.a)(t,h,h),t)),f={backgroundColor:h?void 0:l,color:d?void 0:s,fontSize:p?void 0:b,textAlign:r};return Object(Y.createElement)(W.RichText.Content,{tagName:"p",style:f,className:g||void 0,value:o,dir:m})}},{supports:X,attributes:Object(Z.a)({},ee,{width:{type:"string"}}),save:function(e){var t,n=e.attributes,r=n.width,o=n.align,a=n.content,c=n.dropCap,i=n.backgroundColor,l=n.textColor,s=n.customBackgroundColor,u=n.customTextColor,b=n.fontSize,m=n.customFontSize,d=Object(W.getColorClassName)("color",l),h=Object(W.getColorClassName)("background-color",i),p=b&&"is-".concat(b,"-text"),g=Q()((t={},Object(q.a)(t,"align".concat(r),r),Object(q.a)(t,"has-background",i||s),Object(q.a)(t,"has-drop-cap",c),Object(q.a)(t,p,p),Object(q.a)(t,d,d),Object(q.a)(t,h,h),t)),f={backgroundColor:h?void 0:s,color:d?void 0:u,fontSize:p?void 0:m,textAlign:o};return Object(Y.createElement)(W.RichText.Content,{tagName:"p",style:f,className:g||void 0,value:a})}},{supports:X,attributes:Object(J.omit)(Object(Z.a)({},ee,{fontSize:{type:"number"}}),"customFontSize","customTextColor","customBackgroundColor"),save:function(e){var t,n=e.attributes,r=n.width,o=n.align,a=n.content,c=n.dropCap,i=n.backgroundColor,l=n.textColor,s=n.fontSize,u=Q()((t={},Object(q.a)(t,"align".concat(r),r),Object(q.a)(t,"has-background",i),Object(q.a)(t,"has-drop-cap",c),t)),b={backgroundColor:i,color:l,fontSize:s,textAlign:o};return Object(Y.createElement)("p",{style:b,className:u||void 0},a)},migrate:function(e){return Object(J.omit)(Object(Z.a)({},e,{customFontSize:Object(J.isFinite)(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0}),["fontSize","textColor","backgroundColor"])}},{supports:X,attributes:Object(Z.a)({},ee,{content:{type:"string",source:"html",default:""}}),save:function(e){var t=e.attributes;return Object(Y.createElement)(Y.RawHTML,null,t.content)},migrate:function(e){return e}}],ne=n("wx14"),re=n("1OyB"),oe=n("vuIU"),ae=n("md7G"),ce=n("foSv"),ie=n("JX7q"),le=n("Ji7U"),se=n("tI+e"),ue=n("K9lf"),be=n("1ZqX"),me=window.getComputedStyle,de=Object(se.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?me(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}})),he=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).toggleDropCap=e.toggleDropCap.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{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(K.__)("Showing large initial letter."):Object(K.__)("Toggle to show a large initial letter.")}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.setAttributes,o=t.mergeBlocks,a=t.onReplace,c=t.className,i=t.backgroundColor,l=t.textColor,s=t.setBackgroundColor,u=t.setTextColor,b=t.fallbackBackgroundColor,m=t.fallbackTextColor,d=t.fallbackFontSize,h=t.fontSize,p=t.setFontSize,g=t.isRTL,f=n.align,v=n.content,O=n.dropCap,j=n.placeholder,y=n.direction;return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(W.AlignmentToolbar,{value:f,onChange:function(e){r({align:e})}}),g&&Object(Y.createElement)(se.Toolbar,{controls:[{icon:"editor-ltr",title:Object(K._x)("Left to right","editor button"),isActive:"ltr"===y,onClick:function(){r({direction:"ltr"===y?void 0:"ltr"})}}]})),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Text Settings"),className:"blocks-font-size"},Object(Y.createElement)(W.FontSizePicker,{fallbackFontSize:d,value:h.size,onChange:p}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Drop Cap"),checked:!!O,onChange:this.toggleDropCap,help:this.getDropCapHelp})),Object(Y.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:i.color,onChange:s,label:Object(K.__)("Background Color")},{value:l.color,onChange:u,label:Object(K.__)("Text Color")}]},Object(Y.createElement)(W.ContrastChecker,Object(ne.a)({textColor:l.color,backgroundColor:i.color,fallbackTextColor:m,fallbackBackgroundColor:b},{fontSize:h.size})))),Object(Y.createElement)(W.RichText,{identifier:"content",tagName:"p",className:Q()("wp-block-paragraph",c,(e={"has-text-color":l.color,"has-background":i.color,"has-drop-cap":O},Object(q.a)(e,"has-text-align-".concat(f),f),Object(q.a)(e,i.class,i.class),Object(q.a)(e,l.class,l.class),Object(q.a)(e,h.class,h.class),e)),style:{backgroundColor:i.color,color:l.color,fontSize:h.size?h.size+"px":void 0,direction:y},value:v,onChange:function(e){r({content:e})},onSplit:function(e){return e?Object(G.createBlock)("core/paragraph",Object(Z.a)({},n,{content:e})):Object(G.createBlock)("core/paragraph")},onMerge:o,onReplace:a,onRemove:a?function(){return a([])}:void 0,"aria-label":v?Object(K.__)("Paragraph block"):Object(K.__)("Empty block; start writing or type forward slash to choose a block"),placeholder:j||Object(K.__)("Start writing or type / to choose a block"),__unstableEmbedURLOnPaste:!0}))}}]),t}(Y.Component),pe=Object(ue.compose)([Object(W.withColors)("backgroundColor",{textColor:"color"}),Object(W.withFontSizes)("fontSize"),de,Object(be.withSelect)((function(e){return{isRTL:(0,e("core/block-editor").getSettings)().isRTL}}))])(he),ge=Object(Y.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Y.createElement)(se.Path,{d:"M11 5v7H9.5C7.6 12 6 10.4 6 8.5S7.6 5 9.5 5H11m8-2H9.5C6.5 3 4 5.5 4 8.5S6.5 14 9.5 14H11v7h2V5h2v16h2V5h2V3z"}));var fe={from:[{type:"raw",priority:20,selector:"p",schema:{p:{children:Object(G.getPhrasingContentSchema)()}}}]},ve={name:"core/paragraph",category:"common",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},direction:{type:"string",enum:["ltr","rtl"]}}},Oe=ve.name,je={title:Object(K.__)("Paragraph"),description:Object(K.__)("Start with the building block of all narrative."),icon:ge,keywords:[Object(K.__)("text")],example:{attributes:{content:Object(K.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."),customFontSize:28,dropCap:!0}},supports:{className:!1},transforms:fe,deprecated:te,merge:function(e,t){return{content:(e.content||"")+(t.content||"")}},getEditWrapperProps:function(e){var t=e.width;if(-1!==["wide","full","left","right"].indexOf(t))return{"data-align":t}},edit:pe,save:function(e){var t,n=e.attributes,r=n.align,o=n.content,a=n.dropCap,c=n.backgroundColor,i=n.textColor,l=n.customBackgroundColor,s=n.customTextColor,u=n.fontSize,b=n.customFontSize,m=n.direction,d=Object(W.getColorClassName)("color",i),h=Object(W.getColorClassName)("background-color",c),p=Object(W.getFontSizeClass)(u),g=Q()((t={"has-text-color":i||s,"has-background":c||l,"has-drop-cap":a},Object(q.a)(t,"has-text-align-".concat(r),r),Object(q.a)(t,p,p),Object(q.a)(t,d,d),Object(q.a)(t,h,h),t)),f={backgroundColor:h?void 0:l,color:d?void 0:s,fontSize:p?void 0:b};return Object(Y.createElement)(W.RichText.Content,{tagName:"p",style:f,className:g||void 0,value:o,dir:m})}},ye={align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},_e=[{attributes:ye,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(q.a)(t,"align".concat(c),c),Object(q.a)(t,"is-resized",l||s),t)),m=Object(Y.createElement)("img",{src:r,alt:o,className:u?"wp-image-".concat(u):null,width:l,height:s});return Object(Y.createElement)("figure",{className:b},i?Object(Y.createElement)("a",{href:i},m):m,!W.RichText.isEmpty(a)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:a}))}},{attributes:ye,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(Y.createElement)("img",{src:n,alt:r,className:s?"wp-image-".concat(s):null,width:i,height:l});return Object(Y.createElement)("figure",{className:a?"align".concat(a):null},c?Object(Y.createElement)("a",{href:c},u):u,!W.RichText.isEmpty(o)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:o}))}},{attributes:ye,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(Y.createElement)("img",Object(ne.a)({src:n,alt:r},s)),b={};return i?b={width:i}:"left"!==a&&"right"!==a||(b={maxWidth:"50%"}),Object(Y.createElement)("figure",{className:a?"align".concat(a):null,style:b},c?Object(Y.createElement)("a",{href:c},u):u,!W.RichText.isEmpty(o)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:o}))}}],ke=n("ODXe"),Ce=n("xTGt"),we=n("RxS6"),Ee=n("Mmq9"),xe=n("KEfo"),Se=n("gdqT"),Te=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.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"})),Ne=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.Path,{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"})),Re=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.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(Y.createElement)(se.Polygon,{points:"14.5 11 11 15.51 8.5 12.5 5 17 19 17"})),Ae=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.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"})),Be={foreground:"#1da1f2",src:Object(Y.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.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"})))},Ie={foreground:"#ff0000",src:Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24"},Object(Y.createElement)(se.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"}))},Me={foreground:"#3b5998",src:Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24"},Object(Y.createElement)(se.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"}))},Pe=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24"},Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.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"}))),Le={foreground:"#0073AA",src:Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24"},Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.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"})))},He={foreground:"#1db954",src:Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24"},Object(Y.createElement)(se.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"}))},ze=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24"},Object(Y.createElement)(se.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"})),De={foreground:"#1ab7ea",src:Object(Y.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.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"})))},Ve=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24"},Object(Y.createElement)(se.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"})),Fe={foreground:"#35465c",src:Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24"},Object(Y.createElement)(se.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"}))},Ue=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24"},Object(Y.createElement)(se.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),Object(Y.createElement)(se.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),Object(Y.createElement)(se.Path,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})),qe=[{name:"core-embed/twitter",settings:{title:"Twitter",icon:Be,keywords:["tweet"],description:Object(K.__)("Embed a tweet.")},patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i]},{name:"core-embed/youtube",settings:{title:"YouTube",icon:Ie,keywords:[Object(K.__)("music"),Object(K.__)("video")],description:Object(K.__)("Embed a YouTube video.")},patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i]},{name:"core-embed/facebook",settings:{title:"Facebook",icon:Me,description:Object(K.__)("Embed a Facebook post.")},patterns:[/^https?:\/\/www\.facebook.com\/.+/i]},{name:"core-embed/instagram",settings:{title:"Instagram",icon:Pe,keywords:[Object(K.__)("image")],description:Object(K.__)("Embed an Instagram post.")},patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i]},{name:"core-embed/wordpress",settings:{title:"WordPress",icon:Le,keywords:[Object(K.__)("post"),Object(K.__)("blog")],responsive:!1,description:Object(K.__)("Embed a WordPress post.")}},{name:"core-embed/soundcloud",settings:{title:"SoundCloud",icon:Ne,keywords:[Object(K.__)("music"),Object(K.__)("audio")],description:Object(K.__)("Embed SoundCloud content.")},patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i]},{name:"core-embed/spotify",settings:{title:"Spotify",icon:He,keywords:[Object(K.__)("music"),Object(K.__)("audio")],description:Object(K.__)("Embed Spotify content.")},patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i]},{name:"core-embed/flickr",settings:{title:"Flickr",icon:ze,keywords:[Object(K.__)("image")],description:Object(K.__)("Embed Flickr content.")},patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i]},{name:"core-embed/vimeo",settings:{title:"Vimeo",icon:De,keywords:[Object(K.__)("video")],description:Object(K.__)("Embed a Vimeo video.")},patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i]}],We=[{name:"core-embed/animoto",settings:{title:"Animoto",icon:Ae,description:Object(K.__)("Embed an Animoto video.")},patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i]},{name:"core-embed/cloudup",settings:{title:"Cloudup",icon:Te,description:Object(K.__)("Embed Cloudup content.")},patterns:[/^https?:\/\/cloudup\.com\/.+/i]},{name:"core-embed/collegehumor",settings:{title:"CollegeHumor",icon:Ae,description:Object(K.__)("Embed CollegeHumor content."),supports:{inserter:!1}},patterns:[]},{name:"core-embed/crowdsignal",settings:{title:"Crowdsignal",icon:Te,keywords:["polldaddy"],transform:[{type:"block",blocks:["core-embed/polldaddy"],transform:function(e){return Object(G.createBlock)("core-embed/crowdsignal",{content:e})}}],description:Object(K.__)("Embed Crowdsignal (formerly Polldaddy) content.")},patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i]},{name:"core-embed/dailymotion",settings:{title:"Dailymotion",icon:Ae,description:Object(K.__)("Embed a Dailymotion video.")},patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i]},{name:"core-embed/hulu",settings:{title:"Hulu",icon:Ae,description:Object(K.__)("Embed Hulu content.")},patterns:[/^https?:\/\/(www\.)?hulu\.com\/.+/i]},{name:"core-embed/imgur",settings:{title:"Imgur",icon:Re,description:Object(K.__)("Embed Imgur content.")},patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i]},{name:"core-embed/issuu",settings:{title:"Issuu",icon:Te,description:Object(K.__)("Embed Issuu content.")},patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i]},{name:"core-embed/kickstarter",settings:{title:"Kickstarter",icon:Te,description:Object(K.__)("Embed Kickstarter content.")},patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i]},{name:"core-embed/meetup-com",settings:{title:"Meetup.com",icon:Te,description:Object(K.__)("Embed Meetup.com content.")},patterns:[/^https?:\/\/(www\.)?meetu(\.ps|p\.com)\/.+/i]},{name:"core-embed/mixcloud",settings:{title:"Mixcloud",icon:Ne,keywords:[Object(K.__)("music"),Object(K.__)("audio")],description:Object(K.__)("Embed Mixcloud content.")},patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i]},{name:"core-embed/polldaddy",settings:{title:"Polldaddy",icon:Te,description:Object(K.__)("Embed Polldaddy content."),supports:{inserter:!1}},patterns:[]},{name:"core-embed/reddit",settings:{title:"Reddit",icon:Ve,description:Object(K.__)("Embed a Reddit thread.")},patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i]},{name:"core-embed/reverbnation",settings:{title:"ReverbNation",icon:Ne,description:Object(K.__)("Embed ReverbNation content.")},patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i]},{name:"core-embed/screencast",settings:{title:"Screencast",icon:Ae,description:Object(K.__)("Embed Screencast content.")},patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i]},{name:"core-embed/scribd",settings:{title:"Scribd",icon:Te,description:Object(K.__)("Embed Scribd content.")},patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i]},{name:"core-embed/slideshare",settings:{title:"Slideshare",icon:Te,description:Object(K.__)("Embed Slideshare content.")},patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i]},{name:"core-embed/smugmug",settings:{title:"SmugMug",icon:Re,description:Object(K.__)("Embed SmugMug content.")},patterns:[/^https?:\/\/(www\.)?smugmug\.com\/.+/i]},{name:"core-embed/speaker",settings:{title:"Speaker",icon:Ne,supports:{inserter:!1}},patterns:[]},{name:"core-embed/speaker-deck",settings:{title:"Speaker Deck",icon:Te,transform:[{type:"block",blocks:["core-embed/speaker"],transform:function(e){return Object(G.createBlock)("core-embed/speaker-deck",{content:e})}}],description:Object(K.__)("Embed Speaker Deck content.")},patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i]},{name:"core-embed/ted",settings:{title:"TED",icon:Ae,description:Object(K.__)("Embed a TED video.")},patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i]},{name:"core-embed/tumblr",settings:{title:"Tumblr",icon:Fe,description:Object(K.__)("Embed a Tumblr post.")},patterns:[/^https?:\/\/(www\.)?tumblr\.com\/.+/i]},{name:"core-embed/videopress",settings:{title:"VideoPress",icon:Ae,keywords:[Object(K.__)("video")],description:Object(K.__)("Embed a VideoPress video.")},patterns:[/^https?:\/\/videopress\.com\/.+/i]},{name:"core-embed/wordpress-tv",settings:{title:"WordPress.tv",icon:Ae,description:Object(K.__)("Embed a WordPress.tv video.")},patterns:[/^https?:\/\/wordpress\.tv\/.+/i]},{name:"core-embed/amazon-kindle",settings:{title:"Amazon Kindle",icon:Ue,keywords:[Object(K.__)("ebook")],responsive:!1,description:Object(K.__)("Embed Amazon Kindle content.")},patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i]}],Ge=["facebook.com","smugmug.com"],Ke=[{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"}],Ze=n("A/WM"),Ye=n.n(Ze),$e=n("4eJC"),Qe=n.n($e),Je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some((function(t){return e.match(t)}))},Xe=function(e){return Object(J.includes)(e,'class="wp-embedded-content"')},et=function(e,t){var n=e.preview,r=e.name,o=e.attributes.url;if(o){var a=function(e){for(var t=0,n=[].concat(Object(U.a)(qe),Object(U.a)(We));t<n.length;t++){var r=n[t];if(Je(e,r.patterns))return r.name}return"core/embed"}(o);if(Object(G.getBlockType)(a)){if("core-embed/wordpress"!==r&&"core/embed"!==a&&r!==a)return Object(G.createBlock)(a,{url:o});if(n){var c=n.html;if(Xe(c)&&"core-embed/wordpress"!==r)return Object(G.createBlock)("core-embed/wordpress",Object(Z.a)({url:o},t))}}}};function tt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n){for(var r={"wp-has-aspect-ratio":!1},o=0;o<Ke.length;o++){var a=Ke[o];r[a.className]=!1}return Ye()(t,r)}var c=document.implementation.createHTMLDocument("");c.body.innerHTML=e;var i=c.body.querySelector("iframe");if(i&&i.height&&i.width)for(var l=(i.width/i.height).toFixed(2),s=0;s<Ke.length;s++){var u,b=Ke[s];if(l>=b.ratio)return Ye()(t,(u={},Object(q.a)(u,b.className,n),Object(q.a)(u,"wp-has-aspect-ratio",n),u))}return t}function nt(e,t){var n=Object(Y.createElement)("a",{href:e},e);t(Object(G.createBlock)("core/paragraph",{content:Object(Y.renderToString)(n)}))}var rt=Qe()((function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};var a={},c=e.type,i=void 0===c?"rich":c,l=e.html,s=e.provider_name,u=Object(J.kebabCase)(Object(J.toLower)(""!==s?s:t));return Xe(l)&&(i="wp-embed"),(l||"photo"===i)&&(a.type=i,a.providerNameSlug=u),a.className=tt(l,n,r&&o),a})),ot=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.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(Y.createElement)(se.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"}));var at=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={width:void 0,height:void 0},e.bindContainer=e.bindContainer.bind(Object(ie.a)(e)),e.calculateSize=e.calculateSize.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"componentDidUpdate",value:function(e){this.props.src!==e.src&&(this.setState({width:void 0,height:void 0}),this.fetchImageSize()),this.props.dirtynessTrigger!==e.dirtynessTrigger&&this.calculateSize()}},{key:"componentDidMount",value:function(){this.fetchImageSize()}},{key:"componentWillUnmount",value:function(){this.image&&(this.image.onload=J.noop)}},{key:"fetchImageSize",value:function(){this.image=new window.Image,this.image.onload=this.calculateSize,this.image.src=this.props.src}},{key:"calculateSize",value:function(){var e,t,n,r,o,a=(e=this.image,t=this.container,n=t.clientWidth,r=e.width>n,o=e.height/e.width,{width:r?n:e.width,height:r?n*o:e.height}),c=a.width,i=a.height;this.setState({width:c,height:i})}},{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(Y.createElement)("div",{ref:this.bindContainer},this.props.children(e))}}]),t}(Y.Component),ct=Object(ue.withGlobalEvents)({resize:"calculateSize"})(at),it=["image"],lt=function(e,t){return!e&&Object(Ce.isBlobURL)(t)},st=function(e){e.stopPropagation()},ut=function(e){[we.LEFT,we.DOWN,we.RIGHT,we.UP,we.BACKSPACE,we.ENTER].indexOf(e.keyCode)>-1&&e.stopPropagation()},bt=function(e){var t=e.advancedOptions,n=e.linkDestination,r=e.mediaLinks,o=e.onChangeUrl,a=e.url,c=Object(Y.useState)(!1),i=Object(ke.a)(c,2),l=i[0],s=i[1],u=Object(Y.useCallback)((function(){s(!0)})),b=Object(Y.useState)(!1),m=Object(ke.a)(b,2),d=m[0],h=m[1],p=Object(Y.useState)(null),g=Object(ke.a)(p,2),f=g[0],v=g[1],O=Object(Y.useCallback)((function(){"media"!==n&&"attachment"!==n||v(""),h(!0)})),j=Object(Y.useCallback)((function(){h(!1)})),y=Object(Y.useCallback)((function(){v(null),j(),s(!1)})),_=Object(Y.useRef)(null),k=Object(Y.useCallback)((function(){return function(e){var t=_.current;t&&t.contains(e.target)||(s(!1),v(null),j())}})),C=Object(Y.useCallback)((function(){return function(e){f&&o(f),j(),v(null),e.preventDefault()}})),w=Object(Y.useCallback)((function(){y(),o("")})),E=null!==f?f:a,x=(Object(J.find)(r,["linkDestination",n])||{}).title;return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(se.IconButton,{icon:"admin-links",className:"components-toolbar__control",label:a?Object(K.__)("Edit link"):Object(K.__)("Insert link"),"aria-expanded":l,onClick:u}),l&&Object(Y.createElement)(W.URLPopover,{onClickOutside:k(),onClose:y,renderSettings:function(){return t},additionalControls:!E&&Object(Y.createElement)(se.NavigableMenu,null,Object(J.map)(r,(function(e){return Object(Y.createElement)(se.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){v(null),o(e.url),j()}},e.title)})))},(!a||d)&&Object(Y.createElement)(W.URLPopover.LinkEditor,{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",value:E,onChangeInputValue:v,onKeyDown:ut,onKeyPress:st,onSubmit:C(),autocompleteRef:_}),a&&!d&&Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.URLPopover.LinkViewer,{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:st,url:a,onEditLinkClick:O,urlLabel:x}),Object(Y.createElement)(se.IconButton,{icon:"no",label:Object(K.__)("Remove link"),onClick:w}))))},mt=function(e){function t(e){var n,r=e.attributes;return Object(re.a)(this,t),(n=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).updateAlt=n.updateAlt.bind(Object(ie.a)(n)),n.updateAlignment=n.updateAlignment.bind(Object(ie.a)(n)),n.onFocusCaption=n.onFocusCaption.bind(Object(ie.a)(n)),n.onImageClick=n.onImageClick.bind(Object(ie.a)(n)),n.onSelectImage=n.onSelectImage.bind(Object(ie.a)(n)),n.onSelectURL=n.onSelectURL.bind(Object(ie.a)(n)),n.updateImage=n.updateImage.bind(Object(ie.a)(n)),n.updateWidth=n.updateWidth.bind(Object(ie.a)(n)),n.updateHeight=n.updateHeight.bind(Object(ie.a)(n)),n.updateDimensions=n.updateDimensions.bind(Object(ie.a)(n)),n.onSetHref=n.onSetHref.bind(Object(ie.a)(n)),n.onSetLinkClass=n.onSetLinkClass.bind(Object(ie.a)(n)),n.onSetLinkRel=n.onSetLinkRel.bind(Object(ie.a)(n)),n.onSetNewTab=n.onSetNewTab.bind(Object(ie.a)(n)),n.getFilename=n.getFilename.bind(Object(ie.a)(n)),n.toggleIsEditing=n.toggleIsEditing.bind(Object(ie.a)(n)),n.onUploadError=n.onUploadError.bind(Object(ie.a)(n)),n.onImageError=n.onImageError.bind(Object(ie.a)(n)),n.getLinkDestinations=n.getLinkDestinations.bind(Object(ie.a)(n)),n.state={captionFocused:!1,isEditing:!r.url},n}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.mediaUpload,o=t.noticeOperations,a=n.id,c=n.url,i=void 0===c?"":c;if(lt(a,i)){var l=Object(Ce.getBlobByURL)(i);l&&r({filesList:[l],onFileChange:function(t){var n=Object(ke.a)(t,1)[0];e.onSelectImage(n)},allowedTypes:it,onError:function(t){o.createErrorNotice(t),e.setState({isEditing:!0})}})}}},{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;lt(n,o)&&!lt(c,l)&&Object(Ce.revokeBlobURL)(l),!this.props.isSelected&&e.isSelected&&this.state.captionFocused&&this.setState({captionFocused:!1})}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e),this.setState({isEditing:!0})}},{key:"onSelectImage",value:function(e){if(e&&e.url){this.setState({isEditing:!1});var t,n,r,o=this.props.attributes,a=o.id,c=o.url,i=o.alt,l=o.caption,s=(t=e,(n=Object(J.pick)(t,["alt","id","link","caption"])).url=Object(J.get)(t,["sizes","large","url"])||Object(J.get)(t,["media_details","sizes","large","source_url"])||t.url,n);lt(a,c)&&(i&&(s=Object(J.omit)(s,["alt"])),l&&(s=Object(J.omit)(s,["caption"]))),r=e.id&&e.id===a?{url:c}:{width:void 0,height:void 0,sizeSlug:"large"},this.props.setAttributes(Object(Z.a)({},s,r))}else this.props.setAttributes({url:void 0,alt:void 0,id:void 0,caption:void 0})}},{key:"onSelectURL",value:function(e){e!==this.props.attributes.url&&this.props.setAttributes({url:e,id:void 0,sizeSlug:"large"}),this.setState({isEditing:!1})}},{key:"onImageError",value:function(e){var t=et({attributes:{url:e}});void 0!==t&&this.props.onReplace(t)}},{key:"onSetHref",value:function(e){var t,n=this.getLinkDestinations();this.props.attributes.linkDestination===(t=e?(Object(J.find)(n,(function(t){return t.url===e}))||{linkDestination:"custom"}).linkDestination:"none")?this.props.setAttributes({href:e}):this.props.setAttributes({linkDestination:t,href:e})}},{key:"onSetLinkClass",value:function(e){this.props.setAttributes({linkClass:e})}},{key:"onSetLinkRel",value:function(e){this.props.setAttributes({rel:e})}},{key:"onSetNewTab",value:function(e){var t=this.props.attributes.rel,n=e?"_blank":void 0,r=t;n&&!t?r="noreferrer noopener":n||"noreferrer noopener"!==t||(r=void 0),this.props.setAttributes({linkTarget:n,rel:r})}},{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(Z.a)({},t,{align:e}))}},{key:"updateImage",value:function(e){var t=this.props.image,n=Object(J.get)(t,["media_details","sizes",e,"source_url"]);if(!n)return null;this.props.setAttributes({url:n,width:void 0,height:void 0,sizeSlug:e})}},{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:"getFilename",value:function(e){var t=Object(Ee.getPath)(e);if(t)return Object(J.last)(t.split("/"))}},{key:"getLinkDestinations",value:function(){return[{linkDestination:"media",title:Object(K.__)("Media File"),url:this.props.image&&this.props.image.source_url||this.props.attributes.url,icon:ot},{linkDestination:"attachment",title:Object(K.__)("Attachment Page"),url:this.props.image&&this.props.image.link,icon:Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}]}},{key:"toggleIsEditing",value:function(){this.setState({isEditing:!this.state.isEditing}),this.state.isEditing?Object(Se.speak)(Object(K.__)("You are now viewing the image in the image block.")):Object(Se.speak)(Object(K.__)("You are now editing the image in the image block."))}},{key:"getImageSizeOptions",value:function(){var e=this.props.imageSizes;return Object(J.map)(e,(function(e){var t=e.name;return{value:e.slug,label:t}}))}},{key:"render",value:function(){var e=this,t=this.state.isEditing,n=this.props,r=n.attributes,o=n.setAttributes,a=n.isLargeViewport,c=n.isSelected,i=n.className,l=n.maxWidth,s=n.noticeUI,u=n.isRTL,b=n.onResizeStart,m=n.onResizeStop,d=r.url,h=r.alt,p=r.caption,g=r.align,f=r.id,v=r.href,O=r.rel,j=r.linkClass,y=r.linkDestination,_=r.width,k=r.height,C=r.linkTarget,w=r.sizeSlug,E=function(e,t){return t&&!e&&!Object(Ce.isBlobURL)(t)}(f,d),x=Object(Y.createElement)(se.SVG,{width:20,height:20,viewBox:"0 0 20 20"},Object(Y.createElement)(se.Rect,{x:11,y:3,width:7,height:5,rx:1}),Object(Y.createElement)(se.Rect,{x:2,y:12,width:7,height:5,rx:1}),Object(Y.createElement)(se.Path,{d:"M13,12h1a3,3,0,0,1-3,3v2a5,5,0,0,0,5-5h1L15,9Z"}),Object(Y.createElement)(se.Path,{d:"M4,8H3l2,3L7,8H6A3,3,0,0,1,9,5V3A5,5,0,0,0,4,8Z"})),S=Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(W.BlockAlignmentToolbar,{value:g,onChange:this.updateAlignment}),d&&Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(se.Toolbar,null,Object(Y.createElement)(se.IconButton,{className:Q()("components-icon-button components-toolbar__control",{"is-active":this.state.isEditing}),label:Object(K.__)("Edit image"),"aria-pressed":this.state.isEditing,onClick:this.toggleIsEditing,icon:x})),Object(Y.createElement)(se.Toolbar,null,Object(Y.createElement)(bt,{url:v||"",onChangeUrl:this.onSetHref,mediaLinks:this.getLinkDestinations(),linkDestination:y,advancedOptions:Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Open in New Tab"),onChange:this.onSetNewTab,checked:"_blank"===C}),Object(Y.createElement)(se.TextControl,{label:Object(K.__)("Link CSS Class"),value:j||"",onKeyPress:st,onKeyDown:ut,onChange:this.onSetLinkClass}),Object(Y.createElement)(se.TextControl,{label:Object(K.__)("Link Rel"),value:O||"",onChange:this.onSetLinkRel,onKeyPress:st,onKeyDown:ut}))})))),T=E?d:void 0,N={title:d?Object(K.__)("Edit image"):Object(K.__)("Image"),instructions:Object(K.__)("Upload an image file, pick one from your media library, or add one with a URL.")},R=!!d&&Object(Y.createElement)("img",{alt:Object(K.__)("Edit image"),title:Object(K.__)("Edit image"),className:"edit-image-preview",src:d}),A=Object(Y.createElement)(W.MediaPlaceholder,{icon:Object(Y.createElement)(W.BlockIcon,{icon:ot}),className:i,labels:N,onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onDoubleClick:this.toggleIsEditing,onCancel:!!d&&this.toggleIsEditing,notices:s,onError:this.onUploadError,accept:"image/*",allowedTypes:it,value:{id:f,src:T},mediaPreview:R,dropZoneUIOnly:!t&&d});if(t||!d)return Object(Y.createElement)(Y.Fragment,null,S,A);var B=Q()(i,Object(q.a)({"is-transient":Object(Ce.isBlobURL)(d),"is-resized":!!_||!!k,"is-focused":c},"size-".concat(w),w)),I=-1===["wide","full"].indexOf(g)&&a,M=this.getImageSizeOptions(),P=function(t,n){return Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Image Settings")},Object(Y.createElement)(se.TextareaControl,{label:Object(K.__)("Alt Text (Alternative Text)"),value:h,onChange:e.updateAlt,help:Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(se.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},Object(K.__)("Describe the purpose of the image")),Object(K.__)("Leave empty if the image is purely decorative."))}),!Object(J.isEmpty)(M)&&Object(Y.createElement)(se.SelectControl,{label:Object(K.__)("Image Size"),value:w,options:M,onChange:e.updateImage}),I&&Object(Y.createElement)("div",{className:"block-library-image__dimensions"},Object(Y.createElement)("p",{className:"block-library-image__dimensions__row"},Object(K.__)("Image Dimensions")),Object(Y.createElement)("div",{className:"block-library-image__dimensions__row"},Object(Y.createElement)(se.TextControl,{type:"number",className:"block-library-image__dimensions__width",label:Object(K.__)("Width"),value:_||t||"",min:1,onChange:e.updateWidth}),Object(Y.createElement)(se.TextControl,{type:"number",className:"block-library-image__dimensions__height",label:Object(K.__)("Height"),value:k||n||"",min:1,onChange:e.updateHeight})),Object(Y.createElement)("div",{className:"block-library-image__dimensions__row"},Object(Y.createElement)(se.ButtonGroup,{"aria-label":Object(K.__)("Image Size")},[25,50,75,100].map((function(r){var o=Math.round(t*(r/100)),a=Math.round(n*(r/100)),c=_===o&&k===a;return Object(Y.createElement)(se.Button,{key:r,isSmall:!0,isPrimary:c,"aria-pressed":c,onClick:e.updateDimensions(o,a)},r,"%")}))),Object(Y.createElement)(se.Button,{isSmall:!0,onClick:e.updateDimensions()},Object(K.__)("Reset"))))))};return Object(Y.createElement)(Y.Fragment,null,S,Object(Y.createElement)("figure",{className:B},Object(Y.createElement)(ct,{src:d,dirtynessTrigger:g},(function(t){var n,r=t.imageWidthWithinContainer,a=t.imageHeightWithinContainer,c=t.imageWidth,i=t.imageHeight,s=e.getFilename(d);n=h||(s?Object(K.sprintf)(Object(K.__)("This image has an empty alt attribute; its file name is %s"),s):Object(K.__)("This image has an empty alt attribute"));var p=Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)("img",{src:d,alt:n,onDoubleClick:e.toggleIsEditing,onClick:e.onImageClick,onError:function(){return e.onImageError(d)}}),Object(Ce.isBlobURL)(d)&&Object(Y.createElement)(se.Spinner,null));if(!I||!r)return Object(Y.createElement)(Y.Fragment,null,P(c,i),Object(Y.createElement)("div",{style:{width:_,height:k}},p));var f=_||r,v=k||a,O=c/i,j=c<i?20:20*O,y=i<c?20:20/O,C=2.5*l,w=!1,E=!1;return"center"===g?(w=!0,E=!0):u?"left"===g?w=!0:E=!0:"right"===g?E=!0:w=!0,Object(Y.createElement)(Y.Fragment,null,P(c,i),Object(Y.createElement)(se.ResizableBox,{size:{width:_,height:k},minWidth:j,maxWidth:C,minHeight:y,maxHeight:C/O,lockAspectRatio:!0,enable:{top:!1,right:w,bottom:!0,left:E},onResizeStart:b,onResizeStop:function(e,t,n,r){m(),o({width:parseInt(f+r.width,10),height:parseInt(v+r.height,10)})}},p))})),(!W.RichText.isEmpty(p)||c)&&Object(Y.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:p,unstableOnFocus:this.onFocusCaption,onChange:function(e){return o({caption:e})},isSelected:this.state.captionFocused,inlineToolbar:!0})),A)}}]),t}(Y.Component),dt=Object(ue.compose)([Object(be.withDispatch)((function(e){var t=e("core/block-editor").toggleSelection;return{onResizeStart:function(){return t(!1)},onResizeStop:function(){return t(!0)}}})),Object(be.withSelect)((function(e,t){var n=e("core").getMedia,r=e("core/block-editor").getSettings,o=t.attributes.id,a=t.isSelected,c=r(),i=c.__experimentalMediaUpload,l=c.imageSizes,s=c.isRTL,u=c.maxWidth;return{image:o&&a?n(o):null,maxWidth:u,isRTL:s,imageSizes:l,mediaUpload:i}})),Object(xe.withViewportMatch)({isLargeViewport:"medium"}),se.withNotices])(mt);function ht(e,t){var n=document.implementation.createHTMLDocument("").body;n.innerHTML=e;var r=n.firstElementChild;if(r&&"A"===r.nodeName)return r.getAttribute(t)||void 0}var pt={img:{attributes:["src","alt"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},gt={from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("img")},schema:{figure:{require:["img"],children:Object(Z.a)({},pt,{a:{attributes:["href","rel","target"],children:pt},figcaption:{children:Object(G.getPhrasingContentSchema)()}})}},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=c&&c.rel?c.rel:void 0,u=c&&c.className?c.className:void 0,b=Object(G.getBlockAttributes)("core/image",e.outerHTML,{align:r,id:a,linkDestination:i,href:l,rel:s,linkClass:u});return Object(G.createBlock)("core/image",b)}},{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("image/")},transform:function(e){var t=e[0];return Object(G.createBlock)("core/image",{url:Object(Ce.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){var n=t.shortcode,r=document.implementation.createHTMLDocument("").body;r.innerHTML=n.content;for(var o=r.querySelector("img");o&&o.parentNode&&o.parentNode!==r;)o=o.parentNode;return o&&o.parentNode.removeChild(o),r.innerHTML.trim()}},href:{shortcode:function(e,t){return ht(t.shortcode.content,"href")}},rel:{shortcode:function(e,t){return ht(t.shortcode.content,"rel")}},linkClass:{shortcode:function(e,t){return ht(t.shortcode.content,"class")}},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","")}}}}]},ft={name:"core/image",category:"common",attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string",default:"none"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}}},vt=ft.name,Ot={title:Object(K.__)("Image"),description:Object(K.__)("Insert an image to make a visual statement."),icon:ot,keywords:["img",Object(K.__)("photo")],example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:Object(K.__)("Mont Blanc appears—still, snowy, and serene.")}},styles:[{name:"default",label:Object(K._x)("Default","block style"),isDefault:!0},{name:"circle-mask",label:Object(K._x)("Circle Mask","block style")}],transforms:gt,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:dt,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.rel,s=n.linkClass,u=n.width,b=n.height,m=n.id,d=n.linkTarget,h=n.sizeSlug,p=Q()((t={},Object(q.a)(t,"align".concat(c),c),Object(q.a)(t,"size-".concat(h),h),Object(q.a)(t,"is-resized",u||b),t)),g=Object(Y.createElement)("img",{src:r,alt:o,className:m?"wp-image-".concat(m):null,width:u,height:b}),f=Object(Y.createElement)(Y.Fragment,null,i?Object(Y.createElement)("a",{className:s,href:i,target:d,rel:l},g):g,!W.RichText.isEmpty(a)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:a}));return"left"===c||"right"===c||"center"===c?Object(Y.createElement)("div",null,Object(Y.createElement)("figure",{className:p},f)):Object(Y.createElement)("figure",{className:p},f)},deprecated:_e},jt={className:!1,anchor:!0},yt={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},_t=[{attributes:yt,save:function(e){var t,n=e.attributes,r=n.align,o=n.content,a=n.customTextColor,c=n.level,i=n.textColor,l="h"+c,s=Object(W.getColorClassName)("color",i),u=Q()((t={},Object(q.a)(t,s,s),Object(q.a)(t,"has-text-align-".concat(r),r),t));return Object(Y.createElement)(W.RichText.Content,{className:u||void 0,tagName:l,style:{color:s?void 0:a},value:o})},supports:jt},{supports:jt,attributes:yt,save:function(e){var t=e.attributes,n=t.align,r=t.level,o=t.content,a=t.textColor,c=t.customTextColor,i="h"+r,l=Object(W.getColorClassName)("color",a),s=Q()(Object(q.a)({},l,l));return Object(Y.createElement)(W.RichText.Content,{className:s||void 0,tagName:i,style:{textAlign:n,color:l?void 0:c},value:o})}}];function kt(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(Y.createElement)(se.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:n[t]})):null}var Ct=function(e){function t(){return Object(re.a)(this,t),Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"createLevelControl",value:function(e,t,n){return{icon:Object(Y.createElement)(kt,{level:e}),title:Object(K.sprintf)(Object(K.__)("Heading %d"),e),isActive:e===t,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,o=t.minLevel,a=t.maxLevel,c=t.selectedLevel,i=t.onChange;return Object(Y.createElement)(se.Toolbar,{isCollapsed:r,icon:Object(Y.createElement)(kt,{level:c}),controls:Object(J.range)(o,a).map((function(t){return e.createLevelControl(t,c,i)}))})}}]),t}(Y.Component),wt=Object(Y.memo)((function(e){var t=e.textColorValue,n=e.setTextColor;return Object(Y.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:t,onChange:n,label:Object(K.__)("Text Color")}]})}));var Et=Object(ue.compose)([Object(W.withColors)("backgroundColor",{textColor:"color"})])((function(e){var t,n=e.attributes,r=e.setAttributes,o=e.mergeBlocks,a=e.onReplace,c=e.className,i=e.textColor,l=e.setTextColor,s=n.align,u=n.content,b=n.level,m=n.placeholder,d="h"+b;return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(Ct,{minLevel:2,maxLevel:5,selectedLevel:b,onChange:function(e){return r({level:e})}}),Object(Y.createElement)(W.AlignmentToolbar,{value:s,onChange:function(e){r({align:e})}})),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Heading Settings")},Object(Y.createElement)("p",null,Object(K.__)("Level")),Object(Y.createElement)(Ct,{isCollapsed:!1,minLevel:1,maxLevel:7,selectedLevel:b,onChange:function(e){return r({level:e})}})),Object(Y.createElement)(wt,{setTextColor:l,textColorValue:i.color})),Object(Y.createElement)(W.RichText,{identifier:"content",wrapperClassName:"wp-block-heading",tagName:d,value:u,onChange:function(e){return r({content:e})},onMerge:o,onSplit:function(e){return e?Object(G.createBlock)("core/heading",Object(Z.a)({},n,{content:e})):Object(G.createBlock)("core/paragraph")},onReplace:a,onRemove:function(){return a([])},className:Q()(c,(t={},Object(q.a)(t,"has-text-align-".concat(s),s),Object(q.a)(t,"has-text-color",i.color),Object(q.a)(t,i.class,i.class),t)),placeholder:m||Object(K.__)("Write heading…"),style:{color:i.color}}))}));var xt={from:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return Object(G.createBlock)("core/heading",{content:t})}},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:{h1:{children:Object(G.getPhrasingContentSchema)()},h2:{children:Object(G.getPhrasingContentSchema)()},h3:{children:Object(G.getPhrasingContentSchema)()},h4:{children:Object(G.getPhrasingContentSchema)()},h5:{children:Object(G.getPhrasingContentSchema)()},h6:{children:Object(G.getPhrasingContentSchema)()}},transform:function(e){return Object(G.createBlock)("core/heading",Object(Z.a)({},Object(G.getBlockAttributes)("core/heading",e.outerHTML),{level:(t=e.nodeName,Number(t.substr(1)))}));var t}}].concat(Object(U.a)([2,3,4,5,6].map((function(e){return{type:"prefix",prefix:Array(e+1).join("#"),transform:function(t){return Object(G.createBlock)("core/heading",{level:e,content:t})}}})))),to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return Object(G.createBlock)("core/paragraph",{content:t})}}]},St={name:"core/heading",category:"common",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}}},Tt=St.name,Nt={title:Object(K.__)("Heading"),description:Object(K.__)("Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."),icon:"heading",keywords:[Object(K.__)("title"),Object(K.__)("subtitle")],supports:{className:!1,anchor:!0},example:{attributes:{content:Object(K.__)("Code is Poetry"),level:2}},transforms:xt,deprecated:_t,merge:function(e,t){return{content:(e.content||"")+(t.content||"")}},edit:Et,save:function(e){var t,n=e.attributes,r=n.align,o=n.content,a=n.customTextColor,c=n.level,i=n.textColor,l="h"+c,s=Object(W.getColorClassName)("color",i),u=Q()((t={},Object(q.a)(t,s,s),Object(q.a)(t,"has-text-color",i||a),Object(q.a)(t,"has-text-align-".concat(r),r),t));return Object(Y.createElement)(W.RichText.Content,{className:u||void 0,tagName:l,style:{color:s?void 0:a},value:o})}},Rt={value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},At=[{attributes:Rt,save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation;return Object(Y.createElement)("blockquote",{style:{textAlign:n||null}},Object(Y.createElement)(W.RichText.Content,{multiline:!0,value:r}),!W.RichText.isEmpty(o)&&Object(Y.createElement)(W.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Object(Z.a)({},Rt,{style:{type:"number",default:1}}),migrate:function(e){return 2===e.style?Object(Z.a)({},Object(J.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(Y.createElement)("blockquote",{className:2===a?"is-large":"",style:{textAlign:n||null}},Object(Y.createElement)(W.RichText.Content,{multiline:!0,value:r}),!W.RichText.isEmpty(o)&&Object(Y.createElement)(W.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Object(Z.a)({},Rt,{citation:{type:"string",source:"html",selector:"footer",default:""},style:{type:"number",default:1}}),save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=t.style;return Object(Y.createElement)("blockquote",{className:"blocks-quote-style-".concat(a),style:{textAlign:n||null}},Object(Y.createElement)(W.RichText.Content,{multiline:!0,value:r}),!W.RichText.isEmpty(o)&&Object(Y.createElement)(W.RichText.Content,{tagName:"footer",value:o}))}}];var Bt=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.Path,{d:"M18.62 18h-5.24l2-4H13V6h8v7.24L18.62 18zm-2-2h.76L19 12.76V8h-4v4h3.62l-2 4zm-8 2H3.38l2-4H3V6h8v7.24L8.62 18zm-2-2h.76L9 12.76V8H5v4h3.62l-2 4z"}));var It=n("Ff2n"),Mt=n("qRz9"),Pt={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/quote",{value:Object(Mt.toHTMLString)({value:Object(Mt.join)(e.map((function(e){var t=e.content;return Object(Mt.create)({html:t})})),"\u2028"),multilineTag:"p"})})}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.content;return Object(G.createBlock)("core/quote",{value:"<p>".concat(t,"</p>")})}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(G.createBlock)("core/quote",{value:t,citation:n})}},{type:"prefix",prefix:">",transform:function(e){return Object(G.createBlock)("core/quote",{value:"<p>".concat(e,"</p>")})}},{type:"raw",isMatch:function(e){var t,n=(t=!1,function(e){return"P"===e.nodeName||(t||"CITE"!==e.nodeName?void 0:(t=!0,!0))});return"BLOCKQUOTE"===e.nodeName&&Array.from(e.childNodes).every(n)},schema:{blockquote:{children:{p:{children:Object(G.getPhrasingContentSchema)()},cite:{children:Object(G.getPhrasingContentSchema)()}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.value,n=e.citation,r=[];return t&&"<p></p>"!==t&&r.push.apply(r,Object(U.a)(Object(Mt.split)(Object(Mt.create)({html:t,multilineTag:"p"}),"\u2028").map((function(e){return Object(G.createBlock)("core/paragraph",{content:Object(Mt.toHTMLString)({value:e})})})))),n&&"<p></p>"!==n&&r.push(Object(G.createBlock)("core/paragraph",{content:n})),0===r.length?Object(G.createBlock)("core/paragraph",{content:""}):r}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.value,n=e.citation,r=Object(It.a)(e,["value","citation"]);if("<p></p>"===t)return Object(G.createBlock)("core/heading",{content:n});var o=Object(Mt.split)(Object(Mt.create)({html:t,multilineTag:"p"}),"\u2028"),a=Object(G.createBlock)("core/heading",{content:Object(Mt.toHTMLString)({value:o[0]})});if(!n&&1===o.length)return a;var c=o.slice(1);return[a,Object(G.createBlock)("core/quote",Object(Z.a)({},r,{citation:n,value:Object(Mt.toHTMLString)({value:c.length?Object(Mt.join)(o.slice(1),"\u2028"):Object(Mt.create)(),multilineTag:"p"})}))]}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(G.createBlock)("core/pullquote",{value:t,citation:n})}}]},Lt={name:"core/quote",category:"common",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}}},Ht=Lt.name,zt={title:Object(K.__)("Quote"),description:Object(K.__)('Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar'),icon:Bt,keywords:[Object(K.__)("blockquote"),Object(K.__)("cite")],example:{attributes:{value:"<p>"+Object(K.__)("In quoting others, we cite ourselves.")+"</p>",citation:"Julio Cortázar",className:"is-style-large"}},styles:[{name:"default",label:Object(K._x)("Default","block style"),isDefault:!0},{name:"large",label:Object(K._x)("Large","block style")}],transforms:Pt,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(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(W.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}})),Object(Y.createElement)(se.BlockQuotation,{className:Q()(c,Object(q.a)({},"has-text-align-".concat(i),i))},Object(Y.createElement)(W.RichText,{identifier:"value",multiline:!0,value:l,onChange:function(e){return n({value:e})},onMerge:o,onRemove:function(e){var t=!s||0===s.length;!e&&t&&a([])},placeholder:Object(K.__)("Write quote…"),onReplace:a,onSplit:function(e){return Object(G.createBlock)("core/quote",Object(Z.a)({},t,{value:e}))},__unstableOnSplitMiddle:function(){return Object(G.createBlock)("core/paragraph")}}),(!W.RichText.isEmpty(s)||r)&&Object(Y.createElement)(W.RichText,{identifier:"citation",value:s,onChange:function(e){return n({citation:e})},__unstableMobileNoFocusOnMount:!0,placeholder:Object(K.__)("Write citation…"),className:"wp-block-quote__citation"})))},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=Q()(Object(q.a)({},"has-text-align-".concat(n),n));return Object(Y.createElement)("blockquote",{className:a},Object(Y.createElement)(W.RichText.Content,{multiline:!0,value:r}),!W.RichText.isEmpty(o)&&Object(Y.createElement)(W.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){var n=t.value,r=t.citation;return r||(r=e.citation),n&&"<p></p>"!==n?Object(Z.a)({},e,{value:e.value+n,citation:r}):Object(Z.a)({},e,{citation:r})},deprecated:At};function Dt(e){return Math.min(3,e.images.length)}var Vt=function(e){var t=Object(J.pick)(e,["alt","id","link","caption"]);t.url=Object(J.get)(e,["sizes","large","url"])||Object(J.get)(e,["media_details","sizes","large","source_url"])||e.url;var n=Object(J.get)(e,["sizes","full","url"])||Object(J.get)(e,["media_details","sizes","full","source_url"]);return n&&(t.fullUrl=n),t},Ft=[{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Dt(t):r,a=t.imageCrop,c=t.linkTo;return Object(Y.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map((function(e){var t;switch(c){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var n=Object(Y.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Y.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Y.createElement)("figure",null,t?Object(Y.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:function(e){var t=e.images,n=e.ids;return t&&t.length>0&&(!n&&t||n&&t&&n.length!==t.length||Object(J.some)(t,(function(e,t){return!e&&null!==n[t]||parseInt(e,10)!==n[t]})))},migrate:function(e){return Object(Z.a)({},e,{ids:Object(J.map)(e.images,(function(e){var t=e.id;return t?parseInt(t,10):null}))})},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Dt(t):r,a=t.imageCrop,c=t.linkTo;return Object(Y.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(Y.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(Y.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Y.createElement)("figure",null,t?Object(Y.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Dt(t):r,a=t.align,c=t.imageCrop,i=t.linkTo,l=Q()("columns-".concat(o),{alignnone:"none"===a,"is-cropped":c});return Object(Y.createElement)("div",{className:l},n.map((function(e){var t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object(Y.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object(Y.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object(Y.createElement)("a",{href:t},n):n)})))}}],Ut=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.Path,{d:"M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67l1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}))),qt=Object(Y.createElement)(se.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),Wt=Object(Y.createElement)(se.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),Gt=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(ie.a)(e)),e.onSelectCaption=e.onSelectCaption.bind(Object(ie.a)(e)),e.onRemoveImage=e.onRemoveImage.bind(Object(ie.a)(e)),e.bindContainer=e.bindContainer.bind(Object(ie.a)(e)),e.state={captionSelected:!1},e}return Object(le.a)(t,e),Object(oe.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:"onSelectImage",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onRemoveImage",value:function(e){this.container===document.activeElement&&this.props.isSelected&&-1!==[we.BACKSPACE,we.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.isFirstItem,l=t.isLastItem,s=t.isSelected,u=t.caption,b=t.onRemove,m=t.onMoveForward,d=t.onMoveBackward,h=t.setAttributes,p=t["aria-label"];switch(a){case"media":e=n;break;case"attachment":e=c}var g=Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)("img",{src:n,alt:r,"data-id":o,onClick:this.onSelectImage,onFocus:this.onSelectImage,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":p,ref:this.bindContainer}),Object(Ce.isBlobURL)(n)&&Object(Y.createElement)(se.Spinner,null)),f=Q()({"is-selected":s,"is-transient":Object(Ce.isBlobURL)(n)});return Object(Y.createElement)("figure",{className:f},e?Object(Y.createElement)("a",{href:e},g):g,Object(Y.createElement)("div",{className:"block-library-gallery-item__move-menu"},Object(Y.createElement)(se.IconButton,{icon:qt,onClick:i?void 0:d,className:"blocks-gallery-item__move-backward",label:Object(K.__)("Move image backward"),"aria-disabled":i,disabled:!s}),Object(Y.createElement)(se.IconButton,{icon:Wt,onClick:l?void 0:m,className:"blocks-gallery-item__move-forward",label:Object(K.__)("Move image forward"),"aria-disabled":l,disabled:!s})),Object(Y.createElement)("div",{className:"block-library-gallery-item__inline-menu"},Object(Y.createElement)(se.IconButton,{icon:"no-alt",onClick:b,className:"blocks-gallery-item__remove",label:Object(K.__)("Remove image"),disabled:!s})),(s||u)&&Object(Y.createElement)(W.RichText,{tagName:"figcaption",placeholder:s?Object(K.__)("Write caption…"):null,value:u,isSelected:this.state.captionSelected,onChange:function(e){return h({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}))}}]),t}(Y.Component),Kt=Object(be.withSelect)((function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}}))(Gt),Zt=[{value:"attachment",label:Object(K.__)("Attachment Page")},{value:"media",label:Object(K.__)("Media File")},{value:"none",label:Object(K.__)("None")}],Yt=["image"],$t=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(ie.a)(e)),e.onSelectImages=e.onSelectImages.bind(Object(ie.a)(e)),e.setLinkTo=e.setLinkTo.bind(Object(ie.a)(e)),e.setColumnsNumber=e.setColumnsNumber.bind(Object(ie.a)(e)),e.toggleImageCrop=e.toggleImageCrop.bind(Object(ie.a)(e)),e.onMove=e.onMove.bind(Object(ie.a)(e)),e.onMoveForward=e.onMoveForward.bind(Object(ie.a)(e)),e.onMoveBackward=e.onMoveBackward.bind(Object(ie.a)(e)),e.onRemoveImage=e.onRemoveImage.bind(Object(ie.a)(e)),e.onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e.setImageAttributes=e.setImageAttributes.bind(Object(ie.a)(e)),e.setAttributes=e.setAttributes.bind(Object(ie.a)(e)),e.onFocusGalleryCaption=e.onFocusGalleryCaption.bind(Object(ie.a)(e)),e.state={selectedImage:null,attachmentCaptions:null},e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"setAttributes",value:function(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e=Object(Z.a)({},e,{ids:Object(J.map)(e.images,"id")})),this.props.setAttributes(e)}},{key:"onSelectImage",value:function(e){var t=this;return function(){t.state.selectedImage!==e&&t.setState({selectedImage:e})}}},{key:"onMove",value:function(e,t){var n=Object(U.a)(this.props.attributes.images);n.splice(t,1,this.props.attributes.images[e]),n.splice(e,1,this.props.attributes.images[t]),this.setState({selectedImage:t}),this.setAttributes({images:n})}},{key:"onMoveForward",value:function(e){var t=this;return function(){e!==t.props.attributes.images.length-1&&t.onMove(e,e+1)}}},{key:"onMoveBackward",value:function(e){var t=this;return function(){0!==e&&t.onMove(e,e-1)}}},{key:"onRemoveImage",value:function(e){var t=this;return function(){var n=Object(J.filter)(t.props.attributes.images,(function(t,n){return e!==n})),r=t.props.attributes.columns;t.setState({selectedImage:null}),t.setAttributes({images:n,columns:r?Math.min(n.length,r):r})}}},{key:"selectCaption",value:function(e,t,n){var r=Object(J.find)(t,{id:e.id}),o=r?r.caption:e.caption;if(!n)return o;var a=Object(J.find)(n,{id:e.id});return a&&a.caption!==e.caption?e.caption:o}},{key:"onSelectImages",value:function(e){var t=this,n=this.props.attributes,r=n.columns,o=n.images,a=this.state.attachmentCaptions;this.setState({attachmentCaptions:e.map((function(e){return{id:e.id,caption:e.caption}}))}),this.setAttributes({images:e.map((function(e){return Object(Z.a)({},Vt(e),{caption:t.selectCaption(e,o,a)})})),columns:r?Math.min(e.length,r):r})}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"setLinkTo",value:function(e){this.setAttributes({linkTo:e})}},{key:"setColumnsNumber",value:function(e){this.setAttributes({columns:e})}},{key:"toggleImageCrop",value:function(){this.setAttributes({imageCrop:!this.props.attributes.imageCrop})}},{key:"getImageCropHelp",value:function(e){return e?Object(K.__)("Thumbnails are cropped to align."):Object(K.__)("Thumbnails are not cropped.")}},{key:"onFocusGalleryCaption",value:function(){this.setState({selectedImage:null})}},{key:"setImageAttributes",value:function(e,t){var n=this.props.attributes.images,r=this.setAttributes;n[e]&&r({images:[].concat(Object(U.a)(n.slice(0,e)),[Object(Z.a)({},n[e],t)],Object(U.a)(n.slice(e+1)))})}},{key:"componentDidMount",value:function(){var e=this.props,t=e.attributes,n=e.mediaUpload,r=t.images;if(Object(J.every)(r,(function(e){var t=e.url;return Object(Ce.isBlobURL)(t)}))){var o=Object(J.map)(r,(function(e){var t=e.url;return Object(Ce.getBlobByURL)(t)}));Object(J.forEach)(r,(function(e){var t=e.url;return Object(Ce.revokeBlobURL)(t)})),n({filesList:o,onFileChange:this.onSelectImages,allowedTypes:["image"]})}}},{key:"componentDidUpdate",value:function(e){!this.props.isSelected&&e.isSelected&&this.setState({selectedImage:null,captionSelected:!1})}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.attributes,o=n.className,a=n.isSelected,c=n.noticeUI,i=n.setAttributes,l=r.align,s=r.columns,u=void 0===s?Dt(r):s,b=r.caption,m=r.imageCrop,d=r.images,h=r.linkTo,p=!!d.length,g=p&&Object(J.some)(d,(function(e){return e.id})),f=Object(Y.createElement)(W.MediaPlaceholder,{addToGallery:g,isAppender:p,className:o,dropZoneUIOnly:p&&!a,icon:!p&&Object(Y.createElement)(W.BlockIcon,{icon:Ut}),labels:{title:!p&&Object(K.__)("Gallery"),instructions:!p&&Object(K.__)("Drag images, upload new ones or select files from your library.")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:Yt,multiple:!0,value:g?d:void 0,onError:this.onUploadError,notices:p?void 0:c});if(!p)return f;var v=Q()("blocks-gallery-caption",{"screen-reader-text":!a&&W.RichText.isEmpty(b)});return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Gallery Settings")},d.length>1&&Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:u,onChange:this.setColumnsNumber,min:1,max:Math.min(8,d.length),required:!0}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Crop Images"),checked:!!m,onChange:this.toggleImageCrop,help:this.getImageCropHelp}),Object(Y.createElement)(se.SelectControl,{label:Object(K.__)("Link To"),value:h,onChange:this.setLinkTo,options:Zt}))),c,Object(Y.createElement)("figure",{className:Q()(o,(e={},Object(q.a)(e,"align".concat(l),l),Object(q.a)(e,"columns-".concat(u),u),Object(q.a)(e,"is-cropped",m),e))},Object(Y.createElement)("ul",{className:"blocks-gallery-grid"},d.map((function(e,n){var r=Object(K.sprintf)(Object(K.__)("image %1$d of %2$d in gallery"),n+1,d.length);return Object(Y.createElement)("li",{className:"blocks-gallery-item",key:e.id||e.url},Object(Y.createElement)(Kt,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===n,isLastItem:n+1===d.length,isSelected:a&&t.state.selectedImage===n,onMoveBackward:t.onMoveBackward(n),onMoveForward:t.onMoveForward(n),onRemove:t.onRemoveImage(n),onSelect:t.onSelectImage(n),setAttributes:function(e){return t.setImageAttributes(n,e)},caption:e.caption,"aria-label":r}))}))),f,Object(Y.createElement)(W.RichText,{tagName:"figcaption",className:v,placeholder:Object(K.__)("Write gallery caption…"),value:b,unstableOnFocus:this.onFocusGalleryCaption,onChange:function(e){return i({caption:e})},inlineToolbar:!0})))}}]),t}(Y.Component),Qt=Object(ue.compose)([Object(be.withSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}})),se.withNotices])($t);var Jt=function(e){return e?e.split(",").map((function(e){return parseInt(e,10)})):[]},Xt={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:function(e){var t=e[0].align;t=Object(J.every)(e,["align",t])?t:void 0;var n=Object(J.filter)(e,(function(e){return e.url}));return Object(G.createBlock)("core/gallery",{images:n.map((function(e){return{id:e.id,url:e.url,alt:e.alt,caption:e.caption}})),ids:n.map((function(e){return e.id})),align:t})}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:function(e){var t=e.named.ids;return Jt(t).map((function(e){return{id:e}}))}},ids:{type:"array",shortcode:function(e){var t=e.named.ids;return Jt(t)}},columns:{type:"number",shortcode:function(e){var t=e.named.columns;return parseInt(void 0===t?"3":t,10)}},linkTo:{type:"string",shortcode:function(e){var t=e.named.link,n=void 0===t?"attachment":t;return"file"===n?"media":n}}}},{type:"files",isMatch:function(e){return 1!==e.length&&Object(J.every)(e,(function(e){return 0===e.type.indexOf("image/")}))},transform:function(e){return Object(G.createBlock)("core/gallery",{images:e.map((function(e){return Vt({url:Object(Ce.createBlobURL)(e)})}))})}}],to:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.images,n=e.align;return t.length>0?t.map((function(e){var t=e.id,r=e.url,o=e.alt,a=e.caption;return Object(G.createBlock)("core/image",{id:t,url:r,alt:o,caption:a,align:n})})):Object(G.createBlock)("core/image",{align:n})}}]},en={name:"core/gallery",category:"common",attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}}},tn=en.name,nn={title:Object(K.__)("Gallery"),description:Object(K.__)("Display multiple images in a rich gallery."),icon:Ut,keywords:[Object(K.__)("images"),Object(K.__)("photos")],example:{attributes:{columns:2,images:[{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"},{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}]}},supports:{align:!0},transforms:Xt,edit:Qt,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Dt(t):r,a=t.imageCrop,c=t.caption,i=t.linkTo;return Object(Y.createElement)("figure",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},Object(Y.createElement)("ul",{className:"blocks-gallery-grid"},n.map((function(e){var t;switch(i){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}var n=Object(Y.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object(Y.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object(Y.createElement)("figure",null,t?Object(Y.createElement)("a",{href:t},n):n,!W.RichText.isEmpty(e.caption)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!W.RichText.isEmpty(c)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:c}))},deprecated:Ft},rn=n("JREk"),on=n.n(rn);var an=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M21 6V20C21 21.1 20.1 22 19 22H5C3.89 22 3 21.1 3 20L3.01 6C3.01 4.9 3.89 4 5 4H6V2H8V4H16V2H18V4H19C20.1 4 21 4.9 21 6ZM5 8H19V6H5V8ZM19 20V10H5V20H19ZM11 12H17V14H11V12ZM17 16H11V18H17V16ZM7 12H9V14H7V12ZM9 18V16H7V18H9Z"})),cn="core/archives",ln={title:Object(K.__)("Archives"),description:Object(K.__)("Display a monthly archive of your posts."),icon:an,category:"widgets",supports:{align:!0,html:!1},edit:function(e){var t=e.attributes,n=e.setAttributes,r=t.showPostCounts,o=t.displayAsDropdown;return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Archives Settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:o,onChange:function(){return n({displayAsDropdown:!o})}}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:r,onChange:function(){return n({showPostCounts:!r})}}))),Object(Y.createElement)(se.Disabled,null,Object(Y.createElement)(on.a,{block:"core/archives",attributes:t})))}},sn=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.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"})),un=["audio"],bn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.toggleAttribute=e.toggleAttribute.bind(Object(ie.a)(e)),e.onSelectURL=e.onSelectURL.bind(Object(ie.a)(e)),e.onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.mediaUpload,o=t.noticeOperations,a=t.setAttributes,c=n.id,i=n.src,l=void 0===i?"":i;if(!c&&Object(Ce.isBlobURL)(l)){var s=Object(Ce.getBlobByURL)(l);s&&r({filesList:[s],onFileChange:function(e){var t=Object(ke.a)(e,1)[0],n=t.id,r=t.url;a({id:n,src:r})},onError:function(t){a({src:void 0,id:void 0}),e.setState({editing:!0}),o.createErrorNotice(t)},allowedTypes:un})}}},{key:"toggleAttribute",value:function(e){var t=this;return function(n){t.props.setAttributes(Object(q.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;if(e!==n.src){var o=et({attributes:{url:e}});if(void 0!==o)return void this.props.onReplace(o);r({src:e,id:void 0})}this.setState({editing:!1})}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"getAutoplayHelp",value:function(e){return e?Object(K.__)("Note: Autoplaying audio may cause usability issues for some visitors."):null}},{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.noticeUI,m=this.state.editing,d=function(){e.setState({editing:!0})};return m?Object(Y.createElement)(W.MediaPlaceholder,{icon:Object(Y.createElement)(W.BlockIcon,{icon:sn}),className:u,onSelect:function(t){if(!t||!t.url)return l({src:void 0,id:void 0}),void d();l({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"audio/*",allowedTypes:un,value:this.props.attributes,notices:b,onError:this.onUploadError}):Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(se.Toolbar,null,Object(Y.createElement)(se.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(K.__)("Edit audio"),onClick:d,icon:"edit"}))),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Audio Settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n,help:this.getAutoplayHelp}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:o}),Object(Y.createElement)(se.SelectControl,{label:Object(K.__)("Preload"),value:void 0!==a?a:"none",onChange:function(e){return l({preload:"none"!==e?e:void 0})},options:[{value:"auto",label:Object(K.__)("Auto")},{value:"metadata",label:Object(K.__)("Metadata")},{value:"none",label:Object(K.__)("None")}]}))),Object(Y.createElement)("figure",{className:u},Object(Y.createElement)(se.Disabled,null,Object(Y.createElement)("audio",{controls:"controls",src:c})),(!W.RichText.isEmpty(r)||s)&&Object(Y.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:r,onChange:function(e){return l({caption:e})},inlineToolbar:!0})))}}]),t}(Y.Component),mn=Object(ue.compose)([Object(be.withSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}})),se.withNotices])(bn);var dn={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(G.createBlock)("core/audio",{src:Object(Ce.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:function(e){return e.named.src}},loop:{type:"string",shortcode:function(e){return e.named.loop}},autoplay:{type:"string",shortcode:function(e){return e.named.autoplay}},preload:{type:"string",shortcode:function(e){return e.named.preload}}}}]},hn={name:"core/audio",category:"common",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}}},pn=hn.name,gn={title:Object(K.__)("Audio"),description:Object(K.__)("Embed a simple audio player."),icon:sn,transforms:dn,supports:{align:!0},edit:mn,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src;return Object(Y.createElement)("figure",null,Object(Y.createElement)("audio",{controls:"controls",src:c,autoPlay:n,loop:o,preload:a}),!W.RichText.isEmpty(r)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:r}))}},fn=function(e){return Object(J.omit)(Object(Z.a)({},e,{customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0}),["color","textColor"])},vn={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},On=[{attributes:Object(Z.a)({},vn,{align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}}),isEligible:function(e){return e.className&&e.className.includes("is-style-squared")},migrate:function(e){var t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),Object(Z.a)({},e,{className:t||void 0,borderRadius:0})},save:function(e){var t,n=e.attributes,r=n.backgroundColor,o=n.customBackgroundColor,a=n.customTextColor,c=n.linkTarget,i=n.rel,l=n.text,s=n.textColor,u=n.title,b=n.url,m=Object(W.getColorClassName)("color",s),d=Object(W.getColorClassName)("background-color",r),h=Q()("wp-block-button__link",(t={"has-text-color":s||a},Object(q.a)(t,m,m),Object(q.a)(t,"has-background",r||o),Object(q.a)(t,d,d),t)),p={backgroundColor:d?void 0:o,color:m?void 0:a};return Object(Y.createElement)("div",null,Object(Y.createElement)(W.RichText.Content,{tagName:"a",className:h,href:b,title:u,style:p,value:l,target:c,rel:i}))}},{attributes:Object(Z.a)({},vn,{align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}}),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(W.getColorClassName)("color",i),b=Object(W.getColorClassName)("background-color",c),m=Q()("wp-block-button__link",(t={"has-text-color":i||s},Object(q.a)(t,u,u),Object(q.a)(t,"has-background",c||l),Object(q.a)(t,b,b),t)),d={backgroundColor:b?void 0:l,color:u?void 0:s};return Object(Y.createElement)("div",null,Object(Y.createElement)(W.RichText.Content,{tagName:"a",className:m,href:r,title:a,style:d,value:o}))},migrate:fn},{attributes:Object(Z.a)({},vn,{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(Y.createElement)("div",{className:"align".concat(a)},Object(Y.createElement)(W.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:o,style:c,value:r}))},migrate:fn},{attributes:Object(Z.a)({},vn,{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(Y.createElement)("div",{className:"align".concat(a),style:{backgroundColor:c}},Object(Y.createElement)(W.RichText.Content,{tagName:"a",href:n,title:o,style:{color:i},value:r}))},migrate:fn}],jn=window.getComputedStyle,yn=Object(se.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:jn(e).backgroundColor,fallbackTextColor:a||!c?void 0:jn(c).color}}));function _n(e){var t=e.borderRadius,n=void 0===t?"":t,r=e.setAttributes,o=Object(Y.useCallback)((function(e){r({borderRadius:e})}),[r]);return Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Border Settings")},Object(Y.createElement)(se.RangeControl,{value:n,label:Object(K.__)("Border Radius"),min:0,max:50,initialPosition:5,allowReset:!0,onChange:o}))}var kn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).nodeRef=null,e.bindRef=e.bindRef.bind(Object(ie.a)(e)),e.onSetLinkRel=e.onSetLinkRel.bind(Object(ie.a)(e)),e.onToggleOpenInNewTab=e.onToggleOpenInNewTab.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"bindRef",value:function(e){e&&(this.nodeRef=e)}},{key:"onSetLinkRel",value:function(e){this.props.setAttributes({rel:e})}},{key:"onToggleOpenInNewTab",value:function(e){var t=this.props.attributes.rel,n=e?"_blank":void 0,r=t;n&&!t?r="noreferrer noopener":n||"noreferrer noopener"!==t||(r=void 0),this.props.setAttributes({linkTarget:n,rel:r})}},{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.className,b=t.instanceId,m=t.isSelected,d=n.borderRadius,h=n.linkTarget,p=n.placeholder,g=n.rel,f=n.text,v=n.title,O=n.url,j="wp-block-button__inline-link-".concat(b);return Object(Y.createElement)("div",{className:u,title:v,ref:this.bindRef},Object(Y.createElement)(W.RichText,{placeholder:p||Object(K.__)("Add text…"),value:f,onChange:function(e){return s({text:e})},withoutInteractiveFormatting:!0,className:Q()("wp-block-button__link",(e={"has-background":r.color},Object(q.a)(e,r.class,r.class),Object(q.a)(e,"has-text-color",o.color),Object(q.a)(e,o.class,o.class),Object(q.a)(e,"no-border-radius",0===d),e)),style:{backgroundColor:r.color,color:o.color,borderRadius:d?d+"px":void 0}}),Object(Y.createElement)(se.BaseControl,{label:Object(K.__)("Link"),className:"wp-block-button__inline-link",id:j},Object(Y.createElement)(W.URLInput,{className:"wp-block-button__inline-link-input",value:O,autoFocus:!1,onChange:function(e){return s({url:e})},disableSuggestions:!m,id:j,isFullWidth:!0,hasBorder:!0})),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:r.color,onChange:a,label:Object(K.__)("Background Color")},{value:o.color,onChange:c,label:Object(K.__)("Text Color")}]},Object(Y.createElement)(W.ContrastChecker,{isLargeText:!1,textColor:o.color,backgroundColor:r.color,fallbackBackgroundColor:i,fallbackTextColor:l})),Object(Y.createElement)(_n,{borderRadius:d,setAttributes:s}),Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Link settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Open in new tab"),onChange:this.onToggleOpenInNewTab,checked:"_blank"===h}),Object(Y.createElement)(se.TextControl,{label:Object(K.__)("Link rel"),value:g||"",onChange:this.onSetLinkRel}))))}}]),t}(Y.Component),Cn=Object(ue.compose)([ue.withInstanceId,Object(W.withColors)("backgroundColor",{textColor:"color"}),yn])(kn),wn=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.Path,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"})));var En={name:"core/button",category:"layout",attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"}}},xn=En.name,Sn={title:Object(K.__)("Button"),description:Object(K.__)("Prompt visitors to take action with a button-style link."),icon:wn,keywords:[Object(K.__)("link")],example:{attributes:{className:"is-style-fill",backgroundColor:"vivid-green-cyan",text:Object(K.__)("Call to Action")}},supports:{align:!0,alignWide:!1},styles:[{name:"fill",label:Object(K.__)("Fill"),isDefault:!0},{name:"outline",label:Object(K.__)("Outline")}],edit:Cn,save:function(e){var t,n=e.attributes,r=n.backgroundColor,o=n.borderRadius,a=n.customBackgroundColor,c=n.customTextColor,i=n.linkTarget,l=n.rel,s=n.text,u=n.textColor,b=n.title,m=n.url,d=Object(W.getColorClassName)("color",u),h=Object(W.getColorClassName)("background-color",r),p=Q()("wp-block-button__link",(t={"has-text-color":u||c},Object(q.a)(t,d,d),Object(q.a)(t,"has-background",r||a),Object(q.a)(t,h,h),Object(q.a)(t,"no-border-radius",0===o),t)),g={backgroundColor:h?void 0:a,color:d?void 0:c,borderRadius:o?o+"px":void 0};return Object(Y.createElement)("div",null,Object(Y.createElement)(W.RichText.Content,{tagName:"a",className:p,href:m,title:b,style:g,value:s,target:i,rel:l}))},deprecated:On},Tn=n("wy2R"),Nn=n.n(Tn),Rn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).getYearMonth=Qe()(e.getYearMonth.bind(Object(ie.a)(e)),{maxSize:1}),e.getServerSideAttributes=Qe()(e.getServerSideAttributes.bind(Object(ie.a)(e)),{maxSize:1}),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"getYearMonth",value:function(e){if(!e)return{};var t=Nn()(e);return{year:t.year(),month:t.month()+1}}},{key:"getServerSideAttributes",value:function(e,t){return Object(Z.a)({},e,this.getYearMonth(t))}},{key:"render",value:function(){return Object(Y.createElement)(se.Disabled,null,Object(Y.createElement)(on.a,{block:"core/calendar",attributes:this.getServerSideAttributes(this.props.attributes,this.props.date)}))}}]),t}(Y.Component),An=Object(be.withSelect)((function(e){var t=e("core/editor");if(t){var n=t.getEditedPostAttribute;return{date:"post"===n("type")?n("date"):void 0}}}))(Rn),Bn=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.Path,{d:"M7 11h2v2H7v-2zm14-5v14c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2l.01-14c0-1.1.88-2 1.99-2h1V2h2v2h8V2h2v2h1c1.1 0 2 .9 2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}))),In="core/calendar",Mn={title:Object(K.__)("Calendar"),description:Object(K.__)("A calendar of your site’s posts."),icon:Bn,category:"widgets",keywords:[Object(K.__)("posts"),Object(K.__)("archive")],supports:{align:!0},example:{},edit:An},Pn=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).toggleDisplayAsDropdown=e.toggleDisplayAsDropdown.bind(Object(ie.a)(e)),e.toggleShowPostCounts=e.toggleShowPostCounts.bind(Object(ie.a)(e)),e.toggleShowHierarchy=e.toggleShowHierarchy.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.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){return"wp-block-categories__list wp-block-categories__list-level-".concat(e)}},{key:"renderCategoryName",value:function(e){return e.name?Object(J.unescape)(e.name).trim():Object(K.__)("(Untitled)")}},{key:"renderCategoryList",value:function(){var e=this,t=this.props.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object(Y.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(Y.createElement)("li",{key:e.id},Object(Y.createElement)("a",{href:e.link,target:"_blank",rel:"noreferrer noopener"},this.renderCategoryName(e)),a&&Object(Y.createElement)("span",{className:"wp-block-categories__post-count"}," ","(",e.count,")"),o&&!!c.length&&Object(Y.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.instanceId,n=this.props.attributes.showHierarchy?0:null,r=this.getCategories(n),o="blocks-category-select-".concat(t);return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)("label",{htmlFor:o,className:"screen-reader-text"},Object(K.__)("Categories")),Object(Y.createElement)("select",{id:o,className:"wp-block-categories__dropdown"},r.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(Y.createElement)("option",{key:e.id},Object(J.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.isRequesting,r=t.displayAsDropdown,o=t.showHierarchy,a=t.showPostCounts,c=Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Categories Settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Display as Dropdown"),checked:r,onChange:this.toggleDisplayAsDropdown}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Show Hierarchy"),checked:o,onChange:this.toggleShowHierarchy}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Show Post Counts"),checked:a,onChange:this.toggleShowPostCounts})));return n?Object(Y.createElement)(Y.Fragment,null,c,Object(Y.createElement)(se.Placeholder,{icon:"admin-post",label:Object(K.__)("Categories")},Object(Y.createElement)(se.Spinner,null))):Object(Y.createElement)(Y.Fragment,null,c,Object(Y.createElement)("div",{className:this.props.className},r?this.renderCategoryDropdown():this.renderCategoryList()))}}]),t}(Y.Component),Ln=Object(ue.compose)(Object(be.withSelect)((function(e){var t=e("core").getEntityRecords,n=e("core/data").isResolving,r={per_page:-1,hide_empty:!0};return{categories:t("taxonomy","category",r),isRequesting:n("core","getEntityRecords",["taxonomy","category",r])}})),ue.withInstanceId)(Pn),Hn=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.Path,{d:"M12,2l-5.5,9h11L12,2z M12,5.84L13.93,9h-3.87L12,5.84z"}),Object(Y.createElement)(se.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(Y.createElement)(se.Path,{d:"m3 21.5h8v-8h-8v8zm2-6h4v4h-4v-4z"})),zn="core/categories",Dn={title:Object(K.__)("Categories"),description:Object(K.__)("Display a list of all categories."),icon:Hn,category:"widgets",supports:{align:!0,html:!1},edit:Ln};function Vn(e){return Object(J.flow)(Fn,qn,Gn)(e||"")}function Fn(e){return e.replace(/&/g,"&")}function Un(e){return e.replace(/&/g,"&")}function qn(e){return e.replace(/\[/g,"[")}function Wn(e){return e.replace(/[/g,"[")}function Gn(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}function Kn(e){return e.replace(/^(\s*https?:)//([^\s<>"]+\s*)$/m,"$1//$2")}var Zn=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.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"}));var Yn={from:[{type:"enter",regExp:/^```$/,transform:function(){return Object(G.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":{}}}}}}}]},$n={name:"core/code",category:"formatting",attributes:{content:{type:"string",source:"text",selector:"code"}}},Qn=$n.name,Jn={title:Object(K.__)("Code"),description:Object(K.__)("Display code snippets that respect your spacing and tabs."),icon:Zn,example:{attributes:{content:Object(K.__)('// A "block" is the abstract term used')+"\n"+Object(K.__)("// to describe units of markup that,")+"\n"+Object(K.__)("// when composed together, form the")+"\n"+Object(K.__)("// content or layout of a page.")+"\n"+Object(K.__)("registerBlockType( name, settings );")}},supports:{html:!1},transforms:Yn,edit:function(e){var t,n=e.attributes,r=e.setAttributes,o=e.className;return Object(Y.createElement)("div",{className:o},Object(Y.createElement)(W.PlainText,{value:(t=n.content,Object(J.flow)(Kn,Wn,Un)(t||"")),onChange:function(e){return r({content:Vn(e)})},placeholder:Object(K.__)("Write code…"),"aria-label":Object(K.__)("Code")}))},save:function(e){var t=e.attributes;return Object(Y.createElement)("pre",null,Object(Y.createElement)("code",null,t.content))}};function Xn(e){var t,n=Xn.doc;n||(n=document.implementation.createHTMLDocument(""),Xn.doc=n),n.body.innerHTML=e;var r=!0,o=!1,a=void 0;try{for(var c,i=n.body.firstChild.classList[Symbol.iterator]();!(r=(c=i.next()).done);r=!0){if(t=c.value.match(/^layout-column-(\d+)$/))return Number(t[1])-1}}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}}var er=[{attributes:{columns:{type:"number",default:2}},isEligible:function(e,t){return!!t.some((function(e){return/layout-column-\d+/.test(e.originalContent)}))&&t.some((function(e){return void 0!==Xn(e.originalContent)}))},migrate:function(e,t){var n=t.reduce((function(e,t){var n=Xn(t.originalContent);return void 0===n&&(n=0),e[n]||(e[n]=[]),e[n].push(t),e}),[]).map((function(e){return Object(G.createBlock)("core/column",{},e)}));return[Object(J.omit)(e,["columns"]),n]},save:function(e){var t=e.attributes.columns;return Object(Y.createElement)("div",{className:"has-".concat(t,"-columns")},Object(Y.createElement)(W.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate:function(e,t){return[e=Object(J.omit)(e,["columns"]),t]},save:function(e){var t=e.attributes,n=t.verticalAlignment,r=t.columns,o=Q()("has-".concat(r,"-columns"),Object(q.a)({},"are-vertically-aligned-".concat(n),n));return Object(Y.createElement)("div",{className:o},Object(Y.createElement)(W.InnerBlocks.Content,null))}}],tr=Qe()((function(e){return void 0===e?null:Object(J.times)(e,(function(){return["core/column"]}))})),nr=function(e){return Number.isFinite(e)?parseFloat(e.toFixed(2)):void 0};function rr(e,t){var n=e.attributes.width;return nr(void 0===n?100/t:n)}function or(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return Object(J.sumBy)(e,(function(e){return rr(e,t)}))}function ar(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce((function(e,n){var r=rr(n,t);return Object.assign(e,Object(q.a)({},n.clientId,r))}),{})}function cr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=or(e,n),o=t-r,a=o/e.length;return Object(J.mapValues)(ar(e,n),(function(e){return nr(e+a)}))}function ir(e,t){return e.map((function(e){return Object(J.merge)({},e,{attributes:{width:t[e.clientId]}})}))}var lr=["core/column"],sr=[{title:Object(K.__)("Two columns; equal split"),icon:Object(Y.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),template:[["core/column"],["core/column"]]},{title:Object(K.__)("Two columns; one-third, two-thirds split"),icon:Object(Y.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),template:[["core/column",{width:33.33}],["core/column",{width:66.66}]]},{title:Object(K.__)("Two columns; two-thirds, one-third split"),icon:Object(Y.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),template:[["core/column",{width:66.66}],["core/column",{width:33.33}]]},{title:Object(K.__)("Three columns; equal split"),icon:Object(Y.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),template:[["core/column"],["core/column"],["core/column"]]},{title:Object(K.__)("Three columns; wide center column"),icon:Object(Y.createElement)(se.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),template:[["core/column",{width:25}],["core/column",{width:50}],["core/column",{width:25}]]}];var ur=Object(be.withDispatch)((function(e,t,n){return{updateAlignment:function(r){var o=t.clientId,a=t.setAttributes,c=e("core/block-editor").updateBlockAttributes,i=n.select("core/block-editor").getBlockOrder;a({verticalAlignment:r}),i(o).forEach((function(e){c(e,{verticalAlignment:r})}))},updateColumns:function(r,o){var a=t.clientId,c=e("core/block-editor").replaceInnerBlocks,i=(0,n.select("core/block-editor").getBlocks)(a),l=i.some((function(e){return Number.isFinite(e.attributes.width)})),s=o>r;if(s&&l){var u=nr(100/o),b=cr(i,100-u);i=[].concat(Object(U.a)(ir(i,b)),Object(U.a)(Object(J.times)(o-r,(function(){return Object(G.createBlock)("core/column",{width:u})}))))}else if(s)i=[].concat(Object(U.a)(i),Object(U.a)(Object(J.times)(o-r,(function(){return Object(G.createBlock)("core/column")}))));else{if(i=Object(J.dropRight)(i,r-o),l)i=ir(i,cr(i,100))}c(a,i,!1)}}}))((function(e){var t=e.attributes,n=e.className,r=e.updateAlignment,o=e.updateColumns,a=e.clientId,c=t.verticalAlignment,i=Object(be.useSelect)((function(e){return{count:e("core/block-editor").getBlockCount(a)}})).count,l=Object(Y.useState)(tr(i)),s=Object(ke.a)(l,2),u=s[0],b=s[1],m=Object(Y.useState)(!1),d=Object(ke.a)(m,2),h=d[0],p=d[1];Object(Y.useEffect)((function(){h&&p(!1)}),[h]);var g=Q()(n,Object(q.a)({},"are-vertically-aligned-".concat(c),c)),f=0===i&&!h||!u;return Object(Y.createElement)(Y.Fragment,null,!f&&Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,null,Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:i,onChange:function(e){return o(i,e)},min:2,max:6}))),Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(W.BlockVerticalAlignmentToolbar,{onChange:r,value:c}))),Object(Y.createElement)("div",{className:g},Object(Y.createElement)(W.InnerBlocks,{__experimentalTemplateOptions:sr,__experimentalOnSelectTemplateOption:function(e){void 0===e&&(e=tr(2)),b(e),p(!0)},__experimentalAllowTemplateOptionSkip:!0,template:f?null:u,templateLock:"all",allowedBlocks:lr})))})),br=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.Path,{d:"M4,4H20a2,2,0,0,1,2,2V18a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V6A2,2,0,0,1,4,4ZM4 6V18H8V6Zm6 0V18h4V6Zm6 0V18h4V6Z"})));var mr={name:"core/columns",category:"layout",attributes:{verticalAlignment:{type:"string"}}},dr=mr.name,hr={title:Object(K.__)("Columns"),icon:br,description:Object(K.__)("Add a block that displays content in multiple columns, then add whatever content blocks you’d like."),supports:{align:["wide","full"],html:!1},example:{innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis."}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:"Suspendisse commodo neque lacus, a dictum orci interdum et."}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:Object(K.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:Object(K.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:er,edit:ur,save:function(e){var t=e.attributes.verticalAlignment,n=Q()(Object(q.a)({},"are-vertically-aligned-".concat(t),t));return Object(Y.createElement)("div",{className:n},Object(Y.createElement)(W.InnerBlocks.Content,null))}};var pr=Object(ue.compose)(Object(be.withSelect)((function(e,t){var n=t.clientId;return{hasChildBlocks:(0,e("core/block-editor").getBlockOrder)(n).length>0}})),Object(be.withDispatch)((function(e,t,n){return{updateAlignment:function(r){var o=t.clientId,a=t.setAttributes,c=e("core/block-editor").updateBlockAttributes,i=n.select("core/block-editor").getBlockRootClientId;a({verticalAlignment:r}),c(i(o),{verticalAlignment:null})},updateWidth:function(r){var o=t.clientId,a=e("core/block-editor").updateBlockAttributes,c=n.select("core/block-editor"),i=c.getBlockRootClientId,l=(0,c.getBlocks)(i(o)),s=function(e,t){var n=Object(J.findIndex)(e,{clientId:t});return n===e.length-1?e.slice(0,n):e.slice(n+1)}(l,o),u=r+or(Object(J.difference)(l,[Object(J.find)(l,{clientId:o})].concat(Object(U.a)(s)))),b=Object(Z.a)({},ar(l,l.length),Object(q.a)({},o,nr(r)),cr(s,100-u,l.length));Object(J.forEach)(b,(function(e,t){a(t,{width:e})}))}}})))((function(e){var t=e.attributes,n=e.className,r=e.updateAlignment,o=e.updateWidth,a=e.hasChildBlocks,c=t.verticalAlignment,i=t.width,l=Q()(n,"block-core-columns",Object(q.a)({},"is-vertically-aligned-".concat(c),c));return Object(Y.createElement)("div",{className:l},Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(W.BlockVerticalAlignmentToolbar,{onChange:r,value:c})),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Column Settings")},Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Percentage width"),value:i||"",onChange:o,min:0,max:100,required:!0,allowReset:!0}))),Object(Y.createElement)(W.InnerBlocks,{templateLock:!1,renderAppender:a?void 0:function(){return Object(Y.createElement)(W.InnerBlocks.ButtonBlockAppender,null)}}))})),gr=Object(Y.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.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"}));var fr={name:"core/column",category:"common",attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}}},vr=fr.name,Or={title:Object(K.__)("Column"),parent:["core/columns"],icon:gr,description:Object(K.__)("A single column within a columns block."),supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:function(e){var t=e.width;if(Number.isFinite(t))return{style:{flexBasis:t+"%"}}},edit:pr,save:function(e){var t,n=e.attributes,r=n.verticalAlignment,o=n.width,a=Q()(Object(q.a)({},"is-vertically-aligned-".concat(r),r));return Number.isFinite(o)&&(t={flexBasis:o+"%"}),Object(Y.createElement)("div",{className:a,style:t},Object(Y.createElement)(W.InnerBlocks.Content,null))}};function jr(e){return e?{backgroundImage:"url(".concat(e,")")}:{}}function yr(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}var _r={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},kr=[{attributes:Object(Z.a)({},_r,{title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}}),supports:{align:!0},save:function(e){var t=e.attributes,n=t.backgroundType,r=t.contentAlign,o=t.customOverlayColor,a=t.dimRatio,c=t.focalPoint,i=t.hasParallax,l=t.overlayColor,s=t.title,u=t.url,b=Object(W.getColorClassName)("background-color",l),m="image"===n?jr(u):{};b||(m.backgroundColor=o),c&&!i&&(m.backgroundPosition="".concat(100*c.x,"% ").concat(100*c.y,"%"));var d=Q()(yr(a),b,Object(q.a)({"has-background-dim":0!==a,"has-parallax":i},"has-".concat(r,"-content"),"center"!==r));return Object(Y.createElement)("div",{className:d,style:m},"video"===n&&u&&Object(Y.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!W.RichText.isEmpty(s)&&Object(Y.createElement)(W.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:s}))},migrate:function(e){return[Object(J.omit)(e,["title","contentAlign"]),[Object(G.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(K.__)("Write title…")})]]}},{attributes:Object(Z.a)({},_r,{title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}}),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(W.getColorClassName)("background-color",l),b=jr(n);u||(b.backgroundColor=s);var m=Q()("wp-block-cover-image",yr(a),u,Object(q.a)({"has-background-dim":0!==a,"has-parallax":o},"has-".concat(i,"-content"),"center"!==i),c?"align".concat(c):null);return Object(Y.createElement)("div",{className:m,style:b},!W.RichText.isEmpty(r)&&Object(Y.createElement)(W.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r}))},migrate:function(e){return[Object(J.omit)(e,["title","contentAlign","align"]),[Object(G.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(K.__)("Write title…")})]]}},{attributes:Object(Z.a)({},_r,{title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}}),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=jr(n),l=Q()("wp-block-cover-image",yr(a),{"has-background-dim":0!==a,"has-parallax":o},c?"align".concat(c):null);return Object(Y.createElement)("section",{className:l,style:i},Object(Y.createElement)(W.RichText.Content,{tagName:"h2",value:r}))},migrate:function(e){return[Object(J.omit)(e,["title","contentAlign","align"]),[Object(G.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:Object(K.__)("Write title…")})]]}}],Cr=n("FEKF"),wr=n.n(Cr),Er=n("Zss7"),xr=n.n(Er),Sr=Object(Y.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Y.createElement)(se.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(Y.createElement)(se.Path,{d:"M0 0h24v24H0z",fill:"none"})),Tr=["image","video"],Nr=[["core/paragraph",{align:"center",fontSize:"large",placeholder:Object(K.__)("Write title…")}]];function Rr(){return Rr.fastAverageColor||(Rr.fastAverageColor=new wr.a),Rr.fastAverageColor}var Ar=Object(ue.withInstanceId)((function(e){var t=e.value,n=void 0===t?"":t,r=e.instanceId,o=e.onChange,a=Object(Y.useState)(null),c=Object(ke.a)(a,2),i=c[0],l=c[1],s=Object(Y.useCallback)((function(e){var t=""!==e.target.value?parseInt(e.target.value,10):void 0;(isNaN(t)||t<50)&&void 0!==t?l(e.target.value):(l(null),o(t))}),[o,l]),u=Object(Y.useCallback)((function(){null!==i&&l(null)}),[i,l]),b="block-cover-height-input-".concat(r);return Object(Y.createElement)(se.BaseControl,{label:Object(K.__)("Minimum height in pixels"),id:b},Object(Y.createElement)("input",{type:"number",id:b,onChange:s,onBlur:u,value:null!==i?i:n,min:50,step:"10"}))})),Br={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};function Ir(e){var t=e.className,n=e.children,r=e.onResizeStart,o=e.onResize,a=e.onResizeStop,c=Object(Y.useState)(!1),i=Object(ke.a)(c,2),l=i[0],s=i[1],u=Object(Y.useCallback)((function(e,t,n){o(n.clientHeight),l||s(!0)}),[o,s]),b=Object(Y.useCallback)((function(e,t,n){r(n.clientHeight),o(n.clientHeight)}),[r,o]),m=Object(Y.useCallback)((function(e,t,n){a(n.clientHeight),s(!1)}),[a,s]);return Object(Y.createElement)(se.ResizableBox,{className:Q()(t,{"is-resizing":l}),enable:Br,onResizeStart:b,onResize:u,onResizeStop:m,minHeight:50},n)}var Mr=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={isDark:!1,temporaryMinHeight:null},e.imageRef=Object(Y.createRef)(),e.videoRef=Object(Y.createRef)(),e.changeIsDarkIfRequired=e.changeIsDarkIfRequired.bind(Object(ie.a)(e)),e.onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){this.handleBackgroundMode()}},{key:"componentDidUpdate",value:function(e){this.handleBackgroundMode(e)}},{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.setAttributes,o=t.isSelected,a=t.className,c=t.noticeUI,i=t.overlayColor,l=t.setOverlayColor,s=t.toggleSelection,u=n.backgroundType,b=n.dimRatio,m=n.focalPoint,d=n.hasParallax,h=n.id,p=n.url,g=n.minHeight,f=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}r(Object(Z.a)({url:e.url,id:e.id,backgroundType:t},"video"===t?{focalPoint:void 0,hasParallax:void 0}:{}))}else r({url:void 0,id:void 0})},v=this.state.temporaryMinHeight,O=Object(Z.a)({},"image"===u?jr(p):{},{backgroundColor:i.color,minHeight:v||g});m&&(O.backgroundPosition="".concat(100*m.x,"% ").concat(100*m.y,"%"));var j=Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,!(!p&&!i.color)&&Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.MediaUploadCheck,null,Object(Y.createElement)(se.Toolbar,null,Object(Y.createElement)(W.MediaUpload,{onSelect:f,allowedTypes:Tr,value:h,render:function(e){var t=e.open;return Object(Y.createElement)(se.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit media"),icon:"edit",onClick:t})}}))))),Object(Y.createElement)(W.InspectorControls,null,!!p&&Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Media Settings")},"image"===u&&Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Fixed Background"),checked:d,onChange:function(){r(Object(Z.a)({hasParallax:!d},d?{}:{focalPoint:void 0}))}}),"image"===u&&!d&&Object(Y.createElement)(se.FocalPointPicker,{label:Object(K.__)("Focal Point Picker"),url:p,value:m,onChange:function(e){return r({focalPoint:e})}}),Object(Y.createElement)(se.PanelRow,null,Object(Y.createElement)(se.Button,{isDefault:!0,isSmall:!0,className:"block-library-cover__reset-button",onClick:function(){return r({url:void 0,id:void 0,backgroundType:void 0,dimRatio:void 0,focalPoint:void 0,hasParallax:void 0})}},Object(K.__)("Clear Media")))),(p||i.color)&&Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Dimensions")},Object(Y.createElement)(Ar,{value:v||g,onChange:function(e){r({minHeight:e})}})),Object(Y.createElement)(W.PanelColorSettings,{title:Object(K.__)("Overlay"),initialOpen:!0,colorSettings:[{value:i.color,onChange:l,label:Object(K.__)("Overlay Color")}]},!!p&&Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Background Opacity"),value:b,onChange:function(e){return r({dimRatio:e})},min:0,max:100,step:10,required:!0})))));if(!p&&!i.color){var y=Object(Y.createElement)(W.BlockIcon,{icon:Sr}),_=Object(K.__)("Cover");return Object(Y.createElement)(Y.Fragment,null,j,Object(Y.createElement)(W.MediaPlaceholder,{icon:y,className:a,labels:{title:_,instructions:Object(K.__)("Upload an image or video file, or pick one from your media library.")},onSelect:f,accept:"image/*,video/*",allowedTypes:Tr,notices:c,onError:this.onUploadError},Object(Y.createElement)(W.ColorPalette,{disableCustomColors:!0,value:i.color,onChange:l,clearable:!1,className:"wp-block-cover__placeholder-color-palette"})))}var k=Q()(a,yr(b),Object(q.a)({"is-dark-theme":this.state.isDark,"has-background-dim":0!==b,"has-parallax":d},i.class,i.class));return Object(Y.createElement)(Y.Fragment,null,j,Object(Y.createElement)(Ir,{className:Q()("block-library-cover__resize-container",{"is-selected":o}),onResizeStart:function(){return s(!1)},onResize:function(t){e.setState({temporaryMinHeight:t})},onResizeStop:function(t){s(!0),r({minHeight:t}),e.setState({temporaryMinHeight:null})}},Object(Y.createElement)("div",{"data-url":p,style:O,className:k},"image"===u&&Object(Y.createElement)("img",{ref:this.imageRef,"aria-hidden":!0,alt:"",style:{display:"none"},src:p}),"video"===u&&Object(Y.createElement)("video",{ref:this.videoRef,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:p}),Object(Y.createElement)("div",{className:"wp-block-cover__inner-container"},Object(Y.createElement)(W.InnerBlocks,{template:Nr})))))}},{key:"handleBackgroundMode",value:function(e){var t=this,n=this.props,r=n.attributes,o=n.overlayColor,a=r.dimRatio,c=r.url;if(a>50){if(e&&e.attributes.dimRatio>50&&e.overlayColor.color===o.color)return;return o.color?void this.changeIsDarkIfRequired(xr()(o.color).isDark()):void this.changeIsDarkIfRequired(!0)}if(!(e&&e.attributes.dimRatio<=50&&e.attributes.url===c)){var i;switch(r.backgroundType){case"image":i=this.imageRef.current;break;case"video":i=this.videoRef.current}i&&Rr().getColorAsync(i,(function(e){t.changeIsDarkIfRequired(e.isDark)}))}}},{key:"changeIsDarkIfRequired",value:function(e){this.state.isDark!==e&&this.setState({isDark:e})}}]),t}(Y.Component),Pr=Object(ue.compose)([Object(be.withDispatch)((function(e){return{toggleSelection:e("core/block-editor").toggleSelection}})),Object(W.withColors)({overlayColor:"background-color"}),se.withNotices,ue.withInstanceId])(Mr);var Lr={from:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.caption,n=e.url,r=e.align,o=e.id;return Object(G.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(G.createBlock)("core/cover",{title:t,url:n,align:r,id:o,backgroundType:"video"})}}],to:[{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(G.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(G.createBlock)("core/video",{caption:t,src:n,id:o,align:r})}}]},Hr={name:"core/cover",category:"common",attributes:{url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"}}},zr=Hr.name,Dr={title:Object(K.__)("Cover"),description:Object(K.__)("Add an image or video with a text overlay — great for headers."),icon:Sr,supports:{align:!0},example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{customFontSize:48,content:Object(K.__)("<strong>Snow Patrol</strong>"),align:"center"}}]},transforms:Lr,save:function(e){var t=e.attributes,n=t.backgroundType,r=t.customOverlayColor,o=t.dimRatio,a=t.focalPoint,c=t.hasParallax,i=t.overlayColor,l=t.url,s=t.minHeight,u=Object(W.getColorClassName)("background-color",i),b="image"===n?jr(l):{};u||(b.backgroundColor=r),a&&!c&&(b.backgroundPosition="".concat(100*a.x,"% ").concat(100*a.y,"%")),b.minHeight=s||void 0;var m=Q()(yr(o),u,{"has-background-dim":0!==o,"has-parallax":c});return Object(Y.createElement)("div",{className:m,style:b},"video"===n&&l&&Object(Y.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:l}),Object(Y.createElement)("div",{className:"wp-block-cover__inner-container"},Object(Y.createElement)(W.InnerBlocks.Content,null)))},edit:Pr,deprecated:kr},Vr=function(e){var t=e.blockSupportsResponsive,n=e.showEditButton,r=e.themeSupportsResponsive,o=e.allowResponsive,a=e.getResponsiveHelp,c=e.toggleResponsive,i=e.switchBackToURLInput;return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(se.Toolbar,null,n&&Object(Y.createElement)(se.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit URL"),icon:"edit",onClick:i}))),r&&t&&Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Media Settings"),className:"blocks-responsive"},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Resize for smaller devices"),checked:o,help:a,onChange:c}))))},Fr=function(){return Object(Y.createElement)("div",{className:"wp-block-embed is-loading"},Object(Y.createElement)(se.Spinner,null),Object(Y.createElement)("p",null,Object(K.__)("Embedding…")))},Ur=function(e){var t=e.icon,n=e.label,r=e.value,o=e.onSubmit,a=e.onChange,c=e.cannotEmbed,i=e.fallback,l=e.tryAgain;return Object(Y.createElement)(se.Placeholder,{icon:Object(Y.createElement)(W.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-embed",instructions:Object(K.__)("Paste a link to the content you want to display on your site.")},Object(Y.createElement)("form",{onSubmit:o},Object(Y.createElement)("input",{type:"url",value:r||"",className:"components-placeholder__input","aria-label":n,placeholder:Object(K.__)("Enter URL to embed here…"),onChange:a}),Object(Y.createElement)(se.Button,{isLarge:!0,type:"submit"},Object(K._x)("Embed","button label")),c&&Object(Y.createElement)("p",{className:"components-placeholder__error"},Object(K.__)("Sorry, this content could not be embedded."),Object(Y.createElement)("br",null),Object(Y.createElement)(se.Button,{isLarge:!0,onClick:l},Object(K._x)("Try again","button label"))," ",Object(Y.createElement)(se.Button,{isLarge:!0,onClick:i},Object(K._x)("Convert to link","button label")))),Object(Y.createElement)("div",{className:"components-placeholder__learn-more"},Object(Y.createElement)(se.ExternalLink,{href:Object(K.__)("https://wordpress.org/support/article/embeds/")},Object(K.__)("Learn more about embeds"))))},qr=n("CxY0"),Wr=window.FocusEvent,Gr=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).checkFocus=e.checkFocus.bind(Object(ie.a)(e)),e.node=Object(Y.createRef)(),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"checkFocus",value:function(){var e=document.activeElement;if("IFRAME"===e.tagName&&e.parentNode===this.node.current){var t=new Wr("focus",{bubbles:!0});e.dispatchEvent(t)}}},{key:"render",value:function(){var e=this.props.html;return Object(Y.createElement)("div",{ref:this.node,className:"wp-block-embed__wrapper",dangerouslySetInnerHTML:{__html:e}})}}]),t}(Y.Component),Kr=Object(ue.withGlobalEvents)({blur:"checkFocus"})(Gr),Zr=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).hideOverlay=e.hideOverlay.bind(Object(ie.a)(e)),e.state={interactive:!1},e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.preview,a=r.url,c=r.type,i=r.caption,l=r.onCaptionChange,s=r.isSelected,u=r.className,b=r.icon,m=r.label,d=o.scripts,h=this.state.interactive,p="photo"===c?(t=(e=o).thumbnail_url?e.thumbnail_url:e.url,n=Object(Y.createElement)("p",null,Object(Y.createElement)("img",{src:t,alt:e.title,width:"100%"})),Object(Y.renderToString)(n)):o.html,g=Object(qr.parse)(a).host.split("."),f=g.splice(g.length-2,g.length-1).join("."),v=Object(J.includes)(Ge,f),O=Object(K.sprintf)(Object(K.__)("Embedded content from %s"),f),j=Ye()(c,u,"wp-block-embed__wrapper"),y="wp-embed"===c?Object(Y.createElement)(Kr,{html:p}):Object(Y.createElement)("div",{className:"wp-block-embed__wrapper"},Object(Y.createElement)(se.SandBox,{html:p,scripts:d,title:O,type:j,onFocus:this.hideOverlay}),!h&&Object(Y.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}));return Object(Y.createElement)("figure",{className:Ye()(u,"wp-block-embed",{"is-type-video":"video"===c})},v?Object(Y.createElement)(se.Placeholder,{icon:Object(Y.createElement)(W.BlockIcon,{icon:b,showColors:!0}),label:m},Object(Y.createElement)("p",{className:"components-placeholder__error"},Object(Y.createElement)("a",{href:a},a)),Object(Y.createElement)("p",{className:"components-placeholder__error"},Object(K.sprintf)(Object(K.__)("Embedded content from %s can't be previewed in the editor."),f))):y,(!W.RichText.isEmpty(i)||s)&&Object(Y.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:i,onChange:l,inlineToolbar:!0}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(Y.Component);var Yr={url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0}};function $r(e){var t=e.title,n=e.description,r=e.icon,o=e.category,a=void 0===o?"embed":o,c=e.transforms,i=e.keywords,l=void 0===i?[]:i,s=e.supports,u=void 0===s?{}:s,b=e.responsive,m=void 0===b||b,d=n||Object(K.__)("Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube."),h=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(r){function o(){var e;return Object(re.a)(this,o),(e=Object(ae.a)(this,Object(ce.a)(o).apply(this,arguments))).switchBackToURLInput=e.switchBackToURLInput.bind(Object(ie.a)(e)),e.setUrl=e.setUrl.bind(Object(ie.a)(e)),e.getMergedAttributes=e.getMergedAttributes.bind(Object(ie.a)(e)),e.setMergedAttributes=e.setMergedAttributes.bind(Object(ie.a)(e)),e.getResponsiveHelp=e.getResponsiveHelp.bind(Object(ie.a)(e)),e.toggleResponsive=e.toggleResponsive.bind(Object(ie.a)(e)),e.handleIncomingPreview=e.handleIncomingPreview.bind(Object(ie.a)(e)),e.state={editingURL:!1,url:e.props.attributes.url},e.props.preview&&e.handleIncomingPreview(),e}return Object(le.a)(o,r),Object(oe.a)(o,[{key:"handleIncomingPreview",value:function(){if(this.setMergedAttributes(),this.props.onReplace){var e=et(this.props,this.getMergedAttributes());e&&this.props.onReplace(e)}}},{key:"componentDidUpdate",value:function(e){var t=void 0!==this.props.preview,n=void 0!==e.preview,r=e.preview&&this.props.preview&&this.props.preview.html!==e.preview.html||t&&!n,o=this.props.attributes.url!==e.attributes.url;if(r||o){if(this.props.cannotEmbed)return void(this.props.fetching||this.resubmitWithoutTrailingSlash());this.handleIncomingPreview()}}},{key:"resubmitWithoutTrailingSlash",value:function(){this.setState((function(e){return{url:e.url.replace(/\/$/,"")}}),this.setUrl)}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;this.setState({editingURL:!1}),n({url:t})}},{key:"getMergedAttributes",value:function(){var t=this.props.preview,r=this.props.attributes,o=r.className,a=r.allowResponsive;return Object(Z.a)({},this.props.attributes,rt(t,e,o,n,a))}},{key:"setMergedAttributes",value:function(){(0,this.props.setAttributes)(this.getMergedAttributes())}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"getResponsiveHelp",value:function(e){return e?Object(K.__)("This embed will preserve its aspect ratio when the browser is resized."):Object(K.__)("This embed may not preserve its aspect ratio when the browser is resized.")}},{key:"toggleResponsive",value:function(){var e=this.props.attributes,t=e.allowResponsive,r=e.className,o=this.props.preview.html,a=!t;this.props.setAttributes({allowResponsive:a,className:tt(o,r,n&&a)})}},{key:"render",value:function(){var r=this,o=this.state,a=o.url,c=o.editingURL,i=this.props,l=i.fetching,s=i.setAttributes,u=i.isSelected,b=i.preview,m=i.cannotEmbed,d=i.themeSupportsResponsive,h=i.tryAgain;if(l)return Object(Y.createElement)(Fr,null);var p=Object(K.sprintf)(Object(K.__)("%s URL"),e);if(!b||m||c)return Object(Y.createElement)(Ur,{icon:t,label:p,onSubmit:this.setUrl,value:a,cannotEmbed:m,onChange:function(e){return r.setState({url:e.target.value})},fallback:function(){return nt(a,r.props.onReplace)},tryAgain:h});var g=this.getMergedAttributes(),f=g.caption,v=g.type,O=g.allowResponsive,j=Q()(g.className,this.props.className);return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(Vr,{showEditButton:b&&!m,themeSupportsResponsive:d,blockSupportsResponsive:n,allowResponsive:O,getResponsiveHelp:this.getResponsiveHelp,toggleResponsive:this.toggleResponsive,switchBackToURLInput:this.switchBackToURLInput}),Object(Y.createElement)(Zr,{preview:b,className:j,url:a,type:v,caption:f,onCaptionChange:function(e){return s({caption:e})},isSelected:u,icon:t,label:p}))}}]),o}(Y.Component)}(t,r,m);return{title:t,description:d,icon:r,category:a,keywords:l,attributes:Yr,supports:Object(Z.a)({align:!0},u),transforms:c,edit:Object(ue.compose)(Object(be.withSelect)((function(e,t){var n=t.attributes.url,r=e("core"),o=r.getEmbedPreview,a=r.isPreviewEmbedFallback,c=r.isRequestingEmbedPreview,i=r.getThemeSupports,l=void 0!==n&&o(n),s=void 0!==n&&a(n),u=void 0!==n&&c(n),b=i(),m=!!l&&void 0===l.type&&!1===l.html,d=!!l&&l.data&&404===l.data.status,h=!!l&&!m&&!d,p=void 0!==n&&(!h||s);return{preview:h?l:void 0,fetching:u,themeSupportsResponsive:b["responsive-embeds"],cannotEmbed:p}})),Object(be.withDispatch)((function(e,t){var n=t.attributes.url,r=e("core/data");return{tryAgain:function(){r.invalidateResolution("core","getEmbedPreview",[n])}}})))(h),save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,c=n.providerNameSlug;if(!r)return null;var i=Ye()("wp-block-embed",(t={},Object(q.a)(t,"is-type-".concat(a),a),Object(q.a)(t,"is-provider-".concat(c),c),t));return Object(Y.createElement)("figure",{className:i},Object(Y.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(r,"\n")),!W.RichText.isEmpty(o)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:o}))},deprecated:[{attributes:Yr,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=Ye()("wp-block-embed",(t={},Object(q.a)(t,"is-type-".concat(a),a),Object(q.a)(t,"is-provider-".concat(c),c),t));return Object(Y.createElement)("figure",{className:i},"\n".concat(r,"\n"),!W.RichText.isEmpty(o)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:o}))}}]}}var Qr="core/embed",Jr=$r({title:Object(K._x)("Embed","block title"),description:Object(K.__)("Embed videos, images, tweets, audio, and other content from external sources."),icon:Te,responsive:!1,transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)},transform:function(e){return Object(G.createBlock)("core/embed",{url:e.textContent.trim()})}}]}}),Xr=qe.map((function(e){return Object(Z.a)({},e,{settings:$r(e.settings)})})),eo=We.map((function(e){return Object(Z.a)({},e,{settings:$r(e.settings)})})),to=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.Path,{d:"M9.17 6l2 2H20v10H4V6h5.17M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"}));function no(e){var t=e.hrefs,n=e.openInNewWindow,r=e.showDownloadButton,o=e.changeLinkDestinationOption,a=e.changeOpenInNewWindow,c=e.changeShowDownloadButton,i=t.href,l=t.textLinkHref,s=t.attachmentPage,u=[{value:i,label:Object(K.__)("URL")}];return s&&(u=[{value:i,label:Object(K.__)("Media File")},{value:s,label:Object(K.__)("Attachment page")}]),Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Text link settings")},Object(Y.createElement)(se.SelectControl,{label:Object(K.__)("Link To"),value:l,options:u,onChange:o}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Open in new tab"),checked:n,onChange:a})),Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Download button settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Show download button"),checked:r,onChange:c}))))}var ro=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onSelectFile=e.onSelectFile.bind(Object(ie.a)(e)),e.confirmCopyURL=e.confirmCopyURL.bind(Object(ie.a)(e)),e.resetCopyConfirmation=e.resetCopyConfirmation.bind(Object(ie.a)(e)),e.changeLinkDestinationOption=e.changeLinkDestinationOption.bind(Object(ie.a)(e)),e.changeOpenInNewWindow=e.changeOpenInNewWindow.bind(Object(ie.a)(e)),e.changeShowDownloadButton=e.changeShowDownloadButton.bind(Object(ie.a)(e)),e.onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e.state={hasError:!1,showCopyConfirmation:!1},e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.mediaUpload,o=t.noticeOperations,a=t.setAttributes,c=n.downloadButtonText,i=n.href;Object(Ce.isBlobURL)(i)&&(r({filesList:[Object(Ce.getBlobByURL)(i)],onFileChange:function(t){var n=Object(ke.a)(t,1)[0];return e.onSelectFile(n)},onError:function(t){e.setState({hasError:!0}),o.createErrorNotice(t)}}),Object(Ce.revokeBlobURL)(i));void 0===c&&a({downloadButtonText:Object(K._x)("Download","button label")})}},{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:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{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,t=this.props,n=t.className,r=t.isSelected,o=t.attributes,a=t.setAttributes,c=t.noticeUI,i=t.media,l=o.fileName,s=o.href,u=o.textLinkHref,b=o.textLinkTarget,m=o.showDownloadButton,d=o.downloadButtonText,h=o.id,p=this.state,g=p.hasError,f=p.showCopyConfirmation,v=i&&i.link;if(!s||g)return Object(Y.createElement)(W.MediaPlaceholder,{icon:Object(Y.createElement)(W.BlockIcon,{icon:to}),labels:{title:Object(K.__)("File"),instructions:Object(K.__)("Upload a file or pick one from your media library.")},onSelect:this.onSelectFile,notices:c,onError:this.onUploadError,accept:"*"});var O=Q()(n,{"is-transient":Object(Ce.isBlobURL)(s)});return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(no,Object(ne.a)({hrefs:{href:s,textLinkHref:u,attachmentPage:v}},{openInNewWindow:!!b,showDownloadButton:m,changeLinkDestinationOption:this.changeLinkDestinationOption,changeOpenInNewWindow:this.changeOpenInNewWindow,changeShowDownloadButton:this.changeShowDownloadButton})),Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(W.MediaUploadCheck,null,Object(Y.createElement)(se.Toolbar,null,Object(Y.createElement)(W.MediaUpload,{onSelect:this.onSelectFile,value:h,render:function(e){var t=e.open;return Object(Y.createElement)(se.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit file"),onClick:t,icon:"edit"})}})))),Object(Y.createElement)(se.Animate,{type:Object(Ce.isBlobURL)(s)?"loading":null},(function(t){var n=t.className;return Object(Y.createElement)("div",{className:Q()(O,n)},Object(Y.createElement)("div",{className:"wp-block-file__content-wrapper"},Object(Y.createElement)(W.RichText,{wrapperClassName:"wp-block-file__textlink",tagName:"div",value:l,placeholder:Object(K.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:function(e){return a({fileName:e})}}),m&&Object(Y.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},Object(Y.createElement)(W.RichText,{tagName:"div",className:"wp-block-file__button",value:d,withoutInteractiveFormatting:!0,placeholder:Object(K.__)("Add text…"),onChange:function(e){return a({downloadButtonText:e})}}))),r&&Object(Y.createElement)(se.ClipboardButton,{isDefault:!0,text:s,className:"wp-block-file__copy-url-button",onCopy:e.confirmCopyURL,onFinishCopy:e.resetCopyConfirmation,disabled:Object(Ce.isBlobURL)(s)},f?Object(K.__)("Copied!"):Object(K.__)("Copy URL")))})))}}]),t}(Y.Component),oo=Object(ue.compose)([Object(be.withSelect)((function(e,t){var n=e("core").getMedia,r=(0,e("core/block-editor").getSettings)().__experimentalMediaUpload,o=t.attributes.id;return{media:void 0===o?void 0:n(o),mediaUpload:r}})),se.withNotices])(ro);var ao={from:[{type:"files",isMatch:function(e){return e.length>0},priority:15,transform:function(e){var t=[];return e.forEach((function(e){var n=Object(Ce.createBlobURL)(e);t.push(Object(G.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))})),t}},{type:"block",blocks:["core/audio"],transform:function(e){return Object(G.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(G.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(G.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(be.select)("core").getMedia)(t);return!!n&&Object(J.includes)(n.mime_type,"audio")},transform:function(e){return Object(G.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(be.select)("core").getMedia)(t);return!!n&&Object(J.includes)(n.mime_type,"video")},transform:function(e){return Object(G.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(be.select)("core").getMedia)(t);return!!n&&Object(J.includes)(n.mime_type,"image")},transform:function(e){return Object(G.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id})}}]},co={name:"core/file",category:"common",attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"}}},io=co.name,lo={title:Object(K.__)("File"),description:Object(K.__)("Add a link to a downloadable file."),icon:to,keywords:[Object(K.__)("document"),Object(K.__)("pdf")],supports:{align:!0},transforms:ao,edit:oo,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(Y.createElement)("div",null,!W.RichText.isEmpty(r)&&Object(Y.createElement)("a",{href:o,target:a,rel:!!a&&"noreferrer noopener"},Object(Y.createElement)(W.RichText.Content,{value:r})),c&&Object(Y.createElement)("a",{href:n,className:"wp-block-file__button",download:!0},Object(Y.createElement)(W.RichText.Content,{value:i})))}},so=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={isPreview:!1,styles:[]},e.switchToHTML=e.switchToHTML.bind(Object(ie.a)(e)),e.switchToPreview=e.switchToPreview.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.styles;this.setState({styles:["\n\t\t\thtml,body,:root {\n\t\t\t\tmargin: 0 !important;\n\t\t\t\tpadding: 0 !important;\n\t\t\t\toverflow: visible !important;\n\t\t\t\tmin-height: auto !important;\n\t\t\t}\n\t\t"].concat(Object(U.a)(Object(W.transformStyles)(e)))})}},{key:"switchToPreview",value:function(){this.setState({isPreview:!0})}},{key:"switchToHTML",value:function(){this.setState({isPreview:!1})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=this.state,o=r.isPreview,a=r.styles;return Object(Y.createElement)("div",{className:"wp-block-html"},Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)("div",{className:"components-toolbar"},Object(Y.createElement)("button",{className:"components-tab-button ".concat(o?"":"is-active"),onClick:this.switchToHTML},Object(Y.createElement)("span",null,"HTML")),Object(Y.createElement)("button",{className:"components-tab-button ".concat(o?"is-active":""),onClick:this.switchToPreview},Object(Y.createElement)("span",null,Object(K.__)("Preview"))))),Object(Y.createElement)(se.Disabled.Consumer,null,(function(e){return o||e?Object(Y.createElement)(se.SandBox,{html:t.content,styles:a}):Object(Y.createElement)(W.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(K.__)("Write HTML…"),"aria-label":Object(K.__)("HTML")})})))}}]),t}(Y.Component),uo=Object(be.withSelect)((function(e){return{styles:(0,e("core/block-editor").getSettings)().styles}}))(so),bo=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.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"}));var mo={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(G.getPhrasingContentSchema)()}}}}}]},ho={name:"core/html",category:"formatting",attributes:{content:{type:"string",source:"html"}}},po=ho.name,go={title:Object(K.__)("Custom HTML"),description:Object(K.__)("Add custom HTML code and preview it as you edit."),icon:bo,keywords:[Object(K.__)("embed")],example:{attributes:{content:"<marquee>"+Object(K.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},supports:{customClassName:!1,className:!1,html:!1},transforms:mo,edit:uo,save:function(e){var t=e.attributes;return Object(Y.createElement)(Y.RawHTML,null,t.content)}},fo=[{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},isStackedOnMobile:{type:"boolean",default:!1}},save:function(e){var t,n,r=e.attributes,o=r.backgroundColor,a=r.customBackgroundColor,c=r.isStackedOnMobile,i=r.mediaAlt,l=r.mediaPosition,s=r.mediaType,u=r.mediaUrl,b=r.mediaWidth,m={image:function(){return Object(Y.createElement)("img",{src:u,alt:i})},video:function(){return Object(Y.createElement)("video",{controls:!0,src:u})}},d=Object(W.getColorClassName)("background-color",o),h=Q()((t={"has-media-on-the-right":"right"===l},Object(q.a)(t,d,d),Object(q.a)(t,"is-stacked-on-mobile",c),t));50!==b&&(n="right"===l?"auto ".concat(b,"%"):"".concat(b,"% auto"));var p={backgroundColor:d?void 0:a,gridTemplateColumns:n};return Object(Y.createElement)("div",{className:h,style:p},Object(Y.createElement)("figure",{className:"wp-block-media-text__media"},(m[s]||J.noop)()),Object(Y.createElement)("div",{className:"wp-block-media-text__content"},Object(Y.createElement)(W.InnerBlocks.Content,null)))}}],vo=Object(Y.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Y.createElement)(se.Path,{d:"M18 2l2 4h-2l-2-4h-3l2 4h-2l-2-4h-1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2zm2 12H10V4.4L11.8 8H20z"}),Object(Y.createElement)(se.Path,{d:"M14 20H4V10h3V8H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3h-2z"}),Object(Y.createElement)(se.Path,{d:"M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"})),Oo=["image","video"];function jo(e,t){return e?{backgroundImage:"url(".concat(e,")"),backgroundPosition:t?"".concat(100*t.x,"% ").concat(100*t.y,"%"):"50% 50%"}:{}}var yo=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"renderToolbarEditButton",value:function(){var e=this.props,t=e.mediaId,n=e.onSelectMedia;return Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(se.Toolbar,null,Object(Y.createElement)(W.MediaUpload,{onSelect:n,allowedTypes:Oo,value:t,render:function(e){var t=e.open;return Object(Y.createElement)(se.IconButton,{className:"components-toolbar__control",label:Object(K.__)("Edit media"),icon:"edit",onClick:t})}})))}},{key:"renderImage",value:function(){var e=this.props,t=e.mediaAlt,n=e.mediaUrl,r=e.className,o=e.imageFill,a=e.focalPoint,c=o?jo(n,a):{};return Object(Y.createElement)(Y.Fragment,null,this.renderToolbarEditButton(),Object(Y.createElement)("figure",{className:r,style:c},Object(Y.createElement)("img",{src:n,alt:t})))}},{key:"renderVideo",value:function(){var e=this.props,t=e.mediaUrl,n=e.className;return Object(Y.createElement)(Y.Fragment,null,this.renderToolbarEditButton(),Object(Y.createElement)("figure",{className:n},Object(Y.createElement)("video",{controls:!0,src:t})))}},{key:"renderPlaceholder",value:function(){var e=this.props,t=e.onSelectMedia,n=e.className,r=e.noticeUI;return Object(Y.createElement)(W.MediaPlaceholder,{icon:Object(Y.createElement)(W.BlockIcon,{icon:vo}),labels:{title:Object(K.__)("Media area")},className:n,onSelect:t,accept:"image/*,video/*",allowedTypes:Oo,notices:r,onError:this.onUploadError})}},{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,i=e.toggleSelection;if(r&&n){var l={right:"left"===t,left:"right"===t},s=null;switch(r){case"image":s=this.renderImage();break;case"video":s=this.renderVideo()}return Object(Y.createElement)(se.ResizableBox,{className:"editor-media-container__resizer",size:{width:o+"%"},minWidth:"10%",maxWidth:"100%",enable:l,onResizeStart:function(){i(!1)},onResize:function(e,t,n){c(parseInt(n.style.width))},onResizeStop:function(e,t,n){i(!0),a(parseInt(n.style.width))},axis:"x"},s)}return this.renderPlaceholder()}}]),t}(Y.Component),_o=Object(ue.compose)([Object(be.withDispatch)((function(e){return{toggleSelection:e("core/block-editor").toggleSelection}})),se.withNotices])(yo),ko=[["core/paragraph",{fontSize:"large",placeholder:Object(K._x)("Content…","content placeholder")}]],Co=function(e){return Math.max(15,Math.min(e,85))},wo=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onSelectMedia=e.onSelectMedia.bind(Object(ie.a)(e)),e.onWidthChange=e.onWidthChange.bind(Object(ie.a)(e)),e.commitWidthChange=e.commitWidthChange.bind(Object(ie.a)(e)),e.state={mediaWidth:null},e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"onSelectMedia",value:function(e){var t,n,r=this.props.setAttributes;"image"===(t=e.media_type?"image"===e.media_type?"image":"video":e.type)&&(n=Object(J.get)(e,["sizes","large","url"])||Object(J.get)(e,["media_details","sizes","large","source_url"])),r({mediaAlt:e.alt,mediaId:e.id,mediaType:t,mediaUrl:n||e.url,imageFill:void 0,focalPoint:void 0})}},{key:"onWidthChange",value:function(e){this.setState({mediaWidth:Co(e)})}},{key:"commitWidthChange",value:function(e){(0,this.props.setAttributes)({mediaWidth:Co(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,i=e.imageFill,l=e.focalPoint;return Object(Y.createElement)(_o,Object(ne.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,imageFill:i,focalPoint:l}))}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.className,o=t.backgroundColor,a=t.isSelected,c=t.setAttributes,i=t.setBackgroundColor,l=n.isStackedOnMobile,s=n.mediaAlt,u=n.mediaPosition,b=n.mediaType,m=n.mediaWidth,d=n.verticalAlignment,h=n.mediaUrl,p=n.imageFill,g=n.focalPoint,f=this.state.mediaWidth,v=Q()(r,(e={"has-media-on-the-right":"right"===u,"is-selected":a,"has-background":o.class||o.color},Object(q.a)(e,o.class,o.class),Object(q.a)(e,"is-stacked-on-mobile",l),Object(q.a)(e,"is-vertically-aligned-".concat(d),d),Object(q.a)(e,"is-image-fill",p),e)),O="".concat(f||m,"%"),j="right"===u?"1fr ".concat(O):"".concat(O," 1fr"),y={gridTemplateColumns:j,msGridColumns:j,backgroundColor:o.color},_=[{value:o.color,onChange:i,label:Object(K.__)("Background Color")}],k=[{icon:"align-pull-left",title:Object(K.__)("Show media on left"),isActive:"left"===u,onClick:function(){return c({mediaPosition:"left"})}},{icon:"align-pull-right",title:Object(K.__)("Show media on right"),isActive:"right"===u,onClick:function(){return c({mediaPosition:"right"})}}],C=Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Media & Text Settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Stack on mobile"),checked:l,onChange:function(){return c({isStackedOnMobile:!l})}}),"image"===b&&Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Crop image to fill entire column"),checked:p,onChange:function(){return c({imageFill:!p})}}),p&&Object(Y.createElement)(se.FocalPointPicker,{label:Object(K.__)("Focal Point Picker"),url:h,value:g,onChange:function(e){return c({focalPoint:e})}}),"image"===b&&Object(Y.createElement)(se.TextareaControl,{label:Object(K.__)("Alt Text (Alternative Text)"),value:s,onChange:function(e){c({mediaAlt:e})},help:Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(se.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},Object(K.__)("Describe the purpose of the image")),Object(K.__)("Leave empty if the image is purely decorative."))}));return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.InspectorControls,null,C,Object(Y.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),initialOpen:!1,colorSettings:_})),Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(se.Toolbar,{controls:k}),Object(Y.createElement)(W.BlockVerticalAlignmentToolbar,{onChange:function(e){c({verticalAlignment:e})},value:d})),Object(Y.createElement)("div",{className:v,style:y},this.renderMediaArea(),Object(Y.createElement)(W.InnerBlocks,{template:ko,templateInsertUpdatesSelection:!1})))}}]),t}(Y.Component),Eo=Object(W.withColors)("backgroundColor")(wo),xo=Object(Y.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Y.createElement)(se.Path,{d:"M13 17h8v-2h-8v2zM3 19h8V5H3v14zM13 9h8V7h-8v2zm0 4h8v-2h-8v2z"}));var So={from:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.alt,n=e.url,r=e.id;return Object(G.createBlock)("core/media-text",{mediaAlt:t,mediaId:r,mediaUrl:n,mediaType:"image"})}},{type:"block",blocks:["core/video"],transform:function(e){var t=e.src,n=e.id;return Object(G.createBlock)("core/media-text",{mediaId:n,mediaUrl:t,mediaType:"video"})}}],to:[{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.mediaType;return!e.mediaUrl||"image"===t},transform:function(e){var t=e.mediaAlt,n=e.mediaId,r=e.mediaUrl;return Object(G.createBlock)("core/image",{alt:t,id:n,url:r})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.mediaType;return!e.mediaUrl||"video"===t},transform:function(e){var t=e.mediaId,n=e.mediaUrl;return Object(G.createBlock)("core/video",{id:t,src:n})}}]},To={name:"core/media-text",category:"layout",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},isStackedOnMobile:{type:"boolean",default:!1},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}}},No=To.name,Ro={title:Object(K.__)("Media & Text"),description:Object(K.__)("Set media and words side-by-side for a richer layout."),icon:xo,keywords:[Object(K.__)("image"),Object(K.__)("video")],supports:{align:["wide","full"],html:!1},example:{attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:Object(K.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:Object(K.__)("— Kobayashi Issa (一茶)")}}]},transforms:So,edit:Eo,save:function(e){var t,n,r=e.attributes,o=r.backgroundColor,a=r.customBackgroundColor,c=r.isStackedOnMobile,i=r.mediaAlt,l=r.mediaPosition,s=r.mediaType,u=r.mediaUrl,b=r.mediaWidth,m=r.mediaId,d=r.verticalAlignment,h=r.imageFill,p=r.focalPoint,g={image:function(){return Object(Y.createElement)("img",{src:u,alt:i,className:m&&"image"===s?"wp-image-".concat(m):null})},video:function(){return Object(Y.createElement)("video",{controls:!0,src:u})}},f=Object(W.getColorClassName)("background-color",o),v=Q()((t={"has-media-on-the-right":"right"===l,"has-background":f||a},Object(q.a)(t,f,f),Object(q.a)(t,"is-stacked-on-mobile",c),Object(q.a)(t,"is-vertically-aligned-".concat(d),d),Object(q.a)(t,"is-image-fill",h),t)),O=h?jo(u,p):{};50!==b&&(n="right"===l?"auto ".concat(b,"%"):"".concat(b,"% auto"));var j={backgroundColor:f?void 0:a,gridTemplateColumns:n};return Object(Y.createElement)("div",{className:v,style:j},Object(Y.createElement)("figure",{className:"wp-block-media-text__media",style:O},(g[s]||J.noop)()),Object(Y.createElement)("div",{className:"wp-block-media-text__content"},Object(Y.createElement)(W.InnerBlocks.Content,null)))},deprecated:fo},Ao=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).setCommentsToShow=e.setCommentsToShow.bind(Object(ie.a)(e)),e.toggleDisplayAvatar=e.createToggleAttribute("displayAvatar"),e.toggleDisplayDate=e.createToggleAttribute("displayDate"),e.toggleDisplayExcerpt=e.createToggleAttribute("displayExcerpt"),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"createToggleAttribute",value:function(e){var t=this;return function(){var n=t.props.attributes[e];(0,t.props.setAttributes)(Object(q.a)({},e,!n))}}},{key:"setCommentsToShow",value:function(e){this.props.setAttributes({commentsToShow:e})}},{key:"render",value:function(){var e=this.props.attributes,t=e.commentsToShow,n=e.displayAvatar,r=e.displayDate,o=e.displayExcerpt;return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Latest Comments Settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Display Avatar"),checked:n,onChange:this.toggleDisplayAvatar}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Display Date"),checked:r,onChange:this.toggleDisplayDate}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Display Excerpt"),checked:o,onChange:this.toggleDisplayExcerpt}),Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Number of Comments"),value:t,onChange:this.setCommentsToShow,min:1,max:100,required:!0}))),Object(Y.createElement)(se.Disabled,null,Object(Y.createElement)(on.a,{block:"core/latest-comments",attributes:this.props.attributes})))}}]),t}(Y.Component),Bo=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.Path,{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}))),Io="core/latest-comments",Mo={title:Object(K.__)("Latest Comments"),description:Object(K.__)("Display a list of your most recent comments."),icon:Bo,category:"widgets",keywords:[Object(K.__)("recent comments")],supports:{align:!0,html:!1},edit:Ao},Po=n("ywyh"),Lo=n.n(Po),Ho=n("FqII"),zo={per_page:-1},Do=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={categoriesList:[]},e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.isStillMounted=!0,this.fetchRequest=Lo()({path:Object(Ee.addQueryArgs)("/wp/v2/categories",zo)}).then((function(t){e.isStillMounted&&e.setState({categoriesList:t})})).catch((function(){e.isStillMounted&&e.setState({categoriesList:[]})}))}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.latestPosts,o=this.state.categoriesList,a=t.displayPostContentRadio,c=t.displayPostContent,i=t.displayPostDate,l=t.postLayout,s=t.columns,u=t.order,b=t.orderBy,m=t.categories,d=t.postsToShow,h=t.excerptLength,p=Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Post Content Settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Post Content"),checked:c,onChange:function(e){return n({displayPostContent:e})}}),c&&Object(Y.createElement)(se.RadioControl,{label:"Show:",selected:a,options:[{label:"Excerpt",value:"excerpt"},{label:"Full Post",value:"full_post"}],onChange:function(e){return n({displayPostContentRadio:e})}}),c&&"excerpt"===a&&Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Max number of words in excerpt"),value:h,onChange:function(e){return n({excerptLength:e})},min:10,max:100})),Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Post Meta Settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Display post date"),checked:i,onChange:function(e){return n({displayPostDate:e})}})),Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Sorting and Filtering")},Object(Y.createElement)(se.QueryControls,Object(ne.a)({order:u,orderBy:b},{numberOfItems:d,categoriesList:o,selectedCategoryId:m,onOrderChange:function(e){return n({order:e})},onOrderByChange:function(e){return n({orderBy:e})},onCategoryChange:function(e){return n({categories:""!==e?e:void 0})},onNumberOfItemsChange:function(e){return n({postsToShow:e})}})),"grid"===l&&Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:s,onChange:function(e){return n({columns:e})},min:2,max:g?Math.min(6,r.length):6,required:!0}))),g=Array.isArray(r)&&r.length;if(!g)return Object(Y.createElement)(Y.Fragment,null,p,Object(Y.createElement)(se.Placeholder,{icon:"admin-post",label:Object(K.__)("Latest Posts")},Array.isArray(r)?Object(K.__)("No posts found."):Object(Y.createElement)(se.Spinner,null)));var f=r.length>d?r.slice(0,d):r,v=[{icon:"list-view",title:Object(K.__)("List view"),onClick:function(){return n({postLayout:"list"})},isActive:"list"===l},{icon:"grid-view",title:Object(K.__)("Grid view"),onClick:function(){return n({postLayout:"grid"})},isActive:"grid"===l}],O=Object(Ho.__experimentalGetSettings)().formats.date;return Object(Y.createElement)(Y.Fragment,null,p,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(se.Toolbar,{controls:v})),Object(Y.createElement)("ul",{className:Q()(this.props.className,Object(q.a)({"wp-block-latest-posts__list":!0,"is-grid":"grid"===l,"has-dates":i},"columns-".concat(s),"grid"===l))},f.map((function(e,t){var n=e.title.rendered.trim(),r=e.excerpt.rendered;""===e.excerpt.raw&&(r=e.content.raw);var o=document.createElement("div");return o.innerHTML=r,r=o.textContent||o.innerText||"",Object(Y.createElement)("li",{key:t},Object(Y.createElement)("a",{href:e.link,target:"_blank",rel:"noreferrer noopener"},n?Object(Y.createElement)(Y.RawHTML,null,n):Object(K.__)("(no title)")),i&&e.date_gmt&&Object(Y.createElement)("time",{dateTime:Object(Ho.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date"},Object(Ho.dateI18n)(O,e.date_gmt)),c&&"excerpt"===a&&Object(Y.createElement)("div",{className:"wp-block-latest-posts__post-excerpt"},Object(Y.createElement)(Y.RawHTML,{key:"html"},h<r.trim().split(" ").length?r.trim().split(" ",h).join(" ")+" ... <a href="+e.link+'target="_blank" rel="noopener noreferrer">'+Object(K.__)("Read more")+"</a>":r.trim().split(" ",h).join(" "))),c&&"full_post"===a&&Object(Y.createElement)("div",{className:"wp-block-latest-posts__post-full-content"},Object(Y.createElement)(Y.RawHTML,{key:"html"},e.content.raw.trim())))}))))}}]),t}(Y.Component),Vo=Object(be.withSelect)((function(e,t){var n=t.attributes,r=n.postsToShow,o=n.order,a=n.orderBy,c=n.categories;return{latestPosts:(0,e("core").getEntityRecords)("postType","post",Object(J.pickBy)({categories:c,order:o,orderby:a,per_page:r},(function(e){return!Object(J.isUndefined)(e)})))}}))(Do),Fo=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.Rect,{x:"11",y:"7",width:"6",height:"2"}),Object(Y.createElement)(se.Rect,{x:"11",y:"11",width:"6",height:"2"}),Object(Y.createElement)(se.Rect,{x:"11",y:"15",width:"6",height:"2"}),Object(Y.createElement)(se.Rect,{x:"7",y:"7",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"7",y:"11",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"7",y:"15",width:"2",height:"2"}),Object(Y.createElement)(se.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"})),Uo="core/latest-posts",qo={title:Object(K.__)("Latest Posts"),description:Object(K.__)("Display a list of your most recent posts."),icon:Fo,category:"widgets",keywords:[Object(K.__)("recent posts")],supports:{align:!0,html:!1},edit:Vo},Wo=function(e){var t=e.setAttributes,n=e.reversed,r=e.start;return Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Ordered List Settings")},Object(Y.createElement)(se.TextControl,{label:Object(K.__)("Start Value"),type:"number",onChange:function(e){var n=parseInt(e,10);t({start:isNaN(n)?void 0:n})},value:Number.isInteger(r)?r.toString(10):"",step:"1"}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Reverse List Numbering"),checked:n||!1,onChange:function(e){t({reversed:e||void 0})}})))};var Go=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.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"})));var Ko=Object(Z.a)({},Object(G.getPhrasingContentSchema)(),{ul:{},ol:{attributes:["type"]}});["ul","ol"].forEach((function(e){Ko[e].children={li:{children:Ko}}}));var Zo={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/list",{values:Object(Mt.toHTMLString)({value:Object(Mt.join)(e.map((function(t){var n=t.content,r=Object(Mt.create)({html:n});return e.length>1?r:Object(Mt.replace)(r,/\n/g,Mt.__UNSTABLE_LINE_SEPARATOR)})),Mt.__UNSTABLE_LINE_SEPARATOR),multilineTag:"li"})})}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.value;return Object(G.createBlock)("core/list",{values:Object(Mt.toHTMLString)({value:Object(Mt.create)({html:t,multilineTag:"p"}),multilineTag:"li"})})}},{type:"raw",selector:"ol,ul",schema:{ol:Ko.ol,ul:Ko.ul},transform:function(e){return Object(G.createBlock)("core/list",Object(Z.a)({},Object(G.getBlockAttributes)("core/list",e.outerHTML),{ordered:"OL"===e.nodeName}))}}].concat(Object(U.a)(["*","-"].map((function(e){return{type:"prefix",prefix:e,transform:function(e){return Object(G.createBlock)("core/list",{values:"<li>".concat(e,"</li>")})}}}))),Object(U.a)(["1.","1)"].map((function(e){return{type:"prefix",prefix:e,transform:function(e){return Object(G.createBlock)("core/list",{ordered:!0,values:"<li>".concat(e,"</li>")})}}})))),to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.values;return Object(Mt.split)(Object(Mt.create)({html:t,multilineTag:"li",multilineWrapperTags:["ul","ol"]}),Mt.__UNSTABLE_LINE_SEPARATOR).map((function(e){return Object(G.createBlock)("core/paragraph",{content:Object(Mt.toHTMLString)({value:e})})}))}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.values;return Object(G.createBlock)("core/quote",{value:Object(Mt.toHTMLString)({value:Object(Mt.create)({html:t,multilineTag:"li",multilineWrapperTags:["ul","ol"]}),multilineTag:"p"})})}}]},Yo={name:"core/list",category:"common",attributes:{ordered:{type:"boolean",default:!1},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:""},start:{type:"number"},reversed:{type:"boolean"}}},$o=Yo.name,Qo={title:Object(K.__)("List"),description:Object(K.__)("Create a bulleted or numbered list."),icon:Go,keywords:[Object(K.__)("bullet list"),Object(K.__)("ordered list"),Object(K.__)("numbered list")],supports:{className:!1},example:{attributes:{values:"<li>Alice.</li><li>The White Rabbit.</li><li>The Cheshire Cat.</li><li>The Mad Hatter.</li><li>The Queen of Hearts.</li>"}},transforms:Zo,merge:function(e,t){var n=t.values;return n&&"<li></li>"!==n?Object(Z.a)({},e,{values:e.values+n}):e},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.mergeBlocks,o=e.onReplace,a=e.className,c=t.ordered,i=t.values,l=t.reversed,s=t.start,u=c?"ol":"ul";return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.RichText,{identifier:"values",multiline:"li",tagName:u,onChange:function(e){return n({values:e})},value:i,wrapperClassName:"block-library-list",className:a,placeholder:Object(K.__)("Write list…"),onMerge:r,onSplit:function(e){return Object(G.createBlock)($o,Object(Z.a)({},t,{values:e}))},__unstableOnSplitMiddle:function(){return Object(G.createBlock)("core/paragraph")},onReplace:o,onRemove:function(){return o([])},start:s,reversed:l},(function(e){var t=e.value,r=e.onChange;return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.RichTextShortcut,{type:"primary",character:"[",onUse:function(){r(Object(Mt.__unstableOutdentListItems)(t))}}),Object(Y.createElement)(W.RichTextShortcut,{type:"primary",character:"]",onUse:function(){r(Object(Mt.__unstableIndentListItems)(t,{type:u}))}}),Object(Y.createElement)(W.RichTextShortcut,{type:"primary",character:"m",onUse:function(){r(Object(Mt.__unstableIndentListItems)(t,{type:u}))}}),Object(Y.createElement)(W.RichTextShortcut,{type:"primaryShift",character:"m",onUse:function(){r(Object(Mt.__unstableOutdentListItems)(t))}}),Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(se.Toolbar,{controls:[{icon:"editor-ul",title:Object(K.__)("Convert to unordered list"),isActive:Object(Mt.__unstableIsActiveListType)(t,"ul",u),onClick:function(){r(Object(Mt.__unstableChangeListType)(t,{type:"ul"})),Object(Mt.__unstableIsListRootSelected)(t)&&n({ordered:!1})}},{icon:"editor-ol",title:Object(K.__)("Convert to ordered list"),isActive:Object(Mt.__unstableIsActiveListType)(t,"ol",u),onClick:function(){r(Object(Mt.__unstableChangeListType)(t,{type:"ol"})),Object(Mt.__unstableIsListRootSelected)(t)&&n({ordered:!0})}},{icon:"editor-outdent",title:Object(K.__)("Outdent list item"),shortcut:Object(K._x)("Backspace","keyboard key"),onClick:function(){r(Object(Mt.__unstableOutdentListItems)(t))}},{icon:"editor-indent",title:Object(K.__)("Indent list item"),shortcut:Object(K._x)("Space","keyboard key"),onClick:function(){r(Object(Mt.__unstableIndentListItems)(t,{type:u}))}}]})))})),c&&Object(Y.createElement)(Wo,{setAttributes:n,ordered:c,reversed:l,start:s}))},save:function(e){var t=e.attributes,n=t.ordered,r=t.values,o=t.reversed,a=t.start,c=n?"ol":"ul";return Object(Y.createElement)(W.RichText.Content,{tagName:c,value:r,reversed:o,start:a,multiline:"li"})}},Jo=n("1CF3");var Xo=Object(be.withDispatch)((function(e,t){var n=t.clientId,r=t.attributes,o=e("core/block-editor").replaceBlock;return{convertToHTML:function(){o(n,Object(G.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(G.getBlockType)("core/html"),l=[];return c&&i?(t=Object(K.sprintf)(Object(K.__)('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(Y.createElement)(se.Button,{key:"convert",onClick:r,isLarge:!0,isPrimary:!0},Object(K.__)("Keep as HTML")))):t=Object(K.sprintf)(Object(K.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'),o),Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.Warning,{actions:l},t),Object(Y.createElement)(Y.RawHTML,null,Object(Jo.safeHTML)(a)))}));var ea={name:"core/missing",category:"common",attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"html"}}},ta=ea.name,na={name:ta,title:Object(K.__)("Unrecognized Block"),description:Object(K.__)("Your site doesn’t include support for this block."),supports:{className:!1,customClassName:!1,inserter:!1,html:!1,reusable:!1},edit:Xo,save:function(e){var t=e.attributes;return Object(Y.createElement)(Y.RawHTML,null,t.originalContent)}},ra=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onChangeInput=e.onChangeInput.bind(Object(ie.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(ie.a)(e)),e.state={defaultText:Object(K.__)("Read more")},e}return Object(le.a)(t,e),Object(oe.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===we.ENTER&&n([Object(G.createBlock)(Object(G.getDefaultBlockName)())])}},{key:"getHideExcerptHelp",value:function(e){return e?Object(K.__)("The excerpt is hidden."):Object(K.__)("The excerpt is visible.")}},{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(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,null,Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Hide the excerpt on the full content page"),checked:!!n,onChange:function(){return r({noTeaser:!n})},help:this.getHideExcerptHelp}))),Object(Y.createElement)("div",{className:"wp-block-more"},Object(Y.createElement)("input",{type:"text",value:a,size:c,onChange:this.onChangeInput,onKeyDown:this.onKeyDown})))}}]),t}(Y.Component),oa=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.Path,{d:"M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z"})));var aa={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(G.createBlock)("core/more",o)}}]},ca={name:"core/more",category:"layout",attributes:{customText:{type:"string"},noTeaser:{type:"boolean",default:!1}}},ia=ca.name,la={title:Object(K._x)("More","block name"),description:Object(K.__)("Content before this block will be shown in the excerpt on your archives page."),icon:oa,supports:{customClassName:!1,className:!1,html:!1,multiple:!1},example:{},transforms:aa,edit:ra,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(Y.createElement)(Y.RawHTML,null,Object(J.compact)([o,a]).join("\n"))}};var sa=Object(Y.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 24 24"},Object(Y.createElement)(se.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(Y.createElement)(se.Path,{d:"M9 11h6v2H9zM2 11h5v2H2zM17 11h5v2h-5zM6 4h7v5h7V8l-6-6H6a2 2 0 0 0-2 2v5h2zM18 20H6v-5H4v5a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5h-2z"}));var ua={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:function(e){return e.dataset&&"core/nextpage"===e.dataset.block},transform:function(){return Object(G.createBlock)("core/nextpage",{})}}]},ba={name:"core/nextpage",category:"layout"},ma=ba.name,da={title:Object(K.__)("Page Break"),description:Object(K.__)("Separate your content into a multi-page experience."),icon:sa,keywords:[Object(K.__)("next page"),Object(K.__)("pagination")],supports:{customClassName:!1,className:!1,html:!1},example:{},transforms:ua,edit:function(){return Object(Y.createElement)("div",{className:"wp-block-nextpage"},Object(Y.createElement)("span",null,Object(K.__)("Page break")))},save:function(){return Object(Y.createElement)(Y.RawHTML,null,"\x3c!--nextpage--\x3e")}};var ha=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.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(Y.createElement)(se.Rect,{x:"6",y:"10",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"6",y:"14",width:"8",height:"2"}),Object(Y.createElement)(se.Rect,{x:"16",y:"14",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"10",y:"10",width:"8",height:"2"}));var pa={from:[{type:"block",blocks:["core/code","core/paragraph"],transform:function(e){var t=e.content;return Object(G.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(G.getPhrasingContentSchema)()}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/paragraph",e)}}]},ga={name:"core/preformatted",category:"formatting",attributes:{content:{type:"string",source:"html",selector:"pre",default:""}}},fa=ga.name,va={title:Object(K.__)("Preformatted"),description:Object(K.__)("Add text that respects your spacing and tabs, and also allows styling."),icon:ha,example:{attributes:{content:Object(K.__)("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)")+"\n"+Object(K.__)("Window, very small in the distance, illuminated.")+"\n"+Object(K.__)("All around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:pa,edit:function(e){var t=e.attributes,n=e.mergeBlocks,r=e.setAttributes,o=e.className,a=t.content;return Object(Y.createElement)(W.RichText,{tagName:"pre",value:a.replace(/\n/g,"<br>"),onChange:function(e){r({content:e.replace(/<br ?\/?>/g,"\n")})},placeholder:Object(K.__)("Write preformatted text…"),wrapperClassName:o,onMerge:n})},save:function(e){var t=e.attributes.content;return Object(Y.createElement)(W.RichText.Content,{tagName:"pre",value:t})},merge:function(e,t){return{content:e.content+t.content}}},Oa="is-style-".concat("solid-color"),ja={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function ya(e){if(e){var t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}}var _a=[{attributes:Object(Z.a)({},ja,{figureStyle:{source:"attribute",selector:"figure",attribute:"style"}}),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,b=r.figureStyle;if(Object(J.includes)(u,Oa)){var m=Object(W.getColorClassName)("background-color",o);t=Q()(Object(q.a)({"has-background":m||a},m,m)),n={backgroundColor:m?void 0:a}}else if(a)n={borderColor:a};else if(o){n={borderColor:ya(b)}}var d=Object(W.getColorClassName)("color",c),h=(c||i)&&Q()("has-text-color",Object(q.a)({},d,d)),p=d?void 0:{color:i};return Object(Y.createElement)("figure",{className:t,style:n},Object(Y.createElement)("blockquote",{className:h,style:p},Object(Y.createElement)(W.RichText.Content,{value:l,multiline:!0}),!W.RichText.isEmpty(s)&&Object(Y.createElement)(W.RichText.Content,{tagName:"cite",value:s})))},migrate:function(e){var t=e.className,n=e.figureStyle,r=e.mainColor,o=Object(It.a)(e,["className","figureStyle","mainColor"]);if(!Object(J.includes)(t,Oa)&&r&&n){var a=ya(n);if(a)return Object(Z.a)({},o,{className:t,customMainColor:a})}return Object(Z.a)({className:t,mainColor:r},o)}},{attributes:ja,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(J.includes)(u,Oa))(t=Object(W.getColorClassName)("background-color",o))||(n={backgroundColor:a});else if(a)n={borderColor:a};else if(o){var b=Object(J.get)(Object(be.select)("core/block-editor").getSettings(),["colors"],[]);n={borderColor:Object(W.getColorObjectByAttributeValues)(b,o).color}}var m=Object(W.getColorClassName)("color",c),d=c||i?Q()("has-text-color",Object(q.a)({},m,m)):void 0,h=m?void 0:{color:i};return Object(Y.createElement)("figure",{className:t,style:n},Object(Y.createElement)("blockquote",{className:d,style:h},Object(Y.createElement)(W.RichText.Content,{value:l,multiline:!0}),!W.RichText.isEmpty(s)&&Object(Y.createElement)(W.RichText.Content,{tagName:"cite",value:s})))}},{attributes:Object(Z.a)({},ja),save:function(e){var t=e.attributes,n=t.value,r=t.citation;return Object(Y.createElement)("blockquote",null,Object(Y.createElement)(W.RichText.Content,{value:n,multiline:!0}),!W.RichText.isEmpty(r)&&Object(Y.createElement)(W.RichText.Content,{tagName:"cite",value:r}))}},{attributes:Object(Z.a)({},ja,{citation:{type:"string",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(Y.createElement)("blockquote",{className:"align".concat(o)},Object(Y.createElement)(W.RichText.Content,{value:n,multiline:!0}),!W.RichText.isEmpty(r)&&Object(Y.createElement)(W.RichText.Content,{tagName:"footer",value:r}))}}],ka=function(e){function t(e){var n;return Object(re.a)(this,t),(n=Object(ae.a)(this,Object(ce.a)(t).call(this,e))).wasTextColorAutomaticallyComputed=!1,n.pullQuoteMainColorSetter=n.pullQuoteMainColorSetter.bind(Object(ie.a)(n)),n.pullQuoteTextColorSetter=n.pullQuoteTextColorSetter.bind(Object(ie.a)(n)),n}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"pullQuoteMainColorSetter",value:function(e){var t=this.props,n=t.colorUtils,r=t.textColor,o=t.setAttributes,a=t.setTextColor,c=t.setMainColor,i=t.className,l=Object(J.includes)(i,Oa),s=!r.color||this.wasTextColorAutomaticallyComputed,u=l&&s&&e;l?c(e):o({customMainColor:e}),u&&(this.wasTextColorAutomaticallyComputed=!0,a(n.getMostReadableColor(e)))}},{key:"pullQuoteTextColorSetter",value:function(e){(0,this.props.setTextColor)(e),this.wasTextColorAutomaticallyComputed=!1}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.attributes,r=t.className,o=t.mainColor,a=t.setAttributes;n.mainColor&&!Object(J.includes)(r,Oa)&&Object(J.includes)(e.className,Oa)&&a({mainColor:void 0,customMainColor:o.color})}},{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(J.includes)(c,Oa),u=s?{backgroundColor:n.color}:{borderColor:n.color},b=Q()(c,Object(q.a)({"has-background":s&&n.color},n.class,s&&n.class)),m={color:r.color},d=r.color&&Q()("has-text-color",Object(q.a)({},r.class,r.class));return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)("figure",{style:u,className:b},Object(Y.createElement)("blockquote",{style:m,className:d},Object(Y.createElement)(W.RichText,{multiline:!0,value:i,onChange:function(e){return o({value:e})},placeholder:Object(K.__)("Write quote…"),wrapperClassName:"block-library-pullquote__content"}),(!W.RichText.isEmpty(l)||a)&&Object(Y.createElement)(W.RichText,{value:l,placeholder:Object(K.__)("Write citation…"),onChange:function(e){return o({citation:e})},className:"wp-block-pullquote__citation"}))),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:n.color,onChange:this.pullQuoteMainColorSetter,label:Object(K.__)("Main Color")},{value:r.color,onChange:this.pullQuoteTextColorSetter,label:Object(K.__)("Text Color")}]},s&&Object(Y.createElement)(W.ContrastChecker,Object(ne.a)({textColor:r.color,backgroundColor:n.color},{isLargeText:!1})))))}}]),t}(Y.Component),Ca=Object(W.withColors)({mainColor:"background-color",textColor:"color"})(ka),wa=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.Polygon,{points:"21 18 2 18 2 20 21 20"}),Object(Y.createElement)(se.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(Y.createElement)(se.Polygon,{points:"21 4 2 4 2 6 21 6"}));var Ea={name:"core/pullquote",category:"formatting",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}}},xa=Ea.name,Sa={title:Object(K.__)("Pullquote"),description:Object(K.__)("Give special visual emphasis to a quote from your text."),icon:wa,example:{attributes:{value:"<p>"+Object(K.__)("One of the hardest things to do in technology is disrupt yourself.")+"</p>",citation:"Matt Mullenweg"}},styles:[{name:"default",label:Object(K._x)("Default","block style"),isDefault:!0},{name:"solid-color",label:Object(K.__)("Solid Color")}],supports:{align:["left","right","wide","full"]},edit:Ca,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(J.includes)(u,Oa)){var b=Object(W.getColorClassName)("background-color",o);t=Q()(Object(q.a)({"has-background":b||a},b,b)),n={backgroundColor:b?void 0:a}}else a&&(n={borderColor:a});var m=Object(W.getColorClassName)("color",c),d=(c||i)&&Q()("has-text-color",Object(q.a)({},m,m)),h=m?void 0:{color:i};return Object(Y.createElement)("figure",{className:t,style:n},Object(Y.createElement)("blockquote",{className:d,style:h},Object(Y.createElement)(W.RichText.Content,{value:l,multiline:!0}),!W.RichText.isEmpty(s)&&Object(Y.createElement)(W.RichText.Content,{tagName:"cite",value:s})))},deprecated:_a},Ta=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).titleField=Object(Y.createRef)(),e.editButton=Object(Y.createRef)(),e.handleFormSubmit=e.handleFormSubmit.bind(Object(ie.a)(e)),e.handleTitleChange=e.handleTitleChange.bind(Object(ie.a)(e)),e.handleTitleKeyDown=e.handleTitleKeyDown.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.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===we.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.isEditDisabled,a=e.onEdit,c=e.instanceId;return Object(Y.createElement)(Y.Fragment,null,!t&&!r&&Object(Y.createElement)("div",{className:"reusable-block-edit-panel"},Object(Y.createElement)("b",{className:"reusable-block-edit-panel__info"},n),Object(Y.createElement)(se.Button,{ref:this.editButton,isLarge:!0,className:"reusable-block-edit-panel__button",disabled:o,onClick:a},Object(K.__)("Edit"))),(t||r)&&Object(Y.createElement)("form",{className:"reusable-block-edit-panel",onSubmit:this.handleFormSubmit},Object(Y.createElement)("label",{htmlFor:"reusable-block-edit-panel__title-".concat(c),className:"reusable-block-edit-panel__label"},Object(K.__)("Name:")),Object(Y.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(c)}),Object(Y.createElement)(se.Button,{type:"submit",isLarge:!0,isBusy:r,disabled:!n||r,className:"reusable-block-edit-panel__button"},Object(K.__)("Save"))))}}]),t}(Y.Component),Na=Object(ue.withInstanceId)(Ta);var Ra=function(e){var t=e.title,n=Object(K.sprintf)(Object(K.__)("Reusable Block: %s"),t);return Object(Y.createElement)(se.Tooltip,{text:n},Object(Y.createElement)("span",{className:"reusable-block-indicator"},Object(Y.createElement)(se.Dashicon,{icon:"controls-repeat"})))},Aa=function(e){function t(e){var n,r=e.reusableBlock;return Object(re.a)(this,t),(n=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).startEditing=n.startEditing.bind(Object(ie.a)(n)),n.stopEditing=n.stopEditing.bind(Object(ie.a)(n)),n.setBlocks=n.setBlocks.bind(Object(ie.a)(n)),n.setTitle=n.setTitle.bind(Object(ie.a)(n)),n.save=n.save.bind(Object(ie.a)(n)),n.state=r?{isEditing:r.isTemporary,title:r.title,blocks:Object(G.parse)(r.content)}:{isEditing:!1,title:null,blocks:[]},n}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){this.props.reusableBlock||this.props.fetchReusableBlock()}},{key:"componentDidUpdate",value:function(e){e.reusableBlock!==this.props.reusableBlock&&null===this.state.title&&this.setState({title:this.props.reusableBlock.title,blocks:Object(G.parse)(this.props.reusableBlock.content)})}},{key:"startEditing",value:function(){var e=this.props.reusableBlock;this.setState({isEditing:!0,title:e.title,blocks:Object(G.parse)(e.content)})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,title:null,blocks:[]})}},{key:"setBlocks",value:function(e){this.setState({blocks:e})}},{key:"setTitle",value:function(e){this.setState({title:e})}},{key:"save",value:function(){var e=this.props,t=e.onChange,n=e.onSave,r=this.state,o=r.blocks;t({title:r.title,content:Object(G.serialize)(o)}),n(),this.stopEditing()}},{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.reusableBlock,r=e.isFetching,o=e.isSaving,a=e.canUpdateBlock,c=e.settings,i=this.state,l=i.isEditing,s=i.title,u=i.blocks;if(!n&&r)return Object(Y.createElement)(se.Placeholder,null,Object(Y.createElement)(se.Spinner,null));if(!n)return Object(Y.createElement)(se.Placeholder,null,Object(K.__)("Block has been deleted or is unavailable."));var b=Object(Y.createElement)(W.BlockEditorProvider,{settings:c,value:u,onChange:this.setBlocks,onInput:this.setBlocks},Object(Y.createElement)(W.WritingFlow,null,Object(Y.createElement)(W.BlockList,null)));return l||(b=Object(Y.createElement)(se.Disabled,null,b)),Object(Y.createElement)("div",{className:"block-library-block__reusable-block-container"},(t||l)&&Object(Y.createElement)(Na,{isEditing:l,title:null!==s?s:n.title,isSaving:o&&!n.isTemporary,isEditDisabled:!a,onEdit:this.startEditing,onChangeTitle:this.setTitle,onSave:this.save,onCancel:this.stopEditing}),!t&&!l&&Object(Y.createElement)(Ra,{title:n.title}),b)}}]),t}(Y.Component),Ba=Object(ue.compose)([Object(be.withSelect)((function(e,t){var n=e("core/editor"),r=n.__experimentalGetReusableBlock,o=n.__experimentalIsFetchingReusableBlock,a=n.__experimentalIsSavingReusableBlock,c=e("core").canUser,i=e("core/block-editor"),l=i.__experimentalGetParsedReusableBlock,s=i.getSettings,u=t.attributes.ref,b=r(u);return{reusableBlock:b,isFetching:o(u),isSaving:a(u),blocks:b?l(b.id):null,canUpdateBlock:!!b&&!b.isTemporary&&!!c("update","blocks",u),settings:s()}})),Object(be.withDispatch)((function(e,t){var n=e("core/editor"),r=n.__experimentalFetchReusableBlocks,o=n.__experimentalUpdateReusableBlock,a=n.__experimentalSaveReusableBlock,c=t.attributes.ref;return{fetchReusableBlock:Object(J.partial)(r,c),onChange:Object(J.partial)(o,c),onSave:Object(J.partial)(a,c)}}))])(Aa),Ia="core/block",Ma={title:Object(K.__)("Reusable Block"),category:"reusable",description:Object(K.__)("Create content, and save it for you and other contributors to reuse across your site. Update the block, and the changes apply everywhere it’s used."),supports:{customClassName:!1,html:!1,inserter:!1},edit:Ba},Pa=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.feedURL},e.toggleAttribute=e.toggleAttribute.bind(Object(ie.a)(e)),e.onSubmitURL=e.onSubmitURL.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"toggleAttribute",value:function(e){var t=this;return function(){var n=t.props.attributes[e];(0,t.props.setAttributes)(Object(q.a)({},e,!n))}}},{key:"onSubmitURL",value:function(e){e.preventDefault(),this.props.attributes.feedURL&&this.setState({editing:!1})}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.blockLayout,r=t.columns,o=t.displayAuthor,a=t.displayExcerpt,c=t.displayDate,i=t.excerptLength,l=t.feedURL,s=t.itemsToShow,u=this.props.setAttributes;if(this.state.editing)return Object(Y.createElement)(se.Placeholder,{icon:"rss",label:"RSS"},Object(Y.createElement)("form",{onSubmit:this.onSubmitURL},Object(Y.createElement)(se.TextControl,{placeholder:Object(K.__)("Enter URL here…"),value:l,onChange:function(e){return u({feedURL:e})},className:"components-placeholder__input"}),Object(Y.createElement)(se.Button,{isLarge:!0,type:"submit"},Object(K.__)("Use URL"))));var b=[{icon:"edit",title:Object(K.__)("Edit RSS URL"),onClick:function(){return e.setState({editing:!0})}},{icon:"list-view",title:Object(K.__)("List view"),onClick:function(){return u({blockLayout:"list"})},isActive:"list"===n},{icon:"grid-view",title:Object(K.__)("Grid view"),onClick:function(){return u({blockLayout:"grid"})},isActive:"grid"===n}];return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(se.Toolbar,{controls:b})),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("RSS Settings")},Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Number of items"),value:s,onChange:function(e){return u({itemsToShow:e})},min:1,max:10,required:!0}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Display author"),checked:o,onChange:this.toggleAttribute("displayAuthor")}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Display date"),checked:c,onChange:this.toggleAttribute("displayDate")}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Display excerpt"),checked:a,onChange:this.toggleAttribute("displayExcerpt")}),a&&Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Max number of words in excerpt"),value:i,onChange:function(e){return u({excerptLength:e})},min:10,max:100,required:!0}),"grid"===n&&Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:r,onChange:function(e){return u({columns:e})},min:2,max:6,required:!0}))),Object(Y.createElement)(se.Disabled,null,Object(Y.createElement)(on.a,{block:"core/rss",attributes:this.props.attributes})))}}]),t}(Y.Component),La="core/rss",Ha={title:Object(K.__)("RSS"),description:Object(K.__)("Display entries from any RSS or Atom feed."),icon:"rss",category:"widgets",keywords:[Object(K.__)("atom"),Object(K.__)("feed")],supports:{align:!0,html:!1},example:{attributes:{feedURL:"https://wordpress.org"}},edit:Pa};var za="core/search",Da={title:Object(K.__)("Search"),description:Object(K.__)("Help visitors find your content."),icon:"search",category:"widgets",keywords:[Object(K.__)("find")],supports:{align:!0},example:{},edit:function(e){var t=e.className,n=e.attributes,r=e.setAttributes,o=n.label,a=n.placeholder,c=n.buttonText;return Object(Y.createElement)("div",{className:t},Object(Y.createElement)(W.RichText,{wrapperClassName:"wp-block-search__label","aria-label":Object(K.__)("Label text"),placeholder:Object(K.__)("Add label…"),withoutInteractiveFormatting:!0,value:o,onChange:function(e){return r({label:e})}}),Object(Y.createElement)("input",{className:"wp-block-search__input","aria-label":Object(K.__)("Optional placeholder text"),placeholder:a?void 0:Object(K.__)("Optional placeholder…"),value:a,onChange:function(e){return r({placeholder:e.target.value})}}),Object(Y.createElement)(W.RichText,{wrapperClassName:"wp-block-search__button",className:"wp-block-search__button-rich-text","aria-label":Object(K.__)("Button text"),placeholder:Object(K.__)("Add button text…"),withoutInteractiveFormatting:!0,value:c,onChange:function(e){return r({buttonText:e})}}))}},Va=[{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},save:function(e){var t=e.attributes,n=t.backgroundColor,r=t.customBackgroundColor,o=Object(W.getColorClassName)("background-color",n),a=Q()(o,{"has-background":n||r}),c={backgroundColor:o?void 0:r};return Object(Y.createElement)("div",{className:a,style:c},Object(Y.createElement)(W.InnerBlocks.Content,null))}}];var Fa=Object(ue.compose)([Object(W.withColors)("backgroundColor"),Object(be.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlock)(n);return{hasInnerBlocks:!(!r||!r.innerBlocks.length)}}))])((function(e){var t=e.className,n=e.setBackgroundColor,r=e.backgroundColor,o=e.hasInnerBlocks,a={backgroundColor:r.color},c=Q()(t,r.class,{"has-background":!!r.color});return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:r.color,onChange:n,label:Object(K.__)("Background Color")}]})),Object(Y.createElement)("div",{className:c,style:a},Object(Y.createElement)("div",{className:"wp-block-group__inner-container"},Object(Y.createElement)(W.InnerBlocks,{renderAppender:!o&&W.InnerBlocks.ButtonBlockAppender}))))})),Ua=Object(Y.createElement)(se.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9 8a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-1v3a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h1V8zm2 3h4V9h-4v2zm2 2H9v2h4v-2z"}),Object(Y.createElement)(se.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.732A2 2 0 1 1 4.732 2h14.536A2 2 0 1 1 22 4.732v14.536A2 2 0 1 1 19.268 22H4.732A2 2 0 1 1 2 19.268V4.732zM4.732 4h14.536c.175.304.428.557.732.732v14.536a2.01 2.01 0 0 0-.732.732H4.732A2.01 2.01 0 0 0 4 19.268V4.732A2.01 2.01 0 0 0 4.732 4z"}));var qa={name:"core/group",category:"layout",attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}}},Wa=qa.name,Ga={title:Object(K.__)("Group"),icon:Ua,description:Object(K.__)("A block that groups other blocks."),keywords:[Object(K.__)("container"),Object(K.__)("wrapper"),Object(K.__)("row"),Object(K.__)("section")],example:{attributes:{customBackgroundColor:"#ffffff"},innerBlocks:[{name:"core/paragraph",attributes:{customTextColor:"#cf2e2e",fontSize:"large",content:Object(K.__)("One.")}},{name:"core/paragraph",attributes:{customTextColor:"#ff6900",fontSize:"large",content:Object(K.__)("Two.")}},{name:"core/paragraph",attributes:{customTextColor:"#fcb900",fontSize:"large",content:Object(K.__)("Three.")}},{name:"core/paragraph",attributes:{customTextColor:"#00d084",fontSize:"large",content:Object(K.__)("Four.")}},{name:"core/paragraph",attributes:{customTextColor:"#0693e3",fontSize:"large",content:Object(K.__)("Five.")}},{name:"core/paragraph",attributes:{customTextColor:"#9b51e0",fontSize:"large",content:Object(K.__)("Six.")}}]},supports:{align:["wide","full"],anchor:!0,html:!1},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:function(e){if(1!==e.length||"core/group"!==e[0].name){var t=["wide","full"],n=e.reduce((function(e,n){var r=n.attributes.align;return t.indexOf(r)>t.indexOf(e)?r:e}),void 0),r=e.map((function(e){return Object(G.createBlock)(e.name,e.attributes,e.innerBlocks)}));return Object(G.createBlock)("core/group",{align:n},r)}}}]},edit:Fa,save:function(e){var t=e.attributes,n=t.backgroundColor,r=t.customBackgroundColor,o=Object(W.getColorClassName)("background-color",n),a=Q()(o,{"has-background":n||r}),c={backgroundColor:o?void 0:r};return Object(Y.createElement)("div",{className:a,style:c},Object(Y.createElement)("div",{className:"wp-block-group__inner-container"},Object(Y.createElement)(W.InnerBlocks.Content,null)))},deprecated:Va};var Ka=Object(W.withColors)("color",{textColor:"color"})((function(e){var t=e.color,n=e.setColor,r=e.className;return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(se.HorizontalRule,{className:Q()(r,Object(q.a)({"has-background":t.color},t.class,t.class)),style:{backgroundColor:t.color,color:t.color}}),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),colorSettings:[{value:t.color,onChange:n,label:Object(K.__)("Color")}]})))})),Za=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.Path,{d:"M19 13H5v-2h14v2z"}));var Ya={from:[{type:"enter",regExp:/^-{3,}$/,transform:function(){return Object(G.createBlock)("core/separator")}},{type:"raw",selector:"hr",schema:{hr:{}}}]},$a={name:"core/separator",category:"layout",attributes:{color:{type:"string"},customColor:{type:"string"}}},Qa=$a.name,Ja={title:Object(K.__)("Separator"),description:Object(K.__)("Create a break between ideas or sections with a horizontal separator."),icon:Za,keywords:[Object(K.__)("horizontal-line"),"hr",Object(K.__)("divider")],example:{attributes:{customColor:"#065174",className:"is-style-wide"}},styles:[{name:"default",label:Object(K.__)("Default"),isDefault:!0},{name:"wide",label:Object(K.__)("Wide Line")},{name:"dots",label:Object(K.__)("Dots")}],transforms:Ya,edit:Ka,save:function(e){var t,n=e.attributes,r=n.color,o=n.customColor,a=Object(W.getColorClassName)("background-color",r),c=Object(W.getColorClassName)("color",r),i=Q()((t={"has-text-color has-background":r||o},Object(q.a)(t,a,a),Object(q.a)(t,c,c),t)),l={backgroundColor:a?void 0:o,color:c?void 0:o};return Object(Y.createElement)("hr",{className:i,style:l})}},Xa=Object(ue.withInstanceId)((function(e){var t=e.attributes,n=e.setAttributes,r=e.instanceId,o="blocks-shortcode-input-".concat(r);return Object(Y.createElement)("div",{className:"wp-block-shortcode components-placeholder"},Object(Y.createElement)("label",{htmlFor:o,className:"components-placeholder__label"},Object(Y.createElement)(se.Dashicon,{icon:"shortcode"}),Object(K.__)("Shortcode")),Object(Y.createElement)(W.PlainText,{className:"input-control",id:o,value:t.text,placeholder:Object(K.__)("Write shortcode here…"),onChange:function(e){return n({text:e})}}))})),ec=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.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"}));var tc=n("UuzZ"),nc={from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:function(e,t){var n=t.content;return Object(tc.removep)(Object(tc.autop)(n))}}},priority:20}]},rc="core/shortcode",oc={title:Object(K.__)("Shortcode"),description:Object(K.__)("Insert additional custom elements with a WordPress shortcode."),icon:ec,category:"widgets",transforms:nc,supports:{customClassName:!1,className:!1,html:!1},edit:Xa,save:function(e){var t=e.attributes;return Object(Y.createElement)(Y.RawHTML,null,t.text)}},ac=Object(ue.compose)([Object(be.withDispatch)((function(e){var t=e("core/block-editor").toggleSelection;return{onResizeStart:function(){return t(!1)},onResizeStop:function(){return t(!0)}}})),ue.withInstanceId])((function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,o=e.instanceId,a=e.onResizeStart,c=e.onResizeStop,i=t.height,l="block-spacer-height-input-".concat(o),s=Object(Y.useState)(i),u=Object(ke.a)(s,2),b=u[0],m=u[1];return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(se.ResizableBox,{className:Q()("block-library-spacer__resize-container",{"is-selected":n}),size:{height:i},minHeight:"20",enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:a,onResizeStop:function(e,t,n,o){c();var a=parseInt(i+o.height,10);r({height:a}),m(a)}}),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Spacer Settings")},Object(Y.createElement)(se.BaseControl,{label:Object(K.__)("Height in pixels"),id:l},Object(Y.createElement)("input",{type:"number",id:l,onChange:function(e){var t=parseInt(e.target.value,10);m(t),isNaN(t)?(m(""),t=100):t<20&&(t=20),r({height:t})},value:b,min:"20",step:"10"})))))})),cc=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.Path,{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"})));var ic={name:"core/spacer",category:"layout",attributes:{height:{type:"number",default:100}}},lc=ic.name,sc={title:Object(K.__)("Spacer"),description:Object(K.__)("Add white space between blocks and customize its height."),icon:cc,edit:ac,save:function(e){var t=e.attributes;return Object(Y.createElement)("div",{style:{height:t.height},"aria-hidden":!0})}},uc=n("NMb1"),bc=n.n(uc);var mc=Object(Y.createElement)(se.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Y.createElement)(se.Path,{d:"M7.1 6l-.5 3h4.5L9.4 19h3l1.8-10h4.5l.5-3H7.1z"}));var dc={to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/paragraph",e)}}]},hc={name:"core/subhead",category:"common",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p"}}},pc=hc.name,gc={title:Object(K.__)("Subheading (deprecated)"),description:Object(K.__)("This block is deprecated. Please use the Paragraph block instead."),icon:mc,supports:{inserter:!1,multiple:!1},transforms:dc,edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.align,a=t.content,c=t.placeholder;return bc()("The Subheading block",{alternative:"the Paragraph block",plugin:"Gutenberg"}),Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(W.AlignmentToolbar,{value:o,onChange:function(e){n({align:e})}})),Object(Y.createElement)(W.RichText,{tagName:"p",value:a,onChange:function(e){n({content:e})},style:{textAlign:o},className:r,placeholder:c||Object(K.__)("Write subheading…")}))},save:function(e){var t=e.attributes,n=t.align,r=t.content;return Object(Y.createElement)(W.RichText.Content,{tagName:"p",style:{textAlign:n},value:r})}},fc=[{attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}},supports:{align:!0},save:function(e){var t=e.attributes,n=t.hasFixedLayout,r=t.head,o=t.body,a=t.foot,c=t.backgroundColor;if(!r.length&&!o.length&&!a.length)return null;var i=Object(W.getColorClassName)("background-color",c),l=Q()(i,{"has-fixed-layout":n,"has-background":!!i}),s=function(e){var t=e.type,n=e.rows;if(!n.length)return null;var r="t".concat(t);return Object(Y.createElement)(r,null,n.map((function(e,t){var n=e.cells;return Object(Y.createElement)("tr",{key:t},n.map((function(e,t){var n=e.content,r=e.tag,o=e.scope;return Object(Y.createElement)(W.RichText.Content,{tagName:r,value:n,key:t,scope:"th"===r?o:void 0})})))})))};return Object(Y.createElement)("table",{className:l},Object(Y.createElement)(s,{type:"head",rows:r}),Object(Y.createElement)(s,{type:"body",rows:o}),Object(Y.createElement)(s,{type:"foot",rows:a}))}}],vc=["align"];function Oc(e,t,n){if(!t)return e;var r=Object(J.pick)(e,["head","body","foot"]),o=t.sectionName,a=t.rowIndex;return Object(J.mapValues)(r,(function(e,r){return o&&o!==r?e:e.map((function(e,o){return a&&a!==o?e:{cells:e.cells.map((function(e,a){return jc({sectionName:r,columnIndex:a,rowIndex:o},t)?n(e):e}))}}))}))}function jc(e,t){if(!e||!t)return!1;switch(t.type){case"column":return"column"===t.type&&e.columnIndex===t.columnIndex;case"cell":return"cell"===t.type&&e.sectionName===t.sectionName&&e.columnIndex===t.columnIndex&&e.rowIndex===t.rowIndex}}function yc(e,t){var n=t.sectionName,r=t.rowIndex,o=t.columnCount,a=function(e){return Cc(e.head)?Cc(e.body)?Cc(e.foot)?void 0:e.foot[0]:e.body[0]:e.head[0]}(e),c=void 0===o?Object(J.get)(a,["cells","length"]):o;return c?Object(q.a)({},n,[].concat(Object(U.a)(e[n].slice(0,r)),[{cells:Object(J.times)(c,(function(e){var t=Object(J.get)(a,["cells",e],{}),r=Object(J.pick)(t,vc);return Object(Z.a)({},r,{content:"",tag:"head"===n?"th":"td"})}))}],Object(U.a)(e[n].slice(r)))):e}function _c(e,t){var n=t.columnIndex,r=Object(J.pick)(e,["head","body","foot"]);return Object(J.mapValues)(r,(function(e,t){return Cc(e)?e:e.map((function(e){return wc(e)||e.cells.length<n?e:{cells:[].concat(Object(U.a)(e.cells.slice(0,n)),[{content:"",tag:"head"===t?"th":"td"}],Object(U.a)(e.cells.slice(n)))}}))}))}function kc(e,t){return Cc(e[t])?yc(e,{sectionName:t,rowIndex:0,columnCount:Object(J.get)(e,["body",0,"cells","length"],1)}):Object(q.a)({},t,[])}function Cc(e){return!e||!e.length||Object(J.every)(e,wc)}function wc(e){return!(e.cells&&e.cells.length)}var Ec=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.G,null,Object(Y.createElement)(se.Path,{d:"M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z"}))),xc=[{color:"#f3f4f5",name:"Subtle light gray",slug:"subtle-light-gray"},{color:"#e9fbe5",name:"Subtle pale green",slug:"subtle-pale-green"},{color:"#e7f5fe",name:"Subtle pale blue",slug:"subtle-pale-blue"},{color:"#fcf0ef",name:"Subtle pale pink",slug:"subtle-pale-pink"}],Sc=[{icon:"editor-alignleft",title:Object(K.__)("Align Column Left"),align:"left"},{icon:"editor-aligncenter",title:Object(K.__)("Align Column Center"),align:"center"},{icon:"editor-alignright",title:Object(K.__)("Align Column Right"),align:"right"}],Tc=Object(W.createCustomColorsHOC)(xc),Nc=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).onCreateTable=e.onCreateTable.bind(Object(ie.a)(e)),e.onChangeFixedLayout=e.onChangeFixedLayout.bind(Object(ie.a)(e)),e.onChange=e.onChange.bind(Object(ie.a)(e)),e.onChangeInitialColumnCount=e.onChangeInitialColumnCount.bind(Object(ie.a)(e)),e.onChangeInitialRowCount=e.onChangeInitialRowCount.bind(Object(ie.a)(e)),e.renderSection=e.renderSection.bind(Object(ie.a)(e)),e.getTableControls=e.getTableControls.bind(Object(ie.a)(e)),e.onInsertRow=e.onInsertRow.bind(Object(ie.a)(e)),e.onInsertRowBefore=e.onInsertRowBefore.bind(Object(ie.a)(e)),e.onInsertRowAfter=e.onInsertRowAfter.bind(Object(ie.a)(e)),e.onDeleteRow=e.onDeleteRow.bind(Object(ie.a)(e)),e.onInsertColumn=e.onInsertColumn.bind(Object(ie.a)(e)),e.onInsertColumnBefore=e.onInsertColumnBefore.bind(Object(ie.a)(e)),e.onInsertColumnAfter=e.onInsertColumnAfter.bind(Object(ie.a)(e)),e.onDeleteColumn=e.onDeleteColumn.bind(Object(ie.a)(e)),e.onToggleHeaderSection=e.onToggleHeaderSection.bind(Object(ie.a)(e)),e.onToggleFooterSection=e.onToggleFooterSection.bind(Object(ie.a)(e)),e.onChangeColumnAlignment=e.onChangeColumnAlignment.bind(Object(ie.a)(e)),e.getCellAlignment=e.getCellAlignment.bind(Object(ie.a)(e)),e.state={initialRowCount:2,initialColumnCount:2,selectedCell:null},e}return Object(le.a)(t,e),Object(oe.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(J.times)(n,(function(){return{cells:Object(J.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)(Oc(r,t,(function(t){return Object(Z.a)({},t,{content:e})})))}}},{key:"onChangeColumnAlignment",value:function(e){var t=this.state.selectedCell;if(t){var n={type:"column",columnIndex:t.columnIndex},r=this.props,o=r.attributes;(0,r.setAttributes)(Oc(o,n,(function(t){return Object(Z.a)({},t,{align:e})})))}}},{key:"getCellAlignment",value:function(){var e=this.state.selectedCell;if(e){var t,n,r,o,a,c,i=this.props.attributes;return t=i,r="align",o=(n=e).sectionName,a=n.rowIndex,c=n.columnIndex,Object(J.get)(t,[o,a,"cells",c,r])}}},{key:"onToggleHeaderSection",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)(kc(t,"head"))}},{key:"onToggleFooterSection",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)(kc(t,"foot"))}},{key:"onInsertRow",value:function(e){var t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes,o=n.setAttributes,a=t.sectionName,c=t.rowIndex;this.setState({selectedCell:null}),o(yc(r,{sectionName: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.sectionName,a=e.rowIndex;this.setState({selectedCell:null}),r(function(e,t){var n=t.sectionName,r=t.rowIndex;return Object(q.a)({},n,e[n].filter((function(e,t){return t!==r})))}(n,{sectionName: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.columnIndex;this.setState({selectedCell:null}),o(_c(r,{columnIndex:a+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.sectionName,a=e.columnIndex;this.setState({selectedCell:null}),r(function(e,t){var n=t.columnIndex,r=Object(J.pick)(e,["head","body","foot"]);return Object(J.mapValues)(r,(function(e){return Cc(e)?e:e.map((function(e){return{cells:e.cells.length>=n?e.cells.filter((function(e,t){return t!==n})):e.cells}})).filter((function(e){return e.cells.length}))}))}(n,{sectionName:o,columnIndex:a}))}}},{key:"createOnFocus",value:function(e){var t=this;return function(){t.setState({selectedCell:Object(Z.a)({},e,{type:"cell"})})}}},{key:"getTableControls",value:function(){var e=this.state.selectedCell;return[{icon:"table-row-before",title:Object(K.__)("Add Row Before"),isDisabled:!e,onClick:this.onInsertRowBefore},{icon:"table-row-after",title:Object(K.__)("Add Row After"),isDisabled:!e,onClick:this.onInsertRowAfter},{icon:"table-row-delete",title:Object(K.__)("Delete Row"),isDisabled:!e,onClick:this.onDeleteRow},{icon:"table-col-before",title:Object(K.__)("Add Column Before"),isDisabled:!e,onClick:this.onInsertColumnBefore},{icon:"table-col-after",title:Object(K.__)("Add Column After"),isDisabled:!e,onClick:this.onInsertColumnAfter},{icon:"table-col-delete",title:Object(K.__)("Delete Column"),isDisabled:!e,onClick:this.onDeleteColumn}]}},{key:"renderSection",value:function(e){var t=this,n=e.name,r=e.rows;if(Cc(r))return null;var o="t".concat(n),a=this.state.selectedCell;return Object(Y.createElement)(o,null,r.map((function(e,r){var o=e.cells;return Object(Y.createElement)("tr",{key:r},o.map((function(e,o){var c=e.content,i=e.tag,l=e.scope,s=e.align,u={sectionName:n,rowIndex:r,columnIndex:o},b=jc(u,a),m=Q()(Object(q.a)({"is-selected":b},"has-text-align-".concat(s),s));return Object(Y.createElement)(i,{key:o,className:m,scope:"th"===i?l:void 0,onClick:function(e){var t=e&&e.target&&e.target.querySelector(".".concat("wp-block-table__cell-content"));t&&t.focus()}},Object(Y.createElement)(W.RichText,{className:"wp-block-table__cell-content",value:c,onChange:t.onChange,unstableOnFocus:t.createOnFocus(u)}))})))})))}},{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,t=this.props,n=t.attributes,r=t.className,o=t.backgroundColor,a=t.setBackgroundColor,c=this.state,i=c.initialRowCount,l=c.initialColumnCount,s=n.hasFixedLayout,u=n.head,b=n.body,m=n.foot,d=Cc(u)&&Cc(b)&&Cc(m),h=this.renderSection;if(d)return Object(Y.createElement)(se.Placeholder,{label:Object(K.__)("Table"),icon:Object(Y.createElement)(W.BlockIcon,{icon:Ec,showColors:!0}),instructions:Object(K.__)("Insert a table for sharing data."),isColumnLayout:!0},Object(Y.createElement)("form",{className:"wp-block-table__placeholder-form",onSubmit:this.onCreateTable},Object(Y.createElement)(se.TextControl,{type:"number",label:Object(K.__)("Column Count"),value:l,onChange:this.onChangeInitialColumnCount,min:"1",className:"wp-block-table__placeholder-input"}),Object(Y.createElement)(se.TextControl,{type:"number",label:Object(K.__)("Row Count"),value:i,onChange:this.onChangeInitialRowCount,min:"1",className:"wp-block-table__placeholder-input"}),Object(Y.createElement)(se.Button,{className:"wp-block-table__placeholder-button",isDefault:!0,type:"submit"},Object(K.__)("Create Table"))));var p=Q()(o.class,{"has-fixed-layout":s,"has-background":!!o.color});return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(se.Toolbar,null,Object(Y.createElement)(se.DropdownMenu,{hasArrowIndicator:!0,icon:"editor-table",label:Object(K.__)("Edit table"),controls:this.getTableControls()})),Object(Y.createElement)(W.AlignmentToolbar,{label:Object(K.__)("Change column alignment"),alignmentControls:Sc,value:this.getCellAlignment(),onChange:function(t){return e.onChangeColumnAlignment(t)},onHover:this.onHoverAlignment})),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Table Settings"),className:"blocks-table-settings"},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Fixed width table cells"),checked:!!s,onChange:this.onChangeFixedLayout}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Header section"),checked:!(!u||!u.length),onChange:this.onToggleHeaderSection}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Footer section"),checked:!(!m||!m.length),onChange:this.onToggleFooterSection})),Object(Y.createElement)(W.PanelColorSettings,{title:Object(K.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:o.color,onChange:a,label:Object(K.__)("Background Color"),disableCustomColors:!0,colors:xc}]})),Object(Y.createElement)("figure",{className:r},Object(Y.createElement)("table",{className:p},Object(Y.createElement)(h,{name:"head",rows:u}),Object(Y.createElement)(h,{name:"body",rows:b}),Object(Y.createElement)(h,{name:"foot",rows:m}))))}}]),t}(Y.Component),Rc=Tc("backgroundColor")(Nc);var Ac={tr:{allowEmpty:!0,children:{th:{allowEmpty:!0,children:Object(G.getPhrasingContentSchema)(),attributes:["scope"]},td:{allowEmpty:!0,children:Object(G.getPhrasingContentSchema)()}}}},Bc={from:[{type:"raw",selector:"table",schema:{table:{children:{thead:{allowEmpty:!0,children:Ac},tfoot:{allowEmpty:!0,children:Ac},tbody:{allowEmpty:!0,children:Ac}}}}}]},Ic={name:"core/table",category:"formatting",attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}}}}}}},Mc=Ic.name,Pc={title:Object(K.__)("Table"),description:Object(K.__)("Insert a table — perfect for sharing charts and data."),icon:Ec,example:{attributes:{head:[{cells:[{content:Object(K.__)("Version"),tag:"th"},{content:Object(K.__)("Jazz Musician"),tag:"th"},{content:Object(K.__)("Release Date"),tag:"th"}]}],body:[{cells:[{content:"5.2",tag:"td"},{content:"Jaco Pastorius",tag:"td"},{content:Object(K.__)("May 7, 2019"),tag:"td"}]},{cells:[{content:"5.1",tag:"td"},{content:"Betty Carter",tag:"td"},{content:Object(K.__)("February 21, 2019"),tag:"td"}]},{cells:[{content:"5.0",tag:"td"},{content:"Bebo Valdés",tag:"td"},{content:Object(K.__)("December 6, 2018"),tag:"td"}]}]}},styles:[{name:"regular",label:Object(K._x)("Default","block style"),isDefault:!0},{name:"stripes",label:Object(K.__)("Stripes")}],supports:{align:!0},transforms:Bc,edit:Rc,save:function(e){var t=e.attributes,n=t.hasFixedLayout,r=t.head,o=t.body,a=t.foot,c=t.backgroundColor;if(!r.length&&!o.length&&!a.length)return null;var i=Object(W.getColorClassName)("background-color",c),l=Q()(i,{"has-fixed-layout":n,"has-background":!!i}),s=function(e){var t=e.type,n=e.rows;if(!n.length)return null;var r="t".concat(t);return Object(Y.createElement)(r,null,n.map((function(e,t){var n=e.cells;return Object(Y.createElement)("tr",{key:t},n.map((function(e,t){var n=e.content,r=e.tag,o=e.scope,a=e.align,c=Q()(Object(q.a)({},"has-text-align-".concat(a),a));return Object(Y.createElement)(W.RichText.Content,{className:c||void 0,"data-align":a,tagName:r,value:n,key:t,scope:"th"===r?o:void 0})})))})))};return Object(Y.createElement)("figure",null,Object(Y.createElement)("table",{className:l},Object(Y.createElement)(s,{type:"head",rows:r}),Object(Y.createElement)(s,{type:"body",rows:o}),Object(Y.createElement)(s,{type:"foot",rows:a})))},deprecated:fc};var Lc={to:[{type:"block",blocks:["core/columns"],transform:function(e){var t=e.className,n=e.columns,r=e.content,o=e.width;return Object(G.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(G.createBlock)("core/column",{},[Object(G.createBlock)("core/paragraph",{content:t})])})))}}]},Hc={name:"core/text-columns",icon:"columns",category:"layout",attributes:{content:{type:"array",source:"query",selector:"p",query:{children:{type:"string",source:"html"}},default:[{},{}]},columns:{type:"number",default:2},width:{type:"string"}}},zc=Hc.name,Dc={supports:{inserter:!1},title:Object(K.__)("Text Columns (deprecated)"),description:Object(K.__)("This block is deprecated. Please use the Columns block instead."),transforms:Lc,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 bc()("The Text Columns block",{alternative:"the Columns block",plugin:"Gutenberg"}),Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(W.BlockAlignmentToolbar,{value:o,onChange:function(e){return n({width:e})},controls:["center","wide","full"]})),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,null,Object(Y.createElement)(se.RangeControl,{label:Object(K.__)("Columns"),value:c,onChange:function(e){return n({columns:e})},min:2,max:4,required:!0}))),Object(Y.createElement)("div",{className:"".concat(r," align").concat(o," columns-").concat(c)},Object(J.times)(c,(function(e){return Object(Y.createElement)("div",{className:"wp-block-column",key:"column-".concat(e)},Object(Y.createElement)(W.RichText,{tagName:"p",value:Object(J.get)(a,[e,"children"]),onChange:function(t){n({content:[].concat(Object(U.a)(a.slice(0,e)),[{children:t}],Object(U.a)(a.slice(e+1)))})},placeholder:Object(K.__)("New Column")}))}))))},save:function(e){var t=e.attributes,n=t.width,r=t.content,o=t.columns;return Object(Y.createElement)("div",{className:"align".concat(n," columns-").concat(o)},Object(J.times)(o,(function(e){return Object(Y.createElement)("div",{className:"wp-block-column",key:"column-".concat(e)},Object(Y.createElement)(W.RichText.Content,{tagName:"p",value:Object(J.get)(r,[e,"children"])}))})))}},Vc=[{attributes:{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},save:function(e){var t=e.attributes,n=t.textAlign,r=t.content;return Object(Y.createElement)(W.RichText.Content,{tagName:"pre",style:{textAlign:n},value:r})}}];var Fc=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M21 11.01L3 11V13H21V11.01ZM3 16H17V18H3V16ZM15 6H3V8.01L15 8V6Z"}));var Uc={from:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/verse",e)}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/paragraph",e)}}]},qc={name:"core/verse",category:"formatting",attributes:{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}}},Wc=qc.name,Gc={title:Object(K.__)("Verse"),description:Object(K.__)("Insert poetry. Use special spacing formats. Or quote song lyrics."),icon:Fc,example:{attributes:{content:Object(K.__)("WHAT was he doing, the great god Pan,")+"<br>"+Object(K.__)(" Down in the reeds by the river?")+"<br>"+Object(K.__)("Spreading ruin and scattering ban,")+"<br>"+Object(K.__)("Splashing and paddling with hoofs of a goat,")+"<br>"+Object(K.__)("And breaking the golden lilies afloat")+"<br>"+Object(K.__)(" With the dragon-fly on the river.")}},keywords:[Object(K.__)("poetry")],transforms:Uc,deprecated:Vc,merge:function(e,t){return{content:e.content+t.content}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=e.mergeBlocks,a=t.textAlign,c=t.content;return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(W.AlignmentToolbar,{value:a,onChange:function(e){n({textAlign:e})}})),Object(Y.createElement)(W.RichText,{tagName:"pre",value:c,onChange:function(e){n({content:e})},placeholder:Object(K.__)("Write…"),wrapperClassName:r,className:Q()(Object(q.a)({},"has-text-align-".concat(a),a)),onMerge:o}))},save:function(e){var t=e.attributes,n=t.textAlign,r=t.content,o=Q()(Object(q.a)({},"has-text-align-".concat(n),n));return Object(Y.createElement)(W.RichText.Content,{tagName:"pre",className:o,value:r})}},Kc=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(Y.createElement)(se.Path,{d:"M4 6.47L5.76 10H20v8H4V6.47M22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4z"})),Zc=["video"],Yc=["image"],$c=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.videoPlayer=Object(Y.createRef)(),e.posterImageButton=Object(Y.createRef)(),e.toggleAttribute=e.toggleAttribute.bind(Object(ie.a)(e)),e.onSelectURL=e.onSelectURL.bind(Object(ie.a)(e)),e.onSelectPoster=e.onSelectPoster.bind(Object(ie.a)(e)),e.onRemovePoster=e.onRemovePoster.bind(Object(ie.a)(e)),e.onUploadError=e.onUploadError.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.mediaUpload,o=t.noticeOperations,a=t.setAttributes,c=n.id,i=n.src,l=void 0===i?"":i;if(!c&&Object(Ce.isBlobURL)(l)){var s=Object(Ce.getBlobByURL)(l);s&&r({filesList:[s],onFileChange:function(e){var t=Object(ke.a)(e,1)[0].url;a({src:t})},onError:function(t){e.setState({editing:!0}),o.createErrorNotice(t)},allowedTypes:Zc})}}},{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(q.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;if(e!==n.src){var o=et({attributes:{url:e}});if(void 0!==o)return void this.props.onReplace(o);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:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"getAutoplayHelp",value:function(e){return e?Object(K.__)("Note: Autoplaying videos may cause usability issues for some visitors."):null}},{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.playsInline,l=t.poster,s=t.preload,u=t.src,b=this.props,m=b.className,d=b.instanceId,h=b.isSelected,p=b.noticeUI,g=b.setAttributes,f=this.state.editing,v=function(){e.setState({editing:!0})};if(f)return Object(Y.createElement)(W.MediaPlaceholder,{icon:Object(Y.createElement)(W.BlockIcon,{icon:Kc}),className:m,onSelect:function(t){if(!t||!t.url)return g({src:void 0,id:void 0}),void v();g({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"video/*",allowedTypes:Zc,value:this.props.attributes,notices:p,onError:this.onUploadError});var O="video-block__poster-image-description-".concat(d);return Object(Y.createElement)(Y.Fragment,null,Object(Y.createElement)(W.BlockControls,null,Object(Y.createElement)(se.Toolbar,null,Object(Y.createElement)(se.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(K.__)("Edit video"),onClick:v,icon:"edit"}))),Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Video Settings")},Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n,help:this.getAutoplayHelp}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:a}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Muted"),onChange:this.toggleAttribute("muted"),checked:c}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Playback Controls"),onChange:this.toggleAttribute("controls"),checked:o}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Play inline"),onChange:this.toggleAttribute("playsInline"),checked:i}),Object(Y.createElement)(se.SelectControl,{label:Object(K.__)("Preload"),value:s,onChange:function(e){return g({preload:e})},options:[{value:"auto",label:Object(K.__)("Auto")},{value:"metadata",label:Object(K.__)("Metadata")},{value:"none",label:Object(K.__)("None")}]}),Object(Y.createElement)(W.MediaUploadCheck,null,Object(Y.createElement)(se.BaseControl,{className:"editor-video-poster-control"},Object(Y.createElement)(se.BaseControl.VisualLabel,null,Object(K.__)("Poster Image")),Object(Y.createElement)(W.MediaUpload,{title:Object(K.__)("Select Poster Image"),onSelect:this.onSelectPoster,allowedTypes:Yc,render:function(t){var n=t.open;return Object(Y.createElement)(se.Button,{isDefault:!0,onClick:n,ref:e.posterImageButton,"aria-describedby":O},e.props.attributes.poster?Object(K.__)("Replace image"):Object(K.__)("Select Poster Image"))}}),Object(Y.createElement)("p",{id:O,hidden:!0},this.props.attributes.poster?Object(K.sprintf)(Object(K.__)("The current poster image url is %s"),this.props.attributes.poster):Object(K.__)("There is no poster image currently selected")),!!this.props.attributes.poster&&Object(Y.createElement)(se.Button,{onClick:this.onRemovePoster,isLink:!0,isDestructive:!0},Object(K.__)("Remove Poster Image")))))),Object(Y.createElement)("figure",{className:m},Object(Y.createElement)(se.Disabled,null,Object(Y.createElement)("video",{controls:o,poster:l,src:u,ref:this.videoPlayer})),(!W.RichText.isEmpty(r)||h)&&Object(Y.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(K.__)("Write caption…"),value:r,onChange:function(e){return g({caption:e})},inlineToolbar:!0})))}}]),t}(Y.Component),Qc=Object(ue.compose)([Object(be.withSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}})),se.withNotices,ue.withInstanceId])($c);var Jc={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(G.createBlock)("core/video",{src:Object(Ce.createBlobURL)(t)})}},{type:"shortcode",tag:"video",attributes:{src:{type:"string",shortcode:function(e){var t=e.named,n=t.src,r=t.mp4,o=t.m4v,a=t.webm,c=t.ogv,i=t.flv;return n||r||o||a||c||i}},poster:{type:"string",shortcode:function(e){return e.named.poster}},loop:{type:"string",shortcode:function(e){return e.named.loop}},autoplay:{type:"string",shortcode:function(e){return e.named.autoplay}},preload:{type:"string",shortcode:function(e){return e.named.preload}}}}]},Xc={name:"core/video",category:"common",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"string",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"},playsInline:{type:"boolean",source:"attribute",selector:"video",attribute:"playsinline"}}},ei=Xc.name,ti={title:Object(K.__)("Video"),description:Object(K.__)("Embed a video from your media library or upload a new one."),icon:Kc,keywords:[Object(K.__)("movie")],transforms:Jc,supports:{align:!0},edit:Qc,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,u=t.playsInline;return Object(Y.createElement)("figure",null,s&&Object(Y.createElement)("video",{autoPlay:n,controls:o,loop:a,muted:c,poster:i,preload:"metadata"!==l?l:void 0,src:s,playsInline:u}),!W.RichText.isEmpty(r)&&Object(Y.createElement)(W.RichText.Content,{tagName:"figcaption",value:r}))}},ni=function(e){function t(){var e;return Object(re.a)(this,t),(e=Object(ae.a)(this,Object(ce.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.taxonomy},e.setTaxonomy=e.setTaxonomy.bind(Object(ie.a)(e)),e.toggleShowTagCounts=e.toggleShowTagCounts.bind(Object(ie.a)(e)),e}return Object(le.a)(t,e),Object(oe.a)(t,[{key:"getTaxonomyOptions",value:function(){var e=Object(J.filter)(this.props.taxonomies,"show_cloud"),t={label:Object(K.__)("- Select -"),value:"",disabled:!0},n=Object(J.map)(e,(function(e){return{value:e.slug,label:e.name}}));return[t].concat(Object(U.a)(n))}},{key:"setTaxonomy",value:function(e){(0,this.props.setAttributes)({taxonomy:e})}},{key:"toggleShowTagCounts",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showTagCounts:!t.showTagCounts})}},{key:"render",value:function(){var e=this.props.attributes,t=e.taxonomy,n=e.showTagCounts,r=this.getTaxonomyOptions(),o=Object(Y.createElement)(W.InspectorControls,null,Object(Y.createElement)(se.PanelBody,{title:Object(K.__)("Tag Cloud Settings")},Object(Y.createElement)(se.SelectControl,{label:Object(K.__)("Taxonomy"),options:r,value:t,onChange:this.setTaxonomy}),Object(Y.createElement)(se.ToggleControl,{label:Object(K.__)("Show post counts"),checked:n,onChange:this.toggleShowTagCounts})));return Object(Y.createElement)(Y.Fragment,null,o,Object(Y.createElement)(on.a,{key:"tag-cloud",block:"core/tag-cloud",attributes:e}))}}]),t}(Y.Component),ri=Object(be.withSelect)((function(e){return{taxonomies:e("core").getTaxonomies()}}))(ni),oi="core/tag-cloud",ai={title:Object(K.__)("Tag Cloud"),description:Object(K.__)("A cloud of your most used tags."),icon:"tag",category:"widgets",supports:{html:!1,align:!0},edit:ri},ci=window.wp;var ii=function(e){function t(e){var n;return Object(re.a)(this,t),(n=Object(ae.a)(this,Object(ce.a)(t).call(this,e))).initialize=n.initialize.bind(Object(ie.a)(n)),n.onSetup=n.onSetup.bind(Object(ie.a)(n)),n.focus=n.focus.bind(Object(ie.a)(n)),n}return Object(le.a)(t,e),Object(oe.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),ci.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;ci.oldEditor.initialize("editor-".concat(e),{tinymce:Object(Z.a)({},t,{inline:!0,content_css:!1,fixed_toolbar_container:"#toolbar-".concat(e),setup:this.onSetup})})}},{key:"onSetup",value:function(e){var t,n=this,r=this.props,o=r.attributes.content,a=r.setAttributes,c=this.ref;this.editor=e,o&&e.on("loadContent",(function(){return e.setContent(o)})),e.on("blur",(function(){return t=e.selection.getBookmark(2,!0),a({content:e.getContent()}),e.once("focus",(function(){t&&e.selection.moveToBookmark(t)})),!1})),e.on("mousedown touchstart",(function(){t=null})),e.on("keydown",(function(t){t.keyCode!==we.BACKSPACE&&t.keyCode!==we.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)||(n.props.onReplace([]),t.preventDefault(),t.stopImmediatePropagation()),t.altKey&&t.keyCode===we.F10&&t.stopPropagation()})),e.addButton("kitchensink",{tooltip:Object(K._x)("More","button to expand options"),icon:"dashicon dashicons-editor-kitchensink",onClick:function(){var t=!this.active();this.active(t),e.dom.toggleClass(c,"has-advanced-toolbar",t)}}),e.on("init",(function(){e.settings.toolbar1&&-1===e.settings.toolbar1.indexOf("kitchensink")&&e.dom.addClass(c,"has-advanced-toolbar")})),e.addButton("wp_add_media",{tooltip:Object(K.__)("Insert Media"),icon:"dashicon dashicons-admin-media",cmd:"WP_Medialib"}),e.on("init",(function(){var e=n.editor.getBody();document.activeElement===e&&(e.blur(),n.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(Y.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(K.__)("Classic"),onKeyDown:this.onToolbarKeyDown}),Object(Y.createElement)("div",{key:"editor",id:"editor-".concat(t),className:"wp-block-freeform block-library-rich-text__tinymce"})]}}]),t}(Y.Component),li=Object(Y.createElement)(se.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Y.createElement)(se.Path,{d:"M0,0h24v24H0V0z M0,0h24v24H0V0z",fill:"none"}),Object(Y.createElement)(se.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(Y.createElement)(se.Rect,{x:"11",y:"8",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"11",y:"11",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"8",y:"8",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"8",y:"11",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"5",y:"11",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"5",y:"8",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"8",y:"14",width:"8",height:"2"}),Object(Y.createElement)(se.Rect,{x:"14",y:"11",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"14",y:"8",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"17",y:"11",width:"2",height:"2"}),Object(Y.createElement)(se.Rect,{x:"17",y:"8",width:"2",height:"2"}));var si={name:"core/freeform",category:"formatting",attributes:{content:{type:"string",source:"html"}}},ui=si.name,bi={title:Object(K._x)("Classic","block title"),description:Object(K.__)("Use the classic WordPress editor."),icon:li,supports:{className:!1,customClassName:!1,reusable:!1},edit:ii,save:function(e){var t=e.attributes.content;return Object(Y.createElement)(Y.RawHTML,null,t)}},mi=function(e){if(e){var t=e.metadata,n=e.settings,r=e.name;t&&Object(G.unstable__bootstrapServerSideBlockDefinitions)(Object(q.a)({},r,t)),Object(G.registerBlockType)(r,n)}},di=function(){[r,o,a,i,k,c,I,l,s,u,b,m,d,h,p,g,f].concat(Object(U.a)(Xr),Object(U.a)(eo),[v,A,window.wp&&window.wp.oldEditor?F:null,O,j,y,_,C,w,E,x,S,N,R,B,T,M,P,L,V,H,z,D]).forEach(mi),Object(G.setDefaultBlockName)(Oe),window.wp&&window.wp.oldEditor&&Object(G.setFreeformContentHandlerName)(ui),Object(G.setUnregisteredTypeHandlerName)(ta),A&&Object(G.setGroupingBlockName)(Wa)},hi=void 0},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},KEfo:function(e,t){!function(){e.exports=this.wp.viewport}()},KQm4:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("25BE");function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}},Mmq9:function(e,t){!function(){e.exports=this.wp.url}()},NMb1:function(e,t){!function(){e.exports=this.wp.deprecated}()},Nehr: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}}},ODXe:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("DSFK");var o=n("PYwp");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)()}},PYwp: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}))},RxS6:function(e,t){!function(){e.exports=this.wp.keycodes}()},TSYQ:function(e,t,n){var r; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var c=o.apply(null,r);c&&e.push(c)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var i in r)n.call(r,i)&&r[i]&&e.push(i);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},U8pU: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}))},UuzZ:function(e,t){!function(){e.exports=this.wp.autop}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},YuTi: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}},Zss7:function(e,t,n){var r;!function(o){var a=/^\s+/,c=/\s+$/,i=0,l=o.round,s=o.min,u=o.max,b=o.random;function m(e,t){if(t=t||{},(e=e||"")instanceof m)return e;if(!(this instanceof m))return new m(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,l=null,b=!1,m=!1;"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(c,"").toLowerCase();var t,n=!1;if(N[e])e=N[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:M(t[1]),g:M(t[2]),b:M(t[3]),a:z(t[4]),format:n?"name":"hex8"};if(t=U.hex6.exec(e))return{r:M(t[1]),g:M(t[2]),b:M(t[3]),format:n?"name":"hex"};if(t=U.hex4.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),a:z(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=U.hex3.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(q(e.r)&&q(e.g)&&q(e.b)?(d=e.r,h=e.g,p=e.b,t={r:255*B(d,255),g:255*B(h,255),b:255*B(p,255)},b=!0,m="%"===String(e.r).substr(-1)?"prgb":"rgb"):q(e.h)&&q(e.s)&&q(e.v)?(r=L(e.s),i=L(e.v),t=function(e,t,n){e=6*B(e,360),t=B(t,100),n=B(n,100);var r=o.floor(e),a=e-r,c=n*(1-t),i=n*(1-a*t),l=n*(1-(1-a)*t),s=r%6;return{r:255*[n,i,c,c,l,n][s],g:255*[l,n,n,i,c,c][s],b:255*[c,c,l,n,n,i][s]}}(e.h,r,i),b=!0,m="hsv"):q(e.h)&&q(e.s)&&q(e.l)&&(r=L(e.s),l=L(e.l),t=function(e,t,n){var r,o,a;function c(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=B(e,360),t=B(t,100),n=B(n,100),0===t)r=o=a=n;else{var i=n<.5?n*(1+t):n+t-n*t,l=2*n-i;r=c(l,i,e+1/3),o=c(l,i,e),a=c(l,i,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,r,l),b=!0,m="hsl"),e.hasOwnProperty("a")&&(n=e.a));var d,h,p;return n=A(n),{ok:b,format:e.format||m,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=i++}function d(e,t,n){e=B(e,255),t=B(t,255),n=B(n,255);var r,o,a=u(e,t,n),c=s(e,t,n),i=(a+c)/2;if(a==c)r=o=0;else{var l=a-c;switch(o=i>.5?l/(2-a-c):l/(a+c),a){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:i}}function h(e,t,n){e=B(e,255),t=B(t,255),n=B(n,255);var r,o,a=u(e,t,n),c=s(e,t,n),i=a,l=a-c;if(o=0===a?0:l/a,a==c)r=0;else{switch(a){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:i}}function p(e,t,n,r){var o=[P(l(e).toString(16)),P(l(t).toString(16)),P(l(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function g(e,t,n,r){return[P(H(r)),P(l(e).toString(16)),P(l(t).toString(16)),P(l(n).toString(16))].join("")}function f(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.s-=t/100,n.s=I(n.s),m(n)}function v(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.s+=t/100,n.s=I(n.s),m(n)}function O(e){return m(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.l+=t/100,n.l=I(n.l),m(n)}function y(e,t){t=0===t?0:t||10;var n=m(e).toRgb();return n.r=u(0,s(255,n.r-l(-t/100*255))),n.g=u(0,s(255,n.g-l(-t/100*255))),n.b=u(0,s(255,n.b-l(-t/100*255))),m(n)}function _(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.l-=t/100,n.l=I(n.l),m(n)}function k(e,t){var n=m(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,m(n)}function C(e){var t=m(e).toHsl();return t.h=(t.h+180)%360,m(t)}function w(e){var t=m(e).toHsl(),n=t.h;return[m(e),m({h:(n+120)%360,s:t.s,l:t.l}),m({h:(n+240)%360,s:t.s,l:t.l})]}function E(e){var t=m(e).toHsl(),n=t.h;return[m(e),m({h:(n+90)%360,s:t.s,l:t.l}),m({h:(n+180)%360,s:t.s,l:t.l}),m({h:(n+270)%360,s:t.s,l:t.l})]}function x(e){var t=m(e).toHsl(),n=t.h;return[m(e),m({h:(n+72)%360,s:t.s,l:t.l}),m({h:(n+216)%360,s:t.s,l:t.l})]}function S(e,t,n){t=t||6,n=n||30;var r=m(e).toHsl(),o=360/n,a=[m(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(m(r));return a}function T(e,t){t=t||6;for(var n=m(e).toHsv(),r=n.h,o=n.s,a=n.v,c=[],i=1/t;t--;)c.push(m({h:r,s:o,v:a})),a=(a+i)%1;return c}m.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return p(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[P(l(e).toString(16)),P(l(t).toString(16)),P(l(n).toString(16)),P(H(r))];if(o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*B(this._r,255))+"%",g:l(100*B(this._g,255))+"%",b:l(100*B(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*B(this._r,255))+"%, "+l(100*B(this._g,255))+"%, "+l(100*B(this._b,255))+"%)":"rgba("+l(100*B(this._r,255))+"%, "+l(100*B(this._g,255))+"%, "+l(100*B(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(R[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=m(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return m(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(O,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},m.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return m(e,t)},m.equals=function(e,t){return!(!e||!t)&&m(e).toRgbString()==m(t).toRgbString()},m.random=function(){return m.fromRatio({r:b(),g:b(),b:b()})},m.mix=function(e,t,n){n=0===n?0:n||50;var r=m(e).toRgb(),o=m(t).toRgb(),a=n/100;return m({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},m.readability=function(e,t){var n=m(e),r=m(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},m.isReadable=function(e,t,n){var r,o,a=m.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},m.mostReadable=function(e,t,n){var r,o,a,c,i=null,l=0;o=(n=n||{}).includeFallbackColors,a=n.level,c=n.size;for(var s=0;s<t.length;s++)(r=m.readability(e,t[s]))>l&&(l=r,i=m(t[s]));return m.isReadable(e,i,{level:a,size:c})||!o?i:(n.includeFallbackColors=!1,m.mostReadable(e,["#fff","#000"],n))};var N=m.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},R=m.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(N);function A(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function B(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function I(e){return s(1,u(0,e))}function M(e){return parseInt(e,16)}function P(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function H(e){return o.round(255*parseFloat(e)).toString(16)}function z(e){return M(e)/255}var D,V,F,U=(V="[\\s|\\(]+("+(D="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",F="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",{CSS_UNIT:new RegExp(D),rgb:new RegExp("rgb"+V),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+V),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+V),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function q(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=m:void 0===(r=function(){return m}.call(t,n,t,e))||(e.exports=r)}(Math)},axFQ:function(e,t){!function(){e.exports=this.wp.blockEditor}()},foSv:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},gdqT:function(e,t){!function(){e.exports=this.wp.a11y}()},jSdM:function(e,t){!function(){e.exports=this.wp.editor}()},jZUy:function(e,t){!function(){e.exports=this.wp.coreData}()},kd2E: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<s;++u){var b,m,d,h,p=e[u].replace(i,"%20"),g=p.indexOf(n);g>=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)}},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},md7G:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("U8pU"),o=n("JX7q");function a(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},nYho:function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.3.2 by @mathias */!function(a){t&&t.nodeType,e&&e.nodeType;var c="object"==typeof r&&r;c.global!==c&&c.window!==c&&c.self;var i,l=2147483647,s=/^xn--/,u=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function p(e){throw RangeError(m[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function f(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(b,".")).split("."),t).join(".")}function v(e){for(var t,n,r=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function O(e){return g(e,(function(e){var t="";return e>65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=h(e)})).join("")}function j(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function y(e,t,n){var r=0;for(e=n?d(e/700):e>>1,e+=d(e/t);e>455;r+=36)e=d(e/35);return d(r+36*e/(e+38))}function _(e){var t,n,r,o,a,c,i,s,u,b,m,h=[],g=e.length,f=0,v=128,j=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&p("not-basic"),h.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<g;){for(a=f,c=1,i=36;o>=g&&p("invalid-input"),((s=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:36)>=36||s>d((l-f)/c))&&p("overflow"),f+=s*c,!(s<(u=i<=j?1:i>=j+26?26:i-j));i+=36)c>d(l/(b=36-u))&&p("overflow"),c*=b;j=y(f-a,t=h.length+1,0==a),d(f/t)>l-v&&p("overflow"),v+=d(f/t),f%=t,h.splice(f++,0,v)}return O(h)}function k(e){var t,n,r,o,a,c,i,s,u,b,m,g,f,O,_,k=[];for(g=(e=v(e)).length,t=128,n=0,a=72,c=0;c<g;++c)(m=e[c])<128&&k.push(h(m));for(r=o=k.length,o&&k.push("-");r<g;){for(i=l,c=0;c<g;++c)(m=e[c])>=t&&m<i&&(i=m);for(i-t>d((l-n)/(f=r+1))&&p("overflow"),n+=(i-t)*f,t=i,c=0;c<g;++c)if((m=e[c])<t&&++n>l&&p("overflow"),m==t){for(s=n,u=36;!(s<(b=u<=a?1:u>=a+26?26:u-a));u+=36)_=s-b,O=36-b,k.push(h(j(b+_%O,0))),s=d(_/O);k.push(h(j(s,0))),a=y(n,f,r==o),n=0,++r}++n,++t}return k.join("")}i={version:"1.3.2",ucs2:{decode:v,encode:O},decode:_,encode:k,toASCII:function(e){return f(e,(function(e){return u.test(e)?"xn--"+k(e):e}))},toUnicode:function(e){return f(e,(function(e){return s.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n("YuTi")(e),n("yLpj"))},qRz9:function(e,t){!function(){e.exports=this.wp.richText}()},rePB:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},s4NR:function(e,t,n){"use strict";t.decode=t.parse=n("kd2E"),t.encode=t.stringify=n("4JlD")},"tI+e":function(e,t){!function(){e.exports=this.wp.components}()},vpQ4:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("rePB");function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Object(r.a)(e,t,n[t])}))}return e}},vuIU:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},wx14:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},wy2R:function(e,t){!function(){e.exports=this.moment}()},xTGt:function(e,t){!function(){e.exports=this.wp.blob}()},yLpj:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},ywyh:function(e,t){!function(){e.exports=this.wp.apiFetch}()}});
Save Changes
Rename File
Rename