this.wp=this.wp||{},this.wp.annotations=function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=314)}({1:function(n,t){!function(){n.exports=this.wp.i18n}()},15:function(n,t,e){"use strict";function r(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}e.d(t,"a",function(){return r})},19:function(n,t,e){"use strict";var r=e(33);function o(n){return function(n){if(Array.isArray(n)){for(var t=0,e=new Array(n.length);t=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}e.d(t,"a",function(){return r})},23:function(n,t){!function(){n.exports=this.wp.hooks}()},31:function(n,t,e){"use strict";var r,o;function a(n){return[n]}function i(n){return!!n&&"object"==typeof n}function u(){var n={clear:function(){n.head=null}};return n}function c(n,t,e){var r;if(n.length!==t.length)return!1;for(r=e;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ANNOTATION_ADD":var e=t.blockClientId,r={id:t.id,blockClientId:e,richTextIdentifier:t.richTextIdentifier,source:t.source,selector:t.selector,range:t.range};if("range"===r.selector&&!function(n){return Object(f.isNumber)(n.start)&&Object(f.isNumber)(n.end)&&n.start<=n.end}(r.range))return n;var o=Object(f.get)(n,e,[]);return Object(c.a)({},n,Object(i.a)({},e,Object(u.a)(o).concat([r])));case"ANNOTATION_REMOVE":return Object(f.mapValues)(n,function(n){return l(n,function(n){return n.id!==t.annotationId})});case"ANNOTATION_UPDATE_RANGE":return Object(f.mapValues)(n,function(n){var e=!1,r=n.map(function(n){return n.id===t.annotationId?(e=!0,Object(c.a)({},n,{range:{start:t.start,end:t.end}})):n});return e?r:n});case"ANNOTATION_REMOVE_SOURCE":return Object(f.mapValues)(n,function(n){return l(n,function(n){return n.source!==t.source})})}return n},p=e(21),d=e(31),v=[],b=Object(d.a)(function(n,t){return Object(f.get)(n,t,[]).filter(function(n){return"block"===n.selector})},function(n,t){return[Object(f.get)(n,t,v)]}),g=function(n,t){return Object(f.get)(n,t,v)},O=Object(d.a)(function(n,t,e){return Object(f.get)(n,t,[]).filter(function(n){return"range"===n.selector&&e===n.richTextIdentifier}).map(function(n){var t=n.range,e=Object(p.a)(n,["range"]);return Object(c.a)({},t,e)})},function(n,t){return[Object(f.get)(n,t,v)]});function m(n){return Object(f.flatMap)(n,function(n){return n})}var y=e(57),h=e.n(y);function x(n){var t=n.blockClientId,e=n.richTextIdentifier,r=void 0===e?null:e,o=n.range,a=void 0===o?null:o,i=n.selector,u=void 0===i?"range":i,c=n.source,f=void 0===c?"default":c,l=n.id,s={type:"ANNOTATION_ADD",id:void 0===l?h()():l,blockClientId:t,richTextIdentifier:r,source:f,selector:u};return"range"===u&&(s.range=a),s}function A(n){return{type:"ANNOTATION_REMOVE",annotationId:n}}function _(n,t,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:n,start:t,end:e}}function j(n){return{type:"ANNOTATION_REMOVE_SOURCE",source:n}}Object(a.registerStore)("core/annotations",{reducer:s,selectors:r,actions:o});var T=e(20),N=e(41),w=e.n(N),I=e(1),E="core/annotation",R="annotation-text-";var k=w()(function(n){var t=n.annotations;return function(n,e){if(0===t.length)return n;var r={formats:n,text:e};return(r=function(n){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach(function(t){var e=t.start,r=t.end;e>n.text.length&&(e=n.text.length),r>n.text.length&&(r=n.text.length);var o=R+t.source,a=R+t.id;n=Object(T.applyFormat)(n,{type:E,attributes:{className:o,id:a}},e,r)}),n}(r,t)).formats}}),S=w()(function(n){return{annotations:n}}),P={name:E,title:Object(I.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(n,t){var e=t.richTextIdentifier,r=t.blockClientId;return S(n("core/annotations").__experimentalGetAnnotationsForRichText(r,e))},__experimentalCreatePrepareEditableTree:k,__experimentalGetPropsForEditableTreeChangeHandler:function(n){return{removeAnnotation:n("core/annotations").__experimentalRemoveAnnotation,updateAnnotationRange:n("core/annotations").__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(n){return function(t){var e=function(n){var t={};return n.forEach(function(n,e){(n=(n=n||[]).filter(function(n){return n.type===E})).forEach(function(n){var r=n.attributes.id;r=r.replace(R,""),t.hasOwnProperty(r)||(t[r]={start:e}),t[r].end=e+1})}),t}(t),r=n.removeAnnotation,o=n.updateAnnotationRange;!function(n,t,e){var r=e.removeAnnotation,o=e.updateAnnotationRange;n.forEach(function(n){var e=t[n.id];if(e){var a=n.start,i=n.end;a===e.start&&i===e.end||o(n.id,e.start,e.end)}else r(n.id)})}(n.annotations,e,{removeAnnotation:r,updateAnnotationRange:o})}}},C=P.name,D=Object(p.a)(P,["name"]);Object(T.registerFormatType)(C,D);var M=e(23);Object(M.addFilter)("editor.BlockListBlock","core/annotations",function(n){return Object(a.withSelect)(function(n,t){var e=t.clientId;return{className:n("core/annotations").__experimentalGetAnnotationsForBlock(e).map(function(n){return"is-annotated-by-"+n.source}).join(" ")}})(n)})},33:function(n,t,e){"use strict";function r(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}e.d(t,"a",function(){return r})},41:function(n,t,e){n.exports=function(n,t){var e,r,o,a=0;function i(){var t,i,u=r,c=arguments.length;n:for(;u;){if(u.args.length===arguments.length){for(i=0;i>>((3&t)<<3)&255;return o}}},78:function(n,t){for(var e=[],r=0;r<256;++r)e[r]=(r+256).toString(16).substr(1);n.exports=function(n,t){var r=t||0,o=e;return[o[n[r++]],o[n[r++]],o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],"-",o[n[r++]],o[n[r++]],o[n[r++]],o[n[r++]],o[n[r++]],o[n[r++]]].join("")}},8:function(n,t,e){"use strict";e.d(t,"a",function(){return o});var r=e(15);function o(n){for(var t=1;t