Version Description
Download this release
Release Info
Developer | gutenbergplugin |
Plugin | Gutenberg |
Version | 10.7.3 |
Comparing to | |
See all releases |
Code changes from version 10.7.2 to 10.7.3
- build/block-editor/index.asset.php +1 -1
- build/block-editor/index.js +29 -29
- build/block-library/index.asset.php +1 -1
- build/block-library/index.js +1 -1
- changelog.txt +9 -2
- gutenberg.php +3 -3
- readme.txt +2 -2
build/block-editor/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-wordcount'), 'version' => '88d0ba7a6e6f356fbb72073b72436b2a');
|
build/block-editor/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.blockEditor=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=412)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var c=typeof o;if("string"===c||"number"===c)e.push(o);else if(Array.isArray(o))e.push(r.apply(null,o));else if("object"===c)for(var l in o)n.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?e.exports=r:void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},100:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=c},101:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},11:function(e,t){e.exports=window.React},111:function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(183)),c=o(n(184)),l=n(11),i=o(l),a=o(n(155)),s=o(n(186)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=l.useState(!1)[1];return l.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return u.fun(e)?e.apply(void 0,n):e}function f(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return r({to:t},e);var n=Object.keys(e).reduce((function(n,o){var c;return u.und(t[o])?r({},n,((c={})[o]=e[o],c)):n}),{});return r({to:t},n)}var g,h,O=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),j=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}return a(t,e),t}(O),v=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}a(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var o=this.payload[n];(!e||o instanceof O)&&(t[n]=o instanceof O?o[e?"getAnimatedValue":"getValue"]():o)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(O);function k(e,t){g={fn:e,transform:t}}function _(e){h=e}var y,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},C=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function S(e){y=e}var w,B=function(){return Date.now()};function I(e){w=e}var x,T,N=function(e){return e.current};function P(e){x=e}var L=Object.freeze({get applyAnimatedValues(){return g},injectApplyAnimatedValues:k,get colorNames(){return h},injectColorNames:_,get requestFrame(){return E},get cancelFrame(){return C},injectFrame:function(e,t){E=e,C=t},get interpolation(){return y},injectStringInterpolator:S,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return w},injectDefaultElement:I,get animatedApi(){return N},injectAnimatedApi:function(e){N=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:P,get manualFrameloop(){return T},injectManualFrameloop:function(e){T=e}}),A=function(e){function t(t,n){var o;return(o=e.call(this)||this).update=void 0,o.payload=t.style?r({},t,{style:x(t.style)}):t,o.update=n,o.attach(),o}return a(t,e),t}(v),R=!1,M=new Set,D=function e(){if(!R)return!1;var t=B(),n=M,o=Array.isArray(n),r=0;for(n=o?n:n[Symbol.iterator]();;){var c;if(o){if(r>=n.length)break;c=n[r++]}else{if((r=n.next()).done)break;c=r.value}for(var l=c,i=!1,a=0;a<l.configs.length;a++){for(var s=l.configs[a],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var m=s.animatedValues[b];if(!m.done){var p=s.fromValues[b],f=s.toValues[b],g=m.lastPosition,h=f instanceof O,j=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(h&&(f=f.getValue()),s.immediate)m.setValue(f),m.done=!0;else if("string"!=typeof p&&"string"!=typeof f){if(void 0!==s.duration)g=p+s.easing((t-m.startTime)/s.duration)*(f-p),u=t>=m.startTime+s.duration;else if(s.decay)g=p+j/(1-.998)*(1-Math.exp(-(1-.998)*(t-m.startTime))),(u=Math.abs(m.lastPosition-g)<.1)&&(f=g);else{d=void 0!==m.lastTime?m.lastTime:t,j=void 0!==m.lastVelocity?m.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),k=0;k<v;++k)g+=1*(j+=(-s.tension*(g-f)+-s.friction*j)/s.mass*1/1e3)/1e3;var _=!(!s.clamp||0===s.tension)&&(p<f?g>f:g<f),y=Math.abs(j)<=s.precision,C=0===s.tension||Math.abs(f-g)<=s.precision;u=_||y&&C,m.lastVelocity=j,m.lastTime=t}h&&!s.toValues[b].done&&(u=!1),u?(m.value!==f&&(g=f),m.done=!0):i=!0,m.setValue(g),m.lastPosition=g}else m.setValue(f),m.done=!0}}l.props.onFrame&&(l.values[s.name]=s.interpolation.getValue())}l.props.onFrame&&l.props.onFrame(l.values),i||(M.delete(l),l.stop(!0))}return M.size?T?T():E(e):R=!1,R};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(y&&"string"==typeof e.output[0])return y(e);var o=e,r=o.output,c=o.range||[0,1],l=o.extrapolateLeft||o.extrapolate||"extend",i=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,o,r,c,l,i,a){var s=a?a(e):e;if(s<t){if("identity"===l)return s;"clamp"===l&&(s=t)}if(s>n){if("identity"===i)return s;"clamp"===i&&(s=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t),s=c(s),o===-1/0?s=-s:r===1/0?s+=o:s=s*(r-o)+o,s)}(e,c[t],c[t+1],r[t],r[t+1],a,l,i,o.map)}}var V=function(e){function t(n,o,r){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof j&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(o,r),c}a(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(j),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}a(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(O),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}a(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,o){return n.payload[o].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(j),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=f(e),n=t.delay,o=void 0===n?0:n,l=t.to,i=c(t,["delay","to"]);if(u.arr(l)||u.fun(l))this.queue.push(r({},i,{delay:o,to:l}));else if(l){var a={};Object.entries(l).forEach((function(e){var t,n=e[0],c=e[1],l=r({to:(t={},t[n]=c,t),delay:p(o,n)},i),s=a[l.delay]&&a[l.delay].to;a[l.delay]=r({},a[l.delay],l,{to:r({},s,l.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,o=void 0===n?{}:n,c=e.to,l=void 0===c?{}:c;u.obj(o)&&(t.merged=r({},o,t.merged)),u.obj(l)&&(t.merged=r({},t.merged,l))}));var n=this.local=++this.guid,o=this.localQueue=this.queue;this.queue=[],o.forEach((function(r,l){var i=r.delay,a=c(r,["delay"]),s=function(r){l===o.length-1&&n===t.guid&&r&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);i?setTimeout((function(){n===t.guid&&(d?t.runAsync(a,s):t.diff(a).start(s))}),i):d?t.runAsync(a,s):t.diff(a).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,M.has(this)||M.add(this),R||(R=!0,E(T||D));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,M.has(this)&&M.delete(this)),this},t.runAsync=function(e,t){var n=this,o=(e.delay,c(e,["delay"])),l=this.local,i=Promise.resolve(void 0);if(u.arr(o.to))for(var a=function(e){var t=e,c=r({},o,f(o.to[t]));u.arr(c.config)&&(c.config=c.config[t]),i=i.then((function(){if(l===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<o.to.length;s++)a(s);else if(u.fun(o.to)){var d,b=0;i=i.then((function(){return o.to((function(e){var t=r({},o,f(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,l===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=r({},this.props,e);var n=this.props,o=n.from,c=void 0===o?{}:o,l=n.to,i=void 0===l?{}:l,a=n.config,s=void 0===a?{}:a,d=n.reverse,f=n.attach,g=n.reset,O=n.immediate;if(d){var j=[i,c];c=j[0],i=j[1]}this.merged=r({},c,this.merged,i),this.hasChanged=!1;var v=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var o=n[0],l=n[1],i=e[o]||{},a=u.num(l),d=u.str(l)&&!l.startsWith("#")&&!/\d/.test(l)&&!h[l],f=u.arr(l),j=!a&&!f&&!d,k=u.und(c[o])?l:c[o],_=a||f||d?l:1,E=p(s,o);v&&(_=v.animations[o].parent);var C,S=i.parent,w=i.interpolation,I=m(v?_.getPayload():_),x=l;j&&(x=y({range:[0,1],output:[l,l]})(1));var T,N=w&&w.getValue(),P=!u.und(S)&&i.animatedValues.some((function(e){return!e.done})),L=!u.equ(x,N),A=!u.equ(x,i.previous),R=!u.equ(E,i.config);if(g||A&&L||R){var M;if(a||d)S=w=i.parent||new H(k);else if(f)S=w=i.parent||new z(k);else if(j){var D=i.interpolation&&i.interpolation.calc(i.parent.value);D=void 0===D||g?k:D,i.parent?(S=i.parent).setValue(0,!1):S=new H(0);var F={output:[D,l]};i.interpolation?(w=i.interpolation,i.interpolation.updateConfig(F)):w=S.interpolate(F)}return I=m(v?_.getPayload():_),C=m(S.getPayload()),g&&!j&&S.setValue(k,!1),t.hasChanged=!0,C.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=P?e.lastVelocity:void 0,e.lastTime=P?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(O,o)&&S.setValue(j?_:l,!1),r({},e,((M={})[o]=r({},i,{name:o,parent:S,interpolation:w,animatedValues:C,toValues:I,previous:x,config:E,fromValues:m(S.getValue()),immediate:p(O,o),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),M))}return L?e:(j&&(S.setValue(1,!1),w.updateConfig({output:[x,x]})),S.done=!0,t.hasChanged=!0,r({},e,((T={})[o]=r({},e[o],{previous:x}),T)))}),this.animations),this.hasChanged)for(var k in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[k]=this.animations[k].interpolation,this.values[k]=this.animations[k].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=l.useRef(!1),o=l.useRef(),r=u.fun(t),c=l.useMemo((function(){var n;return o.current&&(o.current.map((function(e){return e.destroy()})),o.current=void 0),[new Array(e).fill().map((function(e,o){var c=new U,l=r?p(t,o,c):t[o];return 0===o&&(n=l.ref),c.update(l),n||c.start(),c})),n]}),[e]),i=c[0],a=c[1];o.current=i,l.useImperativeHandle(a,(function(){return{start:function(){return Promise.all(o.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return o.current.forEach((function(t){return t.stop(e)}))},get controllers(){return o.current}}}));var s=l.useMemo((function(){return function(e){return o.current.map((function(t,n){t.update(r?p(e,n,t):e[n]),a||t.start()}))}}),[e]);l.useEffect((function(){n.current?r||s(t):a||o.current.forEach((function(e){return e.start()}))})),l.useEffect((function(){return n.current=!0,function(){return o.current.forEach((function(e){return e.destroy()}))}}),[]);var d=o.current.map((function(e){return e.getValues()}));return r?[d,s,function(e){return o.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,$=function(e,t){return("function"==typeof t?e.map(t):m(t)).map(String)},q=function(e){var t=e.items,n=e.keys,o=void 0===n?function(e){return e}:n,l=c(e,["items","keys"]);return t=m(void 0!==t?t:null),r({items:t,keys:$(t,o)},l)};function Y(e,t){var n=function(){if(r){if(c>=o.length)return"break";l=o[c++]}else{if((c=o.next()).done)return"break";l=c.value}var n=l.key,i=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},o=e.current.deleted,r=Array.isArray(o),c=0;for(o=r?o:o[Symbol.iterator]();;){var l;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof O||(t=g.transform(t)),n.payload=t,n}return a(t,e),t}(v),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),oe=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),re=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,le=/^#([0-9a-fA-F]{6})$/,ie=/^#([0-9a-fA-F]{8})$/;function ae(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}function se(e,t,n){var o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,c=ae(r,o,e+1/3),l=ae(r,o,e),i=ae(r,o,e-1/3);return Math.round(255*c)<<24|Math.round(255*l)<<16|Math.round(255*i)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function me(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,o="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=le.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=re.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ie.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),me(n[2]),me(n[3])))>>>0:(n=oe.exec(t))?(se(de(n[1]),me(n[2]),me(n[3]))|be(n[4]))>>>0:null;return null===o?e:"rgba("+((4278190080&(o=o||0))>>>24)+", "+((16711680&o)>>>16)+", "+((65280&o)>>>8)+", "+(255&o)/255+")"}var fe=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ge=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,he=new RegExp("("+Object.keys(Q).join("|")+")","g"),Oe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},je=["Webkit","Ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Oe.hasOwnProperty(e)&&Oe[e]?(""+t).trim():t+"px"}Oe=Object.keys(Oe).reduce((function(e,t){return je.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Oe);var ke={};P((function(e){return new X(e)})),I("div"),S((function(e){var t=e.output.map((function(e){return e.replace(ge,pe)})).map((function(e){return e.replace(he,pe)})),n=t[0].match(fe).map((function(){return[]}));t.forEach((function(e){e.match(fe).forEach((function(e,t){return n[t].push(+e)}))}));var o=t[0].match(fe).map((function(t,o){return F(r({},e,{output:n[o]}))}));return function(e){var n=0;return t[0].replace(fe,(function(){return o[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,o,r){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(o)+", "+r+")"}))}})),_(Q),k((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,o=t.children,r=t.scrollTop,l=t.scrollLeft,i=c(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==r&&(e.scrollTop=r),void 0!==l&&(e.scrollLeft=l),void 0!==o&&(e.textContent=o),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=ve(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in i){var m=a?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(m)&&e.setAttribute(m,i[b])}}),(function(e){return e}));var _e,ye,Ee=(_e=function(e){return l.forwardRef((function(t,n){var o=d(),a=l.useRef(!0),s=l.useRef(null),b=l.useRef(null),m=l.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){b.current&&!1===g.fn(b.current,s.current.getAnimatedValue())&&o()})),t&&t.detach()}),[]);l.useEffect((function(){return function(){a.current=!1,s.current&&s.current.detach()}}),[]),l.useImperativeHandle(n,(function(){return N(b,a,o)})),m(t);var p=s.current.getValue(),f=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return i.createElement(e,r({},f,{ref:function(e){return b.current=(t=e,(o=n)&&(u.fun(o)?o(t):u.obj(o)&&(o.current=t)),t);var t,o}}))}))},void 0===(ye=!1)&&(ye=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ye?t[0].toLowerCase()+t.substring(1):t;return e[n]=_e(n),e}),_e)}),Ce=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=D,t.animated=Ce,t.a=Ce,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=L,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),o=n[0],r=n[1],c=n[2];return t?[o[0],r,c]:o},t.useTrail=function(e,t){var n=l.useRef(!1),o=u.fun(t),c=p(t),i=l.useRef(),a=W(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),r({},c,{config:p(c.config,e),attach:e>0&&function(){return i.current[e-1]}})})),s=a[0],d=a[1],b=a[2],m=l.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var o=e.reverse?t+1:t-1,l=i.current[o];return r({},e,{config:p(e.config||c.config,t),attach:l&&function(){return l}})}))}}),[e,c.reverse]);return l.useEffect((function(){n.current&&!o&&m(t)})),l.useEffect((function(){n.current=!0}),[]),o?[s,m,b]:s},t.useTransition=function(e,t,n){var o=r({items:e,keys:t||function(e){return e}},n),i=q(o),a=i.lazy,s=void 0!==a&&a,u=(i.unique,i.reset),b=void 0!==u&&u,m=(i.enter,i.leave,i.update,i.onDestroyed),f=(i.keys,i.items,i.onFrame),g=i.onRest,h=i.onStart,O=i.ref,j=c(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),k=l.useRef(!1),_=l.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!o.ref,instances:!k.current&&new Map,forceUpdate:v});return l.useImperativeHandle(o.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var n=e.first,o=e.prevProps,l=c(e,["first","prevProps"]),i=q(t),a=i.items,s=i.keys,u=i.initial,d=i.from,b=i.enter,m=i.leave,f=i.update,g=i.trail,h=void 0===g?0:g,O=i.unique,j=i.config,v=i.order,k=void 0===v?["enter","leave","update"]:v,_=q(o),y=_.keys,E=_.items,C=r({},l.current),S=[].concat(l.deleted),w=Object.keys(C),B=new Set(w),I=new Set(s),x=s.filter((function(e){return!B.has(e)})),T=l.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),N=s.filter((function(e){return B.has(e)})),P=-h;k.length;)switch(k.shift()){case"enter":x.forEach((function(e,t){O&&S.find((function(t){return t.originalKey===e}))&&(S=S.filter((function(t){return t.originalKey!==e})));var o=s.indexOf(e),r=a[o],c=n&&void 0!==u?"initial":"enter";C[e]={slot:c,originalKey:e,key:O?String(e):K++,item:r,trail:P+=h,config:p(j,r,c),from:p(n&&void 0!==u?u||{}:d,r),to:p(b,r)}}));break;case"leave":T.forEach((function(e){var t=y.indexOf(e),n=E[t];S.unshift(r({},C[e],{slot:"leave",destroyed:!0,left:y[Math.max(0,t-1)],right:y[Math.min(y.length,t+1)],trail:P+=h,config:p(j,n,"leave"),to:p(m,n)})),delete C[e]}));break;case"update":N.forEach((function(e){var t=s.indexOf(e),n=a[t];C[e]=r({},C[e],{item:n,slot:"update",trail:P+=h,config:p(j,n,"update"),to:p(f,n)})}))}var L=s.map((function(e){return C[e]}));return S.forEach((function(e){var t,n=e.left,o=(e.right,c(e,["left","right"]));-1!==(t=L.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),L=[].concat(L.slice(0,t),[o],L.slice(t))})),r({},l,{changed:x.length||T.length||N.length,first:n&&0===x.length,transitions:L,current:C,deleted:S,prevProps:t})}(_.current,o),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,n=e.from,o=e.to,c=e.config,l=e.trail,i=e.key,a=e.item;_.current.instances.has(i)||_.current.instances.set(i,new U);var u=_.current.instances.get(i),d=r({},j,{to:o,from:n,config:c,ref:O,onRest:function(n){_.current.mounted&&(e.destroyed&&(O||s||Y(_,i),m&&m(a)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(O||s)&&_.current.deleted.length>0&&Y(_),g&&g(a,t,n))},onStart:h&&function(){return h(a,t)},onFrame:f&&function(e){return f(a,t,e)},delay:l,reset:b&&"enter"===t});u.update(d),_.current.paused||u.start()})),l.useEffect((function(){return _.current.mounted=k.current=!0,function(){_.current.mounted=k.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,n=e.slot,o=e.key;return{item:t,key:o,state:n,props:_.current.instances.get(o).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var o=l.useRef();l.useEffect((function(){u.equ(e,o.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,o){var c=e.current;if(c){var l=c.controllers;if(l.length){var i=n*t[o];l.forEach((function(e){e.queue=e.queue.map((function(e){return r({},e,{delay:e.delay+i})})),e.start()}))}}})):e.reduce((function(e,t,n){var o=t.current;return e.then((function(){return o.start()}))}),Promise.resolve()),o.current=e}))},t.useSprings=W},117:function(e,t,n){"use strict";var o=n(0);t.a=function({icon:e,size:t=24,...n}){return Object(o.cloneElement)(e,{width:t,height:t,...n})}},118:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},12:function(e,t){e.exports=window.wp.keycodes},121:function(e,t,n){"use strict";e.exports=n(187)},122:function(e,t){e.exports=window.wp.wordcount},125:function(e,t){e.exports=window.wp.shortcode},132:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},133:function(e,t,n){"use strict";var o=n(134);function r(){}function c(){}c.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,c,l){if(l!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:r};return n.PropTypes=n,n}},134:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},141:function(e,t){e.exports=window.wp.blockSerializationDefaultParser},149:function(e,t){e.exports=window.wp.tokenList},154:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},155:function(e,t,n){var o=n(185);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},156:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},16:function(e,t){e.exports=window.wp.richText},170:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},18:function(e,t){e.exports=window.wp.hooks},182:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(r.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));t.a=c},183:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},184:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,o,r={},c=Object.keys(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||(r[n]=e[n]);return r},e.exports.default=e.exports,e.exports.__esModule=!0},185:function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,o)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},186:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},187:function(e,t,n){"use strict";var o=n(188);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,l=n.alignWithTop,i=n.alignWithLeft,a=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var b=o.isWindow(t),m=!(!b||!t.frameElement),p=o.offset(e),f=o.outerHeight(e),g=o.outerWidth(e),h=void 0,O=void 0,j=void 0,v=void 0,k=void 0,_=void 0,y=void 0,E=void 0,C=void 0,S=void 0;m&&(t=t.document.scrollingElement||t.document.body),b||m?(y=t,S=o.height(y),C=o.width(y),E={left:o.scrollLeft(y),top:o.scrollTop(y)},k={left:p.left-E.left-s,top:p.top-E.top-a},_={left:p.left+g-(E.left+C)+d,top:p.top+f-(E.top+S)+u},v=E):(h=o.offset(t),O=t.clientHeight,j=t.clientWidth,v={left:t.scrollLeft,top:t.scrollTop},k={left:p.left-(h.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-s,top:p.top-(h.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},_={left:p.left+g-(h.left+j+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:p.top+f-(h.top+O+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),k.top<0||_.top>0?!0===l?o.scrollTop(t,v.top+k.top):!1===l?o.scrollTop(t,v.top+_.top):k.top<0?o.scrollTop(t,v.top+k.top):o.scrollTop(t,v.top+_.top):c||((l=void 0===l||!!l)?o.scrollTop(t,v.top+k.top):o.scrollTop(t,v.top+_.top)),r&&(k.left<0||_.left>0?!0===i?o.scrollLeft(t,v.left+k.left):!1===i?o.scrollLeft(t,v.left+_.left):k.left<0?o.scrollLeft(t,v.left+k.left):o.scrollLeft(t,v.left+_.left):c||((i=void 0===i||!!i)?o.scrollLeft(t,v.left+k.left):o.scrollLeft(t,v.left+_.left)))}},188:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function c(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function l(e){return c(e)}function i(e){return c(e,!0)}function a(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,c=r.body,l=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=l.clientLeft||c.clientLeft||0,top:o-=l.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=l(o),t.top+=i(o),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left",b=void 0;function m(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,c=n||r.defaultView.getComputedStyle(e,null);return c&&(o=c.getPropertyValue(t)||c[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var o=e.style,r=o[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],o[d]="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o[d]=r,e.runtimeStyle[d]=c}return""===n?"auto":n});var f=["margin","border","padding"];function g(e,t,n){var o={},r=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o[c]=r[c],r[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(r[c]=o[c])}function h(e,t,n){var o=0,r=void 0,c=void 0,l=void 0;for(c=0;c<t.length;c++)if(r=t[c])for(l=0;l<n.length;l++){var i;i="border"===r?r+n[l]+"Width":r+n[l],o+=parseFloat(b(e,i))||0}return o}function O(e){return null!=e&&e==e.window}var j={};function v(e,t,n){if(O(e))return"width"===t?j.viewportWidth(e):j.viewportHeight(e);if(9===e.nodeType)return"width"===t?j.docWidth(e):j.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),l=0;(null==r||r<=0)&&(r=void 0,(null==(l=b(e,t))||Number(l)<0)&&(l=e.style[t]||0),l=parseFloat(l)||0),void 0===n&&(n=c?1:-1);var i=void 0!==r||c,a=r||l;if(-1===n)return i?a-h(e,["border","padding"],o):l;if(i){var s=2===n?-h(e,["border"],o):h(e,["margin"],o);return a+(1===n?0:s)}return l+h(e,f.slice(n),o)}m(["Width","Height"],(function(e){j["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],j["viewport"+e](n))},j["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,c=o.documentElement[n];return"CSS1Compat"===o.compatMode&&c||r&&r[n]||c}}));var k={position:"absolute",visibility:"hidden",display:"block"};function _(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):g(e,k,(function(){t=v.apply(void 0,n)})),t}function y(e,t,n){var o=n;if("object"!==(void 0===t?"undefined":r(t)))return void 0!==o?("number"==typeof o&&(o+="px"),void(e.style[t]=o)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&y(e,c,t[c])}m(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);j["outer"+t]=function(t,n){return t&&_(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];j[e]=function(t,o){return void 0===o?t&&_(t,e,-1):t?(b(t),p(t)&&(o+=h(t,["padding","border"],n)),y(t,e,o)):void 0}})),e.exports=o({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return a(e);!function(e,t){"static"===y(e,"position")&&(e.style.position="relative");var n=a(e),o={},r=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r=parseFloat(y(e,c))||0,o[c]=r+t[c]-n[c]);y(e,o)}(e,t)},isWindow:O,each:m,css:y,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(O(e)){if(void 0===t)return l(e);window.scrollTo(t,i(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(O(e)){if(void 0===t)return i(e);window.scrollTo(l(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},j)},189:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(r.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},19:function(e,t){e.exports=window.wp.url},190:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var i=n(11),a=n(23),s=n(191),u=n(192),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&s(e.textarea)})):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),s.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=l(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,u=n&&s?s*n:null;return i.createElement("textarea",c({},a,{onChange:this.onChange,style:u?c({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(i.Component);t.TextareaAutosize=i.forwardRef((function(e,t){return i.createElement(d,c({},e,{innerRef:t}))}))},191:function(e,t,n){var o,r;void 0===(r="function"==typeof(o=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function l(e){var t=r.get(e);t&&t.destroy()}function i(e){var t=r.get(e);t&&t.update()}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((a=function(e){return e}).destroy=function(e){return e},a.update=function(e){return e}):((a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t,n=null,o=null,l=null,i=function(){e.clientWidth!==o&&d()},a=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:a,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",o=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o<t?"hidden"===n.overflowY&&(s("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==o){l=o;var r=c("autosize:resized");try{e.dispatchEvent(r)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e}),t.default=a,e.exports=t.default})?o.apply(t,[e,t]):o)||(e.exports=r)},192:function(e,t,n){var o=n(193);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var c=e.nodeName,l=document.createElement(c);l.innerHTML=" ","TEXTAREA"===c.toUpperCase()&&l.setAttribute("rows","1");var i=o(e,"font-size");l.style.fontSize=i,l.style.padding="0px",l.style.border="0px";var a=document.body;a.appendChild(l),n=l.offsetHeight,a.removeChild(l)}return n}},193:function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},194:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=c},195:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=c},2:function(e,t){e.exports=window.lodash},207:function(e,t,n){"use strict";var o=n(0),r=n(6),c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},219:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},22:function(e,t){e.exports=window.wp.dom},220:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},221:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},222:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(r.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},223:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},23:function(e,t,n){e.exports=n(133)()},24:function(e,t){e.exports=window.wp.keyboardShortcuts},25:function(e,t){e.exports=window.wp.deprecated},268:function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return r.diff(e,t,n)},t.characterDiff=void 0;var r=new(((o=n(300))&&o.__esModule?o:{default:o}).default);t.characterDiff=r},269:function(e,t,n){"use strict";t.match=function(e,t){return a(e).some((function(e){var n=e.inverse,o="all"===e.type||t.type===e.type;if(o&&n||!o&&!n)return!1;var r=e.expressions.every((function(e){var n=e.feature,o=e.modifier,r=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===r.toLowerCase();case"width":case"height":case"device-width":case"device-height":r=d(r),c=d(c);break;case"resolution":r=u(r),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":r=s(r),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":r=parseInt(r,10)||1,c=parseInt(c,10)||0}switch(o){case"min":return c>=r;case"max":return c<=r;default:return c===r}}));return r&&!n||!r&&n}))},t.parse=a;var o=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,r=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,l=/(em|rem|px|cm|mm|in|pt|pc)?$/,i=/(dpi|dpcm|dppx)?$/;function a(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(o),n=t[1],l=t[2],i=t[3]||"",a={};return a.inverse=!!n&&"not"===n.toLowerCase(),a.type=l?l.toLowerCase():"all",i=i.match(/\([^\)]+\)/g)||[],a.expressions=i.map((function(e){var t=e.match(r),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),a}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(l)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},270:function(e,t){var n=e.exports=function(e){return new o(e)};function o(e){this.value=e}function r(e,t,n){var o=[],r=[],i=!0;return function e(d){var b=n?c(d):d,m={},p=!0,f={node:b,node_:d,path:[].concat(o),parent:r[r.length-1],parents:r,key:o.slice(-1)[0],isRoot:0===o.length,level:o.length,circular:null,update:function(e,t){f.isRoot||(f.parent.node[f.key]=e),f.node=e,t&&(p=!1)},delete:function(e){delete f.parent.node[f.key],e&&(p=!1)},remove:function(e){a(f.parent.node)?f.parent.node.splice(f.key,1):delete f.parent.node[f.key],e&&(p=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){i=!1},block:function(){p=!1}};if(!i)return f;function g(){if("object"==typeof f.node&&null!==f.node){f.keys&&f.node_===f.node||(f.keys=l(f.node)),f.isLeaf=0==f.keys.length;for(var e=0;e<r.length;e++)if(r[e].node_===d){f.circular=r[e];break}}else f.isLeaf=!0,f.keys=null;f.notLeaf=!f.isLeaf,f.notRoot=!f.isRoot}g();var h=t.call(f,f.node);return void 0!==h&&f.update&&f.update(h),m.before&&m.before.call(f,f.node),p?("object"!=typeof f.node||null===f.node||f.circular||(r.push(f),g(),s(f.keys,(function(t,r){o.push(t),m.pre&&m.pre.call(f,f.node[t],t);var c=e(f.node[t]);n&&u.call(f.node,t)&&(f.node[t]=c.node),c.isLast=r==f.keys.length-1,c.isFirst=0==r,m.post&&m.post.call(f,c),o.pop()})),r.pop()),m.after&&m.after.call(f,f.node),f):f}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(a(e))t=[];else if("[object Date]"===i(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===i(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===i(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===i(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===i(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===i(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},o=function(){};o.prototype=n,t=new o}return s(l(e),(function(n){t[n]=e[n]})),t}return e}o.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!u.call(t,o)){t=void 0;break}t=t[o]}return t},o.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!u.call(t,o))return!1;t=t[o]}return!0},o.prototype.set=function(e,t){for(var n=this.value,o=0;o<e.length-1;o++){var r=e[o];u.call(n,r)||(n[r]={}),n=n[r]}return n[e[o]]=t,t},o.prototype.map=function(e){return r(this.value,e,!0)},o.prototype.forEach=function(e){return this.value=r(this.value,e,!1),this.value},o.prototype.reduce=function(e,t){var n=1===arguments.length,o=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(o=e.call(this,o,t))})),o},o.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},o.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},o.prototype.clone=function(){var e=[],t=[];return function n(o){for(var r=0;r<e.length;r++)if(e[r]===o)return t[r];if("object"==typeof o&&null!==o){var i=c(o);return e.push(o),t.push(i),s(l(o),(function(e){i[e]=n(o[e])})),e.pop(),t.pop(),i}return o}(this.value)};var l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function i(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(l(o.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),r=new o(t);return r[e].apply(r,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},29:function(e,t){e.exports=window.wp.notices},295:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},296:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},297:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},298:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},299:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(r.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";var o,r;function c(e){return[e]}function l(){var e={clear:function(){e.head=null}};return e}function i(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}o={},r="undefined"!=typeof WeakMap,t.a=function(e,t){var n,a;function s(){n=r?new WeakMap:l()}function u(){var n,o,r,c,l,s=arguments.length;for(c=new Array(s),r=0;r<s;r++)c[r]=arguments[r];for(l=t.apply(null,c),(n=a(l)).isUniqueByDependants||(n.lastDependants&&!i(l,n.lastDependants,0)&&n.clear(),n.lastDependants=l),o=n.head;o;){if(i(o.args,c,1))return o!==n.head&&(o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n.head,o.prev=null,n.head.prev=o,n.head=o),o.val;o=o.next}return o={val:e.apply(null,c)},c[0]=null,o.args=c,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=c),a=r?function(e){var t,r,c,i,a,s=n,u=!0;for(t=0;t<e.length;t++){if(!(a=r=e[t])||"object"!=typeof a){u=!1;break}s.has(r)?s=s.get(r):(c=new WeakMap,s.set(r,c),s=c)}return s.has(o)||((i=l()).isUniqueByDependants=u,s.set(o,i)),s.get(o)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},300:function(e,t,n){"use strict";function o(){}function r(e,t,n,o,r){for(var c=0,l=t.length,i=0,a=0;c<l;c++){var s=t[c];if(s.removed){if(s.value=e.join(o.slice(a,a+s.count)),a+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&r){var d=n.slice(i,i+s.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(i,i+s.count));i+=s.count,s.added||(a+=s.count)}}var b=t[l-1];return l>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[l-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,o.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.callback;"function"==typeof n&&(o=n,n={}),this.options=n;var l=this;function i(e){return o?(setTimeout((function(){o(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=a+s,b=[{newPos:-1,components:[]}],m=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=a&&m+1>=s)return i([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var o=void 0,d=b[n-1],m=b[n+1],p=(m?m.newPos:0)-n;d&&(b[n-1]=void 0);var f=d&&d.newPos+1<a,g=m&&0<=p&&p<s;if(f||g){if(!f||g&&d.newPos<m.newPos?(o=c(m),l.pushComponent(o.components,void 0,!0)):((o=d).newPos++,l.pushComponent(o.components,!0,void 0)),p=l.extractCommon(o,t,e,n),o.newPos+1>=a&&p+1>=s)return i(r(l,o.components,t,e,l.useLongestToken));b[n]=o}else b[n]=void 0}u++}if(o)!function e(){setTimeout((function(){if(u>d)return o();p()||e()}),0)}();else for(;u<=d;){var f=p();if(f)return f}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,c=n.length,l=e.newPos,i=l-o,a=0;l+1<r&&i+1<c&&this.equals(t[l+1],n[i+1]);)l++,i++,a++;return a&&e.components.push({count:a}),e.newPos=l,i},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},301:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));t.a=c},302:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},303:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));t.a=c},31:function(e,t){e.exports=window.wp.a11y},33:function(e,t){e.exports=window.wp.blob},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){var o;!function(r){var c=/^\s+/,l=/\s+$/,i=0,a=r.round,s=r.min,u=r.max,d=r.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,o,i={r:0,g:0,b:0},a=1,d=null,b=null,m=null,p=!1,f=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(l,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,n=e.g,o=e.b,i={r:255*P(t,255),g:255*P(n,255),b:255*P(o,255)},p=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(d=M(e.s),b=M(e.v),i=function(e,t,n){e=6*P(e,360),t=P(t,100),n=P(n,100);var o=r.floor(e),c=e-o,l=n*(1-t),i=n*(1-c*t),a=n*(1-(1-c)*t),s=o%6;return{r:255*[n,i,l,l,a,n][s],g:255*[a,n,n,i,l,l][s],b:255*[l,l,a,n,n,i][s]}}(e.h,d,b),p=!0,f="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(d=M(e.s),m=M(e.l),i=function(e,t,n){var o,r,c;function l(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=P(e,360),t=P(t,100),n=P(n,100),0===t)o=r=c=n;else{var i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;o=l(a,i,e+1/3),r=l(a,i,e),c=l(a,i,e-1/3)}return{r:255*o,g:255*r,b:255*c}}(e.h,d,m),p=!0,f="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=N(a),{ok:p,format:e.format||f,r:s(255,u(i.r,0)),g:s(255,u(i.g,0)),b:s(255,u(i.b,0)),a:a}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=i++}function m(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var o,r,c=u(e,t,n),l=s(e,t,n),i=(c+l)/2;if(c==l)o=r=0;else{var a=c-l;switch(r=i>.5?a/(2-c-l):a/(c+l),c){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,l:i}}function p(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var o,r,c=u(e,t,n),l=s(e,t,n),i=c,a=c-l;if(r=0===c?0:a/c,c==l)o=0;else{switch(c){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,v:i}}function f(e,t,n,o){var r=[R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16))];return o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function g(e,t,n,o){return[R(D(o)),R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16))].join("")}function h(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=L(n.s),b(n)}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=L(n.s),b(n)}function j(e){return b(e).desaturate(100)}function v(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=L(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-a(-t/100*255))),n.g=u(0,s(255,n.g-a(-t/100*255))),n.b=u(0,s(255,n.b-a(-t/100*255))),b(n)}function _(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=L(n.l),b(n)}function y(e,t){var n=b(e).toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var o=b(e).toHsl(),r=360/n,c=[b(e)];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,c.push(b(o));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),o=n.h,r=n.s,c=n.v,l=[],i=1/t;t--;)l.push(b({h:o,s:r,v:c})),c=(c+i)%1;return l}b.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,o=this.toRgb();return e=o.r/255,t=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=N(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),o=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=m(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=m(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),o=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,o,r){var c=[R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16)),R(D(o))];return r&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*P(this._r,255))+"%",g:a(100*P(this._g,255))+"%",b:a(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*P(this._r,255))+"%, "+a(100*P(this._g,255))+"%, "+a(100*P(this._b,255))+"%)":"rgba("+a(100*P(this._r,255))+"%, "+a(100*P(this._g,255))+"%, "+a(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(T[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var r=b(e);n="#"+g(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0;return t||!o||"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 b(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(v,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(j,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:M(e[o]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var o=b(e).toRgb(),r=b(t).toRgb(),c=n/100;return b({r:(r.r-o.r)*c+o.r,g:(r.g-o.g)*c+o.g,b:(r.b-o.b)*c+o.b,a:(r.a-o.a)*c+o.a})},b.readability=function(e,t){var n=b(e),o=b(t);return(r.max(n.getLuminance(),o.getLuminance())+.05)/(r.min(n.getLuminance(),o.getLuminance())+.05)},b.isReadable=function(e,t,n){var o,r,c,l,i,a=b.readability(e,t);switch(r=!1,(c=n,"AA"!==(l=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==l&&(l="AA"),"small"!==(i=(c.size||"small").toLowerCase())&&"large"!==i&&(i="small"),o={level:l,size:i}).level+o.size){case"AAsmall":case"AAAlarge":r=a>=4.5;break;case"AAlarge":r=a>=3;break;case"AAAsmall":r=a>=7}return r},b.mostReadable=function(e,t,n){var o,r,c,l,i=null,a=0;r=(n=n||{}).includeFallbackColors,c=n.level,l=n.size;for(var s=0;s<t.length;s++)(o=b.readability(e,t[s]))>a&&(a=o,i=b(t[s]));return b.isReadable(e,i,{level:c,size:l})||!r?i:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.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"},T=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function N(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function P(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),r.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function L(e){return s(1,u(0,e))}function A(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function M(e){return e<=1&&(e=100*e+"%"),e}function D(e){return r.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,H,z,G=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),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 U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(o=function(){return b}.call(t,n,t,e))||(e.exports=o)}(Math)},412:function(e,t,n){"use strict";n.r(t),n.d(t,"__experimentalGetBorderClassesAndStyles",(function(){return Jc})),n.d(t,"__experimentalUseBorderProps",(function(){return el})),n.d(t,"__experimentalGetColorClassesAndStyles",(function(){return nl})),n.d(t,"__experimentalUseColorProps",(function(){return ol})),n.d(t,"__experimentalUseCustomSides",(function(){return Nc})),n.d(t,"getColorClassName",(function(){return Ao})),n.d(t,"getColorObjectByAttributeValues",(function(){return Po})),n.d(t,"getColorObjectByColorValue",(function(){return Lo})),n.d(t,"createCustomColorsHOC",(function(){return ll})),n.d(t,"withColors",(function(){return il})),n.d(t,"__experimentalUseColors",(function(){return hl})),n.d(t,"__experimentalGetGradientClass",(function(){return Mo})),n.d(t,"getGradientValueBySlug",(function(){return Do})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Fo})),n.d(t,"getGradientSlugByValue",(function(){return Vo})),n.d(t,"__experimentalUseGradient",(function(){return Ho})),n.d(t,"getFontSize",(function(){return Dr})),n.d(t,"getFontSizeClass",(function(){return Vr})),n.d(t,"getFontSizeObjectByValue",(function(){return Fr})),n.d(t,"FontSizePicker",(function(){return Hr})),n.d(t,"withFontSizes",(function(){return jl})),n.d(t,"AlignmentControl",(function(){return Sl})),n.d(t,"AlignmentToolbar",(function(){return wl})),n.d(t,"Autocomplete",(function(){return Wl})),n.d(t,"BlockAlignmentControl",(function(){return ao})),n.d(t,"BlockAlignmentToolbar",(function(){return so})),n.d(t,"__experimentalBlockFullHeightAligmentControl",(function(){return $l})),n.d(t,"__experimentalBlockAlignmentMatrixControl",(function(){return ql})),n.d(t,"BlockBreadcrumb",(function(){return Ql})),n.d(t,"BlockContextProvider",(function(){return Jl})),n.d(t,"BlockControls",(function(){return Un})),n.d(t,"BlockFormatControls",(function(){return Gn})),n.d(t,"BlockColorsStyleSelector",(function(){return ri})),n.d(t,"BlockEdit",(function(){return ii})),n.d(t,"useBlockEditContext",(function(){return O})),n.d(t,"BlockIcon",(function(){return Hl})),n.d(t,"BlockNavigationDropdown",(function(){return Ku})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return Ru})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return pd})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Gu})),n.d(t,"__experimentalBlockVariationPicker",(function(){return gd})),n.d(t,"__experimentalBlockPatternSetup",(function(){return Ed})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return Sd})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return Ld})),n.d(t,"BlockVerticalAlignmentControl",(function(){return Pd})),n.d(t,"__experimentalBorderStyleControl",(function(){return or})),n.d(t,"ButtonBlockerAppender",(function(){return cs})),n.d(t,"ColorPalette",(function(){return Rd})),n.d(t,"ColorPaletteControl",(function(){return Md})),n.d(t,"ContrastChecker",(function(){return Or})),n.d(t,"__experimentalDuotoneControl",(function(){return zc})),n.d(t,"__experimentalGradientPicker",(function(){return Vd})),n.d(t,"__experimentalGradientPickerControl",(function(){return Hd})),n.d(t,"__experimentalGradientPickerPanel",(function(){return zd})),n.d(t,"__experimentalFontAppearanceControl",(function(){return bc})),n.d(t,"__experimentalFontFamilyControl",(function(){return hc})),n.d(t,"__experimentalColorGradientControl",(function(){return qo})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return gr})),n.d(t,"__experimentalImageSizeControl",(function(){return Ud})),n.d(t,"InnerBlocks",(function(){return tb})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return eb})),n.d(t,"InspectorAdvancedControls",(function(){return jo})),n.d(t,"InspectorControls",(function(){return yo})),n.d(t,"JustifyToolbar",(function(){return sb})),n.d(t,"JustifyContentControl",(function(){return ab})),n.d(t,"__experimentalLinkControl",(function(){return Ib})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return Eb})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return Ob})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return hb})),n.d(t,"LineHeightControl",(function(){return ic})),n.d(t,"MediaReplaceFlow",(function(){return Lb})),n.d(t,"MediaPlaceholder",(function(){return Vb})),n.d(t,"MediaUpload",(function(){return Nb})),n.d(t,"MediaUploadCheck",(function(){return Pb})),n.d(t,"PanelColorSettings",(function(){return ul})),n.d(t,"PlainText",(function(){return Gb})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return Wb})),n.d(t,"RichText",(function(){return md})),n.d(t,"RichTextShortcut",(function(){return Kb})),n.d(t,"RichTextToolbarButton",(function(){return $b})),n.d(t,"__unstableRichTextInputEvent",(function(){return qb})),n.d(t,"ToolSelector",(function(){return Xb})),n.d(t,"__experimentalUnitControl",(function(){return Qb})),n.d(t,"URLInput",(function(){return pb})),n.d(t,"URLInputButton",(function(){return tm})),n.d(t,"URLPopover",(function(){return Db})),n.d(t,"__experimentalImageURLInputUI",(function(){return cm})),n.d(t,"withColorContext",(function(){return Ad})),n.d(t,"__unstableBlockSettingsMenuFirstItem",(function(){return Js})),n.d(t,"__unstableInserterMenuExtension",(function(){return Ka})),n.d(t,"__experimentalPreviewOptions",(function(){return im})),n.d(t,"__experimentalUseResizeCanvas",(function(){return pm})),n.d(t,"BlockInspector",(function(){return km})),n.d(t,"BlockList",(function(){return vu})),n.d(t,"useBlockProps",(function(){return Eu})),n.d(t,"__experimentalLayoutStyle",(function(){return to})),n.d(t,"BlockMover",(function(){return ys})),n.d(t,"BlockPreview",(function(){return ha})),n.d(t,"BlockSelectionClearer",(function(){return hu})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return gu})),n.d(t,"BlockSettingsMenu",(function(){return au})),n.d(t,"BlockSettingsMenuControls",(function(){return ru})),n.d(t,"BlockTitle",(function(){return Xl})),n.d(t,"BlockToolbar",(function(){return su})),n.d(t,"BlockTools",(function(){return _m})),n.d(t,"CopyHandler",(function(){return $s})),n.d(t,"__unstableUseClipboardHandler",(function(){return Ks})),n.d(t,"DefaultBlockAppender",(function(){return rs})),n.d(t,"__unstableEditorStyles",(function(){return Hm})),n.d(t,"Inserter",(function(){return os})),n.d(t,"__experimentalLibrary",(function(){return zm})),n.d(t,"__experimentalSearchForm",(function(){return ua})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Um})),n.d(t,"MultiSelectScrollIntoView",(function(){return Wm})),n.d(t,"NavigableToolbar",(function(){return _s})),n.d(t,"ObserveTyping",(function(){return Ym})),n.d(t,"__unstableUseTypingObserver",(function(){return qm})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return $m})),n.d(t,"PreserveScrollInReorder",(function(){return Xm})),n.d(t,"SkipToSelectedBlock",(function(){return fm})),n.d(t,"Typewriter",(function(){return ep})),n.d(t,"__unstableUseTypewriter",(function(){return Jm})),n.d(t,"Warning",(function(){return Ii})),n.d(t,"WritingFlow",(function(){return sp})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return dp})),n.d(t,"useBlockDisplayInformation",(function(){return Yl})),n.d(t,"__unstableIframe",(function(){return pp})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return gp})),n.d(t,"BlockEditorProvider",(function(){return ma})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return mm})),n.d(t,"useSetting",(function(){return xo})),n.d(t,"transformStyles",(function(){return Fm})),n.d(t,"validateThemeColors",(function(){return hp})),n.d(t,"validateThemeGradients",(function(){return Op})),n.d(t,"__experimentalGetMatchingVariation",(function(){return Cd})),n.d(t,"storeConfig",(function(){return Rn})),n.d(t,"store",(function(){return Mn})),n.d(t,"SETTINGS_DEFAULTS",(function(){return k}));var o={};n.r(o),n.d(o,"getBlockName",(function(){return D})),n.d(o,"isBlockValid",(function(){return F})),n.d(o,"getBlockAttributes",(function(){return V})),n.d(o,"getBlock",(function(){return H})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return z})),n.d(o,"getBlocks",(function(){return G})),n.d(o,"__unstableGetBlockWithBlockTree",(function(){return U})),n.d(o,"__unstableGetBlockTree",(function(){return W})),n.d(o,"__unstableGetClientIdWithClientIdsTree",(function(){return K})),n.d(o,"__unstableGetClientIdsTree",(function(){return $})),n.d(o,"getClientIdsOfDescendants",(function(){return q})),n.d(o,"getClientIdsWithDescendants",(function(){return Y})),n.d(o,"getGlobalBlockCount",(function(){return X})),n.d(o,"getBlocksByClientId",(function(){return Q})),n.d(o,"getBlockCount",(function(){return Z})),n.d(o,"getSelectionStart",(function(){return J})),n.d(o,"getSelectionEnd",(function(){return ee})),n.d(o,"getBlockSelectionStart",(function(){return te})),n.d(o,"getBlockSelectionEnd",(function(){return ne})),n.d(o,"getSelectedBlockCount",(function(){return oe})),n.d(o,"hasSelectedBlock",(function(){return re})),n.d(o,"getSelectedBlockClientId",(function(){return ce})),n.d(o,"getSelectedBlock",(function(){return le})),n.d(o,"getBlockRootClientId",(function(){return ie})),n.d(o,"getBlockParents",(function(){return ae})),n.d(o,"getBlockParentsByBlockName",(function(){return se})),n.d(o,"getBlockHierarchyRootClientId",(function(){return ue})),n.d(o,"getLowestCommonAncestorWithSelectedBlock",(function(){return de})),n.d(o,"getAdjacentBlockClientId",(function(){return be})),n.d(o,"getPreviousBlockClientId",(function(){return me})),n.d(o,"getNextBlockClientId",(function(){return pe})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return fe})),n.d(o,"getSelectedBlockClientIds",(function(){return ge})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return he})),n.d(o,"getMultiSelectedBlocks",(function(){return Oe})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return je})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return ve})),n.d(o,"isFirstMultiSelectedBlock",(function(){return ke})),n.d(o,"isBlockMultiSelected",(function(){return _e})),n.d(o,"isAncestorMultiSelected",(function(){return ye})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return Ee})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return Ce})),n.d(o,"getBlockOrder",(function(){return Se})),n.d(o,"getBlockIndex",(function(){return we})),n.d(o,"isBlockSelected",(function(){return Be})),n.d(o,"hasSelectedInnerBlock",(function(){return Ie})),n.d(o,"isBlockWithinSelection",(function(){return xe})),n.d(o,"hasMultiSelection",(function(){return Te})),n.d(o,"isMultiSelecting",(function(){return Ne})),n.d(o,"isSelectionEnabled",(function(){return Pe})),n.d(o,"getBlockMode",(function(){return Le})),n.d(o,"isTyping",(function(){return Ae})),n.d(o,"isDraggingBlocks",(function(){return Re})),n.d(o,"getDraggedBlockClientIds",(function(){return Me})),n.d(o,"isBlockBeingDragged",(function(){return De})),n.d(o,"isAncestorBeingDragged",(function(){return Fe})),n.d(o,"isCaretWithinFormattedText",(function(){return Ve})),n.d(o,"getBlockInsertionPoint",(function(){return He})),n.d(o,"isBlockInsertionPointVisible",(function(){return ze})),n.d(o,"isValidTemplate",(function(){return Ge})),n.d(o,"getTemplate",(function(){return Ue})),n.d(o,"getTemplateLock",(function(){return We})),n.d(o,"canInsertBlockType",(function(){return qe})),n.d(o,"canInsertBlocks",(function(){return Ye})),n.d(o,"getInserterItems",(function(){return tt})),n.d(o,"getBlockTransformItems",(function(){return nt})),n.d(o,"hasInserterItems",(function(){return ot})),n.d(o,"__experimentalGetAllowedBlocks",(function(){return rt})),n.d(o,"__experimentalGetParsedPattern",(function(){return ct})),n.d(o,"__experimentalGetAllowedPatterns",(function(){return it})),n.d(o,"__experimentalGetPatternsByBlockTypes",(function(){return at})),n.d(o,"__experimentalGetPatternTransformItems",(function(){return st})),n.d(o,"getBlockListSettings",(function(){return ut})),n.d(o,"getSettings",(function(){return dt})),n.d(o,"isLastBlockChangePersistent",(function(){return bt})),n.d(o,"__experimentalGetBlockListSettingsForBlocks",(function(){return mt})),n.d(o,"__experimentalGetParsedReusableBlock",(function(){return pt})),n.d(o,"__experimentalGetReusableBlockTitle",(function(){return ft})),n.d(o,"__unstableIsLastBlockChangeIgnored",(function(){return gt})),n.d(o,"__experimentalGetLastBlockAttributeChanges",(function(){return ht})),n.d(o,"isNavigationMode",(function(){return jt})),n.d(o,"hasBlockMovingClientId",(function(){return vt})),n.d(o,"didAutomaticChange",(function(){return kt})),n.d(o,"isBlockHighlighted",(function(){return _t})),n.d(o,"areInnerBlocksControlled",(function(){return yt})),n.d(o,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Et})),n.d(o,"wasBlockJustInserted",(function(){return Ct}));var r={};n.r(r),n.d(r,"resetBlocks",(function(){return Nt})),n.d(r,"validateBlocksToTemplate",(function(){return Pt})),n.d(r,"resetSelection",(function(){return Lt})),n.d(r,"receiveBlocks",(function(){return At})),n.d(r,"updateBlockAttributes",(function(){return Rt})),n.d(r,"updateBlock",(function(){return Mt})),n.d(r,"selectBlock",(function(){return Dt})),n.d(r,"selectPreviousBlock",(function(){return Ft})),n.d(r,"selectNextBlock",(function(){return Vt})),n.d(r,"startMultiSelect",(function(){return Ht})),n.d(r,"stopMultiSelect",(function(){return zt})),n.d(r,"multiSelect",(function(){return Gt})),n.d(r,"clearSelectedBlock",(function(){return Ut})),n.d(r,"toggleSelection",(function(){return Wt})),n.d(r,"replaceBlocks",(function(){return $t})),n.d(r,"replaceBlock",(function(){return qt})),n.d(r,"moveBlocksDown",(function(){return Xt})),n.d(r,"moveBlocksUp",(function(){return Qt})),n.d(r,"moveBlocksToPosition",(function(){return Zt})),n.d(r,"moveBlockToPosition",(function(){return Jt})),n.d(r,"insertBlock",(function(){return en})),n.d(r,"insertBlocks",(function(){return tn})),n.d(r,"showInsertionPoint",(function(){return nn})),n.d(r,"hideInsertionPoint",(function(){return on})),n.d(r,"setTemplateValidity",(function(){return rn})),n.d(r,"synchronizeTemplate",(function(){return cn})),n.d(r,"mergeBlocks",(function(){return ln})),n.d(r,"removeBlocks",(function(){return an})),n.d(r,"removeBlock",(function(){return sn})),n.d(r,"replaceInnerBlocks",(function(){return un})),n.d(r,"toggleBlockMode",(function(){return dn})),n.d(r,"startTyping",(function(){return bn})),n.d(r,"stopTyping",(function(){return mn})),n.d(r,"startDraggingBlocks",(function(){return pn})),n.d(r,"stopDraggingBlocks",(function(){return fn})),n.d(r,"enterFormattedText",(function(){return gn})),n.d(r,"exitFormattedText",(function(){return hn})),n.d(r,"selectionChange",(function(){return On})),n.d(r,"insertDefaultBlock",(function(){return jn})),n.d(r,"updateBlockListSettings",(function(){return vn})),n.d(r,"updateSettings",(function(){return kn})),n.d(r,"__unstableSaveReusableBlock",(function(){return yn})),n.d(r,"__unstableMarkLastChangeAsPersistent",(function(){return En})),n.d(r,"__unstableMarkNextChangeAsNotPersistent",(function(){return Cn})),n.d(r,"__unstableMarkAutomaticChange",(function(){return Sn})),n.d(r,"__unstableMarkAutomaticChangeFinal",(function(){return wn})),n.d(r,"setNavigationMode",(function(){return Bn})),n.d(r,"setBlockMovingClientId",(function(){return In})),n.d(r,"duplicateBlocks",(function(){return xn})),n.d(r,"insertBeforeBlock",(function(){return Tn})),n.d(r,"insertAfterBlock",(function(){return Nn})),n.d(r,"toggleBlockHighlight",(function(){return Pn})),n.d(r,"flashBlock",(function(){return Ln})),n.d(r,"setHasControlledInnerBlocks",(function(){return An}));var c=n(16),l=n(7),i=n(0),a=n(10),s=n.n(a),u=n(2),d=n(9),b=n(18),m=n(8),p=n(3),f=n(4);const g=Object(i.createContext)({name:"",isSelected:!1,clientId:null}),{Provider:h}=g;function O(){return Object(i.useContext)(g)}var j=n(1);const v={insertUsage:{}},k={alignWide:!1,supportsLayout:!0,colors:[{name:Object(j.__)("Black"),slug:"black",color:"#000000"},{name:Object(j.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(j.__)("White"),slug:"white",color:"#ffffff"},{name:Object(j.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(j.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(j.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(j.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(j.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(j.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(j.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(j.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(j.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(j._x)("Small","font size name"),size:13,slug:"small"},{name:Object(j._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(j._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(j._x)("Large","font size name"),size:36,slug:"large"},{name:Object(j._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:Object(j.__)("Thumbnail")},{slug:"medium",name:Object(j.__)("Medium")},{slug:"large",name:Object(j.__)("Large")},{slug:"full",name:Object(j.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(j.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(j.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(j.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(j.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(j.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(j.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(j.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(j.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(j.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(j.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(j.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(j.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function _(e,t,n){return[...e.slice(0,n),...Object(u.castArray)(t),...e.slice(n)]}function y(e,t,n,o=1){const r=[...e];return r.splice(t,o),_(r,e.slice(t,t+o),n)}function E(e,t=""){const n={[t]:[]};return e.forEach(e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,E(r,o))}),n}function C(e,t=""){return e.reduce((e,n)=>Object.assign(e,{[n.clientId]:t},C(n.innerBlocks,n.clientId)),{})}function S(e,t=u.identity){const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function w(e){return S(e,e=>Object(u.omit)(e,"attributes"))}function B(e){return S(e,e=>e.attributes)}function I(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(u.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,o=t.attributes,Object(u.isEqual)(Object(u.keys)(n),Object(u.keys)(o)));var n,o}const x=e=>e.reduce((e,t)=>(e[t]={},e),{}),T=Object(u.flow)(f.combineReducers,e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=Object(u.mapValues)(t.attributes,(n,r)=>{const{name:c}=t.byClientId[r];return"core/block"===c&&n.ref===e?{...n,ref:o}:n})}return e(t,n)},e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;o.cache=t.cache?t.cache:{};const r=e=>e.reduce((e,n)=>{let o=n;do{e.push(o),o=t.parents[o]}while(o&&!t.controlledInnerBlocks[o]);return e},[]);switch(n.type){case"RESET_BLOCKS":o.cache=Object(u.mapValues)(S(n.blocks),()=>({}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=Object(u.keys)(S(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&e.push(n.rootClientId),o.cache={...o.cache,...x(r(e))};break}case"UPDATE_BLOCK":o.cache={...o.cache,...x(r([n.clientId]))};break;case"UPDATE_BLOCK_ATTRIBUTES":o.cache={...o.cache,...x(r(n.clientIds))};break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=x(r(n.replacedClientIds));o.cache={...Object(u.omit)(o.cache,n.replacedClientIds),...Object(u.omit)(e,n.replacedClientIds),...x(Object(u.keys)(S(n.blocks)))};break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":o.cache={...Object(u.omit)(o.cache,n.removedClientIds),...x(Object(u.difference)(r(n.clientIds),n.clientIds))};break;case"MOVE_BLOCKS_TO_POSITION":{const e=[...n.clientIds];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),o.cache={...o.cache,...x(r(e))};break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[];n.rootClientId&&e.push(n.rootClientId),o.cache={...o.cache,...x(r(e))};break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=Object(u.keys)(Object(u.omitBy)(o.attributes,(e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId));o.cache={...o.cache,...x(r(e))}}}return o},e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order[o[r]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order[o[r]]));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)},e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let c=r;return n.blocks.length&&(c=e(c,{...n,type:"INSERT_BLOCKS",index:0}),c.order={...c.order,...Object(u.reduce)(o,(e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e),{})}),c},e=>(t,n)=>{if(t&&"RESET_BLOCKS"===n.type){const e=function e(t,n="",o={}){return Object(u.reduce)(t[n],(n,r)=>o[r]?n:[...n,r,...e(t,r)],[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(u.pickBy)(t.controlledInnerBlocks));return{...t,byClientId:{...Object(u.omit)(t.byClientId,e),...w(n.blocks)},attributes:{...Object(u.omit)(t.attributes,e),...B(n.blocks)},order:{...Object(u.omit)(t.order,e),...Object(u.omit)(E(n.blocks),o)},parents:{...Object(u.omit)(t.parents,e),...C(n.blocks)},cache:{...Object(u.omit)(t.cache,e),...Object(u.omit)(Object(u.mapValues)(S(n.blocks),()=>({})),o)}}}return e(t,n)},(function(e){let t,n=!1;return(o,r)=>{let c=e(o,r);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===c&&!l){var i;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(i=null==o?void 0:o.isPersistentChange)||void 0===i||i;return o.isPersistentChange===e?o:{...c,isPersistentChange:e}}return c={...c,isPersistentChange:l?!n:!I(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,c}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}))({byClientId(e={},t){switch(t.type){case"RESET_BLOCKS":return w(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=Object(u.omit)(t.updates,"attributes");return Object(u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...Object(u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.omit)(e,t.removedClientIds)}return e},attributes(e={},t){switch(t.type){case"RESET_BLOCKS":return B(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...B(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every(t=>!e[t]))return e;const n=t.clientIds.reduce((n,o)=>({...n,[o]:Object(u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,(t,n,r)=>{var c,l;return n!==t[r]&&((t=(c=e[o])===(l=t)?{...c}:l)[r]=n),t},e[o])}),{});return t.clientIds.every(t=>n[t]===e[t])?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...Object(u.omit)(e,t.replacedClientIds),...B(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.omit)(e,t.removedClientIds)}return e},order(e={},t){switch(t.type){case"RESET_BLOCKS":return E(t.blocks);case"RECEIVE_BLOCKS":return{...e,...Object(u.omit)(E(t.blocks),"")};case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=E(t.blocks,n),{index:c=o.length}=t;return{...e,...r,[n]:_(o,r[n],c)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:c=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:y(e[o],t,c,r.length)}}return{...e,[n]:Object(u.without)(e[n],...r),[o]:_(e[o],r,c)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=Object(u.first)(n),c=e[o];if(!c.length||r===Object(u.first)(c))return e;const l=c.indexOf(r);return{...e,[o]:y(c,l,l-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=Object(u.first)(n),c=Object(u.last)(n),l=e[o];if(!l.length||c===Object(u.last)(l))return e;const i=l.indexOf(r);return{...e,[o]:y(l,i,i+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=E(t.blocks);return Object(u.flow)([e=>Object(u.omit)(e,t.replacedClientIds),e=>({...e,...Object(u.omit)(o,"")}),e=>Object(u.mapValues)(e,e=>Object(u.reduce)(e,(e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e),[]))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.flow)([e=>Object(u.omit)(e,t.removedClientIds),e=>Object(u.mapValues)(e,e=>Object(u.without)(e,...t.removedClientIds))])(e)}return e},parents(e={},t){switch(t.type){case"RESET_BLOCKS":return C(t.blocks);case"RECEIVE_BLOCKS":return{...e,...C(t.blocks)};case"INSERT_BLOCKS":return{...e,...C(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce((e,n)=>(e[n]=t.toRootClientId||"",e),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...Object(u.omit)(e,t.replacedClientIds),...C(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function N(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.indexToSelect||t.blocks.length-1,o=t.blocks[n];return o?o.clientId===e.clientId?e:{clientId:o.clientId}:{}}}return e}var P=Object(f.combineReducers)({blocks:T,isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(e=!1,t){switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(e={},t){var n,o;switch(t.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}};case"RESET_SELECTION":const{selectionStart:r,selectionEnd:c}=t;return{selectionStart:r,selectionEnd:c};case"MULTI_SELECT":const{start:l,end:i}=t;return{selectionStart:{clientId:l},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const a=null==e||null===(n=e.selectionStart)||void 0===n?void 0:n.clientId,s=null==e||null===(o=e.selectionEnd)||void 0===o?void 0:o.clientId;if(!a&&!s)return e;if(!t.blocks.some(e=>e.clientId===a))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(e=>e.clientId===s))return{...e,selectionEnd:e.selectionStart}}return{selectionStart:N(e.selectionStart,t),selectionEnd:N(e.selectionEnd,t)}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e=null,t){return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?Object(u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?Object(u.omit)(e,n):e}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(e=k,t){switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(e=v,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((e,n)=>{const{attributes:o,name:r}=n,c=Object(f.select)(m.store).getActiveBlockVariation(r,o);let l=null!=c&&c.name?`${r}/${c.name}`:r;const i={name:l};return"core/block"===r&&(i.ref=o.ref,l+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:i}}}},e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes}),{})}return null},isNavigationMode:function(e=!1,t){return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(e=null,t){return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){var n;switch(t.type){case"INSERT_BLOCKS":return t.blocks.length?{clientId:t.blocks[0].clientId,source:null===(n=t.meta)||void 0===n?void 0:n.source}:e;case"RESET_BLOCKS":return{}}return e}}),L=n(30),A=n(141);const R=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(i.createElement)(p.G,null,Object(i.createElement)(p.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),M=[];function D(e,t){const n=e.blocks.byClientId[t];if("web"!==i.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){const n=e.blocks.attributes[t],{service:o}=n;return o?"core/social-link-"+o:"core/social-link"}return n?n.name:null}function F(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function V(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}const H=Object(L.a)((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:V(e,t),innerBlocks:yt(e,t)?M:G(e,t)}:null},(e,t)=>[e.blocks.cache[t]]),z=Object(L.a)((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:V(e,t)}:null},(e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]),G=Object(L.a)((e,t)=>Object(u.map)(Se(e,t),t=>H(e,t)),(e,t)=>Object(u.map)(e.blocks.order[t||""],t=>e.blocks.cache[t])),U=Object(L.a)((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:V(e,t),innerBlocks:W(e,t)}:null},e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]),W=Object(L.a)((e,t="")=>Object(u.map)(Se(e,t),t=>U(e,t)),e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]),K=Object(L.a)((e,t)=>({clientId:t,innerBlocks:$(e,t)}),e=>[e.blocks.order]),$=Object(L.a)((e,t="")=>Object(u.map)(Se(e,t),t=>K(e,t)),e=>[e.blocks.order]),q=(e,t)=>Object(u.flatMap)(t,t=>{const n=Se(e,t);return[...n,...q(e,n)]}),Y=Object(L.a)(e=>{const t=Se(e);return[...t,...q(e,t)]},e=>[e.blocks.order]),X=Object(L.a)((e,t)=>{const n=Y(e);return t?Object(u.reduce)(n,(n,o)=>e.blocks.byClientId[o].name===t?n+1:n,0):n.length},e=>[e.blocks.order,e.blocks.byClientId]),Q=Object(L.a)((e,t)=>Object(u.map)(Object(u.castArray)(t),t=>H(e,t)),e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function Z(e,t){return Se(e,t).length}function J(e){return e.selection.selectionStart}function ee(e){return e.selection.selectionEnd}function te(e){return e.selection.selectionStart.clientId}function ne(e){return e.selection.selectionEnd.clientId}function oe(e){return he(e).length||(e.selection.selectionStart.clientId?1:0)}function re(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ce(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function le(e){const t=ce(e);return t?H(e,t):null}function ie(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const ae=Object(L.a)((e,t,n=!1)=>{const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()},e=>[e.blocks.parents]),se=Object(L.a)((e,t,n,o=!1)=>{const r=ae(e,t,o);return Object(u.map)(Object(u.filter)(Object(u.map)(r,t=>({id:t,name:D(e,t)})),({name:e})=>Array.isArray(n)?n.includes(e):e===n),({id:e})=>e)},e=>[e.blocks.parents]);function ue(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function de(e,t){const n=ce(e),o=[...ae(e,t),t],r=[...ae(e,n),n];let c;const l=Math.min(o.length,r.length);for(let e=0;e<l&&o[e]===r[e];e++)c=o[e];return c}function be(e,t,n=1){if(void 0===t&&(t=ce(e)),void 0===t&&(t=n<0?je(e):ve(e)),!t)return null;const o=ie(e,t);if(null===o)return null;const{order:r}=e.blocks,c=r[o],l=c.indexOf(t)+1*n;return l<0||l===c.length?null:c[l]}function me(e,t){return be(e,t,-1)}function pe(e,t){return be(e,t,1)}function fe(e){return e.initialPosition}const ge=Object(L.a)(e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return M;if(t.clientId===n.clientId)return[t.clientId];const o=ie(e,t.clientId);if(null===o)return M;const r=Se(e,o),c=r.indexOf(t.clientId),l=r.indexOf(n.clientId);return c>l?r.slice(l,c+1):r.slice(c,l+1)},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function he(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?M:ge(e)}const Oe=Object(L.a)(e=>{const t=he(e);return t.length?t.map(t=>H(e,t)):M},e=>[...ge.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function je(e){return Object(u.first)(he(e))||null}function ve(e){return Object(u.last)(he(e))||null}function ke(e,t){return je(e)===t}function _e(e,t){return-1!==he(e).indexOf(t)}const ye=Object(L.a)((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=ie(e,n),o=_e(e,n);return o},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function Ee(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Ce(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Se(e,t){return e.blocks.order[t||""]||M}function we(e,t,n){return Se(e,n).indexOf(t)}function Be(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Ie(e,t,n=!1){return Object(u.some)(Se(e,t),t=>Be(e,t)||_e(e,t)||n&&Ie(e,t,n))}function xe(e,t){if(!t)return!1;const n=he(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Te(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Ne(e){return e.isMultiSelecting}function Pe(e){return e.isSelectionEnabled}function Le(e,t){return e.blocksMode[t]||"visual"}function Ae(e){return e.isTyping}function Re(e){return!!e.draggedBlocks.length}function Me(e){return e.draggedBlocks}function De(e,t){return e.draggedBlocks.includes(t)}function Fe(e,t){if(!Re(e))return!1;const n=ae(e,t);return Object(u.some)(n,t=>De(e,t))}function Ve(e){return e.isCaretWithinFormattedText}function He(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:c}=r;return c?(t=ie(e,c)||void 0,n=we(e,r.clientId,t)+1):n=Se(e).length,{rootClientId:t,index:n}}function ze(e){return null!==e.insertionPoint}function Ge(e){return e.template.isValid}function Ue(e){return e.settings.template}function We(e,t){if(!t)return e.settings.templateLock;const n=ut(e,t);return n?n.templateLock:null}const Ke=(e,t,n=null)=>Object(u.isBoolean)(e)?e:Object(u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,$e=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=Object(m.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=dt(e);if(!Ke(r,t,!0))return!1;if(We(e,n))return!1;const c=ut(e,n);if(n&&void 0===c)return!1;const l=null==c?void 0:c.allowedBlocks,i=Ke(l,t),a=o.parent,s=D(e,n),u=Ke(a,s);return null!==i&&null!==u?i||u:null!==i?i:null===u||u},qe=Object(L.a)($e,(e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]);function Ye(e,t,n=null){return t.every(t=>qe(e,D(e,t),n))}function Xe(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const Qe=(e,t,n)=>!!Object(m.hasBlockSupport)(t,"inserter",!0)&&$e(e,t.name,n),Ze=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:c=0}=Xe(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:Je(r,c)}},Je=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},et=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;Object(m.hasBlockSupport)(n.name,"multiple",!0)||(r=Object(u.some)(Q(e,Y(e)),{name:n.name}));const{time:c,count:l=0}=Xe(e,o)||{},i={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:Je(c,l)};if("transform"===t)return i;const a=n.variations.filter(({scope:e})=>!e||e.includes("inserter"));return{...i,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:a,example:n.example,utility:1}},tt=Object(L.a)((e,t=null)=>{const n=et(e,{buildScope:"inserter"}),o=Object(m.getBlockTypes)().filter(n=>Qe(e,n,t)).map(n),r=$e(e,"core/block",t)?Ot(e).map(t=>{const n="core/block/"+t.id,o=pt(e,t.id);let r;1===o.length&&(r=Object(m.getBlockType)(o[0].name));const{time:c,count:l=0}=Xe(e,n)||{},i=Je(c,l);return{id:n,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:r?r.icon:R,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:i}}):[],c=o.filter(({variations:e=[]})=>!e.some(({isDefault:e})=>e)),l=[];for(const t of o){const{variations:n=[]}=t;if(n.length){const o=Ze(e,t);l.push(...n.map(o))}}return[...[...c,...l].sort((e,t)=>{const n=e.name.startsWith("core/"),o=t.name.startsWith("core/");return n&&o?0:n&&!o?-1:1}),...r]},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Ot(e),Object(m.getBlockTypes)()]),nt=Object(L.a)((e,t,n=null)=>{const o=et(e,{buildScope:"transform"}),r=Object(m.getBlockTypes)().filter(t=>Qe(e,t,n)).map(o),c=Object(u.mapKeys)(r,({name:e})=>e),l=Object(m.getPossibleBlockTransformations)(t).reduce((e,t)=>(c[null==t?void 0:t.name]&&e.push(c[t.name]),e),[]);return Object(u.orderBy)(l,e=>c[e.name].frecency,"desc")},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(m.getBlockTypes)()]),ot=Object(L.a)((e,t=null)=>!!Object(u.some)(Object(m.getBlockTypes)(),n=>Qe(e,n,t))||$e(e,"core/block",t)&&Ot(e).length>0,(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Ot(e),Object(m.getBlockTypes)()]),rt=Object(L.a)((e,t=null)=>{if(t)return Object(u.filter)(Object(m.getBlockTypes)(),n=>Qe(e,n,t))},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(m.getBlockTypes)()]),ct=Object(L.a)((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find(({name:e})=>e===t);return n?{...n,blocks:Object(m.parse)(n.content)}:null},e=>[e.settings.__experimentalBlockPatterns]),lt=Object(L.a)(e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=dt(e);return t.map(e=>({...e,blockNodes:Object(A.parse)(e.content)})).filter(({blockNodes:e})=>((e,t)=>{if(Object(u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!Ke(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach(e=>{n.push(e)})}return!0})(e,n))},e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes]),it=Object(L.a)((e,t=null)=>{const n=lt(e);return Object(u.filter)(n,({blockNodes:n})=>n.every(({blockName:n})=>qe(e,n,t)))},(e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]]),at=Object(L.a)((e,t,n=null)=>{if(!t)return M;const o=it(e,n),r=Array.isArray(t)?t:[t];return o.filter(e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,e=>r.includes(e))})},(e,t)=>[...it.getDependants(e,t)]),st=Object(L.a)((e,t,n=null)=>{if(!t)return M;if(t.some(({clientId:t,innerBlocks:n})=>n.length||yt(e,t)))return M;const o=Array.from(new Set(t.map(({name:e})=>e)));return at(e,o,n)},(e,t)=>[...at.getDependants(e,t)]);function ut(e,t){return e.blockListSettings[t]}function dt(e){return e.settings}function bt(e){return e.blocks.isPersistentChange}const mt=Object(L.a)((e,t=[])=>t.reduce((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t,{}),e=>[e.blockListSettings]),pt=Object(L.a)((e,t)=>{const n=Object(u.find)(Ot(e),e=>e.id===t);return n?Object(m.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null},e=>[Ot(e)]),ft=Object(L.a)((e,t)=>{var n;const o=Object(u.find)(Ot(e),e=>e.id===t);return o?null===(n=o.title)||void 0===n?void 0:n.raw:null},e=>[Ot(e)]);function gt(e){return e.blocks.isIgnoredChange}function ht(e){return e.lastBlockAttributesChange}function Ot(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:M}function jt(e){return e.isNavigationMode}function vt(e){return e.hasBlockMovingClientId}function kt(e){return!!e.automaticChangeStatus}function _t(e,t){return e.highlightedBlock===t}function yt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Et=Object(L.a)((e,t)=>{if(!t.length)return null;const n=ce(e);if(t.includes(D(e,n)))return n;const o=he(e),r=se(e,n||o[0],t);return r?Object(u.last)(r):null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function Ct(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var St=n(31),wt=n(25),Bt=n.n(wt),It={SLEEP:({duration:e})=>new Promise(t=>{setTimeout(t,e)}),MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(f.createRegistryControl)(e=>()=>{const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t(()=>e.dispatch(Mn).__unstableMarkAutomaticChangeFinal())})};const xt="core/block-editor";function*Tt(){if(0===(yield f.controls.select(xt,"getBlockCount")))return yield jn()}function*Nt(e){return yield{type:"RESET_BLOCKS",blocks:e},yield*Pt(e)}function*Pt(e){const t=yield f.controls.select(xt,"getTemplate"),n=yield f.controls.select(xt,"getTemplateLock"),o=!t||"all"!==n||Object(m.doBlocksMatchTemplate)(e,t);if(o!==(yield f.controls.select(xt,"isValidTemplate")))return yield rn(o),o}function Lt(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function At(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Rt(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(u.castArray)(e),attributes:t,uniqueByBlock:n}}function Mt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Dt(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function*Ft(e){const t=yield f.controls.select(xt,"getPreviousBlockClientId",e);if(t)return yield Dt(t,-1),[t]}function*Vt(e){const t=yield f.controls.select(xt,"getNextBlockClientId",e);if(t)return yield Dt(t),[t]}function Ht(){return{type:"START_MULTI_SELECT"}}function zt(){return{type:"STOP_MULTI_SELECT"}}function*Gt(e,t){yield{type:"MULTI_SELECT",start:e,end:t};const n=yield f.controls.select(xt,"getSelectedBlockCount");Object(St.speak)(Object(j.sprintf)(
|
2 |
/* translators: %s: number of selected blocks */
|
3 |
Object(j._n)("%s block selected.","%s blocks selected.",n),n),"assertive")}function Ut(){return{type:"CLEAR_SELECTED_BLOCK"}}function Wt(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Kt(e,t){var n,o;const r=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map(e=>{var t;const n=e.name;if(!Object(m.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!r[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:c={}}=e,l=r[n];return{...e,attributes:{...c,className:`${o||""} is-style-${l}`.trim()}}})}function*$t(e,t,n,o=0,r){e=Object(u.castArray)(e),t=Kt(Object(u.castArray)(t),yield f.controls.select(xt,"getSettings"));const c=yield f.controls.select(xt,"getBlockRootClientId",Object(u.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!(yield f.controls.select(xt,"canInsertBlockType",n.name,c)))return}yield{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r},yield*Tt()}function qt(e,t){return $t(e,t)}function Yt(e){return(t,n)=>({clientIds:Object(u.castArray)(t),type:e,rootClientId:n})}const Xt=Yt("MOVE_BLOCKS_DOWN"),Qt=Yt("MOVE_BLOCKS_UP");function*Zt(e,t="",n="",o){const r=yield f.controls.select(xt,"getTemplateLock",t);if("all"===r)return;const c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o};t!==n?"insert"!==r&&(yield f.controls.select(xt,"canInsertBlocks",e,n))&&(yield c):yield c}function*Jt(e,t="",n="",o){yield Zt([e],t,n,o)}function en(e,t,n,o=!0,r){return tn([e],t,n,o,0,r)}function*tn(e,t,n,o=!0,r=0,c){Object(u.isObject)(r)&&(c=r,r=0,Bt()("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),e=Kt(Object(u.castArray)(e),yield f.controls.select(xt,"getSettings"));const l=[];for(const t of e)(yield f.controls.select(xt,"canInsertBlockType",t.name,n))&&l.push(t);if(l.length)return{type:"INSERT_BLOCKS",blocks:l,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:c}}function nn(e,t,n={}){const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function on(){return{type:"HIDE_INSERTION_POINT"}}function rn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function*cn(){yield{type:"SYNCHRONIZE_TEMPLATE"};const e=yield f.controls.select(xt,"getBlocks"),t=yield f.controls.select(xt,"getTemplate"),n=Object(m.synchronizeBlocksWithTemplate)(e,t);return yield Nt(n)}function*ln(e,t){const n=[e,t];yield{type:"MERGE_BLOCKS",blocks:n};const[o,r]=n,l=yield f.controls.select(xt,"getBlock",o),i=Object(m.getBlockType)(l.name);if(!i.merge)return void(yield Dt(l.clientId));const a=yield f.controls.select(xt,"getBlock",r),s=Object(m.getBlockType)(a.name),{clientId:d,attributeKey:b,offset:p}=yield f.controls.select(xt,"getSelectionStart"),g=(d===o?i:s).attributes[b],h=(d===o||d===r)&&void 0!==b&&void 0!==p&&!!g;g||("number"==typeof b?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof b):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const O=Object(m.cloneBlock)(l),j=Object(m.cloneBlock)(a);if(h){const e=d===o?O:j,t=e.attributes[b],{multiline:n,__unstableMultilineWrapperTags:r,__unstablePreserveWhiteSpace:l}=g,i=Object(c.insert)(Object(c.create)({html:t,multilineTag:n,multilineWrapperTags:r,preserveWhiteSpace:l}),"",p,p);e.attributes[b]=Object(c.toHTMLString)({value:i,multilineTag:n,preserveWhiteSpace:l})}const v=l.name===a.name?[j]:Object(m.switchToBlockType)(j,l.name);if(!v||!v.length)return;const k=i.merge(O.attributes,v[0].attributes);if(h){const e=Object(u.findKey)(k,e=>"string"==typeof e&&-1!==e.indexOf("")),t=k[e],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=i.attributes[e],a=Object(c.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),s=a.text.indexOf(""),d=Object(c.remove)(a,s,s+1),b=Object(c.toHTMLString)({value:d,multilineTag:n,preserveWhiteSpace:r});k[e]=b,yield On(l.clientId,e,s,s)}yield*$t([l.clientId,a.clientId],[{...l,attributes:{...l.attributes,...k}},...v.slice(1)])}function*an(e,t=!0){if(!e||!e.length)return;e=Object(u.castArray)(e);const n=yield f.controls.select(xt,"getBlockRootClientId",e[0]);if(yield f.controls.select(xt,"getTemplateLock",n))return;let o;o=t?yield Ft(e[0]):yield f.controls.select(xt,"getPreviousBlockClientId",e[0]),yield{type:"REMOVE_BLOCKS",clientIds:e};const r=yield*Tt();return[o||r]}function sn(e,t){return an([e],t)}function un(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function dn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function bn(){return{type:"START_TYPING"}}function mn(){return{type:"STOP_TYPING"}}function pn(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function fn(){return{type:"STOP_DRAGGING_BLOCKS"}}function gn(){return{type:"ENTER_FORMATTED_TEXT"}}function hn(){return{type:"EXIT_FORMATTED_TEXT"}}function On(e,t,n,o){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}}function jn(e,t,n){const o=Object(m.getDefaultBlockName)();if(o)return en(Object(m.createBlock)(o,e),n,t)}function vn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function kn(e){return{type:"UPDATE_SETTINGS",settings:e}}function yn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function En(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Cn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function*Sn(){yield{type:"MARK_AUTOMATIC_CHANGE"},yield{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"}}function wn(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function*Bn(e=!0){yield{type:"SET_NAVIGATION_MODE",isNavigationMode:e},e?Object(St.speak)(Object(j.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(St.speak)(Object(j.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}function*In(e=null){yield{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e},e&&Object(St.speak)(Object(j.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}function*xn(e,t=!0){if(!e&&!e.length)return;const n=yield f.controls.select(xt,"getBlocksByClientId",e),o=yield f.controls.select(xt,"getBlockRootClientId",e[0]);if(Object(u.some)(n,e=>!e))return;const r=n.map(e=>e.name);if(Object(u.some)(r,e=>!Object(m.hasBlockSupport)(e,"multiple",!0)))return;const c=yield f.controls.select(xt,"getBlockIndex",Object(u.last)(Object(u.castArray)(e)),o),l=n.map(e=>Object(m.__experimentalCloneSanitizedBlock)(e));return yield tn(l,c+1,o,t),l.length>1&&t&&(yield Gt(Object(u.first)(l).clientId,Object(u.last)(l).clientId)),l.map(e=>e.clientId)}function*Tn(e){if(!e)return;const t=yield f.controls.select(xt,"getBlockRootClientId",e);if(yield f.controls.select(xt,"getTemplateLock",t))return;const n=yield f.controls.select(xt,"getBlockIndex",e,t);return yield jn({},t,n)}function*Nn(e){if(!e)return;const t=yield f.controls.select(xt,"getBlockRootClientId",e);if(yield f.controls.select(xt,"getTemplateLock",t))return;const n=yield f.controls.select(xt,"getBlockIndex",e,t);return yield jn({},t,n+1)}function Pn(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function*Ln(e){yield Pn(e,!0),yield{type:"SLEEP",duration:150},yield Pn(e,!1)}function An(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const Rn={reducer:P,selectors:o,actions:r,controls:It},Mn=Object(f.createReduxStore)(xt,{...Rn,persist:["preferences"]});function Dn(){const{isSelected:e,clientId:t,name:n}=O(),o=Object(f.useSelect)(o=>{if(e)return;const{getBlockName:r,isFirstMultiSelectedBlock:c,getMultiSelectedBlockClientIds:l}=o(Mn);return!!c(t)&&l().every(e=>r(e)===n)},[t,e,n]);return e||o}Object(f.registerStore)(xt,{...Rn,persist:["preferences"]});var Fn={default:Object(p.createSlotFill)("BlockControls"),block:Object(p.createSlotFill)("BlockControlsBlock"),inline:Object(p.createSlotFill)("BlockFormatControls"),other:Object(p.createSlotFill)("BlockControlsOther")};function Vn({group:e="default",controls:t,children:n}){if(!Dn())return null;const o=Fn[e].Fill;return Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(o,null,o=>{const r=Object(u.isEmpty)(o)?null:o;return Object(i.createElement)(p.__experimentalToolbarContext.Provider,{value:r},"default"===e&&Object(i.createElement)(p.ToolbarGroup,{controls:t}),n)}))}function Hn({group:e="default",...t}){const n=Object(i.useContext)(p.__experimentalToolbarContext),o=Fn[e].Slot,r=Object(p.__experimentalUseSlot)(o.__unstableName);return Boolean(r.fills&&r.fills.length)?"default"===e?Object(i.createElement)(o,Object(l.a)({},t,{bubblesVirtually:!0,fillProps:n})):Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(o,Object(l.a)({},t,{bubblesVirtually:!0,fillProps:n}))):null}const zn=Vn;zn.Slot=Hn;const Gn=e=>Object(i.createElement)(Vn,Object(l.a)({group:"inline"},e));Gn.Slot=e=>Object(i.createElement)(Hn,Object(l.a)({group:"inline"},e));var Un=zn,Wn=n(6),Kn=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),$n=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),qn=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),Yn=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),Xn=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const Qn={type:"default"},Zn=Object(i.createContext)(Qn);function Jn(e,t){return e.split(",").map(e=>`.editor-styles-wrapper ${e} ${t}`).join(",")}const eo=Zn.Provider;function to({selector:e,layout:t={}}){const{contentSize:n,wideSize:o}=t;let r=n||o?`\n\t\t\t\t${Jn(e,"> *")} {\n\t\t\t\t\tmax-width: ${null!=n?n:o};\n\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t}\n\n\t\t\t\t${Jn(e,'> [data-align="wide"]')} {\n\t\t\t\t\tmax-width: ${null!=o?o:n};\n\t\t\t\t}\n\n\t\t\t\t${Jn(e,'> [data-align="full"]')} {\n\t\t\t\t\tmax-width: none;\n\t\t\t\t}\n\t\t\t`:"";return r+=`\n\t\t${Jn(e,'> [data-align="left"]')} {\n\t\t\tfloat: left;\n\t\t\tmargin-right: 2em;\n\t\t}\n\n\t\t${Jn(e,'> [data-align="right"]')} {\n\t\t\tfloat: right;\n\t\t\tmargin-left: 2em;\n\t\t}\n\t`,Object(i.createElement)("style",null,r)}const no=["left","center","right","wide","full"],oo=["wide","full"];function ro(e=no){const{wideControlsEnabled:t=!1}=Object(f.useSelect)(e=>{const{getSettings:t}=e(Mn);return{wideControlsEnabled:t().alignWide}},[]),n=Object(i.useContext)(Zn);if("default"!==n.type)return[];const{alignments:o=no}=n;return e.filter(e=>(n.alignments||t||!oo.includes(e))&&o.includes(e))}const co={left:{icon:Kn,title:Object(j.__)("Align left")},center:{icon:$n,title:Object(j.__)("Align center")},right:{icon:qn,title:Object(j.__)("Align right")},wide:{icon:Yn,title:Object(j.__)("Wide width")},full:{icon:Xn,title:Object(j.__)("Full width")}},lo={isAlternate:!0};var io=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const c=ro(n);if(0===c.length)return null;const a=co[e],s=co.center,u=o?p.ToolbarGroup:p.ToolbarDropdownMenu,d=o?{isCollapsed:r}:{};return Object(i.createElement)(u,Object(l.a)({popoverProps:lo,icon:a?a.icon:s.icon,label:Object(j.__)("Align"),toggleProps:{describedBy:Object(j.__)("Change alignment")},controls:c.map(n=>{return{...co[n],isActive:e===n,role:r?"menuitemradio":void 0,onClick:(o=n,()=>t(e===o?void 0:o))};var o})},d))};function ao(e){return Object(i.createElement)(io,Object(l.a)({},e,{isToolbar:!1}))}function so(e){return Object(i.createElement)(io,Object(l.a)({},e,{isToolbar:!0}))}const uo=["left","center","right","wide","full"],bo=["wide","full"];function mo(e,t=!0,n=!0){let o;return o=Array.isArray(e)?uo.filter(t=>e.includes(t)):!0===e?uo:[],!n||!0===e&&!t?Object(u.without)(o,...bo):o}const po=Object(d.createHigherOrderComponent)(e=>t=>{const{name:n}=t,o=ro(mo(Object(m.getBlockSupport)(n,"align"),Object(m.hasBlockSupport)(n,"alignWide",!0)));return[o.length>0&&t.isSelected&&Object(i.createElement)(Un,{key:"align-controls",group:"block"},Object(i.createElement)(ao,{value:t.attributes.align,onChange:e=>{var n,o;e||(null===(n=Object(m.getBlockType)(t.name).attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="");t.setAttributes({align:e})},controls:o})),Object(i.createElement)(e,Object(l.a)({key:"edit"},t))]},"withToolbarControls"),fo=Object(d.createHigherOrderComponent)(e=>t=>{const{name:n,attributes:o}=t,{align:r}=o,c=ro(mo(Object(m.getBlockSupport)(n,"align"),Object(m.hasBlockSupport)(n,"alignWide",!0)));if(void 0===r)return Object(i.createElement)(e,t);let a=t.wrapperProps;return c.includes(r)&&(a={...a,"data-align":r}),Object(i.createElement)(e,Object(l.a)({},t,{wrapperProps:a}))});Object(b.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(u.has)(e.attributes,["align","type"])||Object(m.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...uo,""]}}),e})),Object(b.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",fo),Object(b.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",po),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return mo(Object(m.getBlockSupport)(t,"align"),Object(m.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=s()("align"+o,e.className)),e}));const{Fill:go,Slot:ho}=Object(p.createSlotFill)("InspectorAdvancedControls");function Oo({children:e}){const{isSelected:t}=O();return t?Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(go,null,e)):null}Oo.slotName="InspectorAdvancedControls",Oo.Slot=ho;var jo=Oo;const{Fill:vo,Slot:ko}=Object(p.createSlotFill)("InspectorControls");function _o({children:e}){return Dn()?Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(vo,null,e)):null}_o.Slot=ko;var yo=_o;const Eo=/[\s#]/g,Co=Object(d.createHigherOrderComponent)(e=>t=>{if(Object(m.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===i.Platform.OS,o=Object(i.createElement)(p.TextControl,{className:"html-anchor-control",label:Object(j.__)("HTML anchor"),help:Object(i.createElement)(i.Fragment,null,Object(j.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(i.createElement)(p.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(j.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:Object(j.__)("Add an anchor"),onChange:e=>{e=e.replace(Eo,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(e,t),n&&Object(i.createElement)(jo,null,o),!n&&"core/heading"===t.name&&Object(i.createElement)(yo,null,Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Heading settings")},o)))}return Object(i.createElement)(e,t)},"withInspectorControl");Object(b.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(u.has)(e.attributes,["anchor","type"])||Object(m.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),Object(b.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Co),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(m.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const So=Object(d.createHigherOrderComponent)(e=>t=>Object(m.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(i.createElement)(i.Fragment,null,Object(i.createElement)(e,t),Object(i.createElement)(jo,null,Object(i.createElement)(p.TextControl,{autoComplete:"off",label:Object(j.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:Object(j.__)("Separate multiple classes with spaces.")}))):Object(i.createElement)(e,t),"withInspectorControl");function wo(e){e=`<div data-custom-class-name>${e}</div>`;const t=Object(m.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(b.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(m.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),Object(b.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",So),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(m.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=s()(e.className,n.className)),e})),Object(b.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(m.hasBlockSupport)(t,"customClassName",!0)){const o=Object(u.omit)(e,["className"]),r=Object(m.getSaveContent)(t,o),c=wo(r),l=wo(n),i=Object(u.difference)(l,c);i.length?e.className=i.join(" "):r&&delete e.className}return e})),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(m.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(u.uniq)([Object(m.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=Object(m.getBlockDefaultClassName)(t.name)),e}));const Bo={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.customLineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":e=>e.enableCustomSpacing},Io=(e,t)=>{if("color.palette"!==e&&"color.gradients"!==e)return t;if(!Array.isArray(t))return t;const n=t.filter(e=>"core"!==(null==e?void 0:e.origin));return n.length>0?n:t};function xo(e){const{name:t}=O();return Object(f.useSelect)(n=>{var o;const r=n(Mn).getSettings(),c="__experimentalFeatures."+e,l=`__experimentalFeatures.blocks.${t}.${e}`,i=null!==(o=Object(u.get)(r,l))&&void 0!==o?o:Object(u.get)(r,c);if(void 0!==i)return Io(e,i);const a=Bo[e]?Bo[e](r):void 0;return void 0!==a?Io(e,a):"typography.dropCap"===e||void 0},[t,e])}var To=n(40),No=n.n(To);const Po=(e,t,n)=>{if(t){const n=Object(u.find)(e,{slug:t});if(n)return n}return{color:n}},Lo=(e,t)=>Object(u.find)(e,{color:t});function Ao(e,t){if(e&&t)return`has-${Object(u.kebabCase)(t)}-${e}`}const Ro=[];function Mo(e){if(e)return`has-${e}-gradient-background`}function Do(e,t){const n=Object(u.find)(e,["slug",t]);return n&&n.gradient}function Fo(e,t){return Object(u.find)(e,["gradient",t])}function Vo(e,t){const n=Fo(e,t);return n&&n.slug}function Ho({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=O(),o=xo("color.gradients")||Ro,{gradient:r,customGradient:c}=Object(f.useSelect)(o=>{const{getBlockAttributes:r}=o(Mn),c=r(n)||{};return{customGradient:c[t],gradient:c[e]}},[n,e,t]),{updateBlockAttributes:l}=Object(f.useDispatch)(Mn),a=Object(i.useCallback)(r=>{const c=Vo(o,r);l(n,c?{[e]:c,[t]:void 0}:{[e]:void 0,[t]:r})},[o,n,l]),s=Mo(r);let u;return u=r?Do(o,r):c,{gradientClass:s,gradientValue:u,setGradient:a}}
|
4 |
// translators: first %s: the color name or value (e.g. red or #ff0000)
|
@@ -25,57 +25,57 @@ Object(j.__)("Block %1$s is at the beginning of the content and can’t be moved
|
|
25 |
Object(j.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(a,b&&b.title,k,O,v,"up"===t?-1:1,_)))}),Ei=Object(i.forwardRef)((e,t)=>Object(i.createElement)(yi,Object(l.a)({direction:"up",ref:t},e))),Ci=Object(i.forwardRef)((e,t)=>Object(i.createElement)(yi,Object(l.a)({direction:"down",ref:t},e))),Si=Object(i.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),wi=()=>Object(i.useContext)(Si);var Bi=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),Ii=function({className:e,actions:t,children:n,secondaryActions:o}){return Object(i.createElement)("div",{className:s()(e,"block-editor-warning")},Object(i.createElement)("div",{className:"block-editor-warning__contents"},Object(i.createElement)("p",{className:"block-editor-warning__message"},n),(i.Children.count(t)>0||o)&&Object(i.createElement)("div",{className:"block-editor-warning__actions"},i.Children.count(t)>0&&i.Children.map(t,(e,t)=>Object(i.createElement)("span",{key:t,className:"block-editor-warning__action"},e)),o&&Object(i.createElement)(p.DropdownMenu,{className:"block-editor-warning__secondary",icon:Bi,label:Object(j.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},()=>Object(i.createElement)(p.MenuGroup,null,o.map((e,t)=>Object(i.createElement)(p.MenuItem,{onClick:e.onClick,key:t},e.title)))))))},xi=n(268),Ti=({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:c})=>Object(i.createElement)("div",{className:c},Object(i.createElement)("div",{className:"block-editor-block-compare__content"},Object(i.createElement)("h2",{className:"block-editor-block-compare__heading"},e),Object(i.createElement)("div",{className:"block-editor-block-compare__html"},t),Object(i.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},n)),Object(i.createElement)("div",{className:"block-editor-block-compare__action"},Object(i.createElement)(p.Button,{isSecondary:!0,tabIndex:"0",onClick:o},r))),Ni=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const c={rawContent:e.originalContent,renderedContent:Object(m.getSaveElement)(e.name,e.attributes)},l=function(e){const t=Object(u.castArray)(e),n=t.map(e=>Object(m.getSaveContent)(e.name,e.attributes,e.innerBlocks)),o=t.map(e=>Object(m.getSaveElement)(e.name,e.attributes,e.innerBlocks));return{rawContent:n.join(""),renderedContent:o}}(o(e)),a=(d=c.rawContent,b=l.rawContent,Object(xi.diffChars)(d,b).map((e,t)=>{const n=s()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(i.createElement)("span",{key:t,className:n},e.value)}));var d,b;return Object(i.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(i.createElement)(Ti,{title:Object(j.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:Object(j.__)("Convert to HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(i.createElement)(Ti,{title:Object(j.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:a,renderedContent:l.renderedContent}))};const Pi=e=>Object(m.rawHandler)({HTML:e.originalContent});var Li=Object(d.compose)([Object(f.withSelect)((e,{clientId:t})=>({block:e(Mn).getBlock(t)})),Object(f.withDispatch)((e,{block:t})=>{const{replaceBlock:n}=e(Mn);return{convertToClassic(){n(t.clientId,(e=>Object(m.createBlock)("core/freeform",{content:e.originalContent}))(t))},convertToHTML(){n(t.clientId,(e=>Object(m.createBlock)("core/html",{content:e.originalContent}))(t))},convertToBlocks(){n(t.clientId,Pi(t))},attemptBlockRecovery(){n(t.clientId,(({name:e,attributes:t,innerBlocks:n})=>Object(m.createBlock)(e,t,n))(t))}}})])((function({convertToHTML:e,convertToBlocks:t,convertToClassic:n,attemptBlockRecovery:o,block:r}){const c=!!Object(m.getBlockType)("core/html"),[l,a]=Object(i.useState)(!1),s=Object(i.useCallback)(()=>a(!0),[]),u=Object(i.useCallback)(()=>a(!1),[]),d=Object(i.useMemo)(()=>[{
|
26 |
// translators: Button to fix block content
|
27 |
title:Object(j._x)("Resolve","imperative verb"),onClick:s},c&&{title:Object(j.__)("Convert to HTML"),onClick:e},{title:Object(j.__)("Convert to Classic Block"),onClick:n}].filter(Boolean),[s,e,n]);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ii,{actions:[Object(i.createElement)(p.Button,{key:"recover",onClick:o,isPrimary:!0},Object(j.__)("Attempt Block Recovery"))],secondaryActions:d},Object(j.__)("This block contains unexpected or invalid content.")),l&&Object(i.createElement)(p.Modal,{title:// translators: Dialog title to fix block content
|
28 |
-
Object(j.__)("Resolve Block"),onRequestClose:u,className:"block-editor-block-compare"},Object(i.createElement)(Ni,{block:r,onKeep:e,onConvert:t,convertor:Pi,convertButtonText:Object(j.__)("Convert to Blocks")})))}));const Ai=Object(i.createElement)(Ii,{className:"block-editor-block-list__block-crash-warning"},Object(j.__)("This block has encountered an error and cannot be previewed."));var Ri=()=>Ai;class Mi extends i.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var Di=Mi,Fi=n(97),Vi=n.n(Fi),Hi=function({clientId:e}){const[t,n]=Object(i.useState)(""),o=Object(f.useSelect)(t=>t(Mn).getBlock(e),[e]),{updateBlock:r}=Object(f.useDispatch)(Mn);return Object(i.useEffect)(()=>{n(Object(m.getBlockContent)(o))},[o]),Object(i.createElement)(Vi.a,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const c=Object(m.getBlockType)(o.name),l=Object(m.getBlockAttributes)(c,t,o.attributes),i=t||Object(m.getSaveContent)(c,l),a=!t||Object(m.isValidBlockContent)(c,l,i);r(e,{attributes:l,originalContent:i,isValid:a}),t||n({content:i})},onChange:e=>n(e.target.value)})};function zi(e,t){return t.closest(".wp-block")===e}function Gi(e){const t=Object(i.useRef)(),n=function(e){return Object(f.useSelect)(t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:o,isNavigationMode:r,isBlockSelected:c}=t(Mn);if(c(e)&&!o()&&!r())return n()},[e])}(e);return Object(i.useEffect)(()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const o=di.focus.tabbable.find(t.current).filter(e=>Object(di.isTextField)(e)),r=-1===n,c=(r?u.last:u.first)(o)||t.current;zi(t.current,c)&&!c.closest(".block-list-appender")?Object(di.placeCaretAtHorizontalEdge)(c,r):t.current.focus()},[n]),t}function Ui(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function Wi(){const e=Object(f.useSelect)(e=>{const{isNavigationMode:t,getSettings:n}=e(Mn);return t()||n().outlineMode},[]);return Object(d.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",Ui),t.addEventListener("mouseover",Ui),()=>{t.removeEventListener("mouseout",Ui),t.removeEventListener("mouseover",Ui),t.classList.remove("is-hovered")}},[e])}function Ki(e){return Object(f.useSelect)(t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:r,isBlockMultiSelected:c,getBlockName:l,getSettings:i,hasSelectedInnerBlock:a,__experimentalGetActiveBlockIdByBlockNames:u}=t(Mn),{__experimentalSpotlightEntityBlocks:d}=i(),b=n(e),p=r(e),f=l(e),g=a(e,!0),h=u(d);return s()({"is-selected":p,"is-highlighted":o(e),"is-multi-selected":c(e),"is-reusable":Object(m.isReusableBlock)(Object(m.getBlockType)(f)),"is-dragging":b,"has-child-selected":g,"has-active-entity":h,"is-active-entity":h===e})},[e])}function $i(e){return Object(f.useSelect)(t=>{const n=t(Mn).getBlockName(e),o=Object(m.getBlockType)(n);if(o.apiVersion>1||Object(m.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(m.getBlockDefaultClassName)(n)},[e])}function qi(e){return Object(f.useSelect)(t=>{const{getBlockName:n,getBlockAttributes:o}=t(Mn),{className:r}=o(e);if(!r)return;const c=Object(m.getBlockType)(n(e));return c.apiVersion>1||Object(m.hasBlockSupport)(c,"lightBlockWrapper",!1)?r:void 0},[e])}function Yi(e){return Object(f.useSelect)(t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:c,isBlockSelected:l}=t(Mn);if(!l(e))return;const i=n();return i?s()("is-block-moving-mode",{"can-insert-moving-block":o(r(i),c(e))}):void 0},[e])}function Xi(e){const{isBlockSelected:t}=Object(f.useSelect)(Mn),{selectBlock:n,selectionChange:o}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(r=>{function c(c){t(e)?c.target.isContentEditable||o(e):zi(r,c.target)&&n(e)}return r.addEventListener("focusin",c),()=>{r.removeEventListener("focusin",c)}},[t,n])}function Qi(e){const t=Object(f.useSelect)(t=>t(Mn).isBlockSelected(e),[e]),{getBlockRootClientId:n,getBlockIndex:o}=Object(f.useSelect)(Mn),{insertDefaultBlock:r,removeBlock:c}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(l=>{if(t)return l.addEventListener("keydown",i),l.addEventListener("dragstart",a),()=>{l.removeEventListener("keydown",i),l.removeEventListener("dragstart",a)};function i(t){const{keyCode:i,target:a}=t;i!==lc.ENTER&&i!==lc.BACKSPACE&&i!==lc.DELETE||a!==l||Object(di.isTextField)(a)||(t.preventDefault(),i===lc.ENTER?r({},n(e),o(e)+1):c(e))}function a(e){e.preventDefault()}},[e,t,n,o,r,c])}function Zi(e){const{isNavigationMode:t,isBlockSelected:n}=Object(f.useSelect)(Mn),{setNavigationMode:o,selectBlock:r}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(c=>{function l(c){t()&&!c.defaultPrevented&&(c.preventDefault(),n(e)?o(!1):r(e))}return c.addEventListener("mousedown",l),()=>{c.addEventListener("mousedown",l)}},[e,t,n,o])}var Ji=n(121),ea=n.n(Ji);function ta(e){const t=Object(i.useRef)(),n=Object(f.useSelect)(t=>{const{isBlockSelected:n,getBlockSelectionEnd:o}=t(Mn);return n(e)||o()===e},[e]);return Object(i.useEffect)(()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const o=Object(di.getScrollContainer)(e)||e.ownerDocument.defaultView;o&&ea()(e,o,{onlyScrollIfNeeded:!0})},[n]),t}function na(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach(e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")})}function oa(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:o,selectBlock:r}=Object(f.useDispatch)(Mn),{isSelectionEnabled:c,isBlockSelected:l,getBlockParents:i,getBlockSelectionStart:a,hasMultiSelection:s}=Object(f.useSelect)(Mn);return Object(d.useRefEffect)(u=>{const{ownerDocument:d}=u,{defaultView:b}=d;let m,p;function f({isSelectionEnd:t}){const n=b.getSelection();if(!n.rangeCount||n.isCollapsed)return void na(u,!0);const c=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(".wp-block");return t?t.id.slice("block-".length):void 0}(n.focusNode);if(e===c){if(r(e),t&&(na(u,!0),n.rangeCount)){const{commonAncestorContainer:e}=n.getRangeAt(0);m.contains(e)&&m.focus()}}else{const t=[...i(e),e],n=[...i(c),c],r=Math.min(t.length,n.length)-1;o(t[r],n[r])}}function g(){d.removeEventListener("selectionchange",f),b.removeEventListener("mouseup",g),p=b.requestAnimationFrame(()=>{f({isSelectionEnd:!0}),n()})}function h({buttons:n}){1===n&&c()&&l(e)&&(m=d.activeElement,t(),d.addEventListener("selectionchange",f),b.addEventListener("mouseup",g),na(u,!1))}function O(t){if(c()&&0===t.button)if(t.shiftKey){const n=a();n!==e&&(na(u,!1),o(n,e),t.preventDefault())}else s()&&r(e)}return u.addEventListener("mousedown",O),u.addEventListener("mouseleave",h),()=>{u.removeEventListener("mousedown",O),u.removeEventListener("mouseleave",h),d.removeEventListener("selectionchange",f),b.removeEventListener("mouseup",g),b.cancelAnimationFrame(p)}},[e,t,n,o,r,c,l,i])}var ra=n(45),ca=n(132);const la=[Object(i.createInterpolateElement)(Object(j.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(i.createElement)("kbd",null)}),Object(i.createInterpolateElement)(Object(j.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(i.createElement)("kbd",null)}),Object(i.createInterpolateElement)(Object(j.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(i.createElement)("kbd",null)}),Object(j.__)("Drag files into the editor to automatically insert media blocks."),Object(j.__)("Change a block's type by pressing the block icon on the toolbar.")];var ia=function(){const[e]=Object(i.useState)(Math.floor(Math.random()*la.length));return Object(i.createElement)(p.Tip,null,la[e])},aa=n(100),sa=n(219),ua=function e({className:t,onChange:n,value:o,label:r,placeholder:c}){const l=Object(d.useInstanceId)(e),a=Object(i.useRef)();return Object(i.createElement)("div",{className:s()("block-editor-inserter__search",t)},Object(i.createElement)(p.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-"+l},r||c),Object(i.createElement)("input",{ref:a,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-"+l,type:"search",placeholder:c,onChange:e=>n(e.target.value),autoComplete:"off",value:o||""}),Object(i.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(i.createElement)(p.Button,{icon:aa.a,label:Object(j.__)("Reset search"),onClick:()=>{n(""),a.current.focus()}}),!o&&Object(i.createElement)(qc.a,{icon:sa.a})))},da=function({title:e,icon:t,description:n,blockType:o}){return o&&(Bt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o)),Object(i.createElement)("div",{className:"block-editor-block-card"},Object(i.createElement)(Hl,{icon:t,showColors:!0}),Object(i.createElement)("div",{className:"block-editor-block-card__content"},Object(i.createElement)("h2",{className:"block-editor-block-card__title"},e),Object(i.createElement)("span",{className:"block-editor-block-card__description"},n)))};function ba({clientId:e=null,value:t,selection:n,onChange:o=u.noop,onInput:r=u.noop}){const c=Object(f.useRegistry)(),{resetBlocks:l,resetSelection:a,replaceInnerBlocks:s,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:b}=c.dispatch(Mn),{getBlockName:p,getBlocks:g}=c.select(Mn),h=Object(i.useRef)({incoming:null,outgoing:[]}),O=Object(i.useRef)(!1),j=Object(i.useRef)(r),v=Object(i.useRef)(o);Object(i.useEffect)(()=>{j.current=r,v.current=o},[r,o]),Object(i.useEffect)(()=>{h.current.outgoing.includes(t)?Object(u.last)(h.current.outgoing)===t&&(h.current.outgoing=[]):g(e)!==t&&(h.current.outgoing=[],(()=>{if(t)if(b(),e){d(e,!0),b();const n=t.map(e=>Object(m.cloneBlock)(e));O.current&&(h.current.incoming=n),s(e,n)}else O.current&&(h.current.incoming=t),l(t)})(),n&&a(n.selectionStart,n.selectionEnd,n.initialPosition))},[t,e]),Object(i.useEffect)(()=>{const{getSelectionStart:t,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l}=c.select(Mn);let i=g(e),a=r(),s=!1;O.current=!0;const u=c.subscribe(()=>{if(null!==e&&null===p(e))return;const c=r(),u=g(e),d=u!==i;if(i=u,d&&(h.current.incoming||l()))return h.current.incoming=null,void(a=c);(d||s&&!d&&c&&!a)&&(a=c,h.current.outgoing.push(i),(a?v.current:j.current)(i,{selection:{selectionStart:t(),selectionEnd:n(),initialPosition:o()}})),s=d});return()=>u()},[c,e])}var ma=Object(d.createHigherOrderComponent)(e=>Object(f.withRegistry)(({useSubRegistry:t=!0,registry:n,...o})=>{if(!t)return Object(i.createElement)(e,Object(l.a)({registry:n},o));const[r,c]=Object(i.useState)(null);return Object(i.useEffect)(()=>{const e=Object(f.createRegistry)({},n);e.registerStore(xt,Rn),c(e)},[n]),r?Object(i.createElement)(f.RegistryProvider,{value:r},Object(i.createElement)(e,Object(l.a)({registry:r},o))):null}),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=Object(f.useDispatch)(Mn);return Object(i.useEffect)(()=>{o(n)},[n]),ba(e),Object(i.createElement)(vr,null,t)}));function pa({onClick:e}){return Object(i.createElement)("div",{tabIndex:0,role:"button",onClick:e,onKeyPress:e},Object(i.createElement)(p.Disabled,null,Object(i.createElement)(vu,null)))}let fa;var ga=function({viewportWidth:e,__experimentalPadding:t}){const[n,{width:o}]=Object(d.useResizeObserver)(),[r,{height:c}]=Object(d.useResizeObserver)();fa=fa||Object(d.pure)(vu);const l=(o-2*t)/e;return Object(i.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:c*l+2*t}},n,Object(i.createElement)(p.Disabled,{style:{transform:`scale(${l})`,width:e,left:t,right:t,top:t},className:"block-editor-block-preview__content"},r,Object(i.createElement)(fa,null)))},ha=Object(i.memo)((function({blocks:e,__experimentalPadding:t=0,viewportWidth:n=1200,__experimentalLive:o=!1,__experimentalOnClick:r}){const c=Object(f.useSelect)(e=>e(Mn).getSettings(),[]),l=Object(i.useMemo)(()=>{const e={...c};return e.__experimentalBlockPatterns=[],e},[c]),a=Object(i.useMemo)(()=>Object(u.castArray)(e),[e]);return e&&0!==e.length?Object(i.createElement)(ma,{value:a,settings:l},o?Object(i.createElement)(pa,{onClick:r}):Object(i.createElement)(ga,{viewportWidth:n,__experimentalPadding:t})):null})),Oa=function({item:e}){var t,n;const{name:o,title:r,icon:c,description:l,initialAttributes:a}=e,s=Object(m.getBlockType)(o),u=Object(m.isReusableBlock)(e);return Object(i.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(i.createElement)("div",{className:"block-editor-inserter__preview"},u||s.example?Object(i.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(i.createElement)(ha,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=s.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:s.example?Object(m.getBlockFromExample)(e.name,{attributes:{...s.example.attributes,...a},innerBlocks:s.example.innerBlocks}):Object(m.createBlock)(o,a)})):Object(i.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(j.__)("No Preview Available."))),!u&&Object(i.createElement)(da,{title:r,icon:c,description:l}))},ja=Object(i.createContext)(),va=Object(i.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){const c=Object(i.useContext)(ja);return Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({ref:r,state:c,role:"option",focusable:!0},o),o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?Object(i.createElement)(t,r,n):"function"==typeof n?n(r):Object(i.createElement)(p.Button,r,n)})})),ka=Object(i.createElement)(Wn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(i.createElement)(Wn.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function _a({count:e,icon:t}){return Object(i.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(i.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(i.createElement)(p.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(i.createElement)(p.FlexItem,null,t?Object(i.createElement)(Hl,{icon:t}):Object(j.sprintf)(
|
29 |
/* translators: %d: Number of blocks. */
|
30 |
-
Object(j._n)("%d block","%d blocks",e),e)),Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(Hl,{icon:
|
31 |
/* translators: %s: block pattern title. */
|
32 |
-
Object(j.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})},[])]};function
|
33 |
-
Object(j._n)("%d block added.","%d blocks added.",Object(u.castArray)(e).length),Object(u.castArray)(e).length);Object(St.speak)(p),r&&r()},[o,l,d,b,a,s,r,c]),O=Object(i.useCallback)(e=>{e?p(a,s):g()},[p,g,a,s]);return[a,h,O]},
|
34 |
/* translators: %d: number of results. */
|
35 |
-
Object(j._n)("%d result found.","%d results found.",t),t);g(n)},[e,g]);const B=Object(d.useAsyncList)(w),I=!Object(u.isEmpty)(S)||!Object(u.isEmpty)(w);return Object(i.createElement)(
|
36 |
/* translators: Blocks tab title in the block inserter. */
|
37 |
-
title:Object(j.__)("Blocks")},
|
38 |
/* translators: Patterns tab title in the block inserter. */
|
39 |
-
title:Object(j.__)("Patterns")},
|
40 |
/* translators: Reusable blocks tab title in the block inserter. */
|
41 |
-
title:Object(j.__)("Reusable")};var
|
42 |
-
Object(j._x)("Add %s","directly add the only allowed block"),o):Object(j._x)("Add block","Generic label for block inserter button");const{onClick:s,...u}=c;return Object(i.createElement)(p.Button,Object(l.a)({icon:
|
43 |
-
Object(j.__)("%s block added"),i.title);Object(St.speak)(u)}})),Object(d.ifCondition)(({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o)])(
|
44 |
-
Object(j._x)("Add %s","directly add the only allowed block"),a):Object(j._x)("Add block","Generic label for block inserter button");const b=!u;let m=Object(i.createElement)(p.Button,{ref:r,onFocus:n,tabIndex:o,className:s()(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":b?"true":void 0,"aria-expanded":b?l:void 0,disabled:c,label:d},!u&&Object(i.createElement)(p.VisuallyHidden,{as:"span"},d),Object(i.createElement)(qc.a,{icon:ca.a}));return(b||u)&&(m=Object(i.createElement)(p.Tooltip,{text:d},m)),m},isAppender:!0})}));function ls(e){e.stopPropagation()}Object(i.createContext)();var is=Object(f.withSelect)((e,{rootClientId:t})=>{const{getBlockOrder:n,canInsertBlockType:o,getTemplateLock:r,getSelectedBlockClientId:c}=e(Mn);return{isLocked:!!r(t),blockClientIds:n(t),canInsertDefaultBlock:o(Object(m.getDefaultBlockName)(),t),selectedBlockClientId:c()}})((function({blockClientIds:e,rootClientId:t,canInsertDefaultBlock:n,isLocked:o,renderAppender:r,className:c,selectedBlockClientId:l,tagName:a="div"}){if(o||!1===r)return null;let d;if(r)d=Object(i.createElement)(r,null);else{const o=!t,r=l===t,c=l&&!e.includes(l);if(!o&&!r&&(!l||c))return null;d=n?Object(i.createElement)(rs,{rootClientId:t,lastBlockClientId:Object(u.last)(e)}):Object(i.createElement)(cs,{rootClientId:t,className:"block-list-appender__toggle"})}return Object(i.createElement)(a,{tabIndex:-1,onFocus:ls,className:s()("block-list-appender","wp-block",c)},d)}));function as(e,t){const n=Object(f.useSelect)(e=>e(Mn).getSettings().mediaUpload,[]),{canInsertBlockType:o,getBlockIndex:r,getClientIdsOfDescendants:c}=Object(f.useSelect)(Mn),{insertBlocks:l,moveBlocksToPosition:i,updateBlockAttributes:a,clearSelectedBlock:s}=Object(f.useDispatch)(Mn),u=function(e,t,n,o,r,c,l){return i=>{const{srcRootClientId:a,srcClientIds:s,type:u,blocks:d}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(i);if("inserter"===u&&(l(),c(d,t,e,!0,null)),"block"===u){const c=n(s[0],a);if(a===e&&c===t)return;if(s.includes(e)||o(s).some(t=>t===e))return;const l=a===e,i=s.length;r(s,a,e,l&&c<t?t-i:t)}}}(e,t,r,c,i,l,s),d=function(e,t,n,o,r,c){return l=>{if(!n)return;const i=Object(m.findTransform)(Object(m.getBlockTransforms)("from"),t=>"files"===t.type&&r(t.blockName,e)&&t.isMatch(l));if(i){const n=i.transform(l,o);c(n,t,e)}}}(e,t,n,a,o,l),b=function(e,t,n){return o=>{const r=Object(m.pasteHandler)({HTML:o,mode:"BLOCKS"});r.length&&n(r,t,e)}}(e,t,l);return e=>{const t=Object(di.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?d(t):n?b(n):u(e)}}function ss(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach(n=>{const c=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:c}=e,l=o?r:c,i=o?c:r,a=o?t.left:t.top,s=o?t.right:t.bottom,u=t[n];let d;return d=l>=a&&l<=s?l:l<s?a:s,Math.sqrt((l-d)**2+(i-u)**2)}(e,t,n);(void 0===o||c<o)&&(o=c,r=n)}),[o,r]}function us({rootClientId:e=""}={}){const[t,n]=Object(i.useState)(null),{isLockedAll:o,orientation:r}=Object(f.useSelect)(t=>{var n;const{getBlockListSettings:o,getTemplateLock:r}=t(Mn);return{isLockedAll:"all"===r(e),orientation:null===(n=o(e))||void 0===n?void 0:n.orientation}},[e]),{showInsertionPoint:c,hideInsertionPoint:l}=Object(f.useDispatch)(Mn),a=as(e,t),s=Object(d.useThrottle)(Object(i.useCallback)((t,o)=>{const l=function(e,t,n){const o="horizontal"===n?["left","right"]:["top","bottom"];let r,c;return e.forEach((n,l)=>{if(!n.classList.contains("wp-block"))return;const i=n.getBoundingClientRect(),[a,s]=ss(t,i,o);if(void 0===c||a<c){const t="bottom"===s||"right"===s;let n=t?1:0;n+=t&&e[l+1]&&e[l+1].classList.contains("is-dragging")?1:0,c=a,r=l+n}}),r}(Array.from(o.children),{x:t.clientX,y:t.clientY},r);n(void 0===l?0:l),null!==l&&c(e,l)},[]),200);return Object(d.__experimentalUseDropZone)({isDisabled:o,onDrop:a,onDragOver(e){s(e,e.currentTarget)},onDragEnd(){s.cancel(),l(),n(null)}})}function ds(e){return Object(d.useRefEffect)(t=>{if(e)return t.addEventListener("wheel",n),()=>{t.removeEventListener("wheel",n)};function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}},[e])}const bs=Object(i.createContext)();function ms({__unstablePopoverSlot:e,__unstableContentRef:t}){const{selectBlock:n}=Object(f.useDispatch)(Mn),o=Object(i.useContext)(bs),r=Object(i.useRef)(),{orientation:c,isHidden:l,previousClientId:a,nextClientId:u,rootClientId:d,isInserterShown:b}=Object(f.useSelect)(e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getMultiSelectedBlockClientIds:r,getSelectedBlockClientId:c,hasMultiSelection:l,getSettings:i,getBlockInsertionPoint:a}=e(Mn),s=a(),u=n(s.rootClientId)[s.index-1],d=s.rootClientId,b=n(d);if(!b.length)return{};const m=u||b[b.length-1],p=m===b[b.length-1]?null:b[b.indexOf(m)+1],{hasReducedUI:f}=i(),g=r(),h=c(),O=(null===(t=o(d))||void 0===t?void 0:t.orientation)||"vertical";return{previousClientId:m,nextClientId:p,isHidden:f||(l()?p&&g.includes(p):p&&"vertical"===O&&p===h),orientation:O,clientId:u,rootClientId:d,isInserterShown:null==s?void 0:s.__unstableWithInserter}},[]),m=yr(a),g=yr(u),h=Object(i.useMemo)(()=>{if(!m)return{};const e=m.getBoundingClientRect(),t=g?g.getBoundingClientRect():null;if("vertical"===c)return{width:m.offsetWidth,height:t?t.top-e.bottom:0};let n=0;return g&&(n=Object(j.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:m.offsetHeight}},[m,g]),O=Object(i.useCallback)(()=>{const{ownerDocument:e}=m,t=m.getBoundingClientRect(),n=g?g.getBoundingClientRect():null;return"vertical"===c?Object(j.isRTL)()?{top:t.bottom,left:t.right,right:t.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t.bottom,left:t.left,right:t.right,bottom:n?n.top:t.bottom,ownerDocument:e}:Object(j.isRTL)()?{top:t.top,left:n?n.right:t.left,right:t.left,bottom:t.bottom,ownerDocument:e}:{top:t.top,left:t.right,right:n?n.left:t.right,bottom:t.bottom,ownerDocument:e}},[m,g]),v=ds(t);if(!m)return null;const k=s()("block-editor-block-list__insertion-point","is-"+c),_=!l&&g&&b,y=_||!l;return Object(i.createElement)(p.Popover,{ref:v,noArrow:!0,animate:!1,getAnchorRect:O,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:e||null},Object(i.createElement)("div",{ref:r,tabIndex:-1,onClick:function(e){e.target===r.current&&u&&n(u,-1)},onFocus:function(e){e.target!==r.current&&(o.current=!0)},className:s()(k,{"is-with-inserter":_}),style:h},y&&Object(i.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),_&&Object(i.createElement)("div",{className:s()("block-editor-block-list__insertion-point-inserter")},Object(i.createElement)(os,{position:"bottom center",clientId:u,rootClientId:d,__experimentalIsQuick:!0,onToggle:e=>{o.current=e},onSelectOrClose:()=>{o.current=!1}}))))}function ps({children:e,__unstablePopoverSlot:t,__unstableContentRef:n}){const o=Object(f.useSelect)(e=>{const{isMultiSelecting:t,isBlockInsertionPointVisible:n}=e(Mn);return n()&&!t()},[]);return Object(i.createElement)(bs.Provider,{value:Object(i.useRef)(!1)},o&&Object(i.createElement)(ms,{__unstablePopoverSlot:t,__unstableContentRef:n}),e)}function fs(){const e=Object(i.useContext)(bs),{getBlockListSettings:t,getBlockRootClientId:n,getBlockIndex:o,isBlockInsertionPointVisible:r,isMultiSelecting:c}=Object(f.useSelect)(Mn),{showInsertionPoint:l,hideInsertionPoint:a}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(n=>{function i(n){var i;if(e.current)return;if(c())return;if(!n.target.classList.contains("block-editor-block-list__layout"))return void(r()&&a());let s;n.target.classList.contains("is-root-container")||(s=(n.target.getAttribute("data-block")?n.target:n.target.closest("[data-block]")).getAttribute("data-block"));const u=(null===(i=t(s))||void 0===i?void 0:i.orientation)||"vertical",d=n.target.getBoundingClientRect(),b=n.clientY-d.top,m=n.clientX-d.left;let p=Array.from(n.target.children).find(e=>e.classList.contains("wp-block")&&"vertical"===u&&e.offsetTop>b||e.classList.contains("wp-block")&&"horizontal"===u&&e.offsetLeft>m);if(!p)return;if(!p.id&&(p=p.firstElementChild,!p))return;const f=p.id.slice("block-".length);if(!f)return;const g=p.getBoundingClientRect();if("horizontal"===u&&(n.clientY>g.bottom||n.clientY<g.top)||"vertical"===u&&(n.clientX>g.right||n.clientX<g.left))return void(r()&&a());const h=o(f,s);0!==h?l(s,h,{__unstableWithInserter:!0}):r()&&a()}return n.addEventListener("mousemove",i),()=>{n.removeEventListener("mousemove",i)}},[e,t,n,o,r,c,l,a])}const gs="undefined"==typeof window?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback||window.requestAnimationFrame,hs="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;var Os=n(24),js=({children:e,clientIds:t,cloneClassname:n,onDragStart:o,onDragEnd:r,elementId:c})=>{const{srcRootClientId:l,isDraggable:a,icon:s}=Object(f.useSelect)(e=>{var n;const{getBlockRootClientId:o,getTemplateLock:r,getBlockName:c}=e(Mn),l=o(t[0]),i=l?r(l):null,a=c(t[0]);return{srcRootClientId:l,isDraggable:"all"!==i,icon:null===(n=Object(m.getBlockType)(a))||void 0===n?void 0:n.icon}},[t]),u=Object(i.useRef)(!1),[d,b,g]=function(){const e=Object(i.useRef)(null),t=Object(i.useRef)(null),n=Object(i.useRef)(null),o=Object(i.useRef)(null);return Object(i.useEffect)(()=>()=>{o.current&&(clearInterval(o.current),o.current=null)},[]),[Object(i.useCallback)(r=>{e.current=r.clientY,n.current=Object(di.getScrollContainer)(r.target),o.current=setInterval(()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}},25)},[]),Object(i.useCallback)(o=>{if(!n.current)return;const r=n.current.offsetHeight,c=e.current-n.current.offsetTop,l=o.clientY-n.current.offsetTop;if(o.clientY>c){const e=Math.max(r-c-50,0),n=Math.max(l-c-50,0)/e;t.current=25*n}else if(o.clientY<c){const e=Math.max(c-50,0),n=Math.max(c-l-50,0)/e;t.current=-25*n}else t.current=0},[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:O}=Object(f.useDispatch)(Mn);if(Object(i.useEffect)(()=>()=>{u.current&&O()},[]),!a)return e({isDraggable:!1});const j={type:"block",srcClientIds:t,srcRootClientId:l};return Object(i.createElement)(p.Draggable,{cloneClassname:n,elementId:c,__experimentalTransferDataType:"wp-blocks",transferData:j,onDragStart:e=>{h(t),u.current=!0,d(e),o&&o()},onDragOver:b,onDragEnd:()=>{O(),u.current=!1,g(),r&&r()},__experimentalDragComponent:Object(i.createElement)(_a,{count:t.length,icon:s})},({onDraggableStart:t,onDraggableEnd:n})=>e({draggable:!0,onDragStart:t,onDragEnd:n}))},vs=function({clientId:e,rootClientId:t,blockElement:n}){const o=Yl(e),r=Object(f.useSelect)(n=>{var o;const{__unstableGetBlockWithoutInnerBlocks:r,getBlockIndex:c,hasBlockMovingClientId:l,getBlockListSettings:i}=n(Mn),a=c(e,t),{name:s,attributes:u}=r(e);return{index:a,name:s,attributes:u,blockMovingMode:l(),orientation:null===(o=i(t))||void 0===o?void 0:o.orientation}},[e,t]),{index:c,name:a,attributes:u,blockMovingMode:d,orientation:b}=r,{setNavigationMode:g,removeBlock:h}=Object(f.useDispatch)(Mn),O=Object(i.useRef)();Object(i.useEffect)(()=>{O.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(St.speak)(P)},[]);const{hasBlockMovingClientId:v,getBlockIndex:k,getBlockRootClientId:_,getClientIdsOfDescendants:y,getSelectedBlockClientId:E,getMultiSelectedBlocksEndClientId:C,getPreviousBlockClientId:S,getNextBlockClientId:w}=Object(f.useSelect)(Mn),{selectBlock:B,clearSelectedBlock:I,setBlockMovingClientId:x,moveBlockToPosition:T}=Object(f.useDispatch)(Mn),N=Object(m.getBlockType)(a),P=Object(m.__experimentalGetAccessibleBlockLabel)(N,u,c+1,b),L=s()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!d}),A=Object(j.__)("Drag");return Object(i.createElement)("div",{className:L},Object(i.createElement)(p.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(Hl,{icon:null==o?void 0:o.icon,showColors:!0})),Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(js,{clientIds:[e]},e=>Object(i.createElement)(p.Button,Object(l.a)({icon:ka,className:"block-selection-button_drag-handle","aria-hidden":"true",label:A,tabIndex:"-1"},e)))),Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(p.Button,{ref:O,onClick:()=>g(!1),onKeyDown:function(t){const{keyCode:o}=t,r=o===lc.UP,c=o===lc.DOWN,l=o===lc.LEFT,i=o===lc.RIGHT,a=o===lc.TAB,s=o===lc.ESCAPE,u=o===lc.ENTER,d=o===lc.SPACE,b=t.shiftKey;if(o===lc.BACKSPACE||o===lc.DELETE)return h(e),void t.preventDefault();const m=E(),p=C(),f=S(p||m),g=w(p||m),O=a&&b||r,j=a&&!b||c,N=l,P=i;let L;if(O)L=f;else if(j)L=g;else if(N){var A;L=null!==(A=_(m))&&void 0!==A?A:m}else if(P){var R;L=null!==(R=y([m])[0])&&void 0!==R?R:m}const M=v();if(s&&M&&x(null),(u||d)&&M){const e=_(M),t=_(m),n=k(M,e);let o=k(m,t);n<o&&e===t&&(o-=1),T(M,e,t,o),B(M),x(null)}if(j||O||N||P)if(L)t.preventDefault(),B(L);else if(a&&m){let e;j?(e=di.focus.tabbable.findNext(n),e||(e=n.ownerDocument.defaultView.frameElement,e=di.focus.tabbable.findNext(e))):e=di.focus.tabbable.findPrevious(n),e&&(t.preventDefault(),e.focus(),I())}},label:P,className:"block-selection-button_select-button"},Object(i.createElement)(Xl,{clientId:e})))))};function ks(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var _s=function({children:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,...r}){const c=Object(i.useRef)(),a=function(e){const[t,n]=Object(i.useState)(!0),o=Object(i.useCallback)(()=>{const t=!di.focus.tabbable.find(e.current).some(e=>!("toolbarItem"in e.dataset));t||Bt()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)},[]);return Object(i.useLayoutEffect)(()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()},[t]),t}(c);return function(e,t,n,o,r){const[c]=Object(i.useState)(t),[l]=Object(i.useState)(o),a=Object(i.useCallback)(()=>{!function(e){const[t]=di.focus.tabbable.find(e);t&&t.focus()}(e.current)},[]);Object(Os.useShortcut)("core/block-editor/focus-toolbar",a,{bindGlobal:!0,eventName:"keydown"}),Object(i.useEffect)(()=>{c&&a()},[n,c,a]),Object(i.useEffect)(()=>{let t=0;return l&&!c&&(t=window.requestAnimationFrame(()=>{const t=ks(e.current),n=l||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus()})),()=>{if(window.cancelAnimationFrame(t),!r)return;const n=ks(e.current).findIndex(e=>0===e.tabIndex);r(n)}},[l,c])}(c,t,a,n,o),a?Object(i.createElement)(p.Toolbar,Object(l.a)({label:r["aria-label"],ref:c},r),e):Object(i.createElement)(p.NavigableMenu,Object(l.a)({orientation:"horizontal",role:"toolbar",ref:c},r),e)},ys=Object(f.withSelect)((e,{clientIds:t})=>{var n;const{getBlock:o,getBlockIndex:r,getBlockListSettings:c,getTemplateLock:l,getBlockOrder:i,getBlockRootClientId:a}=e(Mn),s=Object(u.castArray)(t),d=Object(u.first)(s),b=o(d),p=a(Object(u.first)(s)),f=r(d,p),g=0===f,h=r(Object(u.last)(s),p)===i(p).length-1;return{blockType:b?Object(m.getBlockType)(b.name):null,isLocked:"all"===l(p),rootClientId:p,firstIndex:f,isFirst:g,isLast:h,orientation:null===(n=c(p))||void 0===n?void 0:n.orientation}})((function({isFirst:e,isLast:t,clientIds:n,isLocked:o,isHidden:r,rootClientId:c,orientation:a,hideDragHandle:u}){const[d,b]=Object(i.useState)(!1),m=()=>b(!0),f=()=>b(!1);if(o||e&&t&&!c)return null;const g=Object(j.__)("Drag");return Object(i.createElement)("div",{className:s()("block-editor-block-mover",{"is-visible":d||!r,"is-horizontal":"horizontal"===a})},!u&&Object(i.createElement)(js,{clientIds:n,cloneClassname:"block-editor-block-mover__drag-clone"},e=>Object(i.createElement)(p.Button,Object(l.a)({icon:ka,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:g,tabIndex:"-1"},e))),Object(i.createElement)(p.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(i.createElement)(p.ToolbarItem,{onFocus:m,onBlur:f},e=>Object(i.createElement)(Ei,Object(l.a)({clientIds:n},e))),Object(i.createElement)(p.ToolbarItem,{onFocus:m,onBlur:f},e=>Object(i.createElement)(Ci,Object(l.a)({clientIds:n},e)))))}));const{clearTimeout:Es,setTimeout:Cs}=window;function Ss({ref:e,isFocused:t,debounceTimeout:n=200,onChange:o=u.noop}){const[r,c]=Object(i.useState)(!1),l=Object(i.useRef)(),a=t=>{null!=e&&e.current&&c(t),o(t)},s=()=>{const e=l.current;e&&Es&&Es(e)};return Object(i.useEffect)(()=>()=>s(),[]),{showMovers:r,debouncedShowMovers:e=>{e&&e.stopPropagation(),s(),r||a(!0)},debouncedHideMovers:o=>{o&&o.stopPropagation(),s(),l.current=Cs(()=>{(()=>{const n=(null==e?void 0:e.current)&&e.current.matches(":hover");return!t&&!n})()&&a(!1)},n)}}}function ws({ref:e,debounceTimeout:t=200,onChange:n=u.noop}){const[o,r]=Object(i.useState)(!1),{showMovers:c,debouncedShowMovers:l,debouncedHideMovers:a}=Ss({ref:e,debounceTimeout:t,isFocused:o,onChange:n}),s=Object(i.useRef)(!1),d=()=>(null==e?void 0:e.current)&&e.current.contains(e.current.ownerDocument.activeElement);return Object(i.useEffect)(()=>{const t=e.current,n=()=>{d()&&(r(!0),l())},o=()=>{d()||(r(!1),a())};return t&&!s.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),s.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}},[e,s,r,l,a]),{showMovers:c,gestures:{onMouseMove:l,onMouseLeave:a}}}function Bs(){const{selectBlock:e,toggleBlockHighlight:t}=Object(f.useDispatch)(Mn),{firstParentClientId:n,shouldHide:o,hasReducedUI:r}=Object(f.useSelect)(e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:r}=e(Mn),{hasBlockSupport:c}=e(m.store),l=n(o()),i=l[l.length-1],a=t(i),s=Object(m.getBlockType)(a),u=r();return{firstParentClientId:i,shouldHide:!c(s,"__experimentalParentSelector",!0),hasReducedUI:u.hasReducedUI}},[]),c=Yl(n),a=Object(i.useRef)(),{gestures:s}=ws({ref:a,onChange(e){e&&r||t(n,e)}});return o||void 0===n?null:Object(i.createElement)("div",Object(l.a)({className:"block-editor-block-parent-selector",key:n,ref:a},s),Object(i.createElement)(p.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:Object(j.sprintf)(
|
45 |
/* translators: %s: Name of the block's parent. */
|
46 |
-
Object(j.__)("Select %s"),c.title),showTooltip:!0,icon:Object(i.createElement)(Hl,{icon:c.icon})}))}var
|
47 |
/* translators: %s: block title. */
|
48 |
Object(j.__)("%s: Change block type or style"),a):Object(j.sprintf)(
|
49 |
/* translators: %d: number of blocks. */
|
50 |
-
Object(j._n)("Change type of %d block","Change type of %d blocks",t.length),t.length),k=c||g||h;return Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(p.ToolbarItem,null,o=>Object(i.createElement)(p.DropdownMenu,{className:"block-editor-block-switcher",label:O,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Hl,{icon:l,className:"block-editor-block-switcher__toggle",showColors:!0}),(d||b)&&Object(i.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},Object(i.createElement)(Xl,{clientId:e}))),toggleProps:{describedBy:v,...o},menuProps:{orientation:"both"}},({onClose:o})=>k&&Object(i.createElement)("div",{className:"block-editor-block-switcher__container"},h&&Object(i.createElement)(
|
51 |
Object(j.__)('Copied "%s" to clipboard.'),l):Object(j.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
|
52 |
Object(j.__)('Moved "%s" to clipboard.'),l)}else c="copy"===o?Object(j.sprintf)(// Translators: %d: Number of blocks being copied.
|
53 |
Object(j._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):Object(j.sprintf)(// Translators: %d: Number of blocks being cut.
|
54 |
-
Object(j._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(c,{type:"snackbar"})},[])}function Ks(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o}=Object(f.useSelect)(Mn),{flashBlock:r,removeBlocks:c,replaceBlocks:l}=Object(f.useDispatch)(Mn),i=Ws();return Object(d.useRefEffect)(a=>{function s(s){const u=t();if(0!==u.length){if(!n()){const{target:e}=s,{ownerDocument:t}=e;if("copy"===s.type||"cut"===s.type?Object(di.documentHasUncollapsedSelection)(t):Object(di.documentHasSelection)(t))return}if(a.contains(s.target.ownerDocument.activeElement)){if(s.preventDefault(),"copy"===s.type||"cut"===s.type){1===u.length&&r(u[0]),i(s.type,u);const t=e(u),n=Object(m.serialize)(t);s.clipboardData.setData("text/plain",n),s.clipboardData.setData("text/html",n)}if("cut"===s.type)c(u);else if("paste"===s.type){const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(t){try{n=e.getData("Text")}catch(e){return}}const o=Object(di.getFilesFromDataTransfer)(e).filter(({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e));return o.length&&!n&&(n=o.map(e=>`<img src="${Object(Us.createBlobURL)(e)}">`).join(""),t=""),{html:n,plainText:t}}(s),r=Object(m.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});l(u,r,r.length-1,-1)}}}}return a.ownerDocument.addEventListener("copy",s),a.ownerDocument.addEventListener("cut",s),a.ownerDocument.addEventListener("paste",s),()=>{a.ownerDocument.removeEventListener("copy",s),a.ownerDocument.removeEventListener("cut",s),a.ownerDocument.removeEventListener("paste",s)}},[])}var $s=function({children:e}){return Object(i.createElement)("div",{ref:Ks()},e)};function qs({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:c,getTemplateLock:l}=Object(f.useSelect)(e=>e(Mn),[]),{getDefaultBlockName:i,getGroupingBlockName:a}=Object(f.useSelect)(e=>e(m.store),[]),s=c(e),d=r(e[0]),b=Object(u.every)(s,e=>!!e&&Object(m.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,d)),p=o(i(),d),{removeBlocks:g,replaceBlocks:h,duplicateBlocks:O,insertAfterBlock:j,insertBeforeBlock:v,flashBlock:k,setBlockMovingClientId:_,setNavigationMode:y,selectBlock:E}=Object(f.useDispatch)(Mn),C=Ws();return t({canDuplicate:b,canInsertDefaultBlock:p,isLocked:!!l(d),rootClientId:d,blocks:s,onDuplicate:()=>O(e,n),onRemove:()=>g(e,n),onInsertBefore(){v(Object(u.first)(Object(u.castArray)(e)))},onInsertAfter(){j(Object(u.last)(Object(u.castArray)(e)))},onMoveTo(){y(!0),E(e[0]),_(e[0])},onGroup(){if(!s.length)return;const t=a(),n=Object(m.switchToBlockType)(s,t);n&&h(e,n)},onUngroup(){if(!s.length)return;const t=s[0].innerBlocks;t.length&&h(e,t)},onCopy(){const e=s.map(({clientId:e})=>e);1===s.length&&k(e[0]),C("copy",e)}})}var Ys=Object(d.compose)([Object(f.withSelect)((e,{clientId:t})=>{const{getBlock:n,getBlockMode:o,getSettings:r}=e(Mn),c=n(t),l=r().codeEditingEnabled;return{mode:o(t),blockType:c?Object(m.getBlockType)(c.name):null,isCodeEditingEnabled:l}}),Object(f.withDispatch)((e,{onToggle:t=u.noop,clientId:n})=>({onToggleMode(){e(Mn).toggleBlockMode(n),t()}}))])((function({blockType:e,mode:t,onToggleMode:n,small:o=!1,isCodeEditingEnabled:r=!0}){if(!Object(m.hasBlockSupport)(e,"html",!0)||!r)return null;const c="visual"===t?Object(j.__)("Edit as HTML"):Object(j.__)("Edit visually");return Object(i.createElement)(p.MenuItem,{onClick:n},!o&&c)})),Xs=Object(d.compose)(Object(f.withSelect)((e,{clientId:t})=>{const n=e(Mn).getBlock(t);return{block:n,shouldRender:n&&"core/html"===n.name}}),Object(f.withDispatch)((e,{block:t})=>({onClick:()=>e(Mn).replaceBlocks(t.clientId,Object(m.rawHandler)({HTML:Object(m.getBlockContent)(t)}))})))((function({shouldRender:e,onClick:t,small:n}){if(!e)return null;const o=Object(j.__)("Convert to Blocks");return Object(i.createElement)(p.MenuItem,{onClick:t},!n&&o)}));const{Fill:Qs,Slot:Zs}=Object(p.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Qs.Slot=Zs;var Js=Qs;function eu({clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r,onClose:c=(()=>{})}){const{replaceBlocks:l}=Object(f.useDispatch)(Mn);return t||n?Object(i.createElement)(i.Fragment,null,t&&Object(i.createElement)(p.MenuItem,{onClick:()=>{(()=>{const t=Object(m.switchToBlockType)(o,r);t&&l(e,t)})(),c()}},Object(j._x)("Group","verb")),n&&Object(i.createElement)(p.MenuItem,{onClick:()=>{(()=>{const t=o[0].innerBlocks;t.length&&l(e,t)})(),c()}},Object(j._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:tu,Slot:nu}=Object(p.createSlotFill)("BlockSettingsMenuControls");function ou({...e}){return Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(tu,e))}ou.Slot=({fillProps:e,clientIds:t=null})=>{const n=Object(f.useSelect)(e=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o}=e(Mn),r=null!==t?t:o();return Object(u.map)(Object(u.compact)(n(r)),e=>e.name)},[t]),o=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}=Object(f.useSelect)(e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:r,getSelectedBlockClientIds:c}=e(Mn),{getGroupingBlockName:l}=e(m.store),i=c(),a=l(),s=r(a,null!=i&&i.length?n(i[0]):void 0),u=o(i),d=1===u.length&&(null===(t=u[0])||void 0===t?void 0:t.name)===a;return{clientIds:i,isGroupable:s&&u.length&&!d,isUngroupable:d&&!!u[0].innerBlocks.length,blocksSelection:u,groupingBlockName:a}},[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}}(),{isGroupable:r,isUngroupable:c}=o,a=r||c;return Object(i.createElement)(nu,{fillProps:{...e,selectedBlocks:n}},t=>{if((null==t?void 0:t.length)>0||a)return Object(i.createElement)(p.MenuGroup,null,t,Object(i.createElement)(eu,Object(l.a)({},o,{onClose:null==e?void 0:e.onClose})))})};var ru=ou;const cu={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function lu({blocks:e,onCopy:t}){const n=Object(d.useCopyToClipboard)(()=>Object(m.serialize)(e),t);return Object(i.createElement)(p.MenuItem,{ref:n},Object(j.__)("Copy"))}var iu=function({clientIds:e,__experimentalSelectBlock:t,children:n,...o}){const r=Object(u.castArray)(e),c=r.length,a=r[0],s=Object(f.useSelect)(e=>{const{getShortcutRepresentation:t}=e(Os.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}},[]),d=Object(i.useCallback)(t?async e=>{const n=await e;n&&n[0]&&t(n[0])}:u.noop,[t]),b=1===c?Object(j.__)("Remove block"):Object(j.__)("Remove blocks");return Object(i.createElement)(qs,{clientIds:e,__experimentalUpdateSelection:!t},({canDuplicate:t,canInsertDefaultBlock:r,isLocked:m,onDuplicate:f,onInsertAfter:g,onInsertBefore:h,onRemove:O,onCopy:v,onMoveTo:k,blocks:_})=>Object(i.createElement)(p.DropdownMenu,Object(l.a)({icon:si.a,label:Object(j.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:cu,noIcons:!0},o),({onClose:o})=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(Js.Slot,{fillProps:{onClose:o}}),1===c&&Object(i.createElement)(Xs,{clientId:a}),Object(i.createElement)(lu,{blocks:_,onCopy:v}),t&&Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,f,d),shortcut:s.duplicate},Object(j.__)("Duplicate")),r&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,h),shortcut:s.insertBefore},Object(j.__)("Insert before")),Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,g),shortcut:s.insertAfter},Object(j.__)("Insert after"))),!m&&Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,k)},Object(j.__)("Move to")),1===c&&Object(i.createElement)(Ys,{clientId:a,onToggle:o})),Object(i.createElement)(ru.Slot,{fillProps:{onClose:o},clientIds:e}),"function"==typeof n?n({onClose:o}):i.Children.map(e=>Object(i.cloneElement)(e,{onClose:o})),Object(i.createElement)(p.MenuGroup,null,!m&&Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,O,d),shortcut:s.remove},b)))))},au=function({clientIds:e,...t}){return Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(p.ToolbarItem,null,n=>Object(i.createElement)(iu,Object(l.a)({clientIds:e,toggleProps:n},t))))};function su({hideDragHandle:e}){const{blockClientIds:t,blockClientId:n,blockType:o,hasFixedToolbar:r,hasReducedUI:c,isValid:a,isVisual:u}=Object(f.useSelect)(e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:r,getBlockRootClientId:c,getSettings:l}=e(Mn),i=o(),a=i[0],s=c(a),u=l();return{blockClientIds:i,blockClientId:a,blockType:a&&Object(m.getBlockType)(t(a)),hasFixedToolbar:u.hasFixedToolbar,hasReducedUI:u.hasReducedUI,rootClientId:s,isValid:i.every(e=>r(e)),isVisual:i.every(e=>"visual"===n(e))}},[]),{toggleBlockHighlight:b}=Object(f.useDispatch)(Mn),g=Object(i.useRef)(),{showMovers:h,gestures:O}=ws({ref:g,onChange(e){e&&c||b(n,e)}}),j=Object(d.useViewportMatch)("medium","<")||r;if(o&&!Object(m.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const v=j||h;if(0===t.length)return null;const k=a&&u,_=t.length>1,y=s()("block-editor-block-toolbar",v&&"is-showing-movers");return Object(i.createElement)("div",{className:y},!_&&!j&&Object(i.createElement)(Bs,{clientIds:t}),Object(i.createElement)("div",Object(l.a)({ref:g},O),(k||_)&&Object(i.createElement)(p.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(i.createElement)(Gs,{clientIds:t}),Object(i.createElement)(ys,{clientIds:t,hideDragHandle:e||c}))),k&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Un.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),Object(i.createElement)(Un.Slot,{className:"block-editor-block-toolbar__slot"}),Object(i.createElement)(Un.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),Object(i.createElement)(Un.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),Object(i.createElement)(au,{clientIds:t}))}var uu=function({focusOnMount:e,isFixed:t,...n}){const{blockType:o,hasParents:r}=Object(f.useSelect)(e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(Mn),{getBlockType:r}=e(m.store),c=o()[0];return{blockType:c&&r(t(c)),hasParents:n(c).length}},[]);if(o&&!Object(m.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const c=s()("block-editor-block-contextual-toolbar",{"has-parent":r,"is-fixed":t});return Object(i.createElement)(_s,Object(l.a)({focusOnMount:e,className:c
|
55 |
-
/* translators: accessibility text for the block toolbar */,"aria-label":Object(j.__)("Block tools")},n),Object(i.createElement)(su,{hideDragHandle:t}))};function du(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:c,getSettings:l,getLastMultiSelectedBlockClientId:i}=e(Mn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:c(),hasMultiSelection:o(),hasFixedToolbar:l().hasFixedToolbar,lastClientId:i()}}function bu({clientId:e,rootClientId:t,isValid:n,isEmptyDefaultBlock:o,capturingClientId:r,__unstablePopoverSlot:c,__unstableContentRef:l}){const{isNavigationMode:a,isMultiSelecting:u,isTyping:b,isCaretWithinFormattedText:m,hasMultiSelection:g,hasFixedToolbar:h,lastClientId:O}=Object(f.useSelect)(du,[]),j=Object(d.useViewportMatch)("medium"),[v,k]=Object(i.useState)(!1),[_,y]=Object(i.useState)(!1),{stopTyping:E}=Object(f.useDispatch)(Mn),C=!b&&!a&&o&&n,S=a,w=!a&&!h&&j&&!C&&!u&&(!b||m),B=!(a||w||h||o);Object(Os.useShortcut)("core/block-editor/focus-toolbar",Object(i.useCallback)(()=>{k(!0),E(!0)},[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!B}),Object(i.useEffect)(()=>{w||k(!1)},[w]);const I=Object(i.useRef)(),x=yr(e),T=yr(O),N=yr(r),P=ds(l);if(!(S||w||v||C))return null;let L=x;if(!L)return null;r&&(L=N);let A=L;if(g){if(!T)return null;A={top:L,bottom:T}}const R=C?"top left right":"top right left",{ownerDocument:M}=L,D=C?void 0:M.defaultView.frameElement||Object(di.getScrollContainer)(L)||M.body;return Object(i.createElement)(p.Popover,{ref:P,noArrow:!0,animate:!1,position:R,focusOnMount:!1,anchorRef:A,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:D,__unstableSlotName:c||null,__unstableBoundaryParent:!0,__unstableObserveElement:L,shouldAnchorIncludePadding:!0},(w||v)&&Object(i.createElement)("div",{onFocus:function(){y(!0)},onBlur:function(){y(!1)},tabIndex:-1,className:s()("block-editor-block-list__block-popover-inserter",{"is-visible":_})},Object(i.createElement)(os,{clientId:e,rootClientId:t,__experimentalIsQuick:!0})),(w||v)&&Object(i.createElement)(uu,{focusOnMount:v,__experimentalInitialIndex:I.current,__experimentalOnIndexChange:e=>{I.current=e},key:e}),S&&Object(i.createElement)(vs,{clientId:e,rootClientId:t,blockElement:L}),C&&Object(i.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(i.createElement)(os,{position:"bottom right",rootClientId:t,clientId:e,__experimentalIsQuick:!0})))}function mu(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,__unstableGetBlockWithoutInnerBlocks:r,getBlockParents:c,__experimentalGetBlockListSettingsForBlocks:l}=e(Mn),i=t()||n();if(!i)return;const{name:a,attributes:s={},isValid:d}=r(i)||{},b=c(i),p=l(b),f=Object(u.find)(b,e=>{var t;return null===(t=p[e])||void 0===t?void 0:t.__experimentalCaptureToolbars});return{clientId:i,rootClientId:o(i),name:a,isValid:d,isEmptyDefaultBlock:a&&Object(m.isUnmodifiedDefaultBlock)({name:a,attributes:s}),capturingClientId:f}}function pu({__unstablePopoverSlot:e,__unstableContentRef:t}){const n=Object(f.useSelect)(mu,[]);if(!n)return null;const{clientId:o,rootClientId:r,name:c,isValid:l,isEmptyDefaultBlock:a,capturingClientId:s}=n;return c?Object(i.createElement)(bu,{clientId:o,rootClientId:r,isValid:l,isEmptyDefaultBlock:a,capturingClientId:s,__unstablePopoverSlot:e,__unstableContentRef:t}):null}function fu({children:e}){const t=Object(i.useContext)(bs),n=Object(i.useContext)(p.Disabled.Context);return t||n?e:(Bt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools"}),Object(i.createElement)(ps,{__unstablePopoverSlot:"block-toolbar"},Object(i.createElement)(pu,{__unstablePopoverSlot:"block-toolbar"}),e))}function gu(){const{hasSelectedBlock:e,hasMultiSelection:t}=Object(f.useSelect)(Mn),{clearSelectedBlock:n}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}},[e,t,n])}function hu(e){return Object(i.createElement)("div",Object(l.a)({ref:gu()},e))}const Ou=Object(i.createContext)();function ju({className:e,children:t}){const n=Object(d.useViewportMatch)("medium"),{isTyping:o,isOutlineMode:r,isFocusMode:c,isNavigationMode:l}=Object(f.useSelect)(e=>{const{isTyping:t,getSettings:n,isNavigationMode:o}=e(Mn),{outlineMode:r,focusMode:c}=n();return{isTyping:t(),isOutlineMode:r,isFocusMode:c,isNavigationMode:o()}},[]);return Object(i.createElement)("div",{ref:Object(d.useMergeRefs)([gu(),us(),fs()]),className:s()("block-editor-block-list__layout is-root-container",e,{"is-typing":o,"is-outline-mode":r,"is-focus-mode":c&&n,"is-navigate-mode":l})},t)}function vu({className:e,__experimentalLayout:t}){return function(){const e=Object(f.useSelect)(e=>e(Mn).getSettings().__experimentalBlockPatterns,[]);Object(i.useEffect)(()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||(Object(f.select)(Mn).__experimentalGetParsedPattern(e[n].name),t=gs(o))};return t=gs(o),()=>hs(t)},[e])}(),Object(i.createElement)(fu,null,Object(i.createElement)(ju,{className:e},Object(i.createElement)(_u,{__experimentalLayout:t})))}function ku({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,__experimentalLayout:r=Qn}){const[c,l]=Object(i.useState)(new Set),a=Object(i.useMemo)(()=>{const{IntersectionObserver:e}=window;if(e)return new e(e=>{l(t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n})})},[l]),{order:s,selectedBlocks:u}=Object(f.useSelect)(e=>{const{getBlockOrder:n,getSelectedBlockClientIds:o}=e(Mn);return{order:n(t),selectedBlocks:o()}},[t]);return Object(i.createElement)(eo,{value:r},Object(i.createElement)(Ou.Provider,{value:a},s.map(e=>Object(i.createElement)(f.AsyncModeProvider,{key:e,value:!c.has(e)&&!u.includes(e)},Object(i.createElement)(Iu,{rootClientId:t,clientId:e})))),s.length<1&&e,Object(i.createElement)(is,{tagName:o,rootClientId:t,renderAppender:n}))}function _u(e){return Object(i.createElement)(f.AsyncModeProvider,{value:!1},Object(i.createElement)(ku,e))}function yu(){const e=Object(i.useContext)(Ou);return Object(d.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}function Eu(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={}}=Object(i.useContext)(Cu),{index:c,mode:l,name:a,blockTitle:u,isPartOfSelection:b,adjustScrolling:p,enableAnimation:g}=Object(f.useSelect)(e=>{const{getBlockRootClientId:t,getBlockIndex:o,getBlockMode:r,getBlockName:c,isTyping:l,getGlobalBlockCount:i,isBlockSelected:a,isBlockMultiSelected:s,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:d}=e(Mn),b=a(n),p=s(n)||u(n),f=c(n),g=t(n);return{index:o(n,g),mode:r(n),name:f,blockTitle:Object(m.getBlockType)(f).title,isPartOfSelection:b||p,adjustScrolling:b||d(n),enableAnimation:!l()&&i()<=200}},[n]),h=Object(j.sprintf)(Object(j.__)("Block: %s"),u),O="html"!==l||t?"":"-visual",v=Object(d.useMergeRefs)([e.ref,Gi(n),ta(n),kr(n),Xi(n),oa(n),Qi(n),Zi(n),Wi(),yu(),pi({isSelected:b,adjustScrolling:p,enableAnimation:g,triggerAnimationOnChange:c})]);return{...r,...e,ref:v,id:`block-${n}${O}`,tabIndex:0,role:"group","aria-label":h,"data-block":n,"data-type":a,"data-title":u,className:s()("wp-block block-editor-block-list__block",o,e.className,r.className,Ki(n),$i(n),qi(n),Yi(n)),style:{...r.style,...e.style}}}Eu.save=m.__unstableGetBlockProps;const Cu=Object(i.createContext)();function Su({children:e,isHtml:t,...n}){return Object(i.createElement)("div",Eu(n,{__unstableIsHtml:t}),e)}const wu=Object(f.withSelect)((e,{clientId:t,rootClientId:n})=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:c,getTemplateLock:l,__unstableGetBlockWithoutInnerBlocks:i}=e(Mn),a=i(t),s=o(t),u=l(n),{name:d,attributes:b,isValid:m}=a||{};return{mode:r(t),isSelectionEnabled:c(),isLocked:!!u,block:a,name:d,attributes:b,isValid:m,isSelected:s}}),Bu=Object(f.withDispatch)((e,t,{select:n})=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:c,replaceBlocks:l,toggleSelection:i,__unstableMarkLastChangeAsPersistent:a}=e(Mn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n(Mn),c=r(),{clientId:l}=t,i=c.length?c:[l];o(i,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:c}=t,{getBlockIndex:l}=n(Mn),i=l(o,c);r(e,i+1,c)},onMerge(e){const{clientId:o}=t,{getPreviousBlockClientId:r,getNextBlockClientId:l}=n(Mn);if(e){const e=l(o);e&&c(o,e)}else{const e=r(o);e&&c(e,o)}},onReplace(e,n,o){e.length&&!Object(m.isUnmodifiedDefaultBlock)(e[e.length-1])&&a(),l([t.clientId],e,n,o)},toggleSelection(e){i(e)}}});var Iu=Object(d.compose)(d.pure,wu,Bu,Object(d.ifCondition)(({block:e})=>!!e),Object(p.withFilters)("editor.BlockListBlock"))((function({mode:e,isLocked:t,clientId:n,isSelected:o,isSelectionEnabled:r,className:c,name:l,isValid:a,attributes:d,wrapperProps:b,setAttributes:p,onReplace:g,onInsertBlocksAfter:h,onMerge:O,toggleSelection:j}){const{removeBlock:v}=Object(f.useDispatch)(Mn),k=Object(i.useCallback)(()=>v(n),[n]);let _=Object(i.createElement)(ii,{name:l,isSelected:o,attributes:d,setAttributes:p,insertBlocksAfter:t?void 0:h,onReplace:t?void 0:g,onRemove:t?void 0:k,mergeBlocks:t?void 0:O,clientId:n,isSelectionEnabled:r,toggleSelection:j});const y=Object(m.getBlockType)(l),E=y.apiVersion>1||Object(m.hasBlockSupport)(y,"lightBlockWrapper",!1);let C;y.getEditWrapperProps&&(b=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=s()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(b,y.getEditWrapperProps(d))),b&&!!b["data-align"]&&(_=Object(i.createElement)("div",{className:"wp-block","data-align":b["data-align"]},_)),C=a?"html"===e?Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{style:{display:"none"}},_),Object(i.createElement)(Su,{isHtml:!0},Object(i.createElement)(Hi,{clientId:n}))):E?_:Object(i.createElement)(Su,b,_):Object(i.createElement)(Su,{className:"has-warning"},Object(i.createElement)(Li,{clientId:n}),Object(i.createElement)("div",null,Object(m.getSaveElement)(y,d)));const S={clientId:n,className:c,wrapperProps:Object(u.omit)(b,["data-align"])},w=Object(i.useMemo)(()=>S,Object.values(S));return Object(i.createElement)(Cu.Provider,{value:w},Object(i.createElement)(Di,{fallback:Object(i.createElement)(Su,{className:"has-warning"},Object(i.createElement)(Ri,null))},C))}));function xu({level:e}){return Object(u.times)(e-1,t=>{const n=t+2===e;return Object(i.createElement)("div",{key:t,"aria-hidden":"true",className:s()("block-editor-block-navigator-indentation",{"has-item":n})})})}const Tu=(e,t,n)=>Object(j.sprintf)(
|
56 |
/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
|
57 |
-
Object(j.__)("Block %1$d of %2$d, Level %3$d"),e,t,n),
|
58 |
/* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
|
59 |
-
Object(j.__)("Add block at position %1$d, Level %2$d"),t,n);return Object(i.createElement)(gi,{className:s()({"is-dragging":c}),level:n,position:t,rowCount:o,path:r},Object(i.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},({ref:t,tabIndex:o,onFocus:r})=>Object(i.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(i.createElement)(
|
60 |
-
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(j.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e}))}var
|
61 |
-
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(j.__)("More"),toggleProps:t,controls:Object(u.orderBy)(e.map(([{props:e}])=>e),"title"),popoverProps:Xu})))),Zu=({inline:e,anchorRef:t})=>e?Object(i.createElement)(p.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(i.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(Qu,null)))):Object(i.createElement)(Un,{group:"inline"},Object(i.createElement)(Qu,null));function Ju(){const{didAutomaticChange:e,getSettings:t}=Object(f.useSelect)(Mn);return Object(d.useRefEffect)(n=>{function o(n){const{keyCode:o}=n;o!==lc.DELETE&&o!==lc.BACKSPACE&&o!==lc.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}},[])}function ed(e){return e.filter(({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e)).map(e=>`<img src="${Object(Us.createBlobURL)(e)}">`).join("")}var td=n(125);function nd(e,t){if(t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function od(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function rd({allowedFormats:e,formattingControls:t,disableFormats:n}){return n?rd.EMPTY_ARRAY:e||t?e||(Bt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),t.map(e=>"core/"+e)):void 0}function cd({value:e,pastedBlocks:t=[],onReplace:n,onSplit:o,onSplitMiddle:r,multilineTag:l}){if(!n||!o)return;const i=[],[a,s]=Object(c.split)(e),u=t.length>0;let d=-1;const b=Object(c.isEmpty)(a)&&!Object(c.isEmpty)(s);u&&Object(c.isEmpty)(a)||(i.push(o(Object(c.toHTMLString)({value:a,multilineTag:l}),!b)),d+=1),u?(i.push(...t),d+=t.length):r&&i.push(r()),(u||r)&&Object(c.isEmpty)(s)||i.push(o(Object(c.toHTMLString)({value:s,multilineTag:l}),b)),n(i,u?d:1,u?-1:0)}function ld(e){const t=Object(i.useRef)(e);return t.current=e,Object(d.useRefEffect)(e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:a,onReplace:s,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:b,multilineTag:p,preserveWhiteSpace:f,pastePlainText:g}=t.current;if(!n)return void e.preventDefault();const{clipboardData:h}=e;let O="",j="";try{O=h.getData("text/plain"),j=h.getData("text/html")}catch(e){try{j=h.getData("Text")}catch(e){return}}if(e.preventDefault(),window.console.log("Received HTML:\n\n",j),window.console.log("Received plain text:\n\n",O),o)return void r(Object(c.insert)(l,O));const v=i.reduce((e,{__unstablePasteRule:t})=>(t&&e===l&&(e=t(l,{html:j,plainText:O})),e),l);if(v!==l)return void r(v);const k=[...Object(di.getFilesFromDataTransfer)(h)];if("true"===h.getData("rich-text")){const e=Object(c.create)({html:j,multilineTag:p,multilineWrapperTags:"li"===p?["ul","ol"]:void 0,preserveWhiteSpace:f});return nd(e,l.activeFormats),void r(Object(c.insert)(l,e))}if(g)return void r(Object(c.insert)(l,Object(c.create)({text:O})));if(k&&k.length&&!j){const e=Object(m.pasteHandler)({HTML:ed(k),mode:"BLOCKS",tagName:a,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",k),void(s&&Object(c.isEmpty)(l)?s(e):cd({value:l,pastedBlocks:e,onReplace:s,onSplit:u,onSplitMiddle:d,multilineTag:p}))}let _=s&&u?"AUTO":"INLINE";var y;"AUTO"===_&&Object(c.isEmpty)(l)&&(y=O,Object(td.regexp)(".*").test(y))&&(_="BLOCKS"),b&&Object(c.isEmpty)(l)&&Object(Va.isURL)(O.trim())&&(_="BLOCKS");const E=Object(m.pasteHandler)({HTML:j,plainText:O,mode:_,tagName:a,preserveWhiteSpace:f});if("string"==typeof E){let e=Object(c.create)({html:E});nd(e,l.activeFormats),p&&(e=Object(c.replace)(e,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),r(Object(c.insert)(l,e))}else E.length>0&&(s&&Object(c.isEmpty)(l)?s(E,E.length-1,-1):cd({value:l,pastedBlocks:E,onReplace:s,onSplit:u,onSplitMiddle:d,multilineTag:p}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}},[])}function id(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=Object(f.useDispatch)(Mn),o=Object(i.useRef)(e);return o.current=e,Object(d.useRefEffect)(e=>{function r(){const{value:e,onReplace:t}=o.current;if(!t)return;const{start:r,text:l}=e;if(" "!==l.slice(r-1,r))return;const i=l.slice(0,r).trim(),a=Object(m.getBlockTransforms)("from").filter(({type:e})=>"prefix"===e),s=Object(m.findTransform)(a,({prefix:e})=>i===e);if(!s)return;const u=Object(c.toHTMLString)({value:Object(c.slice)(e,r,l.length)});t([s.transform(u)]),n()}function l(e){const{inputType:c}=e,{value:l,onChange:i,__unstableAllowPrefixTransformations:a,formatTypes:s}=o.current;if("insertText"!==c)return;a&&r&&r();const u=s.reduce((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e),l);u!==l&&(t(),i({...u,activeFormats:l.activeFormats}),n())}return e.addEventListener("input",l),()=>{e.removeEventListener("input",l)}},[])}function ad(e){const{__unstableMarkAutomaticChange:t}=Object(f.useDispatch)(Mn),n=Object(i.useRef)(e);return n.current=e,Object(d.useRefEffect)(e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:r,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:s,onChange:u,disableLineBreaks:d,onSplitAtEnd:b}=n.current;if(e.keyCode!==lc.ENTER)return;e.preventDefault();const p={...r};p.formats=o(r);const f=l&&i;if(l){const e=Object(m.getBlockTransforms)("from").filter(({type:e})=>"enter"===e),n=Object(m.findTransform)(e,e=>e.regExp.test(p.text));n&&(l([n.transform({content:p.text})]),t())}if(s)e.shiftKey?d||u(Object(c.insert)(p,"\n")):f&&Object(c.__unstableIsEmptyLine)(p)?cd({value:p,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:s}):u(Object(c.__unstableInsertLineSeparator)(p));else{const{text:t,start:n,end:o}=p,r=b&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u(Object(c.insert)(p,"\n")):!f&&r?b():f&&cd({value:p,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:s})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}},[])}function sd(e){return e(c.store).getFormatTypes()}rd.EMPTY_ARRAY=[];const ud=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function dd({formatTypes:e,onChange:t,onFocus:n,value:o,forwardedRef:r}){return e.map(e=>{const{name:l,edit:a}=e;if(!a)return null;const s=Object(c.getActiveFormat)(o,l),u=void 0!==s,d=Object(c.getActiveObject)(o),b=void 0!==d&&d.type===l;return Object(i.createElement)(a,{key:l,isActive:u,activeAttributes:u&&s.attributes||{},isObjectActive:b,activeObjectAttributes:b&&d.attributes||{},value:o,onChange:t,onFocus:n,contentRef:r})})}const bd=Object(i.forwardRef)((function e({children:t,tagName:n="div",value:o="",onChange:r,isSelected:a,multiline:b,inlineToolbar:g,wrapperClassName:h,autocompleters:j,onReplace:v,placeholder:k,allowedFormats:_,formattingControls:y,withoutInteractiveFormatting:E,onRemove:C,onMerge:S,onSplit:w,__unstableOnSplitAtEnd:B,__unstableOnSplitMiddle:I,identifier:x,preserveWhiteSpace:T,__unstablePastePlainText:N,__unstableEmbedURLOnPaste:P,__unstableDisableFormats:L,disableLineBreaks:A,unstableOnFocus:R,__unstableAllowPrefixTransformations:M,...D},F){const V=Object(d.useInstanceId)(e);x=x||V,D=function(e){return Object(u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(D);const H=Object(i.useRef)(),{clientId:z}=O(),{selectionStart:G,selectionEnd:U,isSelected:W,disabled:K}=Object(f.useSelect)(e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:o,hasMultiSelection:r}=e(Mn),c=t(),l=n();let i;return void 0===a?i=c.clientId===z&&c.attributeKey===x:a&&(i=c.clientId===z),{selectionStart:i?c.offset:void 0,selectionEnd:i?l.offset:void 0,isSelected:i,disabled:o()||r()}}),{selectionChange:$}=Object(f.useDispatch)(Mn),q=od(b),Y=rd({allowedFormats:_,formattingControls:y,disableFormats:L}),X=!Y||Y.length>0;let Q=o,Z=r;Array.isArray(o)&&(Q=m.children.toHTML(o),Z=e=>r(m.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes)));const J=Object(i.useCallback)((e,t)=>{$(z,x,e,t)},[z,x]),{formatTypes:ee,prepareHandlers:te,valueHandlers:ne,changeHandlers:oe,dependencies:re}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=Object(f.useSelect)(sd,[]),c=Object(i.useMemo)(()=>r.filter(({name:e,tagName:t})=>!(o&&!o.includes(e)||n&&ud.has(t))),[r,o,ud]),l=Object(f.useSelect)(n=>c.reduce((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e})),o),{}),[c,e,t]),a=Object(f.useDispatch)(),s=[],u=[],d=[],b=[];return c.forEach(n=>{if(n.__experimentalCreatePrepareEditableTree){const o=l[n.name],r=n.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?u.push(r):s.push(r);for(const e in o)b.push(o[e])}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:t,blockClientId:e})),d.push(n.__experimentalCreateOnChangeEditableValue({...l[n.name]||{},...o},{richTextIdentifier:t,blockClientId:e}))}}),{formatTypes:c,prepareHandlers:s,valueHandlers:u,changeHandlers:d,dependencies:b}}({clientId:z,identifier:x,withoutInteractiveFormatting:E,allowedFormats:Y});function ce(e){return ee.forEach(t=>{t.__experimentalCreatePrepareEditableTree&&(e=Object(c.removeFormat)(e,t.name,0,e.text.length))}),e.formats}const{value:le,onChange:ie,onFocus:ae,ref:se}=Object(c.__unstableUseRichText)({value:Q,onChange(e,{__unstableFormats:t,__unstableText:n}){Z(e),Object.values(oe).forEach(e=>{e(t,n)})},selectionStart:G,selectionEnd:U,onSelectionChange:J,placeholder:k,__unstableIsSelected:W,__unstableMultilineTag:q,__unstableDisableFormats:L,preserveWhiteSpace:T,__unstableDependencies:re,__unstableAfterParse:function(e){return ne.reduce((t,n)=>n(t,e.text),e.formats)},__unstableBeforeSerialize:ce,__unstableAddInvisibleFormats:function(e){return te.reduce((t,n)=>n(t,e.text),e.formats)}}),ue=function(e){return Object(p.__unstableUseAutocompleteProps)({...e,completers:Ul(e)})}({onReplace:v,completers:j,record:le,onChange:ie});!function({value:e}){const t=e.activeFormats&&!!e.activeFormats.length,{isCaretWithinFormattedText:n}=Object(f.useSelect)(Mn),{enterFormattedText:o,exitFormattedText:r}=Object(f.useDispatch)(Mn);Object(i.useEffect)(()=>{t?n()||o():n()&&r()},[t])}({value:le}),function({html:e,value:t}){const n=Object(i.useRef)(),o=t.activeFormats&&!!t.activeFormats.length,{__unstableMarkLastChangeAsPersistent:r}=Object(f.useDispatch)(Mn);Object(i.useLayoutEffect)(()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout(()=>{r()},1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text},[e,o])}({html:Q,value:le});const de=n,be=Object(i.createElement)(i.Fragment,null,W&&t&&t({value:le,onChange:ie,onFocus:ae}),W&&Object(i.createElement)(Yu,null),W&&ue.children,W&&Object(i.createElement)(dd,{value:le,onChange:ie,onFocus:ae,formatTypes:ee,forwardedRef:H}),W&&X&&Object(i.createElement)(Zu,{inline:g,anchorRef:H.current}),Object(i.createElement)(de,Object(l.a)({role:"textbox","aria-multiline":!0,"aria-label":k},D,ue,{ref:Object(d.useMergeRefs)([ue.ref,D.ref,se,id({value:le,onChange:ie,__unstableAllowPrefixTransformations:M,formatTypes:ee,onReplace:v}),Ju(),ld({isSelected:W,disableFormats:L,onChange:ie,value:le,formatTypes:ee,tagName:n,onReplace:v,onSplit:w,onSplitMiddle:I,__unstableEmbedURLOnPaste:P,multilineTag:q,preserveWhiteSpace:T,pastePlainText:N}),ad({removeEditorOnlyFormats:ce,value:le,onReplace:v,onSplit:w,onSplitMiddle:I,multilineTag:q,onChange:ie,disableLineBreaks:A,onSplitAtEnd:B}),H,F]),contentEditable:!K||void 0,suppressContentEditableWarning:!K,className:s()("block-editor-rich-text__editable",D.className,"rich-text"),onFocus:R,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===lc.DELETE||t===lc.BACKSPACE)){const{start:n,end:o,text:r}=le,l=t===lc.BACKSPACE,i=le.activeFormats&&!!le.activeFormats.length;if(!Object(c.isCollapsed)(le)||i||l&&0!==n||!l&&o!==r.length)return;S&&S(!l),C&&Object(c.isEmpty)(le)&&l&&C(!l),e.preventDefault()}}})));if(!h)return be;Bt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const me=s()("block-editor-rich-text",h);return Object(i.createElement)("div",{className:me},be)}));bd.Content=({value:e,tagName:t,multiline:n,...o})=>{Array.isArray(e)&&(e=m.children.toHTML(e));const r=od(n);!e&&r&&(e=`<${r}></${r}>`);const c=Object(i.createElement)(i.RawHTML,null,e);return t?Object(i.createElement)(t,Object(u.omit)(o,["format"]),c):c},bd.isEmpty=e=>!e||0===e.length;var md=bd;function pd({value:e,onChange:t}){return Object(i.createElement)(Ru,null,Object(i.createElement)(md,{value:e,onChange:t,placeholder:Object(j.__)("Navigation item"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var fd=n(194),gd=function({icon:e=fd.a,label:t=Object(j.__)("Choose variation"),instructions:n=Object(j.__)("Select a variation to start with."),variations:o,onSelect:r,allowSkip:c}){const l=s()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return Object(i.createElement)(p.Placeholder,{icon:e,label:t,instructions:n,className:l},Object(i.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(j.__)("Block variations")},o.map(e=>Object(i.createElement)("li",{key:e.name},Object(i.createElement)(p.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(i.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title)))),c&&Object(i.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(i.createElement)(p.Button,{isLink:!0,onClick:()=>r()},Object(j.__)("Skip"))))},hd=n(301);const Od=({onStartBlank:e,onBlockPatternSelect:t})=>Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},Object(i.createElement)(p.Button,{onClick:e},Object(j.__)("Start blank")),Object(i.createElement)(p.Button,{isPrimary:!0,onClick:t},Object(j.__)("Choose"))),jd=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},Object(i.createElement)(p.Button,{icon:Oi.a,label:Object(j.__)("Previous pattern"),onClick:e,disabled:0===n}),Object(i.createElement)(p.Button,{icon:hi.a,label:Object(j.__)("Next pattern"),onClick:t,disabled:n===o-1}));var vd=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:c,onBlockPatternSelect:l,onStartBlank:a})=>{const s="carousel"===e,u=Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},Object(i.createElement)(p.Button,{icon:Xn,label:Object(j.__)("Carousel view"),onClick:()=>t("carousel"),isPressed:s}),Object(i.createElement)(p.Button,{icon:hd.a,label:Object(j.__)("Grid view"),onClick:()=>t("grid"),isPressed:"grid"===e}));return Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},s&&Object(i.createElement)(jd,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:c}),u,s&&Object(i.createElement)(Od,{onBlockPatternSelect:l,onStartBlank:a}))};const kd=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o})=>{const r=Object(p.__unstableUseCompositeState)(),c="block-editor-block-pattern-setup__container";if("carousel"===e){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return Object(i.createElement)("div",{className:c},Object(i.createElement)("ul",{className:"carousel-container"},n.map((t,n)=>Object(i.createElement)(yd,{className:e.get(n)||"",key:t.name,pattern:t}))))}return Object(i.createElement)(p.__unstableComposite,Object(l.a)({},r,{role:"listbox",className:c,"aria-label":Object(j.__)("Patterns list")}),n.map(e=>Object(i.createElement)(_d,{key:e.name,pattern:e,onSelect:o,composite:r})))};function _d({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,title:c,description:a,viewportWidth:s=700}=e,u=Object(d.useInstanceId)(_d,o+"__item-description");return Object(i.createElement)("div",{className:o+"__list-item","aria-label":e.title,"aria-describedby":e.description?u:void 0},Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({role:"option",as:"div"},n,{className:o+"__item",onClick:()=>t(r)}),Object(i.createElement)(ha,{blocks:r,viewportWidth:s}),Object(i.createElement)("div",{className:o+"__item-title"},c)),!!a&&Object(i.createElement)(p.VisuallyHidden,{id:u},a))}function yd({className:e,pattern:t}){const{blocks:n,title:o,description:r}=t,c=Object(d.useInstanceId)(yd,"block-editor-block-pattern-setup-list__item-description");return Object(i.createElement)("li",{className:"pattern-slide "+e,"aria-label":o,"aria-describedby":r?c:void 0},Object(i.createElement)(ha,{blocks:n,__experimentalLive:!0}),!!r&&Object(i.createElement)(p.VisuallyHidden,{id:c},r))}var Ed=({clientId:e,blockName:t,filterPatternsFn:n,startBlankComponent:o,onBlockPatternSelect:r})=>{const[c,l]=Object(i.useState)("carousel"),[a,s]=Object(i.useState)(0),[u,d]=Object(i.useState)(!1),{replaceBlock:b}=Object(f.useDispatch)(Mn),p=function(e,t,n){return Object(f.useSelect)(o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:c,__experimentalGetParsedPattern:l,__experimentalGetAllowedPatterns:i}=o(Mn),a=r(e);let s=[];return s=n?i(a).filter(n):c(t,a),s.map(({name:e})=>l(e))},[e,t,n])}(e,t,n);if(null==p||!p.length||u)return o;const g=r||(t=>{const n=t.map(e=>Object(m.cloneBlock)(e));b(e,n)});return Object(i.createElement)("div",{className:"block-editor-block-pattern-setup view-mode-"+c},Object(i.createElement)(vd,{viewMode:c,setViewMode:l,activeSlide:a,totalSlides:p.length,handleNext:()=>{s(e=>e+1)},handlePrevious:()=>{s(e=>e-1)},onBlockPatternSelect:()=>{g(p[a].blocks)},onStartBlank:()=>{d(!0)}}),Object(i.createElement)(kd,{viewMode:c,activeSlide:a,patterns:p,onBlockPatternSelect:g}))};const Cd=(e,t)=>{if(!t||!e)return;const n=t.filter(({attributes:t})=>!(!t||!Object.keys(t).length)&&Object(u.isMatch)(e,t));return 1===n.length?n[0]:void 0};var Sd=function({blockClientId:e}){const[t,n]=Object(i.useState)(),{updateBlockAttributes:o}=Object(f.useDispatch)(Mn),{variations:r,blockAttributes:c}=Object(f.useSelect)(t=>{const{getBlockVariations:n}=t(m.store),{getBlockName:o,getBlockAttributes:r}=t(Mn),c=e&&o(e);return{variations:c&&n(c,"transform"),blockAttributes:r(e)}},[e]);if(Object(i.useEffect)(()=>{var e;n(null===(e=Cd(c,r))||void 0===e?void 0:e.name)},[c,r]),null==r||!r.length)return null;const l=r.map(({name:e,title:t,description:n})=>({value:e,label:t,info:n})),a=t=>{o(e,{...r.find(({name:e})=>e===t).attributes})},s="block-editor-block-variation-transforms";return Object(i.createElement)(p.DropdownMenu,{className:s,label:Object(j.__)("Transform to variation"),text:Object(j.__)("Transform to variation"),popoverProps:{position:"bottom center",className:s+"__popover"},icon:vi.a,toggleProps:{iconPosition:"right"}},()=>Object(i.createElement)("div",{className:s+"__container"},Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(p.MenuItemsChoice,{choices:l,value:t,onSelect:a}))))};const wd=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Bd=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Id={top:{icon:Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(j._x)("Align top","Block vertical alignment setting")},center:{icon:Bd,title:Object(j._x)("Align middle","Block vertical alignment setting")},bottom:{icon:wd,title:Object(j._x)("Align bottom","Block vertical alignment setting")}},xd=["top","center","bottom"],Td={isAlternate:!0};var Nd=function({value:e,onChange:t,controls:n=xd,isCollapsed:o=!0,isToolbar:r}){const c=Id[e],a=Id.top,s=r?p.ToolbarGroup:p.ToolbarDropdownMenu,u=r?{isCollapsed:o}:{};return Object(i.createElement)(s,Object(l.a)({popoverProps:Td,icon:c?c.icon:a.icon,label:Object(j._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map(n=>{return{...Id[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r})},u))};function Pd(e){return Object(i.createElement)(Nd,Object(l.a)({},e,{isToolbar:!1}))}function Ld(e){return Object(i.createElement)(Nd,Object(l.a)({},e,{isToolbar:!0}))}var Ad=Object(d.createHigherOrderComponent)(e=>t=>{const n=xo("color.palette"),o=!xo("color.custom"),r=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?o:t.disableCustomColors,a=!Object(u.isEmpty)(r)||!c;return Object(i.createElement)(e,Object(l.a)({},t,{colors:r,disableCustomColors:c,hasColorsToChoose:a}))},"withColorContext"),Rd=Ad(p.ColorPalette);function Md({onChange:e,value:t,...n}){return Object(i.createElement)(qo,Object(l.a)({},n,{onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0}))}const Dd=[];function Fd(e){const t=xo("color.gradients")||Dd,n=!xo("color.customGradient");return Object(i.createElement)(p.__experimentalGradientPicker,Object(l.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var Vd=function(e){const t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?p.__experimentalGradientPicker:Fd;return Object(i.createElement)(t,e)};function Hd({className:e,value:t,onChange:n,label:o=Object(j.__)("Gradient Presets"),...r}){const c=xo("color.gradients"),a=!xo("color.customGradient");return Object(u.isEmpty)(c)&&a?null:Object(i.createElement)(p.BaseControl,{className:s()("block-editor-gradient-picker-control",e)},Object(i.createElement)(p.BaseControl.VisualLabel,null,o),Object(i.createElement)(Vd,Object(l.a)({value:t,onChange:n,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:c,disableCustomGradients:a},r)))}function zd(e){const t=xo("color.gradients");return Object(u.isEmpty)(t)?null:Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Gradient")},Object(i.createElement)(Hd,e))}const Gd=[25,50,75,100];function Ud({imageWidth:e,imageHeight:t,imageSizeOptions:n=[],isResizable:o=!0,slug:r,width:c,height:l,onChange:a,onChangeImage:s=u.noop}){var d,b;function m(e,t){return()=>{a({width:e,height:t})}}return Object(i.createElement)(i.Fragment,null,!Object(u.isEmpty)(n)&&Object(i.createElement)(p.SelectControl,{label:Object(j.__)("Image size"),value:r,options:n,onChange:s}),o&&Object(i.createElement)("div",{className:"block-editor-image-size-control"},Object(i.createElement)("p",{className:"block-editor-image-size-control__row"},Object(j.__)("Image dimensions")),Object(i.createElement)("div",{className:"block-editor-image-size-control__row"},Object(i.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(j.__)("Width"),value:null!==(d=null!=c?c:e)&&void 0!==d?d:"",min:1,onChange:e=>a({width:parseInt(e,10)})}),Object(i.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(j.__)("Height"),value:null!==(b=null!=l?l:t)&&void 0!==b?b:"",min:1,onChange:e=>a({height:parseInt(e,10)})})),Object(i.createElement)("div",{className:"block-editor-image-size-control__row"},Object(i.createElement)(p.ButtonGroup,{"aria-label":Object(j.__)("Image size presets")},Gd.map(n=>{const o=Math.round(e*(n/100)),r=Math.round(t*(n/100)),a=c===o&&l===r;return Object(i.createElement)(p.Button,{key:n,isSmall:!0,isPrimary:a,isPressed:a,onClick:m(o,r)},n,"%")})),Object(i.createElement)(p.Button,{isSmall:!0,onClick:m()},Object(j.__)("Reset")))))}var Wd=Object(d.createHigherOrderComponent)(e=>t=>{const{clientId:n}=O();return Object(i.createElement)(e,Object(l.a)({},t,{clientId:n}))},"withClientId"),Kd=Wd(({clientId:e,showSeparator:t,isFloating:n,onAddBlock:o})=>Object(i.createElement)(cs,{rootClientId:e,showSeparator:t,isFloating:n,onAddBlock:o})),$d=Object(d.compose)([Wd,Object(f.withSelect)((e,{clientId:t})=>{const{getBlockOrder:n}=e(Mn),o=n(t);return{lastBlockClientId:Object(u.last)(o)}})])(({clientId:e,lastBlockClientId:t})=>Object(i.createElement)(rs,{rootClientId:e,lastBlockClientId:t})),qd=n(51),Yd=n.n(qd);const Xd=new WeakMap;function Qd(e){const{clientId:t,allowedBlocks:n,template:o,templateLock:r,wrapperRef:c,templateInsertUpdatesSelection:l,__experimentalCaptureToolbars:a,__experimentalAppenderTagName:s,renderAppender:d,orientation:b,placeholder:p,__experimentalLayout:g}=e;!function(e,t,n,o,r){const{updateBlockListSettings:c}=Object(f.useDispatch)(Mn),{blockListSettings:l,parentLock:a}=Object(f.useSelect)(t=>{const n=t(Mn).getBlockRootClientId(e);return{blockListSettings:t(Mn).getBlockListSettings(e),parentLock:t(Mn).getTemplateLock(n)}},[e]),s=Object(i.useMemo)(()=>t,t);Object(i.useLayoutEffect)(()=>{const t={allowedBlocks:s,templateLock:void 0===n?a:n};void 0!==o&&(t.__experimentalCaptureToolbars=o),void 0!==r&&(t.orientation=r),Yd()(l,t)||c(e,t)},[e,l,s,n,a,o,r,c])}(t,n,r,a,b),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:r}=Object(f.useSelect)(Mn),{replaceInnerBlocks:c}=Object(f.useDispatch)(Mn),l=Object(f.useSelect)(t=>t(Mn).getBlocks(e),[e]),a=Object(i.useRef)(null);Object(i.useLayoutEffect)(()=>{if((0===l.length||"all"===n)&&!Object(u.isEqual)(t,a.current)){a.current=t;const n=Object(m.synchronizeBlocksWithTemplate)(l,t);Object(u.isEqual)(n,l)||c(e,n,0===l.length&&o&&0!==n.length,r())}},[l,t,n,e])}(t,o,r,l);const h=Object(f.useSelect)(e=>{const n=e(Mn).getBlock(t),o=Object(m.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){Xd.has(t)||Xd.set(t,new WeakMap);const n=Xd.get(t);if(!n.has(e)){const o=Object(u.mapValues)(t.providesContext,t=>e[t]);n.set(e,o)}return n.get(e)}(n.attributes,o)},[t]);return Object(i.createElement)(Jl,{value:h},Object(i.createElement)(_u,{rootClientId:t,renderAppender:d,__experimentalAppenderTagName:s,__experimentalLayout:g,wrapperRef:c,placeholder:p}))}function Zd(e){return ba(e),Object(i.createElement)(Qd,e)}const Jd=Object(i.forwardRef)((e,t)=>{const n=eb({ref:t},e);return Object(i.createElement)("div",{className:"block-editor-inner-blocks"},Object(i.createElement)("div",n))});function eb(e={},t={}){const{clientId:n}=O(),o=Object(d.useViewportMatch)("medium","<"),r=Object(f.useSelect)(e=>{const{getBlockName:t,isBlockSelected:r,hasSelectedInnerBlock:c,isNavigationMode:l}=e(Mn),i=l()||o;return"core/template"!==t(n)&&!r(n)&&!c(n,!0)&&i},[n,o]),c=Object(d.useMergeRefs)([e.ref,us({rootClientId:n})]),a=t.value&&t.onChange?Zd:Qd;return{...e,ref:c,className:s()(e.className,"block-editor-block-list__layout",{"has-overlay":r}),children:Object(i.createElement)(a,Object(l.a)({},t,{clientId:n}))}}Jd.DefaultBlockAppender=$d,Jd.ButtonBlockAppender=Kd,Jd.Content=Object(m.withBlockContentContext)(({BlockContent:e})=>Object(i.createElement)(e,null));var tb=Jd,nb=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),ob=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),rb=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),cb=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));const lb={left:nb,center:ob,right:rb,"space-between":cb};var ib=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:c}){const a=e=>{n(e===o?void 0:e)},s=o?lb[o]:lb.left,u=[{name:"left",icon:nb,title:Object(j.__)("Justify items left"),isActive:"left"===o,onClick:()=>a("left")},{name:"center",icon:ob,title:Object(j.__)("Justify items center"),isActive:"center"===o,onClick:()=>a("center")},{name:"right",icon:rb,title:Object(j.__)("Justify items right"),isActive:"right"===o,onClick:()=>a("right")},{name:"space-between",icon:cb,title:Object(j.__)("Space between items"),isActive:"space-between"===o,onClick:()=>a("space-between")}],d=c?p.ToolbarGroup:p.ToolbarDropdownMenu,b=c?{isCollapsed:t}:{};return Object(i.createElement)(d,Object(l.a)({icon:s,popoverProps:r,label:Object(j.__)("Change items justification"),controls:u.filter(t=>e.includes(t.name))},b))};function ab(e){return Object(i.createElement)(ib,Object(l.a)({},e,{isToolbar:!1}))}function sb(e){return Object(i.createElement)(ib,Object(l.a)({},e,{isToolbar:!0}))}var ub=n(222);const db=[{id:"opensInNewTab",title:Object(j.__)("Open in new tab")}];var bb=({value:e,onChange:t=u.noop,settings:n=db})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map(t=>Object(i.createElement)(p.ToggleControl,{className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:o(t),checked:!!e&&!!e[t.id]}));return Object(i.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(i.createElement)(p.VisuallyHidden,{as:"legend"},Object(j.__)("Currently selected link settings")),r)};class mb extends i.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||Object(i.createRef)(),this.inputRef=Object(i.createRef)(),this.updateSuggestions=Object(u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,ea()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout(()=>{this.scrollingIntoView=!1},100)),e.value!==o&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!(e&&e.length);if(!o&&(e.length<2||!n&&Object(Va.isURL)(e)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then(e=>{this.suggestionsRequest===r&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak(Object(j.sprintf)(
|
62 |
/* translators: %s: number of results. */
|
63 |
-
Object(j._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak(Object(j.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)}).catch(()=>{this.suggestionsRequest===r&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)}),this.suggestionsRequest=r}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n.trim())}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case lc.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case lc.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}return}const c=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case lc.UP:{e.stopPropagation(),e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case lc.DOWN:{e.stopPropagation(),e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case lc.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(c),this.props.speak(Object(j.__)("Link selected.")));break;case lc.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(c))}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let c=r;const l=e&&e.length;return o||l||(c=!1),!0===n&&(c=!1),{showSuggestions:c,suggestionsListboxId:"block-editor-url-input-suggestions-"+t,suggestionOptionIdPrefix:"block-editor-url-input-suggestion-"+t}}render(){return Object(i.createElement)(i.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:o,placeholder:r=Object(j.__)("Paste URL or type to search"),__experimentalRenderControl:c,value:l=""}=this.props,{loading:a,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:b,suggestionOptionIdPrefix:m}=this.state,f={id:"url-input-control-"+o,label:e,className:s()("block-editor-url-input",t,{"is-full-width":n})},g={value:l,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(j.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":b,"aria-activedescendant":null!==d?`${m}-${d}`:void 0,ref:this.inputRef};return c?c(f,g,a):Object(i.createElement)(p.BaseControl,f,Object(i.createElement)("input",g),a&&Object(i.createElement)(p.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:c,selectedSuggestion:a,suggestionsListboxId:d,suggestionOptionIdPrefix:b,loading:m}=this.state,f={id:d,ref:this.autocompleteRef,role:"listbox"},g=(e,t)=>({role:"option",tabIndex:"-1",id:`${b}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a});return Object(u.isFunction)(t)&&r&&c.length?t({suggestions:c,selectedSuggestion:a,suggestionsListProps:f,buildSuggestionItemProps:g,isLoading:m,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!Object(u.isFunction)(t)&&r&&c.length?Object(i.createElement)(p.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(i.createElement)("div",Object(l.a)({},f,{className:s()("block-editor-url-input__suggestions",e+"__suggestions")}),c.map((e,t)=>Object(i.createElement)(p.Button,Object(l.a)({},g(0,t),{key:e.id,className:s()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title)))):null}}var
|
64 |
/* translators: %s: search term. */
|
65 |
-
Object(j.__)("Create: <mark>%s</mark>"),e),{mark:Object(i.createElement)("mark",null)}),Object(i.createElement)(p.Button,Object(l.a)({},n,{className:s()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":o}),onClick:t}),Object(i.createElement)(qc.a,{className:"block-editor-link-control__search-item-icon",icon:
|
66 |
/* translators: %s: search term. */
|
67 |
-
Object(j.__)('Search results for "%s"'),n),E=Object(i.createElement)(b?i.Fragment:p.VisuallyHidden,{},Object(i.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},y));return Object(i.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},E,Object(i.createElement)("div",Object(l.a)({},r,{className:g,"aria-labelledby":_}),a.map((e,t)=>v&&"__CREATE__"===e.type?Object(i.createElement)(fb,{searchTerm:n,buttonText:m,onClick:()=>o(e),key:e.type,itemProps:c(e,t),isSelected:t===u}):"__CREATE__"===e.type?null:Object(i.createElement)(hb,{key:`${e.id}-${e.type}`,itemProps:c(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===u,isURL:h.includes(e.type.toLowerCase()),searchTerm:n,shouldShowType:k}))))}function jb(e){const t=Object(u.startsWith)(e,"#");return Object(Va.isURL)(e)||e&&e.includes("www.")||t}const vb=()=>Promise.resolve([]),kb=e=>{let t="URL";const n=Object(Va.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(u.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(Va.prependHTTP)(e):e,type:t}])};const _b=Promise.resolve([]),yb=Object(i.forwardRef)(({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:c=!1,onCreateSuggestion:l=u.noop,onChange:a=u.noop,onSelect:s=u.noop,showSuggestions:b=!0,renderSuggestions:m=(e=>Object(i.createElement)(Ob,e)),fetchSuggestions:p=null,allowDirectEntry:g=!0,showInitialSuggestions:h=!1,suggestionsQuery:O={},withURLSuggestion:v=!0,createSuggestionButtonText:k},_)=>{const y=function(e,t,n,o){const{fetchSearchSuggestions:r}=Object(f.useSelect)(e=>{const{getSettings:t}=e(Mn);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}},[]),c=t?kb:vb;return Object(i.useCallback)((t,{isInitialSuggestions:l})=>jb(t)?c(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,c)=>{const{isInitialSuggestions:l}=t;let i=await Promise.all([n(e,t),o(e)]);return i=e.includes(" ")||!c||l?i[0]:i[0].concat(i[1]),l||jb(e)||!r?i:i.concat({title:e,url:e,type:"__CREATE__"})})(t,{...e,isInitialSuggestions:l},r,c,n,o),[c,r,n])}(O,g,c,v),E=b?p||y:_b,C=Object(d.useInstanceId)(yb),[S,w]=Object(i.useState)(),B=async e=>{let t=e;if("__CREATE__"!==e.type)(g||t&&Object.keys(t).length>=1)&&s({...Object(u.omit)(n,"id","url"),...t},t);else try{var o;t=await l(e.title),null!==(o=t)&&void 0!==o&&o.url&&s(t)}catch(e){}};return Object(i.createElement)("form",{onSubmit:t=>{t.preventDefault(),B(S||{url:e})}},Object(i.createElement)(pb,{className:o,value:e,onChange:(e,t)=>{a(e),w(t)},placeholder:null!=r?r:Object(j.__)("Search or type url"),__experimentalRenderSuggestions:b?t=>m({...t,instanceId:C,withCreateSuggestion:c,currentInputValue:e,createSuggestionButtonText:k,suggestionsQuery:O,handleSuggestionClick:e=>{t.handleSuggestionClick&&t.handleSuggestionClick(e),B(e)}}):null,__experimentalFetchLinkSuggestions:E,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,ref:_}),t)});var Eb=yb;const{Slot:Cb,Fill:Sb}=Object(p.createSlotFill)("BlockEditorLinkControlViewer");function wb({value:e,onEditClick:t}){const n=e&&Object(Va.filterURLForDisplay)(Object(Va.safeDecodeURI)(e.url),16)||"";return Object(i.createElement)("div",{"aria-label":Object(j.__)("Currently selected"),"aria-selected":"true",className:s()("block-editor-link-control__search-item",{"is-current":!0})},Object(i.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(i.createElement)(p.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url},e&&e.title||n),e&&e.title&&Object(i.createElement)("span",{className:"block-editor-link-control__search-item-info"},n)),Object(i.createElement)(p.Button,{isSecondary:!0,onClick:()=>t(),className:"block-editor-link-control__search-item-action"},Object(j.__)("Edit")),Object(i.createElement)(Cb,{fillProps:e}))}function Bb({searchInputPlaceholder:e,value:t,settings:n,onChange:o=u.noop,noDirectEntry:r=!1,showSuggestions:c=!0,showInitialSuggestions:l,forceIsEditingLink:a,createSuggestion:s,withCreateSuggestion:d,inputValue:b="",suggestionsQuery:m={},noURLSuggestion:f=!1,createSuggestionButtonText:g}){void 0===d&&s&&(d=!0);const h=Object(i.useRef)(!0),O=Object(i.useRef)(),[v,k]=Object(i.useState)(t&&t.url||""),_=b||v,[y,E]=Object(i.useState)(void 0!==a?a:!t||!t.url),C=Object(i.useRef)(!1);Object(i.useEffect)(()=>{void 0!==a&&a!==y&&E(a)},[a]),Object(i.useEffect)(()=>{h.current?h.current=!1:(O.current.contains(O.current.ownerDocument.activeElement)||(di.focus.focusable.find(O.current)[0]||O.current).focus(),C.current=!1)},[y]);const{createPage:S,isCreatingPage:w,errorMessage:B}=function(e){const t=Object(i.useRef)(),[n,o]=Object(i.useState)(!1),[r,c]=Object(i.useState)(null);return Object(i.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:async function(n){o(!0),c(null);try{return t.current=(e=>{let t=!1;return{promise:new Promise((n,o)=>{e.then(e=>t?o({isCanceled:!0}):n(e),e=>o(t?{isCanceled:!0}:e))}),cancel(){t=!0}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw c(e.message||Object(j.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(s);return Object(i.createElement)("div",{tabIndex:-1,ref:O,className:"block-editor-link-control"},w&&Object(i.createElement)("div",{className:"block-editor-link-control__loading"},Object(i.createElement)(p.Spinner,null)," ",Object(j.__)("Creating"),"…"),(y||!t)&&!w&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(i.createElement)(Eb,{currentLink:t,className:"block-editor-link-control__search-input",placeholder:e,value:_,withCreateSuggestion:d,onCreateSuggestion:S,onChange:k,onSelect:e=>{var t;o(e),C.current=!(null===(t=O.current)||void 0===t||!t.contains(O.current.ownerDocument.activeElement)),E(!1)},showInitialSuggestions:l,allowDirectEntry:!r,showSuggestions:c,suggestionsQuery:m,withURLSuggestion:!f,createSuggestionButtonText:g},Object(i.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(i.createElement)(p.Button,{type:"submit",label:Object(j.__)("Submit"),icon:ub.a,className:"block-editor-link-control__search-submit"})))),B&&Object(i.createElement)(p.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},B)),t&&!y&&!w&&Object(i.createElement)(wb,{value:t,onEditClick:()=>E(!0)}),Object(i.createElement)(bb,{value:t,settings:n,onChange:o}))}Bb.ViewerFill=Sb;var Ib=Bb,xb=n(302),Tb=n(223),Nb=Object(p.withFilters)("editor.MediaUpload")(()=>null),Pb=function({fallback:e=null,children:t}){return Object(f.useSelect)(e=>{const{getSettings:t}=e(Mn);return!!t().mediaUpload},[])?t:e},Lb=Object(d.compose)([Object(f.withDispatch)(e=>{const{createNotice:t,removeNotice:n}=e(Pa.store);return{createNotice:t,removeNotice:n}}),Object(p.withFilters)("editor.MediaReplaceFlow")])(({mediaURL:e,mediaId:t,allowedTypes:n,accept:o,onSelect:r,onSelectURL:c,onFilesUpload:l=u.noop,name:a=Object(j.__)("Replace"),createNotice:s,removeNotice:d})=>{const[b,m]=Object(i.useState)(e),g=Object(f.useSelect)(e=>e(Mn).getSettings().mediaUpload,[]),h=Object(i.createRef)(),O=Object(u.uniqueId)("block-editor/media-replace-flow/error-notice/"),v=e=>{const t=document.createElement("div");t.innerHTML=Object(i.renderToString)(e);const n=t.textContent||t.innerText||"";setTimeout(()=>{s("error",n,{speak:!0,id:O,isDismissible:!0})},1e3)},k=e=>{r(e),m(e.url),Object(St.speak)(Object(j.__)("The media file has been replaced")),d(O)},_=e=>{e.keyCode===lc.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(i.createElement)(p.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>Object(i.createElement)(p.ToolbarButton,{ref:h,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:_},a),renderContent:({onClose:e})=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(i.createElement)(Nb,{value:t,onSelect:e=>k(e),allowedTypes:n,render:({open:e})=>Object(i.createElement)(p.MenuItem,{icon:xb.a,onClick:e},Object(j.__)("Open Media Library"))}),Object(i.createElement)(Pb,null,Object(i.createElement)(p.FormFileUpload,{onChange:e=>{(e=>{const t=e.target.files;l(t),g({allowedTypes:n,filesList:t,onFileChange:([e])=>{k(e)},onError:v})})(e)},accept:o,render:({openFileDialog:e})=>Object(i.createElement)(p.MenuItem,{icon:Tb.a,onClick:()=>{e()}},Object(j.__)("Upload"))}))),c&&Object(i.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:e=>{[lc.TAB,lc.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:e=>{[lc.TAB,lc.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(i.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(j.__)("Current media URL:")),Object(i.createElement)(Ib,{value:{url:b},settings:[],showSuggestions:!1,onChange:({url:e})=>{m(e),c(e),h.current.focus()}})))})}),Ab=n(207);function Rb({url:e,urlLabel:t,className:n}){const o=s()(n,"block-editor-url-popover__link-viewer-url");return e?Object(i.createElement)(p.ExternalLink,{className:o,href:e},t||Object(Va.filterURLForDisplay)(Object(Va.safeDecodeURI)(e))):Object(i.createElement)("span",{className:o})}function Mb({additionalControls:e,children:t,renderSettings:n,position:o="bottom center",focusOnMount:r="firstElement",...c}){const[a,s]=Object(i.useState)(!1),u=!!n&&a;return Object(i.createElement)(p.Popover,Object(l.a)({className:"block-editor-url-popover",focusOnMount:r,position:o},c),Object(i.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(i.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&Object(i.createElement)(p.Button,{className:"block-editor-url-popover__settings-toggle",icon:vi.a,label:Object(j.__)("Link settings"),onClick:()=>{s(!a)},"aria-expanded":a})),u&&Object(i.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},n())),e&&!u&&Object(i.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}Mb.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return Object(i.createElement)("form",Object(l.a)({className:s()("block-editor-url-popover__link-editor",t)},r),Object(i.createElement)(pb,{value:o,onChange:n,autocompleteRef:e}),Object(i.createElement)(p.Button,{icon:ub.a,label:Object(j.__)("Apply"),type:"submit"}))},Mb.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...c}){return Object(i.createElement)("div",Object(l.a)({className:s()("block-editor-url-popover__link-viewer",e)},c),Object(i.createElement)(Rb,{url:o,urlLabel:r,className:t}),n&&Object(i.createElement)(p.Button,{icon:Ab.a,label:Object(j.__)("Edit"),onClick:n}))};var Db=Mb;const Fb=({src:e,onChange:t,onSubmit:n,onClose:o})=>Object(i.createElement)(Db,{onClose:o},Object(i.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},Object(i.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(j.__)("URL"),placeholder:Object(j.__)("Paste or type URL"),onChange:t,value:e}),Object(i.createElement)(p.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:ub.a,label:Object(j.__)("Apply"),type:"submit"})));var Vb=Object(p.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:c,notices:l,isAppender:a,accept:d,addToGallery:b,multiple:m=!1,dropZoneUIOnly:g,disableDropZone:h,disableMediaButtons:O,onError:v,onSelect:k,onCancel:_,onSelectURL:y,onDoubleClick:E,onFilesPreUpload:C=u.noop,onHTMLDrop:S=u.noop,children:w}){const B=Object(f.useSelect)(e=>{const{getSettings:t}=e(Mn);return t().mediaUpload},[]),[I,x]=Object(i.useState)(""),[T,N]=Object(i.useState)(!1);Object(i.useEffect)(()=>{var t;x(null!==(t=null==e?void 0:e.src)&&void 0!==t?t:"")},[null==e?void 0:e.src]);const P=e=>{x(e.target.value)},L=()=>{N(!0)},A=()=>{N(!1)},R=e=>{e.preventDefault(),I&&y&&(y(I),A())},M=n=>{let o;if(C(n),m)if(b){let t=[];o=n=>{const o=(null!=e?e:[]).filter(e=>e.id?!t.some(({id:t})=>Number(t)===Number(e.id)):!t.some(({urlSlug:t})=>e.url.includes(t)));k(o.concat(n)),t=n.map(e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}})}}else o=k;else o=([e])=>k(e);B({allowedTypes:t,filesList:n,onFileChange:o,onError:v})},D=e=>{M(e.target.files)},F=(e,u)=>{let{instructions:d,title:b}=r;if(B||y||(d=Object(j.__)("To edit this block, you need permission to upload media.")),void 0===d||void 0===b){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,c=o&&"image"===n,l=o&&"video"===n;void 0===d&&B&&(d=Object(j.__)("Upload a media file or pick one from your media library."),r?d=Object(j.__)("Upload an audio file, pick one from your media library, or add one with a URL."):c?d=Object(j.__)("Upload an image file, pick one from your media library, or add one with a URL."):l&&(d=Object(j.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===b&&(b=Object(j.__)("Media"),r?b=Object(j.__)("Audio"):c?b=Object(j.__)("Image"):l&&(b=Object(j.__)("Video")))}const m=s()("block-editor-media-placeholder",n,{"is-appender":a});return Object(i.createElement)(p.Placeholder,{icon:o,label:b,instructions:d,className:m,notices:l,onClick:u,onDoubleClick:E,preview:c},e,w)},V=()=>h?null:Object(i.createElement)(p.DropZone,{onFilesDrop:M,onHTMLDrop:S}),H=()=>_&&Object(i.createElement)(p.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(j.__)("Cancel"),isLink:!0,onClick:_},Object(j.__)("Cancel")),z=()=>y&&Object(i.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(i.createElement)(p.Button,{className:"block-editor-media-placeholder__button",onClick:L,isPressed:T,isTertiary:!0},Object(j.__)("Insert from URL")),T&&Object(i.createElement)(Fb,{src:I,onChange:P,onSubmit:R,onClose:A}));return g||O?(g&&Bt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),Object(i.createElement)(Pb,null,V())):Object(i.createElement)(Pb,{fallback:F(z())},(()=>{const n=Object(i.createElement)(Nb,{addToGallery:b,gallery:m&&!(!t||0===t.length)&&t.every(e=>"image"===e||e.startsWith("image/")),multiple:m,onSelect:k,allowedTypes:t,value:Array.isArray(e)?e.map(({id:e})=>e):e.id,render:({open:e})=>Object(i.createElement)(p.Button,{isTertiary:!0,onClick:t=>{t.stopPropagation(),e()}},Object(j.__)("Media Library"))});if(B&&a)return Object(i.createElement)(i.Fragment,null,V(),Object(i.createElement)(p.FormFileUpload,{onChange:D,accept:d,multiple:m,render:({openFileDialog:e})=>{const t=Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.Button,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(j.__)("Upload")),n,z(),H());return F(t,e)}}));if(B){const e=Object(i.createElement)(i.Fragment,null,V(),Object(i.createElement)(p.FormFileUpload,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:D,accept:d,multiple:m},Object(j.__)("Upload")),n,z(),H());return F(e)}return F(n)})())}));const Hb=Object(i.forwardRef)((e,t)=>Object(i.createElement)(md,Object(l.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0})));Hb.Content=({value:e="",tagName:t="div",...n})=>Object(i.createElement)(t,n,e);var zb=Hb,Gb=Object(i.forwardRef)(({__experimentalVersion:e,...t},n)=>{if(2===e)return Object(i.createElement)(zb,Object(l.a)({ref:n},t));const{className:o,onChange:r,...c}=t;return Object(i.createElement)(Vi.a,Object(l.a)({ref:n,className:s()("block-editor-plain-text",o),onChange:e=>r(e.target.value)},c))});function Ub({property:e,viewport:t,desc:n}){const o=Object(d.useInstanceId)(Ub),r=n||Object(j.sprintf)(
|
68 |
/* translators: 1: property name. 2: viewport name. */
|
69 |
-
Object(j._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("span",{"aria-describedby":"rbc-desc-"+o},t.label),Object(i.createElement)(p.VisuallyHidden,{as:"span",id:"rbc-desc-"+o},r))}var
|
70 |
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
71 |
label:Object(j.__)("All")},viewports:d=[{id:"small",label:Object(j.__)("Small screens")},{id:"medium",label:Object(j.__)("Medium screens")},{id:"large",label:Object(j.__)("Large screens")}]}=e;if(!t||!n||!c)return null;const b=o||Object(j.sprintf)(
|
72 |
/* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
|
73 |
-
Object(j.__)("Use the same %s on all screensizes."),n),m=Object(j.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),f=c(Object(i.createElement)(
|
74 |
-
/* translators: 'Help text for the responsive mode toggle control.' */return Object(i.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(i.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(i.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(i.createElement)(p.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:b,checked:!a,onChange:r,help:m}),Object(i.createElement)("div",{className:s()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&f,a&&(l?l(d):d.map(e=>Object(i.createElement)(i.Fragment,{key:e.id},c(Object(i.createElement)(
|
75 |
-
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(j.__)("Tools")})),position:"bottom right",renderContent:()=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.NavigableMenu,{role:"menu","aria-label":Object(j.__)("Tools")},Object(i.createElement)(p.MenuItemsChoice,{value:n?"select":"edit",onSelect:r,choices:[{value:"edit",label:Object(i.createElement)(i.Fragment,null,Object(i.createElement)(qc.a,{icon:
|
76 |
/* translators: button label text should, if possible, be under 16 characters. */
|
77 |
-
children:Object(j.__)("Preview")};return Object(i.createElement)(p.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:c,toggleProps:l,icon:null},()=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Desktop"),icon:"Desktop"===o&&
|
78 |
/* translators: %d: number of blocks */
|
79 |
Object(j._n)("%d block","%d blocks",e.length),e.length)),Object(i.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(j.sprintf)(
|
80 |
/* translators: %d: number of words */
|
81 |
-
Object(j._n)("%d word","%d words",t),t))))}));function Om({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:o}=Object(f.useSelect)(t=>{var n,o;const r=t(Mn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==r||null===(n=r.value)||void 0===n?void 0:n[e],onUpdatePreferredStyleVariations:null!==(o=null==r?void 0:r.onChange)&&void 0!==o?o:null,styles:t(m.store).getBlockStyles(e)}},[e]),r=Object(i.useMemo)(()=>[{label:Object(j.__)("Not set"),value:""},...o.map(({label:e,name:t})=>({label:e,value:t}))],[o]),c=Object(i.useCallback)(t=>{n(e,t)},[e,n]);return n&&Object(i.createElement)(p.SelectControl,{options:r,value:t||"",label:Object(j.__)("Default Style"),onChange:c})}const jm=({clientId:e,blockName:t,hasBlockStyles:n,bubblesVirtually:o})=>{const r=Yl(e);return Object(i.createElement)("div",{className:"block-editor-block-inspector"},Object(i.createElement)(da,r),Object(i.createElement)(Sd,{blockClientId:e}),n&&Object(i.createElement)("div",null,Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Styles")},Object(i.createElement)(Ls,{clientId:e}),Object(m.hasBlockSupport)(t,"defaultStylePicker",!0)&&Object(i.createElement)(Om,{blockName:t}))),Object(i.createElement)(yo.Slot,{bubblesVirtually:o}),Object(i.createElement)("div",null,Object(i.createElement)(vm,{slotName:jo.slotName,bubblesVirtually:o})),Object(i.createElement)(fm,{key:"back"}))},vm=({slotName:e,bubblesVirtually:t})=>{const n=Object(p.__experimentalUseSlot)(e);return Boolean(n.fills&&n.fills.length)?Object(i.createElement)(p.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(j.__)("Advanced"),initialOpen:!1},Object(i.createElement)(jo.Slot,{bubblesVirtually:t})):null};var km=({showNoBlockSelectedMessage:e=!0,bubblesVirtually:t=!0})=>{const{count:n,hasBlockStyles:o,selectedBlockName:r,selectedBlockClientId:c,blockType:l}=Object(f.useSelect)(e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(Mn),{getBlockStyles:r}=e(m.store),c=t(),l=c&&o(c),i=l&&Object(m.getBlockType)(l),a=l&&r(l);return{count:n(),selectedBlockClientId:c,selectedBlockName:l,blockType:i,hasBlockStyles:a&&a.length>0}},[]);if(n>1)return Object(i.createElement)("div",{className:"block-editor-block-inspector"},Object(i.createElement)(hm,null),Object(i.createElement)(yo.Slot,{bubblesVirtually:t}));const a=r===Object(m.getUnregisteredTypeHandlerName)();return l&&c&&!a?Object(i.createElement)(jm,{clientId:c,blockName:l.name,hasBlockStyles:o,bubblesVirtually:t}):e?Object(i.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(j.__)("No block selected.")):null};function _m({children:e,__unstableContentRef:t}){const n=Object(d.useViewportMatch)("medium"),o=Object(f.useSelect)(e=>e(Mn).getSettings().hasFixedToolbar,[]);return Object(i.createElement)(ps,{__unstableContentRef:t},(o||!n)&&Object(i.createElement)(uu,{isFixed:!0}),Object(i.createElement)(pu,{__unstableContentRef:t}),Object(i.createElement)(p.Popover.Slot,{name:"block-toolbar",ref:ds(t)}),e)}var ym=n(270),Em=n.n(ym);const Cm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Sm(e){return e?e.replace(/^\s+|\s+$/g,""):""}var wm=n(170),Bm=n.n(wm),Im=xm;function xm(e){this.options=e||{}}xm.prototype.emit=function(e){return e},xm.prototype.visit=function(e){return this[e.type](e)},xm.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;o<r;o++)n+=this.visit(e[o]),t&&o<r-1&&(n+=this.emit(t));return n};var Tm=Nm;function Nm(e){Im.call(this,e)}Bm()(Nm,Im),Nm.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Nm.prototype.comment=function(e){return this.emit("",e.position)},Nm.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Nm.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Nm.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Nm.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Nm.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Nm.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Nm.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Nm.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Nm.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Nm.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Nm.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Nm.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Nm.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Nm.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Pm=Lm;function Lm(e){e=e||{},Im.call(this,e),this.indentation=e.indent}Bm()(Lm,Im),Lm.prototype.compile=function(e){return this.stylesheet(e)},Lm.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Lm.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Lm.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Lm.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Lm.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Lm.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Lm.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Lm.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Lm.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Lm.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Lm.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Lm.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Lm.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Lm.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Lm.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Lm.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Lm.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Am=function(e,t){try{const r=function(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function c(){const e={line:n,column:o};return function(t){return t.position=new l(e),m(),t}}function l(e){this.start=e,this.end={line:n,column:o},this.source=t.source}l.prototype.content=e;const i=[];function a(r){const c=new Error(t.source+":"+n+":"+o+": "+r);if(c.reason=r,c.filename=t.source,c.line=n,c.column=o,c.source=e,!t.silent)throw c;i.push(c)}function s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){let t;const n=[];for(m(),p(n);e.length&&"}"!==e.charAt(0)&&(t=E()||C());)!1!==t&&(n.push(t),p(n));return n}function b(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){b(/^\s*/)}function p(e){let t;for(e=e||[];t=f();)!1!==t&&e.push(t);return e}function f(){const t=c();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return a("End of comment missing");const l=e.slice(2,n-2);return o+=2,r(l),e=e.slice(n),o+=2,t({type:"comment",comment:l})}function g(){const e=b(/^([^{]+)/);if(e)return Sm(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function h(){const e=c();let t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Sm(t[0]),!b(/^:\s*/))return a("property missing ':'");const n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Cm,""),value:n?Sm(n[0]).replace(Cm,""):""});return b(/^[;\s]*/),o}function O(){const e=[];if(!s())return a("missing '{'");let t;for(p(e);t=h();)!1!==t&&(e.push(t),p(e));return u()?e:a("missing '}'")}function j(){let e;const t=[],n=c();for(;e=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),b(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:O()})}const v=y("import"),k=y("charset"),_=y("namespace");function y(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=c(),o=b(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function E(){if("@"===e[0])return function(){const e=c();let t=b(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=b(/^([-\w]+)\s*/),!t)return a("@keyframes missing name");const o=t[1];if(!s())return a("@keyframes missing '{'");let r,l=p();for(;r=j();)l.push(r),l=l.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:l}):a("@keyframes missing '}'")}()||function(){const e=c(),t=b(/^@media *([^{]+)/);if(!t)return;const n=Sm(t[1]);if(!s())return a("@media missing '{'");const o=p().concat(d());return u()?e({type:"media",media:n,rules:o}):a("@media missing '}'")}()||function(){const e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Sm(t[1]),media:Sm(t[2])})}()||function(){const e=c(),t=b(/^@supports *([^{]+)/);if(!t)return;const n=Sm(t[1]);if(!s())return a("@supports missing '{'");const o=p().concat(d());return u()?e({type:"supports",supports:n,rules:o}):a("@supports missing '}'")}()||v()||k()||_()||function(){const e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Sm(t[1]),o=Sm(t[2]);if(!s())return a("@document missing '{'");const r=p().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):a("@document missing '}'")}()||function(){const e=c();if(!b(/^@page */))return;const t=g()||[];if(!s())return a("@page missing '{'");let n,o=p();for(;n=h();)o.push(n),o=o.concat(p());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=c();if(!b(/^@host\s*/))return;if(!s())return a("@host missing '{'");const t=p().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}()||function(){const e=c();if(!b(/^@font-face\s*/))return;if(!s())return a("@font-face missing '{'");let t,n=p();for(;t=h();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}()}function C(){const e=c(),t=g();return t?(p(),e({type:"rule",selectors:t,declarations:O()})):a("selector missing")}return function e(t,n){const o=t&&"string"==typeof t.type,r=o?t:n;for(const n in t){const o=t[n];Array.isArray(o)?o.forEach((function(t){e(t,r)})):o&&"object"==typeof o&&e(o,r)}return o&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null}),t}(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:i}}}())}(e);return n=Em.a.map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((o=o||{}).compress?new Tm(o):new Pm(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o};function Rm(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function Mm(e,t){return new URL(e,t).toString()}const Dm=/^(body|html|:root).*$/;var Fm=(e,t="")=>Object(u.map)(e,({css:e,baseURL:n,__experimentalNoWrapper:o=!1})=>{const r=[];return t&&!o&&r.push(((e,t=[])=>n=>"rule"===n.type?{...n,selectors:n.selectors.map(n=>t.includes(n.trim())?n:n.match(Dm)?n.replace(/^(body|html|:root)/,e):e+" "+n)}:n)(t)),n&&r.push((c=n,e=>{if("declaration"===e.type){const r=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Rm(e)&&o.push(e)}return o}(e.value).map((o=c,e=>({...e,newUrl:"url("+e.before+e.quote+Mm(e.value,o)+e.quote+e.after+")"})));return{...e,value:(t=e.value,n=r,n.forEach(e=>{t=t.replace(e.source,e.newUrl)}),t)}}var t,n,o;return e})),r.length?Am(e,Object(d.compose)(r)):e;var c});function Vm(e){return Object(i.useCallback)(e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(".editor-styles-wrapper"),c=n.getComputedStyle(r,null).getPropertyValue("background-color");No()(c).getLuminance()>.5?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")},[e])}function Hm({styles:e}){const t=Object(i.useMemo)(()=>Fm(e,".editor-styles-wrapper"),[e]);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("style",{ref:Vm(e)}),t.map((e,t)=>Object(i.createElement)("style",{key:t},e)))}var zm=function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:c,onSelect:l=u.noop,shouldFocusBlock:a=!1}){const s=Object(f.useSelect)(n=>{const{getBlockRootClientId:o}=n(Mn);return e||o(t)||void 0},[t,e]);return Object(i.createElement)(Ja,{onSelect:l,rootClientId:s,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:c,shouldFocusBlock:a})};function Gm(){const{clientIds:e,rootClientId:t}=Object(f.useSelect)(e=>{const{getSelectedBlockClientIds:t,getBlockRootClientId:n}=e(Mn),o=t(),[r]=o;return{clientIds:o,rootClientId:n(r)}},[]),{duplicateBlocks:n,removeBlocks:o,insertAfterBlock:r,insertBeforeBlock:c,clearSelectedBlock:l,moveBlocksUp:a,moveBlocksDown:s}=Object(f.useDispatch)(Mn);return Object(Os.useShortcut)("core/block-editor/move-up",Object(i.useCallback)(n=>{n.preventDefault(),a(e,t)},[e,a]),{bindGlobal:!0,isDisabled:0===e.length}),Object(Os.useShortcut)("core/block-editor/move-down",Object(i.useCallback)(n=>{n.preventDefault(),s(e,t)},[e,s]),{bindGlobal:!0,isDisabled:0===e.length}),Object(Os.useShortcut)("core/block-editor/duplicate",Object(i.useCallback)(t=>{t.preventDefault(),n(e)},[e,n]),{bindGlobal:!0,isDisabled:0===e.length}),Object(Os.useShortcut)("core/block-editor/remove",Object(i.useCallback)(t=>{t.preventDefault(),o(e)},[e,o]),{bindGlobal:!0,isDisabled:0===e.length}),Object(Os.useShortcut)("core/block-editor/insert-after",Object(i.useCallback)(t=>{t.preventDefault(),r(Object(u.last)(e))},[e,r]),{bindGlobal:!0,isDisabled:0===e.length}),Object(Os.useShortcut)("core/block-editor/insert-before",Object(i.useCallback)(t=>{t.preventDefault(),c(Object(u.first)(e))},[e,c]),{bindGlobal:!0,isDisabled:0===e.length}),Object(Os.useShortcut)("core/block-editor/delete-multi-selection",Object(i.useCallback)(t=>{t.preventDefault(),o(e)},[e,o]),{isDisabled:e.length<2}),Object(Os.useShortcut)("core/block-editor/unselect",Object(i.useCallback)(e=>{e.preventDefault(),l(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()},[e,l]),{isDisabled:e.length<2}),null}Gm.Register=function(){const{registerShortcut:e}=Object(f.useDispatch)(Os.store);return Object(i.useEffect)(()=>{e({name:"core/block-editor/duplicate",category:"block",description:Object(j.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(j.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(j.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(j.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(j.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(j.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(j.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(j.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(j.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(j.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})},[e]),null};var Um=Gm;function Wm(){return Bt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in."}),null}const Km=new Set([lc.UP,lc.RIGHT,lc.DOWN,lc.LEFT,lc.ENTER,lc.BACKSPACE]);function $m(){const e=Object(f.useSelect)(e=>e(Mn).isTyping()),{stopTyping:t}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(n=>{if(!e)return;const{ownerDocument:o}=n;let r,c;function l(e){const{clientX:n,clientY:o}=e;r&&c&&(r!==n||c!==o)&&t(),r=n,c=o}return o.addEventListener("mousemove",l),()=>{o.removeEventListener("mousemove",l)}},[e,t])}function qm(){const e=Object(f.useSelect)(e=>e(Mn).isTyping()),{startTyping:t,stopTyping:n}=Object(f.useDispatch)(Mn),o=$m(),r=Object(d.useRefEffect)(o=>{const{ownerDocument:r}=o,{defaultView:c}=r;if(e){let e;function l(t){const{target:o}=t;e=c.setTimeout(()=>{Object(di.isTextField)(o)||n()})}function i(e){const{keyCode:t}=e;t!==lc.ESCAPE&&t!==lc.TAB||n()}function a(){const e=c.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return o.addEventListener("focus",l),o.addEventListener("keydown",i),r.addEventListener("selectionchange",a),()=>{c.clearTimeout(e),o.removeEventListener("focus",l),o.removeEventListener("keydown",i),r.removeEventListener("selectionchange",a)}}function s(e){const{type:n,target:r}=e;Object(di.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&Km.has(t)}(e))&&t()}return o.addEventListener("keypress",s),o.addEventListener("keydown",s),()=>{o.removeEventListener("keypress",s),o.removeEventListener("keydown",s)}},[e,t,n]);return Object(d.useMergeRefs)([o,r])}var Ym=function({children:e}){return Object(i.createElement)("div",{ref:qm()},e)};function Xm(){return Bt()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}const Qm=-1!==window.navigator.userAgent.indexOf("Trident"),Zm=new Set([lc.UP,lc.DOWN,lc.LEFT,lc.RIGHT]);function Jm(){const e=Object(f.useSelect)(e=>e(Mn).hasSelectedBlock());return Object(d.useRefEffect)(t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,c,l;function i(){r||(r=o.requestAnimationFrame(()=>{b(),r=null}))}function a(e){c&&o.cancelAnimationFrame(c),c=o.requestAnimationFrame(()=>{s(e),c=null})}function s({keyCode:e}){if(!m())return;const r=Object(di.computeCaretRect)(o);if(!r)return;if(!l)return void(l=r);if(Zm.has(e))return void(l=r);const c=r.top-l.top;if(0===c)return;const i=Object(di.getScrollContainer)(t);if(!i)return;const a=i===n.body,s=a?o.scrollY:i.scrollTop,u=a?0:i.getBoundingClientRect().top,d=a?l.top/o.innerHeight:(l.top-u)/(o.innerHeight-u);if(0===s&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(l=r);const b=a?o.innerHeight:i.clientHeight;l.top+l.height>u+b||l.top<u?l=r:a?o.scrollBy(0,c):i.scrollTop+=c}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),b()}function b(){m()&&(l=Object(di.computeCaretRect)(o))}function m(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",i,!0),o.addEventListener("resize",i,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",s),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",i,!0),o.removeEventListener("resize",i,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",s),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(c)}},[e])}var ep=Qm?e=>e.children:function({children:e}){return Object(i.createElement)("div",{ref:Jm(),className:"block-editor__typewriter"},e)};function tp(e,t){const n="start"===t?"firstChild":"lastChild",o="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[o];)e=e[o];return e}function np(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r}=e(Mn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r()}}function op(){const e=Object(i.useRef)(),{isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r}=Object(f.useSelect)(np,[]),{selectBlock:c}=Object(f.useDispatch)(Mn),l=_r(r),a=_r(Object(u.first)(n)),s=_r(Object(u.last)(n));return Object(i.useEffect)(()=>{const{ownerDocument:c}=e.current,{defaultView:i}=c;if(!o||t){if(!r||t)return;const e=i.getSelection();if(e.rangeCount&&!e.isCollapsed){const t=l.current,{startContainer:n,endContainer:o}=e.getRangeAt(0);!t||t.contains(n)&&t.contains(o)||e.removeAllRanges()}return}const{length:u}=n;if(u<2)return;e.current.focus();const d=i.getSelection(),b=c.createRange(),m=tp(a.current,"start"),p=tp(s.current,"end");var f;f=e.current,Array.from(f.querySelectorAll(".rich-text")).forEach(e=>{e.removeAttribute("contenteditable")}),b.setStartBefore(m),b.setEndAfter(p),d.removeAllRanges(),d.addRange(b)},[o,t,n,c,r]),e}const rp={position:"fixed"};function cp(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function lp(e,t,n,o){let r,c=di.focus.focusable.find(n);return t&&(c=Object(u.reverse)(c)),c=c.slice(c.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),Object(u.find)(c,(function(e){if(!di.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}))}function ip(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:o,getNextBlockClientId:r,getFirstMultiSelectedBlockClientId:c,getLastMultiSelectedBlockClientId:l,getSettings:i,hasMultiSelection:a}=Object(f.useSelect)(Mn),{multiSelect:s,selectBlock:u}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(d=>{let b;function m(){b=null}function p(c){const l=e(),i=t(),a=n(),d=o(a||l),b=r(a||l),m=c?d:b;m&&(i===m?u(m):s(i||l,m))}function f(e){const t=c(),n=l(),o=e?t:n;o&&u(o)}function g(t){const{keyCode:c,target:l}=t,s=c===lc.UP,u=c===lc.DOWN,m=c===lc.LEFT,g=c===lc.RIGHT,h=s||m,O=m||g,j=s||u,v=O||j,k=t.shiftKey,_=k||t.ctrlKey||t.altKey||t.metaKey,y=j?di.isVerticalEdge:di.isHorizontalEdge,{ownerDocument:E}=d,{defaultView:C}=E;if(a())return void(v&&((k?p:f)(h),t.preventDefault()));if(j?b||(b=Object(di.computeCaretRect)(C)):b=null,t.defaultPrevented)return;if(!v)return;if(!function(e,t,n){if((t===lc.UP||t===lc.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(l,c,_))return;const S=Object(di.isRTL)(l)?!h:h,{keepCaretInsideBlock:w}=i(),B=e();if(k){const e=n(),c=o(e||B),i=r(e||B);(h&&c||!h&&i)&&function(e,t){const n=lp(e,t,d);return!(n&&(o=e,r=n,o.closest(".wp-block")===r.closest(".wp-block")));var o,r}(l,h)&&y(l,h)&&(p(h),t.preventDefault())}else if(j&&Object(di.isVerticalEdge)(l,h)&&!w){const e=lp(l,h,d,!0);e&&(Object(di.placeCaretAtVerticalEdge)(e,h,b),t.preventDefault())}else if(O&&C.getSelection().isCollapsed&&Object(di.isHorizontalEdge)(l,S)&&!w){const e=lp(l,S,d);Object(di.placeCaretAtHorizontalEdge)(e,h),t.preventDefault()}}return d.addEventListener("mousedown",m),d.addEventListener("keydown",g),()=>{d.removeEventListener("mousedown",m),d.removeEventListener("keydown",g)}},[])}function ap(){const e=Object(i.useRef)(),{getBlockOrder:t,getSelectedBlockClientIds:n,getBlockRootClientId:o}=Object(f.useSelect)(Mn),{multiSelect:r}=Object(f.useDispatch)(Mn),c=Object(i.useCallback)(e=>{const c=n();if(!c.length)return;if(1===c.length&&!Object(di.isEntirelySelected)(e.target))return;const[l]=c,i=o(l);let a=t(i);c.length===a.length&&(a=t(o(i)));const s=Object(u.first)(a),d=Object(u.last)(a);s!==d&&(r(s,d),e.preventDefault())},[]);return Object(Os.useShortcut)("core/block-editor/select-all",c,{target:e}),e}function sp({children:e}){const[t,n,o]=function(){const e=Object(i.useRef)(),t=Object(i.useRef)(),n=Object(i.useRef)(),o=Object(i.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:c}=Object(f.useSelect)(Mn),{setNavigationMode:l}=Object(f.useDispatch)(Mn),a=Object(f.useSelect)(e=>e(Mn).isNavigationMode(),[])?void 0:"0",s=Object(i.useRef)();function u(t){if(s.current)s.current=null;else if(r())e.current.focus();else if(c())o.current.focus();else{l(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";di.focus.tabbable[n](t.target).focus()}}const b=Object(i.createElement)("div",{ref:t,tabIndex:a,onFocus:u,style:rp}),m=Object(i.createElement)("div",{ref:n,tabIndex:a,onFocus:u,style:rp}),p=Object(d.useRefEffect)(e=>{function i(e){if(e.keyCode===lc.ESCAPE&&!r())return void l(!0);if(e.keyCode!==lc.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!c())return;if(cp(e.target)&&cp(di.focus.tabbable[i](e.target)))return;const a=o?t:n;s.current=!0,a.current.focus()}function a(e){o.current=e.target}return e.addEventListener("keydown",i),e.addEventListener("focusout",a),()=>{e.removeEventListener("keydown",i),e.removeEventListener("focusout",a)}},[]);return[b,Object(d.useMergeRefs)([e,p]),m]}(),r=Object(f.useSelect)(e=>e(Mn).hasMultiSelection(),[]);return Object(i.createElement)(i.Fragment,null,t,Object(i.createElement)("div",{ref:Object(d.useMergeRefs)([n,op(),ap(),ip()]),className:"block-editor-writing-flow",tabIndex:r?"0":void 0,"aria-label":r?Object(j.__)("Multiple selected blocks"):void 0},e),o)}const up=Object(u.overEvery)([di.isTextField,di.focus.tabbable.isTabbableIndex]);function dp(){return Object(d.useRefEffect)(e=>{function t(t){if(t.target!==e)return;const n=di.focus.focusable.find(e),o=Object(u.findLast)(n,up);if(!o)return;const{bottom:r}=o.getBoundingClientRect();t.clientY<r||(Object(di.placeCaretAtHorizontalEdge)(o,!0),t.preventDefault())}return e.addEventListener("mousedown",t),()=>{e.addEventListener("mousedown",t)}},[])}function bp(e){e.dir=document.dir,e.body.className="editor-styles-wrapper";for(const t of document.body.classList)t.startsWith("admin-color-")&&e.body.classList.add(t)}function mp(e){return Object(i.useMemo)(()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)},[e])}var pp=Object(i.forwardRef)((function({contentRef:e,children:t,head:n,...o},r){const[c,a]=Object(i.useState)(),s=mp(window.__editorAssets.styles),u=mp(window.__editorAssets.scripts),b=gu(),m=Object(i.useCallback)(t=>{function n(){const{contentDocument:n}=t,{readyState:o,body:r,documentElement:c}=n;return("interactive"===o||"complete"===o)&&("function"==typeof e?e(r):e&&(e.current=r),bp(n),function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],c={};for(const t in e)c[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();c.clientX+=e.left,c.clientY+=e.top}const l=new r(e.type,c);!n.dispatchEvent(l)&&e.preventDefault()}const r=["keydown","keypress","dragover"];for(const t of r)e.addEventListener(t,o)}(n),bp(n),a(n),b(c),b(r),u.reduce((e,t)=>e.then(()=>async function(e,{id:t,src:n}){return new Promise((o,r)=>{const c=e.createElement("script");c.id=t,n?(c.src=n,c.onload=()=>o(),c.onerror=()=>r()):o(),e.head.appendChild(c)})}(n,t)),Promise.resolve()),!0)}t&&(n()||t.addEventListener("load",()=>{n()}))},[]);return Object(i.useEffect)(()=>{var e;c&&(e=c,Array.from(document.styleSheets).forEach(t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;o&&Array.from(o).find(({selectorText:e})=>e&&(e.includes(".editor-styles-wrapper")||e.includes(".wp-block")))&&!e.getElementById(n.id)&&(console.error(`Stylesheet ${n.id} was not properly added.\nFor blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).\nFor themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`,n),e.head.appendChild(n.cloneNode(!0)))}))},[c]),n=Object(i.createElement)(i.Fragment,null,Object(i.createElement)("style",null,"body{margin:0}"),s.map(({tagName:e,href:t,id:n,rel:o,media:r},c)=>{const l=e.toLowerCase();return Object(i.createElement)(l,{href:t,id:n,rel:o,media:r,key:c})}),n),Object(i.createElement)("iframe",Object(l.a)({},o,{ref:Object(d.useMergeRefs)([r,m]),tabIndex:"0",title:Object(j.__)("Editor canvas"),name:"editor-canvas"}),c&&Object(i.createPortal)(Object(i.createElement)(p.__experimentalStyleProvider,{document:c},t),c.body),c&&Object(i.createPortal)(n,c.head))}));const fp=Object(i.createContext)({});function gp(e,t=""){var n;const o=Object(i.useContext)(fp),{name:r}=O();t=t||r;const c=Boolean(null===(n=o[t])||void 0===n?void 0:n.has(e)),l=Object(i.useMemo)(()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(o,t,e),[o,t,e]);return[c,Object(i.useCallback)(({children:e})=>Object(i.createElement)(fp.Provider,{value:l},e),[l])]}function hp(e){if(void 0===e)e=k.colors;else{const t=e.filter(e=>e.color);0===t.length?e=k.colors:t.length<e.length&&(e=t)}return e}function Op(e){if(void 0===e)e=k.gradients;else{const t=e.filter(e=>e.gradient);0===t.length?e=k.gradients:t.length<e.length&&(e=t)}return e}},45:function(e,t){e.exports=window.wp.htmlEntities},50:function(e,t,n){e.exports=function(e,t){var n,o,r=0;function c(){var c,l,i=n,a=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(l=0;l<a;l++)if(i.args[l]!==arguments[l]){i=i.next;continue e}return i!==n&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=n,i.prev=null,n.prev=i,n=i),i.val}i=i.next}for(c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];return i={args:c,val:e.apply(null,c)},n?(n.prev=i,i.next=n):o=i,r===t.maxSize?(o=o.prev).next=null:r++,n=i,i.val}return t=t||{},c.clear=function(){n=null,o=null,r=0},c}},51:function(e,t){e.exports=window.wp.isShallowEqual},6:function(e,t){e.exports=window.wp.primitives},7:function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return o}))},8:function(e,t){e.exports=window.wp.blocks},9:function(e,t){e.exports=window.wp.compose},97:function(e,t,n){"use strict";t.__esModule=!0;var o=n(190);t.default=o.TextareaAutosize}});
|
1 |
+
window.wp=window.wp||{},window.wp.blockEditor=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=412)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var c=typeof o;if("string"===c||"number"===c)e.push(o);else if(Array.isArray(o))e.push(r.apply(null,o));else if("object"===c)for(var l in o)n.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?e.exports=r:void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},100:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=c},101:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},11:function(e,t){e.exports=window.React},111:function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(183)),c=o(n(184)),l=n(11),i=o(l),a=o(n(155)),s=o(n(186)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=l.useState(!1)[1];return l.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return u.fun(e)?e.apply(void 0,n):e}function f(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return r({to:t},e);var n=Object.keys(e).reduce((function(n,o){var c;return u.und(t[o])?r({},n,((c={})[o]=e[o],c)):n}),{});return r({to:t},n)}var g,h,O=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),j=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}return a(t,e),t}(O),v=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.removeChild(s(t))}))},t}a(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var o=this.payload[n];(!e||o instanceof O)&&(t[n]=o instanceof O?o[e?"getAnimatedValue":"getValue"]():o)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(O);function k(e,t){g={fn:e,transform:t}}function _(e){h=e}var y,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},C=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function S(e){y=e}var w,B=function(){return Date.now()};function I(e){w=e}var x,T,N=function(e){return e.current};function P(e){x=e}var L=Object.freeze({get applyAnimatedValues(){return g},injectApplyAnimatedValues:k,get colorNames(){return h},injectColorNames:_,get requestFrame(){return E},get cancelFrame(){return C},injectFrame:function(e,t){E=e,C=t},get interpolation(){return y},injectStringInterpolator:S,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return w},injectDefaultElement:I,get animatedApi(){return N},injectAnimatedApi:function(e){N=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:P,get manualFrameloop(){return T},injectManualFrameloop:function(e){T=e}}),A=function(e){function t(t,n){var o;return(o=e.call(this)||this).update=void 0,o.payload=t.style?r({},t,{style:x(t.style)}):t,o.update=n,o.attach(),o}return a(t,e),t}(v),R=!1,M=new Set,D=function e(){if(!R)return!1;var t=B(),n=M,o=Array.isArray(n),r=0;for(n=o?n:n[Symbol.iterator]();;){var c;if(o){if(r>=n.length)break;c=n[r++]}else{if((r=n.next()).done)break;c=r.value}for(var l=c,i=!1,a=0;a<l.configs.length;a++){for(var s=l.configs[a],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var m=s.animatedValues[b];if(!m.done){var p=s.fromValues[b],f=s.toValues[b],g=m.lastPosition,h=f instanceof O,j=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(h&&(f=f.getValue()),s.immediate)m.setValue(f),m.done=!0;else if("string"!=typeof p&&"string"!=typeof f){if(void 0!==s.duration)g=p+s.easing((t-m.startTime)/s.duration)*(f-p),u=t>=m.startTime+s.duration;else if(s.decay)g=p+j/(1-.998)*(1-Math.exp(-(1-.998)*(t-m.startTime))),(u=Math.abs(m.lastPosition-g)<.1)&&(f=g);else{d=void 0!==m.lastTime?m.lastTime:t,j=void 0!==m.lastVelocity?m.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),k=0;k<v;++k)g+=1*(j+=(-s.tension*(g-f)+-s.friction*j)/s.mass*1/1e3)/1e3;var _=!(!s.clamp||0===s.tension)&&(p<f?g>f:g<f),y=Math.abs(j)<=s.precision,C=0===s.tension||Math.abs(f-g)<=s.precision;u=_||y&&C,m.lastVelocity=j,m.lastTime=t}h&&!s.toValues[b].done&&(u=!1),u?(m.value!==f&&(g=f),m.done=!0):i=!0,m.setValue(g),m.lastPosition=g}else m.setValue(f),m.done=!0}}l.props.onFrame&&(l.values[s.name]=s.interpolation.getValue())}l.props.onFrame&&l.props.onFrame(l.values),i||(M.delete(l),l.stop(!0))}return M.size?T?T():E(e):R=!1,R};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(y&&"string"==typeof e.output[0])return y(e);var o=e,r=o.output,c=o.range||[0,1],l=o.extrapolateLeft||o.extrapolate||"extend",i=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,o,r,c,l,i,a){var s=a?a(e):e;if(s<t){if("identity"===l)return s;"clamp"===l&&(s=t)}if(s>n){if("identity"===i)return s;"clamp"===i&&(s=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t),s=c(s),o===-1/0?s=-s:r===1/0?s+=o:s=s*(r-o)+o,s)}(e,c[t],c[t+1],r[t],r[t+1],a,l,i,o.map)}}var V=function(e){function t(n,o,r){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof j&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(o,r),c}a(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(j),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}a(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(O),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}a(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,o){return n.payload[o].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(j),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=f(e),n=t.delay,o=void 0===n?0:n,l=t.to,i=c(t,["delay","to"]);if(u.arr(l)||u.fun(l))this.queue.push(r({},i,{delay:o,to:l}));else if(l){var a={};Object.entries(l).forEach((function(e){var t,n=e[0],c=e[1],l=r({to:(t={},t[n]=c,t),delay:p(o,n)},i),s=a[l.delay]&&a[l.delay].to;a[l.delay]=r({},a[l.delay],l,{to:r({},s,l.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,o=void 0===n?{}:n,c=e.to,l=void 0===c?{}:c;u.obj(o)&&(t.merged=r({},o,t.merged)),u.obj(l)&&(t.merged=r({},t.merged,l))}));var n=this.local=++this.guid,o=this.localQueue=this.queue;this.queue=[],o.forEach((function(r,l){var i=r.delay,a=c(r,["delay"]),s=function(r){l===o.length-1&&n===t.guid&&r&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);i?setTimeout((function(){n===t.guid&&(d?t.runAsync(a,s):t.diff(a).start(s))}),i):d?t.runAsync(a,s):t.diff(a).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,M.has(this)||M.add(this),R||(R=!0,E(T||D));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,M.has(this)&&M.delete(this)),this},t.runAsync=function(e,t){var n=this,o=(e.delay,c(e,["delay"])),l=this.local,i=Promise.resolve(void 0);if(u.arr(o.to))for(var a=function(e){var t=e,c=r({},o,f(o.to[t]));u.arr(c.config)&&(c.config=c.config[t]),i=i.then((function(){if(l===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<o.to.length;s++)a(s);else if(u.fun(o.to)){var d,b=0;i=i.then((function(){return o.to((function(e){var t=r({},o,f(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,l===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=r({},this.props,e);var n=this.props,o=n.from,c=void 0===o?{}:o,l=n.to,i=void 0===l?{}:l,a=n.config,s=void 0===a?{}:a,d=n.reverse,f=n.attach,g=n.reset,O=n.immediate;if(d){var j=[i,c];c=j[0],i=j[1]}this.merged=r({},c,this.merged,i),this.hasChanged=!1;var v=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var o=n[0],l=n[1],i=e[o]||{},a=u.num(l),d=u.str(l)&&!l.startsWith("#")&&!/\d/.test(l)&&!h[l],f=u.arr(l),j=!a&&!f&&!d,k=u.und(c[o])?l:c[o],_=a||f||d?l:1,E=p(s,o);v&&(_=v.animations[o].parent);var C,S=i.parent,w=i.interpolation,I=m(v?_.getPayload():_),x=l;j&&(x=y({range:[0,1],output:[l,l]})(1));var T,N=w&&w.getValue(),P=!u.und(S)&&i.animatedValues.some((function(e){return!e.done})),L=!u.equ(x,N),A=!u.equ(x,i.previous),R=!u.equ(E,i.config);if(g||A&&L||R){var M;if(a||d)S=w=i.parent||new H(k);else if(f)S=w=i.parent||new z(k);else if(j){var D=i.interpolation&&i.interpolation.calc(i.parent.value);D=void 0===D||g?k:D,i.parent?(S=i.parent).setValue(0,!1):S=new H(0);var F={output:[D,l]};i.interpolation?(w=i.interpolation,i.interpolation.updateConfig(F)):w=S.interpolate(F)}return I=m(v?_.getPayload():_),C=m(S.getPayload()),g&&!j&&S.setValue(k,!1),t.hasChanged=!0,C.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=P?e.lastVelocity:void 0,e.lastTime=P?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(O,o)&&S.setValue(j?_:l,!1),r({},e,((M={})[o]=r({},i,{name:o,parent:S,interpolation:w,animatedValues:C,toValues:I,previous:x,config:E,fromValues:m(S.getValue()),immediate:p(O,o),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),M))}return L?e:(j&&(S.setValue(1,!1),w.updateConfig({output:[x,x]})),S.done=!0,t.hasChanged=!0,r({},e,((T={})[o]=r({},e[o],{previous:x}),T)))}),this.animations),this.hasChanged)for(var k in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[k]=this.animations[k].interpolation,this.values[k]=this.animations[k].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=l.useRef(!1),o=l.useRef(),r=u.fun(t),c=l.useMemo((function(){var n;return o.current&&(o.current.map((function(e){return e.destroy()})),o.current=void 0),[new Array(e).fill().map((function(e,o){var c=new U,l=r?p(t,o,c):t[o];return 0===o&&(n=l.ref),c.update(l),n||c.start(),c})),n]}),[e]),i=c[0],a=c[1];o.current=i,l.useImperativeHandle(a,(function(){return{start:function(){return Promise.all(o.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return o.current.forEach((function(t){return t.stop(e)}))},get controllers(){return o.current}}}));var s=l.useMemo((function(){return function(e){return o.current.map((function(t,n){t.update(r?p(e,n,t):e[n]),a||t.start()}))}}),[e]);l.useEffect((function(){n.current?r||s(t):a||o.current.forEach((function(e){return e.start()}))})),l.useEffect((function(){return n.current=!0,function(){return o.current.forEach((function(e){return e.destroy()}))}}),[]);var d=o.current.map((function(e){return e.getValues()}));return r?[d,s,function(e){return o.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,$=function(e,t){return("function"==typeof t?e.map(t):m(t)).map(String)},q=function(e){var t=e.items,n=e.keys,o=void 0===n?function(e){return e}:n,l=c(e,["items","keys"]);return t=m(void 0!==t?t:null),r({items:t,keys:$(t,o)},l)};function Y(e,t){var n=function(){if(r){if(c>=o.length)return"break";l=o[c++]}else{if((c=o.next()).done)return"break";l=c.value}var n=l.key,i=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},o=e.current.deleted,r=Array.isArray(o),c=0;for(o=r?o:o[Symbol.iterator]();;){var l;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof O||(t=g.transform(t)),n.payload=t,n}return a(t,e),t}(v),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),oe=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),re=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,le=/^#([0-9a-fA-F]{6})$/,ie=/^#([0-9a-fA-F]{8})$/;function ae(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}function se(e,t,n){var o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,c=ae(r,o,e+1/3),l=ae(r,o,e),i=ae(r,o,e-1/3);return Math.round(255*c)<<24|Math.round(255*l)<<16|Math.round(255*i)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function me(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,o="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=le.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=re.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ie.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),me(n[2]),me(n[3])))>>>0:(n=oe.exec(t))?(se(de(n[1]),me(n[2]),me(n[3]))|be(n[4]))>>>0:null;return null===o?e:"rgba("+((4278190080&(o=o||0))>>>24)+", "+((16711680&o)>>>16)+", "+((65280&o)>>>8)+", "+(255&o)/255+")"}var fe=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ge=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,he=new RegExp("("+Object.keys(Q).join("|")+")","g"),Oe={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},je=["Webkit","Ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Oe.hasOwnProperty(e)&&Oe[e]?(""+t).trim():t+"px"}Oe=Object.keys(Oe).reduce((function(e,t){return je.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Oe);var ke={};P((function(e){return new X(e)})),I("div"),S((function(e){var t=e.output.map((function(e){return e.replace(ge,pe)})).map((function(e){return e.replace(he,pe)})),n=t[0].match(fe).map((function(){return[]}));t.forEach((function(e){e.match(fe).forEach((function(e,t){return n[t].push(+e)}))}));var o=t[0].match(fe).map((function(t,o){return F(r({},e,{output:n[o]}))}));return function(e){var n=0;return t[0].replace(fe,(function(){return o[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,o,r){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(o)+", "+r+")"}))}})),_(Q),k((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,o=t.children,r=t.scrollTop,l=t.scrollLeft,i=c(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==r&&(e.scrollTop=r),void 0!==l&&(e.scrollLeft=l),void 0!==o&&(e.textContent=o),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=ve(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in i){var m=a?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(m)&&e.setAttribute(m,i[b])}}),(function(e){return e}));var _e,ye,Ee=(_e=function(e){return l.forwardRef((function(t,n){var o=d(),a=l.useRef(!0),s=l.useRef(null),b=l.useRef(null),m=l.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){b.current&&!1===g.fn(b.current,s.current.getAnimatedValue())&&o()})),t&&t.detach()}),[]);l.useEffect((function(){return function(){a.current=!1,s.current&&s.current.detach()}}),[]),l.useImperativeHandle(n,(function(){return N(b,a,o)})),m(t);var p=s.current.getValue(),f=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return i.createElement(e,r({},f,{ref:function(e){return b.current=(t=e,(o=n)&&(u.fun(o)?o(t):u.obj(o)&&(o.current=t)),t);var t,o}}))}))},void 0===(ye=!1)&&(ye=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ye?t[0].toLowerCase()+t.substring(1):t;return e[n]=_e(n),e}),_e)}),Ce=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=D,t.animated=Ce,t.a=Ce,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=L,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),o=n[0],r=n[1],c=n[2];return t?[o[0],r,c]:o},t.useTrail=function(e,t){var n=l.useRef(!1),o=u.fun(t),c=p(t),i=l.useRef(),a=W(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),r({},c,{config:p(c.config,e),attach:e>0&&function(){return i.current[e-1]}})})),s=a[0],d=a[1],b=a[2],m=l.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var o=e.reverse?t+1:t-1,l=i.current[o];return r({},e,{config:p(e.config||c.config,t),attach:l&&function(){return l}})}))}}),[e,c.reverse]);return l.useEffect((function(){n.current&&!o&&m(t)})),l.useEffect((function(){n.current=!0}),[]),o?[s,m,b]:s},t.useTransition=function(e,t,n){var o=r({items:e,keys:t||function(e){return e}},n),i=q(o),a=i.lazy,s=void 0!==a&&a,u=(i.unique,i.reset),b=void 0!==u&&u,m=(i.enter,i.leave,i.update,i.onDestroyed),f=(i.keys,i.items,i.onFrame),g=i.onRest,h=i.onStart,O=i.ref,j=c(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),k=l.useRef(!1),_=l.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!o.ref,instances:!k.current&&new Map,forceUpdate:v});return l.useImperativeHandle(o.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var n=e.first,o=e.prevProps,l=c(e,["first","prevProps"]),i=q(t),a=i.items,s=i.keys,u=i.initial,d=i.from,b=i.enter,m=i.leave,f=i.update,g=i.trail,h=void 0===g?0:g,O=i.unique,j=i.config,v=i.order,k=void 0===v?["enter","leave","update"]:v,_=q(o),y=_.keys,E=_.items,C=r({},l.current),S=[].concat(l.deleted),w=Object.keys(C),B=new Set(w),I=new Set(s),x=s.filter((function(e){return!B.has(e)})),T=l.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),N=s.filter((function(e){return B.has(e)})),P=-h;k.length;)switch(k.shift()){case"enter":x.forEach((function(e,t){O&&S.find((function(t){return t.originalKey===e}))&&(S=S.filter((function(t){return t.originalKey!==e})));var o=s.indexOf(e),r=a[o],c=n&&void 0!==u?"initial":"enter";C[e]={slot:c,originalKey:e,key:O?String(e):K++,item:r,trail:P+=h,config:p(j,r,c),from:p(n&&void 0!==u?u||{}:d,r),to:p(b,r)}}));break;case"leave":T.forEach((function(e){var t=y.indexOf(e),n=E[t];S.unshift(r({},C[e],{slot:"leave",destroyed:!0,left:y[Math.max(0,t-1)],right:y[Math.min(y.length,t+1)],trail:P+=h,config:p(j,n,"leave"),to:p(m,n)})),delete C[e]}));break;case"update":N.forEach((function(e){var t=s.indexOf(e),n=a[t];C[e]=r({},C[e],{item:n,slot:"update",trail:P+=h,config:p(j,n,"update"),to:p(f,n)})}))}var L=s.map((function(e){return C[e]}));return S.forEach((function(e){var t,n=e.left,o=(e.right,c(e,["left","right"]));-1!==(t=L.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),L=[].concat(L.slice(0,t),[o],L.slice(t))})),r({},l,{changed:x.length||T.length||N.length,first:n&&0===x.length,transitions:L,current:C,deleted:S,prevProps:t})}(_.current,o),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,n=e.from,o=e.to,c=e.config,l=e.trail,i=e.key,a=e.item;_.current.instances.has(i)||_.current.instances.set(i,new U);var u=_.current.instances.get(i),d=r({},j,{to:o,from:n,config:c,ref:O,onRest:function(n){_.current.mounted&&(e.destroyed&&(O||s||Y(_,i),m&&m(a)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(O||s)&&_.current.deleted.length>0&&Y(_),g&&g(a,t,n))},onStart:h&&function(){return h(a,t)},onFrame:f&&function(e){return f(a,t,e)},delay:l,reset:b&&"enter"===t});u.update(d),_.current.paused||u.start()})),l.useEffect((function(){return _.current.mounted=k.current=!0,function(){_.current.mounted=k.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,n=e.slot,o=e.key;return{item:t,key:o,state:n,props:_.current.instances.get(o).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var o=l.useRef();l.useEffect((function(){u.equ(e,o.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,o){var c=e.current;if(c){var l=c.controllers;if(l.length){var i=n*t[o];l.forEach((function(e){e.queue=e.queue.map((function(e){return r({},e,{delay:e.delay+i})})),e.start()}))}}})):e.reduce((function(e,t,n){var o=t.current;return e.then((function(){return o.start()}))}),Promise.resolve()),o.current=e}))},t.useSprings=W},117:function(e,t,n){"use strict";var o=n(0);t.a=function({icon:e,size:t=24,...n}){return Object(o.cloneElement)(e,{width:t,height:t,...n})}},118:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},12:function(e,t){e.exports=window.wp.keycodes},121:function(e,t,n){"use strict";e.exports=n(187)},122:function(e,t){e.exports=window.wp.wordcount},125:function(e,t){e.exports=window.wp.shortcode},132:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},133:function(e,t,n){"use strict";var o=n(134);function r(){}function c(){}c.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,c,l){if(l!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:r};return n.PropTypes=n,n}},134:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},141:function(e,t){e.exports=window.wp.blockSerializationDefaultParser},149:function(e,t){e.exports=window.wp.tokenList},154:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},155:function(e,t,n){var o=n(185);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},156:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},16:function(e,t){e.exports=window.wp.richText},170:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},18:function(e,t){e.exports=window.wp.hooks},182:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(r.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));t.a=c},183:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},184:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,o,r={},c=Object.keys(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||(r[n]=e[n]);return r},e.exports.default=e.exports,e.exports.__esModule=!0},185:function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,o)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},186:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},187:function(e,t,n){"use strict";var o=n(188);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,l=n.alignWithTop,i=n.alignWithLeft,a=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var b=o.isWindow(t),m=!(!b||!t.frameElement),p=o.offset(e),f=o.outerHeight(e),g=o.outerWidth(e),h=void 0,O=void 0,j=void 0,v=void 0,k=void 0,_=void 0,y=void 0,E=void 0,C=void 0,S=void 0;m&&(t=t.document.scrollingElement||t.document.body),b||m?(y=t,S=o.height(y),C=o.width(y),E={left:o.scrollLeft(y),top:o.scrollTop(y)},k={left:p.left-E.left-s,top:p.top-E.top-a},_={left:p.left+g-(E.left+C)+d,top:p.top+f-(E.top+S)+u},v=E):(h=o.offset(t),O=t.clientHeight,j=t.clientWidth,v={left:t.scrollLeft,top:t.scrollTop},k={left:p.left-(h.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-s,top:p.top-(h.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},_={left:p.left+g-(h.left+j+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:p.top+f-(h.top+O+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),k.top<0||_.top>0?!0===l?o.scrollTop(t,v.top+k.top):!1===l?o.scrollTop(t,v.top+_.top):k.top<0?o.scrollTop(t,v.top+k.top):o.scrollTop(t,v.top+_.top):c||((l=void 0===l||!!l)?o.scrollTop(t,v.top+k.top):o.scrollTop(t,v.top+_.top)),r&&(k.left<0||_.left>0?!0===i?o.scrollLeft(t,v.left+k.left):!1===i?o.scrollLeft(t,v.left+_.left):k.left<0?o.scrollLeft(t,v.left+k.left):o.scrollLeft(t,v.left+_.left):c||((i=void 0===i||!!i)?o.scrollLeft(t,v.left+k.left):o.scrollLeft(t,v.left+_.left)))}},188:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function c(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function l(e){return c(e)}function i(e){return c(e,!0)}function a(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,c=r.body,l=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=l.clientLeft||c.clientLeft||0,top:o-=l.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=l(o),t.top+=i(o),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left",b=void 0;function m(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,c=n||r.defaultView.getComputedStyle(e,null);return c&&(o=c.getPropertyValue(t)||c[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var o=e.style,r=o[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],o[d]="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o[d]=r,e.runtimeStyle[d]=c}return""===n?"auto":n});var f=["margin","border","padding"];function g(e,t,n){var o={},r=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o[c]=r[c],r[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(r[c]=o[c])}function h(e,t,n){var o=0,r=void 0,c=void 0,l=void 0;for(c=0;c<t.length;c++)if(r=t[c])for(l=0;l<n.length;l++){var i;i="border"===r?r+n[l]+"Width":r+n[l],o+=parseFloat(b(e,i))||0}return o}function O(e){return null!=e&&e==e.window}var j={};function v(e,t,n){if(O(e))return"width"===t?j.viewportWidth(e):j.viewportHeight(e);if(9===e.nodeType)return"width"===t?j.docWidth(e):j.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),l=0;(null==r||r<=0)&&(r=void 0,(null==(l=b(e,t))||Number(l)<0)&&(l=e.style[t]||0),l=parseFloat(l)||0),void 0===n&&(n=c?1:-1);var i=void 0!==r||c,a=r||l;if(-1===n)return i?a-h(e,["border","padding"],o):l;if(i){var s=2===n?-h(e,["border"],o):h(e,["margin"],o);return a+(1===n?0:s)}return l+h(e,f.slice(n),o)}m(["Width","Height"],(function(e){j["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],j["viewport"+e](n))},j["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,c=o.documentElement[n];return"CSS1Compat"===o.compatMode&&c||r&&r[n]||c}}));var k={position:"absolute",visibility:"hidden",display:"block"};function _(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):g(e,k,(function(){t=v.apply(void 0,n)})),t}function y(e,t,n){var o=n;if("object"!==(void 0===t?"undefined":r(t)))return void 0!==o?("number"==typeof o&&(o+="px"),void(e.style[t]=o)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&y(e,c,t[c])}m(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);j["outer"+t]=function(t,n){return t&&_(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];j[e]=function(t,o){return void 0===o?t&&_(t,e,-1):t?(b(t),p(t)&&(o+=h(t,["padding","border"],n)),y(t,e,o)):void 0}})),e.exports=o({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return a(e);!function(e,t){"static"===y(e,"position")&&(e.style.position="relative");var n=a(e),o={},r=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r=parseFloat(y(e,c))||0,o[c]=r+t[c]-n[c]);y(e,o)}(e,t)},isWindow:O,each:m,css:y,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(O(e)){if(void 0===t)return l(e);window.scrollTo(t,i(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(O(e)){if(void 0===t)return i(e);window.scrollTo(l(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},j)},189:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(r.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},19:function(e,t){e.exports=window.wp.url},190:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var i=n(11),a=n(23),s=n(191),u=n(192),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&s(e.textarea)})):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),s.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=l(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,u=n&&s?s*n:null;return i.createElement("textarea",c({},a,{onChange:this.onChange,style:u?c({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(i.Component);t.TextareaAutosize=i.forwardRef((function(e,t){return i.createElement(d,c({},e,{innerRef:t}))}))},191:function(e,t,n){var o,r;void 0===(r="function"==typeof(o=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function l(e){var t=r.get(e);t&&t.destroy()}function i(e){var t=r.get(e);t&&t.update()}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((a=function(e){return e}).destroy=function(e){return e},a.update=function(e){return e}):((a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t,n=null,o=null,l=null,i=function(){e.clientWidth!==o&&d()},a=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:a,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",o=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o<t?"hidden"===n.overflowY&&(s("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==o){l=o;var r=c("autosize:resized");try{e.dispatchEvent(r)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e}),t.default=a,e.exports=t.default})?o.apply(t,[e,t]):o)||(e.exports=r)},192:function(e,t,n){var o=n(193);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var c=e.nodeName,l=document.createElement(c);l.innerHTML=" ","TEXTAREA"===c.toUpperCase()&&l.setAttribute("rows","1");var i=o(e,"font-size");l.style.fontSize=i,l.style.padding="0px",l.style.border="0px";var a=document.body;a.appendChild(l),n=l.offsetHeight,a.removeChild(l)}return n}},193:function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},194:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=c},195:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=c},2:function(e,t){e.exports=window.lodash},207:function(e,t,n){"use strict";var o=n(0),r=n(6),c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},219:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},22:function(e,t){e.exports=window.wp.dom},220:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},221:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},222:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(r.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},223:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},23:function(e,t,n){e.exports=n(133)()},24:function(e,t){e.exports=window.wp.keyboardShortcuts},25:function(e,t){e.exports=window.wp.deprecated},268:function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return r.diff(e,t,n)},t.characterDiff=void 0;var r=new(((o=n(300))&&o.__esModule?o:{default:o}).default);t.characterDiff=r},269:function(e,t,n){"use strict";t.match=function(e,t){return a(e).some((function(e){var n=e.inverse,o="all"===e.type||t.type===e.type;if(o&&n||!o&&!n)return!1;var r=e.expressions.every((function(e){var n=e.feature,o=e.modifier,r=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===r.toLowerCase();case"width":case"height":case"device-width":case"device-height":r=d(r),c=d(c);break;case"resolution":r=u(r),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":r=s(r),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":r=parseInt(r,10)||1,c=parseInt(c,10)||0}switch(o){case"min":return c>=r;case"max":return c<=r;default:return c===r}}));return r&&!n||!r&&n}))},t.parse=a;var o=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,r=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,l=/(em|rem|px|cm|mm|in|pt|pc)?$/,i=/(dpi|dpcm|dppx)?$/;function a(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(o),n=t[1],l=t[2],i=t[3]||"",a={};return a.inverse=!!n&&"not"===n.toLowerCase(),a.type=l?l.toLowerCase():"all",i=i.match(/\([^\)]+\)/g)||[],a.expressions=i.map((function(e){var t=e.match(r),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),a}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(l)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},270:function(e,t){var n=e.exports=function(e){return new o(e)};function o(e){this.value=e}function r(e,t,n){var o=[],r=[],i=!0;return function e(d){var b=n?c(d):d,m={},p=!0,f={node:b,node_:d,path:[].concat(o),parent:r[r.length-1],parents:r,key:o.slice(-1)[0],isRoot:0===o.length,level:o.length,circular:null,update:function(e,t){f.isRoot||(f.parent.node[f.key]=e),f.node=e,t&&(p=!1)},delete:function(e){delete f.parent.node[f.key],e&&(p=!1)},remove:function(e){a(f.parent.node)?f.parent.node.splice(f.key,1):delete f.parent.node[f.key],e&&(p=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){i=!1},block:function(){p=!1}};if(!i)return f;function g(){if("object"==typeof f.node&&null!==f.node){f.keys&&f.node_===f.node||(f.keys=l(f.node)),f.isLeaf=0==f.keys.length;for(var e=0;e<r.length;e++)if(r[e].node_===d){f.circular=r[e];break}}else f.isLeaf=!0,f.keys=null;f.notLeaf=!f.isLeaf,f.notRoot=!f.isRoot}g();var h=t.call(f,f.node);return void 0!==h&&f.update&&f.update(h),m.before&&m.before.call(f,f.node),p?("object"!=typeof f.node||null===f.node||f.circular||(r.push(f),g(),s(f.keys,(function(t,r){o.push(t),m.pre&&m.pre.call(f,f.node[t],t);var c=e(f.node[t]);n&&u.call(f.node,t)&&(f.node[t]=c.node),c.isLast=r==f.keys.length-1,c.isFirst=0==r,m.post&&m.post.call(f,c),o.pop()})),r.pop()),m.after&&m.after.call(f,f.node),f):f}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(a(e))t=[];else if("[object Date]"===i(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===i(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===i(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===i(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===i(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===i(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},o=function(){};o.prototype=n,t=new o}return s(l(e),(function(n){t[n]=e[n]})),t}return e}o.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!u.call(t,o)){t=void 0;break}t=t[o]}return t},o.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!u.call(t,o))return!1;t=t[o]}return!0},o.prototype.set=function(e,t){for(var n=this.value,o=0;o<e.length-1;o++){var r=e[o];u.call(n,r)||(n[r]={}),n=n[r]}return n[e[o]]=t,t},o.prototype.map=function(e){return r(this.value,e,!0)},o.prototype.forEach=function(e){return this.value=r(this.value,e,!1),this.value},o.prototype.reduce=function(e,t){var n=1===arguments.length,o=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(o=e.call(this,o,t))})),o},o.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},o.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},o.prototype.clone=function(){var e=[],t=[];return function n(o){for(var r=0;r<e.length;r++)if(e[r]===o)return t[r];if("object"==typeof o&&null!==o){var i=c(o);return e.push(o),t.push(i),s(l(o),(function(e){i[e]=n(o[e])})),e.pop(),t.pop(),i}return o}(this.value)};var l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function i(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(l(o.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),r=new o(t);return r[e].apply(r,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},29:function(e,t){e.exports=window.wp.notices},295:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},296:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},297:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},298:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},299:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(r.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";var o,r;function c(e){return[e]}function l(){var e={clear:function(){e.head=null}};return e}function i(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}o={},r="undefined"!=typeof WeakMap,t.a=function(e,t){var n,a;function s(){n=r?new WeakMap:l()}function u(){var n,o,r,c,l,s=arguments.length;for(c=new Array(s),r=0;r<s;r++)c[r]=arguments[r];for(l=t.apply(null,c),(n=a(l)).isUniqueByDependants||(n.lastDependants&&!i(l,n.lastDependants,0)&&n.clear(),n.lastDependants=l),o=n.head;o;){if(i(o.args,c,1))return o!==n.head&&(o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n.head,o.prev=null,n.head.prev=o,n.head=o),o.val;o=o.next}return o={val:e.apply(null,c)},c[0]=null,o.args=c,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=c),a=r?function(e){var t,r,c,i,a,s=n,u=!0;for(t=0;t<e.length;t++){if(!(a=r=e[t])||"object"!=typeof a){u=!1;break}s.has(r)?s=s.get(r):(c=new WeakMap,s.set(r,c),s=c)}return s.has(o)||((i=l()).isUniqueByDependants=u,s.set(o,i)),s.get(o)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},300:function(e,t,n){"use strict";function o(){}function r(e,t,n,o,r){for(var c=0,l=t.length,i=0,a=0;c<l;c++){var s=t[c];if(s.removed){if(s.value=e.join(o.slice(a,a+s.count)),a+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&r){var d=n.slice(i,i+s.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(i,i+s.count));i+=s.count,s.added||(a+=s.count)}}var b=t[l-1];return l>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[l-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,o.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.callback;"function"==typeof n&&(o=n,n={}),this.options=n;var l=this;function i(e){return o?(setTimeout((function(){o(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=a+s,b=[{newPos:-1,components:[]}],m=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=a&&m+1>=s)return i([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var o=void 0,d=b[n-1],m=b[n+1],p=(m?m.newPos:0)-n;d&&(b[n-1]=void 0);var f=d&&d.newPos+1<a,g=m&&0<=p&&p<s;if(f||g){if(!f||g&&d.newPos<m.newPos?(o=c(m),l.pushComponent(o.components,void 0,!0)):((o=d).newPos++,l.pushComponent(o.components,!0,void 0)),p=l.extractCommon(o,t,e,n),o.newPos+1>=a&&p+1>=s)return i(r(l,o.components,t,e,l.useLongestToken));b[n]=o}else b[n]=void 0}u++}if(o)!function e(){setTimeout((function(){if(u>d)return o();p()||e()}),0)}();else for(;u<=d;){var f=p();if(f)return f}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,c=n.length,l=e.newPos,i=l-o,a=0;l+1<r&&i+1<c&&this.equals(t[l+1],n[i+1]);)l++,i++,a++;return a&&e.components.push({count:a}),e.newPos=l,i},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},301:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));t.a=c},302:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},303:function(e,t,n){"use strict";var o=n(0),r=n(6);const c=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));t.a=c},31:function(e,t){e.exports=window.wp.a11y},33:function(e,t){e.exports=window.wp.blob},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){var o;!function(r){var c=/^\s+/,l=/\s+$/,i=0,a=r.round,s=r.min,u=r.max,d=r.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,o,i={r:0,g:0,b:0},a=1,d=null,b=null,m=null,p=!1,f=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(l,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,n=e.g,o=e.b,i={r:255*P(t,255),g:255*P(n,255),b:255*P(o,255)},p=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(d=M(e.s),b=M(e.v),i=function(e,t,n){e=6*P(e,360),t=P(t,100),n=P(n,100);var o=r.floor(e),c=e-o,l=n*(1-t),i=n*(1-c*t),a=n*(1-(1-c)*t),s=o%6;return{r:255*[n,i,l,l,a,n][s],g:255*[a,n,n,i,l,l][s],b:255*[l,l,a,n,n,i][s]}}(e.h,d,b),p=!0,f="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(d=M(e.s),m=M(e.l),i=function(e,t,n){var o,r,c;function l(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=P(e,360),t=P(t,100),n=P(n,100),0===t)o=r=c=n;else{var i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;o=l(a,i,e+1/3),r=l(a,i,e),c=l(a,i,e-1/3)}return{r:255*o,g:255*r,b:255*c}}(e.h,d,m),p=!0,f="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=N(a),{ok:p,format:e.format||f,r:s(255,u(i.r,0)),g:s(255,u(i.g,0)),b:s(255,u(i.b,0)),a:a}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=i++}function m(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var o,r,c=u(e,t,n),l=s(e,t,n),i=(c+l)/2;if(c==l)o=r=0;else{var a=c-l;switch(r=i>.5?a/(2-c-l):a/(c+l),c){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,l:i}}function p(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var o,r,c=u(e,t,n),l=s(e,t,n),i=c,a=c-l;if(r=0===c?0:a/c,c==l)o=0;else{switch(c){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,v:i}}function f(e,t,n,o){var r=[R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16))];return o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function g(e,t,n,o){return[R(D(o)),R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16))].join("")}function h(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=L(n.s),b(n)}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=L(n.s),b(n)}function j(e){return b(e).desaturate(100)}function v(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=L(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-a(-t/100*255))),n.g=u(0,s(255,n.g-a(-t/100*255))),n.b=u(0,s(255,n.b-a(-t/100*255))),b(n)}function _(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=L(n.l),b(n)}function y(e,t){var n=b(e).toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var o=b(e).toHsl(),r=360/n,c=[b(e)];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,c.push(b(o));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),o=n.h,r=n.s,c=n.v,l=[],i=1/t;t--;)l.push(b({h:o,s:r,v:c})),c=(c+i)%1;return l}b.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,o=this.toRgb();return e=o.r/255,t=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=N(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),o=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=m(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=m(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),o=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,o,r){var c=[R(a(e).toString(16)),R(a(t).toString(16)),R(a(n).toString(16)),R(D(o))];return r&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*P(this._r,255))+"%",g:a(100*P(this._g,255))+"%",b:a(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*P(this._r,255))+"%, "+a(100*P(this._g,255))+"%, "+a(100*P(this._b,255))+"%)":"rgba("+a(100*P(this._r,255))+"%, "+a(100*P(this._g,255))+"%, "+a(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(T[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var r=b(e);n="#"+g(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0;return t||!o||"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 b(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(v,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(j,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:M(e[o]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var o=b(e).toRgb(),r=b(t).toRgb(),c=n/100;return b({r:(r.r-o.r)*c+o.r,g:(r.g-o.g)*c+o.g,b:(r.b-o.b)*c+o.b,a:(r.a-o.a)*c+o.a})},b.readability=function(e,t){var n=b(e),o=b(t);return(r.max(n.getLuminance(),o.getLuminance())+.05)/(r.min(n.getLuminance(),o.getLuminance())+.05)},b.isReadable=function(e,t,n){var o,r,c,l,i,a=b.readability(e,t);switch(r=!1,(c=n,"AA"!==(l=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==l&&(l="AA"),"small"!==(i=(c.size||"small").toLowerCase())&&"large"!==i&&(i="small"),o={level:l,size:i}).level+o.size){case"AAsmall":case"AAAlarge":r=a>=4.5;break;case"AAlarge":r=a>=3;break;case"AAAsmall":r=a>=7}return r},b.mostReadable=function(e,t,n){var o,r,c,l,i=null,a=0;r=(n=n||{}).includeFallbackColors,c=n.level,l=n.size;for(var s=0;s<t.length;s++)(o=b.readability(e,t[s]))>a&&(a=o,i=b(t[s]));return b.isReadable(e,i,{level:c,size:l})||!r?i:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.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"},T=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function N(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function P(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),r.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function L(e){return s(1,u(0,e))}function A(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function M(e){return e<=1&&(e=100*e+"%"),e}function D(e){return r.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,H,z,G=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),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 U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(o=function(){return b}.call(t,n,t,e))||(e.exports=o)}(Math)},412:function(e,t,n){"use strict";n.r(t),n.d(t,"__experimentalGetBorderClassesAndStyles",(function(){return Jc})),n.d(t,"__experimentalUseBorderProps",(function(){return el})),n.d(t,"__experimentalGetColorClassesAndStyles",(function(){return nl})),n.d(t,"__experimentalUseColorProps",(function(){return ol})),n.d(t,"__experimentalUseCustomSides",(function(){return Nc})),n.d(t,"getColorClassName",(function(){return Ao})),n.d(t,"getColorObjectByAttributeValues",(function(){return Po})),n.d(t,"getColorObjectByColorValue",(function(){return Lo})),n.d(t,"createCustomColorsHOC",(function(){return ll})),n.d(t,"withColors",(function(){return il})),n.d(t,"__experimentalUseColors",(function(){return hl})),n.d(t,"__experimentalGetGradientClass",(function(){return Mo})),n.d(t,"getGradientValueBySlug",(function(){return Do})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Fo})),n.d(t,"getGradientSlugByValue",(function(){return Vo})),n.d(t,"__experimentalUseGradient",(function(){return Ho})),n.d(t,"getFontSize",(function(){return Dr})),n.d(t,"getFontSizeClass",(function(){return Vr})),n.d(t,"getFontSizeObjectByValue",(function(){return Fr})),n.d(t,"FontSizePicker",(function(){return Hr})),n.d(t,"withFontSizes",(function(){return jl})),n.d(t,"AlignmentControl",(function(){return Sl})),n.d(t,"AlignmentToolbar",(function(){return wl})),n.d(t,"Autocomplete",(function(){return Wl})),n.d(t,"BlockAlignmentControl",(function(){return ao})),n.d(t,"BlockAlignmentToolbar",(function(){return so})),n.d(t,"__experimentalBlockFullHeightAligmentControl",(function(){return $l})),n.d(t,"__experimentalBlockAlignmentMatrixControl",(function(){return ql})),n.d(t,"BlockBreadcrumb",(function(){return Ql})),n.d(t,"BlockContextProvider",(function(){return Jl})),n.d(t,"BlockControls",(function(){return Un})),n.d(t,"BlockFormatControls",(function(){return Gn})),n.d(t,"BlockColorsStyleSelector",(function(){return ri})),n.d(t,"BlockEdit",(function(){return ii})),n.d(t,"useBlockEditContext",(function(){return O})),n.d(t,"BlockIcon",(function(){return Hl})),n.d(t,"BlockNavigationDropdown",(function(){return $u})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return Mu})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return fd})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Uu})),n.d(t,"__experimentalBlockVariationPicker",(function(){return hd})),n.d(t,"__experimentalBlockPatternSetup",(function(){return Cd})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return wd})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return Ad})),n.d(t,"BlockVerticalAlignmentControl",(function(){return Ld})),n.d(t,"__experimentalBorderStyleControl",(function(){return or})),n.d(t,"ButtonBlockerAppender",(function(){return ls})),n.d(t,"ColorPalette",(function(){return Md})),n.d(t,"ColorPaletteControl",(function(){return Dd})),n.d(t,"ContrastChecker",(function(){return Or})),n.d(t,"__experimentalDuotoneControl",(function(){return zc})),n.d(t,"__experimentalGradientPicker",(function(){return Hd})),n.d(t,"__experimentalGradientPickerControl",(function(){return zd})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Gd})),n.d(t,"__experimentalFontAppearanceControl",(function(){return bc})),n.d(t,"__experimentalFontFamilyControl",(function(){return hc})),n.d(t,"__experimentalColorGradientControl",(function(){return qo})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return gr})),n.d(t,"__experimentalImageSizeControl",(function(){return Wd})),n.d(t,"InnerBlocks",(function(){return nb})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return tb})),n.d(t,"InspectorAdvancedControls",(function(){return jo})),n.d(t,"InspectorControls",(function(){return yo})),n.d(t,"JustifyToolbar",(function(){return ub})),n.d(t,"JustifyContentControl",(function(){return sb})),n.d(t,"__experimentalLinkControl",(function(){return xb})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return Cb})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return jb})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return Ob})),n.d(t,"LineHeightControl",(function(){return ic})),n.d(t,"MediaReplaceFlow",(function(){return Ab})),n.d(t,"MediaPlaceholder",(function(){return Hb})),n.d(t,"MediaUpload",(function(){return Pb})),n.d(t,"MediaUploadCheck",(function(){return Lb})),n.d(t,"PanelColorSettings",(function(){return ul})),n.d(t,"PlainText",(function(){return Ub})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return Kb})),n.d(t,"RichText",(function(){return pd})),n.d(t,"RichTextShortcut",(function(){return $b})),n.d(t,"RichTextToolbarButton",(function(){return qb})),n.d(t,"__unstableRichTextInputEvent",(function(){return Yb})),n.d(t,"ToolSelector",(function(){return Qb})),n.d(t,"__experimentalUnitControl",(function(){return Zb})),n.d(t,"URLInput",(function(){return fb})),n.d(t,"URLInputButton",(function(){return nm})),n.d(t,"URLPopover",(function(){return Fb})),n.d(t,"__experimentalImageURLInputUI",(function(){return lm})),n.d(t,"withColorContext",(function(){return Rd})),n.d(t,"__unstableBlockSettingsMenuFirstItem",(function(){return eu})),n.d(t,"__unstableInserterMenuExtension",(function(){return $a})),n.d(t,"__experimentalPreviewOptions",(function(){return am})),n.d(t,"__experimentalUseResizeCanvas",(function(){return fm})),n.d(t,"BlockInspector",(function(){return _m})),n.d(t,"BlockList",(function(){return ku})),n.d(t,"useBlockProps",(function(){return Cu})),n.d(t,"__experimentalLayoutStyle",(function(){return to})),n.d(t,"BlockMover",(function(){return Es})),n.d(t,"BlockPreview",(function(){return Oa})),n.d(t,"BlockSelectionClearer",(function(){return Ou})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return hu})),n.d(t,"BlockSettingsMenu",(function(){return su})),n.d(t,"BlockSettingsMenuControls",(function(){return cu})),n.d(t,"BlockTitle",(function(){return Xl})),n.d(t,"BlockToolbar",(function(){return uu})),n.d(t,"BlockTools",(function(){return ym})),n.d(t,"CopyHandler",(function(){return qs})),n.d(t,"__unstableUseClipboardHandler",(function(){return $s})),n.d(t,"DefaultBlockAppender",(function(){return cs})),n.d(t,"__unstableEditorStyles",(function(){return zm})),n.d(t,"Inserter",(function(){return rs})),n.d(t,"__experimentalLibrary",(function(){return Gm})),n.d(t,"__experimentalSearchForm",(function(){return da})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Wm})),n.d(t,"MultiSelectScrollIntoView",(function(){return Km})),n.d(t,"NavigableToolbar",(function(){return ys})),n.d(t,"ObserveTyping",(function(){return Xm})),n.d(t,"__unstableUseTypingObserver",(function(){return Ym})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return qm})),n.d(t,"PreserveScrollInReorder",(function(){return Qm})),n.d(t,"SkipToSelectedBlock",(function(){return gm})),n.d(t,"Typewriter",(function(){return tp})),n.d(t,"__unstableUseTypewriter",(function(){return ep})),n.d(t,"Warning",(function(){return Ii})),n.d(t,"WritingFlow",(function(){return up})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return bp})),n.d(t,"useBlockDisplayInformation",(function(){return Yl})),n.d(t,"__unstableIframe",(function(){return fp})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return hp})),n.d(t,"BlockEditorProvider",(function(){return pa})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return pm})),n.d(t,"useSetting",(function(){return xo})),n.d(t,"transformStyles",(function(){return Vm})),n.d(t,"validateThemeColors",(function(){return Op})),n.d(t,"validateThemeGradients",(function(){return jp})),n.d(t,"__experimentalGetMatchingVariation",(function(){return Sd})),n.d(t,"storeConfig",(function(){return Rn})),n.d(t,"store",(function(){return Mn})),n.d(t,"SETTINGS_DEFAULTS",(function(){return k}));var o={};n.r(o),n.d(o,"getBlockName",(function(){return D})),n.d(o,"isBlockValid",(function(){return F})),n.d(o,"getBlockAttributes",(function(){return V})),n.d(o,"getBlock",(function(){return H})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return z})),n.d(o,"getBlocks",(function(){return G})),n.d(o,"__unstableGetBlockWithBlockTree",(function(){return U})),n.d(o,"__unstableGetBlockTree",(function(){return W})),n.d(o,"__unstableGetClientIdWithClientIdsTree",(function(){return K})),n.d(o,"__unstableGetClientIdsTree",(function(){return $})),n.d(o,"getClientIdsOfDescendants",(function(){return q})),n.d(o,"getClientIdsWithDescendants",(function(){return Y})),n.d(o,"getGlobalBlockCount",(function(){return X})),n.d(o,"getBlocksByClientId",(function(){return Q})),n.d(o,"getBlockCount",(function(){return Z})),n.d(o,"getSelectionStart",(function(){return J})),n.d(o,"getSelectionEnd",(function(){return ee})),n.d(o,"getBlockSelectionStart",(function(){return te})),n.d(o,"getBlockSelectionEnd",(function(){return ne})),n.d(o,"getSelectedBlockCount",(function(){return oe})),n.d(o,"hasSelectedBlock",(function(){return re})),n.d(o,"getSelectedBlockClientId",(function(){return ce})),n.d(o,"getSelectedBlock",(function(){return le})),n.d(o,"getBlockRootClientId",(function(){return ie})),n.d(o,"getBlockParents",(function(){return ae})),n.d(o,"getBlockParentsByBlockName",(function(){return se})),n.d(o,"getBlockHierarchyRootClientId",(function(){return ue})),n.d(o,"getLowestCommonAncestorWithSelectedBlock",(function(){return de})),n.d(o,"getAdjacentBlockClientId",(function(){return be})),n.d(o,"getPreviousBlockClientId",(function(){return me})),n.d(o,"getNextBlockClientId",(function(){return pe})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return fe})),n.d(o,"getSelectedBlockClientIds",(function(){return ge})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return he})),n.d(o,"getMultiSelectedBlocks",(function(){return Oe})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return je})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return ve})),n.d(o,"isFirstMultiSelectedBlock",(function(){return ke})),n.d(o,"isBlockMultiSelected",(function(){return _e})),n.d(o,"isAncestorMultiSelected",(function(){return ye})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return Ee})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return Ce})),n.d(o,"getBlockOrder",(function(){return Se})),n.d(o,"getBlockIndex",(function(){return we})),n.d(o,"isBlockSelected",(function(){return Be})),n.d(o,"hasSelectedInnerBlock",(function(){return Ie})),n.d(o,"isBlockWithinSelection",(function(){return xe})),n.d(o,"hasMultiSelection",(function(){return Te})),n.d(o,"isMultiSelecting",(function(){return Ne})),n.d(o,"isSelectionEnabled",(function(){return Pe})),n.d(o,"getBlockMode",(function(){return Le})),n.d(o,"isTyping",(function(){return Ae})),n.d(o,"isDraggingBlocks",(function(){return Re})),n.d(o,"getDraggedBlockClientIds",(function(){return Me})),n.d(o,"isBlockBeingDragged",(function(){return De})),n.d(o,"isAncestorBeingDragged",(function(){return Fe})),n.d(o,"isCaretWithinFormattedText",(function(){return Ve})),n.d(o,"getBlockInsertionPoint",(function(){return He})),n.d(o,"isBlockInsertionPointVisible",(function(){return ze})),n.d(o,"isValidTemplate",(function(){return Ge})),n.d(o,"getTemplate",(function(){return Ue})),n.d(o,"getTemplateLock",(function(){return We})),n.d(o,"canInsertBlockType",(function(){return qe})),n.d(o,"canInsertBlocks",(function(){return Ye})),n.d(o,"getInserterItems",(function(){return tt})),n.d(o,"getBlockTransformItems",(function(){return nt})),n.d(o,"hasInserterItems",(function(){return ot})),n.d(o,"__experimentalGetAllowedBlocks",(function(){return rt})),n.d(o,"__experimentalGetParsedPattern",(function(){return ct})),n.d(o,"__experimentalGetAllowedPatterns",(function(){return it})),n.d(o,"__experimentalGetPatternsByBlockTypes",(function(){return at})),n.d(o,"__experimentalGetPatternTransformItems",(function(){return st})),n.d(o,"getBlockListSettings",(function(){return ut})),n.d(o,"getSettings",(function(){return dt})),n.d(o,"isLastBlockChangePersistent",(function(){return bt})),n.d(o,"__experimentalGetBlockListSettingsForBlocks",(function(){return mt})),n.d(o,"__experimentalGetParsedReusableBlock",(function(){return pt})),n.d(o,"__experimentalGetReusableBlockTitle",(function(){return ft})),n.d(o,"__unstableIsLastBlockChangeIgnored",(function(){return gt})),n.d(o,"__experimentalGetLastBlockAttributeChanges",(function(){return ht})),n.d(o,"isNavigationMode",(function(){return jt})),n.d(o,"hasBlockMovingClientId",(function(){return vt})),n.d(o,"didAutomaticChange",(function(){return kt})),n.d(o,"isBlockHighlighted",(function(){return _t})),n.d(o,"areInnerBlocksControlled",(function(){return yt})),n.d(o,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Et})),n.d(o,"wasBlockJustInserted",(function(){return Ct}));var r={};n.r(r),n.d(r,"resetBlocks",(function(){return Nt})),n.d(r,"validateBlocksToTemplate",(function(){return Pt})),n.d(r,"resetSelection",(function(){return Lt})),n.d(r,"receiveBlocks",(function(){return At})),n.d(r,"updateBlockAttributes",(function(){return Rt})),n.d(r,"updateBlock",(function(){return Mt})),n.d(r,"selectBlock",(function(){return Dt})),n.d(r,"selectPreviousBlock",(function(){return Ft})),n.d(r,"selectNextBlock",(function(){return Vt})),n.d(r,"startMultiSelect",(function(){return Ht})),n.d(r,"stopMultiSelect",(function(){return zt})),n.d(r,"multiSelect",(function(){return Gt})),n.d(r,"clearSelectedBlock",(function(){return Ut})),n.d(r,"toggleSelection",(function(){return Wt})),n.d(r,"replaceBlocks",(function(){return $t})),n.d(r,"replaceBlock",(function(){return qt})),n.d(r,"moveBlocksDown",(function(){return Xt})),n.d(r,"moveBlocksUp",(function(){return Qt})),n.d(r,"moveBlocksToPosition",(function(){return Zt})),n.d(r,"moveBlockToPosition",(function(){return Jt})),n.d(r,"insertBlock",(function(){return en})),n.d(r,"insertBlocks",(function(){return tn})),n.d(r,"showInsertionPoint",(function(){return nn})),n.d(r,"hideInsertionPoint",(function(){return on})),n.d(r,"setTemplateValidity",(function(){return rn})),n.d(r,"synchronizeTemplate",(function(){return cn})),n.d(r,"mergeBlocks",(function(){return ln})),n.d(r,"removeBlocks",(function(){return an})),n.d(r,"removeBlock",(function(){return sn})),n.d(r,"replaceInnerBlocks",(function(){return un})),n.d(r,"toggleBlockMode",(function(){return dn})),n.d(r,"startTyping",(function(){return bn})),n.d(r,"stopTyping",(function(){return mn})),n.d(r,"startDraggingBlocks",(function(){return pn})),n.d(r,"stopDraggingBlocks",(function(){return fn})),n.d(r,"enterFormattedText",(function(){return gn})),n.d(r,"exitFormattedText",(function(){return hn})),n.d(r,"selectionChange",(function(){return On})),n.d(r,"insertDefaultBlock",(function(){return jn})),n.d(r,"updateBlockListSettings",(function(){return vn})),n.d(r,"updateSettings",(function(){return kn})),n.d(r,"__unstableSaveReusableBlock",(function(){return yn})),n.d(r,"__unstableMarkLastChangeAsPersistent",(function(){return En})),n.d(r,"__unstableMarkNextChangeAsNotPersistent",(function(){return Cn})),n.d(r,"__unstableMarkAutomaticChange",(function(){return Sn})),n.d(r,"__unstableMarkAutomaticChangeFinal",(function(){return wn})),n.d(r,"setNavigationMode",(function(){return Bn})),n.d(r,"setBlockMovingClientId",(function(){return In})),n.d(r,"duplicateBlocks",(function(){return xn})),n.d(r,"insertBeforeBlock",(function(){return Tn})),n.d(r,"insertAfterBlock",(function(){return Nn})),n.d(r,"toggleBlockHighlight",(function(){return Pn})),n.d(r,"flashBlock",(function(){return Ln})),n.d(r,"setHasControlledInnerBlocks",(function(){return An}));var c=n(16),l=n(7),i=n(0),a=n(10),s=n.n(a),u=n(2),d=n(9),b=n(18),m=n(8),p=n(3),f=n(4);const g=Object(i.createContext)({name:"",isSelected:!1,clientId:null}),{Provider:h}=g;function O(){return Object(i.useContext)(g)}var j=n(1);const v={insertUsage:{}},k={alignWide:!1,supportsLayout:!0,colors:[{name:Object(j.__)("Black"),slug:"black",color:"#000000"},{name:Object(j.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(j.__)("White"),slug:"white",color:"#ffffff"},{name:Object(j.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(j.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(j.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(j.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(j.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(j.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(j.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(j.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(j.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(j._x)("Small","font size name"),size:13,slug:"small"},{name:Object(j._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(j._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(j._x)("Large","font size name"),size:36,slug:"large"},{name:Object(j._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:Object(j.__)("Thumbnail")},{slug:"medium",name:Object(j.__)("Medium")},{slug:"large",name:Object(j.__)("Large")},{slug:"full",name:Object(j.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(j.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(j.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(j.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(j.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(j.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(j.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(j.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(j.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(j.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(j.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(j.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(j.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function _(e,t,n){return[...e.slice(0,n),...Object(u.castArray)(t),...e.slice(n)]}function y(e,t,n,o=1){const r=[...e];return r.splice(t,o),_(r,e.slice(t,t+o),n)}function E(e,t=""){const n={[t]:[]};return e.forEach(e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,E(r,o))}),n}function C(e,t=""){return e.reduce((e,n)=>Object.assign(e,{[n.clientId]:t},C(n.innerBlocks,n.clientId)),{})}function S(e,t=u.identity){const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function w(e){return S(e,e=>Object(u.omit)(e,"attributes"))}function B(e){return S(e,e=>e.attributes)}function I(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(u.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,o=t.attributes,Object(u.isEqual)(Object(u.keys)(n),Object(u.keys)(o)));var n,o}const x=e=>e.reduce((e,t)=>(e[t]={},e),{}),T=Object(u.flow)(f.combineReducers,e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=Object(u.mapValues)(t.attributes,(n,r)=>{const{name:c}=t.byClientId[r];return"core/block"===c&&n.ref===e?{...n,ref:o}:n})}return e(t,n)},e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;o.cache=t.cache?t.cache:{};const r=e=>e.reduce((e,n)=>{let o=n;do{e.push(o),o=t.parents[o]}while(o&&!t.controlledInnerBlocks[o]);return e},[]);switch(n.type){case"RESET_BLOCKS":o.cache=Object(u.mapValues)(S(n.blocks),()=>({}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=Object(u.keys)(S(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&e.push(n.rootClientId),o.cache={...o.cache,...x(r(e))};break}case"UPDATE_BLOCK":o.cache={...o.cache,...x(r([n.clientId]))};break;case"UPDATE_BLOCK_ATTRIBUTES":o.cache={...o.cache,...x(r(n.clientIds))};break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=x(r(n.replacedClientIds));o.cache={...Object(u.omit)(o.cache,n.replacedClientIds),...Object(u.omit)(e,n.replacedClientIds),...x(Object(u.keys)(S(n.blocks)))};break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":o.cache={...Object(u.omit)(o.cache,n.removedClientIds),...x(Object(u.difference)(r(n.clientIds),n.clientIds))};break;case"MOVE_BLOCKS_TO_POSITION":{const e=[...n.clientIds];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),o.cache={...o.cache,...x(r(e))};break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[];n.rootClientId&&e.push(n.rootClientId),o.cache={...o.cache,...x(r(e))};break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=Object(u.keys)(Object(u.omitBy)(o.attributes,(e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId));o.cache={...o.cache,...x(r(e))}}}return o},e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order[o[r]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order[o[r]]));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)},e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let c=r;return n.blocks.length&&(c=e(c,{...n,type:"INSERT_BLOCKS",index:0}),c.order={...c.order,...Object(u.reduce)(o,(e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e),{})}),c},e=>(t,n)=>{if(t&&"RESET_BLOCKS"===n.type){const e=function e(t,n="",o={}){return Object(u.reduce)(t[n],(n,r)=>o[r]?n:[...n,r,...e(t,r)],[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(u.pickBy)(t.controlledInnerBlocks));return{...t,byClientId:{...Object(u.omit)(t.byClientId,e),...w(n.blocks)},attributes:{...Object(u.omit)(t.attributes,e),...B(n.blocks)},order:{...Object(u.omit)(t.order,e),...Object(u.omit)(E(n.blocks),o)},parents:{...Object(u.omit)(t.parents,e),...C(n.blocks)},cache:{...Object(u.omit)(t.cache,e),...Object(u.omit)(Object(u.mapValues)(S(n.blocks),()=>({})),o)}}}return e(t,n)},(function(e){let t,n=!1;return(o,r)=>{let c=e(o,r);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===c&&!l){var i;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(i=null==o?void 0:o.isPersistentChange)||void 0===i||i;return o.isPersistentChange===e?o:{...c,isPersistentChange:e}}return c={...c,isPersistentChange:l?!n:!I(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,c}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}))({byClientId(e={},t){switch(t.type){case"RESET_BLOCKS":return w(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=Object(u.omit)(t.updates,"attributes");return Object(u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...Object(u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.omit)(e,t.removedClientIds)}return e},attributes(e={},t){switch(t.type){case"RESET_BLOCKS":return B(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...B(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every(t=>!e[t]))return e;const n=t.clientIds.reduce((n,o)=>({...n,[o]:Object(u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,(t,n,r)=>{var c,l;return n!==t[r]&&((t=(c=e[o])===(l=t)?{...c}:l)[r]=n),t},e[o])}),{});return t.clientIds.every(t=>n[t]===e[t])?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...Object(u.omit)(e,t.replacedClientIds),...B(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.omit)(e,t.removedClientIds)}return e},order(e={},t){switch(t.type){case"RESET_BLOCKS":return E(t.blocks);case"RECEIVE_BLOCKS":return{...e,...Object(u.omit)(E(t.blocks),"")};case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=E(t.blocks,n),{index:c=o.length}=t;return{...e,...r,[n]:_(o,r[n],c)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:c=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:y(e[o],t,c,r.length)}}return{...e,[n]:Object(u.without)(e[n],...r),[o]:_(e[o],r,c)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=Object(u.first)(n),c=e[o];if(!c.length||r===Object(u.first)(c))return e;const l=c.indexOf(r);return{...e,[o]:y(c,l,l-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=Object(u.first)(n),c=Object(u.last)(n),l=e[o];if(!l.length||c===Object(u.last)(l))return e;const i=l.indexOf(r);return{...e,[o]:y(l,i,i+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=E(t.blocks);return Object(u.flow)([e=>Object(u.omit)(e,t.replacedClientIds),e=>({...e,...Object(u.omit)(o,"")}),e=>Object(u.mapValues)(e,e=>Object(u.reduce)(e,(e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e),[]))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.flow)([e=>Object(u.omit)(e,t.removedClientIds),e=>Object(u.mapValues)(e,e=>Object(u.without)(e,...t.removedClientIds))])(e)}return e},parents(e={},t){switch(t.type){case"RESET_BLOCKS":return C(t.blocks);case"RECEIVE_BLOCKS":return{...e,...C(t.blocks)};case"INSERT_BLOCKS":return{...e,...C(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce((e,n)=>(e[n]=t.toRootClientId||"",e),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...Object(u.omit)(e,t.replacedClientIds),...C(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function N(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.indexToSelect||t.blocks.length-1,o=t.blocks[n];return o?o.clientId===e.clientId?e:{clientId:o.clientId}:{}}}return e}var P=Object(f.combineReducers)({blocks:T,isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(e=!1,t){switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(e={},t){var n,o;switch(t.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}};case"RESET_SELECTION":const{selectionStart:r,selectionEnd:c}=t;return{selectionStart:r,selectionEnd:c};case"MULTI_SELECT":const{start:l,end:i}=t;return{selectionStart:{clientId:l},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const a=null==e||null===(n=e.selectionStart)||void 0===n?void 0:n.clientId,s=null==e||null===(o=e.selectionEnd)||void 0===o?void 0:o.clientId;if(!a&&!s)return e;if(!t.blocks.some(e=>e.clientId===a))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(e=>e.clientId===s))return{...e,selectionEnd:e.selectionStart}}return{selectionStart:N(e.selectionStart,t),selectionEnd:N(e.selectionEnd,t)}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e=null,t){return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?Object(u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?Object(u.omit)(e,n):e}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(e=k,t){switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(e=v,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((e,n)=>{const{attributes:o,name:r}=n,c=Object(f.select)(m.store).getActiveBlockVariation(r,o);let l=null!=c&&c.name?`${r}/${c.name}`:r;const i={name:l};return"core/block"===r&&(i.ref=o.ref,l+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:i}}}},e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes}),{})}return null},isNavigationMode:function(e=!1,t){return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(e=null,t){return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){var n;switch(t.type){case"INSERT_BLOCKS":return t.blocks.length?{clientId:t.blocks[0].clientId,source:null===(n=t.meta)||void 0===n?void 0:n.source}:e;case"RESET_BLOCKS":return{}}return e}}),L=n(30),A=n(141);const R=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(i.createElement)(p.G,null,Object(i.createElement)(p.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),M=[];function D(e,t){const n=e.blocks.byClientId[t];if("web"!==i.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){const n=e.blocks.attributes[t],{service:o}=n;return o?"core/social-link-"+o:"core/social-link"}return n?n.name:null}function F(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function V(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}const H=Object(L.a)((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:V(e,t),innerBlocks:yt(e,t)?M:G(e,t)}:null},(e,t)=>[e.blocks.cache[t]]),z=Object(L.a)((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:V(e,t)}:null},(e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]),G=Object(L.a)((e,t)=>Object(u.map)(Se(e,t),t=>H(e,t)),(e,t)=>Object(u.map)(e.blocks.order[t||""],t=>e.blocks.cache[t])),U=Object(L.a)((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:V(e,t),innerBlocks:W(e,t)}:null},e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]),W=Object(L.a)((e,t="")=>Object(u.map)(Se(e,t),t=>U(e,t)),e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]),K=Object(L.a)((e,t)=>({clientId:t,innerBlocks:$(e,t)}),e=>[e.blocks.order]),$=Object(L.a)((e,t="")=>Object(u.map)(Se(e,t),t=>K(e,t)),e=>[e.blocks.order]),q=(e,t)=>Object(u.flatMap)(t,t=>{const n=Se(e,t);return[...n,...q(e,n)]}),Y=Object(L.a)(e=>{const t=Se(e);return[...t,...q(e,t)]},e=>[e.blocks.order]),X=Object(L.a)((e,t)=>{const n=Y(e);return t?Object(u.reduce)(n,(n,o)=>e.blocks.byClientId[o].name===t?n+1:n,0):n.length},e=>[e.blocks.order,e.blocks.byClientId]),Q=Object(L.a)((e,t)=>Object(u.map)(Object(u.castArray)(t),t=>H(e,t)),e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function Z(e,t){return Se(e,t).length}function J(e){return e.selection.selectionStart}function ee(e){return e.selection.selectionEnd}function te(e){return e.selection.selectionStart.clientId}function ne(e){return e.selection.selectionEnd.clientId}function oe(e){return he(e).length||(e.selection.selectionStart.clientId?1:0)}function re(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ce(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function le(e){const t=ce(e);return t?H(e,t):null}function ie(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const ae=Object(L.a)((e,t,n=!1)=>{const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()},e=>[e.blocks.parents]),se=Object(L.a)((e,t,n,o=!1)=>{const r=ae(e,t,o);return Object(u.map)(Object(u.filter)(Object(u.map)(r,t=>({id:t,name:D(e,t)})),({name:e})=>Array.isArray(n)?n.includes(e):e===n),({id:e})=>e)},e=>[e.blocks.parents]);function ue(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function de(e,t){const n=ce(e),o=[...ae(e,t),t],r=[...ae(e,n),n];let c;const l=Math.min(o.length,r.length);for(let e=0;e<l&&o[e]===r[e];e++)c=o[e];return c}function be(e,t,n=1){if(void 0===t&&(t=ce(e)),void 0===t&&(t=n<0?je(e):ve(e)),!t)return null;const o=ie(e,t);if(null===o)return null;const{order:r}=e.blocks,c=r[o],l=c.indexOf(t)+1*n;return l<0||l===c.length?null:c[l]}function me(e,t){return be(e,t,-1)}function pe(e,t){return be(e,t,1)}function fe(e){return e.initialPosition}const ge=Object(L.a)(e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return M;if(t.clientId===n.clientId)return[t.clientId];const o=ie(e,t.clientId);if(null===o)return M;const r=Se(e,o),c=r.indexOf(t.clientId),l=r.indexOf(n.clientId);return c>l?r.slice(l,c+1):r.slice(c,l+1)},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function he(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?M:ge(e)}const Oe=Object(L.a)(e=>{const t=he(e);return t.length?t.map(t=>H(e,t)):M},e=>[...ge.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function je(e){return Object(u.first)(he(e))||null}function ve(e){return Object(u.last)(he(e))||null}function ke(e,t){return je(e)===t}function _e(e,t){return-1!==he(e).indexOf(t)}const ye=Object(L.a)((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=ie(e,n),o=_e(e,n);return o},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function Ee(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Ce(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Se(e,t){return e.blocks.order[t||""]||M}function we(e,t,n){return Se(e,n).indexOf(t)}function Be(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Ie(e,t,n=!1){return Object(u.some)(Se(e,t),t=>Be(e,t)||_e(e,t)||n&&Ie(e,t,n))}function xe(e,t){if(!t)return!1;const n=he(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Te(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Ne(e){return e.isMultiSelecting}function Pe(e){return e.isSelectionEnabled}function Le(e,t){return e.blocksMode[t]||"visual"}function Ae(e){return e.isTyping}function Re(e){return!!e.draggedBlocks.length}function Me(e){return e.draggedBlocks}function De(e,t){return e.draggedBlocks.includes(t)}function Fe(e,t){if(!Re(e))return!1;const n=ae(e,t);return Object(u.some)(n,t=>De(e,t))}function Ve(e){return e.isCaretWithinFormattedText}function He(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:c}=r;return c?(t=ie(e,c)||void 0,n=we(e,r.clientId,t)+1):n=Se(e).length,{rootClientId:t,index:n}}function ze(e){return null!==e.insertionPoint}function Ge(e){return e.template.isValid}function Ue(e){return e.settings.template}function We(e,t){if(!t)return e.settings.templateLock;const n=ut(e,t);return n?n.templateLock:null}const Ke=(e,t,n=null)=>Object(u.isBoolean)(e)?e:Object(u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,$e=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=Object(m.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=dt(e);if(!Ke(r,t,!0))return!1;if(We(e,n))return!1;const c=ut(e,n);if(n&&void 0===c)return!1;const l=null==c?void 0:c.allowedBlocks,i=Ke(l,t),a=o.parent,s=D(e,n),u=Ke(a,s);return null!==i&&null!==u?i||u:null!==i?i:null===u||u},qe=Object(L.a)($e,(e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]);function Ye(e,t,n=null){return t.every(t=>qe(e,D(e,t),n))}function Xe(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const Qe=(e,t,n)=>!!Object(m.hasBlockSupport)(t,"inserter",!0)&&$e(e,t.name,n),Ze=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:c=0}=Xe(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:Je(r,c)}},Je=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},et=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;Object(m.hasBlockSupport)(n.name,"multiple",!0)||(r=Object(u.some)(Q(e,Y(e)),{name:n.name}));const{time:c,count:l=0}=Xe(e,o)||{},i={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:Je(c,l)};if("transform"===t)return i;const a=n.variations.filter(({scope:e})=>!e||e.includes("inserter"));return{...i,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:a,example:n.example,utility:1}},tt=Object(L.a)((e,t=null)=>{const n=et(e,{buildScope:"inserter"}),o=Object(m.getBlockTypes)().filter(n=>Qe(e,n,t)).map(n),r=$e(e,"core/block",t)?Ot(e).map(t=>{const n="core/block/"+t.id,o=pt(e,t.id);let r;1===o.length&&(r=Object(m.getBlockType)(o[0].name));const{time:c,count:l=0}=Xe(e,n)||{},i=Je(c,l);return{id:n,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:r?r.icon:R,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:i}}):[],c=o.filter(({variations:e=[]})=>!e.some(({isDefault:e})=>e)),l=[];for(const t of o){const{variations:n=[]}=t;if(n.length){const o=Ze(e,t);l.push(...n.map(o))}}return[...[...c,...l].sort((e,t)=>{const n=e.name.startsWith("core/"),o=t.name.startsWith("core/");return n&&o?0:n&&!o?-1:1}),...r]},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Ot(e),Object(m.getBlockTypes)()]),nt=Object(L.a)((e,t,n=null)=>{const o=et(e,{buildScope:"transform"}),r=Object(m.getBlockTypes)().filter(t=>Qe(e,t,n)).map(o),c=Object(u.mapKeys)(r,({name:e})=>e),l=Object(m.getPossibleBlockTransformations)(t).reduce((e,t)=>(c[null==t?void 0:t.name]&&e.push(c[t.name]),e),[]);return Object(u.orderBy)(l,e=>c[e.name].frecency,"desc")},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(m.getBlockTypes)()]),ot=Object(L.a)((e,t=null)=>!!Object(u.some)(Object(m.getBlockTypes)(),n=>Qe(e,n,t))||$e(e,"core/block",t)&&Ot(e).length>0,(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Ot(e),Object(m.getBlockTypes)()]),rt=Object(L.a)((e,t=null)=>{if(t)return Object(u.filter)(Object(m.getBlockTypes)(),n=>Qe(e,n,t))},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(m.getBlockTypes)()]),ct=Object(L.a)((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find(({name:e})=>e===t);return n?{...n,blocks:Object(m.parse)(n.content)}:null},e=>[e.settings.__experimentalBlockPatterns]),lt=Object(L.a)(e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=dt(e);return t.map(e=>({...e,blockNodes:Object(A.parse)(e.content)})).filter(({blockNodes:e})=>((e,t)=>{if(Object(u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!Ke(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach(e=>{n.push(e)})}return!0})(e,n))},e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes]),it=Object(L.a)((e,t=null)=>{const n=lt(e);return Object(u.filter)(n,({blockNodes:n})=>n.every(({blockName:n})=>qe(e,n,t)))},(e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]]),at=Object(L.a)((e,t,n=null)=>{if(!t)return M;const o=it(e,n),r=Array.isArray(t)?t:[t];return o.filter(e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,e=>r.includes(e))})},(e,t)=>[...it.getDependants(e,t)]),st=Object(L.a)((e,t,n=null)=>{if(!t)return M;if(t.some(({clientId:t,innerBlocks:n})=>n.length||yt(e,t)))return M;const o=Array.from(new Set(t.map(({name:e})=>e)));return at(e,o,n)},(e,t)=>[...at.getDependants(e,t)]);function ut(e,t){return e.blockListSettings[t]}function dt(e){return e.settings}function bt(e){return e.blocks.isPersistentChange}const mt=Object(L.a)((e,t=[])=>t.reduce((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t,{}),e=>[e.blockListSettings]),pt=Object(L.a)((e,t)=>{const n=Object(u.find)(Ot(e),e=>e.id===t);return n?Object(m.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null},e=>[Ot(e)]),ft=Object(L.a)((e,t)=>{var n;const o=Object(u.find)(Ot(e),e=>e.id===t);return o?null===(n=o.title)||void 0===n?void 0:n.raw:null},e=>[Ot(e)]);function gt(e){return e.blocks.isIgnoredChange}function ht(e){return e.lastBlockAttributesChange}function Ot(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:M}function jt(e){return e.isNavigationMode}function vt(e){return e.hasBlockMovingClientId}function kt(e){return!!e.automaticChangeStatus}function _t(e,t){return e.highlightedBlock===t}function yt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Et=Object(L.a)((e,t)=>{if(!t.length)return null;const n=ce(e);if(t.includes(D(e,n)))return n;const o=he(e),r=se(e,n||o[0],t);return r?Object(u.last)(r):null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function Ct(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var St=n(31),wt=n(25),Bt=n.n(wt),It={SLEEP:({duration:e})=>new Promise(t=>{setTimeout(t,e)}),MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(f.createRegistryControl)(e=>()=>{const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t(()=>e.dispatch(Mn).__unstableMarkAutomaticChangeFinal())})};const xt="core/block-editor";function*Tt(){if(0===(yield f.controls.select(xt,"getBlockCount")))return yield jn()}function*Nt(e){return yield{type:"RESET_BLOCKS",blocks:e},yield*Pt(e)}function*Pt(e){const t=yield f.controls.select(xt,"getTemplate"),n=yield f.controls.select(xt,"getTemplateLock"),o=!t||"all"!==n||Object(m.doBlocksMatchTemplate)(e,t);if(o!==(yield f.controls.select(xt,"isValidTemplate")))return yield rn(o),o}function Lt(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function At(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Rt(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(u.castArray)(e),attributes:t,uniqueByBlock:n}}function Mt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Dt(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function*Ft(e){const t=yield f.controls.select(xt,"getPreviousBlockClientId",e);if(t)return yield Dt(t,-1),[t]}function*Vt(e){const t=yield f.controls.select(xt,"getNextBlockClientId",e);if(t)return yield Dt(t),[t]}function Ht(){return{type:"START_MULTI_SELECT"}}function zt(){return{type:"STOP_MULTI_SELECT"}}function*Gt(e,t){yield{type:"MULTI_SELECT",start:e,end:t};const n=yield f.controls.select(xt,"getSelectedBlockCount");Object(St.speak)(Object(j.sprintf)(
|
2 |
/* translators: %s: number of selected blocks */
|
3 |
Object(j._n)("%s block selected.","%s blocks selected.",n),n),"assertive")}function Ut(){return{type:"CLEAR_SELECTED_BLOCK"}}function Wt(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Kt(e,t){var n,o;const r=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map(e=>{var t;const n=e.name;if(!Object(m.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!r[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:c={}}=e,l=r[n];return{...e,attributes:{...c,className:`${o||""} is-style-${l}`.trim()}}})}function*$t(e,t,n,o=0,r){e=Object(u.castArray)(e),t=Kt(Object(u.castArray)(t),yield f.controls.select(xt,"getSettings"));const c=yield f.controls.select(xt,"getBlockRootClientId",Object(u.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!(yield f.controls.select(xt,"canInsertBlockType",n.name,c)))return}yield{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r},yield*Tt()}function qt(e,t){return $t(e,t)}function Yt(e){return(t,n)=>({clientIds:Object(u.castArray)(t),type:e,rootClientId:n})}const Xt=Yt("MOVE_BLOCKS_DOWN"),Qt=Yt("MOVE_BLOCKS_UP");function*Zt(e,t="",n="",o){const r=yield f.controls.select(xt,"getTemplateLock",t);if("all"===r)return;const c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o};t!==n?"insert"!==r&&(yield f.controls.select(xt,"canInsertBlocks",e,n))&&(yield c):yield c}function*Jt(e,t="",n="",o){yield Zt([e],t,n,o)}function en(e,t,n,o=!0,r){return tn([e],t,n,o,0,r)}function*tn(e,t,n,o=!0,r=0,c){Object(u.isObject)(r)&&(c=r,r=0,Bt()("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),e=Kt(Object(u.castArray)(e),yield f.controls.select(xt,"getSettings"));const l=[];for(const t of e)(yield f.controls.select(xt,"canInsertBlockType",t.name,n))&&l.push(t);if(l.length)return{type:"INSERT_BLOCKS",blocks:l,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:c}}function nn(e,t,n={}){const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function on(){return{type:"HIDE_INSERTION_POINT"}}function rn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function*cn(){yield{type:"SYNCHRONIZE_TEMPLATE"};const e=yield f.controls.select(xt,"getBlocks"),t=yield f.controls.select(xt,"getTemplate"),n=Object(m.synchronizeBlocksWithTemplate)(e,t);return yield Nt(n)}function*ln(e,t){const n=[e,t];yield{type:"MERGE_BLOCKS",blocks:n};const[o,r]=n,l=yield f.controls.select(xt,"getBlock",o),i=Object(m.getBlockType)(l.name);if(!i.merge)return void(yield Dt(l.clientId));const a=yield f.controls.select(xt,"getBlock",r),s=Object(m.getBlockType)(a.name),{clientId:d,attributeKey:b,offset:p}=yield f.controls.select(xt,"getSelectionStart"),g=(d===o?i:s).attributes[b],h=(d===o||d===r)&&void 0!==b&&void 0!==p&&!!g;g||("number"==typeof b?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof b):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const O=Object(m.cloneBlock)(l),j=Object(m.cloneBlock)(a);if(h){const e=d===o?O:j,t=e.attributes[b],{multiline:n,__unstableMultilineWrapperTags:r,__unstablePreserveWhiteSpace:l}=g,i=Object(c.insert)(Object(c.create)({html:t,multilineTag:n,multilineWrapperTags:r,preserveWhiteSpace:l}),"",p,p);e.attributes[b]=Object(c.toHTMLString)({value:i,multilineTag:n,preserveWhiteSpace:l})}const v=l.name===a.name?[j]:Object(m.switchToBlockType)(j,l.name);if(!v||!v.length)return;const k=i.merge(O.attributes,v[0].attributes);if(h){const e=Object(u.findKey)(k,e=>"string"==typeof e&&-1!==e.indexOf("")),t=k[e],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=i.attributes[e],a=Object(c.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),s=a.text.indexOf(""),d=Object(c.remove)(a,s,s+1),b=Object(c.toHTMLString)({value:d,multilineTag:n,preserveWhiteSpace:r});k[e]=b,yield On(l.clientId,e,s,s)}yield*$t([l.clientId,a.clientId],[{...l,attributes:{...l.attributes,...k}},...v.slice(1)])}function*an(e,t=!0){if(!e||!e.length)return;e=Object(u.castArray)(e);const n=yield f.controls.select(xt,"getBlockRootClientId",e[0]);if(yield f.controls.select(xt,"getTemplateLock",n))return;let o;o=t?yield Ft(e[0]):yield f.controls.select(xt,"getPreviousBlockClientId",e[0]),yield{type:"REMOVE_BLOCKS",clientIds:e};const r=yield*Tt();return[o||r]}function sn(e,t){return an([e],t)}function un(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function dn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function bn(){return{type:"START_TYPING"}}function mn(){return{type:"STOP_TYPING"}}function pn(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function fn(){return{type:"STOP_DRAGGING_BLOCKS"}}function gn(){return{type:"ENTER_FORMATTED_TEXT"}}function hn(){return{type:"EXIT_FORMATTED_TEXT"}}function On(e,t,n,o){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}}function jn(e,t,n){const o=Object(m.getDefaultBlockName)();if(o)return en(Object(m.createBlock)(o,e),n,t)}function vn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function kn(e){return{type:"UPDATE_SETTINGS",settings:e}}function yn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function En(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Cn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function*Sn(){yield{type:"MARK_AUTOMATIC_CHANGE"},yield{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"}}function wn(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function*Bn(e=!0){yield{type:"SET_NAVIGATION_MODE",isNavigationMode:e},e?Object(St.speak)(Object(j.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(St.speak)(Object(j.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}function*In(e=null){yield{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e},e&&Object(St.speak)(Object(j.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}function*xn(e,t=!0){if(!e&&!e.length)return;const n=yield f.controls.select(xt,"getBlocksByClientId",e),o=yield f.controls.select(xt,"getBlockRootClientId",e[0]);if(Object(u.some)(n,e=>!e))return;const r=n.map(e=>e.name);if(Object(u.some)(r,e=>!Object(m.hasBlockSupport)(e,"multiple",!0)))return;const c=yield f.controls.select(xt,"getBlockIndex",Object(u.last)(Object(u.castArray)(e)),o),l=n.map(e=>Object(m.__experimentalCloneSanitizedBlock)(e));return yield tn(l,c+1,o,t),l.length>1&&t&&(yield Gt(Object(u.first)(l).clientId,Object(u.last)(l).clientId)),l.map(e=>e.clientId)}function*Tn(e){if(!e)return;const t=yield f.controls.select(xt,"getBlockRootClientId",e);if(yield f.controls.select(xt,"getTemplateLock",t))return;const n=yield f.controls.select(xt,"getBlockIndex",e,t);return yield jn({},t,n)}function*Nn(e){if(!e)return;const t=yield f.controls.select(xt,"getBlockRootClientId",e);if(yield f.controls.select(xt,"getTemplateLock",t))return;const n=yield f.controls.select(xt,"getBlockIndex",e,t);return yield jn({},t,n+1)}function Pn(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function*Ln(e){yield Pn(e,!0),yield{type:"SLEEP",duration:150},yield Pn(e,!1)}function An(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const Rn={reducer:P,selectors:o,actions:r,controls:It},Mn=Object(f.createReduxStore)(xt,{...Rn,persist:["preferences"]});function Dn(){const{isSelected:e,clientId:t,name:n}=O(),o=Object(f.useSelect)(o=>{if(e)return;const{getBlockName:r,isFirstMultiSelectedBlock:c,getMultiSelectedBlockClientIds:l}=o(Mn);return!!c(t)&&l().every(e=>r(e)===n)},[t,e,n]);return e||o}Object(f.registerStore)(xt,{...Rn,persist:["preferences"]});var Fn={default:Object(p.createSlotFill)("BlockControls"),block:Object(p.createSlotFill)("BlockControlsBlock"),inline:Object(p.createSlotFill)("BlockFormatControls"),other:Object(p.createSlotFill)("BlockControlsOther")};function Vn({group:e="default",controls:t,children:n}){if(!Dn())return null;const o=Fn[e].Fill;return Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(o,null,o=>{const r=Object(u.isEmpty)(o)?null:o;return Object(i.createElement)(p.__experimentalToolbarContext.Provider,{value:r},"default"===e&&Object(i.createElement)(p.ToolbarGroup,{controls:t}),n)}))}function Hn({group:e="default",...t}){const n=Object(i.useContext)(p.__experimentalToolbarContext),o=Fn[e].Slot,r=Object(p.__experimentalUseSlot)(o.__unstableName);return Boolean(r.fills&&r.fills.length)?"default"===e?Object(i.createElement)(o,Object(l.a)({},t,{bubblesVirtually:!0,fillProps:n})):Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(o,Object(l.a)({},t,{bubblesVirtually:!0,fillProps:n}))):null}const zn=Vn;zn.Slot=Hn;const Gn=e=>Object(i.createElement)(Vn,Object(l.a)({group:"inline"},e));Gn.Slot=e=>Object(i.createElement)(Hn,Object(l.a)({group:"inline"},e));var Un=zn,Wn=n(6),Kn=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),$n=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),qn=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),Yn=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),Xn=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const Qn={type:"default"},Zn=Object(i.createContext)(Qn);function Jn(e,t){return e.split(",").map(e=>`.editor-styles-wrapper ${e} ${t}`).join(",")}const eo=Zn.Provider;function to({selector:e,layout:t={}}){const{contentSize:n,wideSize:o}=t;let r=n||o?`\n\t\t\t\t${Jn(e,"> *")} {\n\t\t\t\t\tmax-width: ${null!=n?n:o};\n\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t}\n\n\t\t\t\t${Jn(e,'> [data-align="wide"]')} {\n\t\t\t\t\tmax-width: ${null!=o?o:n};\n\t\t\t\t}\n\n\t\t\t\t${Jn(e,'> [data-align="full"]')} {\n\t\t\t\t\tmax-width: none;\n\t\t\t\t}\n\t\t\t`:"";return r+=`\n\t\t${Jn(e,'> [data-align="left"]')} {\n\t\t\tfloat: left;\n\t\t\tmargin-right: 2em;\n\t\t}\n\n\t\t${Jn(e,'> [data-align="right"]')} {\n\t\t\tfloat: right;\n\t\t\tmargin-left: 2em;\n\t\t}\n\t`,Object(i.createElement)("style",null,r)}const no=["left","center","right","wide","full"],oo=["wide","full"];function ro(e=no){const{wideControlsEnabled:t=!1}=Object(f.useSelect)(e=>{const{getSettings:t}=e(Mn);return{wideControlsEnabled:t().alignWide}},[]),n=Object(i.useContext)(Zn);if("default"!==n.type)return[];const{alignments:o=no}=n;return e.filter(e=>(n.alignments||t||!oo.includes(e))&&o.includes(e))}const co={left:{icon:Kn,title:Object(j.__)("Align left")},center:{icon:$n,title:Object(j.__)("Align center")},right:{icon:qn,title:Object(j.__)("Align right")},wide:{icon:Yn,title:Object(j.__)("Wide width")},full:{icon:Xn,title:Object(j.__)("Full width")}},lo={isAlternate:!0};var io=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const c=ro(n);if(0===c.length)return null;const a=co[e],s=co.center,u=o?p.ToolbarGroup:p.ToolbarDropdownMenu,d=o?{isCollapsed:r}:{};return Object(i.createElement)(u,Object(l.a)({popoverProps:lo,icon:a?a.icon:s.icon,label:Object(j.__)("Align"),toggleProps:{describedBy:Object(j.__)("Change alignment")},controls:c.map(n=>{return{...co[n],isActive:e===n,role:r?"menuitemradio":void 0,onClick:(o=n,()=>t(e===o?void 0:o))};var o})},d))};function ao(e){return Object(i.createElement)(io,Object(l.a)({},e,{isToolbar:!1}))}function so(e){return Object(i.createElement)(io,Object(l.a)({},e,{isToolbar:!0}))}const uo=["left","center","right","wide","full"],bo=["wide","full"];function mo(e,t=!0,n=!0){let o;return o=Array.isArray(e)?uo.filter(t=>e.includes(t)):!0===e?uo:[],!n||!0===e&&!t?Object(u.without)(o,...bo):o}const po=Object(d.createHigherOrderComponent)(e=>t=>{const{name:n}=t,o=ro(mo(Object(m.getBlockSupport)(n,"align"),Object(m.hasBlockSupport)(n,"alignWide",!0)));return[o.length>0&&t.isSelected&&Object(i.createElement)(Un,{key:"align-controls",group:"block"},Object(i.createElement)(ao,{value:t.attributes.align,onChange:e=>{var n,o;e||(null===(n=Object(m.getBlockType)(t.name).attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="");t.setAttributes({align:e})},controls:o})),Object(i.createElement)(e,Object(l.a)({key:"edit"},t))]},"withToolbarControls"),fo=Object(d.createHigherOrderComponent)(e=>t=>{const{name:n,attributes:o}=t,{align:r}=o,c=ro(mo(Object(m.getBlockSupport)(n,"align"),Object(m.hasBlockSupport)(n,"alignWide",!0)));if(void 0===r)return Object(i.createElement)(e,t);let a=t.wrapperProps;return c.includes(r)&&(a={...a,"data-align":r}),Object(i.createElement)(e,Object(l.a)({},t,{wrapperProps:a}))});Object(b.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(u.has)(e.attributes,["align","type"])||Object(m.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...uo,""]}}),e})),Object(b.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",fo),Object(b.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",po),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return mo(Object(m.getBlockSupport)(t,"align"),Object(m.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=s()("align"+o,e.className)),e}));const{Fill:go,Slot:ho}=Object(p.createSlotFill)("InspectorAdvancedControls");function Oo({children:e}){const{isSelected:t}=O();return t?Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(go,null,e)):null}Oo.slotName="InspectorAdvancedControls",Oo.Slot=ho;var jo=Oo;const{Fill:vo,Slot:ko}=Object(p.createSlotFill)("InspectorControls");function _o({children:e}){return Dn()?Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(vo,null,e)):null}_o.Slot=ko;var yo=_o;const Eo=/[\s#]/g,Co=Object(d.createHigherOrderComponent)(e=>t=>{if(Object(m.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===i.Platform.OS,o=Object(i.createElement)(p.TextControl,{className:"html-anchor-control",label:Object(j.__)("HTML anchor"),help:Object(i.createElement)(i.Fragment,null,Object(j.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(i.createElement)(p.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(j.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:Object(j.__)("Add an anchor"),onChange:e=>{e=e.replace(Eo,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(e,t),n&&Object(i.createElement)(jo,null,o),!n&&"core/heading"===t.name&&Object(i.createElement)(yo,null,Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Heading settings")},o)))}return Object(i.createElement)(e,t)},"withInspectorControl");Object(b.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(u.has)(e.attributes,["anchor","type"])||Object(m.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),Object(b.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Co),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(m.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const So=Object(d.createHigherOrderComponent)(e=>t=>Object(m.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(i.createElement)(i.Fragment,null,Object(i.createElement)(e,t),Object(i.createElement)(jo,null,Object(i.createElement)(p.TextControl,{autoComplete:"off",label:Object(j.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:Object(j.__)("Separate multiple classes with spaces.")}))):Object(i.createElement)(e,t),"withInspectorControl");function wo(e){e=`<div data-custom-class-name>${e}</div>`;const t=Object(m.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(b.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(m.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),Object(b.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",So),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(m.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=s()(e.className,n.className)),e})),Object(b.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(m.hasBlockSupport)(t,"customClassName",!0)){const o=Object(u.omit)(e,["className"]),r=Object(m.getSaveContent)(t,o),c=wo(r),l=wo(n),i=Object(u.difference)(l,c);i.length?e.className=i.join(" "):r&&delete e.className}return e})),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(m.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(u.uniq)([Object(m.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=Object(m.getBlockDefaultClassName)(t.name)),e}));const Bo={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.customLineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":e=>e.enableCustomSpacing},Io=(e,t)=>{if("color.palette"!==e&&"color.gradients"!==e)return t;if(!Array.isArray(t))return t;const n=t.filter(e=>"core"!==(null==e?void 0:e.origin));return n.length>0?n:t};function xo(e){const{name:t}=O();return Object(f.useSelect)(n=>{var o;const r=n(Mn).getSettings(),c="__experimentalFeatures."+e,l=`__experimentalFeatures.blocks.${t}.${e}`,i=null!==(o=Object(u.get)(r,l))&&void 0!==o?o:Object(u.get)(r,c);if(void 0!==i)return Io(e,i);const a=Bo[e]?Bo[e](r):void 0;return void 0!==a?Io(e,a):"typography.dropCap"===e||void 0},[t,e])}var To=n(40),No=n.n(To);const Po=(e,t,n)=>{if(t){const n=Object(u.find)(e,{slug:t});if(n)return n}return{color:n}},Lo=(e,t)=>Object(u.find)(e,{color:t});function Ao(e,t){if(e&&t)return`has-${Object(u.kebabCase)(t)}-${e}`}const Ro=[];function Mo(e){if(e)return`has-${e}-gradient-background`}function Do(e,t){const n=Object(u.find)(e,["slug",t]);return n&&n.gradient}function Fo(e,t){return Object(u.find)(e,["gradient",t])}function Vo(e,t){const n=Fo(e,t);return n&&n.slug}function Ho({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=O(),o=xo("color.gradients")||Ro,{gradient:r,customGradient:c}=Object(f.useSelect)(o=>{const{getBlockAttributes:r}=o(Mn),c=r(n)||{};return{customGradient:c[t],gradient:c[e]}},[n,e,t]),{updateBlockAttributes:l}=Object(f.useDispatch)(Mn),a=Object(i.useCallback)(r=>{const c=Vo(o,r);l(n,c?{[e]:c,[t]:void 0}:{[e]:void 0,[t]:r})},[o,n,l]),s=Mo(r);let u;return u=r?Do(o,r):c,{gradientClass:s,gradientValue:u,setGradient:a}}
|
4 |
// translators: first %s: the color name or value (e.g. red or #ff0000)
|
25 |
Object(j.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(a,b&&b.title,k,O,v,"up"===t?-1:1,_)))}),Ei=Object(i.forwardRef)((e,t)=>Object(i.createElement)(yi,Object(l.a)({direction:"up",ref:t},e))),Ci=Object(i.forwardRef)((e,t)=>Object(i.createElement)(yi,Object(l.a)({direction:"down",ref:t},e))),Si=Object(i.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),wi=()=>Object(i.useContext)(Si);var Bi=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),Ii=function({className:e,actions:t,children:n,secondaryActions:o}){return Object(i.createElement)("div",{className:s()(e,"block-editor-warning")},Object(i.createElement)("div",{className:"block-editor-warning__contents"},Object(i.createElement)("p",{className:"block-editor-warning__message"},n),(i.Children.count(t)>0||o)&&Object(i.createElement)("div",{className:"block-editor-warning__actions"},i.Children.count(t)>0&&i.Children.map(t,(e,t)=>Object(i.createElement)("span",{key:t,className:"block-editor-warning__action"},e)),o&&Object(i.createElement)(p.DropdownMenu,{className:"block-editor-warning__secondary",icon:Bi,label:Object(j.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},()=>Object(i.createElement)(p.MenuGroup,null,o.map((e,t)=>Object(i.createElement)(p.MenuItem,{onClick:e.onClick,key:t},e.title)))))))},xi=n(268),Ti=({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:c})=>Object(i.createElement)("div",{className:c},Object(i.createElement)("div",{className:"block-editor-block-compare__content"},Object(i.createElement)("h2",{className:"block-editor-block-compare__heading"},e),Object(i.createElement)("div",{className:"block-editor-block-compare__html"},t),Object(i.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},n)),Object(i.createElement)("div",{className:"block-editor-block-compare__action"},Object(i.createElement)(p.Button,{isSecondary:!0,tabIndex:"0",onClick:o},r))),Ni=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const c={rawContent:e.originalContent,renderedContent:Object(m.getSaveElement)(e.name,e.attributes)},l=function(e){const t=Object(u.castArray)(e),n=t.map(e=>Object(m.getSaveContent)(e.name,e.attributes,e.innerBlocks)),o=t.map(e=>Object(m.getSaveElement)(e.name,e.attributes,e.innerBlocks));return{rawContent:n.join(""),renderedContent:o}}(o(e)),a=(d=c.rawContent,b=l.rawContent,Object(xi.diffChars)(d,b).map((e,t)=>{const n=s()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(i.createElement)("span",{key:t,className:n},e.value)}));var d,b;return Object(i.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(i.createElement)(Ti,{title:Object(j.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:Object(j.__)("Convert to HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(i.createElement)(Ti,{title:Object(j.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:a,renderedContent:l.renderedContent}))};const Pi=e=>Object(m.rawHandler)({HTML:e.originalContent});var Li=Object(d.compose)([Object(f.withSelect)((e,{clientId:t})=>({block:e(Mn).getBlock(t)})),Object(f.withDispatch)((e,{block:t})=>{const{replaceBlock:n}=e(Mn);return{convertToClassic(){n(t.clientId,(e=>Object(m.createBlock)("core/freeform",{content:e.originalContent}))(t))},convertToHTML(){n(t.clientId,(e=>Object(m.createBlock)("core/html",{content:e.originalContent}))(t))},convertToBlocks(){n(t.clientId,Pi(t))},attemptBlockRecovery(){n(t.clientId,(({name:e,attributes:t,innerBlocks:n})=>Object(m.createBlock)(e,t,n))(t))}}})])((function({convertToHTML:e,convertToBlocks:t,convertToClassic:n,attemptBlockRecovery:o,block:r}){const c=!!Object(m.getBlockType)("core/html"),[l,a]=Object(i.useState)(!1),s=Object(i.useCallback)(()=>a(!0),[]),u=Object(i.useCallback)(()=>a(!1),[]),d=Object(i.useMemo)(()=>[{
|
26 |
// translators: Button to fix block content
|
27 |
title:Object(j._x)("Resolve","imperative verb"),onClick:s},c&&{title:Object(j.__)("Convert to HTML"),onClick:e},{title:Object(j.__)("Convert to Classic Block"),onClick:n}].filter(Boolean),[s,e,n]);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ii,{actions:[Object(i.createElement)(p.Button,{key:"recover",onClick:o,isPrimary:!0},Object(j.__)("Attempt Block Recovery"))],secondaryActions:d},Object(j.__)("This block contains unexpected or invalid content.")),l&&Object(i.createElement)(p.Modal,{title:// translators: Dialog title to fix block content
|
28 |
+
Object(j.__)("Resolve Block"),onRequestClose:u,className:"block-editor-block-compare"},Object(i.createElement)(Ni,{block:r,onKeep:e,onConvert:t,convertor:Pi,convertButtonText:Object(j.__)("Convert to Blocks")})))}));const Ai=Object(i.createElement)(Ii,{className:"block-editor-block-list__block-crash-warning"},Object(j.__)("This block has encountered an error and cannot be previewed."));var Ri=()=>Ai;class Mi extends i.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var Di=Mi,Fi=n(97),Vi=n.n(Fi),Hi=function({clientId:e}){const[t,n]=Object(i.useState)(""),o=Object(f.useSelect)(t=>t(Mn).getBlock(e),[e]),{updateBlock:r}=Object(f.useDispatch)(Mn);return Object(i.useEffect)(()=>{n(Object(m.getBlockContent)(o))},[o]),Object(i.createElement)(Vi.a,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const c=Object(m.getBlockType)(o.name),l=Object(m.getBlockAttributes)(c,t,o.attributes),i=t||Object(m.getSaveContent)(c,l),a=!t||Object(m.isValidBlockContent)(c,l,i);r(e,{attributes:l,originalContent:i,isValid:a}),t||n({content:i})},onChange:e=>n(e.target.value)})};const zi=".block-editor-block-list__block";function Gi(e,t){return t.closest(zi)===e}function Ui(e){const t=Object(i.useRef)(),n=function(e){return Object(f.useSelect)(t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:o,isNavigationMode:r,isBlockSelected:c}=t(Mn);if(c(e)&&!o()&&!r())return n()},[e])}(e);return Object(i.useEffect)(()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const o=di.focus.tabbable.find(t.current).filter(e=>Object(di.isTextField)(e)),r=-1===n,c=(r?u.last:u.first)(o)||t.current;Gi(t.current,c)&&!c.closest(".block-list-appender")?Object(di.placeCaretAtHorizontalEdge)(c,r):t.current.focus()},[n]),t}function Wi(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function Ki(){const e=Object(f.useSelect)(e=>{const{isNavigationMode:t,getSettings:n}=e(Mn);return t()||n().outlineMode},[]);return Object(d.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",Wi),t.addEventListener("mouseover",Wi),()=>{t.removeEventListener("mouseout",Wi),t.removeEventListener("mouseover",Wi),t.classList.remove("is-hovered")}},[e])}function $i(e){return Object(f.useSelect)(t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:r,isBlockMultiSelected:c,getBlockName:l,getSettings:i,hasSelectedInnerBlock:a,__experimentalGetActiveBlockIdByBlockNames:u}=t(Mn),{__experimentalSpotlightEntityBlocks:d}=i(),b=n(e),p=r(e),f=l(e),g=a(e,!0),h=u(d);return s()({"is-selected":p,"is-highlighted":o(e),"is-multi-selected":c(e),"is-reusable":Object(m.isReusableBlock)(Object(m.getBlockType)(f)),"is-dragging":b,"has-child-selected":g,"has-active-entity":h,"is-active-entity":h===e})},[e])}function qi(e){return Object(f.useSelect)(t=>{const n=t(Mn).getBlockName(e),o=Object(m.getBlockType)(n);if(o.apiVersion>1||Object(m.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(m.getBlockDefaultClassName)(n)},[e])}function Yi(e){return Object(f.useSelect)(t=>{const{getBlockName:n,getBlockAttributes:o}=t(Mn),{className:r}=o(e);if(!r)return;const c=Object(m.getBlockType)(n(e));return c.apiVersion>1||Object(m.hasBlockSupport)(c,"lightBlockWrapper",!1)?r:void 0},[e])}function Xi(e){return Object(f.useSelect)(t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:c,isBlockSelected:l}=t(Mn);if(!l(e))return;const i=n();return i?s()("is-block-moving-mode",{"can-insert-moving-block":o(r(i),c(e))}):void 0},[e])}function Qi(e){const{isBlockSelected:t}=Object(f.useSelect)(Mn),{selectBlock:n,selectionChange:o}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(r=>{function c(c){t(e)?c.target.isContentEditable||o(e):Gi(r,c.target)&&n(e)}return r.addEventListener("focusin",c),()=>{r.removeEventListener("focusin",c)}},[t,n])}function Zi(e){const t=Object(f.useSelect)(t=>t(Mn).isBlockSelected(e),[e]),{getBlockRootClientId:n,getBlockIndex:o}=Object(f.useSelect)(Mn),{insertDefaultBlock:r,removeBlock:c}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(l=>{if(t)return l.addEventListener("keydown",i),l.addEventListener("dragstart",a),()=>{l.removeEventListener("keydown",i),l.removeEventListener("dragstart",a)};function i(t){const{keyCode:i,target:a}=t;i!==lc.ENTER&&i!==lc.BACKSPACE&&i!==lc.DELETE||a!==l||Object(di.isTextField)(a)||(t.preventDefault(),i===lc.ENTER?r({},n(e),o(e)+1):c(e))}function a(e){e.preventDefault()}},[e,t,n,o,r,c])}function Ji(e){const{isNavigationMode:t,isBlockSelected:n}=Object(f.useSelect)(Mn),{setNavigationMode:o,selectBlock:r}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(c=>{function l(c){t()&&!c.defaultPrevented&&(c.preventDefault(),n(e)?o(!1):r(e))}return c.addEventListener("mousedown",l),()=>{c.addEventListener("mousedown",l)}},[e,t,n,o])}var ea=n(121),ta=n.n(ea);function na(e){const t=Object(i.useRef)(),n=Object(f.useSelect)(t=>{const{isBlockSelected:n,getBlockSelectionEnd:o}=t(Mn);return n(e)||o()===e},[e]);return Object(i.useEffect)(()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const o=Object(di.getScrollContainer)(e)||e.ownerDocument.defaultView;o&&ta()(e,o,{onlyScrollIfNeeded:!0})},[n]),t}function oa(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach(e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")})}function ra(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:o,selectBlock:r}=Object(f.useDispatch)(Mn),{isSelectionEnabled:c,isBlockSelected:l,getBlockParents:i,getBlockSelectionStart:a,hasMultiSelection:s}=Object(f.useSelect)(Mn);return Object(d.useRefEffect)(u=>{const{ownerDocument:d}=u,{defaultView:b}=d;let m,p;function f({isSelectionEnd:t}){const n=b.getSelection();if(!n.rangeCount||n.isCollapsed)return void oa(u,!0);const c=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(zi);return t?t.id.slice("block-".length):void 0}(n.focusNode);if(e===c){if(r(e),t&&(oa(u,!0),n.rangeCount)){const{commonAncestorContainer:e}=n.getRangeAt(0);m.contains(e)&&m.focus()}}else{const t=[...i(e),e],n=[...i(c),c],r=Math.min(t.length,n.length)-1;o(t[r],n[r])}}function g(){d.removeEventListener("selectionchange",f),b.removeEventListener("mouseup",g),p=b.requestAnimationFrame(()=>{f({isSelectionEnd:!0}),n()})}function h({buttons:n}){1===n&&c()&&l(e)&&(m=d.activeElement,t(),d.addEventListener("selectionchange",f),b.addEventListener("mouseup",g),oa(u,!1))}function O(t){if(c()&&0===t.button)if(t.shiftKey){const n=a();n!==e&&(oa(u,!1),o(n,e),t.preventDefault())}else s()&&r(e)}return u.addEventListener("mousedown",O),u.addEventListener("mouseleave",h),()=>{u.removeEventListener("mousedown",O),u.removeEventListener("mouseleave",h),d.removeEventListener("selectionchange",f),b.removeEventListener("mouseup",g),b.cancelAnimationFrame(p)}},[e,t,n,o,r,c,l,i])}var ca=n(45),la=n(132);const ia=[Object(i.createInterpolateElement)(Object(j.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(i.createElement)("kbd",null)}),Object(i.createInterpolateElement)(Object(j.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(i.createElement)("kbd",null)}),Object(i.createInterpolateElement)(Object(j.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(i.createElement)("kbd",null)}),Object(j.__)("Drag files into the editor to automatically insert media blocks."),Object(j.__)("Change a block's type by pressing the block icon on the toolbar.")];var aa=function(){const[e]=Object(i.useState)(Math.floor(Math.random()*ia.length));return Object(i.createElement)(p.Tip,null,ia[e])},sa=n(100),ua=n(219),da=function e({className:t,onChange:n,value:o,label:r,placeholder:c}){const l=Object(d.useInstanceId)(e),a=Object(i.useRef)();return Object(i.createElement)("div",{className:s()("block-editor-inserter__search",t)},Object(i.createElement)(p.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-"+l},r||c),Object(i.createElement)("input",{ref:a,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-"+l,type:"search",placeholder:c,onChange:e=>n(e.target.value),autoComplete:"off",value:o||""}),Object(i.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(i.createElement)(p.Button,{icon:sa.a,label:Object(j.__)("Reset search"),onClick:()=>{n(""),a.current.focus()}}),!o&&Object(i.createElement)(qc.a,{icon:ua.a})))},ba=function({title:e,icon:t,description:n,blockType:o}){return o&&(Bt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o)),Object(i.createElement)("div",{className:"block-editor-block-card"},Object(i.createElement)(Hl,{icon:t,showColors:!0}),Object(i.createElement)("div",{className:"block-editor-block-card__content"},Object(i.createElement)("h2",{className:"block-editor-block-card__title"},e),Object(i.createElement)("span",{className:"block-editor-block-card__description"},n)))};function ma({clientId:e=null,value:t,selection:n,onChange:o=u.noop,onInput:r=u.noop}){const c=Object(f.useRegistry)(),{resetBlocks:l,resetSelection:a,replaceInnerBlocks:s,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:b}=c.dispatch(Mn),{getBlockName:p,getBlocks:g}=c.select(Mn),h=Object(i.useRef)({incoming:null,outgoing:[]}),O=Object(i.useRef)(!1),j=Object(i.useRef)(r),v=Object(i.useRef)(o);Object(i.useEffect)(()=>{j.current=r,v.current=o},[r,o]),Object(i.useEffect)(()=>{h.current.outgoing.includes(t)?Object(u.last)(h.current.outgoing)===t&&(h.current.outgoing=[]):g(e)!==t&&(h.current.outgoing=[],(()=>{if(t)if(b(),e){d(e,!0),b();const n=t.map(e=>Object(m.cloneBlock)(e));O.current&&(h.current.incoming=n),s(e,n)}else O.current&&(h.current.incoming=t),l(t)})(),n&&a(n.selectionStart,n.selectionEnd,n.initialPosition))},[t,e]),Object(i.useEffect)(()=>{const{getSelectionStart:t,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l}=c.select(Mn);let i=g(e),a=r(),s=!1;O.current=!0;const u=c.subscribe(()=>{if(null!==e&&null===p(e))return;const c=r(),u=g(e),d=u!==i;if(i=u,d&&(h.current.incoming||l()))return h.current.incoming=null,void(a=c);(d||s&&!d&&c&&!a)&&(a=c,h.current.outgoing.push(i),(a?v.current:j.current)(i,{selection:{selectionStart:t(),selectionEnd:n(),initialPosition:o()}})),s=d});return()=>u()},[c,e])}var pa=Object(d.createHigherOrderComponent)(e=>Object(f.withRegistry)(({useSubRegistry:t=!0,registry:n,...o})=>{if(!t)return Object(i.createElement)(e,Object(l.a)({registry:n},o));const[r,c]=Object(i.useState)(null);return Object(i.useEffect)(()=>{const e=Object(f.createRegistry)({},n);e.registerStore(xt,Rn),c(e)},[n]),r?Object(i.createElement)(f.RegistryProvider,{value:r},Object(i.createElement)(e,Object(l.a)({registry:r},o))):null}),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=Object(f.useDispatch)(Mn);return Object(i.useEffect)(()=>{o(n)},[n]),ma(e),Object(i.createElement)(vr,null,t)}));function fa({onClick:e}){return Object(i.createElement)("div",{tabIndex:0,role:"button",onClick:e,onKeyPress:e},Object(i.createElement)(p.Disabled,null,Object(i.createElement)(ku,null)))}let ga;var ha=function({viewportWidth:e,__experimentalPadding:t}){const[n,{width:o}]=Object(d.useResizeObserver)(),[r,{height:c}]=Object(d.useResizeObserver)();ga=ga||Object(d.pure)(ku);const l=(o-2*t)/e;return Object(i.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:c*l+2*t}},n,Object(i.createElement)(p.Disabled,{style:{transform:`scale(${l})`,width:e,left:t,right:t,top:t},className:"block-editor-block-preview__content"},r,Object(i.createElement)(ga,null)))},Oa=Object(i.memo)((function({blocks:e,__experimentalPadding:t=0,viewportWidth:n=1200,__experimentalLive:o=!1,__experimentalOnClick:r}){const c=Object(f.useSelect)(e=>e(Mn).getSettings(),[]),l=Object(i.useMemo)(()=>{const e={...c};return e.__experimentalBlockPatterns=[],e},[c]),a=Object(i.useMemo)(()=>Object(u.castArray)(e),[e]);return e&&0!==e.length?Object(i.createElement)(pa,{value:a,settings:l},o?Object(i.createElement)(fa,{onClick:r}):Object(i.createElement)(ha,{viewportWidth:n,__experimentalPadding:t})):null})),ja=function({item:e}){var t,n;const{name:o,title:r,icon:c,description:l,initialAttributes:a}=e,s=Object(m.getBlockType)(o),u=Object(m.isReusableBlock)(e);return Object(i.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(i.createElement)("div",{className:"block-editor-inserter__preview"},u||s.example?Object(i.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(i.createElement)(Oa,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=s.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:s.example?Object(m.getBlockFromExample)(e.name,{attributes:{...s.example.attributes,...a},innerBlocks:s.example.innerBlocks}):Object(m.createBlock)(o,a)})):Object(i.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(j.__)("No Preview Available."))),!u&&Object(i.createElement)(ba,{title:r,icon:c,description:l}))},va=Object(i.createContext)(),ka=Object(i.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){const c=Object(i.useContext)(va);return Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({ref:r,state:c,role:"option",focusable:!0},o),o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?Object(i.createElement)(t,r,n):"function"==typeof n?n(r):Object(i.createElement)(p.Button,r,n)})})),_a=Object(i.createElement)(Wn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(i.createElement)(Wn.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function ya({count:e,icon:t}){return Object(i.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(i.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(i.createElement)(p.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(i.createElement)(p.FlexItem,null,t?Object(i.createElement)(Hl,{icon:t}):Object(j.sprintf)(
|
29 |
/* translators: %d: Number of blocks. */
|
30 |
+
Object(j._n)("%d block","%d blocks",e),e)),Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(Hl,{icon:_a})))))}var Ea=({isEnabled:e,blocks:t,icon:n,children:o})=>{const r={type:"inserter",blocks:t};return Object(i.createElement)(p.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:r,__experimentalDragComponent:Object(i.createElement)(ya,{count:t.length,icon:n})},({onDraggableStart:t,onDraggableEnd:n})=>o({draggable:e,onDragStart:e?t:void 0,onDragEnd:e?n:void 0}))};function Ca(e=window){const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var Sa=Object(i.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:r,isDraggable:c,...a}){const u=Object(i.useRef)(!1),d=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},b=Object(i.useMemo)(()=>[Object(m.createBlock)(n.name,n.initialAttributes,Object(m.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))],[n.name,n.initialAttributes,n.initialAttributes]);return Object(i.createElement)(Ea,{isEnabled:c&&!n.disabled,blocks:b,icon:n.icon},({draggable:c,onDragStart:b,onDragEnd:m})=>Object(i.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:c,onDragStart:e=>{u.current=!0,b&&(r(null),b(e))},onDragEnd:e=>{u.current=!1,m&&m(e)}},Object(i.createElement)(ka,Object(l.a)({isFirst:t,className:s()("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,Ca()?e.metaKey:e.ctrlKey),r(null)},onKeyDown:e=>{const{keyCode:t}=e;t===lc.ENTER&&(e.preventDefault(),o(n,Ca()?e.metaKey:e.ctrlKey),r(null))},onFocus:()=>{u.current||r(n)},onMouseEnter:()=>{u.current||r(n)},onMouseLeave:()=>r(null),onBlur:()=>r(null)},a),Object(i.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:d},Object(i.createElement)(Hl,{icon:n.icon,showColors:!0})),Object(i.createElement)("span",{className:"block-editor-block-types-list__item-title"},n.title))))})),wa=Object(i.forwardRef)((function(e,t){const[n,o]=Object(i.useState)(!1);return Object(i.useEffect)(()=>{n&&Object(St.speak)(Object(j.__)("Use left and right arrow keys to move through blocks"))},[n]),Object(i.createElement)("div",Object(l.a)({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))})),Ba=Object(i.forwardRef)((function(e,t){const n=Object(i.useContext)(va);return Object(i.createElement)(p.__unstableCompositeGroup,Object(l.a)({state:n,role:"presentation",ref:t},e))})),Ia=function({items:e=[],onSelect:t,onHover:n=(()=>{}),children:o,label:r,isDraggable:c=!0}){return Object(i.createElement)(wa,{className:"block-editor-block-types-list","aria-label":r},function(e,t){const n=[];for(let t=0,o=e.length;t<o;t+=3)n.push(e.slice(t,t+3));return n}(e).map((e,o)=>Object(i.createElement)(Ba,{key:o},e.map((e,r)=>Object(i.createElement)(Sa,{key:e.id,item:e,className:Object(m.getBlockMenuDefaultClassName)(e.id),onSelect:t,onHover:n,isDraggable:c,isFirst:0===o&&0===r})))),o)},xa=function({title:e,icon:t,children:n}){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(i.createElement)("h2",{className:"block-editor-inserter__panel-title"},e),Object(i.createElement)(p.Icon,{icon:t})),Object(i.createElement)("div",{className:"block-editor-inserter__panel-content"},n))},Ta=function({children:e}){const t=Object(p.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return Object(i.createElement)(va.Provider,{value:t},e)},Na=function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o}){const[r,c,l,a]=Fl(e,t),s=Object(i.useMemo)(()=>Object(u.orderBy)(r,["frecency"],["desc"]).slice(0,6),[r]),d=Object(i.useMemo)(()=>r.filter(e=>!e.category),[r]),b=Object(i.useMemo)(()=>Object(u.flow)(e=>e.filter(e=>e.category&&"reusable"!==e.category),e=>Object(u.groupBy)(e,"category"))(r),[r]),m=Object(i.useMemo)(()=>{const e={...l};return Object.keys(l).forEach(t=>{e[t]=r.filter(e=>(e=>e.name.split("/")[0])(e)===t),0===e[t].length&&delete e[t]}),e},[r,l]);return Object(i.useEffect)(()=>()=>n(null),[]),Object(i.createElement)(Ta,null,Object(i.createElement)("div",null,o&&!!s.length&&Object(i.createElement)(xa,{title:Object(j._x)("Most used","blocks")},Object(i.createElement)(Ia,{items:s,onSelect:a,onHover:n,label:Object(j._x)("Most used","blocks")})),Object(u.map)(c,e=>{const t=b[e.slug];return t&&t.length?Object(i.createElement)(xa,{key:e.slug,title:e.title,icon:e.icon},Object(i.createElement)(Ia,{items:t,onSelect:a,onHover:n,label:e.title})):null}),d.length>0&&Object(i.createElement)(xa,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(j.__)("Uncategorized")},Object(i.createElement)(Ia,{items:d,onSelect:a,onHover:n,label:Object(j.__)("Uncategorized")})),Object(u.map)(l,(e,t)=>{const o=m[t];return o&&o.length?Object(i.createElement)(xa,{key:t,title:e.title,icon:e.icon},Object(i.createElement)(Ia,{items:o,onSelect:a,onHover:n,label:e.title})):null})))},Pa=function({selectedCategory:e,patternCategories:t,onClickCategory:n,children:o}){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:s()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(i.createElement)(p.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(j.__)("Filter patterns"),hideLabelFromVision:!0,value:e.name,onChange:e=>{n(t.find(t=>e===t.name))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return t.map(t=>e.push({value:t.name,label:t.label})),e})()})),Object(i.createElement)("div",{className:"block-editor-inserter__panel-content"},o))},La=n(29),Aa=(e,t)=>{const{patternCategories:n,patterns:o}=Object(f.useSelect)(e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Mn);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}},[t]),{createSuccessNotice:r}=Object(f.useDispatch)(La.store);return[o,n,Object(i.useCallback)((t,n)=>{e(Object(u.map)(n,e=>Object(m.cloneBlock)(e)),t.name),r(Object(j.sprintf)(
|
31 |
/* translators: %s: block pattern title. */
|
32 |
+
Object(j.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})},[])]};function Ra({isDraggable:e,pattern:t,onClick:n,composite:o}){const{name:r,viewportWidth:c}=t,{blocks:a}=Object(f.useSelect)(e=>e(Mn).__experimentalGetParsedPattern(r),[r]),s="block-editor-block-patterns-list__item-description-"+Object(d.useInstanceId)(Ra);return Object(i.createElement)(Ea,{isEnabled:e,blocks:a},({draggable:e,onDragStart:r,onDragEnd:u})=>Object(i.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":t.title,"aria-describedby":t.description?s:void 0,draggable:e,onDragStart:r,onDragEnd:u},Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:()=>n(t,a)}),Object(i.createElement)(Oa,{blocks:a,viewportWidth:c}),Object(i.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&Object(i.createElement)(p.VisuallyHidden,{id:s},t.description))))}function Ma(){return Object(i.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Da=function({isDraggable:e,blockPatterns:t,shownPatterns:n,onClickPattern:o,orientation:r,label:c=Object(j.__)("Block Patterns")}){const a=Object(p.__unstableUseCompositeState)({orientation:r});return Object(i.createElement)(p.__unstableComposite,Object(l.a)({},a,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":c}),t.map(t=>n.includes(t)?Object(i.createElement)(Ra,{key:t.name,pattern:t,onClick:o,isDraggable:e,composite:a}):Object(i.createElement)(Ma,{key:t.name})))};function Fa({rootClientId:e,onInsert:t,selectedCategory:n,onClickCategory:o}){const[r,c,l]=Aa(t,e),a=Object(i.useMemo)(()=>c.filter(e=>r.some(t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})),[r,c]),s=n||a[0];Object(i.useEffect)(()=>{r.some(e=>b(e)===1/0)&&!a.find(e=>"uncategorized"===e.name)&&a.push({name:"uncategorized",label:Object(j._x)("Uncategorized")})},[a,r]);const b=Object(i.useCallback)(e=>{if(!e.categories||!e.categories.length)return 1/0;const t=Object(u.fromPairs)(a.map(({name:e},t)=>[e,t]));return Math.min(...e.categories.map(e=>void 0!==t[e]?t[e]:1/0))},[a]),m=Object(i.useMemo)(()=>r.filter(e=>"uncategorized"===s.name?b(e)===1/0:e.categories&&e.categories.includes(s.name)),[r,s]),p=Object(i.useMemo)(()=>m.sort((e,t)=>b(e)-b(t)),[m,b]),f=Object(d.useAsyncList)(p);return Object(i.createElement)(i.Fragment,null,!!m.length&&Object(i.createElement)(Pa,{selectedCategory:s,patternCategories:a,onClickCategory:o},Object(i.createElement)(Da,{shownPatterns:f,blockPatterns:m,onClickPattern:l,label:s.label,orientation:"vertical",isDraggable:!0})))}var Va=function({rootClientId:e,onInsert:t,onClickCategory:n,selectedCategory:o}){return Object(i.createElement)(Fa,{rootClientId:e,selectedCategory:o,onInsert:t,onClickCategory:n})},Ha=n(19),za=function(){return Object(i.createElement)("div",{className:"block-editor-inserter__no-results"},Object(i.createElement)(qc.a,{className:"block-editor-inserter__no-results-icon",icon:Vl.a}),Object(i.createElement)("p",null,Object(j.__)("No results found.")))};function Ga({onHover:e,onInsert:t,rootClientId:n}){const[o,,,r]=Fl(n,t),c=Object(i.useMemo)(()=>o.filter(({category:e})=>"reusable"===e),[o]);return 0===c.length?Object(i.createElement)(za,null):Object(i.createElement)(xa,{title:Object(j.__)("Reusable blocks")},Object(i.createElement)(Ia,{items:c,onSelect:r,onHover:e,label:Object(j.__)("Reusable blocks")}))}var Ua=function({rootClientId:e,onInsert:t,onHover:n}){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ga,{onHover:n,onInsert:t,rootClientId:e}),Object(i.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(i.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(Ha.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(j.__)("Manage Reusable blocks"))))};const{Fill:Wa,Slot:Ka}=Object(p.createSlotFill)("__unstableInserterMenuExtension");Wa.Slot=Ka;var $a=Wa,qa=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:r,shouldFocusBlock:c=!0}){const{getSelectedBlock:l}=Object(f.useSelect)(Mn),{destinationRootClientId:a,destinationIndex:s}=Object(f.useSelect)(r=>{const{getSelectedBlockClientId:c,getBlockRootClientId:l,getBlockIndex:i,getBlockOrder:a}=r(Mn),s=c();let u,d=e;return t?u=t:n?u=i(n,d):!o&&s?(d=l(s),u=i(s,d)+1):u=a(d).length,{destinationRootClientId:d,destinationIndex:u}},[e,t,n,o]),{replaceBlocks:d,insertBlocks:b,showInsertionPoint:p,hideInsertionPoint:g}=Object(f.useDispatch)(Mn),h=Object(i.useCallback)((e,t,n=!1)=>{const i=l();!o&&i&&Object(m.isUnmodifiedDefaultBlock)(i)?d(i.clientId,e,null,c||n?0:null,t):b(e,s,a,!0,c||n?0:null,t);const p=Object(j.sprintf)(// translators: %d: the name of the block that has been added
|
33 |
+
Object(j._n)("%d block added.","%d blocks added.",Object(u.castArray)(e).length),Object(u.castArray)(e).length);Object(St.speak)(p),r&&r()},[o,l,d,b,a,s,r,c]),O=Object(i.useCallback)(e=>{e?p(a,s):g()},[p,g,a,s]);return[a,h,O]},Ya=function({filterValue:e,onSelect:t,onHover:n,rootClientId:o,clientId:r,isAppender:c,__experimentalInsertionIndex:l,maxBlockPatterns:a,maxBlockTypes:s,showBlockDirectory:b=!1,isDraggable:m=!0,shouldFocusBlock:f=!0}){const g=Object(d.useDebounce)(St.speak,500),[h,O]=qa({onSelect:t,rootClientId:o,clientId:r,isAppender:c,insertionIndex:l,shouldFocusBlock:f}),[v,k,_,y]=Fl(h,O),[E,,C]=Aa(O,h),S=Object(i.useMemo)(()=>{const t=Rl(Object(u.orderBy)(v,["frecency"],["desc"]),k,_,e);return void 0!==s?t.slice(0,s):t},[e,v,k,_,s]),w=Object(i.useMemo)(()=>{const t=Ml(E,e);return void 0!==a?t.slice(0,a):t},[e,E,a]);Object(i.useEffect)(()=>{if(!e)return;const t=S.length+w.length,n=Object(j.sprintf)(
|
34 |
/* translators: %d: number of results. */
|
35 |
+
Object(j._n)("%d result found.","%d results found.",t),t);g(n)},[e,g]);const B=Object(d.useAsyncList)(w),I=!Object(u.isEmpty)(S)||!Object(u.isEmpty)(w);return Object(i.createElement)(Ta,null,!b&&!I&&Object(i.createElement)(za,null),!!S.length&&Object(i.createElement)(xa,{title:Object(i.createElement)(p.VisuallyHidden,null,Object(j.__)("Blocks"))},Object(i.createElement)(Ia,{items:S,onSelect:y,onHover:n,label:Object(j.__)("Blocks"),isDraggable:m})),!!S.length&&!!w.length&&Object(i.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!w.length&&Object(i.createElement)(xa,{title:Object(i.createElement)(p.VisuallyHidden,null,Object(j.__)("Block Patterns"))},Object(i.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(i.createElement)(Da,{shownPatterns:B,blockPatterns:w,onClickPattern:C,isDraggable:m}))),b&&Object(i.createElement)($a.Slot,{fillProps:{onSelect:y,onHover:n,filterValue:e,hasItems:I,rootClientId:h}},e=>e.length?e:I?null:Object(i.createElement)(za,null)))};const Xa={name:"blocks",
|
36 |
/* translators: Blocks tab title in the block inserter. */
|
37 |
+
title:Object(j.__)("Blocks")},Qa={name:"patterns",
|
38 |
/* translators: Patterns tab title in the block inserter. */
|
39 |
+
title:Object(j.__)("Patterns")},Za={name:"reusable",
|
40 |
/* translators: Reusable blocks tab title in the block inserter. */
|
41 |
+
title:Object(j.__)("Reusable")};var Ja=function({children:e,showPatterns:t=!1,showReusableBlocks:n=!1,onSelect:o}){const r=Object(i.useMemo)(()=>{const e=[Xa];return t&&e.push(Qa),n&&e.push(Za),e},[Xa,t,Qa,n,Za]);return Object(i.createElement)(p.TabPanel,{className:"block-editor-inserter__tabs",tabs:r,onSelect:o},e)},es=function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:c,showMostUsedBlocks:l,shouldFocusBlock:a=!0}){const[s,u]=Object(i.useState)(""),[d,b]=Object(i.useState)(null),[m,g]=Object(i.useState)(null),[h,O,v]=qa({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:a}),{showPatterns:k,hasReusableBlocks:_}=Object(f.useSelect)(e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Mn);return{showPatterns:!!n(h).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}},[h]),y=Object(i.useCallback)((e,t,n)=>{O(e,t,n),r()},[O,r]),E=Object(i.useCallback)((e,t)=>{O(e,{patternName:t}),r()},[O,r]),C=Object(i.useCallback)(e=>{v(!!e),b(e)},[v,b]),S=Object(i.useCallback)(e=>{g(e)},[g]),w=Object(i.useMemo)(()=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"block-editor-inserter__block-list"},Object(i.createElement)(Na,{rootClientId:h,onInsert:y,onHover:C,showMostUsedBlocks:l})),c&&Object(i.createElement)("div",{className:"block-editor-inserter__tips"},Object(i.createElement)(p.VisuallyHidden,{as:"h2"},Object(j.__)("A tip for using the block editor")),Object(i.createElement)(aa,null))),[h,y,C,s,l,c]),B=Object(i.useMemo)(()=>Object(i.createElement)(Va,{rootClientId:h,onInsert:E,onClickCategory:S,selectedCategory:m}),[h,E,S,m]),I=Object(i.useMemo)(()=>Object(i.createElement)(Ua,{rootClientId:h,onInsert:y,onHover:C}),[h,y,C]),x=Object(i.useCallback)(e=>"blocks"===e.name?w:"patterns"===e.name?B:I,[w,B,I]);return Object(i.createElement)("div",{className:"block-editor-inserter__menu"},Object(i.createElement)("div",{className:"block-editor-inserter__main-area"},Object(i.createElement)("div",{className:"block-editor-inserter__content"},Object(i.createElement)(da,{onChange:e=>{d&&b(null),u(e)},value:s,label:Object(j.__)("Search for blocks and patterns"),placeholder:Object(j.__)("Search")}),!!s&&Object(i.createElement)(Ya,{filterValue:s,onSelect:r,onHover:C,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:a}),!s&&(k||_)&&Object(i.createElement)(Ja,{showPatterns:k,showReusableBlocks:_},x),!s&&!k&&!_&&w)),c&&d&&Object(i.createElement)(ja,{item:d}))};function ts({onSelect:e,rootClientId:t,clientId:n,isAppender:o}){const[r,c]=Object(i.useState)(""),[l,a]=qa({onSelect:e,rootClientId:t,clientId:n,isAppender:o}),[u]=Fl(l,a),[d]=Aa(a,l),b=d.length&&!!r,m=b&&d.length>6||u.length>6,{setInserterIsOpened:g,insertionIndex:h}=Object(f.useSelect)(e=>{const{getSettings:o,getBlockIndex:r,getBlockCount:c}=e(Mn),l=r(n,t);return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,insertionIndex:-1===l?c():l}},[n,t]);return Object(i.useEffect)(()=>{g&&g(!1)},[g]),Object(i.createElement)("div",{className:s()("block-editor-inserter__quick-inserter",{"has-search":m,"has-expand":g})},m&&Object(i.createElement)(da,{value:r,onChange:e=>{c(e)},label:Object(j.__)("Search for blocks and patterns"),placeholder:Object(j.__)("Search")}),Object(i.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},Object(i.createElement)(Ya,{filterValue:r,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:b?2:0,maxBlockTypes:6,isDraggable:!1})),g&&Object(i.createElement)(p.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{g({rootClientId:t,insertionIndex:h})},"aria-label":Object(j.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(j.__)("Browse all")))}const ns=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:r,toggleProps:c={}})=>{let a;a=r?Object(j.sprintf)(// translators: %s: the name of the block when there is only one
|
42 |
+
Object(j._x)("Add %s","directly add the only allowed block"),o):Object(j._x)("Add block","Generic label for block inserter button");const{onClick:s,...u}=c;return Object(i.createElement)(p.Button,Object(l.a)({icon:la.a,label:a,tooltipPosition:"bottom",onClick:function(t){e&&e(t),s&&s(t)},className:"block-editor-inserter__toggle","aria-haspopup":!r&&"true","aria-expanded":!r&&n,disabled:t},u))};class os extends i.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,toggleProps:c,hasItems:l,renderToggle:i=ns}=this.props;return i({onToggle:e,isOpen:t,disabled:n||!l,blockTitle:o,hasSingleBlockType:r,toggleProps:c})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:c}=this.props;return c?Object(i.createElement)(ts,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o}):Object(i.createElement)(es,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,insertOnlyAllowedBlock:n,__experimentalIsQuick:o,onSelectOrClose:r}=this.props;return t?this.renderToggle({onToggle:n}):Object(i.createElement)(p.Dropdown,{className:"block-editor-inserter",contentClassName:s()("block-editor-inserter__popover",{"is-quick":o}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(j.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:r})}}var rs=Object(d.compose)([Object(f.withSelect)((e,{clientId:t,rootClientId:n})=>{const{getBlockRootClientId:o,hasInserterItems:r,__experimentalGetAllowedBlocks:c}=e(Mn),{getBlockVariations:l}=e(m.store),i=c(n=n||o(t)||void 0),a=1===Object(u.size)(i)&&0===Object(u.size)(l(i[0].name,"inserter"));let s=!1;return a&&(s=i[0]),{hasItems:r(n),hasSingleBlockType:a,blockTitle:s?s.title:"",allowedBlockType:s,rootClientId:n}}),Object(f.withDispatch)((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:r,isAppender:c,hasSingleBlockType:l,allowedBlockType:i,onSelectOrClose:a}=t;if(!l)return;const{insertBlock:s}=e(Mn);s(Object(m.createBlock)(i.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:l,getBlockRootClientId:i}=n(Mn);if(r)return e(r,o);const a=t();return!c&&a&&i(a)===o?e(a,o)+1:l(o).length}(),o),a&&a();const u=Object(j.sprintf)(// translators: %s: the name of the block that has been added
|
43 |
+
Object(j.__)("%s block added"),i.title);Object(St.speak)(u)}})),Object(d.ifCondition)(({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o)])(os),cs=Object(d.compose)(Object(f.withSelect)((e,t)=>{const{getBlockCount:n,getBlockName:o,isBlockValid:r,getSettings:c,getTemplateLock:l}=e(Mn),i=!n(t.rootClientId),a=o(t.lastBlockClientId)===Object(m.getDefaultBlockName)(),s=r(t.lastBlockClientId),{bodyPlaceholder:u}=c();return{isVisible:i||!a||!s,showPrompt:i,isLocked:!!l(t.rootClientId),placeholder:u}}),Object(f.withDispatch)((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(Mn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}}))((function({isLocked:e,isVisible:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:c}){if(e||!t)return null;const l=Object(ca.decodeEntities)(r)||Object(j.__)("Type / to choose a block");return Object(i.createElement)("div",{"data-root-client-id":c||"",className:"block-editor-default-block-appender"},Object(i.createElement)("p",{tabIndex:"0",contentEditable:!0,suppressContentEditableWarning:!0,role:"button","aria-label":Object(j.__)("Add block"),className:"wp-block block-editor-default-block-appender__content",onFocus:n},o?l:"\ufeff"),Object(i.createElement)(rs,{rootClientId:c,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))})),ls=Object(i.forwardRef)((function({rootClientId:e,className:t,onFocus:n,tabIndex:o},r){return Object(i.createElement)(rs,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,renderToggle:({onToggle:e,disabled:c,isOpen:l,blockTitle:a,hasSingleBlockType:u})=>{let d;d=u?Object(j.sprintf)(// translators: %s: the name of the block when there is only one
|
44 |
+
Object(j._x)("Add %s","directly add the only allowed block"),a):Object(j._x)("Add block","Generic label for block inserter button");const b=!u;let m=Object(i.createElement)(p.Button,{ref:r,onFocus:n,tabIndex:o,className:s()(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":b?"true":void 0,"aria-expanded":b?l:void 0,disabled:c,label:d},!u&&Object(i.createElement)(p.VisuallyHidden,{as:"span"},d),Object(i.createElement)(qc.a,{icon:la.a}));return(b||u)&&(m=Object(i.createElement)(p.Tooltip,{text:d},m)),m},isAppender:!0})}));function is(e){e.stopPropagation()}Object(i.createContext)();var as=Object(f.withSelect)((e,{rootClientId:t})=>{const{getBlockOrder:n,canInsertBlockType:o,getTemplateLock:r,getSelectedBlockClientId:c}=e(Mn);return{isLocked:!!r(t),blockClientIds:n(t),canInsertDefaultBlock:o(Object(m.getDefaultBlockName)(),t),selectedBlockClientId:c()}})((function({blockClientIds:e,rootClientId:t,canInsertDefaultBlock:n,isLocked:o,renderAppender:r,className:c,selectedBlockClientId:l,tagName:a="div"}){if(o||!1===r)return null;let d;if(r)d=Object(i.createElement)(r,null);else{const o=!t,r=l===t,c=l&&!e.includes(l);if(!o&&!r&&(!l||c))return null;d=n?Object(i.createElement)(cs,{rootClientId:t,lastBlockClientId:Object(u.last)(e)}):Object(i.createElement)(ls,{rootClientId:t,className:"block-list-appender__toggle"})}return Object(i.createElement)(a,{tabIndex:-1,onFocus:is,className:s()("block-list-appender","wp-block",c)},d)}));function ss(e,t){const n=Object(f.useSelect)(e=>e(Mn).getSettings().mediaUpload,[]),{canInsertBlockType:o,getBlockIndex:r,getClientIdsOfDescendants:c}=Object(f.useSelect)(Mn),{insertBlocks:l,moveBlocksToPosition:i,updateBlockAttributes:a,clearSelectedBlock:s}=Object(f.useDispatch)(Mn),u=function(e,t,n,o,r,c,l){return i=>{const{srcRootClientId:a,srcClientIds:s,type:u,blocks:d}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(i);if("inserter"===u&&(l(),c(d,t,e,!0,null)),"block"===u){const c=n(s[0],a);if(a===e&&c===t)return;if(s.includes(e)||o(s).some(t=>t===e))return;const l=a===e,i=s.length;r(s,a,e,l&&c<t?t-i:t)}}}(e,t,r,c,i,l,s),d=function(e,t,n,o,r,c){return l=>{if(!n)return;const i=Object(m.findTransform)(Object(m.getBlockTransforms)("from"),t=>"files"===t.type&&r(t.blockName,e)&&t.isMatch(l));if(i){const n=i.transform(l,o);c(n,t,e)}}}(e,t,n,a,o,l),b=function(e,t,n){return o=>{const r=Object(m.pasteHandler)({HTML:o,mode:"BLOCKS"});r.length&&n(r,t,e)}}(e,t,l);return e=>{const t=Object(di.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?d(t):n?b(n):u(e)}}function us(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach(n=>{const c=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:c}=e,l=o?r:c,i=o?c:r,a=o?t.left:t.top,s=o?t.right:t.bottom,u=t[n];let d;return d=l>=a&&l<=s?l:l<s?a:s,Math.sqrt((l-d)**2+(i-u)**2)}(e,t,n);(void 0===o||c<o)&&(o=c,r=n)}),[o,r]}function ds({rootClientId:e=""}={}){const[t,n]=Object(i.useState)(null),{isLockedAll:o,orientation:r}=Object(f.useSelect)(t=>{var n;const{getBlockListSettings:o,getTemplateLock:r}=t(Mn);return{isLockedAll:"all"===r(e),orientation:null===(n=o(e))||void 0===n?void 0:n.orientation}},[e]),{showInsertionPoint:c,hideInsertionPoint:l}=Object(f.useDispatch)(Mn),a=ss(e,t),s=Object(d.useThrottle)(Object(i.useCallback)((t,o)=>{const l=function(e,t,n){const o="horizontal"===n?["left","right"]:["top","bottom"];let r,c;return e.forEach((n,l)=>{if(!n.classList.contains("wp-block"))return;const i=n.getBoundingClientRect(),[a,s]=us(t,i,o);if(void 0===c||a<c){const t="bottom"===s||"right"===s;let n=t?1:0;n+=t&&e[l+1]&&e[l+1].classList.contains("is-dragging")?1:0,c=a,r=l+n}}),r}(Array.from(o.children),{x:t.clientX,y:t.clientY},r);n(void 0===l?0:l),null!==l&&c(e,l)},[]),200);return Object(d.__experimentalUseDropZone)({isDisabled:o,onDrop:a,onDragOver(e){s(e,e.currentTarget)},onDragEnd(){s.cancel(),l(),n(null)}})}function bs(e){return Object(d.useRefEffect)(t=>{if(e)return t.addEventListener("wheel",n),()=>{t.removeEventListener("wheel",n)};function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}},[e])}const ms=Object(i.createContext)();function ps({__unstablePopoverSlot:e,__unstableContentRef:t}){const{selectBlock:n}=Object(f.useDispatch)(Mn),o=Object(i.useContext)(ms),r=Object(i.useRef)(),{orientation:c,isHidden:l,previousClientId:a,nextClientId:u,rootClientId:d,isInserterShown:b}=Object(f.useSelect)(e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getMultiSelectedBlockClientIds:r,getSelectedBlockClientId:c,hasMultiSelection:l,getSettings:i,getBlockInsertionPoint:a}=e(Mn),s=a(),u=n(s.rootClientId)[s.index-1],d=s.rootClientId,b=n(d);if(!b.length)return{};const m=u||b[b.length-1],p=m===b[b.length-1]?null:b[b.indexOf(m)+1],{hasReducedUI:f}=i(),g=r(),h=c(),O=(null===(t=o(d))||void 0===t?void 0:t.orientation)||"vertical";return{previousClientId:m,nextClientId:p,isHidden:f||(l()?p&&g.includes(p):p&&"vertical"===O&&p===h),orientation:O,clientId:u,rootClientId:d,isInserterShown:null==s?void 0:s.__unstableWithInserter}},[]),m=yr(a),g=yr(u),h=Object(i.useMemo)(()=>{if(!m)return{};const e=m.getBoundingClientRect(),t=g?g.getBoundingClientRect():null;if("vertical"===c)return{width:m.offsetWidth,height:t?t.top-e.bottom:0};let n=0;return g&&(n=Object(j.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:m.offsetHeight}},[m,g]),O=Object(i.useCallback)(()=>{const{ownerDocument:e}=m,t=m.getBoundingClientRect(),n=g?g.getBoundingClientRect():null;return"vertical"===c?Object(j.isRTL)()?{top:t.bottom,left:t.right,right:t.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t.bottom,left:t.left,right:t.right,bottom:n?n.top:t.bottom,ownerDocument:e}:Object(j.isRTL)()?{top:t.top,left:n?n.right:t.left,right:t.left,bottom:t.bottom,ownerDocument:e}:{top:t.top,left:t.right,right:n?n.left:t.right,bottom:t.bottom,ownerDocument:e}},[m,g]),v=bs(t);if(!m)return null;const k=s()("block-editor-block-list__insertion-point","is-"+c),_=!l&&g&&b,y=_||!l;return Object(i.createElement)(p.Popover,{ref:v,noArrow:!0,animate:!1,getAnchorRect:O,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:e||null},Object(i.createElement)("div",{ref:r,tabIndex:-1,onClick:function(e){e.target===r.current&&u&&n(u,-1)},onFocus:function(e){e.target!==r.current&&(o.current=!0)},className:s()(k,{"is-with-inserter":_}),style:h},y&&Object(i.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),_&&Object(i.createElement)("div",{className:s()("block-editor-block-list__insertion-point-inserter")},Object(i.createElement)(rs,{position:"bottom center",clientId:u,rootClientId:d,__experimentalIsQuick:!0,onToggle:e=>{o.current=e},onSelectOrClose:()=>{o.current=!1}}))))}function fs({children:e,__unstablePopoverSlot:t,__unstableContentRef:n}){const o=Object(f.useSelect)(e=>{const{isMultiSelecting:t,isBlockInsertionPointVisible:n}=e(Mn);return n()&&!t()},[]);return Object(i.createElement)(ms.Provider,{value:Object(i.useRef)(!1)},o&&Object(i.createElement)(ps,{__unstablePopoverSlot:t,__unstableContentRef:n}),e)}function gs(){const e=Object(i.useContext)(ms),{getBlockListSettings:t,getBlockRootClientId:n,getBlockIndex:o,isBlockInsertionPointVisible:r,isMultiSelecting:c}=Object(f.useSelect)(Mn),{showInsertionPoint:l,hideInsertionPoint:a}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(n=>{function i(n){var i;if(e.current)return;if(c())return;if(!n.target.classList.contains("block-editor-block-list__layout"))return void(r()&&a());let s;n.target.classList.contains("is-root-container")||(s=(n.target.getAttribute("data-block")?n.target:n.target.closest("[data-block]")).getAttribute("data-block"));const u=(null===(i=t(s))||void 0===i?void 0:i.orientation)||"vertical",d=n.target.getBoundingClientRect(),b=n.clientY-d.top,m=n.clientX-d.left;let p=Array.from(n.target.children).find(e=>e.classList.contains("wp-block")&&"vertical"===u&&e.offsetTop>b||e.classList.contains("wp-block")&&"horizontal"===u&&e.offsetLeft>m);if(!p)return;if(!p.id&&(p=p.firstElementChild,!p))return;const f=p.id.slice("block-".length);if(!f)return;const g=p.getBoundingClientRect();if("horizontal"===u&&(n.clientY>g.bottom||n.clientY<g.top)||"vertical"===u&&(n.clientX>g.right||n.clientX<g.left))return void(r()&&a());const h=o(f,s);0!==h?l(s,h,{__unstableWithInserter:!0}):r()&&a()}return n.addEventListener("mousemove",i),()=>{n.removeEventListener("mousemove",i)}},[e,t,n,o,r,c,l,a])}const hs="undefined"==typeof window?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback||window.requestAnimationFrame,Os="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;var js=n(24),vs=({children:e,clientIds:t,cloneClassname:n,onDragStart:o,onDragEnd:r,elementId:c})=>{const{srcRootClientId:l,isDraggable:a,icon:s}=Object(f.useSelect)(e=>{var n;const{getBlockRootClientId:o,getTemplateLock:r,getBlockName:c}=e(Mn),l=o(t[0]),i=l?r(l):null,a=c(t[0]);return{srcRootClientId:l,isDraggable:"all"!==i,icon:null===(n=Object(m.getBlockType)(a))||void 0===n?void 0:n.icon}},[t]),u=Object(i.useRef)(!1),[d,b,g]=function(){const e=Object(i.useRef)(null),t=Object(i.useRef)(null),n=Object(i.useRef)(null),o=Object(i.useRef)(null);return Object(i.useEffect)(()=>()=>{o.current&&(clearInterval(o.current),o.current=null)},[]),[Object(i.useCallback)(r=>{e.current=r.clientY,n.current=Object(di.getScrollContainer)(r.target),o.current=setInterval(()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}},25)},[]),Object(i.useCallback)(o=>{if(!n.current)return;const r=n.current.offsetHeight,c=e.current-n.current.offsetTop,l=o.clientY-n.current.offsetTop;if(o.clientY>c){const e=Math.max(r-c-50,0),n=Math.max(l-c-50,0)/e;t.current=25*n}else if(o.clientY<c){const e=Math.max(c-50,0),n=Math.max(c-l-50,0)/e;t.current=-25*n}else t.current=0},[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:O}=Object(f.useDispatch)(Mn);if(Object(i.useEffect)(()=>()=>{u.current&&O()},[]),!a)return e({isDraggable:!1});const j={type:"block",srcClientIds:t,srcRootClientId:l};return Object(i.createElement)(p.Draggable,{cloneClassname:n,elementId:c,__experimentalTransferDataType:"wp-blocks",transferData:j,onDragStart:e=>{h(t),u.current=!0,d(e),o&&o()},onDragOver:b,onDragEnd:()=>{O(),u.current=!1,g(),r&&r()},__experimentalDragComponent:Object(i.createElement)(ya,{count:t.length,icon:s})},({onDraggableStart:t,onDraggableEnd:n})=>e({draggable:!0,onDragStart:t,onDragEnd:n}))},ks=function({clientId:e,rootClientId:t,blockElement:n}){const o=Yl(e),r=Object(f.useSelect)(n=>{var o;const{__unstableGetBlockWithoutInnerBlocks:r,getBlockIndex:c,hasBlockMovingClientId:l,getBlockListSettings:i}=n(Mn),a=c(e,t),{name:s,attributes:u}=r(e);return{index:a,name:s,attributes:u,blockMovingMode:l(),orientation:null===(o=i(t))||void 0===o?void 0:o.orientation}},[e,t]),{index:c,name:a,attributes:u,blockMovingMode:d,orientation:b}=r,{setNavigationMode:g,removeBlock:h}=Object(f.useDispatch)(Mn),O=Object(i.useRef)();Object(i.useEffect)(()=>{O.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(St.speak)(P)},[]);const{hasBlockMovingClientId:v,getBlockIndex:k,getBlockRootClientId:_,getClientIdsOfDescendants:y,getSelectedBlockClientId:E,getMultiSelectedBlocksEndClientId:C,getPreviousBlockClientId:S,getNextBlockClientId:w}=Object(f.useSelect)(Mn),{selectBlock:B,clearSelectedBlock:I,setBlockMovingClientId:x,moveBlockToPosition:T}=Object(f.useDispatch)(Mn),N=Object(m.getBlockType)(a),P=Object(m.__experimentalGetAccessibleBlockLabel)(N,u,c+1,b),L=s()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!d}),A=Object(j.__)("Drag");return Object(i.createElement)("div",{className:L},Object(i.createElement)(p.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(Hl,{icon:null==o?void 0:o.icon,showColors:!0})),Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(vs,{clientIds:[e]},e=>Object(i.createElement)(p.Button,Object(l.a)({icon:_a,className:"block-selection-button_drag-handle","aria-hidden":"true",label:A,tabIndex:"-1"},e)))),Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(p.Button,{ref:O,onClick:()=>g(!1),onKeyDown:function(t){const{keyCode:o}=t,r=o===lc.UP,c=o===lc.DOWN,l=o===lc.LEFT,i=o===lc.RIGHT,a=o===lc.TAB,s=o===lc.ESCAPE,u=o===lc.ENTER,d=o===lc.SPACE,b=t.shiftKey;if(o===lc.BACKSPACE||o===lc.DELETE)return h(e),void t.preventDefault();const m=E(),p=C(),f=S(p||m),g=w(p||m),O=a&&b||r,j=a&&!b||c,N=l,P=i;let L;if(O)L=f;else if(j)L=g;else if(N){var A;L=null!==(A=_(m))&&void 0!==A?A:m}else if(P){var R;L=null!==(R=y([m])[0])&&void 0!==R?R:m}const M=v();if(s&&M&&x(null),(u||d)&&M){const e=_(M),t=_(m),n=k(M,e);let o=k(m,t);n<o&&e===t&&(o-=1),T(M,e,t,o),B(M),x(null)}if(j||O||N||P)if(L)t.preventDefault(),B(L);else if(a&&m){let e;j?(e=di.focus.tabbable.findNext(n),e||(e=n.ownerDocument.defaultView.frameElement,e=di.focus.tabbable.findNext(e))):e=di.focus.tabbable.findPrevious(n),e&&(t.preventDefault(),e.focus(),I())}},label:P,className:"block-selection-button_select-button"},Object(i.createElement)(Xl,{clientId:e})))))};function _s(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var ys=function({children:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,...r}){const c=Object(i.useRef)(),a=function(e){const[t,n]=Object(i.useState)(!0),o=Object(i.useCallback)(()=>{const t=!di.focus.tabbable.find(e.current).some(e=>!("toolbarItem"in e.dataset));t||Bt()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)},[]);return Object(i.useLayoutEffect)(()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()},[t]),t}(c);return function(e,t,n,o,r){const[c]=Object(i.useState)(t),[l]=Object(i.useState)(o),a=Object(i.useCallback)(()=>{!function(e){const[t]=di.focus.tabbable.find(e);t&&t.focus()}(e.current)},[]);Object(js.useShortcut)("core/block-editor/focus-toolbar",a,{bindGlobal:!0,eventName:"keydown"}),Object(i.useEffect)(()=>{c&&a()},[n,c,a]),Object(i.useEffect)(()=>{let t=0;return l&&!c&&(t=window.requestAnimationFrame(()=>{const t=_s(e.current),n=l||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus()})),()=>{if(window.cancelAnimationFrame(t),!r)return;const n=_s(e.current).findIndex(e=>0===e.tabIndex);r(n)}},[l,c])}(c,t,a,n,o),a?Object(i.createElement)(p.Toolbar,Object(l.a)({label:r["aria-label"],ref:c},r),e):Object(i.createElement)(p.NavigableMenu,Object(l.a)({orientation:"horizontal",role:"toolbar",ref:c},r),e)},Es=Object(f.withSelect)((e,{clientIds:t})=>{var n;const{getBlock:o,getBlockIndex:r,getBlockListSettings:c,getTemplateLock:l,getBlockOrder:i,getBlockRootClientId:a}=e(Mn),s=Object(u.castArray)(t),d=Object(u.first)(s),b=o(d),p=a(Object(u.first)(s)),f=r(d,p),g=0===f,h=r(Object(u.last)(s),p)===i(p).length-1;return{blockType:b?Object(m.getBlockType)(b.name):null,isLocked:"all"===l(p),rootClientId:p,firstIndex:f,isFirst:g,isLast:h,orientation:null===(n=c(p))||void 0===n?void 0:n.orientation}})((function({isFirst:e,isLast:t,clientIds:n,isLocked:o,isHidden:r,rootClientId:c,orientation:a,hideDragHandle:u}){const[d,b]=Object(i.useState)(!1),m=()=>b(!0),f=()=>b(!1);if(o||e&&t&&!c)return null;const g=Object(j.__)("Drag");return Object(i.createElement)("div",{className:s()("block-editor-block-mover",{"is-visible":d||!r,"is-horizontal":"horizontal"===a})},!u&&Object(i.createElement)(vs,{clientIds:n,cloneClassname:"block-editor-block-mover__drag-clone"},e=>Object(i.createElement)(p.Button,Object(l.a)({icon:_a,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:g,tabIndex:"-1"},e))),Object(i.createElement)(p.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(i.createElement)(p.ToolbarItem,{onFocus:m,onBlur:f},e=>Object(i.createElement)(Ei,Object(l.a)({clientIds:n},e))),Object(i.createElement)(p.ToolbarItem,{onFocus:m,onBlur:f},e=>Object(i.createElement)(Ci,Object(l.a)({clientIds:n},e)))))}));const{clearTimeout:Cs,setTimeout:Ss}=window;function ws({ref:e,isFocused:t,debounceTimeout:n=200,onChange:o=u.noop}){const[r,c]=Object(i.useState)(!1),l=Object(i.useRef)(),a=t=>{null!=e&&e.current&&c(t),o(t)},s=()=>{const e=l.current;e&&Cs&&Cs(e)};return Object(i.useEffect)(()=>()=>s(),[]),{showMovers:r,debouncedShowMovers:e=>{e&&e.stopPropagation(),s(),r||a(!0)},debouncedHideMovers:o=>{o&&o.stopPropagation(),s(),l.current=Ss(()=>{(()=>{const n=(null==e?void 0:e.current)&&e.current.matches(":hover");return!t&&!n})()&&a(!1)},n)}}}function Bs({ref:e,debounceTimeout:t=200,onChange:n=u.noop}){const[o,r]=Object(i.useState)(!1),{showMovers:c,debouncedShowMovers:l,debouncedHideMovers:a}=ws({ref:e,debounceTimeout:t,isFocused:o,onChange:n}),s=Object(i.useRef)(!1),d=()=>(null==e?void 0:e.current)&&e.current.contains(e.current.ownerDocument.activeElement);return Object(i.useEffect)(()=>{const t=e.current,n=()=>{d()&&(r(!0),l())},o=()=>{d()||(r(!1),a())};return t&&!s.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),s.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}},[e,s,r,l,a]),{showMovers:c,gestures:{onMouseMove:l,onMouseLeave:a}}}function Is(){const{selectBlock:e,toggleBlockHighlight:t}=Object(f.useDispatch)(Mn),{firstParentClientId:n,shouldHide:o,hasReducedUI:r}=Object(f.useSelect)(e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:r}=e(Mn),{hasBlockSupport:c}=e(m.store),l=n(o()),i=l[l.length-1],a=t(i),s=Object(m.getBlockType)(a),u=r();return{firstParentClientId:i,shouldHide:!c(s,"__experimentalParentSelector",!0),hasReducedUI:u.hasReducedUI}},[]),c=Yl(n),a=Object(i.useRef)(),{gestures:s}=Bs({ref:a,onChange(e){e&&r||t(n,e)}});return o||void 0===n?null:Object(i.createElement)("div",Object(l.a)({className:"block-editor-block-parent-selector",key:n,ref:a},s),Object(i.createElement)(p.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:Object(j.sprintf)(
|
45 |
/* translators: %s: Name of the block's parent. */
|
46 |
+
Object(j.__)("Select %s"),c.title),showTooltip:!0,icon:Object(i.createElement)(Hl,{icon:c.icon})}))}var xs=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function Ts({blocks:e}){return Object(i.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(i.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(i.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(i.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(i.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(j.__)("Preview")),Object(i.createElement)(Oa,{viewportWidth:500,blocks:e})))))}var Ns=({className:e,possibleBlockTransformations:t,onSelect:n,blocks:o})=>{const[r,c]=Object(i.useState)();return Object(i.createElement)(p.MenuGroup,{label:Object(j.__)("Transform to"),className:e},r&&Object(i.createElement)(Ts,{blocks:Object(m.switchToBlockType)(o,r)}),t.map(e=>{const{name:t,icon:o,title:r,isDisabled:l}=e;return Object(i.createElement)(p.MenuItem,{key:t,className:Object(m.getBlockMenuDefaultClassName)(t),onClick:e=>{e.preventDefault(),n(t)},disabled:l,onMouseLeave:()=>c(null),onMouseEnter:()=>c(t)},Object(i.createElement)(Hl,{icon:o,showColors:!0}),r)}))};const Ps={};function Ls({genericPreviewBlock:e,style:t,isActive:n,onBlur:o,onHover:r,onSelect:c,styleClassName:l,itemRole:a}){const u=Object(i.useMemo)(()=>({...e,attributes:{...e.attributes,className:l}}),[e,l]);return Object(i.createElement)("div",{key:t.name,className:s()("block-editor-block-styles__item",{"is-active":n}),onClick:()=>c(),onKeyDown:e=>{lc.ENTER!==e.keyCode&&lc.SPACE!==e.keyCode||(e.preventDefault(),c())},onMouseEnter:r,onMouseLeave:o,role:a||"button",tabIndex:"0","aria-label":t.label||t.name},Object(i.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(i.createElement)(Oa,{viewportWidth:500,blocks:u})),Object(i.createElement)("div",{className:"block-editor-block-styles__item-label"},t.label||t.name))}var As=function({clientId:e,onSwitch:t=u.noop,onHoverClassName:n=u.noop,itemRole:o}){const{styles:r,block:c,type:l,className:a}=Object(f.useSelect)(t=>{const{getBlock:n}=t(Mn),o=n(e);if(!o)return Ps;const r=Object(m.getBlockType)(o.name),{getBlockStyles:c}=t(m.store);return{block:o,type:r,styles:c(o.name),className:o.attributes.className||""}},[e]),{updateBlockAttributes:s}=Object(f.useDispatch)(Mn),d=function(e,t){return Object(i.useMemo)(()=>{const n=null==t?void 0:t.example,o=null==t?void 0:t.name;return n&&o?Object(m.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?Object(m.cloneBlock)(e):void 0},[null!=t&&t.example?null==e?void 0:e.name:e,t])}(c,l);if(!r||0===r.length)return null;const b=Object(u.find)(r,"isDefault")?r:[{name:"default",label:Object(j._x)("Default","block style"),isDefault:!0},...r],p=function(e,t){for(const n of new Mr.a(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=Object(u.find)(e,{name:t});if(o)return o}return Object(u.find)(e,"isDefault")}(b,a);return Object(i.createElement)("div",{className:"block-editor-block-styles"},b.map(r=>{const c=function(e,t,n){const o=new Mr.a(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}(a,p,r);return Object(i.createElement)(Ls,{genericPreviewBlock:d,className:a,isActive:p===r,key:r.name,onSelect:()=>{s(e,{className:c}),n(null),t()},onBlur:()=>n(null),onHover:()=>n(c),style:r,styleClassName:c,itemRole:o})}))};function Rs({hoveredBlock:e,onSwitch:t}){const{name:n,clientId:o}=e,[r,c]=Object(i.useState)(),l=Object(f.useSelect)(e=>e(m.store).getBlockType(n),[n]);return Object(i.createElement)(p.MenuGroup,{label:Object(j.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},r&&Object(i.createElement)(Ts,{blocks:l.example?Object(m.getBlockFromExample)(l.name,{attributes:{...l.example.attributes,className:r},innerBlocks:l.example.innerBlocks}):Object(m.cloneBlock)(e,{className:r})}),Object(i.createElement)(As,{clientId:o,onSwitch:t,onHoverClassName:c,itemRole:"menuitem"}))}const Ms=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:c=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of c){const o=Ms(e,t,n);if(o)return o}}},Ds=(e,t)=>{const n=((e,t)=>{const n=Object(m.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce((e,n)=>(t[n]&&(e[n]=t[n]),e),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};function Fs({patterns:e,onSelect:t}){return Object(i.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(i.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(i.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},Object(i.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(i.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(j.__)("Preview")),Object(i.createElement)(Vs,{patterns:e,onSelect:t})))))}function Vs({patterns:e,onSelect:t}){const n=Object(p.__unstableUseCompositeState)();return Object(i.createElement)(p.__unstableComposite,Object(l.a)({},n,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":Object(j.__)("Patterns list")}),e.map(e=>Object(i.createElement)(Hs,{key:e.name,pattern:e,onSelect:t,composite:n})))}function Hs({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-switcher__preview-patterns-container",r=Object(d.useInstanceId)(Hs,o+"-list__item-description");return Object(i.createElement)("div",{className:o+"-list__list-item","aria-label":e.title,"aria-describedby":e.description?r:void 0},Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({role:"option",as:"div"},n,{className:o+"-list__item",onClick:()=>t(e.transformedBlocks)}),Object(i.createElement)(Oa,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),Object(i.createElement)("div",{className:o+"-list__item-title"},e.title)),!!e.description&&Object(i.createElement)(p.VisuallyHidden,{id:r},e.description))}var zs=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=Object(i.useState)(!1),c=((e,t)=>{const n=Object(f.useSelect)(t=>e.map(({name:e})=>t(Mn).__experimentalGetParsedPattern(e)),[e]);return Object(i.useMemo)(()=>n.reduce((e,n)=>{const o=((e,t)=>{const n=t.map(e=>Object(m.cloneBlock)(e)),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=Ms(r,t.name,o);if(n){e=!0,o.add(n.clientId),Ds(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e},[]),[n,t])})(t,e);return c.length?Object(i.createElement)(p.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&Object(i.createElement)(Fs,{patterns:c,onSelect:n}),Object(i.createElement)(p.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:hi.a},Object(j.__)("Patterns"))):null};const Gs=({clientIds:e,blocks:t})=>{const{replaceBlocks:n}=Object(f.useDispatch)(Mn),o=Yl(t[0].clientId),{possibleBlockTransformations:r,hasBlockStyles:c,icon:l,blockTitle:a,patterns:s}=Object(f.useSelect)(n=>{const{getBlockRootClientId:r,getBlockTransformItems:c,__experimentalGetPatternTransformItems:l}=n(Mn),{getBlockStyles:i,getBlockType:a}=n(m.store),s=r(Object(u.castArray)(e)[0]),[{name:d}]=t,b=1===t.length,p=b&&i(d);let f;var g;b?f=null==o?void 0:o.icon:f=1===Object(u.uniq)(t.map(({name:e})=>e)).length?null===(g=a(d))||void 0===g?void 0:g.icon:xs;return{possibleBlockTransformations:c(t,s),hasBlockStyles:!(null==p||!p.length),icon:f,blockTitle:a(d).title,patterns:l(t,s)}},[e,t,null==o?void 0:o.icon]),d=1===t.length&&Object(m.isReusableBlock)(t[0]),b=1===t.length&&Object(m.isTemplatePart)(t[0]),g=!!r.length,h=!(null==s||!s.length);if(!c&&!g)return Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(p.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:a,icon:Object(i.createElement)(Hl,{icon:l,showColors:!0})}));const O=a,v=1===t.length?Object(j.sprintf)(
|
47 |
/* translators: %s: block title. */
|
48 |
Object(j.__)("%s: Change block type or style"),a):Object(j.sprintf)(
|
49 |
/* translators: %d: number of blocks. */
|
50 |
+
Object(j._n)("Change type of %d block","Change type of %d blocks",t.length),t.length),k=c||g||h;return Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(p.ToolbarItem,null,o=>Object(i.createElement)(p.DropdownMenu,{className:"block-editor-block-switcher",label:O,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Hl,{icon:l,className:"block-editor-block-switcher__toggle",showColors:!0}),(d||b)&&Object(i.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},Object(i.createElement)(Xl,{clientId:e}))),toggleProps:{describedBy:v,...o},menuProps:{orientation:"both"}},({onClose:o})=>k&&Object(i.createElement)("div",{className:"block-editor-block-switcher__container"},h&&Object(i.createElement)(zs,{blocks:t,patterns:s,onSelect:t=>{(t=>{n(e,t)})(t),o()}}),g&&Object(i.createElement)(Ns,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:r,blocks:t,onSelect:r=>{(o=>{n(e,Object(m.switchToBlockType)(t,o))})(r),o()}}),c&&Object(i.createElement)(Rs,{hoveredBlock:t[0],onSwitch:o})))))};var Us=({clientIds:e})=>{const t=Object(f.useSelect)(t=>t(Mn).getBlocksByClientId(e),[e]);return!t.length||t.some(e=>!e)?null:Object(i.createElement)(Gs,{clientIds:e,blocks:t})},Ws=n(33);function Ks(){const{getBlockName:e}=Object(f.useSelect)(Mn),{getBlockType:t}=Object(f.useSelect)(m.store),{createSuccessNotice:n}=Object(f.useDispatch)(La.store);return Object(i.useCallback)((o,r)=>{let c="";if(1===r.length){const n=r[0],{title:l}=t(e(n));c="copy"===o?Object(j.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
|
51 |
Object(j.__)('Copied "%s" to clipboard.'),l):Object(j.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
|
52 |
Object(j.__)('Moved "%s" to clipboard.'),l)}else c="copy"===o?Object(j.sprintf)(// Translators: %d: Number of blocks being copied.
|
53 |
Object(j._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):Object(j.sprintf)(// Translators: %d: Number of blocks being cut.
|
54 |
+
Object(j._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(c,{type:"snackbar"})},[])}function $s(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o}=Object(f.useSelect)(Mn),{flashBlock:r,removeBlocks:c,replaceBlocks:l}=Object(f.useDispatch)(Mn),i=Ks();return Object(d.useRefEffect)(a=>{function s(s){const u=t();if(0!==u.length){if(!n()){const{target:e}=s,{ownerDocument:t}=e;if("copy"===s.type||"cut"===s.type?Object(di.documentHasUncollapsedSelection)(t):Object(di.documentHasSelection)(t))return}if(a.contains(s.target.ownerDocument.activeElement)){if(s.preventDefault(),"copy"===s.type||"cut"===s.type){1===u.length&&r(u[0]),i(s.type,u);const t=e(u),n=Object(m.serialize)(t);s.clipboardData.setData("text/plain",n),s.clipboardData.setData("text/html",n)}if("cut"===s.type)c(u);else if("paste"===s.type){const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(t){try{n=e.getData("Text")}catch(e){return}}const o=Object(di.getFilesFromDataTransfer)(e).filter(({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e));return o.length&&!n&&(n=o.map(e=>`<img src="${Object(Ws.createBlobURL)(e)}">`).join(""),t=""),{html:n,plainText:t}}(s),r=Object(m.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});l(u,r,r.length-1,-1)}}}}return a.ownerDocument.addEventListener("copy",s),a.ownerDocument.addEventListener("cut",s),a.ownerDocument.addEventListener("paste",s),()=>{a.ownerDocument.removeEventListener("copy",s),a.ownerDocument.removeEventListener("cut",s),a.ownerDocument.removeEventListener("paste",s)}},[])}var qs=function({children:e}){return Object(i.createElement)("div",{ref:$s()},e)};function Ys({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:c,getTemplateLock:l}=Object(f.useSelect)(e=>e(Mn),[]),{getDefaultBlockName:i,getGroupingBlockName:a}=Object(f.useSelect)(e=>e(m.store),[]),s=c(e),d=r(e[0]),b=Object(u.every)(s,e=>!!e&&Object(m.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,d)),p=o(i(),d),{removeBlocks:g,replaceBlocks:h,duplicateBlocks:O,insertAfterBlock:j,insertBeforeBlock:v,flashBlock:k,setBlockMovingClientId:_,setNavigationMode:y,selectBlock:E}=Object(f.useDispatch)(Mn),C=Ks();return t({canDuplicate:b,canInsertDefaultBlock:p,isLocked:!!l(d),rootClientId:d,blocks:s,onDuplicate:()=>O(e,n),onRemove:()=>g(e,n),onInsertBefore(){v(Object(u.first)(Object(u.castArray)(e)))},onInsertAfter(){j(Object(u.last)(Object(u.castArray)(e)))},onMoveTo(){y(!0),E(e[0]),_(e[0])},onGroup(){if(!s.length)return;const t=a(),n=Object(m.switchToBlockType)(s,t);n&&h(e,n)},onUngroup(){if(!s.length)return;const t=s[0].innerBlocks;t.length&&h(e,t)},onCopy(){const e=s.map(({clientId:e})=>e);1===s.length&&k(e[0]),C("copy",e)}})}var Xs=Object(d.compose)([Object(f.withSelect)((e,{clientId:t})=>{const{getBlock:n,getBlockMode:o,getSettings:r}=e(Mn),c=n(t),l=r().codeEditingEnabled;return{mode:o(t),blockType:c?Object(m.getBlockType)(c.name):null,isCodeEditingEnabled:l}}),Object(f.withDispatch)((e,{onToggle:t=u.noop,clientId:n})=>({onToggleMode(){e(Mn).toggleBlockMode(n),t()}}))])((function({blockType:e,mode:t,onToggleMode:n,small:o=!1,isCodeEditingEnabled:r=!0}){if(!Object(m.hasBlockSupport)(e,"html",!0)||!r)return null;const c="visual"===t?Object(j.__)("Edit as HTML"):Object(j.__)("Edit visually");return Object(i.createElement)(p.MenuItem,{onClick:n},!o&&c)})),Qs=Object(d.compose)(Object(f.withSelect)((e,{clientId:t})=>{const n=e(Mn).getBlock(t);return{block:n,shouldRender:n&&"core/html"===n.name}}),Object(f.withDispatch)((e,{block:t})=>({onClick:()=>e(Mn).replaceBlocks(t.clientId,Object(m.rawHandler)({HTML:Object(m.getBlockContent)(t)}))})))((function({shouldRender:e,onClick:t,small:n}){if(!e)return null;const o=Object(j.__)("Convert to Blocks");return Object(i.createElement)(p.MenuItem,{onClick:t},!n&&o)}));const{Fill:Zs,Slot:Js}=Object(p.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Zs.Slot=Js;var eu=Zs;function tu({clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r,onClose:c=(()=>{})}){const{replaceBlocks:l}=Object(f.useDispatch)(Mn);return t||n?Object(i.createElement)(i.Fragment,null,t&&Object(i.createElement)(p.MenuItem,{onClick:()=>{(()=>{const t=Object(m.switchToBlockType)(o,r);t&&l(e,t)})(),c()}},Object(j._x)("Group","verb")),n&&Object(i.createElement)(p.MenuItem,{onClick:()=>{(()=>{const t=o[0].innerBlocks;t.length&&l(e,t)})(),c()}},Object(j._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:nu,Slot:ou}=Object(p.createSlotFill)("BlockSettingsMenuControls");function ru({...e}){return Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(nu,e))}ru.Slot=({fillProps:e,clientIds:t=null})=>{const n=Object(f.useSelect)(e=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o}=e(Mn),r=null!==t?t:o();return Object(u.map)(Object(u.compact)(n(r)),e=>e.name)},[t]),o=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}=Object(f.useSelect)(e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:r,getSelectedBlockClientIds:c}=e(Mn),{getGroupingBlockName:l}=e(m.store),i=c(),a=l(),s=r(a,null!=i&&i.length?n(i[0]):void 0),u=o(i),d=1===u.length&&(null===(t=u[0])||void 0===t?void 0:t.name)===a;return{clientIds:i,isGroupable:s&&u.length&&!d,isUngroupable:d&&!!u[0].innerBlocks.length,blocksSelection:u,groupingBlockName:a}},[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}}(),{isGroupable:r,isUngroupable:c}=o,a=r||c;return Object(i.createElement)(ou,{fillProps:{...e,selectedBlocks:n}},t=>{if((null==t?void 0:t.length)>0||a)return Object(i.createElement)(p.MenuGroup,null,t,Object(i.createElement)(tu,Object(l.a)({},o,{onClose:null==e?void 0:e.onClose})))})};var cu=ru;const lu={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function iu({blocks:e,onCopy:t}){const n=Object(d.useCopyToClipboard)(()=>Object(m.serialize)(e),t);return Object(i.createElement)(p.MenuItem,{ref:n},Object(j.__)("Copy"))}var au=function({clientIds:e,__experimentalSelectBlock:t,children:n,...o}){const r=Object(u.castArray)(e),c=r.length,a=r[0],s=Object(f.useSelect)(e=>{const{getShortcutRepresentation:t}=e(js.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}},[]),d=Object(i.useCallback)(t?async e=>{const n=await e;n&&n[0]&&t(n[0])}:u.noop,[t]),b=1===c?Object(j.__)("Remove block"):Object(j.__)("Remove blocks");return Object(i.createElement)(Ys,{clientIds:e,__experimentalUpdateSelection:!t},({canDuplicate:t,canInsertDefaultBlock:r,isLocked:m,onDuplicate:f,onInsertAfter:g,onInsertBefore:h,onRemove:O,onCopy:v,onMoveTo:k,blocks:_})=>Object(i.createElement)(p.DropdownMenu,Object(l.a)({icon:si.a,label:Object(j.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:lu,noIcons:!0},o),({onClose:o})=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(eu.Slot,{fillProps:{onClose:o}}),1===c&&Object(i.createElement)(Qs,{clientId:a}),Object(i.createElement)(iu,{blocks:_,onCopy:v}),t&&Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,f,d),shortcut:s.duplicate},Object(j.__)("Duplicate")),r&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,h),shortcut:s.insertBefore},Object(j.__)("Insert before")),Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,g),shortcut:s.insertAfter},Object(j.__)("Insert after"))),!m&&Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,k)},Object(j.__)("Move to")),1===c&&Object(i.createElement)(Xs,{clientId:a,onToggle:o})),Object(i.createElement)(cu.Slot,{fillProps:{onClose:o},clientIds:e}),"function"==typeof n?n({onClose:o}):i.Children.map(e=>Object(i.cloneElement)(e,{onClose:o})),Object(i.createElement)(p.MenuGroup,null,!m&&Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,O,d),shortcut:s.remove},b)))))},su=function({clientIds:e,...t}){return Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(p.ToolbarItem,null,n=>Object(i.createElement)(au,Object(l.a)({clientIds:e,toggleProps:n},t))))};function uu({hideDragHandle:e}){const{blockClientIds:t,blockClientId:n,blockType:o,hasFixedToolbar:r,hasReducedUI:c,isValid:a,isVisual:u}=Object(f.useSelect)(e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:r,getBlockRootClientId:c,getSettings:l}=e(Mn),i=o(),a=i[0],s=c(a),u=l();return{blockClientIds:i,blockClientId:a,blockType:a&&Object(m.getBlockType)(t(a)),hasFixedToolbar:u.hasFixedToolbar,hasReducedUI:u.hasReducedUI,rootClientId:s,isValid:i.every(e=>r(e)),isVisual:i.every(e=>"visual"===n(e))}},[]),{toggleBlockHighlight:b}=Object(f.useDispatch)(Mn),g=Object(i.useRef)(),{showMovers:h,gestures:O}=Bs({ref:g,onChange(e){e&&c||b(n,e)}}),j=Object(d.useViewportMatch)("medium","<")||r;if(o&&!Object(m.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const v=j||h;if(0===t.length)return null;const k=a&&u,_=t.length>1,y=s()("block-editor-block-toolbar",v&&"is-showing-movers");return Object(i.createElement)("div",{className:y},!_&&!j&&Object(i.createElement)(Is,{clientIds:t}),Object(i.createElement)("div",Object(l.a)({ref:g},O),(k||_)&&Object(i.createElement)(p.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(i.createElement)(Us,{clientIds:t}),Object(i.createElement)(Es,{clientIds:t,hideDragHandle:e||c}))),k&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Un.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),Object(i.createElement)(Un.Slot,{className:"block-editor-block-toolbar__slot"}),Object(i.createElement)(Un.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),Object(i.createElement)(Un.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),Object(i.createElement)(su,{clientIds:t}))}var du=function({focusOnMount:e,isFixed:t,...n}){const{blockType:o,hasParents:r}=Object(f.useSelect)(e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(Mn),{getBlockType:r}=e(m.store),c=o()[0];return{blockType:c&&r(t(c)),hasParents:n(c).length}},[]);if(o&&!Object(m.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const c=s()("block-editor-block-contextual-toolbar",{"has-parent":r,"is-fixed":t});return Object(i.createElement)(ys,Object(l.a)({focusOnMount:e,className:c
|
55 |
+
/* translators: accessibility text for the block toolbar */,"aria-label":Object(j.__)("Block tools")},n),Object(i.createElement)(uu,{hideDragHandle:t}))};function bu(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:c,getSettings:l,getLastMultiSelectedBlockClientId:i}=e(Mn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:c(),hasMultiSelection:o(),hasFixedToolbar:l().hasFixedToolbar,lastClientId:i()}}function mu({clientId:e,rootClientId:t,isValid:n,isEmptyDefaultBlock:o,capturingClientId:r,__unstablePopoverSlot:c,__unstableContentRef:l}){const{isNavigationMode:a,isMultiSelecting:u,isTyping:b,isCaretWithinFormattedText:m,hasMultiSelection:g,hasFixedToolbar:h,lastClientId:O}=Object(f.useSelect)(bu,[]),j=Object(d.useViewportMatch)("medium"),[v,k]=Object(i.useState)(!1),[_,y]=Object(i.useState)(!1),{stopTyping:E}=Object(f.useDispatch)(Mn),C=!b&&!a&&o&&n,S=a,w=!a&&!h&&j&&!C&&!u&&(!b||m),B=!(a||w||h||o);Object(js.useShortcut)("core/block-editor/focus-toolbar",Object(i.useCallback)(()=>{k(!0),E(!0)},[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!B}),Object(i.useEffect)(()=>{w||k(!1)},[w]);const I=Object(i.useRef)(),x=yr(e),T=yr(O),N=yr(r),P=bs(l);if(!(S||w||v||C))return null;let L=x;if(!L)return null;r&&(L=N);let A=L;if(g){if(!T)return null;A={top:L,bottom:T}}const R=C?"top left right":"top right left",{ownerDocument:M}=L,D=C?void 0:M.defaultView.frameElement||Object(di.getScrollContainer)(L)||M.body;return Object(i.createElement)(p.Popover,{ref:P,noArrow:!0,animate:!1,position:R,focusOnMount:!1,anchorRef:A,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:D,__unstableSlotName:c||null,__unstableBoundaryParent:!0,__unstableObserveElement:L,shouldAnchorIncludePadding:!0},(w||v)&&Object(i.createElement)("div",{onFocus:function(){y(!0)},onBlur:function(){y(!1)},tabIndex:-1,className:s()("block-editor-block-list__block-popover-inserter",{"is-visible":_})},Object(i.createElement)(rs,{clientId:e,rootClientId:t,__experimentalIsQuick:!0})),(w||v)&&Object(i.createElement)(du,{focusOnMount:v,__experimentalInitialIndex:I.current,__experimentalOnIndexChange:e=>{I.current=e},key:e}),S&&Object(i.createElement)(ks,{clientId:e,rootClientId:t,blockElement:L}),C&&Object(i.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(i.createElement)(rs,{position:"bottom right",rootClientId:t,clientId:e,__experimentalIsQuick:!0})))}function pu(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,__unstableGetBlockWithoutInnerBlocks:r,getBlockParents:c,__experimentalGetBlockListSettingsForBlocks:l}=e(Mn),i=t()||n();if(!i)return;const{name:a,attributes:s={},isValid:d}=r(i)||{},b=c(i),p=l(b),f=Object(u.find)(b,e=>{var t;return null===(t=p[e])||void 0===t?void 0:t.__experimentalCaptureToolbars});return{clientId:i,rootClientId:o(i),name:a,isValid:d,isEmptyDefaultBlock:a&&Object(m.isUnmodifiedDefaultBlock)({name:a,attributes:s}),capturingClientId:f}}function fu({__unstablePopoverSlot:e,__unstableContentRef:t}){const n=Object(f.useSelect)(pu,[]);if(!n)return null;const{clientId:o,rootClientId:r,name:c,isValid:l,isEmptyDefaultBlock:a,capturingClientId:s}=n;return c?Object(i.createElement)(mu,{clientId:o,rootClientId:r,isValid:l,isEmptyDefaultBlock:a,capturingClientId:s,__unstablePopoverSlot:e,__unstableContentRef:t}):null}function gu({children:e}){const t=Object(i.useContext)(ms),n=Object(i.useContext)(p.Disabled.Context);return t||n?e:(Bt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools"}),Object(i.createElement)(fs,{__unstablePopoverSlot:"block-toolbar"},Object(i.createElement)(fu,{__unstablePopoverSlot:"block-toolbar"}),e))}function hu(){const{hasSelectedBlock:e,hasMultiSelection:t}=Object(f.useSelect)(Mn),{clearSelectedBlock:n}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}},[e,t,n])}function Ou(e){return Object(i.createElement)("div",Object(l.a)({ref:hu()},e))}const ju=Object(i.createContext)();function vu({className:e,children:t}){const n=Object(d.useViewportMatch)("medium"),{isTyping:o,isOutlineMode:r,isFocusMode:c,isNavigationMode:l}=Object(f.useSelect)(e=>{const{isTyping:t,getSettings:n,isNavigationMode:o}=e(Mn),{outlineMode:r,focusMode:c}=n();return{isTyping:t(),isOutlineMode:r,isFocusMode:c,isNavigationMode:o()}},[]);return Object(i.createElement)("div",{ref:Object(d.useMergeRefs)([hu(),ds(),gs()]),className:s()("block-editor-block-list__layout is-root-container",e,{"is-typing":o,"is-outline-mode":r,"is-focus-mode":c&&n,"is-navigate-mode":l})},t)}function ku({className:e,__experimentalLayout:t}){return function(){const e=Object(f.useSelect)(e=>e(Mn).getSettings().__experimentalBlockPatterns,[]);Object(i.useEffect)(()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||(Object(f.select)(Mn).__experimentalGetParsedPattern(e[n].name),t=hs(o))};return t=hs(o),()=>Os(t)},[e])}(),Object(i.createElement)(gu,null,Object(i.createElement)(vu,{className:e},Object(i.createElement)(yu,{__experimentalLayout:t})))}function _u({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,__experimentalLayout:r=Qn}){const[c,l]=Object(i.useState)(new Set),a=Object(i.useMemo)(()=>{const{IntersectionObserver:e}=window;if(e)return new e(e=>{l(t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n})})},[l]),{order:s,selectedBlocks:u}=Object(f.useSelect)(e=>{const{getBlockOrder:n,getSelectedBlockClientIds:o}=e(Mn);return{order:n(t),selectedBlocks:o()}},[t]);return Object(i.createElement)(eo,{value:r},Object(i.createElement)(ju.Provider,{value:a},s.map(e=>Object(i.createElement)(f.AsyncModeProvider,{key:e,value:!c.has(e)&&!u.includes(e)},Object(i.createElement)(xu,{rootClientId:t,clientId:e})))),s.length<1&&e,Object(i.createElement)(as,{tagName:o,rootClientId:t,renderAppender:n}))}function yu(e){return Object(i.createElement)(f.AsyncModeProvider,{value:!1},Object(i.createElement)(_u,e))}function Eu(){const e=Object(i.useContext)(ju);return Object(d.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}function Cu(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:c}=Object(i.useContext)(Su),{index:l,mode:a,name:u,blockTitle:b,isPartOfSelection:p,adjustScrolling:g,enableAnimation:h}=Object(f.useSelect)(e=>{const{getBlockRootClientId:t,getBlockIndex:o,getBlockMode:r,getBlockName:c,isTyping:l,getGlobalBlockCount:i,isBlockSelected:a,isBlockMultiSelected:s,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:d}=e(Mn),b=a(n),p=s(n)||u(n),f=c(n),g=t(n);return{index:o(n,g),mode:r(n),name:f,blockTitle:Object(m.getBlockType)(f).title,isPartOfSelection:b||p,adjustScrolling:b||d(n),enableAnimation:!l()&&i()<=200}},[n]),O=Object(j.sprintf)(Object(j.__)("Block: %s"),b),v="html"!==a||t?"":"-visual",k=Object(d.useMergeRefs)([e.ref,Ui(n),na(n),kr(n),Qi(n),ra(n),Zi(n),Ji(n),Ki(),Eu(),pi({isSelected:p,adjustScrolling:g,enableAnimation:h,triggerAnimationOnChange:l})]);return{...r,...e,ref:k,id:`block-${n}${v}`,tabIndex:0,role:"group","aria-label":O,"data-block":n,"data-type":u,"data-title":b,className:s()(s()("block-editor-block-list__block",{"wp-block":!c}),o,e.className,r.className,$i(n),qi(n),Yi(n),Xi(n)),style:{...r.style,...e.style}}}Cu.save=m.__unstableGetBlockProps;const Su=Object(i.createContext)();function wu({children:e,isHtml:t,...n}){return Object(i.createElement)("div",Cu(n,{__unstableIsHtml:t}),e)}const Bu=Object(f.withSelect)((e,{clientId:t,rootClientId:n})=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:c,getTemplateLock:l,__unstableGetBlockWithoutInnerBlocks:i}=e(Mn),a=i(t),s=o(t),u=l(n),{name:d,attributes:b,isValid:m}=a||{};return{mode:r(t),isSelectionEnabled:c(),isLocked:!!u,block:a,name:d,attributes:b,isValid:m,isSelected:s}}),Iu=Object(f.withDispatch)((e,t,{select:n})=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:c,replaceBlocks:l,toggleSelection:i,__unstableMarkLastChangeAsPersistent:a}=e(Mn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n(Mn),c=r(),{clientId:l}=t,i=c.length?c:[l];o(i,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:c}=t,{getBlockIndex:l}=n(Mn),i=l(o,c);r(e,i+1,c)},onMerge(e){const{clientId:o}=t,{getPreviousBlockClientId:r,getNextBlockClientId:l}=n(Mn);if(e){const e=l(o);e&&c(o,e)}else{const e=r(o);e&&c(e,o)}},onReplace(e,n,o){e.length&&!Object(m.isUnmodifiedDefaultBlock)(e[e.length-1])&&a(),l([t.clientId],e,n,o)},toggleSelection(e){i(e)}}});var xu=Object(d.compose)(d.pure,Bu,Iu,Object(d.ifCondition)(({block:e})=>!!e),Object(p.withFilters)("editor.BlockListBlock"))((function({mode:e,isLocked:t,clientId:n,isSelected:o,isSelectionEnabled:r,className:c,name:l,isValid:a,attributes:d,wrapperProps:b,setAttributes:p,onReplace:g,onInsertBlocksAfter:h,onMerge:O,toggleSelection:j}){const{removeBlock:v}=Object(f.useDispatch)(Mn),k=Object(i.useCallback)(()=>v(n),[n]);let _=Object(i.createElement)(ii,{name:l,isSelected:o,attributes:d,setAttributes:p,insertBlocksAfter:t?void 0:h,onReplace:t?void 0:g,onRemove:t?void 0:k,mergeBlocks:t?void 0:O,clientId:n,isSelectionEnabled:r,toggleSelection:j});const y=Object(m.getBlockType)(l),E=y.apiVersion>1||Object(m.hasBlockSupport)(y,"lightBlockWrapper",!1);y.getEditWrapperProps&&(b=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=s()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(b,y.getEditWrapperProps(d)));const C=b&&!!b["data-align"];let S;C&&(_=Object(i.createElement)("div",{className:"wp-block","data-align":b["data-align"]},_)),S=a?"html"===e?Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{style:{display:"none"}},_),Object(i.createElement)(wu,{isHtml:!0},Object(i.createElement)(Hi,{clientId:n}))):E?_:Object(i.createElement)(wu,b,_):Object(i.createElement)(wu,{className:"has-warning"},Object(i.createElement)(Li,{clientId:n}),Object(i.createElement)("div",null,Object(m.getSaveElement)(y,d)));const w={clientId:n,className:c,wrapperProps:Object(u.omit)(b,["data-align"]),isAligned:C},B=Object(i.useMemo)(()=>w,Object.values(w));return Object(i.createElement)(Su.Provider,{value:B},Object(i.createElement)(Di,{fallback:Object(i.createElement)(wu,{className:"has-warning"},Object(i.createElement)(Ri,null))},S))}));function Tu({level:e}){return Object(u.times)(e-1,t=>{const n=t+2===e;return Object(i.createElement)("div",{key:t,"aria-hidden":"true",className:s()("block-editor-block-navigator-indentation",{"has-item":n})})})}const Nu=(e,t,n)=>Object(j.sprintf)(
|
56 |
/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
|
57 |
+
Object(j.__)("Block %1$d of %2$d, Level %3$d"),e,t,n),Pu=(e,t)=>Object(u.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e;var Lu=Object(i.forwardRef)((function e({className:t,block:{clientId:n},isSelected:o,onClick:r,position:c,siblingBlockCount:l,level:a,tabIndex:u,onFocus:b,onDragStart:m,onDragEnd:f,draggable:g},h){const O=Yl(n),v="block-navigation-block-select-button__"+Object(d.useInstanceId)(e),k=Nu(c,l,a);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.Button,{className:s()("block-editor-block-navigation-block-select-button",t),onClick:r,"aria-describedby":v,ref:h,tabIndex:u,onFocus:b,onDragStart:m,onDragEnd:f,draggable:g},Object(i.createElement)(Tu,{level:a}),Object(i.createElement)(Hl,{icon:null==O?void 0:O.icon,showColors:!0}),Object(i.createElement)(Xl,{clientId:n}),(null==O?void 0:O.anchor)&&Object(i.createElement)("span",{className:"block-editor-block-navigation-block-select-button__anchor"},O.anchor),o&&Object(i.createElement)(p.VisuallyHidden,null,Object(j.__)("(selected block)"))),Object(i.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:v},k))}));const Au=e=>"BlockNavigationBlock-"+e;var Ru=Object(i.forwardRef)((function e(t,n){const{clientId:o}=t.block,{name:r}=Object(f.useSelect)(e=>e(Mn).getBlockName(o),[o]),c=Object(d.useInstanceId)(e);return Object(i.createElement)(p.Slot,{name:Au(o)},e=>{if(!e.length)return Object(i.createElement)(Lu,Object(l.a)({ref:n},t));const{className:o,isSelected:a,position:u,siblingBlockCount:d,level:b,tabIndex:f,onFocus:g}=t,h=Object(m.getBlockType)(r),O="block-navigation-block-slot__"+c,v=Nu(u,d,b),k={tabIndex:f,onFocus:g,ref:n,"aria-describedby":O};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:s()("block-editor-block-navigation-block-slot",o)},Object(i.createElement)(Hl,{icon:h.icon,showColors:!0}),i.Children.map(e,e=>Object(i.cloneElement)(e,{...e.props,...k})),a&&Object(i.createElement)(p.VisuallyHidden,null,Object(j.__)("(selected block)")),Object(i.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:O},v)))})}));const Mu=e=>{const{clientId:t}=Object(i.useContext)(Su);return Object(i.createElement)(p.Fill,Object(l.a)({},e,{name:Au(t)}))};var Du=Object(i.forwardRef)(({onClick:e,block:t,isSelected:n,position:o,siblingBlockCount:r,level:c,...a},u)=>{const{__experimentalFeatures:d,blockDropTarget:b={}}=wi(),{clientId:m}=t,{rootClientId:p,blockMovingClientId:g,selectedBlockInBlockEditor:h}=Object(f.useSelect)(e=>{const{getBlockRootClientId:t,hasBlockMovingClientId:n,getSelectedBlockClientId:o}=e(Mn);return{rootClientId:t(m)||"",blockMovingClientId:n(),selectedBlockInBlockEditor:o()}},[m]),O=g&&h===m,{rootClientId:j,clientId:v,dropPosition:k}=b,_=j===p&&v===m&&"top"===k,y=j===p&&v===m&&"bottom"===k,E=j===m&&"inside"===k,C=s()("block-editor-block-navigation-block-contents",{"is-dropping-before":_||O,"is-dropping-after":y,"is-dropping-to-inner-blocks":E});return Object(i.createElement)(vs,{clientIds:[t.clientId],elementId:"block-navigation-block-"+t.clientId},({draggable:s,onDragStart:b,onDragEnd:m})=>d?Object(i.createElement)(Ru,Object(l.a)({ref:u,className:C,block:t,onClick:e,isSelected:n,position:o,siblingBlockCount:r,level:c,draggable:s&&d,onDragStart:b,onDragEnd:m},a)):Object(i.createElement)(Lu,Object(l.a)({ref:u,className:C,block:t,onClick:e,isSelected:n,position:o,siblingBlockCount:r,level:c,draggable:s&&d,onDragStart:b,onDragEnd:m},a)))});function Fu({block:e,isSelected:t,isBranchSelected:n,isLastOfSelectedBranch:o,onClick:r,position:c,level:l,rowCount:a,siblingBlockCount:u,showBlockMovers:d,path:b}){const m=Object(i.useRef)(null),[g,h]=Object(i.useState)(!1),{clientId:O}=e,{isDragging:v,blockParents:k}=Object(f.useSelect)(e=>{const{isBlockBeingDragged:t,isAncestorBeingDragged:n,getBlockParents:o}=e(Mn);return{isDragging:t(O)||n(O),blockParents:o(O)}},[O]),{selectBlock:_,toggleBlockHighlight:y}=Object(f.useDispatch)(Mn),E=d&&u>0,C=s()("block-editor-block-navigation-block__mover-cell",{"is-visible":g}),{__experimentalFeatures:S,__experimentalPersistentListViewFeatures:w,isTreeGridMounted:B}=wi(),I=s()("block-editor-block-navigation-block__menu-cell",{"is-visible":g});Object(i.useEffect)(()=>{w&&!B&&t&&m.current.focus()},[]),Object(i.useEffect)(()=>{S&&t&&m.current.focus()},[S,t]);const x=w?y:()=>{},T=()=>{h(!0),x(O,!0)},N=()=>{h(!1),x(O,!1)},P=s()({"is-selected":t,"is-branch-selected":w&&n,"is-last-of-selected-branch":w&&o,"is-dragging":v});return Object(i.createElement)(gi,{className:P,onMouseEnter:T,onMouseLeave:N,onFocus:T,onBlur:N,level:l,position:c,rowCount:a,path:b,id:"block-navigation-block-"+O,"data-block":O},Object(i.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:E?void 0:2,ref:m},({ref:n,tabIndex:o,onFocus:a})=>Object(i.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(i.createElement)(Du,{block:e,onClick:()=>r(e.clientId),isSelected:t,position:c,siblingBlockCount:u,level:l,ref:n,tabIndex:o,onFocus:a}))),E&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.__experimentalTreeGridCell,{className:C,withoutGridItem:!0},Object(i.createElement)(p.__experimentalTreeGridItem,null,({ref:e,tabIndex:t,onFocus:n})=>Object(i.createElement)(Ei,{orientation:"vertical",clientIds:[O],ref:e,tabIndex:t,onFocus:n})),Object(i.createElement)(p.__experimentalTreeGridItem,null,({ref:e,tabIndex:t,onFocus:n})=>Object(i.createElement)(Ci,{orientation:"vertical",clientIds:[O],ref:e,tabIndex:t,onFocus:n})))),S&&Object(i.createElement)(p.__experimentalTreeGridCell,{className:I},({ref:e,tabIndex:t,onFocus:n})=>Object(i.createElement)(au,{clientIds:[O],icon:si.a,toggleProps:{ref:e,tabIndex:t,onFocus:n},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},({onClose:e})=>Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(p.MenuItem,{onClick:async()=>{if(k.length)for(const e of k)await _(e);else await _(null);await _(O),e()}},Object(j.__)("Go to block"))))))}function Vu({parentBlockClientId:e,position:t,level:n,rowCount:o,path:r}){const c=Object(f.useSelect)(t=>{const{isBlockBeingDragged:n,isAncestorBeingDragged:o}=t(Mn);return n(e)||o(e)},[e]),l="block-navigation-appender-row__description_"+Object(d.useInstanceId)(Vu),a=Object(j.sprintf)(
|
58 |
/* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
|
59 |
+
Object(j.__)("Add block at position %1$d, Level %2$d"),t,n);return Object(i.createElement)(gi,{className:s()({"is-dragging":c}),level:n,position:t,rowCount:o,path:r},Object(i.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},({ref:t,tabIndex:o,onFocus:r})=>Object(i.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(i.createElement)(Tu,{level:n}),Object(i.createElement)(rs,{rootClientId:e,__experimentalIsQuick:!0,"aria-describedby":l,toggleProps:{ref:t,tabIndex:o,onFocus:r}}),Object(i.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:l},a))))}function Hu(e){const{blocks:t,selectBlock:n,selectedBlockClientIds:o,showAppender:r,showBlockMovers:c,showNestedBlocks:l,parentBlockClientId:a,level:s=1,terminatedLevels:d=[],path:b=[],isBranchSelected:m=!1,isLastOfBranch:p=!1}=e,f=!a,g=Object(u.compact)(t),h=e=>r&&!f&&Pu(e,o),O=h(a),j=g.length,v=O?j+1:j,k=v;return Object(i.createElement)(i.Fragment,null,Object(u.map)(g,(e,t)=>{const{clientId:a,innerBlocks:u}=e,f=t+1,g=v===f?[...d,s]:d,O=[...b,f],k=l&&!!u&&!!u.length,_=h(a),y=k||_,E=Pu(a,o),C=m||E&&y,S=t===j-1,w=E||p&&S,B=p&&!y&&S;return Object(i.createElement)(i.Fragment,{key:a},Object(i.createElement)(Fu,{block:e,onClick:n,isSelected:E,isBranchSelected:C,isLastOfSelectedBranch:B,level:s,position:f,rowCount:v,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:d,path:O}),y&&Object(i.createElement)(Hu,{blocks:u,selectedBlockClientIds:o,selectBlock:n,isBranchSelected:C,isLastOfBranch:w,showAppender:r,showBlockMovers:c,showNestedBlocks:l,parentBlockClientId:a,level:s+1,terminatedLevels:g,path:O}))}),O&&Object(i.createElement)(Vu,{parentBlockClientId:a,position:v,rowCount:k,level:s,terminatedLevels:d,path:[...b,k]}))}function zu(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}Hu.defaultProps={selectBlock:()=>{}};const Gu=["top","bottom"];function Uu({__experimentalFeatures:e,__experimentalPersistentListViewFeatures:t,...n}){let{ref:o,target:r}=function(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=Object(f.useSelect)(Mn),[c,l]=Object(i.useState)(),{rootClientId:a,blockIndex:s}=c||{},u=ss(a,s),b=Object(d.useThrottle)(Object(i.useCallback)((c,i)=>{const a={x:c.clientX,y:c.clientY},s=!!c.dataTransfer.getData("wp-blocks"),u=s?o():void 0,d=function(e,t){let n,o,r,c;for(const l of e){if(l.isDraggedBlock)continue;const i=l.element.getBoundingClientRect(),[a,s]=us(t,i,Gu),u=zu(t,i);if(void 0===r||a<r||u){r=a;const t=e.indexOf(l),d=e[t-1];if("top"===s&&d&&d.rootClientId===l.rootClientId&&!d.isDraggedBlock?(o=d,n="bottom",c=d.element.getBoundingClientRect()):(o=l,n=s,c=i),u)break}}if(!o)return;const l="bottom"===n;if(l&&o.canInsertDraggedBlocksAsChild&&(o.innerBlockCount>0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const i=l?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+i,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map(o=>{const c=o.dataset.block,l=e(c);return{clientId:c,rootClientId:l,blockIndex:t(c,l),element:o,isDraggedBlock:!!s&&u.includes(c),innerBlockCount:n(c),canInsertDraggedBlocksAsSibling:!s||r(u,l),canInsertDraggedBlocksAsChild:!s||r(u,c)}}),a);d&&l(d)},[]),200);return{ref:Object(d.__experimentalUseDropZone)({onDrop:u,onDragOver(e){b(e,e.currentTarget)},onDragEnd(){b.cancel(),l(null)}}),target:c}}();const c=Object(i.useRef)(!1);Object(i.useEffect)(()=>{c.current=!0},[]),e||(r=void 0);const l=Object(i.useMemo)(()=>({__experimentalFeatures:e,__experimentalPersistentListViewFeatures:t,blockDropTarget:r,isTreeGridMounted:c.current}),[e,t,r,c.current]);return Object(i.createElement)(p.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(j.__)("Block navigation structure"),ref:o},Object(i.createElement)(Si.Provider,{value:l},Object(i.createElement)(Hu,n)))}function Wu({onSelect:e=u.noop,__experimentalFeatures:t}){const{rootBlock:n,rootBlocks:o,selectedBlockClientId:r}=Object(f.useSelect)(e=>{const{getBlockHierarchyRootClientId:t,getSelectedBlockClientId:n,__unstableGetClientIdsTree:o,__unstableGetClientIdWithClientIdsTree:r}=e(Mn),c=n(),l=o();return{rootBlock:c&&!Object(u.isArray)(c)?r(t(c)):null,rootBlocks:l,selectedBlockClientId:c}}),{selectBlock:c}=Object(f.useDispatch)(Mn);if(!o||0===o.length)return null;const l=n&&(!Pu(n.clientId,r)||n.innerBlocks&&0!==n.innerBlocks.length);return Object(i.createElement)("div",{className:"block-editor-block-navigation__container"},Object(i.createElement)("p",{className:"block-editor-block-navigation__label"},Object(j.__)("List view")),Object(i.createElement)(Uu,{blocks:l?[n]:o,selectedBlockClientIds:[r],selectBlock:function(t){c(t),e(t)},__experimentalFeatures:t,showNestedBlocks:!0}))}function Ku({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...r}){return Object(i.createElement)(p.Button,Object(l.a)({},r,{ref:o,icon:ai.a,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0
|
60 |
+
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(j.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e}))}var $u=Object(i.forwardRef)((function({isDisabled:e,__experimentalFeatures:t,...n},o){const r=Object(f.useSelect)(e=>!!e(Mn).getBlockCount(),[])&&!e;return Object(i.createElement)(p.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:({isOpen:e,onToggle:t})=>Object(i.createElement)(Ku,Object(l.a)({},n,{innerRef:o,isOpen:e,onToggle:t,isEnabled:r})),renderContent:()=>Object(i.createElement)(Wu,{__experimentalFeatures:t})})}));const qu=[lc.rawShortcut.primary("z"),lc.rawShortcut.primaryShift("z"),lc.rawShortcut.primary("y")],Yu=Object(i.createElement)(p.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(u.fromPairs)(qu.map(e=>[e,e=>e.preventDefault()]))}),Xu=()=>Yu,Qu={position:"bottom right",isAlternate:!0};var Zu=()=>Object(i.createElement)(i.Fragment,null,["bold","italic","link","text-color"].map(e=>Object(i.createElement)(p.Slot,{name:"RichText.ToolbarControls."+e,key:e})),Object(i.createElement)(p.Slot,{name:"RichText.ToolbarControls"},e=>0!==e.length&&Object(i.createElement)(p.ToolbarItem,null,t=>Object(i.createElement)(p.DropdownMenu,{icon:vi.a
|
61 |
+
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(j.__)("More"),toggleProps:t,controls:Object(u.orderBy)(e.map(([{props:e}])=>e),"title"),popoverProps:Qu})))),Ju=({inline:e,anchorRef:t})=>e?Object(i.createElement)(p.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(i.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(Zu,null)))):Object(i.createElement)(Un,{group:"inline"},Object(i.createElement)(Zu,null));function ed(){const{didAutomaticChange:e,getSettings:t}=Object(f.useSelect)(Mn);return Object(d.useRefEffect)(n=>{function o(n){const{keyCode:o}=n;o!==lc.DELETE&&o!==lc.BACKSPACE&&o!==lc.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}},[])}function td(e){return e.filter(({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e)).map(e=>`<img src="${Object(Ws.createBlobURL)(e)}">`).join("")}var nd=n(125);function od(e,t){if(t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function rd(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function cd({allowedFormats:e,formattingControls:t,disableFormats:n}){return n?cd.EMPTY_ARRAY:e||t?e||(Bt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),t.map(e=>"core/"+e)):void 0}function ld({value:e,pastedBlocks:t=[],onReplace:n,onSplit:o,onSplitMiddle:r,multilineTag:l}){if(!n||!o)return;const i=[],[a,s]=Object(c.split)(e),u=t.length>0;let d=-1;const b=Object(c.isEmpty)(a)&&!Object(c.isEmpty)(s);u&&Object(c.isEmpty)(a)||(i.push(o(Object(c.toHTMLString)({value:a,multilineTag:l}),!b)),d+=1),u?(i.push(...t),d+=t.length):r&&i.push(r()),(u||r)&&Object(c.isEmpty)(s)||i.push(o(Object(c.toHTMLString)({value:s,multilineTag:l}),b)),n(i,u?d:1,u?-1:0)}function id(e){const t=Object(i.useRef)(e);return t.current=e,Object(d.useRefEffect)(e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:a,onReplace:s,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:b,multilineTag:p,preserveWhiteSpace:f,pastePlainText:g}=t.current;if(!n)return void e.preventDefault();const{clipboardData:h}=e;let O="",j="";try{O=h.getData("text/plain"),j=h.getData("text/html")}catch(e){try{j=h.getData("Text")}catch(e){return}}if(e.preventDefault(),window.console.log("Received HTML:\n\n",j),window.console.log("Received plain text:\n\n",O),o)return void r(Object(c.insert)(l,O));const v=i.reduce((e,{__unstablePasteRule:t})=>(t&&e===l&&(e=t(l,{html:j,plainText:O})),e),l);if(v!==l)return void r(v);const k=[...Object(di.getFilesFromDataTransfer)(h)];if("true"===h.getData("rich-text")){const e=Object(c.create)({html:j,multilineTag:p,multilineWrapperTags:"li"===p?["ul","ol"]:void 0,preserveWhiteSpace:f});return od(e,l.activeFormats),void r(Object(c.insert)(l,e))}if(g)return void r(Object(c.insert)(l,Object(c.create)({text:O})));if(k&&k.length&&!j){const e=Object(m.pasteHandler)({HTML:td(k),mode:"BLOCKS",tagName:a,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",k),void(s&&Object(c.isEmpty)(l)?s(e):ld({value:l,pastedBlocks:e,onReplace:s,onSplit:u,onSplitMiddle:d,multilineTag:p}))}let _=s&&u?"AUTO":"INLINE";var y;"AUTO"===_&&Object(c.isEmpty)(l)&&(y=O,Object(nd.regexp)(".*").test(y))&&(_="BLOCKS"),b&&Object(c.isEmpty)(l)&&Object(Ha.isURL)(O.trim())&&(_="BLOCKS");const E=Object(m.pasteHandler)({HTML:j,plainText:O,mode:_,tagName:a,preserveWhiteSpace:f});if("string"==typeof E){let e=Object(c.create)({html:E});od(e,l.activeFormats),p&&(e=Object(c.replace)(e,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),r(Object(c.insert)(l,e))}else E.length>0&&(s&&Object(c.isEmpty)(l)?s(E,E.length-1,-1):ld({value:l,pastedBlocks:E,onReplace:s,onSplit:u,onSplitMiddle:d,multilineTag:p}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}},[])}function ad(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=Object(f.useDispatch)(Mn),o=Object(i.useRef)(e);return o.current=e,Object(d.useRefEffect)(e=>{function r(){const{value:e,onReplace:t}=o.current;if(!t)return;const{start:r,text:l}=e;if(" "!==l.slice(r-1,r))return;const i=l.slice(0,r).trim(),a=Object(m.getBlockTransforms)("from").filter(({type:e})=>"prefix"===e),s=Object(m.findTransform)(a,({prefix:e})=>i===e);if(!s)return;const u=Object(c.toHTMLString)({value:Object(c.slice)(e,r,l.length)});t([s.transform(u)]),n()}function l(e){const{inputType:c}=e,{value:l,onChange:i,__unstableAllowPrefixTransformations:a,formatTypes:s}=o.current;if("insertText"!==c)return;a&&r&&r();const u=s.reduce((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e),l);u!==l&&(t(),i({...u,activeFormats:l.activeFormats}),n())}return e.addEventListener("input",l),()=>{e.removeEventListener("input",l)}},[])}function sd(e){const{__unstableMarkAutomaticChange:t}=Object(f.useDispatch)(Mn),n=Object(i.useRef)(e);return n.current=e,Object(d.useRefEffect)(e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:r,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:s,onChange:u,disableLineBreaks:d,onSplitAtEnd:b}=n.current;if(e.keyCode!==lc.ENTER)return;e.preventDefault();const p={...r};p.formats=o(r);const f=l&&i;if(l){const e=Object(m.getBlockTransforms)("from").filter(({type:e})=>"enter"===e),n=Object(m.findTransform)(e,e=>e.regExp.test(p.text));n&&(l([n.transform({content:p.text})]),t())}if(s)e.shiftKey?d||u(Object(c.insert)(p,"\n")):f&&Object(c.__unstableIsEmptyLine)(p)?ld({value:p,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:s}):u(Object(c.__unstableInsertLineSeparator)(p));else{const{text:t,start:n,end:o}=p,r=b&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u(Object(c.insert)(p,"\n")):!f&&r?b():f&&ld({value:p,onReplace:l,onSplit:i,onSplitMiddle:a,multilineTag:s})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}},[])}function ud(e){return e(c.store).getFormatTypes()}cd.EMPTY_ARRAY=[];const dd=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function bd({formatTypes:e,onChange:t,onFocus:n,value:o,forwardedRef:r}){return e.map(e=>{const{name:l,edit:a}=e;if(!a)return null;const s=Object(c.getActiveFormat)(o,l),u=void 0!==s,d=Object(c.getActiveObject)(o),b=void 0!==d&&d.type===l;return Object(i.createElement)(a,{key:l,isActive:u,activeAttributes:u&&s.attributes||{},isObjectActive:b,activeObjectAttributes:b&&d.attributes||{},value:o,onChange:t,onFocus:n,contentRef:r})})}const md=Object(i.forwardRef)((function e({children:t,tagName:n="div",value:o="",onChange:r,isSelected:a,multiline:b,inlineToolbar:g,wrapperClassName:h,autocompleters:j,onReplace:v,placeholder:k,allowedFormats:_,formattingControls:y,withoutInteractiveFormatting:E,onRemove:C,onMerge:S,onSplit:w,__unstableOnSplitAtEnd:B,__unstableOnSplitMiddle:I,identifier:x,preserveWhiteSpace:T,__unstablePastePlainText:N,__unstableEmbedURLOnPaste:P,__unstableDisableFormats:L,disableLineBreaks:A,unstableOnFocus:R,__unstableAllowPrefixTransformations:M,...D},F){const V=Object(d.useInstanceId)(e);x=x||V,D=function(e){return Object(u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(D);const H=Object(i.useRef)(),{clientId:z}=O(),{selectionStart:G,selectionEnd:U,isSelected:W,disabled:K}=Object(f.useSelect)(e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:o,hasMultiSelection:r}=e(Mn),c=t(),l=n();let i;return void 0===a?i=c.clientId===z&&c.attributeKey===x:a&&(i=c.clientId===z),{selectionStart:i?c.offset:void 0,selectionEnd:i?l.offset:void 0,isSelected:i,disabled:o()||r()}}),{selectionChange:$}=Object(f.useDispatch)(Mn),q=rd(b),Y=cd({allowedFormats:_,formattingControls:y,disableFormats:L}),X=!Y||Y.length>0;let Q=o,Z=r;Array.isArray(o)&&(Q=m.children.toHTML(o),Z=e=>r(m.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes)));const J=Object(i.useCallback)((e,t)=>{$(z,x,e,t)},[z,x]),{formatTypes:ee,prepareHandlers:te,valueHandlers:ne,changeHandlers:oe,dependencies:re}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=Object(f.useSelect)(ud,[]),c=Object(i.useMemo)(()=>r.filter(({name:e,tagName:t})=>!(o&&!o.includes(e)||n&&dd.has(t))),[r,o,dd]),l=Object(f.useSelect)(n=>c.reduce((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e})),o),{}),[c,e,t]),a=Object(f.useDispatch)(),s=[],u=[],d=[],b=[];return c.forEach(n=>{if(n.__experimentalCreatePrepareEditableTree){const o=l[n.name],r=n.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?u.push(r):s.push(r);for(const e in o)b.push(o[e])}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:t,blockClientId:e})),d.push(n.__experimentalCreateOnChangeEditableValue({...l[n.name]||{},...o},{richTextIdentifier:t,blockClientId:e}))}}),{formatTypes:c,prepareHandlers:s,valueHandlers:u,changeHandlers:d,dependencies:b}}({clientId:z,identifier:x,withoutInteractiveFormatting:E,allowedFormats:Y});function ce(e){return ee.forEach(t=>{t.__experimentalCreatePrepareEditableTree&&(e=Object(c.removeFormat)(e,t.name,0,e.text.length))}),e.formats}const{value:le,onChange:ie,onFocus:ae,ref:se}=Object(c.__unstableUseRichText)({value:Q,onChange(e,{__unstableFormats:t,__unstableText:n}){Z(e),Object.values(oe).forEach(e=>{e(t,n)})},selectionStart:G,selectionEnd:U,onSelectionChange:J,placeholder:k,__unstableIsSelected:W,__unstableMultilineTag:q,__unstableDisableFormats:L,preserveWhiteSpace:T,__unstableDependencies:re,__unstableAfterParse:function(e){return ne.reduce((t,n)=>n(t,e.text),e.formats)},__unstableBeforeSerialize:ce,__unstableAddInvisibleFormats:function(e){return te.reduce((t,n)=>n(t,e.text),e.formats)}}),ue=function(e){return Object(p.__unstableUseAutocompleteProps)({...e,completers:Ul(e)})}({onReplace:v,completers:j,record:le,onChange:ie});!function({value:e}){const t=e.activeFormats&&!!e.activeFormats.length,{isCaretWithinFormattedText:n}=Object(f.useSelect)(Mn),{enterFormattedText:o,exitFormattedText:r}=Object(f.useDispatch)(Mn);Object(i.useEffect)(()=>{t?n()||o():n()&&r()},[t])}({value:le}),function({html:e,value:t}){const n=Object(i.useRef)(),o=t.activeFormats&&!!t.activeFormats.length,{__unstableMarkLastChangeAsPersistent:r}=Object(f.useDispatch)(Mn);Object(i.useLayoutEffect)(()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout(()=>{r()},1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text},[e,o])}({html:Q,value:le});const de=n,be=Object(i.createElement)(i.Fragment,null,W&&t&&t({value:le,onChange:ie,onFocus:ae}),W&&Object(i.createElement)(Xu,null),W&&ue.children,W&&Object(i.createElement)(bd,{value:le,onChange:ie,onFocus:ae,formatTypes:ee,forwardedRef:H}),W&&X&&Object(i.createElement)(Ju,{inline:g,anchorRef:H.current}),Object(i.createElement)(de,Object(l.a)({role:"textbox","aria-multiline":!0,"aria-label":k},D,ue,{ref:Object(d.useMergeRefs)([ue.ref,D.ref,se,ad({value:le,onChange:ie,__unstableAllowPrefixTransformations:M,formatTypes:ee,onReplace:v}),ed(),id({isSelected:W,disableFormats:L,onChange:ie,value:le,formatTypes:ee,tagName:n,onReplace:v,onSplit:w,onSplitMiddle:I,__unstableEmbedURLOnPaste:P,multilineTag:q,preserveWhiteSpace:T,pastePlainText:N}),sd({removeEditorOnlyFormats:ce,value:le,onReplace:v,onSplit:w,onSplitMiddle:I,multilineTag:q,onChange:ie,disableLineBreaks:A,onSplitAtEnd:B}),H,F]),contentEditable:!K||void 0,suppressContentEditableWarning:!K,className:s()("block-editor-rich-text__editable",D.className,"rich-text"),onFocus:R,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===lc.DELETE||t===lc.BACKSPACE)){const{start:n,end:o,text:r}=le,l=t===lc.BACKSPACE,i=le.activeFormats&&!!le.activeFormats.length;if(!Object(c.isCollapsed)(le)||i||l&&0!==n||!l&&o!==r.length)return;S&&S(!l),C&&Object(c.isEmpty)(le)&&l&&C(!l),e.preventDefault()}}})));if(!h)return be;Bt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const me=s()("block-editor-rich-text",h);return Object(i.createElement)("div",{className:me},be)}));md.Content=({value:e,tagName:t,multiline:n,...o})=>{Array.isArray(e)&&(e=m.children.toHTML(e));const r=rd(n);!e&&r&&(e=`<${r}></${r}>`);const c=Object(i.createElement)(i.RawHTML,null,e);return t?Object(i.createElement)(t,Object(u.omit)(o,["format"]),c):c},md.isEmpty=e=>!e||0===e.length;var pd=md;function fd({value:e,onChange:t}){return Object(i.createElement)(Mu,null,Object(i.createElement)(pd,{value:e,onChange:t,placeholder:Object(j.__)("Navigation item"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var gd=n(194),hd=function({icon:e=gd.a,label:t=Object(j.__)("Choose variation"),instructions:n=Object(j.__)("Select a variation to start with."),variations:o,onSelect:r,allowSkip:c}){const l=s()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return Object(i.createElement)(p.Placeholder,{icon:e,label:t,instructions:n,className:l},Object(i.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(j.__)("Block variations")},o.map(e=>Object(i.createElement)("li",{key:e.name},Object(i.createElement)(p.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(i.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title)))),c&&Object(i.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(i.createElement)(p.Button,{isLink:!0,onClick:()=>r()},Object(j.__)("Skip"))))},Od=n(301);const jd=({onStartBlank:e,onBlockPatternSelect:t})=>Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},Object(i.createElement)(p.Button,{onClick:e},Object(j.__)("Start blank")),Object(i.createElement)(p.Button,{isPrimary:!0,onClick:t},Object(j.__)("Choose"))),vd=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},Object(i.createElement)(p.Button,{icon:Oi.a,label:Object(j.__)("Previous pattern"),onClick:e,disabled:0===n}),Object(i.createElement)(p.Button,{icon:hi.a,label:Object(j.__)("Next pattern"),onClick:t,disabled:n===o-1}));var kd=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:c,onBlockPatternSelect:l,onStartBlank:a})=>{const s="carousel"===e,u=Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},Object(i.createElement)(p.Button,{icon:Xn,label:Object(j.__)("Carousel view"),onClick:()=>t("carousel"),isPressed:s}),Object(i.createElement)(p.Button,{icon:Od.a,label:Object(j.__)("Grid view"),onClick:()=>t("grid"),isPressed:"grid"===e}));return Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},s&&Object(i.createElement)(vd,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:c}),u,s&&Object(i.createElement)(jd,{onBlockPatternSelect:l,onStartBlank:a}))};const _d=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o})=>{const r=Object(p.__unstableUseCompositeState)(),c="block-editor-block-pattern-setup__container";if("carousel"===e){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return Object(i.createElement)("div",{className:c},Object(i.createElement)("ul",{className:"carousel-container"},n.map((t,n)=>Object(i.createElement)(Ed,{className:e.get(n)||"",key:t.name,pattern:t}))))}return Object(i.createElement)(p.__unstableComposite,Object(l.a)({},r,{role:"listbox",className:c,"aria-label":Object(j.__)("Patterns list")}),n.map(e=>Object(i.createElement)(yd,{key:e.name,pattern:e,onSelect:o,composite:r})))};function yd({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,title:c,description:a,viewportWidth:s=700}=e,u=Object(d.useInstanceId)(yd,o+"__item-description");return Object(i.createElement)("div",{className:o+"__list-item","aria-label":e.title,"aria-describedby":e.description?u:void 0},Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({role:"option",as:"div"},n,{className:o+"__item",onClick:()=>t(r)}),Object(i.createElement)(Oa,{blocks:r,viewportWidth:s}),Object(i.createElement)("div",{className:o+"__item-title"},c)),!!a&&Object(i.createElement)(p.VisuallyHidden,{id:u},a))}function Ed({className:e,pattern:t}){const{blocks:n,title:o,description:r}=t,c=Object(d.useInstanceId)(Ed,"block-editor-block-pattern-setup-list__item-description");return Object(i.createElement)("li",{className:"pattern-slide "+e,"aria-label":o,"aria-describedby":r?c:void 0},Object(i.createElement)(Oa,{blocks:n,__experimentalLive:!0}),!!r&&Object(i.createElement)(p.VisuallyHidden,{id:c},r))}var Cd=({clientId:e,blockName:t,filterPatternsFn:n,startBlankComponent:o,onBlockPatternSelect:r})=>{const[c,l]=Object(i.useState)("carousel"),[a,s]=Object(i.useState)(0),[u,d]=Object(i.useState)(!1),{replaceBlock:b}=Object(f.useDispatch)(Mn),p=function(e,t,n){return Object(f.useSelect)(o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:c,__experimentalGetParsedPattern:l,__experimentalGetAllowedPatterns:i}=o(Mn),a=r(e);let s=[];return s=n?i(a).filter(n):c(t,a),s.map(({name:e})=>l(e))},[e,t,n])}(e,t,n);if(null==p||!p.length||u)return o;const g=r||(t=>{const n=t.map(e=>Object(m.cloneBlock)(e));b(e,n)});return Object(i.createElement)("div",{className:"block-editor-block-pattern-setup view-mode-"+c},Object(i.createElement)(kd,{viewMode:c,setViewMode:l,activeSlide:a,totalSlides:p.length,handleNext:()=>{s(e=>e+1)},handlePrevious:()=>{s(e=>e-1)},onBlockPatternSelect:()=>{g(p[a].blocks)},onStartBlank:()=>{d(!0)}}),Object(i.createElement)(_d,{viewMode:c,activeSlide:a,patterns:p,onBlockPatternSelect:g}))};const Sd=(e,t)=>{if(!t||!e)return;const n=t.filter(({attributes:t})=>!(!t||!Object.keys(t).length)&&Object(u.isMatch)(e,t));return 1===n.length?n[0]:void 0};var wd=function({blockClientId:e}){const[t,n]=Object(i.useState)(),{updateBlockAttributes:o}=Object(f.useDispatch)(Mn),{variations:r,blockAttributes:c}=Object(f.useSelect)(t=>{const{getBlockVariations:n}=t(m.store),{getBlockName:o,getBlockAttributes:r}=t(Mn),c=e&&o(e);return{variations:c&&n(c,"transform"),blockAttributes:r(e)}},[e]);if(Object(i.useEffect)(()=>{var e;n(null===(e=Sd(c,r))||void 0===e?void 0:e.name)},[c,r]),null==r||!r.length)return null;const l=r.map(({name:e,title:t,description:n})=>({value:e,label:t,info:n})),a=t=>{o(e,{...r.find(({name:e})=>e===t).attributes})},s="block-editor-block-variation-transforms";return Object(i.createElement)(p.DropdownMenu,{className:s,label:Object(j.__)("Transform to variation"),text:Object(j.__)("Transform to variation"),popoverProps:{position:"bottom center",className:s+"__popover"},icon:vi.a,toggleProps:{iconPosition:"right"}},()=>Object(i.createElement)("div",{className:s+"__container"},Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(p.MenuItemsChoice,{choices:l,value:t,onSelect:a}))))};const Bd=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Id=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),xd={top:{icon:Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(j._x)("Align top","Block vertical alignment setting")},center:{icon:Id,title:Object(j._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Bd,title:Object(j._x)("Align bottom","Block vertical alignment setting")}},Td=["top","center","bottom"],Nd={isAlternate:!0};var Pd=function({value:e,onChange:t,controls:n=Td,isCollapsed:o=!0,isToolbar:r}){const c=xd[e],a=xd.top,s=r?p.ToolbarGroup:p.ToolbarDropdownMenu,u=r?{isCollapsed:o}:{};return Object(i.createElement)(s,Object(l.a)({popoverProps:Nd,icon:c?c.icon:a.icon,label:Object(j._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map(n=>{return{...xd[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r})},u))};function Ld(e){return Object(i.createElement)(Pd,Object(l.a)({},e,{isToolbar:!1}))}function Ad(e){return Object(i.createElement)(Pd,Object(l.a)({},e,{isToolbar:!0}))}var Rd=Object(d.createHigherOrderComponent)(e=>t=>{const n=xo("color.palette"),o=!xo("color.custom"),r=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?o:t.disableCustomColors,a=!Object(u.isEmpty)(r)||!c;return Object(i.createElement)(e,Object(l.a)({},t,{colors:r,disableCustomColors:c,hasColorsToChoose:a}))},"withColorContext"),Md=Rd(p.ColorPalette);function Dd({onChange:e,value:t,...n}){return Object(i.createElement)(qo,Object(l.a)({},n,{onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0}))}const Fd=[];function Vd(e){const t=xo("color.gradients")||Fd,n=!xo("color.customGradient");return Object(i.createElement)(p.__experimentalGradientPicker,Object(l.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var Hd=function(e){const t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?p.__experimentalGradientPicker:Vd;return Object(i.createElement)(t,e)};function zd({className:e,value:t,onChange:n,label:o=Object(j.__)("Gradient Presets"),...r}){const c=xo("color.gradients"),a=!xo("color.customGradient");return Object(u.isEmpty)(c)&&a?null:Object(i.createElement)(p.BaseControl,{className:s()("block-editor-gradient-picker-control",e)},Object(i.createElement)(p.BaseControl.VisualLabel,null,o),Object(i.createElement)(Hd,Object(l.a)({value:t,onChange:n,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:c,disableCustomGradients:a},r)))}function Gd(e){const t=xo("color.gradients");return Object(u.isEmpty)(t)?null:Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Gradient")},Object(i.createElement)(zd,e))}const Ud=[25,50,75,100];function Wd({imageWidth:e,imageHeight:t,imageSizeOptions:n=[],isResizable:o=!0,slug:r,width:c,height:l,onChange:a,onChangeImage:s=u.noop}){var d,b;function m(e,t){return()=>{a({width:e,height:t})}}return Object(i.createElement)(i.Fragment,null,!Object(u.isEmpty)(n)&&Object(i.createElement)(p.SelectControl,{label:Object(j.__)("Image size"),value:r,options:n,onChange:s}),o&&Object(i.createElement)("div",{className:"block-editor-image-size-control"},Object(i.createElement)("p",{className:"block-editor-image-size-control__row"},Object(j.__)("Image dimensions")),Object(i.createElement)("div",{className:"block-editor-image-size-control__row"},Object(i.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(j.__)("Width"),value:null!==(d=null!=c?c:e)&&void 0!==d?d:"",min:1,onChange:e=>a({width:parseInt(e,10)})}),Object(i.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(j.__)("Height"),value:null!==(b=null!=l?l:t)&&void 0!==b?b:"",min:1,onChange:e=>a({height:parseInt(e,10)})})),Object(i.createElement)("div",{className:"block-editor-image-size-control__row"},Object(i.createElement)(p.ButtonGroup,{"aria-label":Object(j.__)("Image size presets")},Ud.map(n=>{const o=Math.round(e*(n/100)),r=Math.round(t*(n/100)),a=c===o&&l===r;return Object(i.createElement)(p.Button,{key:n,isSmall:!0,isPrimary:a,isPressed:a,onClick:m(o,r)},n,"%")})),Object(i.createElement)(p.Button,{isSmall:!0,onClick:m()},Object(j.__)("Reset")))))}var Kd=Object(d.createHigherOrderComponent)(e=>t=>{const{clientId:n}=O();return Object(i.createElement)(e,Object(l.a)({},t,{clientId:n}))},"withClientId"),$d=Kd(({clientId:e,showSeparator:t,isFloating:n,onAddBlock:o})=>Object(i.createElement)(ls,{rootClientId:e,showSeparator:t,isFloating:n,onAddBlock:o})),qd=Object(d.compose)([Kd,Object(f.withSelect)((e,{clientId:t})=>{const{getBlockOrder:n}=e(Mn),o=n(t);return{lastBlockClientId:Object(u.last)(o)}})])(({clientId:e,lastBlockClientId:t})=>Object(i.createElement)(cs,{rootClientId:e,lastBlockClientId:t})),Yd=n(51),Xd=n.n(Yd);const Qd=new WeakMap;function Zd(e){const{clientId:t,allowedBlocks:n,template:o,templateLock:r,wrapperRef:c,templateInsertUpdatesSelection:l,__experimentalCaptureToolbars:a,__experimentalAppenderTagName:s,renderAppender:d,orientation:b,placeholder:p,__experimentalLayout:g}=e;!function(e,t,n,o,r){const{updateBlockListSettings:c}=Object(f.useDispatch)(Mn),{blockListSettings:l,parentLock:a}=Object(f.useSelect)(t=>{const n=t(Mn).getBlockRootClientId(e);return{blockListSettings:t(Mn).getBlockListSettings(e),parentLock:t(Mn).getTemplateLock(n)}},[e]),s=Object(i.useMemo)(()=>t,t);Object(i.useLayoutEffect)(()=>{const t={allowedBlocks:s,templateLock:void 0===n?a:n};void 0!==o&&(t.__experimentalCaptureToolbars=o),void 0!==r&&(t.orientation=r),Xd()(l,t)||c(e,t)},[e,l,s,n,a,o,r,c])}(t,n,r,a,b),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:r}=Object(f.useSelect)(Mn),{replaceInnerBlocks:c}=Object(f.useDispatch)(Mn),l=Object(f.useSelect)(t=>t(Mn).getBlocks(e),[e]),a=Object(i.useRef)(null);Object(i.useLayoutEffect)(()=>{if((0===l.length||"all"===n)&&!Object(u.isEqual)(t,a.current)){a.current=t;const n=Object(m.synchronizeBlocksWithTemplate)(l,t);Object(u.isEqual)(n,l)||c(e,n,0===l.length&&o&&0!==n.length,r())}},[l,t,n,e])}(t,o,r,l);const h=Object(f.useSelect)(e=>{const n=e(Mn).getBlock(t),o=Object(m.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){Qd.has(t)||Qd.set(t,new WeakMap);const n=Qd.get(t);if(!n.has(e)){const o=Object(u.mapValues)(t.providesContext,t=>e[t]);n.set(e,o)}return n.get(e)}(n.attributes,o)},[t]);return Object(i.createElement)(Jl,{value:h},Object(i.createElement)(yu,{rootClientId:t,renderAppender:d,__experimentalAppenderTagName:s,__experimentalLayout:g,wrapperRef:c,placeholder:p}))}function Jd(e){return ma(e),Object(i.createElement)(Zd,e)}const eb=Object(i.forwardRef)((e,t)=>{const n=tb({ref:t},e);return Object(i.createElement)("div",{className:"block-editor-inner-blocks"},Object(i.createElement)("div",n))});function tb(e={},t={}){const{clientId:n}=O(),o=Object(d.useViewportMatch)("medium","<"),r=Object(f.useSelect)(e=>{const{getBlockName:t,isBlockSelected:r,hasSelectedInnerBlock:c,isNavigationMode:l}=e(Mn),i=l()||o;return"core/template"!==t(n)&&!r(n)&&!c(n,!0)&&i},[n,o]),c=Object(d.useMergeRefs)([e.ref,ds({rootClientId:n})]),a=t.value&&t.onChange?Jd:Zd;return{...e,ref:c,className:s()(e.className,"block-editor-block-list__layout",{"has-overlay":r}),children:Object(i.createElement)(a,Object(l.a)({},t,{clientId:n}))}}eb.DefaultBlockAppender=qd,eb.ButtonBlockAppender=$d,eb.Content=Object(m.withBlockContentContext)(({BlockContent:e})=>Object(i.createElement)(e,null));var nb=eb,ob=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),rb=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),cb=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),lb=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Wn.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));const ib={left:ob,center:rb,right:cb,"space-between":lb};var ab=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:c}){const a=e=>{n(e===o?void 0:e)},s=o?ib[o]:ib.left,u=[{name:"left",icon:ob,title:Object(j.__)("Justify items left"),isActive:"left"===o,onClick:()=>a("left")},{name:"center",icon:rb,title:Object(j.__)("Justify items center"),isActive:"center"===o,onClick:()=>a("center")},{name:"right",icon:cb,title:Object(j.__)("Justify items right"),isActive:"right"===o,onClick:()=>a("right")},{name:"space-between",icon:lb,title:Object(j.__)("Space between items"),isActive:"space-between"===o,onClick:()=>a("space-between")}],d=c?p.ToolbarGroup:p.ToolbarDropdownMenu,b=c?{isCollapsed:t}:{};return Object(i.createElement)(d,Object(l.a)({icon:s,popoverProps:r,label:Object(j.__)("Change items justification"),controls:u.filter(t=>e.includes(t.name))},b))};function sb(e){return Object(i.createElement)(ab,Object(l.a)({},e,{isToolbar:!1}))}function ub(e){return Object(i.createElement)(ab,Object(l.a)({},e,{isToolbar:!0}))}var db=n(222);const bb=[{id:"opensInNewTab",title:Object(j.__)("Open in new tab")}];var mb=({value:e,onChange:t=u.noop,settings:n=bb})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map(t=>Object(i.createElement)(p.ToggleControl,{className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:o(t),checked:!!e&&!!e[t.id]}));return Object(i.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(i.createElement)(p.VisuallyHidden,{as:"legend"},Object(j.__)("Currently selected link settings")),r)};class pb extends i.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||Object(i.createRef)(),this.inputRef=Object(i.createRef)(),this.updateSuggestions=Object(u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,ta()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout(()=>{this.scrollingIntoView=!1},100)),e.value!==o&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!(e&&e.length);if(!o&&(e.length<2||!n&&Object(Ha.isURL)(e)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then(e=>{this.suggestionsRequest===r&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak(Object(j.sprintf)(
|
62 |
/* translators: %s: number of results. */
|
63 |
+
Object(j._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak(Object(j.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)}).catch(()=>{this.suggestionsRequest===r&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)}),this.suggestionsRequest=r}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n.trim())}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case lc.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case lc.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}return}const c=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case lc.UP:{e.stopPropagation(),e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case lc.DOWN:{e.stopPropagation(),e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case lc.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(c),this.props.speak(Object(j.__)("Link selected.")));break;case lc.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(c))}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let c=r;const l=e&&e.length;return o||l||(c=!1),!0===n&&(c=!1),{showSuggestions:c,suggestionsListboxId:"block-editor-url-input-suggestions-"+t,suggestionOptionIdPrefix:"block-editor-url-input-suggestion-"+t}}render(){return Object(i.createElement)(i.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:o,placeholder:r=Object(j.__)("Paste URL or type to search"),__experimentalRenderControl:c,value:l=""}=this.props,{loading:a,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:b,suggestionOptionIdPrefix:m}=this.state,f={id:"url-input-control-"+o,label:e,className:s()("block-editor-url-input",t,{"is-full-width":n})},g={value:l,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(j.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":b,"aria-activedescendant":null!==d?`${m}-${d}`:void 0,ref:this.inputRef};return c?c(f,g,a):Object(i.createElement)(p.BaseControl,f,Object(i.createElement)("input",g),a&&Object(i.createElement)(p.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:c,selectedSuggestion:a,suggestionsListboxId:d,suggestionOptionIdPrefix:b,loading:m}=this.state,f={id:d,ref:this.autocompleteRef,role:"listbox"},g=(e,t)=>({role:"option",tabIndex:"-1",id:`${b}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a});return Object(u.isFunction)(t)&&r&&c.length?t({suggestions:c,selectedSuggestion:a,suggestionsListProps:f,buildSuggestionItemProps:g,isLoading:m,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!Object(u.isFunction)(t)&&r&&c.length?Object(i.createElement)(p.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(i.createElement)("div",Object(l.a)({},f,{className:s()("block-editor-url-input__suggestions",e+"__suggestions")}),c.map((e,t)=>Object(i.createElement)(p.Button,Object(l.a)({},g(0,t),{key:e.id,className:s()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title)))):null}}var fb=Object(d.compose)(d.withSafeTimeout,p.withSpokenMessages,d.withInstanceId,Object(f.withSelect)((e,t)=>{if(Object(u.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Mn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}}))(pb),gb=({searchTerm:e,onClick:t,itemProps:n,isSelected:o,buttonText:r})=>{if(!e)return null;let c;return c=r?Object(u.isFunction)(r)?r(e):r:Object(i.createInterpolateElement)(Object(j.sprintf)(
|
64 |
/* translators: %s: search term. */
|
65 |
+
Object(j.__)("Create: <mark>%s</mark>"),e),{mark:Object(i.createElement)("mark",null)}),Object(i.createElement)(p.Button,Object(l.a)({},n,{className:s()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":o}),onClick:t}),Object(i.createElement)(qc.a,{className:"block-editor-link-control__search-item-icon",icon:la.a}),Object(i.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(i.createElement)("span",{className:"block-editor-link-control__search-item-title"},c)))},hb=Object(i.createElement)(Wn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(i.createElement)(Wn.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),Ob=({itemProps:e,suggestion:t,isSelected:n=!1,onClick:o,isURL:r=!1,searchTerm:c="",shouldShowType:a=!1})=>Object(i.createElement)(p.Button,Object(l.a)({},e,{onClick:o,className:s()("block-editor-link-control__search-item",{"is-selected":n,"is-url":r,"is-entity":!r})}),r&&Object(i.createElement)(qc.a,{className:"block-editor-link-control__search-item-icon",icon:hb}),Object(i.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(i.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(i.createElement)(p.TextHighlight,{text:t.title,highlight:c})),Object(i.createElement)("span",{"aria-hidden":!r,className:"block-editor-link-control__search-item-info"},!r&&(Object(Ha.filterURLForDisplay)(Object(Ha.safeDecodeURI)(t.url))||""),r&&Object(j.__)("Press ENTER to add this link"))),a&&t.type&&Object(i.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===t.type?"tag":t.type));function jb({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:c,suggestions:a,selectedSuggestion:u,isLoading:d,isInitialSuggestions:b,createSuggestionButtonText:m,suggestionsQuery:f}){const g=s()("block-editor-link-control__search-results",{"is-loading":d}),h=["url","mailto","tel","internal"],O=1===a.length&&h.includes(a[0].type.toLowerCase()),v=t&&!O&&!b,k=!(null!=f&&f.type),_="block-editor-link-control-search-results-label-"+e,y=b?Object(j.__)("Recently updated"):Object(j.sprintf)(
|
66 |
/* translators: %s: search term. */
|
67 |
+
Object(j.__)('Search results for "%s"'),n),E=Object(i.createElement)(b?i.Fragment:p.VisuallyHidden,{},Object(i.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},y));return Object(i.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},E,Object(i.createElement)("div",Object(l.a)({},r,{className:g,"aria-labelledby":_}),a.map((e,t)=>v&&"__CREATE__"===e.type?Object(i.createElement)(gb,{searchTerm:n,buttonText:m,onClick:()=>o(e),key:e.type,itemProps:c(e,t),isSelected:t===u}):"__CREATE__"===e.type?null:Object(i.createElement)(Ob,{key:`${e.id}-${e.type}`,itemProps:c(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===u,isURL:h.includes(e.type.toLowerCase()),searchTerm:n,shouldShowType:k}))))}function vb(e){const t=Object(u.startsWith)(e,"#");return Object(Ha.isURL)(e)||e&&e.includes("www.")||t}const kb=()=>Promise.resolve([]),_b=e=>{let t="URL";const n=Object(Ha.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(u.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(Ha.prependHTTP)(e):e,type:t}])};const yb=Promise.resolve([]),Eb=Object(i.forwardRef)(({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:c=!1,onCreateSuggestion:l=u.noop,onChange:a=u.noop,onSelect:s=u.noop,showSuggestions:b=!0,renderSuggestions:m=(e=>Object(i.createElement)(jb,e)),fetchSuggestions:p=null,allowDirectEntry:g=!0,showInitialSuggestions:h=!1,suggestionsQuery:O={},withURLSuggestion:v=!0,createSuggestionButtonText:k},_)=>{const y=function(e,t,n,o){const{fetchSearchSuggestions:r}=Object(f.useSelect)(e=>{const{getSettings:t}=e(Mn);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}},[]),c=t?_b:kb;return Object(i.useCallback)((t,{isInitialSuggestions:l})=>vb(t)?c(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,c)=>{const{isInitialSuggestions:l}=t;let i=await Promise.all([n(e,t),o(e)]);return i=e.includes(" ")||!c||l?i[0]:i[0].concat(i[1]),l||vb(e)||!r?i:i.concat({title:e,url:e,type:"__CREATE__"})})(t,{...e,isInitialSuggestions:l},r,c,n,o),[c,r,n])}(O,g,c,v),E=b?p||y:yb,C=Object(d.useInstanceId)(Eb),[S,w]=Object(i.useState)(),B=async e=>{let t=e;if("__CREATE__"!==e.type)(g||t&&Object.keys(t).length>=1)&&s({...Object(u.omit)(n,"id","url"),...t},t);else try{var o;t=await l(e.title),null!==(o=t)&&void 0!==o&&o.url&&s(t)}catch(e){}};return Object(i.createElement)("form",{onSubmit:t=>{t.preventDefault(),B(S||{url:e})}},Object(i.createElement)(fb,{className:o,value:e,onChange:(e,t)=>{a(e),w(t)},placeholder:null!=r?r:Object(j.__)("Search or type url"),__experimentalRenderSuggestions:b?t=>m({...t,instanceId:C,withCreateSuggestion:c,currentInputValue:e,createSuggestionButtonText:k,suggestionsQuery:O,handleSuggestionClick:e=>{t.handleSuggestionClick&&t.handleSuggestionClick(e),B(e)}}):null,__experimentalFetchLinkSuggestions:E,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,ref:_}),t)});var Cb=Eb;const{Slot:Sb,Fill:wb}=Object(p.createSlotFill)("BlockEditorLinkControlViewer");function Bb({value:e,onEditClick:t}){const n=e&&Object(Ha.filterURLForDisplay)(Object(Ha.safeDecodeURI)(e.url),16)||"";return Object(i.createElement)("div",{"aria-label":Object(j.__)("Currently selected"),"aria-selected":"true",className:s()("block-editor-link-control__search-item",{"is-current":!0})},Object(i.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(i.createElement)(p.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url},e&&e.title||n),e&&e.title&&Object(i.createElement)("span",{className:"block-editor-link-control__search-item-info"},n)),Object(i.createElement)(p.Button,{isSecondary:!0,onClick:()=>t(),className:"block-editor-link-control__search-item-action"},Object(j.__)("Edit")),Object(i.createElement)(Sb,{fillProps:e}))}function Ib({searchInputPlaceholder:e,value:t,settings:n,onChange:o=u.noop,noDirectEntry:r=!1,showSuggestions:c=!0,showInitialSuggestions:l,forceIsEditingLink:a,createSuggestion:s,withCreateSuggestion:d,inputValue:b="",suggestionsQuery:m={},noURLSuggestion:f=!1,createSuggestionButtonText:g}){void 0===d&&s&&(d=!0);const h=Object(i.useRef)(!0),O=Object(i.useRef)(),[v,k]=Object(i.useState)(t&&t.url||""),_=b||v,[y,E]=Object(i.useState)(void 0!==a?a:!t||!t.url),C=Object(i.useRef)(!1);Object(i.useEffect)(()=>{void 0!==a&&a!==y&&E(a)},[a]),Object(i.useEffect)(()=>{h.current?h.current=!1:(O.current.contains(O.current.ownerDocument.activeElement)||(di.focus.focusable.find(O.current)[0]||O.current).focus(),C.current=!1)},[y]);const{createPage:S,isCreatingPage:w,errorMessage:B}=function(e){const t=Object(i.useRef)(),[n,o]=Object(i.useState)(!1),[r,c]=Object(i.useState)(null);return Object(i.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:async function(n){o(!0),c(null);try{return t.current=(e=>{let t=!1;return{promise:new Promise((n,o)=>{e.then(e=>t?o({isCanceled:!0}):n(e),e=>o(t?{isCanceled:!0}:e))}),cancel(){t=!0}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw c(e.message||Object(j.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(s);return Object(i.createElement)("div",{tabIndex:-1,ref:O,className:"block-editor-link-control"},w&&Object(i.createElement)("div",{className:"block-editor-link-control__loading"},Object(i.createElement)(p.Spinner,null)," ",Object(j.__)("Creating"),"…"),(y||!t)&&!w&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(i.createElement)(Cb,{currentLink:t,className:"block-editor-link-control__search-input",placeholder:e,value:_,withCreateSuggestion:d,onCreateSuggestion:S,onChange:k,onSelect:e=>{var t;o(e),C.current=!(null===(t=O.current)||void 0===t||!t.contains(O.current.ownerDocument.activeElement)),E(!1)},showInitialSuggestions:l,allowDirectEntry:!r,showSuggestions:c,suggestionsQuery:m,withURLSuggestion:!f,createSuggestionButtonText:g},Object(i.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(i.createElement)(p.Button,{type:"submit",label:Object(j.__)("Submit"),icon:db.a,className:"block-editor-link-control__search-submit"})))),B&&Object(i.createElement)(p.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},B)),t&&!y&&!w&&Object(i.createElement)(Bb,{value:t,onEditClick:()=>E(!0)}),Object(i.createElement)(mb,{value:t,settings:n,onChange:o}))}Ib.ViewerFill=wb;var xb=Ib,Tb=n(302),Nb=n(223),Pb=Object(p.withFilters)("editor.MediaUpload")(()=>null),Lb=function({fallback:e=null,children:t}){return Object(f.useSelect)(e=>{const{getSettings:t}=e(Mn);return!!t().mediaUpload},[])?t:e},Ab=Object(d.compose)([Object(f.withDispatch)(e=>{const{createNotice:t,removeNotice:n}=e(La.store);return{createNotice:t,removeNotice:n}}),Object(p.withFilters)("editor.MediaReplaceFlow")])(({mediaURL:e,mediaId:t,allowedTypes:n,accept:o,onSelect:r,onSelectURL:c,onFilesUpload:l=u.noop,name:a=Object(j.__)("Replace"),createNotice:s,removeNotice:d})=>{const[b,m]=Object(i.useState)(e),g=Object(f.useSelect)(e=>e(Mn).getSettings().mediaUpload,[]),h=Object(i.createRef)(),O=Object(u.uniqueId)("block-editor/media-replace-flow/error-notice/"),v=e=>{const t=document.createElement("div");t.innerHTML=Object(i.renderToString)(e);const n=t.textContent||t.innerText||"";setTimeout(()=>{s("error",n,{speak:!0,id:O,isDismissible:!0})},1e3)},k=e=>{r(e),m(e.url),Object(St.speak)(Object(j.__)("The media file has been replaced")),d(O)},_=e=>{e.keyCode===lc.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(i.createElement)(p.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>Object(i.createElement)(p.ToolbarButton,{ref:h,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:_},a),renderContent:({onClose:e})=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(i.createElement)(Pb,{value:t,onSelect:e=>k(e),allowedTypes:n,render:({open:e})=>Object(i.createElement)(p.MenuItem,{icon:Tb.a,onClick:e},Object(j.__)("Open Media Library"))}),Object(i.createElement)(Lb,null,Object(i.createElement)(p.FormFileUpload,{onChange:e=>{(e=>{const t=e.target.files;l(t),g({allowedTypes:n,filesList:t,onFileChange:([e])=>{k(e)},onError:v})})(e)},accept:o,render:({openFileDialog:e})=>Object(i.createElement)(p.MenuItem,{icon:Nb.a,onClick:()=>{e()}},Object(j.__)("Upload"))}))),c&&Object(i.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:e=>{[lc.TAB,lc.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:e=>{[lc.TAB,lc.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(i.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(j.__)("Current media URL:")),Object(i.createElement)(xb,{value:{url:b},settings:[],showSuggestions:!1,onChange:({url:e})=>{m(e),c(e),h.current.focus()}})))})}),Rb=n(207);function Mb({url:e,urlLabel:t,className:n}){const o=s()(n,"block-editor-url-popover__link-viewer-url");return e?Object(i.createElement)(p.ExternalLink,{className:o,href:e},t||Object(Ha.filterURLForDisplay)(Object(Ha.safeDecodeURI)(e))):Object(i.createElement)("span",{className:o})}function Db({additionalControls:e,children:t,renderSettings:n,position:o="bottom center",focusOnMount:r="firstElement",...c}){const[a,s]=Object(i.useState)(!1),u=!!n&&a;return Object(i.createElement)(p.Popover,Object(l.a)({className:"block-editor-url-popover",focusOnMount:r,position:o},c),Object(i.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(i.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&Object(i.createElement)(p.Button,{className:"block-editor-url-popover__settings-toggle",icon:vi.a,label:Object(j.__)("Link settings"),onClick:()=>{s(!a)},"aria-expanded":a})),u&&Object(i.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},n())),e&&!u&&Object(i.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}Db.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return Object(i.createElement)("form",Object(l.a)({className:s()("block-editor-url-popover__link-editor",t)},r),Object(i.createElement)(fb,{value:o,onChange:n,autocompleteRef:e}),Object(i.createElement)(p.Button,{icon:db.a,label:Object(j.__)("Apply"),type:"submit"}))},Db.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...c}){return Object(i.createElement)("div",Object(l.a)({className:s()("block-editor-url-popover__link-viewer",e)},c),Object(i.createElement)(Mb,{url:o,urlLabel:r,className:t}),n&&Object(i.createElement)(p.Button,{icon:Rb.a,label:Object(j.__)("Edit"),onClick:n}))};var Fb=Db;const Vb=({src:e,onChange:t,onSubmit:n,onClose:o})=>Object(i.createElement)(Fb,{onClose:o},Object(i.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},Object(i.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(j.__)("URL"),placeholder:Object(j.__)("Paste or type URL"),onChange:t,value:e}),Object(i.createElement)(p.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:db.a,label:Object(j.__)("Apply"),type:"submit"})));var Hb=Object(p.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:c,notices:l,isAppender:a,accept:d,addToGallery:b,multiple:m=!1,dropZoneUIOnly:g,disableDropZone:h,disableMediaButtons:O,onError:v,onSelect:k,onCancel:_,onSelectURL:y,onDoubleClick:E,onFilesPreUpload:C=u.noop,onHTMLDrop:S=u.noop,children:w}){const B=Object(f.useSelect)(e=>{const{getSettings:t}=e(Mn);return t().mediaUpload},[]),[I,x]=Object(i.useState)(""),[T,N]=Object(i.useState)(!1);Object(i.useEffect)(()=>{var t;x(null!==(t=null==e?void 0:e.src)&&void 0!==t?t:"")},[null==e?void 0:e.src]);const P=e=>{x(e.target.value)},L=()=>{N(!0)},A=()=>{N(!1)},R=e=>{e.preventDefault(),I&&y&&(y(I),A())},M=n=>{let o;if(C(n),m)if(b){let t=[];o=n=>{const o=(null!=e?e:[]).filter(e=>e.id?!t.some(({id:t})=>Number(t)===Number(e.id)):!t.some(({urlSlug:t})=>e.url.includes(t)));k(o.concat(n)),t=n.map(e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}})}}else o=k;else o=([e])=>k(e);B({allowedTypes:t,filesList:n,onFileChange:o,onError:v})},D=e=>{M(e.target.files)},F=(e,u)=>{let{instructions:d,title:b}=r;if(B||y||(d=Object(j.__)("To edit this block, you need permission to upload media.")),void 0===d||void 0===b){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,c=o&&"image"===n,l=o&&"video"===n;void 0===d&&B&&(d=Object(j.__)("Upload a media file or pick one from your media library."),r?d=Object(j.__)("Upload an audio file, pick one from your media library, or add one with a URL."):c?d=Object(j.__)("Upload an image file, pick one from your media library, or add one with a URL."):l&&(d=Object(j.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===b&&(b=Object(j.__)("Media"),r?b=Object(j.__)("Audio"):c?b=Object(j.__)("Image"):l&&(b=Object(j.__)("Video")))}const m=s()("block-editor-media-placeholder",n,{"is-appender":a});return Object(i.createElement)(p.Placeholder,{icon:o,label:b,instructions:d,className:m,notices:l,onClick:u,onDoubleClick:E,preview:c},e,w)},V=()=>h?null:Object(i.createElement)(p.DropZone,{onFilesDrop:M,onHTMLDrop:S}),H=()=>_&&Object(i.createElement)(p.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(j.__)("Cancel"),isLink:!0,onClick:_},Object(j.__)("Cancel")),z=()=>y&&Object(i.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(i.createElement)(p.Button,{className:"block-editor-media-placeholder__button",onClick:L,isPressed:T,isTertiary:!0},Object(j.__)("Insert from URL")),T&&Object(i.createElement)(Vb,{src:I,onChange:P,onSubmit:R,onClose:A}));return g||O?(g&&Bt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),Object(i.createElement)(Lb,null,V())):Object(i.createElement)(Lb,{fallback:F(z())},(()=>{const n=Object(i.createElement)(Pb,{addToGallery:b,gallery:m&&!(!t||0===t.length)&&t.every(e=>"image"===e||e.startsWith("image/")),multiple:m,onSelect:k,allowedTypes:t,value:Array.isArray(e)?e.map(({id:e})=>e):e.id,render:({open:e})=>Object(i.createElement)(p.Button,{isTertiary:!0,onClick:t=>{t.stopPropagation(),e()}},Object(j.__)("Media Library"))});if(B&&a)return Object(i.createElement)(i.Fragment,null,V(),Object(i.createElement)(p.FormFileUpload,{onChange:D,accept:d,multiple:m,render:({openFileDialog:e})=>{const t=Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.Button,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(j.__)("Upload")),n,z(),H());return F(t,e)}}));if(B){const e=Object(i.createElement)(i.Fragment,null,V(),Object(i.createElement)(p.FormFileUpload,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:D,accept:d,multiple:m},Object(j.__)("Upload")),n,z(),H());return F(e)}return F(n)})())}));const zb=Object(i.forwardRef)((e,t)=>Object(i.createElement)(pd,Object(l.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0})));zb.Content=({value:e="",tagName:t="div",...n})=>Object(i.createElement)(t,n,e);var Gb=zb,Ub=Object(i.forwardRef)(({__experimentalVersion:e,...t},n)=>{if(2===e)return Object(i.createElement)(Gb,Object(l.a)({ref:n},t));const{className:o,onChange:r,...c}=t;return Object(i.createElement)(Vi.a,Object(l.a)({ref:n,className:s()("block-editor-plain-text",o),onChange:e=>r(e.target.value)},c))});function Wb({property:e,viewport:t,desc:n}){const o=Object(d.useInstanceId)(Wb),r=n||Object(j.sprintf)(
|
68 |
/* translators: 1: property name. 2: viewport name. */
|
69 |
+
Object(j._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("span",{"aria-describedby":"rbc-desc-"+o},t.label),Object(i.createElement)(p.VisuallyHidden,{as:"span",id:"rbc-desc-"+o},r))}var Kb=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:c,renderResponsiveControls:l,isResponsive:a=!1,defaultLabel:u={id:"all",
|
70 |
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
71 |
label:Object(j.__)("All")},viewports:d=[{id:"small",label:Object(j.__)("Small screens")},{id:"medium",label:Object(j.__)("Medium screens")},{id:"large",label:Object(j.__)("Large screens")}]}=e;if(!t||!n||!c)return null;const b=o||Object(j.sprintf)(
|
72 |
/* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
|
73 |
+
Object(j.__)("Use the same %s on all screensizes."),n),m=Object(j.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),f=c(Object(i.createElement)(Wb,{property:n,viewport:u}),u);
|
74 |
+
/* translators: 'Help text for the responsive mode toggle control.' */return Object(i.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(i.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(i.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(i.createElement)(p.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:b,checked:!a,onChange:r,help:m}),Object(i.createElement)("div",{className:s()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&f,a&&(l?l(d):d.map(e=>Object(i.createElement)(i.Fragment,{key:e.id},c(Object(i.createElement)(Wb,{property:n,viewport:e}),e)))))))};function $b({character:e,type:t,onUse:n}){return Object(d.useKeyboardShortcut)(lc.rawShortcut[t](e),()=>(n(),!1),{bindGlobal:!0}),null}function qb({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,c="RichText.ToolbarControls";return e&&(c+="."+e),t&&n&&(r=lc.displayShortcut[t](n)),Object(i.createElement)(p.Fill,{name:c},Object(i.createElement)(p.ToolbarButton,Object(l.a)({},o,{shortcut:r})))}class Yb extends i.Component{constructor(){super(...arguments),this.onInput=this.onInput.bind(this)}onInput(e){e.inputType===this.props.inputType&&this.props.onInput()}componentDidMount(){document.addEventListener("input",this.onInput,!0)}componentWillUnmount(){document.removeEventListener("input",this.onInput,!0)}render(){return null}}const Xb=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var Qb=Object(i.forwardRef)((function(e,t){const n=Object(f.useSelect)(e=>e(Mn).isNavigationMode(),[]),{setNavigationMode:o}=Object(f.useDispatch)(Mn),r=e=>{o("edit"!==e)};return Object(i.createElement)(p.Dropdown,{renderToggle:({isOpen:o,onToggle:r})=>Object(i.createElement)(p.Button,Object(l.a)({},e,{ref:t,icon:n?Xb:Rb.a,"aria-expanded":o,"aria-haspopup":"true",onClick:r
|
75 |
+
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(j.__)("Tools")})),position:"bottom right",renderContent:()=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.NavigableMenu,{role:"menu","aria-label":Object(j.__)("Tools")},Object(i.createElement)(p.MenuItemsChoice,{value:n?"select":"edit",onSelect:r,choices:[{value:"edit",label:Object(i.createElement)(i.Fragment,null,Object(i.createElement)(qc.a,{icon:Rb.a}),Object(j.__)("Edit"))},{value:"select",label:Object(i.createElement)(i.Fragment,null,Xb,Object(j.__)("Select"))}]})),Object(i.createElement)("div",{className:"block-editor-tool-selector__help"},Object(j.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function Zb({units:e,...t}){const n=Object(p.__experimentalUseCustomUnits)({availableUnits:xo("spacing.units")||["%","px","em","rem","vw"],units:e});return Object(i.createElement)(p.__experimentalUnitControl,Object(l.a)({units:n},t))}var Jb=n(195),em=n(303);class tm extends i.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?Object(j.__)("Edit link"):Object(j.__)("Insert link");return Object(i.createElement)("div",{className:"block-editor-url-input__button"},Object(i.createElement)(p.Button,{icon:Jb.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&Object(i.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(i.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(i.createElement)(p.Button,{className:"block-editor-url-input__back",icon:em.a,label:Object(j.__)("Close"),onClick:this.toggle}),Object(i.createElement)(fb,{value:e||"",onChange:t}),Object(i.createElement)(p.Button,{icon:db.a,label:Object(j.__)("Submit"),type:"submit"}))))}}var nm=tm,om=n(118);const rm=["noreferrer","noopener"],cm=Object(i.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(p.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(i.createElement)(p.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(i.createElement)(p.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),lm=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:c,linkTarget:l,linkClass:a,rel:s})=>{const[d,b]=Object(i.useState)(!1),m=Object(i.useCallback)(()=>{b(!0)}),[f,g]=Object(i.useState)(!1),[h,O]=Object(i.useState)(null),v=Object(i.useRef)(null),k=Object(i.useCallback)(()=>{"media"!==e&&"attachment"!==e||O(""),g(!0)}),_=Object(i.useCallback)(()=>{g(!1)}),y=Object(i.useCallback)(()=>{O(null),_(),b(!1)}),E=e=>{let t=e;return void 0===e||Object(u.isEmpty)(t)||Object(u.isEmpty)(t)||(Object(u.each)(rm,e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")}),t!==e&&(t=t.trim()),Object(u.isEmpty)(t)&&(t=void 0)),t},C=Object(i.useCallback)(()=>e=>{const t=v.current;t&&t.contains(e.target)||(b(!1),O(null),_())}),S=Object(i.useCallback)(()=>e=>{if(h){var n;const e=(null===(n=B().find(e=>e.url===h))||void 0===n?void 0:n.linkDestination)||"custom";t({href:h,linkDestination:e})}_(),O(null),e.preventDefault()}),w=Object(i.useCallback)(()=>{t({linkDestination:"none",href:""})}),B=()=>{const e=[{linkDestination:"media",title:Object(j.__)("Media File"),url:"image"===o?r:void 0,icon:cm}];return"image"===o&&c&&e.push({linkDestination:"attachment",title:Object(j.__)("Attachment Page"),url:"image"===o?c:void 0,icon:Object(i.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(p.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(i.createElement)(p.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"}))}),e},I=Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.ToggleControl,{label:Object(j.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;return n=t||s?E(s):void 0,{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===l}),Object(i.createElement)(p.TextControl,{label:Object(j.__)("Link Rel"),value:E(s)||"",onChange:e=>{t({rel:e})}}),Object(i.createElement)(p.TextControl,{label:Object(j.__)("Link CSS Class"),value:a||"",onChange:e=>{t({linkClass:e})}})),x=null!==h?h:n,T=(Object(u.find)(B(),["linkDestination",e])||{}).title;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.ToolbarButton,{icon:Jb.a,className:"components-toolbar__control",label:n?Object(j.__)("Edit link"):Object(j.__)("Insert link"),"aria-expanded":d,onClick:m}),d&&Object(i.createElement)(Fb,{onFocusOutside:C(),onClose:y,renderSettings:()=>I,additionalControls:!x&&Object(i.createElement)(p.NavigableMenu,null,Object(u.map)(B(),e=>Object(i.createElement)(p.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{O(null),(e=>{const n=B();let o;o=e?(Object(u.find)(n,t=>t.url===e)||{linkDestination:"custom"}).linkDestination:"none",t({linkDestination:o,href:e})})(e.url),_()}},e.title)))},(!n||f)&&Object(i.createElement)(Fb.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:x,onChangeInputValue:O,onSubmit:S(),autocompleteRef:v}),n&&!f&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Fb.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:k,urlLabel:T}),Object(i.createElement)(p.Button,{icon:om.a,label:Object(j.__)("Remove link"),onClick:w}))))};var im=n(101);function am({children:e,className:t,isEnabled:n=!0,deviceType:o,setDeviceType:r}){if(Object(d.useViewportMatch)("small","<"))return null;const c={className:s()(t,"block-editor-post-preview__dropdown-content"),position:"bottom left"},l={isTertiary:!0,className:"block-editor-post-preview__button-toggle",disabled:!n,
|
76 |
/* translators: button label text should, if possible, be under 16 characters. */
|
77 |
+
children:Object(j.__)("Preview")};return Object(i.createElement)(p.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:c,toggleProps:l,icon:null},()=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Desktop"),icon:"Desktop"===o&&im.a},Object(j.__)("Desktop")),Object(i.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Tablet"),icon:"Tablet"===o&&im.a},Object(j.__)("Tablet")),Object(i.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Mobile"),icon:"Mobile"===o&&im.a},Object(j.__)("Mobile"))),e))}var sm=n(269);const um=/\((min|max)-width:[^\(]*?\)/g;function dm(e){return!!e.media&&!!e.media.mediaText.match(um)}function bm(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function mm(e,t){return e.replace(um,e=>Object(sm.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)")}function pm(e,t){Object(i.useEffect)(()=>{if(!t)return;const n="undefined"==typeof window?[]:Object(u.filter)(null!==(o=null===(r=window)||void 0===r||null===(c=r.document)||void 0===c?void 0:c.styleSheets)&&void 0!==o?o:[],e=>!!e.href&&Object(Ha.getProtocol)(e.href)===window.location.protocol&&Object(Ha.getAuthority)(e.href)===window.location.host);var o,r,c;const l=[];return n.forEach((n,o)=>{let r=!1;for(let c=0;c<n.cssRules.length;++c){const i=n.cssRules[c];if(i.type!==window.CSSRule.STYLE_RULE&&i.type!==window.CSSRule.MEDIA_RULE)continue;if(!r&&i.cssText.match(new RegExp("#start-"+e))&&(r=!0),r&&i.cssText.match(new RegExp("#end-"+e))&&(r=!1),!r||!dm(i))continue;const a=i.cssText;l[o]||(l[o]=[]),l[o][c]=a,bm(n,mm(a,t),c)}}),()=>{l.forEach((e,t)=>{if(e)for(let o=0;o<e.length;++o){const r=e[o];r&&bm(n[t],r,o)}})}},[t])}function fm(e,t){const[n,o]=Object(i.useState)(window.innerWidth);Object(i.useEffect)(()=>{if("Desktop"===e)return;const t=()=>o(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]);const r=e=>{let t;switch(e){case"Tablet":t=780;break;case"Mobile":t=360;break;default:return null}return t<n?t:n};return pm("resizable-editor-section",t?null:r(e)),(e=>{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:r(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var gm=Object(f.withSelect)(e=>({selectedBlockClientId:e(Mn).getBlockSelectionStart()}))(({selectedBlockClientId:e})=>{const t=_r(e);return e?Object(i.createElement)(p.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},Object(j.__)("Skip to the selected block")):null}),hm=n(122),Om=Object(f.withSelect)(e=>{const{getMultiSelectedBlocks:t}=e(Mn);return{blocks:t()}})((function({blocks:e}){const t=Object(hm.count)(Object(m.serialize)(e),"words");return Object(i.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(i.createElement)(Hl,{icon:xs,showColors:!0}),Object(i.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(i.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(j.sprintf)(
|
78 |
/* translators: %d: number of blocks */
|
79 |
Object(j._n)("%d block","%d blocks",e.length),e.length)),Object(i.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(j.sprintf)(
|
80 |
/* translators: %d: number of words */
|
81 |
+
Object(j._n)("%d word","%d words",t),t))))}));function jm({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:o}=Object(f.useSelect)(t=>{var n,o;const r=t(Mn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==r||null===(n=r.value)||void 0===n?void 0:n[e],onUpdatePreferredStyleVariations:null!==(o=null==r?void 0:r.onChange)&&void 0!==o?o:null,styles:t(m.store).getBlockStyles(e)}},[e]),r=Object(i.useMemo)(()=>[{label:Object(j.__)("Not set"),value:""},...o.map(({label:e,name:t})=>({label:e,value:t}))],[o]),c=Object(i.useCallback)(t=>{n(e,t)},[e,n]);return n&&Object(i.createElement)(p.SelectControl,{options:r,value:t||"",label:Object(j.__)("Default Style"),onChange:c})}const vm=({clientId:e,blockName:t,hasBlockStyles:n,bubblesVirtually:o})=>{const r=Yl(e);return Object(i.createElement)("div",{className:"block-editor-block-inspector"},Object(i.createElement)(ba,r),Object(i.createElement)(wd,{blockClientId:e}),n&&Object(i.createElement)("div",null,Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Styles")},Object(i.createElement)(As,{clientId:e}),Object(m.hasBlockSupport)(t,"defaultStylePicker",!0)&&Object(i.createElement)(jm,{blockName:t}))),Object(i.createElement)(yo.Slot,{bubblesVirtually:o}),Object(i.createElement)("div",null,Object(i.createElement)(km,{slotName:jo.slotName,bubblesVirtually:o})),Object(i.createElement)(gm,{key:"back"}))},km=({slotName:e,bubblesVirtually:t})=>{const n=Object(p.__experimentalUseSlot)(e);return Boolean(n.fills&&n.fills.length)?Object(i.createElement)(p.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(j.__)("Advanced"),initialOpen:!1},Object(i.createElement)(jo.Slot,{bubblesVirtually:t})):null};var _m=({showNoBlockSelectedMessage:e=!0,bubblesVirtually:t=!0})=>{const{count:n,hasBlockStyles:o,selectedBlockName:r,selectedBlockClientId:c,blockType:l}=Object(f.useSelect)(e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(Mn),{getBlockStyles:r}=e(m.store),c=t(),l=c&&o(c),i=l&&Object(m.getBlockType)(l),a=l&&r(l);return{count:n(),selectedBlockClientId:c,selectedBlockName:l,blockType:i,hasBlockStyles:a&&a.length>0}},[]);if(n>1)return Object(i.createElement)("div",{className:"block-editor-block-inspector"},Object(i.createElement)(Om,null),Object(i.createElement)(yo.Slot,{bubblesVirtually:t}));const a=r===Object(m.getUnregisteredTypeHandlerName)();return l&&c&&!a?Object(i.createElement)(vm,{clientId:c,blockName:l.name,hasBlockStyles:o,bubblesVirtually:t}):e?Object(i.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(j.__)("No block selected.")):null};function ym({children:e,__unstableContentRef:t}){const n=Object(d.useViewportMatch)("medium"),o=Object(f.useSelect)(e=>e(Mn).getSettings().hasFixedToolbar,[]);return Object(i.createElement)(fs,{__unstableContentRef:t},(o||!n)&&Object(i.createElement)(du,{isFixed:!0}),Object(i.createElement)(fu,{__unstableContentRef:t}),Object(i.createElement)(p.Popover.Slot,{name:"block-toolbar",ref:bs(t)}),e)}var Em=n(270),Cm=n.n(Em);const Sm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function wm(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Bm=n(170),Im=n.n(Bm),xm=Tm;function Tm(e){this.options=e||{}}Tm.prototype.emit=function(e){return e},Tm.prototype.visit=function(e){return this[e.type](e)},Tm.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;o<r;o++)n+=this.visit(e[o]),t&&o<r-1&&(n+=this.emit(t));return n};var Nm=Pm;function Pm(e){xm.call(this,e)}Im()(Pm,xm),Pm.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Pm.prototype.comment=function(e){return this.emit("",e.position)},Pm.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Pm.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Pm.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Pm.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Pm.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Pm.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Pm.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Pm.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Pm.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Pm.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Pm.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Pm.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Pm.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Pm.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Lm=Am;function Am(e){e=e||{},xm.call(this,e),this.indentation=e.indent}Im()(Am,xm),Am.prototype.compile=function(e){return this.stylesheet(e)},Am.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Am.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Am.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Am.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Am.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Am.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Am.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Am.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Am.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Am.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Am.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Am.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Am.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Am.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Am.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Am.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Am.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Rm=function(e,t){try{const r=function(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function c(){const e={line:n,column:o};return function(t){return t.position=new l(e),m(),t}}function l(e){this.start=e,this.end={line:n,column:o},this.source=t.source}l.prototype.content=e;const i=[];function a(r){const c=new Error(t.source+":"+n+":"+o+": "+r);if(c.reason=r,c.filename=t.source,c.line=n,c.column=o,c.source=e,!t.silent)throw c;i.push(c)}function s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){let t;const n=[];for(m(),p(n);e.length&&"}"!==e.charAt(0)&&(t=E()||C());)!1!==t&&(n.push(t),p(n));return n}function b(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){b(/^\s*/)}function p(e){let t;for(e=e||[];t=f();)!1!==t&&e.push(t);return e}function f(){const t=c();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return a("End of comment missing");const l=e.slice(2,n-2);return o+=2,r(l),e=e.slice(n),o+=2,t({type:"comment",comment:l})}function g(){const e=b(/^([^{]+)/);if(e)return wm(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function h(){const e=c();let t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=wm(t[0]),!b(/^:\s*/))return a("property missing ':'");const n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Sm,""),value:n?wm(n[0]).replace(Sm,""):""});return b(/^[;\s]*/),o}function O(){const e=[];if(!s())return a("missing '{'");let t;for(p(e);t=h();)!1!==t&&(e.push(t),p(e));return u()?e:a("missing '}'")}function j(){let e;const t=[],n=c();for(;e=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),b(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:O()})}const v=y("import"),k=y("charset"),_=y("namespace");function y(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=c(),o=b(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function E(){if("@"===e[0])return function(){const e=c();let t=b(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=b(/^([-\w]+)\s*/),!t)return a("@keyframes missing name");const o=t[1];if(!s())return a("@keyframes missing '{'");let r,l=p();for(;r=j();)l.push(r),l=l.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:l}):a("@keyframes missing '}'")}()||function(){const e=c(),t=b(/^@media *([^{]+)/);if(!t)return;const n=wm(t[1]);if(!s())return a("@media missing '{'");const o=p().concat(d());return u()?e({type:"media",media:n,rules:o}):a("@media missing '}'")}()||function(){const e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:wm(t[1]),media:wm(t[2])})}()||function(){const e=c(),t=b(/^@supports *([^{]+)/);if(!t)return;const n=wm(t[1]);if(!s())return a("@supports missing '{'");const o=p().concat(d());return u()?e({type:"supports",supports:n,rules:o}):a("@supports missing '}'")}()||v()||k()||_()||function(){const e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=wm(t[1]),o=wm(t[2]);if(!s())return a("@document missing '{'");const r=p().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):a("@document missing '}'")}()||function(){const e=c();if(!b(/^@page */))return;const t=g()||[];if(!s())return a("@page missing '{'");let n,o=p();for(;n=h();)o.push(n),o=o.concat(p());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=c();if(!b(/^@host\s*/))return;if(!s())return a("@host missing '{'");const t=p().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}()||function(){const e=c();if(!b(/^@font-face\s*/))return;if(!s())return a("@font-face missing '{'");let t,n=p();for(;t=h();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}()}function C(){const e=c(),t=g();return t?(p(),e({type:"rule",selectors:t,declarations:O()})):a("selector missing")}return function e(t,n){const o=t&&"string"==typeof t.type,r=o?t:n;for(const n in t){const o=t[n];Array.isArray(o)?o.forEach((function(t){e(t,r)})):o&&"object"==typeof o&&e(o,r)}return o&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null}),t}(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:i}}}())}(e);return n=Cm.a.map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((o=o||{}).compress?new Nm(o):new Lm(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o};function Mm(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function Dm(e,t){return new URL(e,t).toString()}const Fm=/^(body|html|:root).*$/;var Vm=(e,t="")=>Object(u.map)(e,({css:e,baseURL:n,__experimentalNoWrapper:o=!1})=>{const r=[];return t&&!o&&r.push(((e,t=[])=>n=>"rule"===n.type?{...n,selectors:n.selectors.map(n=>t.includes(n.trim())?n:n.match(Fm)?n.replace(/^(body|html|:root)/,e):e+" "+n)}:n)(t)),n&&r.push((c=n,e=>{if("declaration"===e.type){const r=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Mm(e)&&o.push(e)}return o}(e.value).map((o=c,e=>({...e,newUrl:"url("+e.before+e.quote+Dm(e.value,o)+e.quote+e.after+")"})));return{...e,value:(t=e.value,n=r,n.forEach(e=>{t=t.replace(e.source,e.newUrl)}),t)}}var t,n,o;return e})),r.length?Rm(e,Object(d.compose)(r)):e;var c});function Hm(e){return Object(i.useCallback)(e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(".editor-styles-wrapper"),c=n.getComputedStyle(r,null).getPropertyValue("background-color");No()(c).getLuminance()>.5?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")},[e])}function zm({styles:e}){const t=Object(i.useMemo)(()=>Vm(e,".editor-styles-wrapper"),[e]);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("style",{ref:Hm(e)}),t.map((e,t)=>Object(i.createElement)("style",{key:t},e)))}var Gm=function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:c,onSelect:l=u.noop,shouldFocusBlock:a=!1}){const s=Object(f.useSelect)(n=>{const{getBlockRootClientId:o}=n(Mn);return e||o(t)||void 0},[t,e]);return Object(i.createElement)(es,{onSelect:l,rootClientId:s,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:c,shouldFocusBlock:a})};function Um(){const{clientIds:e,rootClientId:t}=Object(f.useSelect)(e=>{const{getSelectedBlockClientIds:t,getBlockRootClientId:n}=e(Mn),o=t(),[r]=o;return{clientIds:o,rootClientId:n(r)}},[]),{duplicateBlocks:n,removeBlocks:o,insertAfterBlock:r,insertBeforeBlock:c,clearSelectedBlock:l,moveBlocksUp:a,moveBlocksDown:s}=Object(f.useDispatch)(Mn);return Object(js.useShortcut)("core/block-editor/move-up",Object(i.useCallback)(n=>{n.preventDefault(),a(e,t)},[e,a]),{bindGlobal:!0,isDisabled:0===e.length}),Object(js.useShortcut)("core/block-editor/move-down",Object(i.useCallback)(n=>{n.preventDefault(),s(e,t)},[e,s]),{bindGlobal:!0,isDisabled:0===e.length}),Object(js.useShortcut)("core/block-editor/duplicate",Object(i.useCallback)(t=>{t.preventDefault(),n(e)},[e,n]),{bindGlobal:!0,isDisabled:0===e.length}),Object(js.useShortcut)("core/block-editor/remove",Object(i.useCallback)(t=>{t.preventDefault(),o(e)},[e,o]),{bindGlobal:!0,isDisabled:0===e.length}),Object(js.useShortcut)("core/block-editor/insert-after",Object(i.useCallback)(t=>{t.preventDefault(),r(Object(u.last)(e))},[e,r]),{bindGlobal:!0,isDisabled:0===e.length}),Object(js.useShortcut)("core/block-editor/insert-before",Object(i.useCallback)(t=>{t.preventDefault(),c(Object(u.first)(e))},[e,c]),{bindGlobal:!0,isDisabled:0===e.length}),Object(js.useShortcut)("core/block-editor/delete-multi-selection",Object(i.useCallback)(t=>{t.preventDefault(),o(e)},[e,o]),{isDisabled:e.length<2}),Object(js.useShortcut)("core/block-editor/unselect",Object(i.useCallback)(e=>{e.preventDefault(),l(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()},[e,l]),{isDisabled:e.length<2}),null}Um.Register=function(){const{registerShortcut:e}=Object(f.useDispatch)(js.store);return Object(i.useEffect)(()=>{e({name:"core/block-editor/duplicate",category:"block",description:Object(j.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(j.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(j.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(j.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(j.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(j.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(j.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(j.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(j.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(j.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})},[e]),null};var Wm=Um;function Km(){return Bt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in."}),null}const $m=new Set([lc.UP,lc.RIGHT,lc.DOWN,lc.LEFT,lc.ENTER,lc.BACKSPACE]);function qm(){const e=Object(f.useSelect)(e=>e(Mn).isTyping()),{stopTyping:t}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(n=>{if(!e)return;const{ownerDocument:o}=n;let r,c;function l(e){const{clientX:n,clientY:o}=e;r&&c&&(r!==n||c!==o)&&t(),r=n,c=o}return o.addEventListener("mousemove",l),()=>{o.removeEventListener("mousemove",l)}},[e,t])}function Ym(){const e=Object(f.useSelect)(e=>e(Mn).isTyping()),{startTyping:t,stopTyping:n}=Object(f.useDispatch)(Mn),o=qm(),r=Object(d.useRefEffect)(o=>{const{ownerDocument:r}=o,{defaultView:c}=r;if(e){let e;function l(t){const{target:o}=t;e=c.setTimeout(()=>{Object(di.isTextField)(o)||n()})}function i(e){const{keyCode:t}=e;t!==lc.ESCAPE&&t!==lc.TAB||n()}function a(){const e=c.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return o.addEventListener("focus",l),o.addEventListener("keydown",i),r.addEventListener("selectionchange",a),()=>{c.clearTimeout(e),o.removeEventListener("focus",l),o.removeEventListener("keydown",i),r.removeEventListener("selectionchange",a)}}function s(e){const{type:n,target:r}=e;Object(di.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&$m.has(t)}(e))&&t()}return o.addEventListener("keypress",s),o.addEventListener("keydown",s),()=>{o.removeEventListener("keypress",s),o.removeEventListener("keydown",s)}},[e,t,n]);return Object(d.useMergeRefs)([o,r])}var Xm=function({children:e}){return Object(i.createElement)("div",{ref:Ym()},e)};function Qm(){return Bt()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}const Zm=-1!==window.navigator.userAgent.indexOf("Trident"),Jm=new Set([lc.UP,lc.DOWN,lc.LEFT,lc.RIGHT]);function ep(){const e=Object(f.useSelect)(e=>e(Mn).hasSelectedBlock());return Object(d.useRefEffect)(t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,c,l;function i(){r||(r=o.requestAnimationFrame(()=>{b(),r=null}))}function a(e){c&&o.cancelAnimationFrame(c),c=o.requestAnimationFrame(()=>{s(e),c=null})}function s({keyCode:e}){if(!m())return;const r=Object(di.computeCaretRect)(o);if(!r)return;if(!l)return void(l=r);if(Jm.has(e))return void(l=r);const c=r.top-l.top;if(0===c)return;const i=Object(di.getScrollContainer)(t);if(!i)return;const a=i===n.body,s=a?o.scrollY:i.scrollTop,u=a?0:i.getBoundingClientRect().top,d=a?l.top/o.innerHeight:(l.top-u)/(o.innerHeight-u);if(0===s&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(l=r);const b=a?o.innerHeight:i.clientHeight;l.top+l.height>u+b||l.top<u?l=r:a?o.scrollBy(0,c):i.scrollTop+=c}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),b()}function b(){m()&&(l=Object(di.computeCaretRect)(o))}function m(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",i,!0),o.addEventListener("resize",i,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",s),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",i,!0),o.removeEventListener("resize",i,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",s),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(c)}},[e])}var tp=Zm?e=>e.children:function({children:e}){return Object(i.createElement)("div",{ref:ep(),className:"block-editor__typewriter"},e)};function np(e,t){const n="start"===t?"firstChild":"lastChild",o="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[o];)e=e[o];return e}function op(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r}=e(Mn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r()}}function rp(){const e=Object(i.useRef)(),{isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r}=Object(f.useSelect)(op,[]),{selectBlock:c}=Object(f.useDispatch)(Mn),l=_r(r),a=_r(Object(u.first)(n)),s=_r(Object(u.last)(n));return Object(i.useEffect)(()=>{const{ownerDocument:c}=e.current,{defaultView:i}=c;if(!o||t){if(!r||t)return;const e=i.getSelection();if(e.rangeCount&&!e.isCollapsed){const t=l.current,{startContainer:n,endContainer:o}=e.getRangeAt(0);!t||t.contains(n)&&t.contains(o)||e.removeAllRanges()}return}const{length:u}=n;if(u<2)return;e.current.focus();const d=i.getSelection(),b=c.createRange(),m=np(a.current,"start"),p=np(s.current,"end");var f;f=e.current,Array.from(f.querySelectorAll(".rich-text")).forEach(e=>{e.removeAttribute("contenteditable")}),b.setStartBefore(m),b.setEndAfter(p),d.removeAllRanges(),d.addRange(b)},[o,t,n,c,r]),e}const cp={position:"fixed"};function lp(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function ip(e,t,n,o){let r,c=di.focus.focusable.find(n);return t&&(c=Object(u.reverse)(c)),c=c.slice(c.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),Object(u.find)(c,(function(e){if(!di.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}))}function ap(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:o,getNextBlockClientId:r,getFirstMultiSelectedBlockClientId:c,getLastMultiSelectedBlockClientId:l,getSettings:i,hasMultiSelection:a}=Object(f.useSelect)(Mn),{multiSelect:s,selectBlock:u}=Object(f.useDispatch)(Mn);return Object(d.useRefEffect)(d=>{let b;function m(){b=null}function p(c){const l=e(),i=t(),a=n(),d=o(a||l),b=r(a||l),m=c?d:b;m&&(i===m?u(m):s(i||l,m))}function f(e){const t=c(),n=l(),o=e?t:n;o&&u(o)}function g(t){const{keyCode:c,target:l}=t,s=c===lc.UP,u=c===lc.DOWN,m=c===lc.LEFT,g=c===lc.RIGHT,h=s||m,O=m||g,j=s||u,v=O||j,k=t.shiftKey,_=k||t.ctrlKey||t.altKey||t.metaKey,y=j?di.isVerticalEdge:di.isHorizontalEdge,{ownerDocument:E}=d,{defaultView:C}=E;if(a())return void(v&&((k?p:f)(h),t.preventDefault()));if(j?b||(b=Object(di.computeCaretRect)(C)):b=null,t.defaultPrevented)return;if(!v)return;if(!function(e,t,n){if((t===lc.UP||t===lc.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(l,c,_))return;const S=Object(di.isRTL)(l)?!h:h,{keepCaretInsideBlock:w}=i(),B=e();if(k){const e=n(),c=o(e||B),i=r(e||B);(h&&c||!h&&i)&&function(e,t){const n=ip(e,t,d);return!(n&&(o=e,r=n,o.closest(zi)===r.closest(zi)));var o,r}(l,h)&&y(l,h)&&(p(h),t.preventDefault())}else if(j&&Object(di.isVerticalEdge)(l,h)&&!w){const e=ip(l,h,d,!0);e&&(Object(di.placeCaretAtVerticalEdge)(e,h,b),t.preventDefault())}else if(O&&C.getSelection().isCollapsed&&Object(di.isHorizontalEdge)(l,S)&&!w){const e=ip(l,S,d);Object(di.placeCaretAtHorizontalEdge)(e,h),t.preventDefault()}}return d.addEventListener("mousedown",m),d.addEventListener("keydown",g),()=>{d.removeEventListener("mousedown",m),d.removeEventListener("keydown",g)}},[])}function sp(){const e=Object(i.useRef)(),{getBlockOrder:t,getSelectedBlockClientIds:n,getBlockRootClientId:o}=Object(f.useSelect)(Mn),{multiSelect:r}=Object(f.useDispatch)(Mn),c=Object(i.useCallback)(e=>{const c=n();if(!c.length)return;if(1===c.length&&!Object(di.isEntirelySelected)(e.target))return;const[l]=c,i=o(l);let a=t(i);c.length===a.length&&(a=t(o(i)));const s=Object(u.first)(a),d=Object(u.last)(a);s!==d&&(r(s,d),e.preventDefault())},[]);return Object(js.useShortcut)("core/block-editor/select-all",c,{target:e}),e}function up({children:e}){const[t,n,o]=function(){const e=Object(i.useRef)(),t=Object(i.useRef)(),n=Object(i.useRef)(),o=Object(i.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:c}=Object(f.useSelect)(Mn),{setNavigationMode:l}=Object(f.useDispatch)(Mn),a=Object(f.useSelect)(e=>e(Mn).isNavigationMode(),[])?void 0:"0",s=Object(i.useRef)();function u(t){if(s.current)s.current=null;else if(r())e.current.focus();else if(c())o.current.focus();else{l(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";di.focus.tabbable[n](t.target).focus()}}const b=Object(i.createElement)("div",{ref:t,tabIndex:a,onFocus:u,style:cp}),m=Object(i.createElement)("div",{ref:n,tabIndex:a,onFocus:u,style:cp}),p=Object(d.useRefEffect)(e=>{function i(e){if(e.keyCode===lc.ESCAPE&&!r())return void l(!0);if(e.keyCode!==lc.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!c())return;if(lp(e.target)&&lp(di.focus.tabbable[i](e.target)))return;const a=o?t:n;s.current=!0,a.current.focus()}function a(e){o.current=e.target}return e.addEventListener("keydown",i),e.addEventListener("focusout",a),()=>{e.removeEventListener("keydown",i),e.removeEventListener("focusout",a)}},[]);return[b,Object(d.useMergeRefs)([e,p]),m]}(),r=Object(f.useSelect)(e=>e(Mn).hasMultiSelection(),[]);return Object(i.createElement)(i.Fragment,null,t,Object(i.createElement)("div",{ref:Object(d.useMergeRefs)([n,rp(),sp(),ap()]),className:"block-editor-writing-flow",tabIndex:r?"0":void 0,"aria-label":r?Object(j.__)("Multiple selected blocks"):void 0},e),o)}const dp=Object(u.overEvery)([di.isTextField,di.focus.tabbable.isTabbableIndex]);function bp(){return Object(d.useRefEffect)(e=>{function t(t){if(t.target!==e)return;const n=di.focus.focusable.find(e),o=Object(u.findLast)(n,dp);if(!o)return;const{bottom:r}=o.getBoundingClientRect();t.clientY<r||(Object(di.placeCaretAtHorizontalEdge)(o,!0),t.preventDefault())}return e.addEventListener("mousedown",t),()=>{e.addEventListener("mousedown",t)}},[])}function mp(e){e.dir=document.dir,e.body.className="editor-styles-wrapper";for(const t of document.body.classList)t.startsWith("admin-color-")&&e.body.classList.add(t)}function pp(e){return Object(i.useMemo)(()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)},[e])}var fp=Object(i.forwardRef)((function({contentRef:e,children:t,head:n,...o},r){const[c,a]=Object(i.useState)(),s=pp(window.__editorAssets.styles),u=pp(window.__editorAssets.scripts),b=hu(),m=Object(i.useCallback)(t=>{function n(){const{contentDocument:n}=t,{readyState:o,body:r,documentElement:c}=n;return("interactive"===o||"complete"===o)&&("function"==typeof e?e(r):e&&(e.current=r),mp(n),function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],c={};for(const t in e)c[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();c.clientX+=e.left,c.clientY+=e.top}const l=new r(e.type,c);!n.dispatchEvent(l)&&e.preventDefault()}const r=["keydown","keypress","dragover"];for(const t of r)e.addEventListener(t,o)}(n),mp(n),a(n),b(c),b(r),u.reduce((e,t)=>e.then(()=>async function(e,{id:t,src:n}){return new Promise((o,r)=>{const c=e.createElement("script");c.id=t,n?(c.src=n,c.onload=()=>o(),c.onerror=()=>r()):o(),e.head.appendChild(c)})}(n,t)),Promise.resolve()),!0)}t&&(n()||t.addEventListener("load",()=>{n()}))},[]);return Object(i.useEffect)(()=>{var e;c&&(e=c,Array.from(document.styleSheets).forEach(t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;o&&Array.from(o).find(({selectorText:e})=>e&&(e.includes(".editor-styles-wrapper")||e.includes(".wp-block")))&&!e.getElementById(n.id)&&(console.error(`Stylesheet ${n.id} was not properly added.\nFor blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).\nFor themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`,n),e.head.appendChild(n.cloneNode(!0)))}))},[c]),n=Object(i.createElement)(i.Fragment,null,Object(i.createElement)("style",null,"body{margin:0}"),s.map(({tagName:e,href:t,id:n,rel:o,media:r},c)=>{const l=e.toLowerCase();return Object(i.createElement)(l,{href:t,id:n,rel:o,media:r,key:c})}),n),Object(i.createElement)("iframe",Object(l.a)({},o,{ref:Object(d.useMergeRefs)([r,m]),tabIndex:"0",title:Object(j.__)("Editor canvas"),name:"editor-canvas"}),c&&Object(i.createPortal)(Object(i.createElement)(p.__experimentalStyleProvider,{document:c},t),c.body),c&&Object(i.createPortal)(n,c.head))}));const gp=Object(i.createContext)({});function hp(e,t=""){var n;const o=Object(i.useContext)(gp),{name:r}=O();t=t||r;const c=Boolean(null===(n=o[t])||void 0===n?void 0:n.has(e)),l=Object(i.useMemo)(()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(o,t,e),[o,t,e]);return[c,Object(i.useCallback)(({children:e})=>Object(i.createElement)(gp.Provider,{value:l},e),[l])]}function Op(e){if(void 0===e)e=k.colors;else{const t=e.filter(e=>e.color);0===t.length?e=k.colors:t.length<e.length&&(e=t)}return e}function jp(e){if(void 0===e)e=k.gradients;else{const t=e.filter(e=>e.gradient);0===t.length?e=k.gradients:t.length<e.length&&(e=t)}return e}},45:function(e,t){e.exports=window.wp.htmlEntities},50:function(e,t,n){e.exports=function(e,t){var n,o,r=0;function c(){var c,l,i=n,a=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(l=0;l<a;l++)if(i.args[l]!==arguments[l]){i=i.next;continue e}return i!==n&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=n,i.prev=null,n.prev=i,n=i),i.val}i=i.next}for(c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];return i={args:c,val:e.apply(null,c)},n?(n.prev=i,i.next=n):o=i,r===t.maxSize?(o=o.prev).next=null:r++,n=i,i.val}return t=t||{},c.clear=function(){n=null,o=null,r=0},c}},51:function(e,t){e.exports=window.wp.isShallowEqual},6:function(e,t){e.exports=window.wp.primitives},7:function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return o}))},8:function(e,t){e.exports=window.wp.blocks},9:function(e,t){e.exports=window.wp.compose},97:function(e,t,n){"use strict";t.__esModule=!0;var o=n(190);t.default=o.TextareaAutosize}});
|
build/block-library/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '88c0abfa497cb6f6ac51c922a9353733');
|
build/block-library/index.js
CHANGED
@@ -32,7 +32,7 @@ Object(Be.__)("Embedded content from %s can't be previewed in the editor."),g)))
|
|
32 |
// translators: %s: type of embed e.g: "YouTube", "Twitter", etc. "Embed" is used when no specific type exists
|
33 |
web:Object(Be.sprintf)(Object(Be.__)("%s URL"),b),native:b});if(!y||k||O)return Object(Te.createElement)(ze.View,C,Object(Te.createElement)(_a,{icon:d,label:x,onFocus:u,onSubmit:e=>{e&&e.preventDefault(),j(!1),i({url:h})},value:h,cannotEmbed:k,onChange:e=>v(e.target.value),fallback:()=>function(e,t){const n=Object(Te.createElement)("a",{href:e},e);t(Object(xe.createBlock)("core/paragraph",{content:Object(Te.renderToString)(n)}))}(h,l),tryAgain:()=>{f("core","getEmbedPreview",[h])}}));const{caption:S,type:B,allowResponsive:T,className:z}=E(),P=Me()(z,e.className);return Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(oa,{showEditButton:y&&!k,themeSupportsResponsive:w,blockSupportsResponsive:o,allowResponsive:T,getResponsiveHelp:Ca,toggleResponsive:()=>{const{allowResponsive:e,className:t}=a,{html:n}=y,r=!e;i({allowResponsive:r,className:pt(n,t,o&&r)})},switchBackToURLInput:()=>j(!0)}),Object(Te.createElement)(ze.View,C,Object(Te.createElement)(Ea,{preview:y,previewable:n,className:P,url:h,type:B,caption:S,onCaptionChange:e=>i({caption:e}),isSelected:c,icon:d,label:x,insertBlocksAfter:s})))},save:function({attributes:e}){const{url:t,caption:n,type:o,providerNameSlug:r}=e;if(!t)return null;const a=lt()("wp-block-embed",{["is-type-"+o]:o,["is-provider-"+r]:r,["wp-block-embed-"+r]:r});return Object(Te.createElement)("figure",Ce.useBlockProps.save({className:a}),Object(Te.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${t}\n`),!Ce.RichText.isEmpty(n)&&Object(Te.createElement)(Ce.RichText.Content,{tagName:"figcaption",value:n}))},transforms:Sa,variations:Ta,deprecated:Pa};var Ia=Object(Te.createElement)(ze.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Te.createElement)(ze.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"}));function Ha({hrefs:e,openInNewWindow:t,showDownloadButton:n,changeLinkDestinationOption:o,changeOpenInNewWindow:r,changeShowDownloadButton:a,displayPreview:c,changeDisplayPreview:l,previewHeight:i,changePreviewHeight:s}){const{href:u,textLinkHref:m,attachmentPage:d}=e;let b=[{value:u,label:Object(Be.__)("URL")}];return d&&(b=[{value:u,label:Object(Be.__)("Media file")},{value:d,label:Object(Be.__)("Attachment page")}]),Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Ce.InspectorControls,null,u.endsWith(".pdf")&&Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("PDF settings")},Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Show inline embed"),help:c?Object(Be.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!c,onChange:l}),Object(Te.createElement)(Le.RangeControl,{label:Object(Be.__)("Height in pixels"),min:Aa,max:Math.max(La,i),value:i,onChange:s})),Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("Text link settings")},Object(Te.createElement)(Le.SelectControl,{label:Object(Be.__)("Link to"),value:m,options:b,onChange:o}),Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Open in new tab"),checked:t,onChange:r})),Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("Download button settings")},Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Show download button"),checked:n,onChange:a}))))}var Ra=n(142);const Aa=200,La=2e3;function Da({text:e,disabled:t}){const{createNotice:n}=Object(Ye.useDispatch)(rt.store),o=Object(Xe.useCopyToClipboard)(e,()=>{n("info",Object(Be.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})});return Object(Te.createElement)(Le.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:o,disabled:t},Object(Be.__)("Copy URL"))}var Fa=Object(Le.withNotices)((function({attributes:e,isSelected:t,setAttributes:n,noticeUI:o,noticeOperations:r}){const{id:a,fileName:c,href:l,textLinkHref:i,textLinkTarget:s,showDownloadButton:u,downloadButtonText:m,displayPreview:d,previewHeight:b}=e,[p,g]=Object(Te.useState)(!1),{media:h,mediaUpload:v}=Object(Ye.useSelect)(e=>({media:void 0===a?void 0:e(Ee.store).getMedia(a),mediaUpload:e(Ce.store).getSettings().mediaUpload}),[a]),{toggleSelection:O}=Object(Ye.useDispatch)(Ce.store);function j(e){if(e&&e.url){g(!1);const t=e.url.endsWith(".pdf");n({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id,displayPreview:!!t||void 0,previewHeight:t?600:void 0})}}function f(e){g(!0),r.removeAllNotices(),r.createErrorNotice(e)}function y(e){n({downloadButtonText:e.replace(/<\/?a[^>]*>/g,"")})}Object(Te.useEffect)(()=>{if(Object(Ke.isBlobURL)(l)){const e=Object(Ke.getBlobByURL)(l);v({filesList:[e],onFileChange:([e])=>j(e),onError:e=>{g(!0),r.createErrorNotice(e)}}),Object(Ke.revokeBlobURL)(l)}void 0===m&&y(Object(Be._x)("Download","button label"))},[]);const _=h&&h.link,w=Object(Ce.useBlockProps)({className:Me()(Object(Ke.isBlobURL)(l)&&Object(Le.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":Object(Ke.isBlobURL)(l)})}),k=Object(Ra.a)()&&d;return!l||p?Object(Te.createElement)("div",w,Object(Te.createElement)(Ce.MediaPlaceholder,{icon:Object(Te.createElement)(Ce.BlockIcon,{icon:Ia}),labels:{title:Object(Be.__)("File"),instructions:Object(Be.__)("Upload a file or pick one from your media library.")},onSelect:j,notices:o,onError:f,accept:"*"})):Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Ha,{hrefs:{href:l,textLinkHref:i,attachmentPage:_},openInNewWindow:!!s,showDownloadButton:u,changeLinkDestinationOption:function(e){n({textLinkHref:e})},changeOpenInNewWindow:function(e){n({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){n({showDownloadButton:e})},displayPreview:d,changeDisplayPreview:function(e){n({displayPreview:e})},previewHeight:b,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),Aa);n({previewHeight:t})}}),Object(Te.createElement)(Ce.BlockControls,{group:"other"},Object(Te.createElement)(Ce.MediaReplaceFlow,{mediaId:a,mediaURL:l,accept:"*",onSelect:j,onError:f}),Object(Te.createElement)(Da,{text:l,disabled:Object(Ke.isBlobURL)(l)})),Object(Te.createElement)("div",w,k&&Object(Te.createElement)(Le.ResizableBox,{size:{height:b},minHeight:Aa,maxHeight:La,minWidth:"100%",grid:[10,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>O(!1),onResizeStop:function(e,t,o,r){O(!0);const a=parseInt(b+r.height,10);n({previewHeight:a})},showHandle:t},Object(Te.createElement)("object",{className:"wp-block-file__preview",data:l,type:"application/pdf","aria-label":Object(Be.__)("Embed of the selected PDF file.")}),!t&&Object(Te.createElement)("div",{className:"wp-block-file__preview-overlay"})),Object(Te.createElement)("div",{className:"wp-block-file__content-wrapper"},Object(Te.createElement)(Ce.RichText,{style:{display:"inline-block"},tagName:"a",value:c,placeholder:Object(Be.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>n({fileName:e}),href:i}),u&&Object(Te.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},Object(Te.createElement)(Ce.RichText,{tagName:"div","aria-label":Object(Be.__)("Download button text"),className:"wp-block-file__button",value:m,withoutInteractiveFormatting:!0,placeholder:Object(Be.__)("Add text…"),onChange:e=>y(e)})))))})),Ga={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach(e=>{const n=Object(Ke.createBlobURL)(e);t.push(Object(xe.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))}),t}},{type:"block",blocks:["core/audio"],transform:e=>Object(xe.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>Object(xe.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>Object(xe.createBlock)("core/file",{href:e.url,fileName:e.caption,textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=Object(Ye.select)(Ee.store),n=t(e);return!!n&&Object(Se.includes)(n.mime_type,"audio")},transform:e=>Object(xe.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=Object(Ye.select)(Ee.store),n=t(e);return!!n&&Object(Se.includes)(n.mime_type,"video")},transform:e=>Object(xe.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=Object(Ye.select)(Ee.store),n=t(e);return!!n&&Object(Se.includes)(n.mime_type,"image")},transform:e=>Object(xe.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]};const Ua={apiVersion:2,name:"core/file",title:"File",category:"media",description:"Add a link to a downloadable file.",keywords:["document","pdf","download"],textdomain:"default",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]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},editorStyle:"wp-block-file-editor",style:"wp-block-file"},{name:qa}=Ua,Wa={icon:Ia,transforms:Ga,edit:Fa,save:function({attributes:e}){const{href:t,fileName:n,textLinkHref:o,textLinkTarget:r,showDownloadButton:a,downloadButtonText:c,displayPreview:l,previewHeight:i}=e,s=Ce.RichText.isEmpty(n)?Object(Be.__)("PDF embed"):Object(Be.sprintf)(
|
34 |
/* translators: %s: filename. */
|
35 |
-
Object(Be.__)("Embed of %s."),n);return t&&Object(Te.createElement)("div",Ce.useBlockProps.save(),l&&Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:i+"px"},"aria-label":s})),!Ce.RichText.isEmpty(n)&&Object(Te.createElement)("a",{href:o,target:r,rel:r?"noreferrer noopener":void 0},Object(Te.createElement)(Ce.RichText.Content,{value:n})),a&&Object(Te.createElement)("a",{href:t,className:"wp-block-file__button",download:!0},Object(Te.createElement)(Ce.RichText.Content,{value:c})))}};var $a=Object(Te.createElement)(ze.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Te.createElement)(ze.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"})),Za={from:[{type:"block",blocks:["core/code"],transform:({content:e})=>Object(xe.createBlock)("core/html",{content:e})}]};const Qa={apiVersion:2,name:"core/html",title:"Custom HTML",category:"widgets",description:"Add custom HTML code and preview it as you edit.",keywords:["embed"],textdomain:"default",attributes:{content:{type:"string",source:"html"}},supports:{customClassName:!1,className:!1,html:!1},editorStyle:"wp-block-html-editor"},{name:Ja}=Qa,Ka={icon:$a,example:{attributes:{content:"<marquee>"+Object(Be.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},edit:function({attributes:e,setAttributes:t,isSelected:n}){const[o,r]=Object(Te.useState)(),a=Object(Ye.useSelect)(e=>["\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",...Object(Ce.transformStyles)(e(Ce.store).getSettings().styles)],[]);return Object(Te.createElement)("div",Object(Ce.useBlockProps)({className:"block-library-html__edit"}),Object(Te.createElement)(Ce.BlockControls,null,Object(Te.createElement)(Le.ToolbarGroup,null,Object(Te.createElement)(Le.ToolbarButton,{className:"components-tab-button",isPressed:!o,onClick:function(){r(!1)}},Object(Te.createElement)("span",null,"HTML")),Object(Te.createElement)(Le.ToolbarButton,{className:"components-tab-button",isPressed:o,onClick:function(){r(!0)}},Object(Te.createElement)("span",null,Object(Be.__)("Preview"))))),Object(Te.createElement)(Le.Disabled.Consumer,null,r=>o||r?Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Le.SandBox,{html:e.content,styles:a}),!n&&Object(Te.createElement)("div",{className:"block-library-html__preview-overlay"})):Object(Te.createElement)(Ce.PlainText,{value:e.content,onChange:e=>t({content:e}),placeholder:Object(Be.__)("Write HTML…"),"aria-label":Object(Be.__)("HTML")})))},save:function({attributes:e}){return Object(Te.createElement)(Te.RawHTML,null,e.content)},transforms:Za};var Ya=Object(Te.createElement)(ze.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Te.createElement)(ze.Path,{d:"M3 18h8V6H3v12zM14 7.5V9h7V7.5h-7zm0 5.3h7v-1.5h-7v1.5zm0 3.7h7V15h-7v1.5z"})),Xa=Object(Te.createElement)(Le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Te.createElement)(Le.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(Te.createElement)(Le.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(Te.createElement)(Le.Path,{d:"M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"}));const ec=["image","video"];function tc(e,t){return e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{}}const nc=Object(Te.forwardRef)(({isSelected:e,isStackedOnMobile:t,...n},o)=>{const r=Object(Xe.useViewportMatch)("small","<");return Object(Te.createElement)(Le.ResizableBox,Object(Ae.a)({ref:o,showHandle:e&&(!r||!t)},n))});function oc({mediaId:e,mediaUrl:t,onSelectMedia:n}){return Object(Te.createElement)(Ce.BlockControls,{group:"other"},Object(Te.createElement)(Ce.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:ec,accept:"image/*,video/*",onSelect:n}))}function rc({className:e,noticeOperations:t,noticeUI:n,onSelectMedia:o}){return Object(Te.createElement)(Ce.MediaPlaceholder,{icon:Object(Te.createElement)(Ce.BlockIcon,{icon:Xa}),labels:{title:Object(Be.__)("Media area")},className:e,onSelect:o,accept:"image/*,video/*",allowedTypes:ec,notices:n,onError:e=>{t.removeAllNotices(),t.createErrorNotice(e)}})}var ac=Object(Le.withNotices)(Object(Te.forwardRef)((function(e,t){const{className:n,commitWidthChange:o,focalPoint:r,imageFill:a,isSelected:c,isStackedOnMobile:l,mediaAlt:i,mediaId:s,mediaPosition:u,mediaType:m,mediaUrl:d,mediaWidth:b,onSelectMedia:p,onWidthChange:g}=e,{toggleSelection:h}=Object(Ye.useDispatch)(Ce.store);if(m&&d){const e=()=>{h(!1)},v=(e,t,n)=>{g(parseInt(n.style.width))},O=(e,t,n)=>{h(!0),o(parseInt(n.style.width))},j={right:"left"===u,left:"right"===u},f="image"===m&&a?tc(d,r):{},y={image:()=>Object(Te.createElement)("img",{src:d,alt:i}),video:()=>Object(Te.createElement)("video",{controls:!0,src:d})};return Object(Te.createElement)(nc,{as:"figure",className:Me()(n,"editor-media-container__resizer"),style:f,size:{width:b+"%"},minWidth:"10%",maxWidth:"100%",enable:j,onResizeStart:e,onResize:v,onResizeStop:O,axis:"x",isSelected:c,isStackedOnMobile:l,ref:t},Object(Te.createElement)(oc,{onSelectMedia:p,mediaUrl:d,mediaId:s}),(y[m]||Se.noop)())}return Object(Te.createElement)(rc,e)})));const cc=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}};return{...Object(Se.omit)(e,["customBackgroundColor"]),style:t}},lc={align:{type:"string",default:"wide"},backgroundColor:{type:"string"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!0}};var ic=[{attributes:{...lc,customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},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"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:cc,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:o,mediaAlt:r,mediaPosition:a,mediaType:c,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:u,imageFill:m,focalPoint:d,linkClass:b,href:p,linkTarget:g,rel:h}=e,v=Object(Se.isEmpty)(h)?void 0:h;let O=Object(Te.createElement)("img",{src:l,alt:r,className:s&&"image"===c?"wp-image-"+s:null});p&&(O=Object(Te.createElement)("a",{className:b,href:p,target:g,rel:v},O));const j={image:()=>O,video:()=>Object(Te.createElement)("video",{controls:!0,src:l})},f=Object(Ce.getColorClassName)("background-color",t),y=Me()({"has-media-on-the-right":"right"===a,"has-background":f||n,[f]:f,"is-stacked-on-mobile":o,["is-vertically-aligned-"+u]:u,"is-image-fill":m}),_=m?tc(l,d):{};let w;50!==i&&(w="right"===a?`auto ${i}%`:i+"% auto");const k={backgroundColor:f?void 0:n,gridTemplateColumns:w};return Object(Te.createElement)("div",{className:y,style:k},Object(Te.createElement)("figure",{className:"wp-block-media-text__media",style:_},(j[c]||Se.noop)()),Object(Te.createElement)("div",{className:"wp-block-media-text__content"},Object(Te.createElement)(Ce.InnerBlocks.Content,null)))}},{attributes:{...lc,customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:cc,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:o,mediaAlt:r,mediaPosition:a,mediaType:c,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:u,imageFill:m,focalPoint:d}=e,b={image:()=>Object(Te.createElement)("img",{src:l,alt:r,className:s&&"image"===c?"wp-image-"+s:null}),video:()=>Object(Te.createElement)("video",{controls:!0,src:l})},p=Object(Ce.getColorClassName)("background-color",t),g=Me()({"has-media-on-the-right":"right"===a,[p]:p,"is-stacked-on-mobile":o,["is-vertically-aligned-"+u]:u,"is-image-fill":m}),h=m?tc(l,d):{};let v;50!==i&&(v="right"===a?`auto ${i}%`:i+"% auto");const O={backgroundColor:p?void 0:n,gridTemplateColumns:v};return Object(Te.createElement)("div",{className:g,style:O},Object(Te.createElement)("figure",{className:"wp-block-media-text__media",style:h},(b[c]||Se.noop)()),Object(Te.createElement)("div",{className:"wp-block-media-text__content"},Object(Te.createElement)(Ce.InnerBlocks.Content,null)))}},{attributes:{...lc,customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:o,mediaAlt:r,mediaPosition:a,mediaType:c,mediaUrl:l,mediaWidth:i}=e,s={image:()=>Object(Te.createElement)("img",{src:l,alt:r}),video:()=>Object(Te.createElement)("video",{controls:!0,src:l})},u=Object(Ce.getColorClassName)("background-color",t),m=Me()({"has-media-on-the-right":"right"===a,[u]:u,"is-stacked-on-mobile":o});let d;50!==i&&(d="right"===a?`auto ${i}%`:i+"% auto");const b={backgroundColor:u?void 0:n,gridTemplateColumns:d};return Object(Te.createElement)("div",{className:m,style:b},Object(Te.createElement)("figure",{className:"wp-block-media-text__media"},(s[c]||Se.noop)()),Object(Te.createElement)("div",{className:"wp-block-media-text__content"},Object(Te.createElement)(Ce.InnerBlocks.Content,null)))}}],sc=Object(Te.createElement)(ze.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Te.createElement)(ze.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})),uc=Object(Te.createElement)(ze.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Te.createElement)(ze.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"}));const mc=[["core/paragraph",{fontSize:"large",placeholder:Object(Be._x)("Content…","content placeholder")}]],dc=e=>Math.max(15,Math.min(e,85));function bc(e,t){var n,o,r;return null==e||null===(n=e.media_details)||void 0===n||null===(o=n.sizes)||void 0===o||null===(r=o[t])||void 0===r?void 0:r.source_url}var pc={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:n,anchor:o})=>Object(xe.createBlock)("core/media-text",{mediaAlt:e,mediaId:n,mediaUrl:t,mediaType:"image",anchor:o})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:n})=>Object(xe.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:n})}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:n,anchor:o})=>Object(xe.createBlock)("core/image",{alt:e,id:t,url:n,anchor:o})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:n})=>Object(xe.createBlock)("core/video",{id:e,src:t,anchor:n})}]};const gc={apiVersion:2,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"wide"},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"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},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"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"},{name:hc}=gc,vc={icon:Ya,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(Be.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:Object(Be.__)("— Kobayashi Issa (一茶)")}}]},transforms:pc,edit:function({attributes:e,isSelected:t,setAttributes:n}){const{focalPoint:o,href:r,imageFill:a,isStackedOnMobile:c,linkClass:l,linkDestination:i,linkTarget:s,mediaAlt:u,mediaId:m,mediaPosition:d,mediaType:b,mediaUrl:p,mediaWidth:g,rel:h,verticalAlignment:v}=e,O=e.mediaSizeSlug||"full",j=Object(Ye.useSelect)(e=>m&&t?e(Ee.store).getMedia(m):null,[t,m]),f=Object(Te.useRef)(),y=e=>{const{style:t}=f.current.resizable,{x:n,y:o}=e;t.backgroundPosition=`${100*n}% ${100*o}%`},[_,w]=Object(Te.useState)(null),k=function({attributes:{linkDestination:e,href:t},setAttributes:n}){return o=>{let r,a;var c,l,i,s,u;r=o.media_type?"image"===o.media_type?"image":"video":o.type,"image"===r&&(a=(null===(c=o.sizes)||void 0===c||null===(l=c.large)||void 0===l?void 0:l.url)||(null===(i=o.media_details)||void 0===i||null===(s=i.sizes)||void 0===s||null===(u=s.large)||void 0===u?void 0:u.source_url));let m=t;"media"===e&&(m=o.url),"attachment"===e&&(m=o.link),n({mediaAlt:o.alt,mediaId:o.id,mediaType:r,mediaUrl:a||o.url,mediaLink:o.link||void 0,href:m,focalPoint:void 0})}}({attributes:e,setAttributes:n}),E=e=>{n({mediaWidth:dc(e)}),w(dc(e))},C=Me()({"has-media-on-the-right":"right"===d,"is-selected":t,"is-stacked-on-mobile":c,["is-vertically-aligned-"+v]:v,"is-image-fill":a}),x=(_||g)+"%",S="right"===d?"1fr "+x:x+" 1fr",B={gridTemplateColumns:S,msGridColumns:S},T=Object(Ye.useSelect)(e=>{const t=e(Ce.store).getSettings();return null==t?void 0:t.imageSizes}),z=Object(Se.map)(Object(Se.filter)(T,({slug:e})=>bc(j,e)),({name:e,slug:t})=>({value:t,label:e})),P=Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("Media & Text settings")},Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Stack on mobile"),checked:c,onChange:()=>n({isStackedOnMobile:!c})}),"image"===b&&Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Crop image to fill entire column"),checked:a,onChange:()=>n({imageFill:!a})}),a&&p&&"image"===b&&Object(Te.createElement)(Le.FocalPointPicker,{label:Object(Be.__)("Focal point picker"),url:p,value:o,onChange:e=>n({focalPoint:e}),onDragStart:y,onDrag:y}),"image"===b&&Object(Te.createElement)(Le.TextareaControl,{label:Object(Be.__)("Alt text (alternative text)"),value:u,onChange:e=>{n({mediaAlt:e})},help:Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Le.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},Object(Be.__)("Describe the purpose of the image")),Object(Be.__)("Leave empty if the image is purely decorative."))}),"image"===b&&Object(Te.createElement)(Ce.__experimentalImageSizeControl,{onChangeImage:e=>{const t=bc(j,e);if(!t)return null;n({mediaUrl:t,mediaSizeSlug:e})},slug:O,imageSizeOptions:z,isResizable:!1}),p&&Object(Te.createElement)(Le.RangeControl,{label:Object(Be.__)("Media width"),value:_||g,onChange:E,min:15,max:85})),N=Object(Ce.useBlockProps)({className:C,style:B}),M=Object(Ce.__experimentalUseInnerBlocksProps)({className:"wp-block-media-text__content"},{template:mc});return Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Ce.InspectorControls,null,P),Object(Te.createElement)(Ce.BlockControls,{group:"block"},Object(Te.createElement)(Ce.BlockVerticalAlignmentControl,{onChange:e=>{n({verticalAlignment:e})},value:v}),Object(Te.createElement)(Le.ToolbarButton,{icon:sc,title:Object(Be.__)("Show media on left"),isActive:"left"===d,onClick:()=>n({mediaPosition:"left"})}),Object(Te.createElement)(Le.ToolbarButton,{icon:uc,title:Object(Be.__)("Show media on right"),isActive:"right"===d,onClick:()=>n({mediaPosition:"right"})}),"image"===b&&Object(Te.createElement)(Ce.__experimentalImageURLInputUI,{url:r||"",onChangeUrl:e=>{n(e)},linkDestination:i,mediaType:b,mediaUrl:j&&j.source_url,mediaLink:j&&j.link,linkTarget:s,linkClass:l,rel:h})),Object(Te.createElement)("div",N,Object(Te.createElement)(ac,{className:"wp-block-media-text__media",onSelectMedia:k,onWidthChange:e=>{w(dc(e))},commitWidthChange:E,ref:f,focalPoint:o,imageFill:a,isSelected:t,isStackedOnMobile:c,mediaAlt:u,mediaId:m,mediaPosition:d,mediaType:b,mediaUrl:p,mediaWidth:g}),Object(Te.createElement)("div",M)))},save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:o,mediaType:r,mediaUrl:a,mediaWidth:c,mediaId:l,verticalAlignment:i,imageFill:s,focalPoint:u,linkClass:m,href:d,linkTarget:b,rel:p}=e,g=e.mediaSizeSlug||"full",h=Object(Se.isEmpty)(p)?void 0:p,v=Me()({["wp-image-"+l]:l&&"image"===r,["size-"+g]:l&&"image"===r});let O=Object(Te.createElement)("img",{src:a,alt:n,className:v||null});d&&(O=Object(Te.createElement)("a",{className:m,href:d,target:b,rel:h},O));const j={image:()=>O,video:()=>Object(Te.createElement)("video",{controls:!0,src:a})},f=Me()({"has-media-on-the-right":"right"===o,"is-stacked-on-mobile":t,["is-vertically-aligned-"+i]:i,"is-image-fill":s}),y=s?tc(a,u):{};let _;50!==c&&(_="right"===o?`auto ${c}%`:c+"% auto");const w={gridTemplateColumns:_};return Object(Te.createElement)("div",Ce.useBlockProps.save({className:f,style:w}),Object(Te.createElement)("figure",{className:"wp-block-media-text__media",style:y},(j[r]||Se.noop)()),Object(Te.createElement)("div",{className:"wp-block-media-text__content"},Object(Te.createElement)(Ce.InnerBlocks.Content,null)))},deprecated:ic};var Oc=Object(Te.createElement)(ze.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Te.createElement)(ze.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),jc=n(182);function fc({clientId:e,__experimentalFeatures:t}){const{blocks:n,selectedBlockClientId:o}=Object(Ye.useSelect)(t=>{const{getSelectedBlockClientId:n,__unstableGetClientIdsTree:o}=t(Ce.store);return{blocks:o(e),selectedBlockClientId:n()}},[e]),{selectBlock:r}=Object(Ye.useDispatch)(Ce.store);return Object(Te.createElement)(Ce.__experimentalBlockNavigationTree,{blocks:n,selectedBlockClientIds:[o],selectBlock:r,__experimentalFeatures:t,showNestedBlocks:!0,showAppender:!0,showBlockMovers:!0})}var yc=n(117),_c=n(189);function wc(){const{menus:e,isResolvingMenus:t,hasResolvedMenus:n}=Object(Ye.useSelect)(e=>{const{getMenus:t,isResolving:n,hasFinishedResolution:o}=e(Ee.store),r=[{per_page:-1}];return{menus:t(...r),isResolvingMenus:n("getMenus",r),hasResolvedMenus:o("getMenus",r)}},[]);return{menus:e,isResolvingMenus:t,hasResolvedMenus:n,hasMenus:!(!n||null==e||!e.length)}}function kc(e){const{menuItems:t,hasResolvedMenuItems:n}=Object(Ye.useSelect)(t=>{const{getMenuItems:n,hasFinishedResolution:o}=t(Ee.store),r=void 0!==e,a=r?[{menus:e,per_page:-1}]:void 0;return{menuItems:r?n(...a):void 0,hasResolvedMenuItems:!!r&&o("getMenuItems",a)}},[e]);return{menuItems:t,hasResolvedMenuItems:n}}function Ec(){const{pages:e,isResolvingPages:t,hasResolvedPages:n}=Object(Ye.useSelect)(e=>{const{getEntityRecords:t,isResolving:n,hasFinishedResolution:o}=e(Ee.store),r=["postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1}];return{pages:t(...r)||null,isResolvingPages:n("getEntityRecords",r),hasResolvedPages:o("getEntityRecords",r)}},[]);return{pages:e,isResolvingPages:t,hasResolvedPages:n,hasPages:!(!n||null==e||!e.length)}}var Cc=()=>Object(Te.createElement)("ul",{className:"wp-block-navigation-placeholder__preview wp-block-navigation__container"},Object(Te.createElement)("li",{className:"wp-block-navigation-link"},""),Object(Te.createElement)("li",{className:"wp-block-navigation-link"},""),Object(Te.createElement)("li",{className:"wp-block-navigation-link"},""),Object(Te.createElement)(yc.a,{icon:Gt.a}));var xc=Object(Te.forwardRef)((function({onCreate:e},t){const[n,o]=Object(Te.useState)(),[r,a]=Object(Te.useState)(!1),{isResolvingPages:c,menus:l,isResolvingMenus:i,menuItems:s,hasResolvedMenuItems:u,hasPages:m,hasMenus:d}=(b=n,{...Ec(),...wc(),...kc(b)});var b;const p=c||i,g=Object(Te.useCallback)(()=>{const{innerBlocks:t}=function(e){return e?function e(t){let n={};return{innerBlocks:Object(Se.sortBy)(t,"menu_order").map(t=>{var o;if("block"===t.type){const[e]=Object(xe.parse)(t.content.raw);return e||Object(xe.createBlock)("core/freeform",{content:t.content})}const r=function({title:e,xfn:t,classes:n,attr_title:o,object:r,object_id:a,description:c,url:l,type:i,target:s}){var u;return r&&"post_tag"===r&&(r="tag"),{label:(null==e?void 0:e.rendered)||"",...(null===(u=r)||void 0===u?void 0:u.length)&&{type:r},kind:(null==i?void 0:i.replace("_","-"))||"custom",url:l||"",...(null==t?void 0:t.length)&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...(null==n?void 0:n.length)&&n.join(" ").trim()&&{className:n.join(" ").trim()},...(null==o?void 0:o.length)&&{title:o},...a&&"custom"!==r&&{id:a},...(null==c?void 0:c.length)&&{description:c},..."_blank"===s&&{opensInNewTab:!0}}}(t),{innerBlocks:a=[],mapping:c={}}=null!==(o=t.children)&&void 0!==o&&o.length?e(t.children):{};n={...n,...c};const l=Object(xe.createBlock)("core/navigation-link",r,a);return n[t.id]=l.clientId,l}),mapping:n}}(function(e,t="id",n="parent"){const o=Object.create(null),r=[];for(const n of e)o[n[t]]={...n,children:[]};for(const a of e)a[n]?o[a[n]].children.push(o[a[t]]):r.push(o[a[t]]);return r}(e)):null}(s);e(t,!0)});return Object(Te.useEffect)(()=>{r&&u&&(g(),a(!1))},[r,u]),Object(Te.createElement)(Le.Placeholder,{className:"wp-block-navigation-placeholder"},Object(Te.createElement)(Cc,null),Object(Te.createElement)("div",{className:"wp-block-navigation-placeholder__controls"},p&&Object(Te.createElement)("div",{ref:t},Object(Te.createElement)(Le.Spinner,null)),!p&&Object(Te.createElement)("div",{ref:t,className:"wp-block-navigation-placeholder__actions"},Object(Te.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},Object(Te.createElement)(yc.a,{icon:Oc})," ",Object(Be.__)("Navigation")),d?Object(Te.createElement)(Le.DropdownMenu,{text:Object(Be.__)("Add existing menu"),icon:_c.a,toggleProps:{isPrimary:!0,className:"wp-block-navigation-placeholder__actions__dropdown"}},({onClose:e})=>Object(Te.createElement)(Le.MenuGroup,null,l.map(t=>Object(Te.createElement)(Le.MenuItem,{onClick:()=>{o(t.id),u?g():a(!0)},onClose:e,key:t.id},t.name)))):void 0,m?Object(Te.createElement)(Le.Button,{isPrimary:!d,isTertiary:!!d,onClick:()=>{const t=[Object(xe.createBlock)("core/page-list")];e(t,!0)}},Object(Be.__)("Add all pages")):void 0,Object(Te.createElement)(Le.Button,{isTertiary:!0,onClick:()=>{e([])}},Object(Be.__)("Start empty")))))})),Sc=n(118);function Bc({children:e,id:t,isOpen:n,isResponsive:o,onToggle:r}){if(!o)return e;const a=Me()("wp-block-navigation__responsive-container",{"is-menu-open":n}),c=t+"-modal";return Object(Te.createElement)(Te.Fragment,null,!n&&Object(Te.createElement)(Le.Button,{"aria-haspopup":"true","aria-expanded":n,"aria-label":Object(Be.__)("Open menu"),className:"wp-block-navigation__responsive-container-open",onClick:()=>r(!0)},Object(Te.createElement)(ze.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false"},Object(Te.createElement)(ze.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),Object(Te.createElement)(ze.Rect,{x:"4",y:"15",width:"16",height:"1.5"}))),Object(Te.createElement)("div",{className:a,id:c,"aria-hidden":!n},Object(Te.createElement)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1"},Object(Te.createElement)("div",{className:"wp-block-navigation__responsive-dialog",role:"dialog","aria-modal":"true","aria-labelledby":c+"-title"},Object(Te.createElement)(Le.Button,{className:"wp-block-navigation__responsive-container-close","aria-label":Object(Be.__)("Close menu"),onClick:()=>r(!1)},Object(Te.createElement)(yc.a,{icon:Sc.a})),Object(Te.createElement)("div",{className:"wp-block-navigation__responsive-container-content",id:c+"-content"},e)))))}const Tc=["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link"],zc={type:"default",alignments:[]};var Pc=Object(Xe.compose)([Object(Ye.withSelect)((e,{clientId:t})=>{var n;const o=e(Ce.store).getBlocks(t),{getClientIdsOfDescendants:r,hasSelectedInnerBlock:a,getSelectedBlockClientId:c}=e(Ce.store);return{isImmediateParentOfSelectedBlock:a(t,!1),selectedBlockHasDescendants:!(null===(n=r([c()]))||void 0===n||!n.length),hasExistingNavItems:!!o.length}}),Object(Ye.withDispatch)((e,{clientId:t})=>({updateInnerBlocks(n){if(0===(null==n?void 0:n.length))return!1;e(Ce.store).replaceInnerBlocks(t,n,!0)}}))])((function({selectedBlockHasDescendants:e,attributes:t,setAttributes:n,clientId:o,hasExistingNavItems:r,isImmediateParentOfSelectedBlock:a,isSelected:c,updateInnerBlocks:l,className:i,hasSubmenuIndicatorSetting:s=!0,hasItemJustificationControls:u=!0}){const[m,d]=Object(Te.useState)(!r),[b,p]=Object(Te.useState)(!1),{selectBlock:g}=Object(Ye.useDispatch)(Ce.store),h=Object(Ce.useBlockProps)({className:Me()(i,{["items-justified-"+t.itemsJustification]:t.itemsJustification,"is-vertical":"vertical"===t.orientation,"is-responsive":t.isResponsive})}),{navigatorToolbarButton:v,navigatorModal:O}=function(e,t){const[n,o]=Object(Te.useState)(!1);return{navigatorToolbarButton:Object(Te.createElement)(Le.ToolbarButton,{className:"components-toolbar__control",label:Object(Be.__)("Open block navigation"),onClick:()=>o(!0),icon:jc.a}),navigatorModal:n&&Object(Te.createElement)(Le.Modal,{title:Object(Be.__)("Navigation"),closeLabel:Object(Be.__)("Close"),onRequestClose:()=>{o(!1)}},Object(Te.createElement)(fc,{clientId:e,__experimentalFeatures:void 0}))}}(o),j=Object(Ce.__experimentalUseInnerBlocksProps)({className:"wp-block-navigation__container"},{allowedBlocks:Tc,orientation:t.orientation||"horizontal",renderAppender:!!(a&&!e||c)&&Ce.InnerBlocks.DefaultAppender,__experimentalAppenderTagName:"li",__experimentalCaptureToolbars:!0,templateLock:!1,__experimentalLayout:zc,placeholder:Object(Te.createElement)(Cc,null)});if(m)return Object(Te.createElement)("div",h,Object(Te.createElement)(xc,{onCreate:(e,t)=>{d(!1),l(e),t&&g(o)}}));const f="vertical"===t.orientation?["left","center","right"]:["left","center","right","space-between"];return Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Ce.BlockControls,null,u&&Object(Te.createElement)(Ce.JustifyToolbar,{value:t.itemsJustification,allowedControls:f,onChange:e=>n({itemsJustification:e}),popoverProps:{position:"bottom right",isAlternate:!0}}),Object(Te.createElement)(Le.ToolbarGroup,null,v)),O,Object(Te.createElement)(Ce.InspectorControls,null,s&&Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("Display settings")},Object(Te.createElement)(Le.ToggleControl,{checked:t.showSubmenuIcon,onChange:e=>{n({showSubmenuIcon:e})},label:Object(Be.__)("Show submenu indicator icons")}),Object(Te.createElement)(Le.ToggleControl,{checked:t.isResponsive,onChange:e=>{n({isResponsive:e})},label:Object(Be.__)("Enable responsive menu")}))),Object(Te.createElement)("nav",h,Object(Te.createElement)(Bc,{id:o,onToggle:p,isOpen:b,isResponsive:t.isResponsive},Object(Te.createElement)("ul",j))))}));const Nc={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"};var Mc=[{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>Object(Te.createElement)(Ce.InnerBlocks.Content,null),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in Nc){const n=e.style.typography[t];if(n&&n.startsWith(Nc[t]))return!0}return!1},migrate:e=>({...e,style:{...e.style,typography:Object(Se.mapValues)(e.style.typography,(e,t)=>{const n=Nc[t];if(n&&e.startsWith(n)){const o=e.slice(n.length);return"textDecoration"===t&&"strikethrough"===o?"line-through":o}return e})}})},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:e=>({...Object(Se.omit)(e,["rgbTextColor","rgbBackgroundColor"]),customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}),save:()=>Object(Te.createElement)(Ce.InnerBlocks.Content,null)}],Vc=[{name:"horizontal",isDefault:!0,title:Object(Be.__)("Navigation (horizontal)"),description:Object(Be.__)("Links shown in a row."),attributes:{orientation:"horizontal"},scope:["inserter","transform"]},{name:"vertical",title:Object(Be.__)("Navigation (vertical)"),description:Object(Be.__)("Links shown in a column."),attributes:{orientation:"vertical"},scope:["inserter","transform"]}];const Ic={apiVersion:2,name:"core/navigation",title:"Navigation",category:"design",description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},isResponsive:{type:"boolean",default:!1}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",style:"style",orientation:"orientation"},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"},{name:Hc}=Ic,Rc={icon:Oc,variations:Vc,example:{innerBlocks:[{name:"core/navigation-link",attributes:{
|
36 |
// translators: 'Home' as in a website's home page.
|
37 |
label:Object(Be.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{
|
38 |
// translators: 'About' as in a website's about page.
|
32 |
// translators: %s: type of embed e.g: "YouTube", "Twitter", etc. "Embed" is used when no specific type exists
|
33 |
web:Object(Be.sprintf)(Object(Be.__)("%s URL"),b),native:b});if(!y||k||O)return Object(Te.createElement)(ze.View,C,Object(Te.createElement)(_a,{icon:d,label:x,onFocus:u,onSubmit:e=>{e&&e.preventDefault(),j(!1),i({url:h})},value:h,cannotEmbed:k,onChange:e=>v(e.target.value),fallback:()=>function(e,t){const n=Object(Te.createElement)("a",{href:e},e);t(Object(xe.createBlock)("core/paragraph",{content:Object(Te.renderToString)(n)}))}(h,l),tryAgain:()=>{f("core","getEmbedPreview",[h])}}));const{caption:S,type:B,allowResponsive:T,className:z}=E(),P=Me()(z,e.className);return Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(oa,{showEditButton:y&&!k,themeSupportsResponsive:w,blockSupportsResponsive:o,allowResponsive:T,getResponsiveHelp:Ca,toggleResponsive:()=>{const{allowResponsive:e,className:t}=a,{html:n}=y,r=!e;i({allowResponsive:r,className:pt(n,t,o&&r)})},switchBackToURLInput:()=>j(!0)}),Object(Te.createElement)(ze.View,C,Object(Te.createElement)(Ea,{preview:y,previewable:n,className:P,url:h,type:B,caption:S,onCaptionChange:e=>i({caption:e}),isSelected:c,icon:d,label:x,insertBlocksAfter:s})))},save:function({attributes:e}){const{url:t,caption:n,type:o,providerNameSlug:r}=e;if(!t)return null;const a=lt()("wp-block-embed",{["is-type-"+o]:o,["is-provider-"+r]:r,["wp-block-embed-"+r]:r});return Object(Te.createElement)("figure",Ce.useBlockProps.save({className:a}),Object(Te.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${t}\n`),!Ce.RichText.isEmpty(n)&&Object(Te.createElement)(Ce.RichText.Content,{tagName:"figcaption",value:n}))},transforms:Sa,variations:Ta,deprecated:Pa};var Ia=Object(Te.createElement)(ze.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Te.createElement)(ze.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"}));function Ha({hrefs:e,openInNewWindow:t,showDownloadButton:n,changeLinkDestinationOption:o,changeOpenInNewWindow:r,changeShowDownloadButton:a,displayPreview:c,changeDisplayPreview:l,previewHeight:i,changePreviewHeight:s}){const{href:u,textLinkHref:m,attachmentPage:d}=e;let b=[{value:u,label:Object(Be.__)("URL")}];return d&&(b=[{value:u,label:Object(Be.__)("Media file")},{value:d,label:Object(Be.__)("Attachment page")}]),Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Ce.InspectorControls,null,u.endsWith(".pdf")&&Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("PDF settings")},Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Show inline embed"),help:c?Object(Be.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!c,onChange:l}),Object(Te.createElement)(Le.RangeControl,{label:Object(Be.__)("Height in pixels"),min:Aa,max:Math.max(La,i),value:i,onChange:s})),Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("Text link settings")},Object(Te.createElement)(Le.SelectControl,{label:Object(Be.__)("Link to"),value:m,options:b,onChange:o}),Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Open in new tab"),checked:t,onChange:r})),Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("Download button settings")},Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Show download button"),checked:n,onChange:a}))))}var Ra=n(142);const Aa=200,La=2e3;function Da({text:e,disabled:t}){const{createNotice:n}=Object(Ye.useDispatch)(rt.store),o=Object(Xe.useCopyToClipboard)(e,()=>{n("info",Object(Be.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})});return Object(Te.createElement)(Le.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:o,disabled:t},Object(Be.__)("Copy URL"))}var Fa=Object(Le.withNotices)((function({attributes:e,isSelected:t,setAttributes:n,noticeUI:o,noticeOperations:r}){const{id:a,fileName:c,href:l,textLinkHref:i,textLinkTarget:s,showDownloadButton:u,downloadButtonText:m,displayPreview:d,previewHeight:b}=e,[p,g]=Object(Te.useState)(!1),{media:h,mediaUpload:v}=Object(Ye.useSelect)(e=>({media:void 0===a?void 0:e(Ee.store).getMedia(a),mediaUpload:e(Ce.store).getSettings().mediaUpload}),[a]),{toggleSelection:O}=Object(Ye.useDispatch)(Ce.store);function j(e){if(e&&e.url){g(!1);const t=e.url.endsWith(".pdf");n({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id,displayPreview:!!t||void 0,previewHeight:t?600:void 0})}}function f(e){g(!0),r.removeAllNotices(),r.createErrorNotice(e)}function y(e){n({downloadButtonText:e.replace(/<\/?a[^>]*>/g,"")})}Object(Te.useEffect)(()=>{if(Object(Ke.isBlobURL)(l)){const e=Object(Ke.getBlobByURL)(l);v({filesList:[e],onFileChange:([e])=>j(e),onError:e=>{g(!0),r.createErrorNotice(e)}}),Object(Ke.revokeBlobURL)(l)}void 0===m&&y(Object(Be._x)("Download","button label"))},[]);const _=h&&h.link,w=Object(Ce.useBlockProps)({className:Me()(Object(Ke.isBlobURL)(l)&&Object(Le.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":Object(Ke.isBlobURL)(l)})}),k=Object(Ra.a)()&&d;return!l||p?Object(Te.createElement)("div",w,Object(Te.createElement)(Ce.MediaPlaceholder,{icon:Object(Te.createElement)(Ce.BlockIcon,{icon:Ia}),labels:{title:Object(Be.__)("File"),instructions:Object(Be.__)("Upload a file or pick one from your media library.")},onSelect:j,notices:o,onError:f,accept:"*"})):Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Ha,{hrefs:{href:l,textLinkHref:i,attachmentPage:_},openInNewWindow:!!s,showDownloadButton:u,changeLinkDestinationOption:function(e){n({textLinkHref:e})},changeOpenInNewWindow:function(e){n({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){n({showDownloadButton:e})},displayPreview:d,changeDisplayPreview:function(e){n({displayPreview:e})},previewHeight:b,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),Aa);n({previewHeight:t})}}),Object(Te.createElement)(Ce.BlockControls,{group:"other"},Object(Te.createElement)(Ce.MediaReplaceFlow,{mediaId:a,mediaURL:l,accept:"*",onSelect:j,onError:f}),Object(Te.createElement)(Da,{text:l,disabled:Object(Ke.isBlobURL)(l)})),Object(Te.createElement)("div",w,k&&Object(Te.createElement)(Le.ResizableBox,{size:{height:b},minHeight:Aa,maxHeight:La,minWidth:"100%",grid:[10,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>O(!1),onResizeStop:function(e,t,o,r){O(!0);const a=parseInt(b+r.height,10);n({previewHeight:a})},showHandle:t},Object(Te.createElement)("object",{className:"wp-block-file__preview",data:l,type:"application/pdf","aria-label":Object(Be.__)("Embed of the selected PDF file.")}),!t&&Object(Te.createElement)("div",{className:"wp-block-file__preview-overlay"})),Object(Te.createElement)("div",{className:"wp-block-file__content-wrapper"},Object(Te.createElement)(Ce.RichText,{style:{display:"inline-block"},tagName:"a",value:c,placeholder:Object(Be.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>n({fileName:e}),href:i}),u&&Object(Te.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},Object(Te.createElement)(Ce.RichText,{tagName:"div","aria-label":Object(Be.__)("Download button text"),className:"wp-block-file__button",value:m,withoutInteractiveFormatting:!0,placeholder:Object(Be.__)("Add text…"),onChange:e=>y(e)})))))})),Ga={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach(e=>{const n=Object(Ke.createBlobURL)(e);t.push(Object(xe.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))}),t}},{type:"block",blocks:["core/audio"],transform:e=>Object(xe.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>Object(xe.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>Object(xe.createBlock)("core/file",{href:e.url,fileName:e.caption,textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=Object(Ye.select)(Ee.store),n=t(e);return!!n&&Object(Se.includes)(n.mime_type,"audio")},transform:e=>Object(xe.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=Object(Ye.select)(Ee.store),n=t(e);return!!n&&Object(Se.includes)(n.mime_type,"video")},transform:e=>Object(xe.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=Object(Ye.select)(Ee.store),n=t(e);return!!n&&Object(Se.includes)(n.mime_type,"image")},transform:e=>Object(xe.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]};const Ua={apiVersion:2,name:"core/file",title:"File",category:"media",description:"Add a link to a downloadable file.",keywords:["document","pdf","download"],textdomain:"default",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]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},editorStyle:"wp-block-file-editor",style:"wp-block-file"},{name:qa}=Ua,Wa={icon:Ia,transforms:Ga,edit:Fa,save:function({attributes:e}){const{href:t,fileName:n,textLinkHref:o,textLinkTarget:r,showDownloadButton:a,downloadButtonText:c,displayPreview:l,previewHeight:i}=e,s=Ce.RichText.isEmpty(n)?Object(Be.__)("PDF embed"):Object(Be.sprintf)(
|
34 |
/* translators: %s: filename. */
|
35 |
+
Object(Be.__)("Embed of %s."),n);return t&&Object(Te.createElement)("div",Ce.useBlockProps.save(),l&&Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:i+"px"},"aria-label":s})),!Ce.RichText.isEmpty(n)&&Object(Te.createElement)("a",{href:o,target:r,rel:r?"noreferrer noopener":void 0},Object(Te.createElement)(Ce.RichText.Content,{value:n})),a&&Object(Te.createElement)("a",{href:t,className:"wp-block-file__button",download:!0},Object(Te.createElement)(Ce.RichText.Content,{value:c})))}};var $a=Object(Te.createElement)(ze.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Te.createElement)(ze.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"})),Za={from:[{type:"block",blocks:["core/code"],transform:({content:e})=>Object(xe.createBlock)("core/html",{content:e})}]};const Qa={apiVersion:2,name:"core/html",title:"Custom HTML",category:"widgets",description:"Add custom HTML code and preview it as you edit.",keywords:["embed"],textdomain:"default",attributes:{content:{type:"string",source:"html"}},supports:{customClassName:!1,className:!1,html:!1},editorStyle:"wp-block-html-editor"},{name:Ja}=Qa,Ka={icon:$a,example:{attributes:{content:"<marquee>"+Object(Be.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},edit:function({attributes:e,setAttributes:t,isSelected:n}){const[o,r]=Object(Te.useState)(),a=Object(Ye.useSelect)(e=>["\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",...Object(Ce.transformStyles)(e(Ce.store).getSettings().styles)],[]);return Object(Te.createElement)("div",Object(Ce.useBlockProps)({className:"block-library-html__edit"}),Object(Te.createElement)(Ce.BlockControls,null,Object(Te.createElement)(Le.ToolbarGroup,null,Object(Te.createElement)(Le.ToolbarButton,{className:"components-tab-button",isPressed:!o,onClick:function(){r(!1)}},Object(Te.createElement)("span",null,"HTML")),Object(Te.createElement)(Le.ToolbarButton,{className:"components-tab-button",isPressed:o,onClick:function(){r(!0)}},Object(Te.createElement)("span",null,Object(Be.__)("Preview"))))),Object(Te.createElement)(Le.Disabled.Consumer,null,r=>o||r?Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Le.SandBox,{html:e.content,styles:a}),!n&&Object(Te.createElement)("div",{className:"block-library-html__preview-overlay"})):Object(Te.createElement)(Ce.PlainText,{value:e.content,onChange:e=>t({content:e}),placeholder:Object(Be.__)("Write HTML…"),"aria-label":Object(Be.__)("HTML")})))},save:function({attributes:e}){return Object(Te.createElement)(Te.RawHTML,null,e.content)},transforms:Za};var Ya=Object(Te.createElement)(ze.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Te.createElement)(ze.Path,{d:"M3 18h8V6H3v12zM14 7.5V9h7V7.5h-7zm0 5.3h7v-1.5h-7v1.5zm0 3.7h7V15h-7v1.5z"})),Xa=Object(Te.createElement)(Le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Te.createElement)(Le.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(Te.createElement)(Le.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(Te.createElement)(Le.Path,{d:"M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"}));const ec=["image","video"];function tc(e,t){return e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{}}const nc=Object(Te.forwardRef)(({isSelected:e,isStackedOnMobile:t,...n},o)=>{const r=Object(Xe.useViewportMatch)("small","<");return Object(Te.createElement)(Le.ResizableBox,Object(Ae.a)({ref:o,showHandle:e&&(!r||!t)},n))});function oc({mediaId:e,mediaUrl:t,onSelectMedia:n}){return Object(Te.createElement)(Ce.BlockControls,{group:"other"},Object(Te.createElement)(Ce.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:ec,accept:"image/*,video/*",onSelect:n}))}function rc({className:e,noticeOperations:t,noticeUI:n,onSelectMedia:o}){return Object(Te.createElement)(Ce.MediaPlaceholder,{icon:Object(Te.createElement)(Ce.BlockIcon,{icon:Xa}),labels:{title:Object(Be.__)("Media area")},className:e,onSelect:o,accept:"image/*,video/*",allowedTypes:ec,notices:n,onError:e=>{t.removeAllNotices(),t.createErrorNotice(e)}})}var ac=Object(Le.withNotices)(Object(Te.forwardRef)((function(e,t){const{className:n,commitWidthChange:o,focalPoint:r,imageFill:a,isSelected:c,isStackedOnMobile:l,mediaAlt:i,mediaId:s,mediaPosition:u,mediaType:m,mediaUrl:d,mediaWidth:b,onSelectMedia:p,onWidthChange:g}=e,{toggleSelection:h}=Object(Ye.useDispatch)(Ce.store);if(m&&d){const e=()=>{h(!1)},v=(e,t,n)=>{g(parseInt(n.style.width))},O=(e,t,n)=>{h(!0),o(parseInt(n.style.width))},j={right:"left"===u,left:"right"===u},f="image"===m&&a?tc(d,r):{},y={image:()=>Object(Te.createElement)("img",{src:d,alt:i}),video:()=>Object(Te.createElement)("video",{controls:!0,src:d})};return Object(Te.createElement)(nc,{as:"figure",className:Me()(n,"editor-media-container__resizer"),style:f,size:{width:b+"%"},minWidth:"10%",maxWidth:"100%",enable:j,onResizeStart:e,onResize:v,onResizeStop:O,axis:"x",isSelected:c,isStackedOnMobile:l,ref:t},Object(Te.createElement)(oc,{onSelectMedia:p,mediaUrl:d,mediaId:s}),(y[m]||Se.noop)())}return Object(Te.createElement)(rc,e)})));const cc=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}};return{...Object(Se.omit)(e,["customBackgroundColor"]),style:t}},lc={align:{type:"string",default:"wide"},backgroundColor:{type:"string"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!0}};var ic=[{attributes:{...lc,customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},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"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:cc,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:o,mediaAlt:r,mediaPosition:a,mediaType:c,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:u,imageFill:m,focalPoint:d,linkClass:b,href:p,linkTarget:g,rel:h}=e,v=Object(Se.isEmpty)(h)?void 0:h;let O=Object(Te.createElement)("img",{src:l,alt:r,className:s&&"image"===c?"wp-image-"+s:null});p&&(O=Object(Te.createElement)("a",{className:b,href:p,target:g,rel:v},O));const j={image:()=>O,video:()=>Object(Te.createElement)("video",{controls:!0,src:l})},f=Object(Ce.getColorClassName)("background-color",t),y=Me()({"has-media-on-the-right":"right"===a,"has-background":f||n,[f]:f,"is-stacked-on-mobile":o,["is-vertically-aligned-"+u]:u,"is-image-fill":m}),_=m?tc(l,d):{};let w;50!==i&&(w="right"===a?`auto ${i}%`:i+"% auto");const k={backgroundColor:f?void 0:n,gridTemplateColumns:w};return Object(Te.createElement)("div",{className:y,style:k},Object(Te.createElement)("figure",{className:"wp-block-media-text__media",style:_},(j[c]||Se.noop)()),Object(Te.createElement)("div",{className:"wp-block-media-text__content"},Object(Te.createElement)(Ce.InnerBlocks.Content,null)))}},{attributes:{...lc,customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:cc,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:o,mediaAlt:r,mediaPosition:a,mediaType:c,mediaUrl:l,mediaWidth:i,mediaId:s,verticalAlignment:u,imageFill:m,focalPoint:d}=e,b={image:()=>Object(Te.createElement)("img",{src:l,alt:r,className:s&&"image"===c?"wp-image-"+s:null}),video:()=>Object(Te.createElement)("video",{controls:!0,src:l})},p=Object(Ce.getColorClassName)("background-color",t),g=Me()({"has-media-on-the-right":"right"===a,[p]:p,"is-stacked-on-mobile":o,["is-vertically-aligned-"+u]:u,"is-image-fill":m}),h=m?tc(l,d):{};let v;50!==i&&(v="right"===a?`auto ${i}%`:i+"% auto");const O={backgroundColor:p?void 0:n,gridTemplateColumns:v};return Object(Te.createElement)("div",{className:g,style:O},Object(Te.createElement)("figure",{className:"wp-block-media-text__media",style:h},(b[c]||Se.noop)()),Object(Te.createElement)("div",{className:"wp-block-media-text__content"},Object(Te.createElement)(Ce.InnerBlocks.Content,null)))}},{attributes:{...lc,customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:o,mediaAlt:r,mediaPosition:a,mediaType:c,mediaUrl:l,mediaWidth:i}=e,s={image:()=>Object(Te.createElement)("img",{src:l,alt:r}),video:()=>Object(Te.createElement)("video",{controls:!0,src:l})},u=Object(Ce.getColorClassName)("background-color",t),m=Me()({"has-media-on-the-right":"right"===a,[u]:u,"is-stacked-on-mobile":o});let d;50!==i&&(d="right"===a?`auto ${i}%`:i+"% auto");const b={backgroundColor:u?void 0:n,gridTemplateColumns:d};return Object(Te.createElement)("div",{className:m,style:b},Object(Te.createElement)("figure",{className:"wp-block-media-text__media"},(s[c]||Se.noop)()),Object(Te.createElement)("div",{className:"wp-block-media-text__content"},Object(Te.createElement)(Ce.InnerBlocks.Content,null)))}}],sc=Object(Te.createElement)(ze.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Te.createElement)(ze.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})),uc=Object(Te.createElement)(ze.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Te.createElement)(ze.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"}));const mc=[["core/paragraph",{fontSize:"large",placeholder:Object(Be._x)("Content…","content placeholder")}]],dc=e=>Math.max(15,Math.min(e,85));function bc(e,t){var n,o,r;return null==e||null===(n=e.media_details)||void 0===n||null===(o=n.sizes)||void 0===o||null===(r=o[t])||void 0===r?void 0:r.source_url}var pc={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:n,anchor:o})=>Object(xe.createBlock)("core/media-text",{mediaAlt:e,mediaId:n,mediaUrl:t,mediaType:"image",anchor:o})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:n})=>Object(xe.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:n})}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:n,anchor:o})=>Object(xe.createBlock)("core/image",{alt:e,id:t,url:n,anchor:o})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:n})=>Object(xe.createBlock)("core/video",{id:e,src:t,anchor:n})}]};const gc={apiVersion:2,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"wide"},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"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},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"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"},{name:hc}=gc,vc={icon:Ya,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(Be.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:Object(Be.__)("— Kobayashi Issa (一茶)")}}]},transforms:pc,edit:function({attributes:e,isSelected:t,setAttributes:n}){const{focalPoint:o,href:r,imageFill:a,isStackedOnMobile:c,linkClass:l,linkDestination:i,linkTarget:s,mediaAlt:u,mediaId:m,mediaPosition:d,mediaType:b,mediaUrl:p,mediaWidth:g,rel:h,verticalAlignment:v}=e,O=e.mediaSizeSlug||"full",j=Object(Ye.useSelect)(e=>m&&t?e(Ee.store).getMedia(m):null,[t,m]),f=Object(Te.useRef)(),y=e=>{const{style:t}=f.current.resizable,{x:n,y:o}=e;t.backgroundPosition=`${100*n}% ${100*o}%`},[_,w]=Object(Te.useState)(null),k=function({attributes:{linkDestination:e,href:t},setAttributes:n}){return o=>{let r,a;var c,l,i,s,u;r=o.media_type?"image"===o.media_type?"image":"video":o.type,"image"===r&&(a=(null===(c=o.sizes)||void 0===c||null===(l=c.large)||void 0===l?void 0:l.url)||(null===(i=o.media_details)||void 0===i||null===(s=i.sizes)||void 0===s||null===(u=s.large)||void 0===u?void 0:u.source_url));let m=t;"media"===e&&(m=o.url),"attachment"===e&&(m=o.link),n({mediaAlt:o.alt,mediaId:o.id,mediaType:r,mediaUrl:a||o.url,mediaLink:o.link||void 0,href:m,focalPoint:void 0})}}({attributes:e,setAttributes:n}),E=e=>{n({mediaWidth:dc(e)}),w(dc(e))},C=Me()({"has-media-on-the-right":"right"===d,"is-selected":t,"is-stacked-on-mobile":c,["is-vertically-aligned-"+v]:v,"is-image-fill":a}),x=(_||g)+"%",S="right"===d?"1fr "+x:x+" 1fr",B={gridTemplateColumns:S,msGridColumns:S},T=Object(Ye.useSelect)(e=>{const t=e(Ce.store).getSettings();return null==t?void 0:t.imageSizes}),z=Object(Se.map)(Object(Se.filter)(T,({slug:e})=>bc(j,e)),({name:e,slug:t})=>({value:t,label:e})),P=Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("Media & Text settings")},Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Stack on mobile"),checked:c,onChange:()=>n({isStackedOnMobile:!c})}),"image"===b&&Object(Te.createElement)(Le.ToggleControl,{label:Object(Be.__)("Crop image to fill entire column"),checked:a,onChange:()=>n({imageFill:!a})}),a&&p&&"image"===b&&Object(Te.createElement)(Le.FocalPointPicker,{label:Object(Be.__)("Focal point picker"),url:p,value:o,onChange:e=>n({focalPoint:e}),onDragStart:y,onDrag:y}),"image"===b&&Object(Te.createElement)(Le.TextareaControl,{label:Object(Be.__)("Alt text (alternative text)"),value:u,onChange:e=>{n({mediaAlt:e})},help:Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Le.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},Object(Be.__)("Describe the purpose of the image")),Object(Be.__)("Leave empty if the image is purely decorative."))}),"image"===b&&Object(Te.createElement)(Ce.__experimentalImageSizeControl,{onChangeImage:e=>{const t=bc(j,e);if(!t)return null;n({mediaUrl:t,mediaSizeSlug:e})},slug:O,imageSizeOptions:z,isResizable:!1}),p&&Object(Te.createElement)(Le.RangeControl,{label:Object(Be.__)("Media width"),value:_||g,onChange:E,min:15,max:85})),N=Object(Ce.useBlockProps)({className:C,style:B}),M=Object(Ce.__experimentalUseInnerBlocksProps)({className:"wp-block-media-text__content"},{template:mc});return Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Ce.InspectorControls,null,P),Object(Te.createElement)(Ce.BlockControls,{group:"block"},Object(Te.createElement)(Ce.BlockVerticalAlignmentControl,{onChange:e=>{n({verticalAlignment:e})},value:v}),Object(Te.createElement)(Le.ToolbarButton,{icon:sc,title:Object(Be.__)("Show media on left"),isActive:"left"===d,onClick:()=>n({mediaPosition:"left"})}),Object(Te.createElement)(Le.ToolbarButton,{icon:uc,title:Object(Be.__)("Show media on right"),isActive:"right"===d,onClick:()=>n({mediaPosition:"right"})}),"image"===b&&Object(Te.createElement)(Ce.__experimentalImageURLInputUI,{url:r||"",onChangeUrl:e=>{n(e)},linkDestination:i,mediaType:b,mediaUrl:j&&j.source_url,mediaLink:j&&j.link,linkTarget:s,linkClass:l,rel:h})),Object(Te.createElement)("div",N,Object(Te.createElement)(ac,{className:"wp-block-media-text__media",onSelectMedia:k,onWidthChange:e=>{w(dc(e))},commitWidthChange:E,ref:f,focalPoint:o,imageFill:a,isSelected:t,isStackedOnMobile:c,mediaAlt:u,mediaId:m,mediaPosition:d,mediaType:b,mediaUrl:p,mediaWidth:g}),Object(Te.createElement)("div",M)))},save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:o,mediaType:r,mediaUrl:a,mediaWidth:c,mediaId:l,verticalAlignment:i,imageFill:s,focalPoint:u,linkClass:m,href:d,linkTarget:b,rel:p}=e,g=e.mediaSizeSlug||"full",h=Object(Se.isEmpty)(p)?void 0:p,v=Me()({["wp-image-"+l]:l&&"image"===r,["size-"+g]:l&&"image"===r});let O=Object(Te.createElement)("img",{src:a,alt:n,className:v||null});d&&(O=Object(Te.createElement)("a",{className:m,href:d,target:b,rel:h},O));const j={image:()=>O,video:()=>Object(Te.createElement)("video",{controls:!0,src:a})},f=Me()({"has-media-on-the-right":"right"===o,"is-stacked-on-mobile":t,["is-vertically-aligned-"+i]:i,"is-image-fill":s}),y=s?tc(a,u):{};let _;50!==c&&(_="right"===o?`auto ${c}%`:c+"% auto");const w={gridTemplateColumns:_};return Object(Te.createElement)("div",Ce.useBlockProps.save({className:f,style:w}),Object(Te.createElement)("figure",{className:"wp-block-media-text__media",style:y},(j[r]||Se.noop)()),Object(Te.createElement)("div",{className:"wp-block-media-text__content"},Object(Te.createElement)(Ce.InnerBlocks.Content,null)))},deprecated:ic};var Oc=Object(Te.createElement)(ze.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(Te.createElement)(ze.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),jc=n(182);function fc({clientId:e,__experimentalFeatures:t}){const{blocks:n,selectedBlockClientId:o}=Object(Ye.useSelect)(t=>{const{getSelectedBlockClientId:n,__unstableGetClientIdsTree:o}=t(Ce.store);return{blocks:o(e),selectedBlockClientId:n()}},[e]),{selectBlock:r}=Object(Ye.useDispatch)(Ce.store);return Object(Te.createElement)(Ce.__experimentalBlockNavigationTree,{blocks:n,selectedBlockClientIds:[o],selectBlock:r,__experimentalFeatures:t,showNestedBlocks:!0,showAppender:!0,showBlockMovers:!0})}var yc=n(117),_c=n(189);function wc(){const{menus:e,isResolvingMenus:t,hasResolvedMenus:n}=Object(Ye.useSelect)(e=>{const{getMenus:t,isResolving:n,hasFinishedResolution:o}=e(Ee.store),r=[{per_page:-1}];return{menus:t(...r),isResolvingMenus:n("getMenus",r),hasResolvedMenus:o("getMenus",r)}},[]);return{menus:e,isResolvingMenus:t,hasResolvedMenus:n,hasMenus:!(!n||null==e||!e.length)}}function kc(e){const{menuItems:t,hasResolvedMenuItems:n}=Object(Ye.useSelect)(t=>{const{getMenuItems:n,hasFinishedResolution:o}=t(Ee.store),r=void 0!==e,a=r?[{menus:e,per_page:-1}]:void 0;return{menuItems:r?n(...a):void 0,hasResolvedMenuItems:!!r&&o("getMenuItems",a)}},[e]);return{menuItems:t,hasResolvedMenuItems:n}}function Ec(){const{pages:e,isResolvingPages:t,hasResolvedPages:n}=Object(Ye.useSelect)(e=>{const{getEntityRecords:t,isResolving:n,hasFinishedResolution:o}=e(Ee.store),r=["postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1}];return{pages:t(...r)||null,isResolvingPages:n("getEntityRecords",r),hasResolvedPages:o("getEntityRecords",r)}},[]);return{pages:e,isResolvingPages:t,hasResolvedPages:n,hasPages:!(!n||null==e||!e.length)}}var Cc=()=>Object(Te.createElement)("ul",{className:"wp-block-navigation-placeholder__preview wp-block-navigation__container"},Object(Te.createElement)("li",{className:"wp-block-navigation-link"},""),Object(Te.createElement)("li",{className:"wp-block-navigation-link"},""),Object(Te.createElement)("li",{className:"wp-block-navigation-link"},""),Object(Te.createElement)(yc.a,{icon:Gt.a}));var xc=Object(Te.forwardRef)((function({onCreate:e},t){const[n,o]=Object(Te.useState)(),[r,a]=Object(Te.useState)(!1),{isResolvingPages:c,menus:l,isResolvingMenus:i,menuItems:s,hasResolvedMenuItems:u,hasPages:m,hasMenus:d}=(b=n,{...Ec(),...wc(),...kc(b)});var b;const p=c||i,g=Object(Te.useCallback)(()=>{const{innerBlocks:t}=function(e){return e?function e(t){let n={};return{innerBlocks:Object(Se.sortBy)(t,"menu_order").map(t=>{var o;if("block"===t.type){const[e]=Object(xe.parse)(t.content.raw);return e||Object(xe.createBlock)("core/freeform",{content:t.content})}const r=function({title:e,xfn:t,classes:n,attr_title:o,object:r,object_id:a,description:c,url:l,type:i,target:s}){var u;return r&&"post_tag"===r&&(r="tag"),{label:(null==e?void 0:e.rendered)||"",...(null===(u=r)||void 0===u?void 0:u.length)&&{type:r},kind:(null==i?void 0:i.replace("_","-"))||"custom",url:l||"",...(null==t?void 0:t.length)&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...(null==n?void 0:n.length)&&n.join(" ").trim()&&{className:n.join(" ").trim()},...(null==o?void 0:o.length)&&{title:o},...a&&"custom"!==r&&{id:a},...(null==c?void 0:c.length)&&{description:c},..."_blank"===s&&{opensInNewTab:!0}}}(t),{innerBlocks:a=[],mapping:c={}}=null!==(o=t.children)&&void 0!==o&&o.length?e(t.children):{};n={...n,...c};const l=Object(xe.createBlock)("core/navigation-link",r,a);return n[t.id]=l.clientId,l}),mapping:n}}(function(e,t="id",n="parent"){const o=Object.create(null),r=[];for(const n of e)o[n[t]]={...n,children:[]};for(const a of e)a[n]?o[a[n]].children.push(o[a[t]]):r.push(o[a[t]]);return r}(e)):null}(s);e(t,!0)});return Object(Te.useEffect)(()=>{r&&u&&(g(),a(!1))},[r,u]),Object(Te.createElement)(Le.Placeholder,{className:"wp-block-navigation-placeholder"},Object(Te.createElement)(Cc,null),Object(Te.createElement)("div",{className:"wp-block-navigation-placeholder__controls"},p&&Object(Te.createElement)("div",{ref:t},Object(Te.createElement)(Le.Spinner,null)),!p&&Object(Te.createElement)("div",{ref:t,className:"wp-block-navigation-placeholder__actions"},Object(Te.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},Object(Te.createElement)(yc.a,{icon:Oc})," ",Object(Be.__)("Navigation")),d?Object(Te.createElement)(Le.DropdownMenu,{text:Object(Be.__)("Add existing menu"),icon:_c.a,toggleProps:{isPrimary:!0,className:"wp-block-navigation-placeholder__actions__dropdown"}},({onClose:e})=>Object(Te.createElement)(Le.MenuGroup,null,l.map(t=>Object(Te.createElement)(Le.MenuItem,{onClick:()=>{o(t.id),u?g():a(!0)},onClose:e,key:t.id},t.name)))):void 0,m?Object(Te.createElement)(Le.Button,{isPrimary:!d,isTertiary:!!d,onClick:()=>{const t=[Object(xe.createBlock)("core/page-list")];e(t,!0)}},Object(Be.__)("Add all pages")):void 0,Object(Te.createElement)(Le.Button,{isTertiary:!0,onClick:()=>{e([])}},Object(Be.__)("Start empty")))))})),Sc=n(118);function Bc({children:e,id:t,isOpen:n,isResponsive:o,onToggle:r}){if(!o)return e;const a=Me()("wp-block-navigation__responsive-container",{"is-menu-open":n}),c=t+"-modal";return Object(Te.createElement)(Te.Fragment,null,!n&&Object(Te.createElement)(Le.Button,{"aria-haspopup":"true","aria-expanded":n,"aria-label":Object(Be.__)("Open menu"),className:"wp-block-navigation__responsive-container-open",onClick:()=>r(!0)},Object(Te.createElement)(ze.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false"},Object(Te.createElement)(ze.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),Object(Te.createElement)(ze.Rect,{x:"4",y:"15",width:"16",height:"1.5"}))),Object(Te.createElement)("div",{className:a,id:c,"aria-hidden":!n},Object(Te.createElement)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1"},Object(Te.createElement)("div",{className:"wp-block-navigation__responsive-dialog",role:"dialog","aria-modal":"true","aria-labelledby":c+"-title"},Object(Te.createElement)(Le.Button,{className:"wp-block-navigation__responsive-container-close","aria-label":Object(Be.__)("Close menu"),onClick:()=>r(!1)},Object(Te.createElement)(yc.a,{icon:Sc.a})),Object(Te.createElement)("div",{className:"wp-block-navigation__responsive-container-content",id:c+"-content"},e)))))}const Tc=["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link"],zc={type:"default",alignments:[]};var Pc=Object(Xe.compose)([Object(Ye.withSelect)((e,{clientId:t})=>{var n;const o=e(Ce.store).getBlocks(t),{getClientIdsOfDescendants:r,hasSelectedInnerBlock:a,getSelectedBlockClientId:c}=e(Ce.store),l=a(t,!1),i=c();return{isImmediateParentOfSelectedBlock:l,selectedBlockHasDescendants:!(null===(n=r([i]))||void 0===n||!n.length),hasExistingNavItems:!!o.length,isSelected:i===t}}),Object(Ye.withDispatch)((e,{clientId:t})=>({updateInnerBlocks(n){if(0===(null==n?void 0:n.length))return!1;e(Ce.store).replaceInnerBlocks(t,n,!0)}}))])((function({selectedBlockHasDescendants:e,attributes:t,setAttributes:n,clientId:o,hasExistingNavItems:r,isImmediateParentOfSelectedBlock:a,isSelected:c,updateInnerBlocks:l,className:i,hasSubmenuIndicatorSetting:s=!0,hasItemJustificationControls:u=!0}){const[m,d]=Object(Te.useState)(!r),[b,p]=Object(Te.useState)(!1),{selectBlock:g}=Object(Ye.useDispatch)(Ce.store),h=Object(Ce.useBlockProps)({className:Me()(i,{["items-justified-"+t.itemsJustification]:t.itemsJustification,"is-vertical":"vertical"===t.orientation,"is-responsive":t.isResponsive})}),{navigatorToolbarButton:v,navigatorModal:O}=function(e,t){const[n,o]=Object(Te.useState)(!1);return{navigatorToolbarButton:Object(Te.createElement)(Le.ToolbarButton,{className:"components-toolbar__control",label:Object(Be.__)("Open block navigation"),onClick:()=>o(!0),icon:jc.a}),navigatorModal:n&&Object(Te.createElement)(Le.Modal,{title:Object(Be.__)("Navigation"),closeLabel:Object(Be.__)("Close"),onRequestClose:()=>{o(!1)}},Object(Te.createElement)(fc,{clientId:e,__experimentalFeatures:void 0}))}}(o),j=Object(Ce.__experimentalUseInnerBlocksProps)({className:"wp-block-navigation__container"},{allowedBlocks:Tc,orientation:t.orientation||"horizontal",renderAppender:!!(a&&!e||c)&&Ce.InnerBlocks.DefaultAppender,__experimentalAppenderTagName:"li",__experimentalCaptureToolbars:!0,templateLock:!1,__experimentalLayout:zc,placeholder:Object(Te.createElement)(Cc,null)});if(m)return Object(Te.createElement)("div",h,Object(Te.createElement)(xc,{onCreate:(e,t)=>{d(!1),l(e),t&&g(o)}}));const f="vertical"===t.orientation?["left","center","right"]:["left","center","right","space-between"];return Object(Te.createElement)(Te.Fragment,null,Object(Te.createElement)(Ce.BlockControls,null,u&&Object(Te.createElement)(Ce.JustifyToolbar,{value:t.itemsJustification,allowedControls:f,onChange:e=>n({itemsJustification:e}),popoverProps:{position:"bottom right",isAlternate:!0}}),Object(Te.createElement)(Le.ToolbarGroup,null,v)),O,Object(Te.createElement)(Ce.InspectorControls,null,s&&Object(Te.createElement)(Le.PanelBody,{title:Object(Be.__)("Display settings")},Object(Te.createElement)(Le.ToggleControl,{checked:t.showSubmenuIcon,onChange:e=>{n({showSubmenuIcon:e})},label:Object(Be.__)("Show submenu indicator icons")}),Object(Te.createElement)(Le.ToggleControl,{checked:t.isResponsive,onChange:e=>{n({isResponsive:e})},label:Object(Be.__)("Enable responsive menu")}))),Object(Te.createElement)("nav",h,Object(Te.createElement)(Bc,{id:o,onToggle:p,isOpen:b,isResponsive:t.isResponsive},Object(Te.createElement)("ul",j))))}));const Nc={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"};var Mc=[{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>Object(Te.createElement)(Ce.InnerBlocks.Content,null),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in Nc){const n=e.style.typography[t];if(n&&n.startsWith(Nc[t]))return!0}return!1},migrate:e=>({...e,style:{...e.style,typography:Object(Se.mapValues)(e.style.typography,(e,t)=>{const n=Nc[t];if(n&&e.startsWith(n)){const o=e.slice(n.length);return"textDecoration"===t&&"strikethrough"===o?"line-through":o}return e})}})},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:e=>({...Object(Se.omit)(e,["rgbTextColor","rgbBackgroundColor"]),customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}),save:()=>Object(Te.createElement)(Ce.InnerBlocks.Content,null)}],Vc=[{name:"horizontal",isDefault:!0,title:Object(Be.__)("Navigation (horizontal)"),description:Object(Be.__)("Links shown in a row."),attributes:{orientation:"horizontal"},scope:["inserter","transform"]},{name:"vertical",title:Object(Be.__)("Navigation (vertical)"),description:Object(Be.__)("Links shown in a column."),attributes:{orientation:"vertical"},scope:["inserter","transform"]}];const Ic={apiVersion:2,name:"core/navigation",title:"Navigation",category:"design",description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},isResponsive:{type:"boolean",default:!1}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",style:"style",orientation:"orientation"},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"},{name:Hc}=Ic,Rc={icon:Oc,variations:Vc,example:{innerBlocks:[{name:"core/navigation-link",attributes:{
|
36 |
// translators: 'Home' as in a website's home page.
|
37 |
label:Object(Be.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{
|
38 |
// translators: 'About' as in a website's about page.
|
changelog.txt
CHANGED
@@ -1,10 +1,17 @@
|
|
1 |
== Changelog ==
|
2 |
|
3 |
-
= 10.7.
|
4 |
|
5 |
### Bug Fixes
|
6 |
|
7 |
-
- Fix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
|
10 |
= 10.8.0-rc.1 =
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 10.7.3 =
|
4 |
|
5 |
### Bug Fixes
|
6 |
|
7 |
+
- Fix alligned blocks. ([32454](https://github.com/WordPress/gutenberg/pull/32454))
|
8 |
+
|
9 |
+
|
10 |
+
= 10.7.2 =
|
11 |
+
|
12 |
+
### Bug Fixes
|
13 |
+
|
14 |
+
- Fix Logic to enable custom colors, gradients, and font sizes. ([32200](https://github.com/WordPress/gutenberg/pull/32200))
|
15 |
|
16 |
|
17 |
= 10.8.0-rc.1 =
|
gutenberg.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
|
6 |
* Requires at least: 5.6
|
7 |
* Requires PHP: 5.6
|
8 |
-
* Version: 10.7.
|
9 |
* Author: Gutenberg Team
|
10 |
* Text Domain: gutenberg
|
11 |
*
|
@@ -13,8 +13,8 @@
|
|
13 |
*/
|
14 |
|
15 |
### BEGIN AUTO-GENERATED DEFINES
|
16 |
-
define( 'GUTENBERG_VERSION', '10.7.
|
17 |
-
define( 'GUTENBERG_GIT_COMMIT', '
|
18 |
### END AUTO-GENERATED DEFINES
|
19 |
|
20 |
gutenberg_pre_init();
|
5 |
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
|
6 |
* Requires at least: 5.6
|
7 |
* Requires PHP: 5.6
|
8 |
+
* Version: 10.7.3
|
9 |
* Author: Gutenberg Team
|
10 |
* Text Domain: gutenberg
|
11 |
*
|
13 |
*/
|
14 |
|
15 |
### BEGIN AUTO-GENERATED DEFINES
|
16 |
+
define( 'GUTENBERG_VERSION', '10.7.3' );
|
17 |
+
define( 'GUTENBERG_GIT_COMMIT', '1792eba443bdeb643589e989d38d1d06b6e7b1ab' );
|
18 |
### END AUTO-GENERATED DEFINES
|
19 |
|
20 |
gutenberg_pre_init();
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== Gutenberg ===
|
2 |
Contributors: matveb, joen, karmatosed
|
3 |
Tested up to: 5.7
|
4 |
-
Stable tag: 10.7.
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
|
@@ -55,4 +55,4 @@ View <a href="https://developer.wordpress.org/block-editor/principles/versions-i
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
-
To read the changelog for Gutenberg 10.7.
|
1 |
=== Gutenberg ===
|
2 |
Contributors: matveb, joen, karmatosed
|
3 |
Tested up to: 5.7
|
4 |
+
Stable tag: 10.7.2
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
To read the changelog for Gutenberg 10.7.3, please navigate to the <a href="https://github.com/WordPress/gutenberg/releases/tag/v10.7.3">release page</a>.
|