PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/figplantsparadise.com/wp-includes/js/dist/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/figplantsparadise.com/wp-includes/js/dist/block-editor.min.js

/*! This file is auto-generated */
!function(){var e={480:function(e,t,n){"use strict";var r=n(5304)("ArrayBuffer.prototype.byteLength",!0),o=n(4602);e.exports=function(e){return o(e)?r?r(e):e.byteLength:NaN}},5304:function(e,t,n){"use strict";var r=n(3803),o=n(6427),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},6427:function(e,t,n){"use strict";var r=n(7870),o=n(3803),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},3303:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},7870:function(e,t,n){"use strict";var r=n(3303);e.exports=Function.prototype.bind||r},3803:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(8040)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(7870),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},8040:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9063);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9063:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6411:function(e,t){var n,r,o;
/*!
	autosize 4.0.4
	license: MIT
	http://www.jacklmoore.com/autosize
*/r=[e,t],n=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function l(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,l=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",l,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),s()}function s(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),d()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(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}function p(){if(0!==e.scrollHeight){var r=u(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){p();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&&(c("scroll"),p(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),p(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),r!==o){r=o;var l=i("autosize:resized");try{e.dispatchEvent(l)}catch(e){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function s(e){var t=o.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return l(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=c,e.exports=t.default},void 0===(o="function"==typeof n?n.apply(t,r):n)||(e.exports=o)},4827:function(e){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},2656:function(e,t,n){"use strict";var r=n(8918),o=n(6724),i=n(1642),l=n(3828);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!l&&l(e,t);if(r)r(e,t,{configurable:null===c&&p?p.configurable:!c,enumerable:null===a&&p?p.enumerable:!a,value:n,writable:null===s&&p?p.writable:!s});else{if(!u&&(a||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},1198:function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var i=0,l=t.length,a=0,s=0;i<l;i++){var c=t[i];if(c.removed){if(c.value=e.join(r.slice(s,s+c.count)),s+=c.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!c.added&&o){var p=n.slice(a,a+c.count);p=p.map((function(e,t){var n=r[s+t];return n.length>e.length?n:e})),c.value=e.join(p)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(s+=c.count)}}var d=t[l-1];return l>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[l-2].value+=d.value,t.pop()),t}function o(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var l=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,p=s+c,d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=s&&f+1>=c)return a([{value:this.join(t),count:t.length}]);function y(){for(var n=-1*u;n<=u;n+=2){var i=void 0,p=d[n-1],f=d[n+1],y=(f?f.newPos:0)-n;p&&(d[n-1]=void 0);var m=p&&p.newPos+1<s,g=f&&0<=y&&y<c;if(m||g){if(!m||g&&p.newPos<f.newPos?(i=o(f),l.pushComponent(i.components,void 0,!0)):((i=p).newPos++,l.pushComponent(i.components,!0,void 0)),y=l.extractCommon(i,t,e,n),i.newPos+1>=s&&y+1>=c)return a(r(l,i.components,t,e,l.useLongestToken));d[n]=i}else d[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>p)return i();y()||e()}),0)}();else for(;u<=p;){var m=y();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,l=e.newPos,a=l-r,s=0;l+1<o&&a+1<i&&this.equals(t[l+1],n[a+1]);)l++,a++,s++;return s&&e.components.push({count:s}),e.newPos=l,a},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("")}}},1973:function(e,t,n){"use strict";var r;t.Kx=function(e,t,n){return o.diff(e,t,n)};var o=new(((r=n(1198))&&r.__esModule?r:{default:r}).default)},1345:function(e,t,n){"use strict";var r=n(5022);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,l=n.alignWithTop,a=n.alignWithLeft,s=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,p=n.offsetRight||0;o=void 0===o||o;var d=r.isWindow(t),f=r.offset(e),y=r.outerHeight(e),m=r.outerWidth(e),g=void 0,h=void 0,b=void 0,v=void 0,_=void 0,k=void 0,S=void 0,E=void 0,w=void 0,A=void 0;d?(S=t,A=r.height(S),w=r.width(S),E={left:r.scrollLeft(S),top:r.scrollTop(S)},_={left:f.left-E.left-c,top:f.top-E.top-s},k={left:f.left+m-(E.left+w)+p,top:f.top+y-(E.top+A)+u},v=E):(g=r.offset(t),h=t.clientHeight,b=t.clientWidth,v={left:t.scrollLeft,top:t.scrollTop},_={left:f.left-(g.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-c,top:f.top-(g.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-s},k={left:f.left+m-(g.left+b+(parseFloat(r.css(t,"borderRightWidth"))||0))+p,top:f.top+y-(g.top+h+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),_.top<0||k.top>0?!0===l?r.scrollTop(t,v.top+_.top):!1===l?r.scrollTop(t,v.top+k.top):_.top<0?r.scrollTop(t,v.top+_.top):r.scrollTop(t,v.top+k.top):i||((l=void 0===l||!!l)?r.scrollTop(t,v.top+_.top):r.scrollTop(t,v.top+k.top)),o&&(_.left<0||k.left>0?!0===a?r.scrollLeft(t,v.left+_.left):!1===a?r.scrollLeft(t,v.left+k.left):_.left<0?r.scrollLeft(t,v.left+_.left):r.scrollLeft(t,v.left+k.left):i||((a=void 0===a||!!a)?r.scrollLeft(t,v.left+_.left):r.scrollLeft(t,v.left+k.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n="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 r(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function o(e){return r(e)}function i(e){return r(e,!0)}function l(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,i=o.body,l=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=l.clientLeft||i.clientLeft||0,top:r-=l.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=o(r),t.top+=i(r),t}var a=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),s=/^(top|right|bottom|left)$/;var c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===c(e,"boxSizing")}"undefined"!=typeof window&&(c=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,i=n||o.defaultView.getComputedStyle(e,null);return i&&(r=i.getPropertyValue(t)||i[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(a.test(n)&&!s.test(t)){var r=e.style,o=r.left,i=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,r.left="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r.left=o,e.runtimeStyle.left=i}return""===n?"auto":n});var d=["margin","border","padding"];function f(e,t,n){var r={},o=e.style,i=void 0;for(i in t)t.hasOwnProperty(i)&&(r[i]=o[i],o[i]=t[i]);for(i in n.call(e),t)t.hasOwnProperty(i)&&(o[i]=r[i])}function y(e,t,n){var r=0,o=void 0,i=void 0,l=void 0;for(i=0;i<t.length;i++)if(o=t[i])for(l=0;l<n.length;l++){var a=void 0;a="border"===o?o+n[l]+"Width":o+n[l],r+=parseFloat(c(e,a))||0}return r}function m(e){return null!=e&&e==e.window}var g={};function h(e,t,n){if(m(e))return"width"===t?g.viewportWidth(e):g.viewportHeight(e);if(9===e.nodeType)return"width"===t?g.docWidth(e):g.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,i=(c(e),p(e)),l=0;(null==o||o<=0)&&(o=void 0,(null==(l=c(e,t))||Number(l)<0)&&(l=e.style[t]||0),l=parseFloat(l)||0),void 0===n&&(n=i?1:-1);var a=void 0!==o||i,s=o||l;if(-1===n)return a?s-y(e,["border","padding"],r):l;if(a){var u=2===n?-y(e,["border"],r):y(e,["margin"],r);return s+(1===n?0:u)}return l+y(e,d.slice(n),r)}u(["Width","Height"],(function(e){g["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],g["viewport"+e](n))},g["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,i=r.documentElement[n];return"CSS1Compat"===r.compatMode&&i||o&&o[n]||i}}));var b={position:"absolute",visibility:"hidden",display:"block"};function v(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=h.apply(void 0,n):f(e,b,(function(){t=h.apply(void 0,n)})),t}function _(e,t,r){var o=r;if("object"!==(void 0===t?"undefined":n(t)))return void 0!==o?("number"==typeof o&&(o+="px"),void(e.style[t]=o)):c(e,t);for(var i in t)t.hasOwnProperty(i)&&_(e,i,t[i])}u(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);g["outer"+t]=function(t,n){return t&&v(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];g[e]=function(t,r){if(void 0===r)return t&&v(t,e,-1);if(t){c(t);return p(t)&&(r+=y(t,["padding","border"],n)),_(t,e,r)}}})),e.exports=t({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(e),r={},o=void 0,i=void 0;for(i in t)t.hasOwnProperty(i)&&(o=parseFloat(_(e,i))||0,r[i]=o+t[i]-n[i]);_(e,r)}(e,t)},isWindow:m,each:u,css:_,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(m(e)){if(void 0===t)return o(e);window.scrollTo(t,i(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(m(e)){if(void 0===t)return i(e);window.scrollTo(o(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},g)},8918:function(e,t,n){"use strict";var r=n(292)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(e){r=!1}e.exports=r},3592:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},5903:function(e,t,n){"use strict";var r=n(3592);e.exports=Function.prototype.bind||r},292:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(4482)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(5903),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},4482:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(7457);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},7457:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6788:function(e){"use strict";e.exports=EvalError},6716:function(e){"use strict";e.exports=Error},9204:function(e){"use strict";e.exports=RangeError},9908:function(e){"use strict";e.exports=ReferenceError},6724:function(e){"use strict";e.exports=SyntaxError},1642:function(e){"use strict";e.exports=TypeError},1451:function(e){"use strict";e.exports=URIError},7998:function(e,t,n){"use strict";var r=n(1642);e.exports=function(e){if(null==e)throw new r(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}},5249:function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=n(3777),i=n(5443),l=n(8659),a=n(3082),s=function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,r,l,a="string"===t?["toString","valueOf"]:["valueOf","toString"];for(l=0;l<a.length;++l)if(n=e[a[l]],i(n)&&(r=n.call(e),o(r)))return r;throw new TypeError("No default value")},c=function(e,t){var n=e[t];if(null!=n){if(!i(n))throw new TypeError(n+" returned for property "+t+" of object "+e+" is not a function");return n}};e.exports=function(e){if(o(e))return e;var t,n="default";if(arguments.length>1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=c(e,Symbol.toPrimitive):a(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var i=t.call(e,n);if(o(i))return i;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(l(e)||a(e))&&(n="string"),s(e,"default"===n?"number":n)}},3777:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},4843:function(e,t,n){"use strict";var r=n(5443),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty,l=function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},a=function(e,t,n){for(var r=0,o=e.length;r<o;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},s=function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),"[object Array]"===o.call(e)?l(e,t,i):"string"==typeof e?a(e,t,i):s(e,t,i)}},3828:function(e,t,n){"use strict";var r=n(2473)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},8819:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},8729:function(e,t,n){"use strict";var r=n(8819);e.exports=Function.prototype.bind||r},2473:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(5810)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(8729),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5810:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1759);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1759:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8198:function(e,t,n){"use strict";var r=n(8918),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},1856:function(e){"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},9905:function(e,t,n){"use strict";var r=n.g.Symbol,o=n(5682);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5682:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},81:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4111:function(e,t,n){"use strict";var r=n(81);e.exports=function(){return r()&&!!Symbol.toStringTag}},9429:function(e,t,n){"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(766);e.exports=i.call(r,o)},2075:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},766:function(e,t,n){"use strict";var r=n(2075);e.exports=Function.prototype.bind||r},8575:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},4602:function(e,t,n){"use strict";var r=n(4374),o=n(7442),i=n(3767)("%ArrayBuffer%",!0),l=o("ArrayBuffer.prototype.byteLength",!0),a=o("Object.prototype.toString"),s=!!i&&!l&&new i(0).slice,c=!!s&&r(s);e.exports=l||c?function(e){if(!e||"object"!=typeof e)return!1;try{return l?l(e):c(e,0),!0}catch(e){return!1}}:i?function(e){return"[object ArrayBuffer]"===a(e)}:function(e){return!1}},7442:function(e,t,n){"use strict";var r=n(3767),o=n(4374),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},4374:function(e,t,n){"use strict";var r=n(7410),o=n(3767),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1818:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},7410:function(e,t,n){"use strict";var r=n(1818);e.exports=Function.prototype.bind||r},3767:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(6945)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(7410),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},6945:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6992);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6992:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5443:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=o?function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)}:function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(s)return function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}}(e);if(l(e))return!1;var t=a.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},8659:function(e){"use strict";var t=Date.prototype.getDay,n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(r?function(e){try{return t.call(e),!0}catch(e){return!1}}(e):"[object Date]"===n.call(e))}},5604:function(e,t,n){"use strict";var r=n(6131)("SharedArrayBuffer.prototype.byteLength",!0);e.exports=r?function(e){if(!e||"object"!=typeof e)return!1;try{return r(e),!0}catch(e){return!1}}:function(e){return!1}},6131:function(e,t,n){"use strict";var r=n(6254),o=n(7679),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7679:function(e,t,n){"use strict";var r=n(578),o=n(6254),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},901:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},578:function(e,t,n){"use strict";var r=n(901);e.exports=Function.prototype.bind||r},6254:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(2665)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(578),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},2665:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2408);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2408:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3082:function(e,t,n){"use strict";var r=Object.prototype.toString;if(n(9905)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&i.test(o.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},2527:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e){return!!r(e)}},9894:function(e,t,n){var r=n(4827);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o: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 i=e.nodeName,l=document.createElement(i);l.innerHTML="&nbsp;","TEXTAREA"===i.toUpperCase()&&l.setAttribute("rows","1");var a=r(e,"font-size");l.style.fontSize=a,l.style.padding="0px",l.style.border="0px";var s=document.body;s.appendChild(l),n=l.offsetHeight,s.removeChild(l)}return n}},7970:function(e,t,n){e.exports=n(195)},3110:function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},3812:function(e){var t,n,r,o,i,l,a,s,c,u,p,d,f,y,m,g=!1;function h(){if(!g){g=!0;var e=navigator.userAgent,h=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),b=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),f=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),y=/FBAN\/\w+;/i.exec(e),m=/Mobile/i.exec(e),p=!!/Win64/.exec(e),h){(t=h[1]?parseFloat(h[1]):h[5]?parseFloat(h[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var v=/(?:Trident\/(\d+.\d+))/.exec(e);l=v?parseFloat(v[1])+4:t,n=h[2]?parseFloat(h[2]):NaN,r=h[3]?parseFloat(h[3]):NaN,(o=h[4]?parseFloat(h[4]):NaN)?(h=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=h&&h[1]?parseFloat(h[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(b){if(b[1]){var _=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);a=!_||parseFloat(_[1].replace("_","."))}else a=!1;s=!!b[2],c=!!b[3]}else a=s=c=!1}}var b={ie:function(){return h()||t},ieCompatibilityMode:function(){return h()||l>t},ie64:function(){return b.ie()&&p},firefox:function(){return h()||n},opera:function(){return h()||r},webkit:function(){return h()||o},safari:function(){return b.webkit()},chrome:function(){return h()||i},windows:function(){return h()||s},osx:function(){return h()||a},linux:function(){return h()||c},iphone:function(){return h()||d},mobile:function(){return h()||d||f||u||m},nativeApp:function(){return h()||y},android:function(){return h()||u},ipad:function(){return h()||f}};e.exports=b},7939:function(e,t,n){"use strict";var r,o=n(3110);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @param {?boolean} capture Check if the capture phase is supported.
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var l=document.createElement("div");l.setAttribute(n,"return;"),i="function"==typeof l[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},195:function(e,t,n){"use strict";var r=n(3812),o=n(7939);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},8383:function(e,t,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=n(4418),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=l(e),a=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var y=c&&n;if(a&&e.length>0&&!o.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(r&&e.length>0)for(var g=0;g<e.length;++g)d.push(String(g));else for(var h in e)y&&"prototype"===h||!o.call(e,h)||d.push(String(h));if(s)for(var b=function(e){if("undefined"==typeof window||!f)return p(e);try{return p(e)}catch(e){return!1}}(e),v=0;v<u.length;++v)b&&"constructor"===u[v]||!o.call(e,u[v])||d.push(u[v]);return d}}e.exports=r},806:function(e,t,n){"use strict";var r=Array.prototype.slice,o=n(4418),i=Object.keys,l=i?function(e){return i(e)}:n(8383),a=Object.keys;l.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?a(r.call(e)):a(e)})}else Object.keys=l;return Object.keys||l},e.exports=l},4418:function(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},131:function(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5372:function(e,t,n){"use strict";var r=n(9567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,l){if(l!==r){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint: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:i,resetWarningCache:o};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=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 n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var a=n(9196),s=n(2652),c=n(6411),u=n(9894),p="autosize:resized",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 o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(p,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(p,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),s=l(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return a.createElement("textarea",i({},s,{onChange:this.onChange,style:u?i({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:s.number,maxRows:s.number,onResize:s.func,innerRef:s.any,async:s.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,i({},e,{innerRef:t}))}))},773:function(e,t,n){"use strict";var r=n(5438);t.Z=r.TextareaAutosize},4793:function(e){var t={"À":"A","Ã":"A","Â":"A","Ã":"A","Ä":"A","Ã…":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","È‚":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","ÃŒ":"I","Ã":"I","ÃŽ":"I","Ã":"I","Ḯ":"I","ÈŠ":"I","Ã":"D","Ñ":"N","Ã’":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","á»":"O","Ṍ":"O","á¹’":"O","ÈŽ":"O","Ù":"U","Ú":"U","Û":"U","Ãœ":"U","Ã":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","á»":"e","ḕ":"e","á¸":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","È‹":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","á¹":"o","ṓ":"o","È":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ä€":"A","Ä":"a","Ä‚":"A","ă":"a","Ä„":"A","Ä…":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","ÄŠ":"C","Ä‹":"c","ÄŒ":"C","Ä":"c","C̆":"C","c̆":"c","ÄŽ":"D","Ä":"d","Ä":"D","Ä‘":"d","Ä’":"E","Ä“":"e","Ä”":"E","Ä•":"e","Ä–":"E","Ä—":"e","Ę":"E","Ä™":"e","Äš":"E","Ä›":"e","Äœ":"G","Ç´":"G","Ä":"g","ǵ":"g","Äž":"G","ÄŸ":"g","Ä ":"G","Ä¡":"g","Ä¢":"G","Ä£":"g","Ĥ":"H","Ä¥":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","Ä©":"i","Ī":"I","Ä«":"i","Ĭ":"I","Ä­":"i","Ä®":"I","į":"i","Ä°":"I","ı":"i","IJ":"IJ","ij":"ij","Ä´":"J","ĵ":"j","Ķ":"K","Ä·":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ä»":"L","ļ":"l","Ľ":"L","ľ":"l","Ä¿":"L","Å€":"l","Å":"l","Å‚":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","Å„":"n","Å…":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","ÅŒ":"O","Å":"o","ÅŽ":"O","Å":"o","Å":"O","Å‘":"o","Å’":"OE","Å“":"oe","P̆":"P","p̆":"p","Å”":"R","Å•":"r","Å–":"R","Å—":"r","Ř":"R","Å™":"r","R̆":"R","r̆":"r","È’":"R","È“":"r","Åš":"S","Å›":"s","Åœ":"S","Å":"s","Åž":"S","Ș":"S","È™":"s","ÅŸ":"s","Å ":"S","Å¡":"s","ß":"ss","Å¢":"T","Å£":"t","È›":"t","Èš":"T","Ť":"T","Å¥":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","Å©":"u","Ū":"U","Å«":"u","Ŭ":"U","Å­":"u","Å®":"U","ů":"u","Å°":"U","ű":"u","Ų":"U","ų":"u","È–":"U","È—":"u","V̆":"V","v̆":"v","Å´":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","Å·":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Å»":"Z","ż":"z","Ž":"Z","ž":"z","Å¿":"s","Æ’":"f","Æ ":"O","Æ¡":"o","Ư":"U","Æ°":"u","Ç":"A","ÇŽ":"a","Ç":"I","Ç":"i","Ç‘":"O","Ç’":"o","Ç“":"U","Ç”":"u","Ç•":"U","Ç–":"u","Ç—":"U","ǘ":"u","Ç™":"U","Çš":"u","Ç›":"U","Çœ":"u","Ứ":"U","ứ":"u","Ṹ":"U","á¹¹":"u","Ǻ":"A","Ç»":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","Ç¿":"o","Þ":"TH","þ":"th","á¹”":"P","ṕ":"p","Ṥ":"S","á¹¥":"s","XÌ":"X","xÌ":"x","Ѓ":"Г","Ñ“":"г","ÐŒ":"К","Ñœ":"к","AÌ‹":"A","aÌ‹":"a","EÌ‹":"E","eÌ‹":"e","IÌ‹":"I","iÌ‹":"i","Ǹ":"N","ǹ":"n","á»’":"O","ồ":"o","á¹":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","áº":"w","Ỳ":"Y","ỳ":"y","È€":"A","È":"a","È„":"E","È…":"e","Ȉ":"I","ȉ":"i","ÈŒ":"O","È":"o","È":"R","È‘":"r","È”":"U","È•":"u","BÌŒ":"B","bÌŒ":"b","Č̣":"C","ÄÌ£":"c","Ê̌":"E","ê̌":"e","FÌŒ":"F","fÌŒ":"f","Ǧ":"G","ǧ":"g","Èž":"H","ÈŸ":"h","JÌŒ":"J","Ç°":"j","Ǩ":"K","Ç©":"k","MÌŒ":"M","mÌŒ":"m","PÌŒ":"P","pÌŒ":"p","QÌŒ":"Q","qÌŒ":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","VÌŒ":"V","vÌŒ":"v","WÌŒ":"W","wÌŒ":"w","XÌŒ":"X","xÌŒ":"x","YÌŒ":"Y","yÌŒ":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","á¸":"D","ḑ":"d","Ȩ":"E","È©":"e","Æ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z","й":"и","Й":"И","Ñ‘":"е","Ð":"Е"},n=Object.keys(t).join("|"),r=new RegExp(n,"g"),o=new RegExp(n,"");function i(e){return t[e]}var l=function(e){return e.replace(r,i)};e.exports=l,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=l},3002:function(e,t,n){"use strict";var r=n(8024)("%Array.prototype.concat%"),o=n(9386),i=n(3315)("Array.prototype.slice"),l=n(1489)()&&Symbol.isConcatSpreadable,a=[],s=l?o.apply(r,a):null,c=l?n(9277):null;e.exports=l?function(e){for(var t=0;t<arguments.length;t+=1){var n=arguments[t];if(n&&"object"==typeof n&&"boolean"==typeof n[l]){a[l]||(a[l]=!0);var r=c(n)?i(n):[n];r[l]=!0,arguments[t]=r}}return s(arguments)}:o(r,a)},3315:function(e,t,n){"use strict";var r=n(8024),o=n(9386),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},9386:function(e,t,n){"use strict";var r=n(5127),o=n(8024),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6850:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},5127:function(e,t,n){"use strict";var r=n(6850);e.exports=Function.prototype.bind||r},8024:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(330)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(5127),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},330:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1489);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1489:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9277:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1312:function(e,t,n){"use strict";var r=n(2137),o=n(6073),i=r("RegExp.prototype.exec"),l=n(1642);e.exports=function(e){if(!o(e))throw new l("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},2137:function(e,t,n){"use strict";var r=n(5273),o=n(381),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},381:function(e,t,n){"use strict";var r=n(3331),o=n(5273),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7780:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},3331:function(e,t,n){"use strict";var r=n(7780);e.exports=Function.prototype.bind||r},5273:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(6339)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(3331),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},6339:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6789);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6789:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6073:function(e,t,n){"use strict";var r,o,i,l,a=n(2137),s=n(4111)();if(s){r=a("Object.prototype.hasOwnProperty"),o=a("RegExp.prototype.exec"),i={};var c=function(){throw i};l={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(l[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=p(e,"lastIndex");if(!(t&&r(t,"value")))return!1;try{o(e,l)}catch(e){return e===i}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},4521:function(e,t,n){"use strict";var r=n(1757),o=n(2656),i=n(8198)(),l=n(3828),a=n(1642),s=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&l){var u=l(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},5371:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},9015:function(e,t,n){"use strict";var r=n(5371);e.exports=Function.prototype.bind||r},1757:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(1207)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(9015),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},1207:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2326);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2326:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5467:function(e,t,n){"use strict";var r=n(7998),o=n(6245),i=n(6907)("String.prototype.replace"),l=/^\s$/.test("á Ž"),a=l?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=l?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var e=o(r(this));return i(i(e,a,""),s,"")}},4113:function(e,t,n){"use strict";var r=n(7618),o=n(5213),i=n(7998),l=n(5467),a=n(5626),s=n(1029),c=r(a()),u=function(e){return i(e),c(e)};o(u,{getPolyfill:a,implementation:l,shim:s}),e.exports=u},6907:function(e,t,n){"use strict";var r=n(5037),o=n(7618),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7618:function(e,t,n){"use strict";var r=n(1769),o=n(5037),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},5213:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)c(e,i[a],t[i[a]],n[i[a]])};u.supportsDescriptors=!!s,e.exports=u},1032:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},1769:function(e,t,n){"use strict";var r=n(1032);e.exports=Function.prototype.bind||r},5037:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(5570)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(1769),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5570:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5889);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5889:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5626:function(e,t,n){"use strict";var r=n(5467),o="á Ž";e.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&o.trim()===o&&"_á Ž"==="_á Ž".trim()&&"á Ž_"==="á Ž_".trim()?String.prototype.trim:r}},1029:function(e,t,n){"use strict";var r=n(5213),o=n(5626);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},3124:function(e,t,n){"use strict";var r=n(4010),o=n(1140),i=n(3828);function l(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)}var c=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},u=Object.prototype.propertyIsEnumerable,p=Object.getOwnPropertySymbols;function d(e){var t=c(e);if(p)for(var n=p(e),r=0;r<n.length;r++)u.call(e,n[r])&&t.push(n[r]);return t}var f=Object.prototype.hasOwnProperty||function(e,t){return t in e};function y(e,t){return"function"!=typeof i||!i(e,t).writable}function m(e,t){if("object"==typeof e&&null!==e){var n;if(a(e))n=[];else if("[object Date]"===l(e))n=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===l(e)}(e))n=new RegExp(e);else if(function(e){return"[object Error]"===l(e)}(e))n={message:e.message};else if(function(e){return"[object Boolean]"===l(e)}(e)||function(e){return"[object Number]"===l(e)}(e)||function(e){return"[object String]"===l(e)}(e))n=Object(e);else{if(r(e))return o(e);if(Object.create&&Object.getPrototypeOf)n=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)n={};else{var i=e.constructor&&e.constructor.prototype||e.__proto__||{},u=function(){};u.prototype=i,n=new u}}return s((t.includeSymbols?d:c)(e),(function(t){n[t]=e[t]})),n}return e}var g={__proto__:null};function h(e,t){var n=[],r=[],o=!0,i=arguments.length>2?arguments[2]:g,l=i.includeSymbols?d:c,u=!!i.immutable;return function e(c){var p=u?m(c,i):c,d={},g=!0,h={node:p,node_:c,path:[].concat(n),parent:r[r.length-1],parents:r,key:n[n.length-1],isRoot:0===n.length,level:n.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(g=!1)},delete:function(e){delete h.parent.node[h.key],e&&(g=!1)},remove:function(e){a(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(g=!1)},keys:null,before:function(e){d.before=e},after:function(e){d.after=e},pre:function(e){d.pre=e},post:function(e){d.post=e},stop:function(){o=!1},block:function(){g=!1}};if(!o)return h;function b(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0===h.keys.length;for(var e=0;e<r.length;e++)if(r[e].node_===c){h.circular=r[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}b();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),d.before&&d.before.call(h,h.node),g?("object"!=typeof h.node||null===h.node||h.circular||(r.push(h),b(),s(h.keys,(function(t,r){n.push(t),d.pre&&d.pre.call(h,h.node[t],t);var o=e(h.node[t]);u&&f.call(h.node,t)&&!y(h.node,t)&&(h.node[t]=o.node),o.isLast=r===h.keys.length-1,o.isFirst=0===r,d.post&&d.post.call(h,o),n.pop()})),r.pop()),d.after&&d.after.call(h,h.node),h):h}(e).node}function b(e){this.options=arguments.length>1?arguments[1]:g,this.value=e}function v(e){var t=arguments.length>1?arguments[1]:g;return new b(e,t)}b.prototype.get=function(e){for(var t=this.value,n=0;t&&n<e.length;n++){var r=e[n];if(!f.call(t,r)||!this.options.includeSymbols&&"symbol"==typeof r)return;t=t[r]}return t},b.prototype.has=function(e){for(var t=this.value,n=0;t&&n<e.length;n++){var r=e[n];if(!f.call(t,r)||!this.options.includeSymbols&&"symbol"==typeof r)return!1;t=t[r]}return!0},b.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];f.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},b.prototype.map=function(e){return h(this.value,e,{__proto__:null,immutable:!0,includeSymbols:!!this.options.includeSymbols})},b.prototype.forEach=function(e){return this.value=h(this.value,e,this.options),this.value},b.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},b.prototype.paths=function(){var e=[];return this.forEach((function(){e.push(this.path)})),e},b.prototype.nodes=function(){var e=[];return this.forEach((function(){e.push(this.node)})),e},b.prototype.clone=function(){var e=[],t=[],n=this.options;return r(this.value)?o(this.value):function r(o){for(var i=0;i<e.length;i++)if(e[i]===o)return t[i];if("object"==typeof o&&null!==o){var l=m(o,n);return e.push(o),t.push(l),s((n.includeSymbols?d:c)(o),(function(e){l[e]=r(o[e])})),e.pop(),t.pop(),l}return o}(this.value)},s(d(b.prototype),(function(e){v[e]=function(t){var n=[].slice.call(arguments,1),r=new b(t);return r[e].apply(r,n)}})),e.exports=v},6740:function(e,t,n){"use strict";var r=n(1642),o=n(6798)("TypedArray.prototype.buffer",!0),i=n(2527);e.exports=o||function(e){if(!i(e))throw new r("Not a Typed Array");return e.buffer}},6798:function(e,t,n){"use strict";var r=n(1634),o=n(8388),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},8388:function(e,t,n){"use strict";var r=n(7715),o=n(1634),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},9003:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},7715:function(e,t,n){"use strict";var r=n(9003);e.exports=Function.prototype.bind||r},1634:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(263)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(7715),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},263:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9184);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9184:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7046:function(e,t,n){"use strict";var r=n(4843),o=n(2526),i=n(4343)(),l={},a=n(1856)(),s=n(3828),c=Object.defineProperty;if(s){var u=function(e){return e.byteOffset};r(i,(function(e){if("function"==typeof n.g[e]||"object"==typeof n.g[e]){var t=n.g[e].prototype,r=s(t,"byteOffset");if(!r&&a){var i=t.__proto__;r=s(i,"byteOffset")}if(r&&r.get)l[e]=o(r.get);else if(c){var p=new n.g[e](2);(r=s(p,"byteOffset"))&&r.configurable&&c(p,"length",{value:3}),2===p.length&&(l[e]=u)}}}))}var p=n(2527);e.exports=function(e){return!!p(e)&&function(e){var t;return r(l,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},2526:function(e,t,n){"use strict";var r=n(1530),o=n(3699),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1609:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},1530:function(e,t,n){"use strict";var r=n(1609);e.exports=Function.prototype.bind||r},3699:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(5162)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(1530),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5162:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(3903);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},3903:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8150:function(e,t,n){"use strict";var r=n(4888),o=n(4843),i=n(3828),l=n(1856)(),a=n(2527),s=n(131),c={__proto__:null},u=Object.defineProperty;if(i){var p=function(e){return e.length};o(s,(function(e){var t=n.g[e];if("function"==typeof t||"object"==typeof t){var o=t.prototype,a=i(o,"length");if(!a&&l){var s=o.__proto__;a=i(s,"length")}if(a&&a.get)c["$"+e]=r(a.get);else if(u){var d=new n.g[e](2);(a=i(d,"length"))&&a.configurable&&u(d,"length",{value:3}),2===d.length&&(c["$"+e]=p)}}}))}e.exports=function(e){return!!a(e)&&function(e){var t;return o(c,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},4888:function(e,t,n){"use strict";var r=n(3576),o=n(8031),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7380:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},3576:function(e,t,n){"use strict";var r=n(7380);e.exports=Function.prototype.bind||r},8031:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(307)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(3576),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},307:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1766);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1766:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4073:function(e,t,n){"use strict";var r=n(1642),o=n(3675),i=n(9661),l=n(1320),a=n(1367),s=n(2967),c=n(8055),u=n(3383),p=n(2897),d=n(7249),f=n(9149),y=n(1586),m=n(817),g=n(3842),h=n(6740),b=n(7046);e.exports=function(e,t){var n=this;g(n,"SEQ-CST");var v,_=n.length,k=p(e);v=k===-1/0?0:k<0?a(_+k,0):s(k,_);var S,E=void 0===t?_:p(t);S=E===-1/0?0:E<0?a(_+E,0):s(E,_);var w=a(S-v,0),A=m(n,[w]);if(w>0){if(l(h(n)))throw new r("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");if(y(n)===y(A))for(var C=h(n),I=h(A),x=f(n),B=v*x+b(n),P=b(A),T=P+w*x;P<T;){var O=i(C,B,"UINT8",!0,"UNORDERED");u(I,P,"UINT8",O,!0,"UNORDERED"),B+=1,P+=1}else for(var R=0;v<S;){var N=d(v),F=o(n,N);c(A,d(R),F,!0),v+=1,R+=1}}return A}},1140:function(e,t,n){"use strict";var r=n(6776),o=n(8374),i=n(4073),l=n(5046),a=n(8564),s=o(l());r(s,{getPolyfill:l,implementation:i,shim:a}),e.exports=s},1154:function(e,t,n){"use strict";var r=n(682),o=n(8374),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},8374:function(e,t,n){"use strict";var r=n(8474),o=n(682),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6776:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)c(e,i[a],t[i[a]],n[i[a]])};u.supportsDescriptors=!!s,e.exports=u},2855:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},8474:function(e,t,n){"use strict";var r=n(2855);e.exports=Function.prototype.bind||r},682:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(5314)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(8474),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5314:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6188);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6188:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6841:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),p=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(p=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)&&a(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(l(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},5726:function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,l=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&"function"==typeof s.get?s.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,h=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,_=String.prototype.toUpperCase,k=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,w=Array.prototype.join,A=Array.prototype.slice,C=Math.floor,I="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,R=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-C(-e):C(e);if(r!==e){var o=String(r),i=b.call(t,o.length+1);return v.call(o,n,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,n,"$&_")}var F=n(5794),M=F.custom,D=V(M)?M:null;function L(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return v.call(String(e),/"/g,"&quot;")}function j(e){return!("[object Array]"!==W(e)||T&&"object"==typeof e&&T in e)}function z(e){return!("[object RegExp]"!==W(e)||T&&"object"==typeof e&&T in e)}function V(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!B)return!1;try{return B.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,a){var s=r||{};if(H(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!H(s,"customInspect")||s.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var S=String(t);return _?N(t,S):S}if("bigint"==typeof t){var C=String(t)+"n";return _?N(t,C):C}var x=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=x&&x>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var M=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=w.call(Array(e.indent+1)," ")}return{base:n,prev:w.call(Array(t+1),n)}}(s,o);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function G(t,n,r){if(n&&(a=A.call(a)).push(n),r){var i={depth:s.depth};return H(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,o+1,a)}return e(t,s,o+1,a)}if("function"==typeof t&&!z(t)){var q=function(e){if(e.name)return e.name;var t=h.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,G);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(ee.length>0?" { "+w.call(ee,", ")+" }":"")}if(V(t)){var te=P?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(t);return"object"!=typeof t||P?te:J(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+k.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe<re.length;oe++)ne+=" "+re[oe].name+"="+L(U(re[oe].value),"double",s);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+="</"+k.call(String(t.nodeName))+">"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,G);return M&&!function(e){for(var t=0;t<e.length;t++)if($(e[t],"\n")>=0)return!1;return!0}(ie)?"["+Z(ie,M)+"]":"[ "+w.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)){var le=X(t,G);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(le,", ")+" }":"{ ["+String(t)+"] "+w.call(E.call("[cause]: "+G(t.cause),le),", ")+" }"}if("object"==typeof t&&m){if(D&&"function"==typeof t[D]&&F)return F(t,{depth:x-o});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return l&&l.call(t,(function(e,n){ae.push(G(n,t,!0)+" => "+G(e,t))})),Q("Map",i.call(t),ae,M)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(G(e,t))})),Q("Set",c.call(t),se,M)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(Number(t)));if(function(e){if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}(t))return J(G(I.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(y.call(t));if(function(e){return!("[object String]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)&&!z(t)){var ce=X(t,G),ue=R?R(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",de=!ue&&T&&Object(t)===t&&T in t?b.call(W(t),8,-1):pe?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||pe?"["+w.call(E.call([],de||[],pe||[]),": ")+"] ":"");return 0===ce.length?fe+"{}":M?fe+"{"+Z(ce,M)+"}":fe+"{ "+w.call(ce,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function W(e){return m.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function K(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(b.call(e,0,t.maxStringLength),t)+r}return L(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",t)}function q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?Z(n,r):w.call(n,", "))+"}"}function Z(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+w.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=H(e,o)?t(e[o],e):""}var i,l="function"==typeof x?x(e):[];if(P){i={};for(var a=0;a<l.length;a++)i["$"+l[a]]=l[a]}for(var s in e)H(e,s)&&(n&&String(Number(s))===s&&s<e.length||P&&i["$"+s]instanceof Symbol||(S.call(/[^\w$]/,s)?r.push(t(s,e)+": "+t(e[s],e)):r.push(s+": "+t(e[s],e))));if("function"==typeof x)for(var c=0;c<l.length;c++)O.call(e,l[c])&&r.push("["+t(l[c])+"]: "+t(e[l[c]],e));return r}},5046:function(e,t,n){"use strict";var r=n(4073);e.exports=function(){return"function"==typeof Uint8Array&&Uint8Array.prototype.slice||r}},8564:function(e,t,n){"use strict";var r=n(6776),o=n(9495),i=n(5046);e.exports=function(){if("function"==typeof Uint8Array){var e=i(),t=o(Uint8Array.prototype);r(t,{slice:e},{slice:function(){return t.slice!==e}})}return e}},4010:function(e,t,n){"use strict";var r=n(4843),o=n(4343),i=n(4899),l=n(7120),a=n(3828),s=l("Object.prototype.toString"),c=n(4111)(),u="undefined"==typeof globalThis?n.g:globalThis,p=o(),d=l("String.prototype.slice"),f=Object.getPrototypeOf,y=l("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},m={__proto__:null};r(p,c&&a&&f?function(e){var t=new u[e];if(Symbol.toStringTag in t){var n=f(t),r=a(n,Symbol.toStringTag);if(!r){var o=f(n);r=a(o,Symbol.toStringTag)}m["$"+e]=i(r.get)}}:function(e){var t=new u[e],n=t.slice||t.set;n&&(m["$"+e]=i(n))});e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=d(s(e),8,-1);return y(p,t)>-1?t:"Object"===t&&function(e){var t=!1;return r(m,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return r(m,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},7120:function(e,t,n){"use strict";var r=n(6883),o=n(4899),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},4899:function(e,t,n){"use strict";var r=n(7961),o=n(6883),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7562:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},l=function(e,t){for(var n=[],r=t||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},a=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};e.exports=function(e){var s=this;if("function"!=typeof s||n.apply(s)!==o)throw new TypeError(t+s);for(var c,u=l(arguments,1),p=function(){if(this instanceof c){var t=s.apply(this,i(u,arguments));return Object(t)===t?t:this}return s.apply(e,i(u,arguments))},d=r(0,s.length-u.length),f=[],y=0;y<d;y++)f[y]="$"+y;if(c=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(p),s.prototype){var m=function(){};m.prototype=s.prototype,c.prototype=new m,m.prototype=null}return c}},7961:function(e,t,n){"use strict";var r=n(7562);e.exports=Function.prototype.bind||r},6883:function(e,t,n){"use strict";var r,o=n(6716),i=n(6788),l=n(9204),a=n(9908),s=n(6724),c=n(1642),u=n(1451),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var y=function(){throw new c},m=f?function(){try{return y}catch(e){try{return f(arguments,"callee").get}catch(e){return y}}}():y,g=n(8861)(),h=n(1856)(),b=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):r,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));k["%Error.prototype%"]=S}var E=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(n=b(o.prototype))}return k[t]=n,n},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(7961),C=n(9429),I=A.call(Function.call,Array.prototype.concat),x=A.call(Function.apply,Array.prototype.splice),B=A.call(Function.call,String.prototype.replace),P=A.call(Function.call,String.prototype.slice),T=A.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e){var t=P(e,0,1),n=P(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return B(e,O,(function(e,t,n,o){r[r.length]=n?B(o,R,"$1"):t||e})),r},F=function(e,t){var n,r=e;if(C(w,r)&&(r="%"+(n=w[r])[0]+"%"),C(k,r)){var o=k[r];if(o===v&&(o=E(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=N(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p<n.length;p+=1){var y=n[p],m=P(y,0,1),g=P(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==y&&d||(a=!0),C(k,i="%"+(r+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&p+1>=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},8861:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(704);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},704:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9196:function(e){"use strict";e.exports=window.React},5794:function(){},4343:function(e,t,n){"use strict";var r=n(131),o="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof o[r[t]]&&(e[e.length]=r[t]);return e}},7153:function(e,t){var n;
/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=l(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=l(t,n));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},6245:function(e,t,n){"use strict";var r=n(5037)("%String%"),o=n(1642);e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return r(e)}},2981:function(e,t,n){"use strict";var r=n(1642),o=n(1320),i=n(4602),l=n(5604),a=n(480);e.exports=function(e,t){var n=l(e);if(!i(e)&&!n)throw new r("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(o(e))throw new r("Assertion failed: `arrayBuffer` must not be detached");return a(e)}},6548:function(e,t,n){"use strict";var r=n(682)("%BigInt%",!0),o=n(9204),i=n(1642),l=r&&r(0);e.exports=function(e,t){if("bigint"!=typeof e||"bigint"!=typeof t)throw new i("Assertion failed: `n` and `d` arguments must be BigInts");if(t===l)throw new o("Division by zero");return e===l?l:e%t}},9002:function(e,t,n){"use strict";var r=n(1642),o=n(6862),i=n(208),l=n(8367),a=n(4065),s=n(9762),c=n(3392),u=n(8110),p=n(9655);e.exports=function(e,t,n){if("Object"!==p(e))throw new r("Assertion failed: Type(O) is not Object");if(!s(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var d=o(n)?n:u(n);if(!o(d))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return i(a,c,l,e,t,d)}},8367:function(e,t,n){"use strict";var r=n(1642),o=n(6862),i=n(2646);e.exports=function(e){if(void 0!==e&&!o(e))throw new r("Assertion failed: `Desc` must be a Property Descriptor");return i(e)}},3675:function(e,t,n){"use strict";var r=n(1642),o=n(5726),i=n(9762),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+o(t));return e[t]}},9661:function(e,t,n){"use strict";var r=n(682),o=n(6724),i=n(1642),l=r("%Uint8Array%",!0),a=n(1154)("Array.prototype.slice"),s=n(6156),c=n(1320),u=n(9219),p=n(4602),d=n(5604),f=n(3002),y=n(2170),m=n(2142);e.exports=function(e,t,n,r,g){var h=d(e);if(!p(e)&&!h)throw new i("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!s(t))throw new i("Assertion failed: `byteIndex` must be an integer");if("string"!=typeof n||"number"!=typeof y.size["$"+n])throw new i("Assertion failed: `type` must be a Typed Array element type");if("boolean"!=typeof r)throw new i("Assertion failed: `isTypedArray` must be a boolean");if("SEQ-CST"!==g&&"UNORDERED"!==g)throw new i("Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`");if(arguments.length>5&&"boolean"!=typeof arguments[5])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: `arrayBuffer` is detached");if(t<0)throw new i("Assertion failed: `byteIndex` must be non-negative");var b,v=y.size["$"+n];if(!v)throw new i('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');if(h)throw new o("SharedArrayBuffer is not supported by this implementation");b=a(new l(e,t),0,v);var _=arguments.length>5?arguments[5]:"little"===m,k=_?a(f([0,0,0,0,0,0,0,0],b),-v):a(f(b,[0,0,0,0,0,0,0,0]),0,v);return u(n,k,_)}},5584:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(9762),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!i(t))throw new r("Assertion failed: `P` must be a Property Key");return o(e,t)}},2985:function(e,t,n){"use strict";e.exports=n(692)},4734:function(e){"use strict";e.exports=function(e){return"BIGUINT64"===e||"BIGINT64"===e}},3071:function(e,t,n){"use strict";e.exports=n(6841)},7010:function(e,t,n){"use strict";var r=n(4342)("%Reflect.construct%",!0),o=n(9002);try{o({},"",{"[[Get]]":function(){}})}catch(e){o=null}if(o&&r){var i={},l={};o(l,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,l)}catch(e){return e===i}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},4065:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(6862);e.exports=function(e){if(void 0===e)return!1;if(!i(e))throw new r("Assertion failed: `Desc` must be a Property Descriptor");return!(!o(e,"[[Value]]")&&!o(e,"[[Writable]]"))}},1320:function(e,t,n){"use strict";var r=n(1642),o=n(480),i=n(4343)(),l=n(1154),a=n(4602),s=n(5604),c=l("SharedArrayBuffer.prototype.byteLength",!0);e.exports=function(e){var t=s(e);if(!a(e)&&!t)throw new r("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if(0===(t?c:o)(e))try{new n.g[i[0]](e)}catch(e){return!!e&&"TypeError"===e.name}return!1}},9442:function(e,t,n){"use strict";var r=n(1642),o=n(1154),i=o("%ArrayBuffer.prototype.resizable%",!0),l=o("%SharedArrayBuffer.prototype.growable%",!0),a=n(4602),s=n(5604);e.exports=function(e){var t=a(e),n=s(e);if(!t&&!n)throw new r("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return t&&i?!i(e):!n||!l||!l(e)}},9762:function(e){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},9954:function(e,t,n){"use strict";var r=n(1642),o=n(1320),i=n(9149),l=n(359),a=n(6740),s=n(7046),c=n(8150);e.exports=function(e){if(!l(e))throw new r("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var t=e["[[Object]]"],n=e["[[CachedBufferByteLength]]"];if(o(a(t))&&"DETACHED"!==n)throw new r("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if("DETACHED"===n)return!0;var u,p=s(t),d=c(t);"AUTO"===d?u=n:u=p+d*i(t);return p>n||u>n}},7551:function(e){"use strict";e.exports=function(e){return"UINT8"===e||"UINT8C"===e||"UINT16"===e||"UINT32"===e||"BIGUINT64"===e}},6005:function(e,t,n){"use strict";var r=n(1642),o=n(2981),i=n(1320),l=n(2527),a=n(6740);e.exports=function(e,t){if(!l(e))throw new r("Assertion failed: `obj` must be a Typed Array");if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=a(e);return{"[[Object]]":e,"[[CachedBufferByteLength]]":i(n)?"DETACHED":o(n,t)}}},4604:function(e,t,n){"use strict";var r=n(1642),o=n(5584),i=n(1242),l=n(2947),a=n(3181),s=n(2587),c=n(5562),u=n(5465),p=n(5964),d=n(9496),f=n(6550),y=n(3647),m=n(7511),g=n(1520),h=n(806),b={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},v={__proto__:null,INT8:c,UINT8:d,UINT8C:f,INT16:a,UINT16:u,INT32:s,UINT32:p,BIGINT64:i,BIGUINT64:l};e.exports=function(e,t,n){if("string"!=typeof e||!o(b,e))throw new r("Assertion failed: `type` must be a TypedArray element type: "+h(b));if("number"!=typeof t&&"bigint"!=typeof t)throw new r("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof n)throw new r("Assertion failed: `isLittleEndian` must be a Boolean");if("FLOAT32"===e)return y(t,n);if("FLOAT64"===e)return m(t,n);var i=b[e],l=(0,v[e])(t);return g(l,i,n)}},9219:function(e,t,n){"use strict";var r=n(682),o=n(1154),i=n(9204),l=n(6724),a=n(1642),s=r("%BigInt%",!0),c=n(5584),u=n(2985),p=n(4734),d=n(7551),f=n(8727),y=n(7604),m=n(2367),g=n(8172),h=n(1824),b=o("Array.prototype.reverse"),v=o("Array.prototype.slice"),_=n(806),k={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};e.exports=function(e,t,n){if(!c(k,e))throw new a("Assertion failed: `type` must be a TypedArray element type: "+_(k));if(!u(t)||!g(t,h))throw new a("Assertion failed: `rawBytes` must be an Array of bytes");if("boolean"!=typeof n)throw new a("Assertion failed: `isLittleEndian` must be a Boolean");var r=k[e];if(t.length!==r)throw new i("Assertion failed: `rawBytes` must have a length of "+r+" for type "+e);var o=p(e);if(o&&!s)throw new l("this environment does not support BigInts");return t=v(t,0,r),n||b(t),"FLOAT32"===e?f(t):"FLOAT64"===e?y(t):m(t,r,d(e),o)}},3392:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},8055:function(e,t,n){"use strict";var r=n(1642),o=n(9762),i=n(3392),l=n(9655),a=function(){try{return delete[].length,!0}catch(e){return!1}}();e.exports=function(e,t,n,s){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");if("boolean"!=typeof s)throw new r("Assertion failed: `Throw` must be a Boolean");if(s){if(e[t]=n,a&&!i(e[t],n))throw new r("Attempted to assign to readonly property.");return!0}try{return e[t]=n,!a||i(e[t],n)}catch(e){return!1}}},3383:function(e,t,n){"use strict";var r=n(682),o=n(6724),i=n(1642),l=r("%Uint8Array%",!0),a=n(6156),s=n(4734),c=n(1320),u=n(4604),p=n(4602),d=n(5604),f=n(9429),y=n(2170),m=n(2142),g=n(9065);e.exports=function(e,t,n,r,h,b){var v=d(e);if(!p(e)&&!v)throw new i("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!a(t)||t<0)throw new i("Assertion failed: `byteIndex` must be a non-negative integer");if("string"!=typeof n||!f(y.size,"$"+n))throw new i("Assertion failed: `type` must be a Typed Array Element Type");if("number"!=typeof r&&"bigint"!=typeof r)throw new i("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof h)throw new i("Assertion failed: `isTypedArray` must be a boolean");if("SEQ-CST"!==b&&"UNORDERED"!==b&&"INIT"!==b)throw new i('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: ArrayBuffer is detached");if(s(n)?"bigint"!=typeof r:"number"!=typeof r)throw new i("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var _=y.size["$"+n],k=arguments.length>6?arguments[6]:"little"===m,S=u(n,r,k);if(v)throw new o("SharedArrayBuffer is not supported by this implementation");var E=new l(e,t,_);g(S,(function(e,t){E[t]=e}))}},5994:function(e,t,n){"use strict";var r=n(682)("%Symbol.species%",!0),o=n(1642),i=n(7010),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new o("Assertion failed: Type(O) is not Object");var n=e.constructor;if(void 0===n)return t;if("Object"!==l(n))throw new o("O.constructor is not an Object");var a=r?n[r]:void 0;if(null==a)return t;if(i(a))return a;throw new o("no constructor found")}},907:function(e,t,n){"use strict";var r=n(682)("%BigInt%",!0),o=n(1642),i=n(6724);e.exports=function(e){if("string"!=typeof e)throw new o("`argument` must be a string");if(!r)throw new i("BigInts are not supported in this environment");try{return r(e)}catch(e){return}}},4967:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%RegExp%"),l=n(1642),a=r("%parseInt%"),s=n(1154),c=n(1312),u=s("String.prototype.slice"),p=c(/^0b[01]+$/i),d=c(/^0o[0-7]+$/i),f=c(/^[-+]0x[0-9a-f]+$/i),y=c(new i("["+["Â…","​","￾"].join("")+"]","g")),m=n(4113);e.exports=function e(t){if("string"!=typeof t)throw new l("Assertion failed: `argument` is not a String");if(p(t))return o(a(u(t,2),2));if(d(t))return o(a(u(t,2),8));if(y(t)||f(t))return NaN;var n=m(t);return n!==t?e(n):o(t)}},9752:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Number%"),l=n(1642),a=n(6724),s=n(907),c=n(210);e.exports=function(e){if(!o)throw new a("BigInts are not supported in this environment");var t=c(e,i);if(null==t)throw new l("Cannot convert null or undefined to a BigInt");if("boolean"==typeof t)return o(t?1:0);if("number"==typeof t)throw new l("Cannot convert a Number value to a BigInt");if("string"==typeof t){var n=s(t);if(void 0===n)throw new l("Failed to parse String to BigInt");return n}if("symbol"==typeof t)throw new l("Cannot convert a Symbol value to a BigInt");if("bigint"!=typeof t)throw new a("Assertion failed: unknown primitive type");return t}},1242:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,31)),u=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e),n=s(a,t,u);return n>=c?n-u:n}},2947:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e);return s(a,t,c)}},6440:function(e){"use strict";e.exports=function(e){return!!e}},3181:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return a>=32768?a-65536:a}},2587:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991),a=4294967296;e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),s=r(n,a),c=s>=2147483648?s-a:s;return 0===c?0:c}},5562:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,256);return a>=128?a-256:a}},2897:function(e,t,n){"use strict";var r=n(3438),o=n(736),i=n(9404),l=n(7991);e.exports=function(e){var t=r(e);return i(t)||0===t?0:l(t)?o(t):t}},3438:function(e,t,n){"use strict";var r=n(682),o=n(1642),i=r("%Number%"),l=n(4968),a=n(210),s=n(4967);e.exports=function(e){var t=l(e)?e:a(e,i);if("symbol"==typeof t)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?s(t):i(t)}},210:function(e,t,n){"use strict";var r=n(5249);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},8110:function(e,t,n){"use strict";var r=n(9429),o=n(1642),i=n(9655),l=n(6440),a=n(3071);e.exports=function(e){if("Object"!==i(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=l(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=l(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=l(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!a(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var s=e.set;if(void 0!==s&&!a(s))throw new o("setter must be a function");t["[[Set]]"]=s}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},7249:function(e,t,n){"use strict";var r=n(682)("%String%"),o=n(1642);e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return r(e)}},5465:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return 0===a?0:a}},5964:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,4294967296);return 0===a?0:a}},9496:function(e,t,n){"use strict";var r=n(7991),o=n(8457),i=n(3438),l=n(736);e.exports=function(e){var t=i(e);if(!r(t)||0===t)return 0;var n=l(t);return o(n,256)}},6550:function(e,t,n){"use strict";var r=n(3832),o=n(3438),i=n(3473),l=n(9404);e.exports=function(e){var t=o(e);if(l(t))return 0;var n=r(t,0,255),a=i(n);return n<a+.5?a:n>a+.5?a+1:a%2==0?a:a+1}},9655:function(e,t,n){"use strict";var r=n(1528);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},7265:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(2985),l=n(7010),a=n(9954),s=n(8921),c=n(3842),u=n(4343)();e.exports=function(e,t){if(!l(e))throw new o("Assertion failed: `constructor` must be a constructor");if(!i(t))throw new o("Assertion failed: `argumentList` must be a List");if(0===u.length)throw new r("Assertion failed: Typed Arrays are not supported in this environment");var n;n=0===t.length?new e:1===t.length?new e(t[0]):2===t.length?new e(t[0],t[1]):new e(t[0],t[1],t[2]);var p=c(n,"SEQ-CST");if(1===t.length&&"number"==typeof t[0]){if(a(p))throw new o("new Typed Array is out of bounds");if(s(p)<t[0])throw new o("`argumentList[0]` must be <= `newTypedArray.length`")}return n}},9149:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(6156),l=n(4010),a=n(2170);e.exports=function(e){var t=l(e);if(!1===t)throw new o("Assertion failed: `O` must be a TypedArray");var n=a.size["$"+a.name["$"+t]];if(!i(n)||n<0)throw new r("Assertion failed: Unknown TypedArray type `"+t+"`");return n}},1586:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(4010),l=n(2170);e.exports=function(e){var t=i(e);if(!1===t)throw new o("Assertion failed: `O` must be a TypedArray");var n=l.name["$"+t];if("string"!=typeof n)throw new r("Assertion failed: Unknown TypedArray type `"+t+"`");return n}},8921:function(e,t,n){"use strict";var r=n(1642),o=n(3473),i=n(9442),l=n(9954),a=n(9149),s=n(359),c=n(6740),u=n(7046),p=n(8150);e.exports=function(e){if(!s(e))throw new r("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");if(l(e))throw new r("Assertion failed: `taRecord` is out of bounds");var t=e["[[Object]]"],n=p(t);if("AUTO"!==n)return n;if(i(c(t)))throw new r("Assertion failed: array buffer is not fixed length");var d=u(t),f=a(t),y=e["[[CachedBufferByteLength]]"];if("DETACHED"===y)throw new r("Assertion failed: typed array is detached");return o((y-d)/f)}},817:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(4010),l=n(4343)(),a=n(2985),s=n(5994),c=n(7265),u=n(9660);e.exports=function(e,t){if(0===l.length)throw new r("Assertion failed: Typed Arrays are not supported in this environment");var n=i(e);if(!n)throw new o("Assertion failed: exemplar must be a TypedArray");if(!a(t))throw new o("Assertion failed: `argumentList` must be a List");var p=u(n);if("function"!=typeof p)throw new r("Assertion failed: `constructor` of `exemplar` ("+n+") must exist. Please report this!");var d=s(e,p);return c(d,t)}},3842:function(e,t,n){"use strict";var r=n(1642),o=n(9954),i=n(6005),l=n(9655),a=n(2527);e.exports=function(e,t){if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!a(e))throw new r("Assertion failed: `O` must be a Typed Array");var n=i(e,t);if(o(n))throw new r("`O` must be in-bounds and backed by a non-detached buffer");return n}},3832:function(e,t,n){"use strict";var r=n(682),o=n(1642),i=r("%Math.max%"),l=r("%Math.min%");e.exports=function(e,t,n){if("number"!=typeof e||"number"!=typeof t||"number"!=typeof n||!(t<=n))throw new o("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`");return l(i(t,e),n)}},3473:function(e){"use strict";var t=Math.floor;e.exports=function(e){return"bigint"==typeof e?e:t(e)}},1367:function(e,t,n){"use strict";var r=n(682);e.exports=r("%Math.max%")},2967:function(e,t,n){"use strict";var r=n(682);e.exports=r("%Math.min%")},8457:function(e,t,n){"use strict";var r=n(2076);e.exports=function(e,t){return r(e,t)}},2170:function(e){"use strict";e.exports={__proto__:null,name:{__proto__:null,$Int8Array:"INT8",$Uint8Array:"UINT8",$Uint8ClampedArray:"UINT8C",$Int16Array:"INT16",$Uint16Array:"UINT16",$Int32Array:"INT32",$Uint32Array:"UINT32",$BigInt64Array:"BIGINT64",$BigUint64Array:"BIGUINT64",$Float32Array:"FLOAT32",$Float64Array:"FLOAT64"},size:{__proto__:null,$INT8:1,$UINT8:1,$UINT8C:1,$INT16:2,$UINT16:2,$INT32:4,$UINT32:4,$BIGINT64:8,$BIGUINT64:8,$FLOAT32:4,$FLOAT64:8}}},736:function(e,t,n){"use strict";var r=n(3473),o=n(1642);e.exports=function(e){if("number"!=typeof e&&"bigint"!=typeof e)throw new o("argument must be a Number or a BigInt");var t=e<0?-r(-e):r(e);return 0===t?0:t}},1528:function(e){"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},4342:function(e,t,n){"use strict";e.exports=n(682)},208:function(e,t,n){"use strict";var r=n(8198),o=n(8918),i=r.hasArrayLengthDefineBug(),l=i&&n(692),a=n(1154)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,n,r,s,c){if(!o){if(!e(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(s in r&&a(r,s)!==!!c["[[Enumerable]]"])return!1;var u=c["[[Value]]"];return r[s]=u,t(r[s],u)}return i&&"length"===s&&"[[Value]]"in c&&l(r)&&r.length!==c["[[Value]]"]?(r.length=c["[[Value]]"],r.length===c["[[Value]]"]):(o(r,s,n(c)),!0)}},692:function(e,t,n){"use strict";var r=n(682)("%Array%"),o=!r.isArray&&n(1154)("Object.prototype.toString");e.exports=r.isArray||function(e){return"[object Array]"===o(e)}},8727:function(e,t,n){"use strict";var r=n(682)("%Math.pow%");e.exports=function(e){var t=128&e[3]?-1:1,n=(127&e[3])<<1|e[2]>>7,o=(127&e[2])<<16|e[1]<<8|e[0];return 0===n&&0===o?1===t?0:-0:255===n&&0===o?1===t?1/0:-1/0:255===n&&0!==o?NaN:-127===(n-=127)?t*o*r(2,-149):t*(1+o*r(2,-23))*r(2,n)}},7604:function(e,t,n){"use strict";var r=n(682)("%Math.pow%");e.exports=function(e){var t=128&e[7]?-1:1,n=(127&e[7])<<4|(240&e[6])>>4,o=281474976710656*(15&e[6])+1099511627776*e[5]+4294967296*e[4]+16777216*e[3]+65536*e[2]+256*e[1]+e[0];return 0===n&&0===o?0*t:2047===n&&0!==o?NaN:2047===n&&0===o?t*(1/0):-1023===(n-=1023)?t*o*5e-324:t*(1+o/4503599627370496)*r(2,n)}},2367:function(e,t,n){"use strict";var r=n(682),o=r("%Math.pow%"),i=r("%Number%"),l=r("%BigInt%",!0);e.exports=function(e,t,n,r){for(var a=r?l:i,s=a(0),c=0;c<e.length;c++)s+=a(e[c]*o(2,8*c));if(!n){var u=8*t;128&e[t-1]&&(s-=a(o(2,u)))}return s}},2142:function(e,t,n){"use strict";var r=n(682),o=r("%Uint8Array%",!0),i=r("%Uint32Array%",!0),l=n(6740),a=i&&new i([305419896]),s=a&&new o(l(a));e.exports=s?120===s[0]?"little":18===s[0]?"big":52===s[0]?"mixed":"unknown":"indeterminate"},8172:function(e){"use strict";e.exports=function(e,t){for(var n=0;n<e.length;n+=1)if(!t(e[n],n,e))return!1;return!0}},9065:function(e){"use strict";e.exports=function(e,t){for(var n=0;n<e.length;n+=1)t(e[n],n,e)}},1211:function(e){"use strict";var t=1075;e.exports=function(e){var n="";if(0===e)return n;for(var r,o=t,i=0;i<t;i+=1)if((r=2*e)>=1?(e=r-1,n+="1",o===t&&(o=i)):(e=r,n+="0"),1===r||i-o>54)return n;return n}},2646:function(e){"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},9495:function(e,t,n){"use strict";var r=n(682)("%Object.getPrototypeOf%",!0),o=n(1856)();e.exports=r||(o?function(e){return e.__proto__}:null)},20:function(e,t,n){"use strict";var r=n(682)("%Math.floor%");e.exports=function(e){for(var t,n="";e>0;)n=(t=e/2)===(e=r(t))?"0"+n:"1"+n;return n}},1520:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%BigInt%",!0);e.exports=function(e,t,n){var r="bigint"==typeof e?i:o;e<0&&(e>>>=0);for(var l=[],a=0;a<t;a++)l[n?a:t-1-a]=o(e&r(255)),e>>=r(8);return l}},1824:function(e){"use strict";e.exports=function(e){return"number"==typeof e&&e>=0&&e<=255&&(0|e)===e}},7991:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!r(e)&&e!==1/0&&e!==-1/0}},6156:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=n(9404),a=n(7991);e.exports=function(e){if("number"!=typeof e||l(e)||!a(e))return!1;var t=o(e);return i(t)===t}},9404:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},2745:function(e){"use strict";e.exports=function(e){return 0===e&&1/e==-1/0}},4968:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2076:function(e){"use strict";var t=Math.floor;e.exports=function(e,n){var r=e%n;return t(r>=0?r:r+n)}},8626:function(e){"use strict";e.exports=function(e,t,n){var r=e(t,n);return r>=0?r:r+n}},6862:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};e.exports=function(e){if(!e||"object"!=typeof e)return!1;for(var t in e)if(o(e,t)&&!i[t])return!1;var n=o(e,"[[Value]]")||o(e,"[[Writable]]"),l=o(e,"[[Get]]")||o(e,"[[Set]]");if(n&&l)throw new r("Property Descriptors may not be both accessor and data descriptors");return!0}},359:function(e,t,n){"use strict";var r=n(9429),o=n(2527),i=n(6156);e.exports=function(e){return!!e&&"object"==typeof e&&r(e,"[[Object]]")&&r(e,"[[CachedBufferByteLength]]")&&(i(e["[[CachedBufferByteLength]]"])&&e["[[CachedBufferByteLength]]"]>=0||"DETACHED"===e["[[CachedBufferByteLength]]"])&&o(e["[[Object]]"])}},9660:function(e,t,n){"use strict";var r=n(682),o={__proto__:null,$Int8Array:r("%Int8Array%",!0),$Uint8Array:r("%Uint8Array%",!0),$Uint8ClampedArray:r("%Uint8ClampedArray%",!0),$Int16Array:r("%Int16Array%",!0),$Uint16Array:r("%Uint16Array%",!0),$Int32Array:r("%Int32Array%",!0),$Uint32Array:r("%Uint32Array%",!0),$BigInt64Array:r("%BigInt64Array%",!0),$BigUint64Array:r("%BigUint64Array%",!0),$Float32Array:r("%Float32Array%",!0),$Float64Array:r("%Float64Array%",!0)};e.exports=function(e){return o["$"+e]}},3647:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=r("%Math.pow%"),a=n(7991),s=n(9404),c=n(2745);e.exports=function(e,t){if(s(e))return t?[0,0,192,127]:[127,192,0,0];var n;if(0===e)return n=c(e)?128:0,t?[0,0,0,n]:[n,0,0,0];if(o(e)>34028234663852886e22||!a(e))return n=e<0?255:127,t?[0,0,128,n]:[n,128,0,0];var r=e<0?1:0;e=o(e);for(var u=0;e>=2;)u+=1,e/=2;for(;e<1;)u-=1,e*=2;var p=e-1;p*=l(2,23)+.5,u+=127;var d=r<<31|(u<<=23)|(p=i(p)),f=255&d,y=255&(d>>=8),m=255&(d>>=8),g=255&(d>>=8);return t?[f,y,m,g]:[g,m,y,f]}},7511:function(e,t,n){"use strict";var r=n(682),o=r("%parseInt%"),i=r("%Math.abs%"),l=r("%Math.floor%"),a=n(1154),s=a("String.prototype.indexOf"),c=a("String.prototype.slice"),u=n(1211),p=n(20),d=n(2745),f=1023,y="11111111111",m="00000000000",g="000000000000000000000000000000000000000000000000000";e.exports=function(e,t){var n,r,a=e<0||d(e)?"1":"0";if(isNaN(e))n=y,r="1"+g;else if(isFinite(e))if(0===e)n=m,r="0"+g;else{e=i(e);var h,b=l(e),v=p(b),_=u(e-b);if(v)n=v.length-1;else{var k=s(_,"1");k>-1&&(h=k+1),n=-h}r=v+_,n<0?(n<=-1023&&(h=1022),r=c(r,h)):r=c(r,1),n=c(m+p(n+f),-11),r=c(r+g+"0",0,52)}else n=y,r="0"+g;for(var S=a+n+r,E=[],w=0;w<8;w++){E[t?8-w-1:w]=o(c(S,8*w,8*(w+1)),2)}return E}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{AlignmentControl:function(){return uv},AlignmentToolbar:function(){return pv},Autocomplete:function(){return kv},BlockAlignmentControl:function(){return Oi},BlockAlignmentToolbar:function(){return Ri},BlockBreadcrumb:function(){return Iv},BlockColorsStyleSelector:function(){return Tv},BlockContextProvider:function(){return $i},BlockControls:function(){return br},BlockEdit:function(){return Yi},BlockEditorKeyboardShortcuts:function(){return LE},BlockEditorProvider:function(){return Pu},BlockFormatControls:function(){return hr},BlockIcon:function(){return Au},BlockInspector:function(){return OE},BlockList:function(){return Wm},BlockMover:function(){return qf},BlockNavigationDropdown:function(){return t_},BlockPreview:function(){return sd},BlockSelectionClearer:function(){return Ru},BlockSettingsMenu:function(){return am},BlockSettingsMenuControls:function(){return nm},BlockStyles:function(){return l_},BlockTitle:function(){return Ff},BlockToolbar:function(){return gm},BlockTools:function(){return NE},BlockVerticalAlignmentControl:function(){return qo},BlockVerticalAlignmentToolbar:function(){return Jo},ButtonBlockAppender:function(){return Ef},ButtonBlockerAppender:function(){return Sf},ColorPalette:function(){return w_},ColorPaletteControl:function(){return A_},ContrastChecker:function(){return jg},CopyHandler:function(){return Dy},DefaultBlockAppender:function(){return _f},FontSizePicker:function(){return xh},InnerBlocks:function(){return zm},Inserter:function(){return vf},InspectorAdvancedControls:function(){return mo},InspectorControls:function(){return go},JustifyContentControl:function(){return Zo},JustifyToolbar:function(){return Xo},LineHeightControl:function(){return uh},MediaPlaceholder:function(){return vS},MediaReplaceFlow:function(){return fS},MediaUpload:function(){return cS},MediaUploadCheck:function(){return uS},MultiSelectScrollIntoView:function(){return UE},NavigableToolbar:function(){return Zf},ObserveTyping:function(){return GE},PanelColorSettings:function(){return _S},PlainText:function(){return eE},RichText:function(){return QS},RichTextShortcut:function(){return rE},RichTextToolbarButton:function(){return oE},SETTINGS_DEFAULTS:function(){return h},SkipToSelectedBlock:function(){return SE},ToolSelector:function(){return aE},Typewriter:function(){return KE},URLInput:function(){return Ak},URLInputButton:function(){return pE},URLPopover:function(){return gS},Warning:function(){return Zi},WritingFlow:function(){return Ku},__experimentalBlockAlignmentMatrixControl:function(){return Av},__experimentalBlockFullHeightAligmentControl:function(){return Ev},__experimentalBlockPatternSetup:function(){return v_},__experimentalBlockPatternsList:function(){return Pd},__experimentalBlockVariationPicker:function(){return s_},__experimentalBlockVariationTransforms:function(){return S_},__experimentalBorderRadiusControl:function(){return ig},__experimentalColorGradientControl:function(){return Fg},__experimentalColorGradientSettingsDropdown:function(){return Ug},__experimentalDateFormatPicker:function(){return x_},__experimentalDuotoneControl:function(){return Eb},__experimentalFontAppearanceControl:function(){return ah},__experimentalFontFamilyControl:function(){return _h},__experimentalGetBorderClassesAndStyles:function(){return zb},__experimentalGetColorClassesAndStyles:function(){return Gb},__experimentalGetElementClassName:function(){return tw},__experimentalGetGapCSSValue:function(){return Uo},__experimentalGetGradientClass:function(){return wg},__experimentalGetGradientObjectByGradientValue:function(){return Cg},__experimentalGetMatchingVariation:function(){return rw},__experimentalGetSpacingClassesAndStyles:function(){return $b},__experimentalImageEditingProvider:function(){return ok},__experimentalImageEditor:function(){return yk},__experimentalImageSizeControl:function(){return hk},__experimentalImageURLInputUI:function(){return vE},__experimentalInspectorPopoverHeader:function(){return ZE},__experimentalLayoutStyle:function(){return ki},__experimentalLetterSpacingControl:function(){return ib},__experimentalLibrary:function(){return ME},__experimentalLinkControl:function(){return iS},__experimentalLinkControlSearchInput:function(){return qk},__experimentalLinkControlSearchItem:function(){return Nk},__experimentalLinkControlSearchResults:function(){return jk},__experimentalListView:function(){return Xv},__experimentalPanelColorGradientSettings:function(){return N_},__experimentalPreviewOptions:function(){return _E},__experimentalPublishDateTimePicker:function(){return XE},__experimentalRecursionProvider:function(){return JE},__experimentalResponsiveBlockControl:function(){return nE},__experimentalSpacingSizesControl:function(){return no},__experimentalTextDecorationControl:function(){return Kh},__experimentalTextTransformControl:function(){return tb},__experimentalUnitControl:function(){return sE},__experimentalUseBlockOverlayActive:function(){return fu},__experimentalUseBlockPreview:function(){return cd},__experimentalUseBorderProps:function(){return Vb},__experimentalUseColorProps:function(){return Wb},__experimentalUseCustomSides:function(){return Fo},__experimentalUseGradient:function(){return xg},__experimentalUseHasRecursion:function(){return YE},__experimentalUseMultipleOriginColorsAndGradients:function(){return pg},__experimentalUseResizeCanvas:function(){return kE},__experimentaluseLayoutClasses:function(){return Tb},__experimentaluseLayoutStyles:function(){return Ob},__unstableBlockNameContext:function(){return mm},__unstableBlockSettingsMenuFirstItem:function(){return Hy},__unstableBlockToolbarLastItem:function(){return Ty},__unstableDuotoneFilter:function(){return rd},__unstableDuotoneStylesheet:function(){return td},__unstableDuotoneUnsetStylesheet:function(){return nd},__unstableEditorStyles:function(){return Xp},__unstableGetValuesFromColors:function(){return ed},__unstableIframe:function(){return Yu},__unstableInserterMenuExtension:function(){return sf},__unstablePresetDuotoneFilter:function(){return od},__unstableRichTextInputEvent:function(){return iE},__unstableUseBlockSelectionClearer:function(){return Ou},__unstableUseClipboardHandler:function(){return My},__unstableUseMouseMoveTypingReset:function(){return zE},__unstableUseTypewriter:function(){return $E},__unstableUseTypingObserver:function(){return VE},createCustomColorsHOC:function(){return Xb},getColorClassName:function(){return cg},getColorObjectByAttributeValues:function(){return ag},getColorObjectByColorValue:function(){return sg},getComputedFluidTypographyValue:function(){return Nh},getFontSize:function(){return Ah},getFontSizeClass:function(){return Ih},getFontSizeObjectByValue:function(){return Ch},getGradientSlugByValue:function(){return Ig},getGradientValueBySlug:function(){return Ag},getPxFromCssUnit:function(){return fw},getTypographyClassesAndStyles:function(){return Kb},store:function(){return sr},storeConfig:function(){return ar},transformStyles:function(){return Yp},useBlockDisplayInformation:function(){return Rf},useBlockEditContext:function(){return dr},useBlockProps:function(){return yu},useCachedTruthy:function(){return qb},useInnerBlocksProps:function(){return jm},useSetting:function(){return Kr},withColorContext:function(){return E_},withColors:function(){return ev},withFontSizes:function(){return rv}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return jt},__experimentalGetAllowedBlocks:function(){return vt},__experimentalGetAllowedPatterns:function(){return Et},__experimentalGetBlockListSettingsForBlocks:function(){return Bt},__experimentalGetDirectInsertBlock:function(){return _t},__experimentalGetGlobalBlocksByName:function(){return ee},__experimentalGetLastBlockAttributeChanges:function(){return Ot},__experimentalGetParsedPattern:function(){return kt},__experimentalGetPatternTransformItems:function(){return At},__experimentalGetPatternsByBlockTypes:function(){return wt},__experimentalGetReusableBlockTitle:function(){return Pt},__unstableGetBlockWithoutInnerBlocks:function(){return K},__unstableGetClientIdWithClientIdsTree:function(){return J},__unstableGetClientIdsTree:function(){return Y},__unstableGetContentLockingParent:function(){return Ht},__unstableGetEditorMode:function(){return Ft},__unstableGetSelectedBlocksWithPartialSelection:function(){return Ne},__unstableGetTemporarilyEditingAsBlocks:function(){return Wt},__unstableGetVisibleBlocks:function(){return Gt},__unstableHasActiveBlockOverlayActive:function(){return $t},__unstableIsFullySelected:function(){return Pe},__unstableIsLastBlockChangeIgnored:function(){return Tt},__unstableIsSelectionCollapsed:function(){return Te},__unstableIsSelectionMergeable:function(){return Re},__unstableIsWithinBlockOverlay:function(){return Kt},__unstableSelectionHasUnmergeableBlock:function(){return Oe},areInnerBlocksControlled:function(){return Ut},canEditBlock:function(){return ct},canInsertBlockType:function(){return rt},canInsertBlocks:function(){return ot},canLockBlockType:function(){return ut},canMoveBlock:function(){return at},canMoveBlocks:function(){return st},canRemoveBlock:function(){return it},canRemoveBlocks:function(){return lt},didAutomaticChange:function(){return Dt},getAdjacentBlockClientId:function(){return ge},getBlock:function(){return $},getBlockAttributes:function(){return W},getBlockCount:function(){return ne},getBlockHierarchyRootClientId:function(){return ye},getBlockIndex:function(){return Me},getBlockInsertionPoint:function(){return Ye},getBlockListSettings:function(){return Ct},getBlockMode:function(){return Ge},getBlockName:function(){return G},getBlockOrder:function(){return Fe},getBlockParents:function(){return de},getBlockParentsByBlockName:function(){return fe},getBlockRootClientId:function(){return pe},getBlockSelectionEnd:function(){return le},getBlockSelectionStart:function(){return ie},getBlockTransformItems:function(){return ht},getBlocks:function(){return q},getBlocksByClientId:function(){return te},getClientIdsOfDescendants:function(){return Q},getClientIdsWithDescendants:function(){return Z},getDraggedBlockClientIds:function(){return $e},getFirstMultiSelectedBlockClientId:function(){return Ee},getGlobalBlockCount:function(){return X},getInserterItems:function(){return gt},getLastMultiSelectedBlockClientId:function(){return we},getLowestCommonAncestorWithSelectedBlock:function(){return me},getMultiSelectedBlockClientIds:function(){return ke},getMultiSelectedBlocks:function(){return Se},getMultiSelectedBlocksEndClientId:function(){return Be},getMultiSelectedBlocksStartClientId:function(){return xe},getNextBlockClientId:function(){return be},getPreviousBlockClientId:function(){return he},getSelectedBlock:function(){return ue},getSelectedBlockClientId:function(){return ce},getSelectedBlockClientIds:function(){return _e},getSelectedBlockCount:function(){return ae},getSelectedBlocksInitialCaretPosition:function(){return ve},getSelectionEnd:function(){return oe},getSelectionStart:function(){return re},getSettings:function(){return It},getTemplate:function(){return Xe},getTemplateLock:function(){return et},hasBlockMovingClientId:function(){return Mt},hasInserterItems:function(){return bt},hasMultiSelection:function(){return je},hasSelectedBlock:function(){return se},hasSelectedInnerBlock:function(){return Le},isAncestorBeingDragged:function(){return qe},isAncestorMultiSelected:function(){return Ie},isBlockBeingDragged:function(){return Ke},isBlockHighlighted:function(){return Lt},isBlockInsertionPointVisible:function(){return Qe},isBlockMultiSelected:function(){return Ce},isBlockSelected:function(){return De},isBlockValid:function(){return H},isBlockVisible:function(){return Vt},isBlockWithinSelection:function(){return Ue},isCaretWithinFormattedText:function(){return Je},isDraggingBlocks:function(){return We},isFirstMultiSelectedBlock:function(){return Ae},isLastBlockChangePersistent:function(){return xt},isMultiSelecting:function(){return ze},isNavigationMode:function(){return Nt},isSelectionEnabled:function(){return Ve},isTyping:function(){return He},isValidTemplate:function(){return Ze},wasBlockJustInserted:function(){return zt}});var t={};n.r(t),n.d(t,{__unstableDeleteSelection:function(){return In},__unstableExpandSelection:function(){return Bn},__unstableMarkAutomaticChange:function(){return qn},__unstableMarkLastChangeAsPersistent:function(){return $n},__unstableMarkNextChangeAsNotPersistent:function(){return Kn},__unstableSaveReusableBlock:function(){return Wn},__unstableSetEditorMode:function(){return Yn},__unstableSetTemporarilyEditingAsBlocks:function(){return ir},__unstableSplitSelection:function(){return xn},clearSelectedBlock:function(){return pn},duplicateBlocks:function(){return Zn},enterFormattedText:function(){return Un},exitFormattedText:function(){return jn},flashBlock:function(){return nr},hideInsertionPoint:function(){return wn},insertAfterBlock:function(){return er},insertBeforeBlock:function(){return Xn},insertBlock:function(){return kn},insertBlocks:function(){return Sn},insertDefaultBlock:function(){return Vn},mergeBlocks:function(){return Pn},moveBlockToPosition:function(){return _n},moveBlocksDown:function(){return hn},moveBlocksToPosition:function(){return vn},moveBlocksUp:function(){return bn},multiSelect:function(){return un},receiveBlocks:function(){return tn},removeBlock:function(){return On},removeBlocks:function(){return Tn},replaceBlock:function(){return mn},replaceBlocks:function(){return yn},replaceInnerBlocks:function(){return Rn},resetBlocks:function(){return Zt},resetSelection:function(){return en},selectBlock:function(){return on},selectNextBlock:function(){return an},selectPreviousBlock:function(){return ln},selectionChange:function(){return zn},setBlockMovingClientId:function(){return Qn},setBlockVisibility:function(){return or},setHasControlledInnerBlocks:function(){return rr},setNavigationMode:function(){return Jn},setTemplateValidity:function(){return An},showInsertionPoint:function(){return En},startDraggingBlocks:function(){return Dn},startMultiSelect:function(){return sn},startTyping:function(){return Fn},stopDraggingBlocks:function(){return Ln},stopMultiSelect:function(){return cn},stopTyping:function(){return Mn},synchronizeTemplate:function(){return Cn},toggleBlockHighlight:function(){return tr},toggleBlockMode:function(){return Nn},toggleSelection:function(){return dn},updateBlock:function(){return rn},updateBlockAttributes:function(){return nn},updateBlockListSettings:function(){return Gn},updateSettings:function(){return Hn},validateBlocksToTemplate:function(){return Xt}});var o=window.wp.blocks,i=window.wp.hooks;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}(0,i.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,o.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));var a=window.wp.element,s=n(7153),c=n.n(s),u=window.lodash,p=window.wp.compose,d=window.wp.data,f=window.wp.components;var y={default:(0,f.createSlotFill)("BlockControls"),block:(0,f.createSlotFill)("BlockControlsBlock"),inline:(0,f.createSlotFill)("BlockFormatControls"),other:(0,f.createSlotFill)("BlockControlsOther"),parent:(0,f.createSlotFill)("BlockControlsParent")},m=window.wp.i18n;const g={insertUsage:{}},h={alignWide:!1,supportsLayout:!0,colors:[{name:(0,m.__)("Black"),slug:"black",color:"#000000"},{name:(0,m.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,m.__)("White"),slug:"white",color:"#ffffff"},{name:(0,m.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,m.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,m.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,m.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,m.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,m.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,m.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,m.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,m.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,m._x)("Small","font size name"),size:13,slug:"small"},{name:(0,m._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,m._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,m._x)("Large","font size name"),size:36,slug:"large"},{name:(0,m._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,m.__)("Thumbnail")},{slug:"medium",name:(0,m.__)("Medium")},{slug:"large",name:(0,m.__)("Large")},{slug:"full",name:(0,m.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableGalleryWithImageBlocks:!1,generateAnchors:!1,gradients:[{name:(0,m.__)("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:(0,m.__)("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:(0,m.__)("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:(0,m.__)("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:(0,m.__)("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:(0,m.__)("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:(0,m.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,m.__)("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:(0,m.__)("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:(0,m.__)("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:(0,m.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,m.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function b(e,t,n){return[...e.slice(0,n),...(0,u.castArray)(t),...e.slice(n)]}function v(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),b(o,e.slice(t,t+r),n)}const _=e=>e;function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:r,innerBlocks:o}=e;n[t].push(r),Object.assign(n,k(o,r))})),n}function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},S(n.innerBlocks,n.clientId))),{})}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_;const n={},r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n[o.clientId]=t(o)}return n}function w(e){return E(e,(e=>(0,u.omit)(e,"attributes")))}function A(e){return E(e,(e=>e.attributes))}function C(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function I(e,t){const n={},r=[...t],o=[...t];for(;r.length;){const e=r.shift();r.push(...e.innerBlocks),o.push(...e.innerBlocks)}for(const e of o)n[e.clientId]={};for(const t of o)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function x(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=new Set([]),i=new Set;for(const t of n){let n=r?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){i.add(n);break}o.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of o)t[e]={...t[e]};for(const n of o)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of i)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const B=(0,u.flow)(d.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:r}=n;if(e===r)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,o)=>{const{name:i}=t.byClientId[o];return"core/block"===i&&n.ref===e?{...n,ref:r}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=e(t,n);if(r===t)return t;switch(r.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=I(r,n.blocks);r.tree=x(r,{...r.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=x(r,{...r.tree,[n.clientId]:{...r.tree[n.clientId],...r.byClientId[n.clientId],attributes:r.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...r.tree[t],attributes:r.attributes[t]},e)),{});r.tree=x(r,{...r.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=I(r,n.blocks);r.tree=x(r,{...(0,u.omit)(r.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const o=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!r.byClientId[t.parents[e]]||o.push(t.parents[e]);r.tree=x(r,r.tree,o,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const o of n.clientIds)void 0===t.parents[o]||""!==t.parents[o]&&!r.byClientId[t.parents[o]]||e.push(t.parents[o]);r.tree=x(r,(0,u.omit)(r.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),r.tree=x(r,r.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=x(r,r.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=Object.keys((0,u.omitBy)(r.attributes,((e,t)=>"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId)));r.tree=x(r,{...r.tree,...e.reduce(((e,t)=>(e[t]={...r.byClientId[t],attributes:r.attributes[t],innerBlocks:r.tree[t].innerBlocks},e)),{})},e,!1)}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o<r.length;o++)!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=[...r]),r.push(...t.order[r[o]]));return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const r={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...o}=e.shift();e.push(...n),t.controlledInnerBlocks[o.clientId]&&(r[o.clientId]=!0)}}let o=t;t.order[n.rootClientId]&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));let i=o;return n.blocks.length&&(i=e(i,{...n,type:"INSERT_BLOCKS",index:0}),i.order={...i.order,...(0,u.reduce)(r,((e,n,r)=>(t.order[r]&&(e[r]=t.order[r]),e)),{})},i.tree={...i.tree,...(0,u.reduce)(r,((e,n,r)=>{const o=`controlled||${r}`;return t.tree[o]&&(e[o]=t.tree[o]),e}),{})}),i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:w(n.blocks),attributes:A(n.blocks),order:k(n.blocks),parents:S(n.blocks),controlledInnerBlocks:{},visibility:{}},r=I(e,n.blocks);return e.tree={...r,"":{innerBlocks:n.blocks.map((e=>r[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(r,o)=>{let i=e(r,o);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!l){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:l?!n:!C(o,t)},t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,i}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,r)=>{const o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(r,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...A(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,r)=>({...n,[r]:(0,u.reduce)(t.uniqueByBlock?t.attributes[r]:t.attributes,((t,n,o)=>{var i,l;return n!==t[o]&&((t=(i=e[r])===(l=t)?{...i}:l)[o]=n),t}),e[r])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...A(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=k(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e[n]||[],o=k(t.blocks,n),{index:i=r.length}=t;return{...e,...o,[n]:b(r,o[n],i)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:r="",clientIds:o}=t,{index:i=e[r].length}=t;if(n===r){const t=e[r].indexOf(o[0]);return{...e,[r]:v(e[r],t,i,o.length)}}return{...e,[n]:(0,u.without)(e[n],...o),[r]:b(e[r],o,i)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=e[r];if(!i.length||o===i[0])return e;const l=i.indexOf(o);return{...e,[r]:v(i,l,l-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=n[n.length-1],l=e[r];if(!l.length||i===l[l.length-1])return e;const a=l.indexOf(o);return{...e,[r]:v(l,a,a+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=k(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(r,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...r[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...S(t.blocks)};case"INSERT_BLOCKS":return{...e,...S(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{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:r}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e},visibility(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}});function P(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;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.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var T=(0,d.combineReducers)({blocks:B,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;switch(i.type){case"SELECTION_CHANGE":return i.clientId?{selectionStart:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.startOffset},selectionEnd:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.endOffset}}:{selectionStart:i.start||o.selectionStart,selectionEnd:i.end||o.selectionEnd};case"RESET_SELECTION":const{selectionStart:l,selectionEnd:a}=i;return{selectionStart:l,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=i;return s===(null===(e=o.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=o.selectionEnd)||void 0===t?void 0:t.clientId)?o:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==o||null===(n=o.selectionStart)||void 0===n?void 0:n.clientId,p=null==o||null===(r=o.selectionEnd)||void 0===r?void 0:r.clientId;if(!u&&!p)return o;if(!i.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!i.blocks.some((e=>e.clientId===p)))return{...o,selectionEnd:o.selectionStart}}return{selectionStart:P(o.selectionStart,i),selectionEnd:P(o.selectionEnd,i)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:r}=t;return{rootClientId:e,index:n,__unstableWithInserter:r};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:i}=n,l=(0,d.select)(o.store).getActiveBlockVariation(i,r);let a=null!=l&&l.name?`${i}/${l.name}`:i;const s={name:a};return"core/block"===i&&(s.ref=r.ref,a+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[a]:{time:t.time,count:e.insertUsage[a]?e.insertUsage[a].count+1:1,insert:s}}}}),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},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_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"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:r}=t;return r?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":if(!n.blocks.length)return t;return{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e}}),O={};function R(e){return[e]}function N(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function F(e,t){var n,r=t||R;function o(e){var t,r,o,i,l,a=n,s=!0;for(t=0;t<e.length;t++){if(r=e[t],!(l=r)||"object"!=typeof l){s=!1;break}a.has(r)?a=a.get(r):(o=new WeakMap,a.set(r,o),a=o)}return a.has(O)||((i=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=s,a.set(O,i)),a.get(O)}function i(){n=new WeakMap}function l(){var t,n,i,l,a,s=arguments.length;for(l=new Array(s),i=0;i<s;i++)l[i]=arguments[i];for((t=o(a=r.apply(null,l))).isUniqueByDependants||(t.lastDependants&&!N(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),n=t.head;n;){if(N(n.args,l,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,l)},l[0]=null,n.args=l,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return l.getDependants=r,l.clear=i,i(),l}var M=window.wp.primitives;var D=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),L=window.wp.richText,U=window.wp.deprecated,j=n.n(U);function z(e){const{multiline:t,__unstableMultilineWrapperTags:n,__unstablePreserveWhiteSpace:r}=e;return{multilineTag:t,multilineWrapperTags:n,preserveWhiteSpace:r}}const V=[];function G(e,t){const n=e.blocks.byClientId[t],r="core/social-link";if("web"!==a.Platform.OS&&(null==n?void 0:n.name)===r){const n=e.blocks.attributes[t],{service:o}=n;return o?`core/social-link-${o}`:r}return n?n.name:null}function H(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function W(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}function $(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const K=F(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:W(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function q(e,t){var n;const r=t&&Ut(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[r])||void 0===n?void 0:n.innerBlocks)||V}const J=F(((e,t)=>({clientId:t,innerBlocks:Y(e,t)})),(e=>[e.blocks.order])),Y=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Fe(e,t),(t=>J(e,t)))}),(e=>[e.blocks.order])),Q=F(((e,t)=>{const n=[];for(const r of t)for(const t of Fe(e,r))n.push(t,...Q(e,[t]));return n}),(e=>[e.blocks.order])),Z=F((e=>{const t=[];for(const n of Fe(e))t.push(n,...Q(e,[n]));return t}),(e=>[e.blocks.order])),X=F(((e,t)=>{const n=Z(e);return t?(0,u.reduce)(n,((n,r)=>e.blocks.byClientId[r].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),ee=F(((e,t)=>{if(!t)return V;const n=Z(e).filter((n=>e.blocks.byClientId[n].name===t));return n.length>0?n:V}),(e=>[e.blocks.order,e.blocks.byClientId])),te=F(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>$(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function ne(e,t){return Fe(e,t).length}function re(e){return e.selection.selectionStart}function oe(e){return e.selection.selectionEnd}function ie(e){return e.selection.selectionStart.clientId}function le(e){return e.selection.selectionEnd.clientId}function ae(e){const t=ke(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function se(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:r}=t;return r&&r===n.clientId?r:null}function ue(e){const t=ce(e);return t?$(e,t):null}function pe(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const de=F((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=t;for(;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(e=>[e.blocks.parents])),fe=F((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=de(e,t,r);return(0,u.map)((0,u.filter)((0,u.map)(o,(t=>({id:t,name:G(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function ye(e,t){let n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function me(e,t){const n=ce(e),r=[...de(e,t),t],o=[...de(e,n),n];let i;const l=Math.min(r.length,o.length);for(let e=0;e<l&&r[e]===o[e];e++)i=r[e];return i}function ge(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ce(e)),void 0===t&&(t=n<0?Ee(e):we(e)),!t)return null;const r=pe(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o[r],l=i.indexOf(t),a=l+1*n;return a<0||a===i.length?null:i[a]}function he(e,t){return ge(e,t,-1)}function be(e,t){return ge(e,t,1)}function ve(e){return e.initialPosition}const _e=F((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return V;if(t.clientId===n.clientId)return[t.clientId];const r=pe(e,t.clientId);if(null===r)return V;const o=Fe(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId);return i>l?o.slice(l,i+1):o.slice(i,l+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function ke(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?V:_e(e)}const Se=F((e=>{const t=ke(e);return t.length?t.map((t=>$(e,t))):V}),(e=>[..._e.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Ee(e){return ke(e)[0]||null}function we(e){const t=ke(e);return t[t.length-1]||null}function Ae(e,t){return Ee(e)===t}function Ce(e,t){return-1!==ke(e).indexOf(t)}const Ie=F(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=pe(e,n),r=Ce(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Be(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Pe(e){const t=re(e),n=oe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Te(e){const t=re(e),n=oe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Oe(e){return _e(e).some((t=>{const n=G(e,t);return!(0,o.getBlockType)(n).merge}))}function Re(e,t){const n=re(e),r=oe(e);if(n.clientId===r.clientId)return!1;if(!n.attributeKey||!r.attributeKey||void 0===n.offset||void 0===r.offset)return!1;const i=pe(e,n.clientId);if(i!==pe(e,r.clientId))return!1;const l=Fe(e,i);let a,s;l.indexOf(n.clientId)>l.indexOf(r.clientId)?(a=r,s=n):(a=n,s=r);const c=t?s.clientId:a.clientId,u=t?a.clientId:s.clientId,p=G(e,c);if(!(0,o.getBlockType)(p).merge)return!1;const d=$(e,u);if(d.name===p)return!0;const f=(0,o.switchToBlockType)(d,p);return f&&f.length}const Ne=e=>{const t=re(e),n=oe(e);if(t.clientId===n.clientId)return V;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return V;const r=pe(e,t.clientId);if(r!==pe(e,n.clientId))return V;const i=Fe(e,r),l=i.indexOf(t.clientId),a=i.indexOf(n.clientId),[s,c]=l>a?[n,t]:[t,n],u=$(e,s.clientId),p=(0,o.getBlockType)(u.name),d=$(e,c.clientId),f=(0,o.getBlockType)(d.name),y=u.attributes[s.attributeKey],m=d.attributes[c.attributeKey],g=p.attributes[s.attributeKey],h=f.attributes[c.attributeKey];let b=(0,L.create)({html:y,...z(g)}),v=(0,L.create)({html:m,...z(h)});return b=(0,L.remove)(b,0,s.offset),v=(0,L.remove)(v,c.offset,v.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,L.toHTMLString)({value:b,...z(g)})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,L.toHTMLString)({value:v,...z(h)})}}]};function Fe(e,t){return e.blocks.order[t||""]||V}function Me(e,t){return Fe(e,pe(e,t)).indexOf(t)}function De(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function Le(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Fe(e,t),(t=>De(e,t)||Ce(e,t)||n&&Le(e,t,n)))}function Ue(e,t){if(!t)return!1;const n=ke(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function je(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function ze(e){return e.isMultiSelecting}function Ve(e){return e.isSelectionEnabled}function Ge(e,t){return e.blocksMode[t]||"visual"}function He(e){return e.isTyping}function We(e){return!!e.draggedBlocks.length}function $e(e){return e.draggedBlocks}function Ke(e,t){return e.draggedBlocks.includes(t)}function qe(e,t){if(!We(e))return!1;const n=de(e,t);return(0,u.some)(n,(t=>Ke(e,t)))}function Je(){return j()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}function Ye(e){let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=pe(e,i)||void 0,n=Me(e,o.clientId)+1):n=Fe(e).length,{rootClientId:t,index:n}}function Qe(e){return null!==e.insertionPoint}function Ze(e){return e.template.isValid}function Xe(e){return e.settings.template}function et(e,t){if(!t)return e.settings.templateLock;const n=Ct(e,t);return n?n.templateLock:void 0}const tt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},nt=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,o.getBlockType)(t),!n)return!1;const{allowedBlockTypes:l}=It(e),a=tt(l,t,!0);if(!a)return!1;const s=!!et(e,r);if(s)return!1;const c=Ct(e,r);if(r&&void 0===c)return!1;const p=null==c?void 0:c.allowedBlocks,d=tt(p,t),f=n.parent,y=G(e,r),m=tt(f,y);let g=!0;const h=n.ancestor;if(h){const t=[r,...de(e,r)];g=(0,u.some)(t,(t=>tt(h,G(e,t))))}const b=g&&(null===d&&null===m||!0===d||!0===m);return b?(0,i.applyFilters)("blockEditor.__unstableCanInsertBlockType",b,n,r,{getBlock:$.bind(null,e),getBlockParentsByBlockName:fe.bind(null,e)}):b},rt=F(nt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function ot(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>rt(e,G(e,t),n)))}function it(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=W(e,t);if(null===r)return!0;const{lock:o}=r,i=!!et(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!i:!(null!=o&&o.remove)}function lt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>it(e,t,n)))}function at(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=W(e,t);if(null===r)return;const{lock:o}=r,i="all"===et(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!i:!(null!=o&&o.move)}function st(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>at(e,t,n)))}function ct(e,t){const n=W(e,t);if(null===n)return!0;const{lock:r}=n;return!(null!=r&&r.edit)}function ut(e,t){var n;return!!(0,o.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function pt(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}const dt=(e,t,n)=>!!(0,o.hasBlockSupport)(t,"inserter",!0)&&nt(e,t.name,n),ft=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=pt(e,r)||{};return{...t,id:r,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:yt(o,i)}},yt=(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}},mt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let i=!1;(0,o.hasBlockSupport)(t.name,"multiple",!0)||(i=(0,u.some)(te(e,Z(e)),{name:t.name}));const{time:l,count:a=0}=pt(e,r)||{},s={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:i,frecency:yt(l,a)};if("transform"===n)return s;const c=(0,o.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},gt=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=mt(e,{buildScope:"inserter"}),r=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,i=t=>{let n=D;if("web"===a.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,i=(0,o.getBlockType)(t+r);i&&(n=i.icon)}}const i=`core/block/${t.id}`,{time:l,count:s=0}=pt(e,i)||{},c=yt(l,s);return{id:i,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},l=(0,o.getBlockTypes)().filter((n=>dt(e,n,t))).map(n),s=nt(e,"core/block",t)?Rt(e).map(i):[],c=l.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=ft(e,n);t.push(...r.map(o))}return t}),[]),u=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:p,noncore:d}=c.reduce(u,{core:[],noncore:[]}),f=[...p,...d];return[...f,...s]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Rt(e),(0,o.getBlockTypes)()])),ht=F((function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i=(0,u.castArray)(t),[l]=i,a=mt(e,{buildScope:"transform"}),s=(0,o.getBlockTypes)().filter((t=>dt(e,t,r))).map(a),c=Object.fromEntries(Object.entries(s).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,m.__)("Unwrap"),icon:null===(n=c[null==l?void 0:l.name])||void 0===n?void 0:n.icon};const p=(0,o.getPossibleBlockTransformations)(i).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return(0,u.orderBy)(p,(e=>c[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,o.getBlockTypes)()])),bt=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,o.getBlockTypes)(),(n=>dt(e,n,t)));if(n)return!0;const r=nt(e,"core/block",t)&&Rt(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Rt(e),(0,o.getBlockTypes)()])),vt=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,o.getBlockTypes)(),(n=>dt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,o.getBlockTypes)()])),_t=F((function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!r)return;const o=null===(t=e.blockListSettings[r])||void 0===t?void 0:t.__experimentalDefaultBlock,i=null===(n=e.blockListSettings[r])||void 0===n?void 0:n.__experimentalDirectInsert;return o&&i?"function"==typeof i?i($(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),kt=F(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,o.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),St=F((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=It(e),r=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return kt(e,n)})),o=r.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!tt(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return o}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Et=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=St(e),r=(0,u.filter)(n,(n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return rt(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),wt=F((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;const r=Et(e,n),o=Array.isArray(t)?t:[t];return r.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=>o.includes(e)))}))}),((e,t)=>[...Et.getDependants(e,t)])),At=F((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||Ut(e,n)})))return V;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return wt(e,r,n)}),((e,t)=>[...wt.getDependants(e,t)]));function Ct(e,t){return e.blockListSettings[t]}function It(e){return e.settings}function xt(e){return e.blocks.isPersistentChange}const Bt=F((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),Pt=F(((e,t)=>{var n;const r=(0,u.find)(Rt(e),(e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[Rt(e)]));function Tt(e){return e.blocks.isIgnoredChange}function Ot(e){return e.lastBlockAttributesChange}function Rt(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:V}function Nt(e){return"navigation"===e.editorMode}function Ft(e){return e.editorMode}function Mt(e){return e.hasBlockMovingClientId}function Dt(e){return!!e.automaticChangeStatus}function Lt(e,t){return e.highlightedBlock===t}function Ut(e,t){return!!e.blocks.controlledInnerBlocks[t]}const jt=F(((e,t)=>{if(!t.length)return null;const n=ce(e);if(t.includes(G(e,n)))return n;const r=ke(e),o=fe(e,n||r[0],t);return o?o[o.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function zt(e,t,n){const{lastBlockInserted:r}=e;return r.clientId===t&&r.source===n}function Vt(e,t){var n,r;return null===(n=null===(r=e.blocks.visibility)||void 0===r?void 0:r[t])||void 0===n||n}const Gt=F((e=>new Set(Object.keys(e.blocks.visibility).filter((t=>e.blocks.visibility[t])))),(e=>[e.blocks.visibility])),Ht=F(((e,t)=>{let n,r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],"contentOnly"===et(e,r)&&(n=r);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function Wt(e){return e.temporarilyEditingAsBlocks}function $t(e,t){if(!ct(e,t))return!0;const n=Ft(e);if("zoom-out"===n&&!pe(e,t))return!0;const r=(0,o.hasBlockSupport)(G(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!r&&Ut(e,t))&&!De(e,t)&&!Le(e,t,!0)}function Kt(e,t){let n=e.blocks.parents[t];for(;n;){if($t(e,n))return!0;n=e.blocks.parents[n]}return!1}var qt=window.wp.a11y;const Jt="†";function Yt(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(Jt)}))}const Qt=e=>Array.isArray(e)?e:[e],Zt=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(Xt(e))},Xt=e=>t=>{let{select:n,dispatch:r}=t;const i=n.getTemplate(),l=n.getTemplateLock(),a=!i||"all"!==l||(0,o.doBlocksMatchTemplate)(e,i);if(a!==n.isValidTemplate())return r.setTemplateValidity(a),a};function en(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function tn(e){return j()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function nn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Qt(e),attributes:t,uniqueByBlock:n}}function rn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function on(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const ln=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getPreviousBlockClientId(e);o&&r.selectBlock(o,-1)},an=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function sn(){return{type:"START_MULTI_SELECT"}}function cn(){return{type:"STOP_MULTI_SELECT"}}const un=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r=>{let{select:o,dispatch:i}=r;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;i({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,qt.speak)((0,m.sprintf)((0,m._n)("%s block selected.","%s blocks selected.",l),l),"assertive")}};function pn(){return{type:"CLEAR_SELECTED_BLOCK"}}function dn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function fn(e,t){var n,r;const i=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,o.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!i[n])return e;const r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;const{attributes:l={}}=e,a=i[n];return{...e,attributes:{...l,className:`${r||""} is-style-${a}`.trim()}}}))}const yn=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;return i=>{let{select:l,dispatch:a}=i;e=Qt(e),t=fn(Qt(t),l.getSettings());const s=l.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!l.canInsertBlockType(n.name,s))return}a({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o}),a((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function mn(e,t){return yn(e,t)}const gn=e=>(t,n)=>r=>{let{select:o,dispatch:i}=r;o.canMoveBlocks(t,n)&&i({type:e,clientIds:Qt(t),rootClientId:n})},hn=gn("MOVE_BLOCKS_DOWN"),bn=gn("MOVE_BLOCKS_UP"),vn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return o=>{let{select:i,dispatch:l}=o;if(i.canMoveBlocks(e,t)){if(t!==n){if(!i.canRemoveBlocks(e,t))return;if(!i.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function _n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return vn([e],t,n,r)}function kn(e,t,n,r,o){return Sn([e],t,n,r,0,o)}const Sn=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;return l=>{let{select:a,dispatch:s}=l;null!==o&&"object"==typeof o&&(i=o,o=0,j()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=fn(Qt(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i})}};function En(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:r}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r}}function wn(){return{type:"HIDE_INSERTION_POINT"}}function An(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Cn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=t.getBlocks(),i=t.getTemplate(),l=(0,o.synchronizeBlocksWithTemplate)(r,i);n.resetBlocks(l)},In=e=>t=>{let{registry:n,select:r,dispatch:i}=t;const l=r.getSelectionStart(),a=r.getSelectionEnd();if(l.clientId===a.clientId)return;if(!l.attributeKey||!a.attributeKey||void 0===l.offset||void 0===a.offset)return!1;const s=r.getBlockRootClientId(l.clientId);if(s!==r.getBlockRootClientId(a.clientId))return;const c=r.getBlockOrder(s);let u,p;c.indexOf(l.clientId)>c.indexOf(a.clientId)?(u=a,p=l):(u=l,p=a);const d=e?p:u,f=r.getBlock(d.clientId),y=(0,o.getBlockType)(f.name);if(!y.merge)return;const m=u,g=p,h=r.getBlock(m.clientId),b=(0,o.getBlockType)(h.name),v=r.getBlock(g.clientId),_=(0,o.getBlockType)(v.name),k=h.attributes[m.attributeKey],S=v.attributes[g.attributeKey],E=b.attributes[m.attributeKey],w=_.attributes[g.attributeKey];let A=(0,L.create)({html:k,...z(E)}),C=(0,L.create)({html:S,...z(w)});A=(0,L.remove)(A,m.offset,A.text.length),C=(0,L.insert)(C,Jt,0,g.offset);const I=(0,o.cloneBlock)(h,{[m.attributeKey]:(0,L.toHTMLString)({value:A,...z(E)})}),x=(0,o.cloneBlock)(v,{[g.attributeKey]:(0,L.toHTMLString)({value:C,...z(w)})}),B=e?I:x,P=h.name===v.name?[B]:(0,o.switchToBlockType)(B,y.name);if(!P||!P.length)return;let T;if(e){const e=P.pop();T=y.merge(e.attributes,x.attributes)}else{const e=P.shift();T=y.merge(I.attributes,e.attributes)}const O=Yt(T),R=T[O],N=(0,L.create)({html:R,...z(y.attributes[O])}),F=N.text.indexOf(Jt),M=(0,L.remove)(N,F,F+1),D=(0,L.toHTMLString)({value:M,...z(y.attributes[O])});T[O]=D;const U=r.getSelectedBlockClientIds(),j=[...e?P:[],{...f,attributes:{...f.attributes,...T}},...e?[]:P];n.batch((()=>{i.selectionChange(f.clientId,O,F,F),i.replaceBlocks(U,j,0,r.getSelectedBlocksInitialCaretPosition())}))},xn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),i=t.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return;const l=t.getBlockRootClientId(r.clientId);if(l!==t.getBlockRootClientId(i.clientId))return;const a=t.getBlockOrder(l);let s,c;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(s=i,c=r):(s=r,c=i);const u=s,p=c,d=t.getBlock(u.clientId),f=(0,o.getBlockType)(d.name),y=t.getBlock(p.clientId),m=(0,o.getBlockType)(y.name),g=d.attributes[u.attributeKey],h=y.attributes[p.attributeKey],b=f.attributes[u.attributeKey],v=m.attributes[p.attributeKey];let _=(0,L.create)({html:g,...z(b)}),k=(0,L.create)({html:h,...z(v)});_=(0,L.remove)(_,u.offset,_.text.length),k=(0,L.remove)(k,0,p.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...d,attributes:{...d.attributes,[u.attributeKey]:(0,L.toHTMLString)({value:_,...z(b)})}},(0,o.createBlock)((0,o.getDefaultBlockName)()),{...y,attributes:{...y.attributes,[p.attributeKey]:(0,L.toHTMLString)({value:k,...z(v)})}}],1,t.getSelectedBlocksInitialCaretPosition())},Bn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();n.selectionChange({start:{clientId:r.clientId},end:{clientId:o.clientId}})},Pn=(e,t)=>n=>{let{registry:r,select:i,dispatch:l}=n;const a=[e,t];l({type:"MERGE_BLOCKS",blocks:a});const[s,c]=a,u=i.getBlock(s),p=(0,o.getBlockType)(u.name);if(!p)return;const d=i.getBlock(c);if(p&&!p.merge){const e=(0,o.switchToBlockType)(d,p.name);if(1!==(null==e?void 0:e.length))return void l.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void l.selectBlock(u.clientId):void r.batch((()=>{l.insertBlocks(t.innerBlocks,void 0,s),l.removeBlock(c),l.selectBlock(t.innerBlocks[0].clientId)}))}const f=(0,o.getBlockType)(d.name),{clientId:y,attributeKey:m,offset:g}=i.getSelectionStart(),h=(y===s?p:f).attributes[m],b=(y===s||y===c)&&void 0!==m&&void 0!==g&&!!h;h||("number"==typeof m?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 m):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const v=(0,o.cloneBlock)(u),_=(0,o.cloneBlock)(d);if(b){const e=y===s?v:_,t=e.attributes[m],n=(0,L.insert)((0,L.create)({html:t,...z(h)}),Jt,g,g);e.attributes[m]=(0,L.toHTMLString)({value:n,...z(h)})}const k=u.name===d.name?[_]:(0,o.switchToBlockType)(_,u.name);if(!k||!k.length)return;const S=p.merge(v.attributes,k[0].attributes);if(b){const e=Yt(S),t=S[e],n=(0,L.create)({html:t,...z(p.attributes[e])}),r=n.text.indexOf(Jt),o=(0,L.remove)(n,r,r+1),i=(0,L.toHTMLString)({value:o,...z(p.attributes[e])});S[e]=i,l.selectionChange(u.clientId,e,r,r)}l.replaceBlocks([u.clientId,d.clientId],[{...u,attributes:{...u.attributes,...S}},...k.slice(1)],0)},Tn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;e=Qt(e);const i=r.getBlockRootClientId(e[0]);r.canRemoveBlocks(e,i)&&(t&&o.selectPreviousBlock(e[0]),o({type:"REMOVE_BLOCKS",clientIds:e}),o((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()})))}};function On(e,t){return Tn([e],t)}function Rn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function Nn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Fn(){return{type:"START_TYPING"}}function Mn(){return{type:"STOP_TYPING"}}function Dn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Ln(){return{type:"STOP_DRAGGING_BLOCKS"}}function Un(){return j()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function jn(){return j()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function zn(e,t,n,r){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}:{type:"SELECTION_CHANGE",...e}}const Vn=(e,t,n)=>r=>{let{dispatch:i}=r;const l=(0,o.getDefaultBlockName)();if(!l)return;const a=(0,o.createBlock)(l,e);return i.insertBlock(a,n,t)};function Gn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Hn(e){return{type:"UPDATE_SETTINGS",settings:e}}function Wn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function $n(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Kn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const qn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Jn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},Yn=e=>t=>{let{dispatch:n,select:r}=t;if("zoom-out"===e){const e=r.getBlockSelectionStart();e&&n.selectBlock(r.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,qt.speak)((0,m.__)("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.")):"edit"===e?(0,qt.speak)((0,m.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,qt.speak)((0,m.__)("You are currently in zoom-out mode."))},Qn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,qt.speak)((0,m.__)("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."))}},Zn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:i}=n;if(!e||!e.length)return;const l=r.getBlocksByClientId(e);if(l.some((e=>!e)))return;const a=l.map((e=>e.name));if(a.some((e=>!(0,o.hasBlockSupport)(e,"multiple",!0))))return;const s=r.getBlockRootClientId(e[0]),c=Qt(e),u=r.getBlockIndex(c[c.length-1]),p=l.map((e=>(0,o.__experimentalCloneSanitizedBlock)(e)));return i.insertBlocks(p,u+1,s,t),p.length>1&&t&&i.multiSelect(p[0].clientId,p[p.length-1].clientId),p.map((e=>e.clientId))}},Xn=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i)},er=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i+1)};function tr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const nr=e=>async t=>{let{dispatch:n}=t;n(tr(e,!0)),await new Promise((e=>setTimeout(e,150))),n(tr(e,!1))};function rr(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function or(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function ir(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const lr="core/block-editor",ar={reducer:T,selectors:e,actions:t},sr=(0,d.createReduxStore)(lr,{...ar,persist:["preferences"]});(0,d.registerStore)(lr,{...ar,persist:["preferences"]});const cr={name:"",isSelected:!1},ur=(0,a.createContext)(cr),{Provider:pr}=ur;function dr(){return(0,a.useContext)(ur)}function fr(){const{isSelected:e,clientId:t,name:n}=dr();return(0,d.useSelect)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:l}=r(sr);return!!i(t)&&l().every((e=>o(e)===n))}),[t,e,n])}function yr(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:i=!1}=e;const l=function(e,t){const n=fr(),{clientId:r}=dr(),i=(0,d.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:i}=e(sr),{hasBlockSupport:l}=e(o.store);return t&&l(n(r),"__experimentalExposeControlsToChildren",!1)&&i(r)}),[t,r]);var l;return n?null===(l=y[e])||void 0===l?void 0:l.Fill:i?y.parent.Fill:null}(t,i);return l?(0,a.createElement)(f.__experimentalStyleProvider,{document:document},(0,a.createElement)(l,null,(e=>{const o=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(f.__experimentalToolbarContext.Provider,{value:o},"default"===t&&(0,a.createElement)(f.ToolbarGroup,{controls:n}),r)}))):null}function mr(e){let{group:t="default",...n}=e;const r=(0,a.useContext)(f.__experimentalToolbarContext),o=y[t].Slot,i=(0,f.__experimentalUseSlot)(o.__unstableName);return Boolean(i.fills&&i.fills.length)?"default"===t?(0,a.createElement)(o,l({},n,{bubblesVirtually:!0,fillProps:r})):(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(o,l({},n,{bubblesVirtually:!0,fillProps:r}))):null}const gr=yr;gr.Slot=mr;const hr=e=>(0,a.createElement)(yr,l({group:"inline"},e));hr.Slot=e=>(0,a.createElement)(mr,l({group:"inline"},e));var br=gr;var vr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var _r=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var kr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var Sr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var Er=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"}));var wr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function Ar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function Cr(e,t,n,r){var o,i;let l="";return null!=t&&null!==(o=t[n])&&void 0!==o&&null!==(i=o.spacingStyles)&&void 0!==i&&i.length&&r&&t[n].spacingStyles.forEach((t=>{l+=`${Ar(e,t.selector.trim())} { `,l+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||r}`})).join("; "),l+="; }"})),l}function Ir(e){const{contentSize:t,wideSize:n}=e,r={},o=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return o.test(t)&&(r.none=(0,m.sprintf)((0,m.__)("Max %s wide"),t)),o.test(n)&&(r.wide=(0,m.sprintf)((0,m.__)("Max %s wide"),n)),r}const xr=(0,a.createContext)({refs:new Map,callbacks:new Map});function Br(e){let{children:t}=e;const n=(0,a.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,a.createElement)(xr.Provider,{value:n},t)}function Pr(e){const{refs:t,callbacks:n}=(0,a.useContext)(xr),r=(0,a.useRef)();return(0,a.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),(0,p.useRefEffect)((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function Tr(e){const{refs:t}=(0,a.useContext)(xr),n=(0,a.useRef)();return n.current=e,(0,a.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function Or(e){const{callbacks:t}=(0,a.useContext)(xr),n=Tr(e),[r,o]=(0,a.useState)(null);return(0,a.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}function Rr(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function Nr(e,t){if(!Rr(e))return e;const n=Mr(e),r=t.find((e=>String(e.slug)===n));return null==r?void 0:r.size}function Fr(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Mr(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const Dr={all:(0,m.__)("All sides"),top:(0,m.__)("Top"),bottom:(0,m.__)("Bottom"),left:(0,m.__)("Left"),right:(0,m.__)("Right"),mixed:(0,m.__)("Mixed"),vertical:(0,m.__)("Vertical"),horizontal:(0,m.__)("Horizontal")},Lr={top:void 0,right:void 0,bottom:void 0,left:void 0},Ur=["top","right","bottom","left"];function jr(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function zr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ur;return Object.values(e).length>=1&&Object.values(e).length<t.length||new Set(Object.values(e)).size>1}function Vr(e){return null!=e&&!(0,u.isEmpty)(Object.values(e).filter((e=>!!e)))}var Gr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));const Hr=["color","border","typography","spacing"],Wr={"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.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},$r={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function Kr(e){const{name:t,clientId:n}=dr(),r=(0,d.useSelect)((r=>{if(Hr.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let i;const l=(e=>$r[e]||e)(e);[...r(sr).getBlockParents(n),n].forEach((e=>{const n=r(sr).getBlockName(e);if((0,o.hasBlockSupport)(n,"__experimentalSettings",!1)){var a;const n=r(sr).getBlockAttributes(e),o=null!==(a=(0,u.get)(n,`settings.blocks.${t}.${l}`))&&void 0!==a?a:(0,u.get)(n,`settings.${l}`);void 0!==o&&(i=o)}}));const a=r(sr).getSettings();if(void 0===i){var s;const e=`__experimentalFeatures.${l}`,n=`__experimentalFeatures.blocks.${t}.${l}`;i=null!==(s=(0,u.get)(a,n))&&void 0!==s?s:(0,u.get)(a,e)}var c,p;if(void 0!==i)return o.__EXPERIMENTAL_PATHS_WITH_MERGE[l]?null!==(c=null!==(p=i.custom)&&void 0!==p?p:i.theme)&&void 0!==c?c:i.default:i;const d=Wr[l]?Wr[l](a):void 0;return void 0!==d?d:"typography.dropCap"===l||void 0}),[t,n,e]);return r}function qr(e){var t;let{spacingSizes:n,value:r,side:o,onChange:i,isMixed:l=!1,type:s,minimumCustomValue:u}=e;r=function(e,t){if(Rr(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(r,n);let p=n;const y=n.length<=8,g=(0,d.useSelect)((e=>{const t=e(sr).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[h,b]=(0,a.useState)(!g&&void 0!==r&&!Rr(r)),v=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["px","em","rem"]});let _=null;!y&&!h&&void 0!==r&&(!Rr(r)||Rr(r)&&l)?(p=[...n,{name:l?(0,m.__)("Mixed"):(0,m.sprintf)((0,m.__)("Custom (%s)"),r),slug:"custom",size:r}],_=p.length-1):l||(_=h?Nr(r,n):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":Mr(e),r=t.findIndex((e=>String(e.slug)===n));return-1!==r?r:NaN}(r,n));const k=(0,a.useMemo)((()=>(0,f.__experimentalParseQuantityAndUnitFromRawValue)(_)),[_])[1]||v[0].value,S=e=>{var t;return void 0===r||null===(t=n[e])||void 0===t?void 0:t.name},E=parseInt(_,10),w=(e,t)=>{var r;const o=parseInt(e,10);if("selectList"===t){if(0===o)return;if(1===o)return"0"}else if(0===o)return"0";return`var:preset|spacing|${null===(r=n[e])||void 0===r?void 0:r.slug}`},A=l?(0,m.__)("Mixed"):null,C=l?(0,m.__)("Mixed"):S(_),I=p.map(((e,t)=>({key:t,name:e.name}))),x=n.map(((e,t)=>({value:t,label:void 0}))),B=(0,m.sprintf)((0,m.__)("%1$s %2$s"),Dr[o],null==s?void 0:s.toLowerCase()),P=y&&!h&&void 0!==C;return(0,a.createElement)(a.Fragment,null,"all"!==o&&(0,a.createElement)(f.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,a.createElement)(f.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__side-label"},Dr[o]),P&&(0,a.createElement)(f.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},C)),"all"===o&&P&&(0,a.createElement)(f.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},C),!g&&(0,a.createElement)(f.Button,{label:h?(0,m.__)("Use size preset"):(0,m.__)("Set custom size"),icon:Gr,onClick:()=>{b(!h)},isPressed:h,isSmall:!0,className:c()({"components-spacing-sizes-control__custom-toggle-all":"all"===o,"components-spacing-sizes-control__custom-toggle-single":"all"!==o}),iconSize:24}),h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.__experimentalUnitControl,{onChange:e=>i((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:_,units:v,min:u,placeholder:A,disableUnits:l,label:B,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",style:{gridColumn:"1"},size:"__unstable-large"}),(0,a.createElement)(f.RangeControl,{value:E,min:0,max:100,withInputField:!1,onChange:e=>{i([e,k].join(""))},className:"components-spacing-sizes-control__custom-value-range"})),y&&!h&&(0,a.createElement)(f.RangeControl,{className:"components-spacing-sizes-control__range-control",value:_,onChange:e=>i(w(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===r&&i("0")},withInputField:!1,"aria-valuenow":_,"aria-valuetext":null===(t=n[_])||void 0===t?void 0:t.name,renderTooltipContent:S,min:0,max:n.length-1,marks:x,label:B,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),!y&&!h&&(0,a.createElement)(f.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:I.find((e=>e.key===_))||"",onChange:e=>{i(w(e.selectedItem.key,"selectList"))},options:I,label:B,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large"}))}function Jr(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l}=e;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return jr(Object.values(e))}(n),c=Vr(n)&&zr(n,r);return(0,a.createElement)(qr,{value:s,onChange:e=>{const o=(0,f.__experimentalApplyValueToSides)(n,e,r);t(o)},side:"all",spacingSizes:o,isMixed:c,type:i,minimumCustomValue:l})}function Yr(e){let{values:t,sides:n,onChange:r,spacingSizes:o,type:i,minimumCustomValue:l}=e;const s=null!=n&&n.length?Ur.filter((e=>n.includes(e))):Ur,c=e=>n=>{const o={...t};o[e]=n,r(o)};return(0,a.createElement)(a.Fragment,null,s.map((e=>(0,a.createElement)(qr,{value:t[e],label:Dr[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:c(e),spacingSizes:o,type:i,minimumCustomValue:l}))))}const Qr=["vertical","horizontal"];function Zr(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l}=e;const s=e=>r=>{if(!t)return;const o={...n};"vertical"===e&&(o.top=r,o.bottom=r),"horizontal"===e&&(o.left=r,o.right=r),t(o)},c=null!=r&&r.length?Qr.filter((e=>r.includes(e))):Qr;return(0,a.createElement)(a.Fragment,null,c.map((e=>{const t="vertical"===e?n.top:n.left;return(0,a.createElement)(qr,{value:t,onChange:s(e),label:Dr[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:o,type:i,minimumCustomValue:l})})))}var Xr=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));var eo=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function to(e){let{isLinked:t,onClick:n}=e;const r=t?(0,m.__)("Unlink sides"):(0,m.__)("Link sides");return(0,a.createElement)(f.Tooltip,{text:r},(0,a.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,a.createElement)(f.Button,{isSmall:!0,icon:t?Xr:eo,iconSize:24,"aria-label":r,onClick:n})))}function no(e){let{inputProps:t,onChange:n,label:r=(0,m.__)("Spacing Control"),values:o,sides:i,splitOnAxis:s=!1,useSelect:u,minimumCustomValue:p=0}=e;const d=[{name:0,slug:"0",size:0},...Kr("spacing.spacingSizes")||[]];d.length>8&&d.unshift({name:(0,m.__)("Default"),slug:"default",size:void 0});const y=o||Lr,g=Vr(o),h=1===(null==i?void 0:i.length),[b,v]=(0,a.useState)(!g||!zr(y,i)||h),_={...t,onChange:e=>{const t={...o,...e};n(t)},isLinked:b,sides:i,values:y,spacingSizes:d,useSelect:u,type:r,minimumCustomValue:p};return(0,a.createElement)("fieldset",{role:"region",className:c()("component-spacing-sizes-control",{"is-unlinked":!b})},(0,a.createElement)(f.BaseControl.VisualLabel,{as:"legend"},r),!h&&(0,a.createElement)(to,{onClick:()=>{v(!b)},isLinked:b}),b&&(0,a.createElement)(Jr,l({"aria-label":r},_)),!b&&s&&(0,a.createElement)(Zr,_),!b&&!s&&(0,a.createElement)(Yr,_))}window.wp.warning;var ro={default:(0,f.createSlotFill)("InspectorControls"),advanced:(0,f.createSlotFill)("InspectorAdvancedControls"),border:(0,f.createSlotFill)("InspectorControlsBorder"),color:(0,f.createSlotFill)("InspectorControlsColor"),dimensions:(0,f.createSlotFill)("InspectorControlsDimensions"),typography:(0,f.createSlotFill)("InspectorControlsTypography")};function oo(e){var t;let{__experimentalGroup:n="default",children:r}=e;const o=fr(),i=null===(t=ro[n])||void 0===t?void 0:t.Fill;return i?o?(0,a.createElement)(f.__experimentalStyleProvider,{document:document},(0,a.createElement)(i,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(f.__experimentalToolsPanelContext.Provider,{value:t},r)}))):null:("undefined"!=typeof process&&process.env,null)}const io=e=>e,lo=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,lo),io);return(0,u.isEmpty)(t)?void 0:t};function ao(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},t,n,u.clone)}function so(e,t,n,r,o,i){var l;if((0,u.every)(e,(e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===r.length)return n;let a=null===(l=r[0])||void 0===l?void 0:l.attributes;if(i.length>1&&r.length>1){if(!r[o])return n;var s;a=null===(s=r[o])||void 0===s?void 0:s.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,r]=e;r&&t[n].forEach((e=>{const t=(0,u.get)(a,e);t&&(c={...c,attributes:ao(c.attributes,e,t)})}))})),c}function co(e,t,n){const r=(0,o.getBlockSupport)(e,t),i=null==r?void 0:r.__experimentalSkipSerialization;return Array.isArray(i)?i.includes(n):i}function uo(e){let{children:t,group:n,label:r}=e;const{updateBlockAttributes:o}=(0,d.useDispatch)(sr),{getBlockAttributes:i,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:s,hasMultiSelection:c}=(0,d.useSelect)(sr),u=s(),p=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=c()?l():[u];n.forEach((n=>{const{style:r}=i(n);let o={style:r};e.forEach((e=>{o={...o,...e(o)}})),o={...o,style:lo(o.style)},t[n]=o})),o(n,t,!0)}),[lo,i,l,c,u,o]);return(0,a.createElement)(f.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:r,resetAll:p,key:u,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function po(e){let{Slot:t,...n}=e;const r=(0,a.useContext)(f.__experimentalToolsPanelContext);return(0,a.createElement)(t,l({},n,{fillProps:r,bubblesVirtually:!0}))}function fo(e){var t;let{__experimentalGroup:n="default",label:r,...o}=e;const i=null===(t=ro[n])||void 0===t?void 0:t.Slot,s=(0,f.__experimentalUseSlot)(null==i?void 0:i.__unstableName);if(!i||!s)return"undefined"!=typeof process&&process.env,null;return Boolean(s.fills&&s.fills.length)?r?(0,a.createElement)(uo,{group:n,label:r},(0,a.createElement)(po,l({},o,{Slot:i}))):(0,a.createElement)(i,l({},o,{bubblesVirtually:!0})):null}const yo=oo;yo.Slot=fo;const mo=e=>(0,a.createElement)(oo,l({},e,{__experimentalGroup:"advanced"}));mo.Slot=e=>(0,a.createElement)(fo,l({},e,{__experimentalGroup:"advanced"})),mo.slotName="InspectorAdvancedControls";var go=yo,ho=window.wp.isShallowEqual,bo=n.n(ho);var vo=function(e){return(0,p.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:r}=t;e.current.scrollBy(n,r)}const r={passive:!0};return t.addEventListener("wheel",n,r),()=>{t.removeEventListener("wheel",n,r)}}),[e])};const _o=Number.MAX_SAFE_INTEGER;var ko=(0,a.forwardRef)((function(e,t){let{clientId:n,bottomClientId:r,children:o,__unstableRefreshSize:i,__unstableCoverTarget:s=!1,__unstablePopoverSlot:u,__unstableContentRef:d,...y}=e;const m=Or(n),g=Or(null!=r?r:n),h=(0,p.useMergeRefs)([t,vo(d)]),[b,v]=(0,a.useReducer)((e=>(e+1)%_o),0);(0,a.useLayoutEffect)((()=>{if(!m)return;const e=new window.MutationObserver(v);return e.observe(m,{attributes:!0}),()=>{e.disconnect()}}),[m]);const _=(0,a.useMemo)((()=>b<0||!m||g!==m?{}:{position:"absolute",width:m.offsetWidth,height:m.offsetHeight}),[m,g,i,b]),k=(0,a.useMemo)((()=>{if(!(b<0||!m||r&&!g))return{getBoundingClientRect(){var e,t,n,r;const o=m.getBoundingClientRect(),i=null==g?void 0:g.getBoundingClientRect(),l=Math.min(o.left,null!==(e=null==i?void 0:i.left)&&void 0!==e?e:1/0),a=Math.min(o.top,null!==(t=null==i?void 0:i.top)&&void 0!==t?t:1/0),s=Math.max(o.right,null!==(n=i.right)&&void 0!==n?n:-1/0)-l,c=Math.max(o.bottom,null!==(r=i.bottom)&&void 0!==r?r:-1/0)-a;return new window.DOMRect(l,a,s,c)},ownerDocument:m.ownerDocument}}),[r,g,m,b]);return!m||r&&!g?null:(0,a.createElement)(f.Popover,l({ref:h,animate:!1,position:"top right left",focusOnMount:!1,anchor:k,__unstableSlotName:u||null,resize:!1,flip:!1,shift:!0},y,{className:c()("block-editor-block-popover",y.className)}),s&&(0,a.createElement)("div",{style:_},o),!s&&o)}));function So(e){const t=(0,o.getBlockSupport)(e,Po);return!!(!0===t||null!=t&&t.margin)}function Eo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Kr("spacing.margin"),n=!Mo(e,"margin");return!So(e)||t||n}function wo(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i}=e,l=Kr("spacing.spacingSizes"),s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"]}),c=Fo(r,"margin"),u=c&&c.some((e=>Oo.includes(e)));if(Eo(e))return null;const p=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};i({style:lo(t)})};return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(0,a.createElement)(f.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:p,label:(0,m.__)("Margin"),sides:c,units:s,allowReset:!1,splitOnAxis:u}),(null==l?void 0:l.length)>0&&(0,a.createElement)(no,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.margin,onChange:p,label:(0,m.__)("Margin"),sides:c,units:s,allowReset:!1,splitOnAxis:!1})),native:null})}function Ao(e){var t,n;let{clientId:r,attributes:o}=e;const i=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,l=Kr("spacing.spacingSizes"),s=(0,a.useMemo)((()=>{const e=null!=i&&i.top?Nr(null==i?void 0:i.top,l):0,t=null!=i&&i.right?Nr(null==i?void 0:i.right,l):0,n=null!=i&&i.bottom?Nr(null==i?void 0:i.bottom,l):0,r=null!=i&&i.left?Nr(null==i?void 0:i.left,l):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:r,top:0!==e?`calc(${e} * -1)`:0,right:0!==t?`calc(${t} * -1)`:0,bottom:0!==n?`calc(${n} * -1)`:0,left:0!==r?`calc(${r} * -1)`:0}}),[i]),[c,u]=(0,a.useState)(!1),p=(0,a.useRef)(i),d=(0,a.useRef)(),f=()=>{d.current&&window.clearTimeout(d.current)};return(0,a.useEffect)((()=>(bo()(i,p.current)||(u(!0),p.current=i,f(),d.current=setTimeout((()=>{u(!1)}),400)),()=>f())),[i]),c?(0,a.createElement)(ko,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:i},(0,a.createElement)("div",{className:"block-editor__padding-visualizer",style:s})):null}function Co(e){const t=(0,o.getBlockSupport)(e,Po);return!!(!0===t||null!=t&&t.padding)}function Io(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Kr("spacing.padding"),n=!Mo(e,"padding");return!Co(e)||t||n}function xo(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i}=e,l=Kr("spacing.spacingSizes"),s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"]}),c=Fo(r,"padding"),u=c&&c.some((e=>Oo.includes(e)));if(Io(e))return null;const p=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};i({style:lo(t)})};return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(0,a.createElement)(f.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:p,label:(0,m.__)("Padding"),sides:c,units:s,allowReset:!1,splitOnAxis:u}),(null==l?void 0:l.length)>0&&(0,a.createElement)(no,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.padding,onChange:p,label:(0,m.__)("Padding"),sides:c,units:s,allowReset:!1,splitOnAxis:u})),native:null})}function Bo(e){var t,n;let{clientId:r,attributes:o}=e;const i=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,l=(0,a.useMemo)((()=>({borderTopWidth:Rr(null==i?void 0:i.top)?Fr(null==i?void 0:i.top):null==i?void 0:i.top,borderRightWidth:Rr(null==i?void 0:i.right)?Fr(null==i?void 0:i.right):null==i?void 0:i.right,borderBottomWidth:Rr(null==i?void 0:i.bottom)?Fr(null==i?void 0:i.bottom):null==i?void 0:i.bottom,borderLeftWidth:Rr(null==i?void 0:i.left)?Fr(null==i?void 0:i.left):null==i?void 0:i.left})),[i]),[s,c]=(0,a.useState)(!1),u=(0,a.useRef)(i),p=(0,a.useRef)(),d=()=>{p.current&&window.clearTimeout(p.current)};return(0,a.useEffect)((()=>(bo()(i,u.current)||(c(!0),u.current=i,d(),p.current=setTimeout((()=>{c(!1)}),400)),()=>d())),[i]),s?(0,a.createElement)(ko,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:i},(0,a.createElement)("div",{className:"block-editor__padding-visualizer",style:l})):null}const Po="spacing",To=["top","right","bottom","left"],Oo=["vertical","horizontal"];function Ro(e){const t=jo(e),n=Io(e),r=Eo(e),i=No(e),l=function(e){if("web"!==a.Platform.OS)return!1;return Do(e)||Co(e)||So(e)}(e.name),s=Kr("spacing.spacingSizes");if(i||!l)return null;const u=(0,o.getBlockSupport)(e.name,[Po,"__experimentalDefaultControls"]),p=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}},d=c()({"tools-panel-item-spacing":s&&s.length>0});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(go,{__experimentalGroup:"dimensions"},!n&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:d,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,m.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,spacing:{...null==r?void 0:r.spacing,padding:void 0}})})}(e),resetAllFilter:p("padding"),isShownByDefault:null==u?void 0:u.padding,panelId:e.clientId},(0,a.createElement)(xo,e)),!r&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:d,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,m.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,spacing:{...null==r?void 0:r.spacing,margin:void 0}})})}(e),resetAllFilter:p("margin"),isShownByDefault:null==u?void 0:u.margin,panelId:e.clientId},(0,a.createElement)(wo,e)),!t&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:d,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,m.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,spacing:{...null==r?void 0:r.spacing,blockGap:void 0}}})}(e),resetAllFilter:p("blockGap"),isShownByDefault:null==u?void 0:u.blockGap,panelId:e.clientId},(0,a.createElement)(zo,e))),!n&&(0,a.createElement)(Bo,e),!r&&(0,a.createElement)(Ao,e))}const No=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=jo(e),n=Io(e),r=Eo(e);return t&&n&&r};function Fo(e,t){var n;const r=(0,o.getBlockSupport)(e,Po);if(r&&"boolean"!=typeof r[t])return Array.isArray(r[t])?r[t]:null!==(n=r[t])&&void 0!==n&&n.sides?r[t].sides:void 0}function Mo(e,t){const n=Fo(e,t);return!(n&&n.some((e=>To.includes(e)))&&n.some((e=>Oo.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function Do(e){const t=(0,o.getBlockSupport)(e,Po);return!!(!0===t||null!=t&&t.blockGap)}function Lo(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Uo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Lo(e);if(!n)return null;const r=Fr(null==n?void 0:n.top)||t,o=Fr(null==n?void 0:n.left)||t;return r===o?r:`${r} ${o}`}function jo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Kr("spacing.blockGap");return!Do(e)||t}function zo(e){var t;const{clientId:n,attributes:{style:r},name:o,setAttributes:i}=e,l=Kr("spacing.spacingSizes"),s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"]}),c=Fo(o,"blockGap"),u=Tr(n);if(jo(e))return null;const p=c&&c.some((e=>Oo.includes(e))),d=e=>{var t;let n=e;e&&p?n={...Lo(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const o={...r,spacing:{...null==r?void 0:r.spacing,blockGap:n}};i({style:lo(o)});const l=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var a;u.current&&l&&(null===(a=u.current.parentNode)||void 0===a||a.replaceChild(u.current,u.current))},y=Lo(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap),g=p?{...y,right:null==y?void 0:y.left,bottom:null==y?void 0:y.top}:{top:null==y?void 0:y.top};return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(p?(0,a.createElement)(f.__experimentalBoxControl,{label:(0,m.__)("Block spacing"),min:0,onChange:d,units:s,sides:c,values:g,allowReset:!1,splitOnAxis:p}):(0,a.createElement)(f.__experimentalUnitControl,{label:(0,m.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:d,units:s,value:g})),(null==l?void 0:l.length)>0&&(0,a.createElement)(no,{values:g,onChange:d,label:(0,m.__)("Block spacing"),sides:p?c:["top"],units:s,allowReset:!1,splitOnAxis:p})),native:null})}const Vo=(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(f.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Go=(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(f.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Ho={top:{icon:(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(f.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,m._x)("Align top","Block vertical alignment setting")},center:{icon:Go,title:(0,m._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Vo,title:(0,m._x)("Align bottom","Block vertical alignment setting")}},Wo=["top","center","bottom"],$o={isAlternate:!0};var Ko=function(e){let{value:t,onChange:n,controls:r=Wo,isCollapsed:o=!0,isToolbar:i}=e;const s=Ho[t],c=Ho.top,u=i?f.ToolbarGroup:f.ToolbarDropdownMenu,p=i?{isCollapsed:o}:{popoverProps:{POPOVER_PROPS:$o}};return(0,a.createElement)(u,l({icon:s?s.icon:c.icon,label:(0,m._x)("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...Ho[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},p))};const qo=e=>(0,a.createElement)(Ko,l({},e,{isToolbar:!1})),Jo=e=>(0,a.createElement)(Ko,l({},e,{isToolbar:!0})),Yo={left:vr,center:_r,right:kr,"space-between":Sr};var Qo=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:i,isToolbar:s}=e;const c=e=>{r(e===o?void 0:e)},u=o?Yo[o]:Yo.left,p=[{name:"left",icon:vr,title:(0,m.__)("Justify items left"),isActive:"left"===o,onClick:()=>c("left")},{name:"center",icon:_r,title:(0,m.__)("Justify items center"),isActive:"center"===o,onClick:()=>c("center")},{name:"right",icon:kr,title:(0,m.__)("Justify items right"),isActive:"right"===o,onClick:()=>c("right")},{name:"space-between",icon:Sr,title:(0,m.__)("Space between items"),isActive:"space-between"===o,onClick:()=>c("space-between")}],d=s?f.ToolbarGroup:f.ToolbarDropdownMenu,y=s?{isCollapsed:n}:{};return(0,a.createElement)(d,l({icon:u,popoverProps:i,label:(0,m.__)("Change items justification"),controls:p.filter((e=>t.includes(e.name)))},y))};const Zo=e=>(0,a.createElement)(Qo,l({},e,{isToolbar:!1})),Xo=e=>(0,a.createElement)(Qo,l({},e,{isToolbar:!0})),ei={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},ti={left:"flex-start",right:"flex-end",center:"center"},ni={top:"flex-start",center:"center",bottom:"flex-end"},ri=["wrap","nowrap"];var oi={name:"flex",label:(0,m.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r={}}=e;const{allowOrientation:o=!0}=r;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.Flex,null,(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(li,{layout:t,onChange:n})),(0,a.createElement)(f.FlexItem,null,o&&(0,a.createElement)(si,{layout:t,onChange:n}))),(0,a.createElement)(ai,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;if(null!=r&&r.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=r;return(0,a.createElement)(br,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(li,{layout:t,onChange:n,isToolbar:!0}),o&&"vertical"!==(null==t?void 0:t.orientation)&&(0,a.createElement)(ii,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o,style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{orientation:c="horizontal"}=o,u=null!=i&&null!==(t=i.spacing)&&void 0!==t&&t.blockGap&&!co(l,"spacing","blockGap")?Uo(null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,p=ei[o.justifyContent],d=ri.includes(o.flexWrap)?o.flexWrap:"wrap",f=ni[o.verticalAlignment],y=ti[o.justifyContent]||ti.left;let m="";const g=[];return d&&"wrap"!==d&&g.push(`flex-wrap: ${d}`),"horizontal"===c?(f&&g.push(`align-items: ${f}`),p&&g.push(`justify-content: ${p}`)):(g.push("flex-direction: column"),g.push(`align-items: ${y}`)),g.length&&(m=`${Ar(r)} {\n\t\t\t\t${g.join("; ")};\n\t\t\t}`),a&&u&&(m+=Cr(r,s,"flex",u)),m},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function ii(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{verticalAlignment:o=ni.center}=t,i=e=>{n({...t,verticalAlignment:e})};if(r)return(0,a.createElement)(qo,{onChange:i,value:o});const l=[{value:"flex-start",label:(0,m.__)("Align items top")},{value:"center",label:(0,m.__)("Align items center")},{value:"flex-end",label:(0,m.__)("Align items bottom")}];return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,a.createElement)("legend",null,(0,m.__)("Vertical alignment")),(0,a.createElement)("div",null,l.map(((e,t,n)=>(0,a.createElement)(f.Button,{key:e,label:n,icon:t,isPressed:o===e,onClick:()=>i(e)})))))}function li(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:i="horizontal"}=t,l=e=>{n({...t,justifyContent:e})},s=["left","center","right"];if("horizontal"===i&&s.push("space-between"),r)return(0,a.createElement)(Zo,{allowedControls:s,value:o,onChange:l,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:vr,label:(0,m.__)("Justify items left")},{value:"center",icon:_r,label:(0,m.__)("Justify items center")},{value:"right",icon:kr,label:(0,m.__)("Justify items right")}];return"horizontal"===i&&c.push({value:"space-between",icon:Sr,label:(0,m.__)("Space between items")}),(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,a.createElement)("legend",null,(0,m.__)("Justification")),(0,a.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:r}=e;return(0,a.createElement)(f.Button,{key:t,label:r,icon:n,isPressed:o===t,onClick:()=>l(t)})}))))}function ai(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,a.createElement)(f.ToggleControl,{label:(0,m.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function si(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal"}=t;return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,a.createElement)("legend",null,(0,m.__)("Orientation")),(0,a.createElement)(f.Button,{label:(0,m.__)("Horizontal"),icon:Er,isPressed:"horizontal"===r,onClick:()=>n({...t,orientation:"horizontal"})}),(0,a.createElement)(f.Button,{label:(0,m.__)("Vertical"),icon:wr,isPressed:"vertical"===r,onClick:()=>n({...t,orientation:"vertical"})}))}var ci={name:"default",label:(0,m.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:r,blockName:o,hasBlockGapSupport:i,layoutDefinitions:l}=e;const a=Uo(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap);let s="";co(o,"spacing","blockGap")||(null!=a&&a.top?s=Uo(null==a?void 0:a.top):"string"==typeof a&&(s=Uo(a)));let c="";return i&&s&&(c+=Cr(n,l,"default",s)),c},getOrientation(){return"vertical"},getAlignments(e){const t=Ir(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};var ui=function(e){let{icon:t,size:n=24,...r}=e;return(0,a.cloneElement)(t,{width:n,height:n,...r})};var pi=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var di=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),fi=window.wp.styleEngine,yi={name:"constrained",label:(0,m.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o,justifyContent:i="center"}=t,l=[{value:"left",icon:vr,label:(0,m.__)("Justify items left")},{value:"center",icon:_r,label:(0,m.__)("Justify items center")},{value:"right",icon:kr,label:(0,m.__)("Justify items right")}],s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"]});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(f.__experimentalUnitControl,{label:(0,m.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:s}),(0,a.createElement)(ui,{icon:pi})),(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(f.__experimentalUnitControl,{label:(0,m.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:s}),(0,a.createElement)(ui,{icon:di}))),(0,a.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,m.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,a.createElement)(f.__experimentalToggleGroupControl,{__experimentalIsBorderless:!0,label:(0,m.__)("Justification"),value:i,onChange:e=>{n({...t,justifyContent:e})}},l.map((e=>{let{value:t,icon:n,label:r}=e;return(0,a.createElement)(f.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o={},style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{contentSize:c,wideSize:u,justifyContent:p}=o,d=Uo(null==i||null===(t=i.spacing)||void 0===t?void 0:t.blockGap);let f="";co(l,"spacing","blockGap")||(null!=d&&d.top?f=Uo(null==d?void 0:d.top):"string"==typeof d&&(f=Uo(d)));const y="left"===p?"0 !important":"auto !important",m="right"===p?"0 !important":"auto !important";let g=c||u?`\n\t\t\t\t\t${Ar(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${y};\n\t\t\t\t\t\tmargin-right: ${m};\n\t\t\t\t\t}\n\t\t\t\t\t${Ar(r,"> .alignwide")}  {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${Ar(r,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===p?g+=`${Ar(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${y}; }`:"right"===p&&(g+=`${Ar(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${m}; }`),null!=i&&null!==(n=i.spacing)&&void 0!==n&&n.padding){(0,fi.getCSSRules)(i).forEach((e=>{"paddingRight"===e.key?g+=`\n\t\t\t\t\t${Ar(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(g+=`\n\t\t\t\t\t${Ar(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return a&&f&&(g+=Cr(r,s,"constrained",f)),g},getOrientation(){return"vertical"},getAlignments(e){const t=Ir(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};const mi=[ci,oi,yi];function gi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return mi.find((t=>t.name===e))}const hi={type:"default"},bi=(0,a.createContext)(hi),vi=bi.Provider;function _i(){return(0,a.useContext)(bi)}function ki(e){let{layout:t={},css:n,...r}=e;const o=gi(t.type),i=null!==Kr("spacing.blockGap");if(o){var l;if(n)return(0,a.createElement)("style",null,n);const e=null===(l=o.getLayoutStyle)||void 0===l?void 0:l.call(o,{hasBlockGapSupport:i,layout:t,...r});if(e)return(0,a.createElement)("style",null,e)}return null}const Si=["none","left","center","right","wide","full"],Ei=["wide","full"];function wi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Si;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),r=_i(),o=gi(null==r?void 0:r.type),i=o.getAlignments(r);if(n){const t=i.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==o.name&&"constrained"!==o.name)return[];const{alignments:l=Si}=r,a=e.filter((e=>(r.alignments||t||!Ei.includes(e))&&l.includes(e))).map((e=>({name:e})));return 1===a.length&&"none"===a[0].name?[]:a}var Ai=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var Ci=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var Ii=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var xi=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const Bi={none:{icon:Ai,title:(0,m._x)("None","Alignment option")},left:{icon:Ci,title:(0,m.__)("Align left")},center:{icon:pi,title:(0,m.__)("Align center")},right:{icon:Ii,title:(0,m.__)("Align right")},wide:{icon:di,title:(0,m.__)("Wide width")},full:{icon:xi,title:(0,m.__)("Full width")}},Pi={isAlternate:!0};var Ti=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:i=!0}=e;const s=wi(r);if(!!!s.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const p=Bi[t],d=Bi.none,y=o?f.ToolbarGroup:f.ToolbarDropdownMenu,g={icon:p?p.icon:d.icon,label:(0,m.__)("Align")},h=o?{isCollapsed:i,controls:s.map((e=>{let{name:n}=e;return{...Bi[n],isActive:t===n||!t&&"none"===n,role:i?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{toggleProps:{describedBy:(0,m.__)("Change alignment")},popoverProps:Pi,children:e=>{let{onClose:n}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},s.map((e=>{let{name:r,info:o}=e;const{icon:i,title:l}=Bi[r],s=r===t||!t&&"none"===r;return(0,a.createElement)(f.MenuItem,{key:r,icon:i,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{u(r),n()},role:"menuitemradio",info:o},l)}))))}};return(0,a.createElement)(y,l({},g,h))};const Oi=e=>(0,a.createElement)(Ti,l({},e,{isToolbar:!1})),Ri=e=>(0,a.createElement)(Ti,l({},e,{isToolbar:!0})),Ni=["left","center","right","wide","full"],Fi=["wide","full"];function Mi(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Ni.filter((t=>e.includes(t))):!0===e?[...Ni]:[],!r||!0===e&&!n?(0,u.without)(t,...Fi):t}const Di=(0,p.createHigherOrderComponent)((e=>t=>{const n=(0,a.createElement)(e,t),{name:r}=t,i=wi(Mi((0,o.getBlockSupport)(r,"align"),(0,o.hasBlockSupport)(r,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),l=(0,d.useSelect)((e=>e(sr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);if(!i.length||l)return n;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(br,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Oi,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const i=(0,o.getBlockType)(t.name);(null==i||null===(n=i.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:i})),n)}),"withToolbarControls"),Li=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r}=t,{align:i}=r,s=wi(Mi((0,o.getBlockSupport)(n,"align"),(0,o.hasBlockSupport)(n,"alignWide",!0)));if(void 0===i)return(0,a.createElement)(e,t);let c=t.wrapperProps;return s.some((e=>e.name===i))&&(c={...c,"data-align":i}),(0,a.createElement)(e,l({},t,{wrapperProps:c}))}));(0,i.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,o.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Ni,""]}}),e})),(0,i.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Li),(0,i.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Di),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return Mi((0,o.getBlockSupport)(t,"align"),(0,o.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=c()(`align${r}`,e.className)),e})),(0,i.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Ui=/[\s#]/g,ji={type:"string",source:"attribute",attribute:"id",selector:"*"};const zi=(0,p.createHigherOrderComponent)((e=>t=>{if((0,o.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===a.Platform.OS,r=(0,a.createElement)(f.TextControl,{className:"html-anchor-control",label:(0,m.__)("HTML anchor"),help:(0,a.createElement)(a.Fragment,null,(0,m.__)("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."),n&&(0,a.createElement)(f.ExternalLink,{href:(0,m.__)("https://wordpress.org/support/article/page-jumps/")},(0,m.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,m.__)("Add an anchor"),onChange:e=>{e=e.replace(Ui,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&(0,a.createElement)(go,{__experimentalGroup:"advanced"},r),!n&&"core/heading"===t.name&&(0,a.createElement)(go,null,(0,a.createElement)(f.PanelBody,{title:(0,m.__)("Heading settings")},r)))}return(0,a.createElement)(e,t)}),"withInspectorControl");(0,i.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,o.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:ji}),e})),(0,i.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",zi),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,o.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Vi={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,i.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,o.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Vi}),e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,o.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Gi=(0,p.createHigherOrderComponent)((e=>t=>(0,o.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(go,{__experimentalGroup:"advanced"},(0,a.createElement)(f.TextControl,{autoComplete:"off",label:(0,m.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,m.__)("Separate multiple classes with spaces.")}))):(0,a.createElement)(e,t)),"withInspectorControl");(0,i.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,o.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,i.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Gi),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,o.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){if(!(0,o.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===r.length&&e.innerBlocks.length===t.length)return e;if(1===r.length&&t.length>1||r.length>1&&1===t.length)return e;if(t[n]){var i;const r=null===(i=t[n])||void 0===i?void 0:i.attributes.className;if(r)return{...e,attributes:{...e.attributes,className:r}}}return e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,o.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,o.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,o.getBlockDefaultClassName)(t.name)),e}));var Hi=window.wp.dom;const Wi=(0,a.createContext)({});function $i(e){let{value:t,children:n}=e;const r=(0,a.useContext)(Wi),o=(0,a.useMemo)((()=>({...r,...t})),[r,t]);return(0,a.createElement)(Wi.Provider,{value:o,children:n})}var Ki=Wi;const qi={};var Ji=(0,f.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=(0,o.getBlockType)(n),i=(0,a.useContext)(Ki),s=(0,a.useMemo)((()=>r&&r.usesContext?(0,u.pick)(i,r.usesContext):qi),[r,i]);if(!r)return null;const p=r.edit||r.save;if(r.apiVersion>1)return(0,a.createElement)(p,l({},e,{context:s}));const d=(0,o.hasBlockSupport)(r,"className",!0)?(0,o.getBlockDefaultClassName)(n):null,f=c()(d,t.className,e.className);return(0,a.createElement)(p,l({},e,{context:s,className:f}))}));function Yi(e){const{name:t,isSelected:n,clientId:r}=e,o={name:t,isSelected:n,clientId:r};return(0,a.createElement)(pr,{value:(0,a.useMemo)((()=>o),Object.values(o))},(0,a.createElement)(Ji,e))}var Qi=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Zi=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,a.createElement)("div",{style:{display:"contents",all:"initial"}},(0,a.createElement)("div",{className:c()(t,"block-editor-warning")},(0,a.createElement)("div",{className:"block-editor-warning__contents"},(0,a.createElement)("p",{className:"block-editor-warning__message"},r),(a.Children.count(n)>0||o)&&(0,a.createElement)("div",{className:"block-editor-warning__actions"},a.Children.count(n)>0&&a.Children.map(n,((e,t)=>(0,a.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,a.createElement)(f.DropdownMenu,{className:"block-editor-warning__secondary",icon:Qi,label:(0,m.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,a.createElement)(f.MenuGroup,null,o.map(((e,t)=>(0,a.createElement)(f.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},Xi=n(1973);function el(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:i,className:l}=e;return(0,a.createElement)("div",{className:l},(0,a.createElement)("div",{className:"block-editor-block-compare__content"},(0,a.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,a.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,a.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,a.createElement)(a.RawHTML,null,(0,Hi.safeHTML)(r)))),(0,a.createElement)("div",{className:"block-editor-block-compare__action"},(0,a.createElement)(f.Button,{variant:"secondary",tabIndex:"0",onClick:o},i)))}var tl=function(e){let{block:t,onKeep:n,onConvert:r,convertor:i,convertButtonText:l}=e;const s=(p=i(t),(0,u.castArray)(p).map((e=>(0,o.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var p;const d=(f=t.originalContent,y=s,(0,Xi.Kx)(f,y).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,a.createElement)("span",{key:t,className:n},e.value)})));var f,y;return(0,a.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,a.createElement)(el,{title:(0,m.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,m.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,a.createElement)(el,{title:(0,m.__)("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:l,rawContent:d,renderedContent:s}))};const nl=e=>(0,o.rawHandler)({HTML:e.originalContent});var rl=(0,p.compose)([(0,d.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(sr).getBlock(n)}})),(0,d.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(sr);return{convertToClassic(){r(n.clientId,(e=>(0,o.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>(0,o.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,nl(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return(0,o.createBlock)(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:i,block:l}=e;const s=!!(0,o.getBlockType)("core/html"),[c,u]=(0,a.useState)(!1),p=(0,a.useCallback)((()=>u(!0)),[]),d=(0,a.useCallback)((()=>u(!1)),[]),y=(0,a.useMemo)((()=>[{title:(0,m._x)("Resolve","imperative verb"),onClick:p},s&&{title:(0,m.__)("Convert to HTML"),onClick:t},{title:(0,m.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)),[p,t,r]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Zi,{actions:[(0,a.createElement)(f.Button,{key:"recover",onClick:i,variant:"primary"},(0,m.__)("Attempt Block Recovery"))],secondaryActions:y},(0,m.__)("This block contains unexpected or invalid content.")),c&&(0,a.createElement)(f.Modal,{title:(0,m.__)("Resolve Block"),onRequestClose:d,className:"block-editor-block-compare"},(0,a.createElement)(tl,{block:l,onKeep:t,onConvert:n,convertor:nl,convertButtonText:(0,m.__)("Convert to Blocks")})))}));const ol=(0,a.createElement)(Zi,{className:"block-editor-block-list__block-crash-warning"},(0,m.__)("This block has encountered an error and cannot be previewed."));var il=()=>ol;class ll extends a.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 al=ll,sl=n(773);var cl=function(e){let{clientId:t}=e;const[n,r]=(0,a.useState)(""),i=(0,d.useSelect)((e=>e(sr).getBlock(t)),[t]),{updateBlock:l}=(0,d.useDispatch)(sr);return(0,a.useEffect)((()=>{r((0,o.getBlockContent)(i))}),[i]),(0,a.createElement)(sl.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,o.getBlockType)(i.name);if(!e)return;const a=(0,o.getBlockAttributes)(e,n,i.attributes),s=n||(0,o.getSaveContent)(e,a),[c]=n?(0,o.validateBlock)({...i,attributes:a,originalContent:s}):[!0];l(t,{attributes:a,originalContent:s,isValid:c}),n||r({content:s})},onChange:e=>r(e.target.value)})},ul=n(9196),pl=n.n(ul),dl=Object.defineProperty,fl={};((e,t)=>{for(var n in t)dl(e,n,{get:t[n],enumerable:!0})})(fl,{assign:()=>$l,colors:()=>Gl,createStringInterpolator:()=>Ul,skipAnimation:()=>Hl,to:()=>jl,willAdvance:()=>Wl});var yl=Pl(),ml=e=>Cl(e,yl),gl=Pl();ml.write=e=>Cl(e,gl);var hl=Pl();ml.onStart=e=>Cl(e,hl);var bl=Pl();ml.onFrame=e=>Cl(e,bl);var vl=Pl();ml.onFinish=e=>Cl(e,vl);var _l=[];ml.setTimeout=(e,t)=>{const n=ml.now()+t,r=()=>{const e=_l.findIndex((e=>e.cancel==r));~e&&_l.splice(e,1),wl-=~e?1:0},o={time:n,handler:e,cancel:r};return _l.splice(kl(n),0,o),wl+=1,Il(),o};var kl=e=>~(~_l.findIndex((t=>t.time>e))||~_l.length);ml.cancel=e=>{hl.delete(e),bl.delete(e),vl.delete(e),yl.delete(e),gl.delete(e)},ml.sync=e=>{Al=!0,ml.batchedUpdates(e),Al=!1},ml.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,ml.onStart(n)}return r.handler=e,r.cancel=()=>{hl.delete(n),t=null},r};var Sl="undefined"!=typeof window?window.requestAnimationFrame:()=>{};ml.use=e=>Sl=e,ml.now="undefined"!=typeof performance?()=>performance.now():Date.now,ml.batchedUpdates=e=>e(),ml.catch=console.error,ml.frameLoop="always",ml.advance=()=>{"demand"!==ml.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Bl()};var El=-1,wl=0,Al=!1;function Cl(e,t){Al?(t.delete(e),e(0)):(t.add(e),Il())}function Il(){El<0&&(El=0,"demand"!==ml.frameLoop&&Sl(xl))}function xl(){~El&&(Sl(xl),ml.batchedUpdates(Bl))}function Bl(){const e=El;El=ml.now();const t=kl(El);t&&(Tl(_l.splice(0,t),(e=>e.handler())),wl-=t),wl?(hl.flush(),yl.flush(e?Math.min(64,El-e):16.667),bl.flush(),gl.flush(),vl.flush()):El=-1}function Pl(){let e=new Set,t=e;return{add(n){wl+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return wl-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,wl-=t.size,Tl(t,(t=>t(n)&&e.add(t))),wl+=e.size,t=e)}}}function Tl(e,t){e.forEach((e=>{try{t(e)}catch(e){ml.catch(e)}}))}function Ol(){}var Rl={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Nl(e,t){if(Rl.arr(e)){if(!Rl.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Fl=(e,t)=>e.forEach(t);function Ml(e,t,n){if(Rl.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Dl=e=>Rl.und(e)?[]:Rl.arr(e)?e:[e];function Ll(e,t){if(e.size){const n=Array.from(e);e.clear(),Fl(n,t)}}var Ul,jl,zl=(e,...t)=>Ll(e,(e=>e(...t))),Vl=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Gl=null,Hl=!1,Wl=Ol,$l=e=>{e.to&&(jl=e.to),e.now&&(ml.now=e.now),void 0!==e.colors&&(Gl=e.colors),null!=e.skipAnimation&&(Hl=e.skipAnimation),e.createStringInterpolator&&(Ul=e.createStringInterpolator),e.requestAnimationFrame&&ml.use(e.requestAnimationFrame),e.batchedUpdates&&(ml.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Wl=e.willAdvance),e.frameLoop&&(ml.frameLoop=e.frameLoop)},Kl=new Set,ql=[],Jl=[],Yl=0,Ql={get idle(){return!Kl.size&&!ql.length},start(e){Yl>e.priority?(Kl.add(e),ml.onStart(Zl)):(Xl(e),ml(ta))},advance:ta,sort(e){if(Yl)ml.onFrame((()=>Ql.sort(e)));else{const t=ql.indexOf(e);~t&&(ql.splice(t,1),ea(e))}},clear(){ql=[],Kl.clear()}};function Zl(){Kl.forEach(Xl),Kl.clear(),ml(ta)}function Xl(e){ql.includes(e)||ea(e)}function ea(e){ql.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(ql,(t=>t.priority>e.priority)),0,e)}function ta(e){const t=Jl;for(let n=0;n<ql.length;n++){const r=ql[n];Yl=r.priority,r.idle||(Wl(r),r.advance(e),r.idle||t.push(r))}return Yl=0,(Jl=ql).length=0,(ql=t).length>0}var na="[-+]?\\d*\\.?\\d+",ra=na+"%";function oa(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var ia=new RegExp("rgb"+oa(na,na,na)),la=new RegExp("rgba"+oa(na,na,na,na)),aa=new RegExp("hsl"+oa(na,ra,ra)),sa=new RegExp("hsla"+oa(na,ra,ra,na)),ca=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ua=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,pa=/^#([0-9a-fA-F]{6})$/,da=/^#([0-9a-fA-F]{8})$/;function fa(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 ya(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=fa(o,r,e+1/3),l=fa(o,r,e),a=fa(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*l)<<16|Math.round(255*a)<<8}function ma(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ga(e){return(parseFloat(e)%360+360)%360/360}function ha(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ba(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function va(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=pa.exec(e))?parseInt(t[1]+"ff",16)>>>0:Gl&&void 0!==Gl[e]?Gl[e]:(t=ia.exec(e))?(ma(t[1])<<24|ma(t[2])<<16|ma(t[3])<<8|255)>>>0:(t=la.exec(e))?(ma(t[1])<<24|ma(t[2])<<16|ma(t[3])<<8|ha(t[4]))>>>0:(t=ca.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=da.exec(e))?parseInt(t[1],16)>>>0:(t=ua.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=aa.exec(e))?(255|ya(ga(t[1]),ba(t[2]),ba(t[3])))>>>0:(t=sa.exec(e))?(ya(ga(t[1]),ba(t[2]),ba(t[3]))|ha(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var _a=(e,t,n)=>{if(Rl.fun(e))return e;if(Rl.arr(e))return _a({range:e,output:t,extrapolate:n});if(Rl.str(e.output[0]))return Ul(e);const r=e,o=r.output,i=r.range||[0,1],l=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,l,a,s){let c=s?s(e):e;if(c<t){if("identity"===l)return c;"clamp"===l&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],s,l,a,r.map)}};var ka=1.70158,Sa=1.525*ka,Ea=ka+1,wa=2*Math.PI/3,Aa=2*Math.PI/4.5,Ca=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Ia={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Ea*e*e*e-ka*e*e,easeOutBack:e=>1+Ea*Math.pow(e-1,3)+ka*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Sa)/2:(Math.pow(2*e-2,2)*((Sa+1)*(2*e-2)+Sa)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*wa),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*wa)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Aa)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Aa)/2+1,easeInBounce:e=>1-Ca(1-e),easeOutBounce:Ca,easeInOutBounce:e=>e<.5?(1-Ca(1-2*e))/2:(1+Ca(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},xa=Symbol.for("FluidValue.get"),Ba=Symbol.for("FluidValue.observers"),Pa=e=>Boolean(e&&e[xa]),Ta=e=>e&&e[xa]?e[xa]():e,Oa=e=>e[Ba]||null;function Ra(e,t){const n=e[Ba];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Na=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Fa(this,e)}},Fa=(e,t)=>Ua(e,xa,t);function Ma(e,t){if(e[xa]){let n=e[Ba];n||Ua(e,Ba,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Da(e,t){const n=e[Ba];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ba]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var La,Ua=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ja=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,za=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Va=new RegExp(`(${ja.source})(%|[a-z]+)`,"i"),Ga=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ha=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Wa=e=>{const[t,n]=$a(e);if(!t||Vl())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Ha.test(n)?Wa(n):n||e},$a=e=>{const t=Ha.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Ka=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,qa=e=>{La||(La=Gl?new RegExp(`(${Object.keys(Gl).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Ta(e).replace(Ha,Wa).replace(za,va).replace(La,va))),n=t.map((e=>e.match(ja).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),o=r.map((t=>_a({...e,output:t})));return e=>{const n=!Va.test(t[0])&&t.find((e=>Va.test(e)))?.replace(ja,"");let r=0;return t[0].replace(ja,(()=>`${o[r++](e)}${n||""}`)).replace(Ga,Ka)}},Ja="react-spring: ",Ya=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Ja}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Qa=Ya(console.warn);var Za=Ya(console.warn);function Xa(e){return Rl.str(e)&&("#"==e[0]||/\d/.test(e)||!Vl()&&Ha.test(e)||e in(Gl||{}))}var es=Vl()?ul.useEffect:ul.useLayoutEffect;function ts(){const e=(0,ul.useState)()[1],t=(()=>{const e=(0,ul.useRef)(!1);return es((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var ns=e=>(0,ul.useEffect)(e,rs),rs=[];function os(e){const t=(0,ul.useRef)();return(0,ul.useEffect)((()=>{t.current=e})),t.current}var is=Symbol.for("Animated:node"),ls=e=>e&&e[is],as=(e,t)=>{return n=e,r=is,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},ss=e=>e&&e[is]&&e[is].getPayload(),cs=class{constructor(){as(this,this)}getPayload(){return this.payload||[]}},us=class extends cs{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Rl.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new us(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Rl.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Rl.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ps=class extends us{constructor(e){super(0),this._string=null,this._toString=_a({output:[e,e]})}static create(e){return new ps(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Rl.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=_a({output:[this.getValue(),e]})),this._value=0,super.reset()}},ds={dependencies:null},fs=class extends cs{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ml(this.source,((n,r)=>{var o;(o=n)&&o[is]===o?t[r]=n.getValue(e):Pa(n)?t[r]=Ta(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Fl(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ml(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){ds.dependencies&&Pa(e)&&ds.dependencies.add(e);const t=ss(e);t&&Fl(t,(e=>this.add(e)))}},ys=class extends fs{constructor(e){super(e)}static create(e){return new ys(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ms)),!0)}};function ms(e){return(Xa(e)?ps:us).create(e)}function gs(e){const t=ls(e);return t?t.constructor:Rl.arr(e)?ys:Xa(e)?ps:us}var hs=(e,t)=>{const n=!Rl.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ul.forwardRef)(((r,o)=>{const i=(0,ul.useRef)(null),l=n&&(0,ul.useCallback)((e=>{i.current=function(e,t){e&&(Rl.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[a,s]=function(e,t){const n=new Set;ds.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new fs(e),ds.dependencies=null,[e,n]}(r,t),c=ts(),u=()=>{const e=i.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},p=new bs(u,s),d=(0,ul.useRef)();es((()=>(d.current=p,Fl(s,(e=>Ma(e,p))),()=>{d.current&&(Fl(d.current.deps,(e=>Da(e,d.current))),ml.cancel(d.current.update))}))),(0,ul.useEffect)(u,[]),ns((()=>()=>{const e=d.current;Fl(e.deps,(t=>Da(t,e)))}));const f=t.getComponentProps(a.getValue());return ul.createElement(e,{...f,ref:l})}))},bs=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ml.write(this.update)}};var vs=Symbol.for("AnimatedComponent"),_s=e=>Rl.str(e)?e:e&&Rl.str(e.displayName)?e.displayName:Rl.fun(e)&&e.name||null;function ks(e,...t){return Rl.fun(e)?e(...t):e}var Ss=(e,t)=>!0===e||!!(t&&e&&(Rl.fun(e)?e(t):Dl(e).includes(t))),Es=(e,t)=>Rl.obj(e)?t&&e[t]:e,ws=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,As=e=>e,Cs=(e,t=As)=>{let n=Is;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);Rl.und(n)||(r[o]=n)}return r},Is=["config","onProps","onStart","onChange","onPause","onResume","onRest"],xs={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Bs(e){const t=function(e){const t={};let n=0;if(Ml(e,((e,r)=>{xs[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ml(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function Ps(e){return e=Ta(e),Rl.arr(e)?e.map(Ps):Xa(e)?fl.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ts(e){for(const t in e)return!0;return!1}function Os(e){return Rl.fun(e)||Rl.arr(e)&&Rl.obj(e[0])}function Rs(e,t){e.ref?.delete(e),t?.delete(e)}function Ns(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var Fs={tension:170,friction:26,mass:1,damping:1,easing:Ia.linear,clamp:!1};function Ms(e,t){if(Rl.und(t.decay)){const n=!Rl.und(t.tension)||!Rl.und(t.friction);!n&&Rl.und(t.frequency)&&Rl.und(t.damping)&&Rl.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Ds=[];function Ls(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((l,a)=>{let s,c,u=Ss(n.cancel??r?.cancel,t);if(u)f();else{Rl.und(n.pause)||(o.paused=Ss(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||Ss(e,t)),s=ks(n.delay||0,t),e?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function p(){o.resumeQueue.add(d),o.timeouts.delete(c),c.cancel(),s=c.time-ml.now()}function d(){s>0&&!fl.skipAnimation?(o.delayed=!0,c=ml.setTimeout(f,s),o.pauseQueue.add(p),o.timeouts.add(c)):f()}function f(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(p),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},l)}catch(e){a(e)}}}))}var Us=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Vs(e.get()):t.every((e=>e.noop))?js(e.get()):zs(e.get(),t.every((e=>e.finished))),js=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),zs=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Vs=e=>({value:e,cancelled:!0,finished:!1});function Gs(e,t,n,r){const{callId:o,parentId:i,onRest:l}=t,{asyncTo:a,promise:s}=n;return i||e!==a||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=Cs(t,((e,t)=>"onRest"===t?void 0:e));let u,p;const d=new Promise(((e,t)=>(u=e,p=t))),f=e=>{const t=o<=(n.cancelId||0)&&Vs(r)||o!==n.asyncId&&zs(r,!1);if(t)throw e.result=t,p(e),e},y=(e,t)=>{const i=new Ws,l=new $s;return(async()=>{if(fl.skipAnimation)throw Hs(n),l.result=zs(r,!1),p(l),l;f(i);const a=Rl.obj(e)?{...e}:{...t,to:e};a.parentId=o,Ml(c,((e,t)=>{Rl.und(a[t])&&(a[t]=e)}));const s=await r.start(a);return f(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let m;if(fl.skipAnimation)return Hs(n),zs(r,!1);try{let t;t=Rl.arr(e)?(async e=>{for(const t of e)await y(t)})(e):Promise.resolve(e(y,r.stop.bind(r))),await Promise.all([t.then(u),d]),m=zs(r.get(),!0,!1)}catch(e){if(e instanceof Ws)m=e.result;else{if(!(e instanceof $s))throw e;m=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?s:void 0)}return Rl.fun(l)&&ml.batchedUpdates((()=>{l(m,r,r.item)})),m})():s}function Hs(e,t){Ll(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Ws=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},$s=class extends Error{constructor(){super("SkipAnimationSignal")}},Ks=e=>e instanceof Js,qs=1,Js=class extends Na{constructor(){super(...arguments),this.id=qs++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=ls(this);return e&&e.getValue()}to(...e){return fl.to(this,e)}interpolate(...e){return Qa(`${Ja}The "interpolate" function is deprecated in v9 (use "to" instead)`),fl.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ra(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Ql.sort(this),Ra(this,{type:"priority",parent:this,priority:e})}},Ys=Symbol.for("SpringPhase"),Qs=e=>(1&e[Ys])>0,Zs=e=>(2&e[Ys])>0,Xs=e=>(4&e[Ys])>0,ec=(e,t)=>t?e[Ys]|=3:e[Ys]&=-3,tc=(e,t)=>t?e[Ys]|=4:e[Ys]&=-5,nc=class extends Js{constructor(e,t){if(super(),this.animation=new class{constructor(){this.changed=!1,this.values=Ds,this.toValues=null,this.fromValues=Ds,this.config=new class{constructor(){this.velocity=0,Object.assign(this,Fs)}},this.immediate=!1}},this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Rl.und(e)||!Rl.und(t)){const n=Rl.obj(e)?{...e}:{...t,from:e};Rl.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Zs(this)||this._state.asyncTo)||Xs(this)}get goal(){return Ta(this.animation.to)}get velocity(){const e=ls(this);return e instanceof us?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Qs(this)}get isAnimating(){return Zs(this)}get isPaused(){return Xs(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,l=ss(r.to);!l&&Pa(r.to)&&(o=Dl(Ta(r.to))),r.values.forEach(((a,s)=>{if(a.done)return;const c=a.constructor==ps?1:l?l[s].lastPosition:o[s];let u=r.immediate,p=c;if(!u){if(p=a.lastPosition,i.tension<=0)return void(a.done=!0);let t=a.elapsedTime+=e;const n=r.fromValues[s],o=null!=a.v0?a.v0:a.v0=Rl.arr(i.velocity)?i.velocity[s]:i.velocity;let l;const d=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Rl.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);p=n+o/(1-e)*(1-r),u=Math.abs(a.lastPosition-p)<=d,l=o*r}else{l=null==a.lastVelocity?o:a.lastVelocity;const t=i.restVelocity||d/10,r=i.clamp?0:i.bounce,s=!Rl.und(r),f=n==c?a.v0>0:n<c;let y,m=!1;const g=1,h=Math.ceil(e/g);for(let e=0;e<h&&(y=Math.abs(l)>t,y||(u=Math.abs(c-p)<=d,!u));++e){s&&(m=p==c||p>c==f,m&&(l=-l*r,p=c));l+=(1e-6*-i.tension*(p-c)+.001*-i.friction*l)/i.mass*g,p+=l*g}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,a.durationProgress>0&&(a.elapsedTime=i.duration*a.durationProgress,t=a.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),p=n+i.easing(r)*(c-n),l=(p-a.lastPosition)/e,u=1==r}a.lastVelocity=l,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),u=!0)}l&&!l[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(p,i.round)&&(n=!0)}));const a=ls(this),s=a.getValue();if(t){const e=Ta(r.to);s===e&&!n||i.decay?n&&i.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return ml.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Zs(this)){const{to:e,config:t}=this.animation;ml.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Rl.und(e)?(n=this.queue||[],this.queue=[]):n=[Rl.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Us(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Hs(this._state,e&&this._lastCallId),ml.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Rl.obj(n)?n[t]:n,(null==n||Os(n))&&(n=void 0),r=Rl.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return Qs(this)||(e.reverse&&([n,r]=[r,n]),r=Ta(r),Rl.und(r)?ls(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Cs(e,((e,t)=>/^on/.test(t)?Es(e,n):e))),cc(this,e,"onProps"),uc(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Ls(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Xs(this)||(tc(this,!0),zl(i.pauseQueue),uc(this,"onPause",zs(this,rc(this,this.animation.to)),this))},resume:()=>{Xs(this)&&(tc(this,!1),Zs(this)&&this._resume(),zl(i.resumeQueue),uc(this,"onResume",zs(this,rc(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=oc(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Vs(this));const r=!Rl.und(e.to),o=!Rl.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Vs(this));this._lastToId=t.callId}const{key:i,defaultProps:l,animation:a}=this,{to:s,from:c}=a;let{to:u=s,from:p=c}=e;!o||r||t.default&&!Rl.und(u)||(u=p),t.reverse&&([u,p]=[p,u]);const d=!Nl(p,c);d&&(a.from=p),p=Ta(p);const f=!Nl(u,s);f&&this._focus(u);const y=Os(t.to),{config:m}=a,{decay:g,velocity:h}=m;(r||o)&&(m.velocity=0),t.config&&!y&&function(e,t,n){n&&(Ms(n={...n},t),t={...n,...t}),Ms(e,t),Object.assign(e,t);for(const t in Fs)null==e[t]&&(e[t]=Fs[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;Rl.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(m,ks(t.config,i),t.config!==l.config?ks(l.config,i):void 0);let b=ls(this);if(!b||Rl.und(u))return n(zs(this,!0));const v=Rl.und(t.reset)?o&&!t.default:!Rl.und(p)&&Ss(t.reset,i),_=v?p:this.get(),k=Ps(u),S=Rl.num(k)||Rl.arr(k)||Xa(k),E=!y&&(!S||Ss(l.immediate||t.immediate,i));if(f){const e=gs(u);if(e!==b.constructor){if(!E)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(k)}}const w=b.constructor;let A=Pa(u),C=!1;if(!A){const e=v||!Qs(this)&&d;(f||e)&&(C=Nl(Ps(_),k),A=!C),(Nl(a.immediate,E)||E)&&Nl(m.decay,g)&&Nl(m.velocity,h)||(A=!0)}if(C&&Zs(this)&&(a.changed&&!v?A=!0:A||this._stop(s)),!y&&((A||Pa(s))&&(a.values=b.getPayload(),a.toValues=Pa(u)?null:w==ps?[1]:Dl(k)),a.immediate!=E&&(a.immediate=E,E||v||this._set(s)),A)){const{onRest:e}=a;Fl(sc,(e=>cc(this,t,e)));const r=zs(this,rc(this,s));zl(this._pendingCalls,r),this._pendingCalls.add(n),a.changed&&ml.batchedUpdates((()=>{a.changed=!v,e?.(r,this),v?ks(l.onRest,r):a.onStart?.(r,this)}))}v&&this._set(_),y?n(Gs(t.to,t,this._state,this)):A?this._start():Zs(this)&&!f?this._pendingCalls.add(n):n(js(_))}_focus(e){const t=this.animation;e!==t.to&&(Oa(this)&&this._detach(),t.to=e,Oa(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Pa(t)&&(Ma(t,this),Ks(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Pa(e)&&Da(e,this)}_set(e,t=!0){const n=Ta(e);if(!Rl.und(n)){const e=ls(this);if(!e||!Nl(n,e.getValue())){const r=gs(n);e&&e.constructor==r?e.setValue(n):as(this,r.create(n)),e&&ml.batchedUpdates((()=>{this._onChange(n,t)}))}}return ls(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,uc(this,"onStart",zs(this,rc(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),ks(this.animation.onChange,e,this)),ks(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ls(this).reset(Ta(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Zs(this)||(ec(this,!0),Xs(this)||this._resume())}_resume(){fl.skipAnimation?this.finish():Ql.start(this)}_stop(e,t){if(Zs(this)){ec(this,!1);const n=this.animation;Fl(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ra(this,{type:"idle",parent:this});const r=t?Vs(this.get()):zs(this.get(),rc(this,e??n.to));zl(this._pendingCalls,r),n.changed&&(n.changed=!1,uc(this,"onRest",r,this))}}};function rc(e,t){const n=Ps(t);return Nl(Ps(e.get()),n)}function oc(e,t=e.loop,n=e.to){const r=ks(t);if(r){const o=!0!==r&&Bs(r),i=(o||e).reverse,l=!o||o.reset;return ic({...e,loop:t,default:!1,pause:void 0,to:!i||Os(n)?n:void 0,from:l?e.from:void 0,reset:l,...o})}}function ic(e){const{to:t,from:n}=e=Bs(e),r=new Set;return Rl.obj(t)&&ac(t,r),Rl.obj(n)&&ac(n,r),e.keys=r.size?Array.from(r):null,e}function lc(e){const t=ic(e);return Rl.und(t.default)&&(t.default=Cs(t)),t}function ac(e,t){Ml(e,((e,n)=>null!=e&&t.add(n)))}var sc=["onStart","onRest","onChange","onPause","onResume"];function cc(e,t,n){e.animation[n]=t[n]!==ws(t,n)?Es(t[n],e.key):void 0}function uc(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var pc=["onStart","onChange","onRest"],dc=1,fc=class{constructor(e,t){this.id=dc++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Rl.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ic(e)),this}start(e){let{queue:t}=this;return e?t=Dl(e).map(ic):this.queue=[],this._flush?this._flush(this,t):(_c(this,t),yc(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Fl(Dl(t),(t=>n[t].stop(!!e)))}else Hs(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Rl.und(e))this.start({pause:!0});else{const t=this.springs;Fl(Dl(e),(e=>t[e].pause()))}return this}resume(e){if(Rl.und(e))this.start({pause:!1});else{const t=this.springs;Fl(Dl(e),(e=>t[e].resume()))}return this}each(e){Ml(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,Ll(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,l=o||i&&n.size?this.get():null;o&&t.size&&Ll(t,(([e,t])=>{t.value=l,e(t,this,this._item)})),i&&(this._started=!1,Ll(n,(([e,t])=>{t.value=l,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}ml.onFrame(this._onFrame)}};function yc(e,t){return Promise.all(t.map((t=>mc(e,t)))).then((t=>Us(e,t)))}async function mc(e,t,n){const{keys:r,to:o,from:i,loop:l,onRest:a,onResolve:s}=t,c=Rl.obj(t.default)&&t.default;l&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=Rl.arr(o)||Rl.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Fl(pc,(n=>{const r=t[n];if(Rl.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const p=e._state;t.pause===!p.paused?(p.paused=t.pause,zl(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const d=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),f=!0===t.cancel||!0===ws(t,"cancel");(u||f&&p.asyncId)&&d.push(Ls(++e._lastAsyncId,{props:t,state:p,actions:{pause:Ol,resume:Ol,start(t,n){f?(Hs(p,e._lastAsyncId),n(Vs(e))):(t.onRest=a,n(Gs(u,t,p,e)))}}})),p.paused&&await new Promise((e=>{p.resumeQueue.add(e)}));const y=Us(e,await Promise.all(d));if(l&&y.finished&&(!n||!y.noop)){const n=oc(t,l,o);if(n)return _c(e,[n]),mc(e,n,!0)}return s&&ml.batchedUpdates((()=>s(y,e,e.item))),y}function gc(e,t){const n={...e.springs};return t&&Fl(Dl(t),(e=>{Rl.und(e.keys)&&(e=ic(e)),Rl.obj(e.to)||(e={...e,to:void 0}),vc(n,e,(e=>bc(e)))})),hc(e,n),n}function hc(e,t){Ml(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Ma(t,e))}))}function bc(e,t){const n=new nc;return n.key=e,t&&Ma(n,t),n}function vc(e,t,n){t.keys&&Fl(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function _c(e,t){Fl(t,(t=>{vc(e.springs,t,(t=>bc(t,e)))}))}var kc,Sc,Ec=({children:e,...t})=>{const n=(0,ul.useContext)(wc),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,ul.useState)((()=>({inputs:t,result:e()}))),r=(0,ul.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs));n||(i={inputs:t,result:e()})}else i=n;return(0,ul.useEffect)((()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);const{Provider:i}=wc;return ul.createElement(i,{value:t},e)},wc=(kc=Ec,Sc={},Object.assign(kc,ul.createContext(Sc)),kc.Provider._context=kc,kc.Consumer._context=kc,kc);Ec.Provider=wc.Provider,Ec.Consumer=wc.Consumer;var Ac=()=>{const e=[],t=function(t){Za(`${Ja}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return Fl(e,((e,o)=>{if(Rl.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Fl(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Fl(e,(e=>e.resume(...arguments))),this},t.set=function(t){Fl(e,((e,n)=>{const r=Rl.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return Fl(e,((e,r)=>{if(Rl.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return Fl(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Fl(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Rl.fun(e)?e(n,t):e};return t._getProps=n,t};function Cc(e,t,n){const r=Rl.fun(t)&&t;r&&!n&&(n=[]);const o=(0,ul.useMemo)((()=>r||3==arguments.length?Ac():void 0),[]),i=(0,ul.useRef)(0),l=ts(),a=(0,ul.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=gc(e,t);return i.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?yc(e,t):new Promise((r=>{hc(e,n),a.queue.push((()=>{r(yc(e,t))})),l()}))}})),[]),s=(0,ul.useRef)([...a.ctrls]),c=[],u=os(e)||0;function p(e,n){for(let o=e;o<n;o++){const e=s.current[o]||(s.current[o]=new fc(null,a.flush)),n=r?r(o,e):t[o];n&&(c[o]=lc(n))}}(0,ul.useMemo)((()=>{Fl(s.current.slice(e,u),(e=>{Rs(e,o),e.stop(!0)})),s.current.length=e,p(u,e)}),[e]),(0,ul.useMemo)((()=>{p(0,Math.min(u,e))}),n);const d=s.current.map(((e,t)=>gc(e,c[t]))),f=(0,ul.useContext)(Ec),y=os(f),m=f!==y&&Ts(f);es((()=>{i.current++,a.ctrls=s.current;const{queue:e}=a;e.length&&(a.queue=[],Fl(e,(e=>e()))),Fl(s.current,((e,t)=>{o?.add(e),m&&e.start({default:f});const n=c[t];n&&(Ns(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),ns((()=>()=>{Fl(a.ctrls,(e=>e.stop(!0)))}));const g=d.map((e=>({...e})));return o?[g,o]:g}function Ic(e,t){const n=Rl.fun(e),[[r],o]=Cc(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}var xc=class extends Js{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=_a(...t);const n=this._get(),r=gs(n);as(this,r.create(n))}advance(e){const t=this._get();Nl(t,this.get())||(ls(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Pc(this._active)&&Tc(this)}_get(){const e=Rl.arr(this.source)?this.source.map(Ta):Dl(Ta(this.source));return this.calc(...e)}_start(){this.idle&&!Pc(this._active)&&(this.idle=!1,Fl(ss(this),(e=>{e.done=!1})),fl.skipAnimation?(ml.batchedUpdates((()=>this.advance())),Tc(this)):Ql.start(this))}_attach(){let e=1;Fl(Dl(this.source),(t=>{Pa(t)&&Ma(t,this),Ks(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Fl(Dl(this.source),(e=>{Pa(e)&&Da(e,this)})),this._active.clear(),Tc(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Dl(this.source).reduce(((e,t)=>Math.max(e,(Ks(t)?t.priority:0)+1)),0))}};function Bc(e){return!1!==e.idle}function Pc(e){return!e.size||Array.from(e).every(Bc)}function Tc(e){e.idle||(e.idle=!0,Fl(ss(e),(e=>{e.done=!0})),Ra(e,{type:"idle",parent:e}))}fl.assign({createStringInterpolator:qa,to:(e,t)=>new xc(e,t)});Ql.advance;var Oc=window.ReactDOM,Rc=/^--/;function Nc(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Rc.test(e)||Mc.hasOwnProperty(e)&&Mc[e]?(""+t).trim():t+"px"}var Fc={};var Mc={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},Dc=["Webkit","Ms","Moz","O"];Mc=Object.keys(Mc).reduce(((e,t)=>(Dc.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Mc);var Lc=/^(matrix|translate|scale|rotate|skew)/,Uc=/^(translate)/,jc=/^(rotate|skew)/,zc=(e,t)=>Rl.num(e)&&0!==e?e+t:e,Vc=(e,t)=>Rl.arr(e)?e.every((e=>Vc(e,t))):Rl.num(e)?e===t:parseFloat(e)===t,Gc=class extends fs{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>zc(e,"px"))).join(",")})`,Vc(e,0)]))),Ml(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(Lc.test(t)){if(delete r[t],Rl.und(e))return;const n=Uc.test(t)?"px":jc.test(t)?"deg":"";o.push(Dl(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${zc(o,n)})`,Vc(o,0)]:e=>[`${t}(${e.map((e=>zc(e,n))).join(",")})`,Vc(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new Hc(o,i)),super(r)}},Hc=class extends Na{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Fl(this.inputs,((n,r)=>{const o=Ta(n[0]),[i,l]=this.transforms[r](Rl.arr(o)?o:n.map(Ta));e+=" "+i,t=t&&l})),t?"none":e}observerAdded(e){1==e&&Fl(this.inputs,(e=>Fl(e,(e=>Pa(e)&&Ma(e,this)))))}observerRemoved(e){0==e&&Fl(this.inputs,(e=>Fl(e,(e=>Pa(e)&&Da(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ra(this,e)}};fl.assign({batchedUpdates:Oc.unstable_batchedUpdates,createStringInterpolator:qa,colors:{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}});var Wc=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new fs(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=_s(e)||"Anonymous";return(e=Rl.str(e)?i[e]||(i[e]=hs(e,o)):e[vs]||(e[vs]=hs(e,o))).displayName=`Animated(${t})`,e};return Ml(e,((t,n)=>{Rl.arr(e)&&(n=_s(t)),i[n]=i(t)})),{animated:i}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:l,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Fc[t]||(Fc[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(const t in r)if(r.hasOwnProperty(t)){const n=Nc(t,r[t]);Rc.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==l&&(e.scrollLeft=l),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new Gc(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),$c=Wc.animated;const Kc=e=>e+1,qc=e=>({top:e.offsetTop,left:e.offsetLeft});var Jc=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const i=(0,a.useRef)(),l=(0,p.useReducedMotion)()||!r,[s,c]=(0,a.useReducer)(Kc,0),[u,d]=(0,a.useReducer)(Kc,0),[f,y]=(0,a.useState)({x:0,y:0}),m=(0,a.useMemo)((()=>i.current?qc(i.current):null),[o]),g=(0,a.useMemo)((()=>{if(!n||!i.current)return()=>{};const e=(0,Hi.getScrollContainer)(i.current);if(!e)return()=>{};const t=i.current.getBoundingClientRect();return()=>{const n=i.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);return(0,a.useLayoutEffect)((()=>{s&&d()}),[s]),(0,a.useLayoutEffect)((()=>{if(!m)return;if(l)return void g();i.current.style.transform=void 0;const e=qc(i.current);c(),y({x:Math.round(m.left-e.left),y:Math.round(m.top-e.top)})}),[o]),Ic({from:{x:f.x,y:f.y},to:{x:0,y:0},reset:s!==u,config:{mass:5,tension:2e3,friction:200},immediate:l,onChange:function(e){let{value:n}=e;if(!i.current)return;let{x:r,y:o}=n;r=Math.round(r),o=Math.round(o);const l=0===r&&0===o;i.current.style.transformOrigin="center center",i.current.style.transform=l?void 0:`translate3d(${r}px,${o}px,0)`,i.current.style.zIndex=t?"1":"",g()}}),i};const Yc=".block-editor-block-list__block",Qc=".block-list-appender",Zc=".block-editor-button-block-appender";function Xc(e,t){return t.closest([Yc,Qc,Zc].join(","))===e}function eu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Yc);return t?t.id.slice("block-".length):void 0}function tu(e){const t=(0,a.useRef)(),n=function(e){return(0,d.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:r,isBlockSelected:o}=t(sr);if(o(e)&&"edit"===r())return n()}),[e])}(e),{isBlockSelected:r,isMultiSelecting:o}=(0,d.useSelect)(sr);return(0,a.useEffect)((()=>{if(!r(e)||o())return;if(null==n)return;if(!t.current)return;const{ownerDocument:i}=t.current;if(Xc(t.current,i.activeElement))return;const l=Hi.focus.tabbable.find(t.current).filter((e=>(0,Hi.isTextField)(e))),a=-1===n,s=l[a?l.length-1:0]||t.current;if(Xc(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Hi.focus.tabbable.findNext(t.current);if(e&&Xc(t.current,e)&&(0,Hi.isFormElement)(e))return void e.focus()}(0,Hi.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function nu(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function ru(){const e=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return t().outlineMode}),[]);return(0,p.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",nu),t.addEventListener("mouseover",nu),()=>{t.removeEventListener("mouseout",nu),t.removeEventListener("mouseover",nu),t.classList.remove("is-hovered")}}),[e])}function ou(e){return(0,d.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:i,isBlockMultiSelected:l,getBlockName:a,getSettings:s,hasSelectedInnerBlock:u,isTyping:p,__unstableIsFullySelected:d,__unstableSelectionHasUnmergeableBlock:f}=t(sr),{outlineMode:y}=s(),m=n(e),g=i(e),h=a(e),b=u(e,!0),v=l(e);return c()({"is-selected":g,"is-highlighted":r(e),"is-multi-selected":v,"is-partially-selected":v&&!d()&&!f(),"is-reusable":(0,o.isReusableBlock)((0,o.getBlockType)(h)),"is-dragging":m,"has-child-selected":b,"remove-outline":g&&y&&p()})}),[e])}function iu(e){return(0,d.useSelect)((t=>{const n=t(sr).getBlockName(e),r=(0,o.getBlockType)(n);if((null==r?void 0:r.apiVersion)>1)return(0,o.getBlockDefaultClassName)(n)}),[e])}function lu(e){return(0,d.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(sr),i=r(e);if(null==i||!i.className)return;const l=(0,o.getBlockType)(n(e));return(null==l?void 0:l.apiVersion)>1?i.className:void 0}),[e])}function au(e){return(0,d.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:l}=t(sr);if(!l(e))return;const a=n();return a?c()("is-block-moving-mode",{"can-insert-moving-block":r(o(a),i(e))}):void 0}),[e])}function su(e){const{isBlockSelected:t}=(0,d.useSelect)(sr),{selectBlock:n,selectionChange:r}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((o=>{function i(i){o.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||r(e):Xc(o,i.target)&&n(e))}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}var cu=window.wp.keycodes;function uu(e){const t=(0,d.useSelect)((t=>t(sr).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,d.useSelect)(sr),{insertDefaultBlock:o,removeBlock:i}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((l=>{if(t)return l.addEventListener("keydown",a),l.addEventListener("dragstart",s),()=>{l.removeEventListener("keydown",a),l.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==cu.ENTER&&a!==cu.BACKSPACE&&a!==cu.DELETE||s!==l||(0,Hi.isTextField)(s)||(t.preventDefault(),a===cu.ENTER?o({},n(e),r(e)+1):i(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,i])}function pu(e){const{isNavigationMode:t,isBlockSelected:n}=(0,d.useSelect)(sr),{setNavigationMode:r,selectBlock:o}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((i=>{function l(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",l),()=>{i.addEventListener("mousedown",l)}}),[e,t,n,r])}function du(){const e=(0,a.useContext)(Gm);return(0,p.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function fu(e){return(0,d.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(sr);return n(e)}),[e])}function yu(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:r,wrapperProps:i={},isAligned:l}=(0,a.useContext)(mu),{index:s,mode:u,name:f,blockApiVersion:y,blockTitle:g,isPartOfSelection:h,adjustScrolling:b,enableAnimation:v}=(0,d.useSelect)((e=>{const{getBlockIndex:t,getBlockMode:r,getBlockName:i,isTyping:l,getGlobalBlockCount:a,isBlockSelected:s,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:p}=e(sr),d=s(n),f=c(n)||u(n),y=i(n),m=(0,o.getBlockType)(y);return{index:t(n),mode:r(n),name:y,blockApiVersion:(null==m?void 0:m.apiVersion)||1,blockTitle:null==m?void 0:m.title,isPartOfSelection:d||f,adjustScrolling:d||p(n),enableAnimation:!l()&&a()<=200}}),[n]),_=fu(n),k=(0,m.sprintf)((0,m.__)("Block: %s"),g),S="html"!==u||t?"":"-visual",E=(0,p.useMergeRefs)([e.ref,tu(n),Pr(n),su(n),uu(n),pu(n),ru(),du(),Jc({isSelected:h,adjustScrolling:b,enableAnimation:v,triggerAnimationOnChange:s}),(0,p.useDisabled)({isDisabled:!_})]),w=dr();return y<2&&n===w.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...i,...e,ref:E,id:`block-${n}${S}`,role:"document","aria-label":k,"data-block":n,"data-type":f,"data-title":g,className:c()(c()("block-editor-block-list__block",{"wp-block":!l,"has-block-overlay":_}),r,e.className,i.className,ou(n),iu(n),lu(n),au(n)),style:{...i.style,...e.style}}}yu.save=o.__unstableGetBlockProps;const mu=(0,a.createContext)();function gu(e){let{children:t,isHtml:n,...r}=e;return(0,a.createElement)("div",yu(r,{__unstableIsHtml:n}),t)}const hu=(0,d.withSelect)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:i,isSelectionEnabled:l,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(sr),p=s(n),d=o(n),f=a(r),y=c(n,r),m=u(n,r),{name:g,attributes:h,isValid:b}=p||{};return{mode:i(n),isSelectionEnabled:l(),isLocked:!!f,canRemove:y,canMove:m,block:p,name:g,attributes:h,isValid:b,isSelected:d}})),bu=(0,d.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:r,insertBlocks:i,mergeBlocks:l,replaceBlocks:a,toggleSelection:s,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:p,selectBlock:d}=e(sr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:o}=n.select(sr),i=o(),{clientId:l}=t,a=i.length?i:[l];r(a,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;i(e,n,r)},onInsertBlocksAfter(e){const{clientId:r,rootClientId:o}=t,{getBlockIndex:l}=n.select(sr),a=l(r);i(e,a+1,o)},onMerge(e){const{clientId:r,rootClientId:i}=t,{getPreviousBlockClientId:s,getNextBlockClientId:c,getBlock:f,getBlockAttributes:y,getBlockName:m,getBlockOrder:g}=n.select(sr);if(e){if(i){const e=c(i);if(e){if(m(i)!==m(e))return void l(i,e);{const t=y(i),r=y(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(g(e),e,i),p(e,!1)}))}}}const e=c(r);if(!e)return;const t=(0,o.switchToBlockType)(f(e),"*");t&&t.length?a(e,t):l(r,e)}else{const e=s(r);if(e)l(e,r);else if(i){const e=s(i);if(e&&m(i)===m(e)){const t=y(i),r=y(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(g(i),i,e),p(i,!1)}))}const t=(0,o.switchToBlockType)(f(i),"*");t&&t.length&&n.batch((()=>{a(i,t),d(t[0].clientId,0)}))}}},onReplace(e,n,r){e.length&&!(0,o.isUnmodifiedDefaultBlock)(e[e.length-1])&&c(),a([t.clientId],e,n,r)},toggleSelection(e){s(e)}}}));var vu=(0,p.compose)(p.pure,hu,bu,(0,p.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,f.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:r,isLocked:i,canRemove:l,clientId:s,isSelected:u,isSelectionEnabled:p,className:f,name:y,isValid:m,attributes:g,wrapperProps:h,setAttributes:b,onReplace:v,onInsertBlocksAfter:_,onMerge:k,toggleSelection:S}=e;const{themeSupportsLayout:E,hasContentLockedParent:w,isContentBlock:A,isContentLocking:C,isTemporarilyEditingAsBlocks:I}=(0,d.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:i}=e(sr),l=!!n(s);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(o.store).__experimentalHasContentRoleAttribute(y),hasContentLockedParent:l,isContentLocking:"contentOnly"===r(s)&&!l,isTemporarilyEditingAsBlocks:i()===s}}),[y,s]),{removeBlock:x}=(0,d.useDispatch)(sr),B=(0,a.useCallback)((()=>x(s)),[s]);let P=(0,a.createElement)(Yi,{name:y,isSelected:u,attributes:g,setAttributes:b,insertBlocksAfter:i?void 0:_,onReplace:l?v:void 0,onRemove:l?B:void 0,mergeBlocks:l?k:void 0,clientId:s,isSelectionEnabled:p,toggleSelection:S});const T=(0,o.getBlockType)(y);w&&!A&&(h={...h,tabIndex:-1}),null!=T&&T.getEditWrapperProps&&(h=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=c()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(h,T.getEditWrapperProps(g)));const O=h&&!!h["data-align"]&&!E;let R;if(O&&(P=(0,a.createElement)("div",{className:"wp-block","data-align":h["data-align"]},P)),m)R="html"===r?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{style:{display:"none"}},P),(0,a.createElement)(gu,{isHtml:!0},(0,a.createElement)(cl,{clientId:s}))):(null==T?void 0:T.apiVersion)>1?P:(0,a.createElement)(gu,h,P);else{const e=n?(0,o.serializeRawBlock)(n):(0,o.getSaveContent)(T,g);R=(0,a.createElement)(gu,{className:"has-warning"},(0,a.createElement)(rl,{clientId:s}),(0,a.createElement)(a.RawHTML,null,(0,Hi.safeHTML)(e)))}const{"data-align":N,...F}=null!==(t=h)&&void 0!==t?t:{},M={clientId:s,className:c()({"is-content-locked":C,"is-content-locked-temporarily-editing-as-blocks":I,"is-content-block":w&&A},N&&E&&`align${N}`,f),wrapperProps:F,isAligned:O},D=(0,a.useMemo)((()=>M),Object.values(M));return(0,a.createElement)(mu.Provider,{value:D},(0,a.createElement)(al,{fallback:(0,a.createElement)(gu,{className:"has-warning"},(0,a.createElement)(il,null))},R))})),_u=window.wp.htmlEntities;var ku=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const Su=[(0,a.createInterpolateElement)((0,m.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,m.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,m.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,m.__)("Drag files into the editor to automatically insert media blocks."),(0,m.__)("Change a block's type by pressing the block icon on the toolbar.")];var Eu=function(){const[e]=(0,a.useState)(Math.floor(Math.random()*Su.length));return(0,a.createElement)(f.Tip,null,Su[e])};var wu=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));var Au=(0,a.memo)((function(e){var t;let{icon:n,showColors:r=!1,className:o}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:wu});const i=(0,a.createElement)(f.Icon,{icon:n&&n.src?n.src:n}),l=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,a.createElement)("span",{style:l,className:c()("block-editor-block-icon",o,{"has-colors":r})},i)}));var Cu=function(e){let{title:t,icon:n,description:r,blockType:o}=e;return o&&(j()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o)),(0,a.createElement)("div",{className:"block-editor-block-card"},(0,a.createElement)(Au,{icon:n,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-block-card__content"},(0,a.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,a.createElement)("span",{className:"block-editor-block-card__description"},r)))};const Iu=(0,p.createHigherOrderComponent)((e=>(0,d.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,a.createElement)(e,l({registry:r},o));const[i,s]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const e=(0,d.createRegistry)({},r);e.registerStore(lr,ar),s(e)}),[r]),i?(0,a.createElement)(d.RegistryProvider,{value:i},(0,a.createElement)(e,l({registry:i},o))):null}))),"withRegistryProvider");const xu=()=>{};function Bu(e){let{clientId:t=null,value:n,selection:r,onChange:i=xu,onInput:l=xu}=e;const s=(0,d.useRegistry)(),{resetBlocks:c,resetSelection:u,replaceInnerBlocks:p,setHasControlledInnerBlocks:f,__unstableMarkNextChangeAsNotPersistent:y}=s.dispatch(sr),{getBlockName:m,getBlocks:g}=s.select(sr),h=(0,d.useSelect)((e=>!t||e(sr).areInnerBlocksControlled(t)),[t]),b=(0,a.useRef)({incoming:null,outgoing:[]}),v=(0,a.useRef)(!1),_=()=>{n&&(y(),t?s.batch((()=>{f(t,!0);const e=n.map((e=>(0,o.cloneBlock)(e)));v.current&&(b.current.incoming=e),y(),p(t,e)})):(v.current&&(b.current.incoming=n),c(n)))},k=(0,a.useRef)(l),S=(0,a.useRef)(i);(0,a.useEffect)((()=>{k.current=l,S.current=i}),[l,i]),(0,a.useEffect)((()=>{b.current.outgoing.includes(n)?b.current.outgoing[b.current.outgoing.length-1]===n&&(b.current.outgoing=[]):g(t)!==n&&(b.current.outgoing=[],_(),r&&u(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,a.useEffect)((()=>{h||(b.current.outgoing=[],_())}),[h]),(0,a.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:i,areInnerBlocksControlled:l}=s.select(sr);let a=g(t),c=o(),u=!1;v.current=!0;const p=s.subscribe((()=>{if(null!==t&&null===m(t))return;if(!(!t||l(t)))return;const s=o(),p=g(t),d=p!==a;if(a=p,d&&(b.current.incoming||i()))return b.current.incoming=null,void(c=s);if(d||u&&!d&&s&&!c){c=s,b.current.outgoing.push(a);(c?S.current:k.current)(a,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})}u=d}));return()=>p()}),[s,t])}var Pu=Iu((function(e){const{children:t,settings:n}=e,{updateSettings:r}=(0,d.useDispatch)(sr);return(0,a.useEffect)((()=>{r(n)}),[n]),Bu(e),(0,a.createElement)(Br,null,t)}));function Tu(e){let{onClick:t}=e;return(0,a.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,a.createElement)(f.Disabled,null,(0,a.createElement)(Wm,null)))}function Ou(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,d.useSelect)(sr),{clearSelectedBlock:n}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((r=>{function o(o){(e()||t())&&o.target===r&&n()}return r.addEventListener("mousedown",o),()=>{r.removeEventListener("mousedown",o)}}),[e,t,n])}function Ru(e){return(0,a.createElement)("div",l({ref:Ou()},e))}function Nu(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:l}=e(sr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o(),initialPosition:i(),isFullSelection:l()}}function Fu(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o,isFullSelection:i}=(0,d.useSelect)(Nu,[]);return(0,p.useRefEffect)((o=>{const{ownerDocument:l}=o,{defaultView:a}=l;if(null==e)return;if(!r||t)return;const{length:s}=n;s<2||i&&(o.contentEditable=!0,o.focus(),a.getSelection().removeAllRanges())}),[r,t,n,o,e,i])}function Mu(e,t,n,r){let o,i=Hi.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),i.find((function(e){if(!Hi.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}))}function Du(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:r,__unstableIsFullySelected:o}=(0,d.useSelect)(sr),{selectBlock:i}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((l=>{let a;function s(){a=null}function c(s){const{keyCode:c,target:u}=s,p=c===cu.UP,d=c===cu.DOWN,f=c===cu.LEFT,y=c===cu.RIGHT,m=p||f,g=f||y,h=p||d,b=g||h,v=s.shiftKey,_=v||s.ctrlKey||s.altKey||s.metaKey,k=h?Hi.isVerticalEdge:Hi.isHorizontalEdge,{ownerDocument:S}=l,{defaultView:E}=S;if(r()){if(!o())return;if(s.defaultPrevented)return;if(!b)return;if(v)return;return s.preventDefault(),void(m?i(e()):i(t(),-1))}if(h?a||(a=(0,Hi.computeCaretRect)(E)):a=null,s.defaultPrevented)return;if(!b)return;if(!function(e,t,n){if((t===cu.UP||t===cu.DOWN)&&!n)return!0;const{tagName:r}=e;if("INPUT"===r)return["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type"));return"TEXTAREA"!==r}(u,c,_))return;const w=(0,Hi.isRTL)(u)?!m:m,{keepCaretInsideBlock:A}=n();if(v)(function(e,t){const n=Mu(e,t,l);return n&&eu(n)})(u,m)&&k(u,m)&&(l.contentEditable=!0,l.focus());else if(h&&(0,Hi.isVerticalEdge)(u,m)&&!A){const e=Mu(u,m,l,!0);e&&((0,Hi.placeCaretAtVerticalEdge)(e,m,a),s.preventDefault())}else if(g&&E.getSelection().isCollapsed&&(0,Hi.isHorizontalEdge)(u,w)&&!A){const e=Mu(u,w,l);(0,Hi.placeCaretAtHorizontalEdge)(e,m),s.preventDefault()}}return l.addEventListener("mousedown",s),l.addEventListener("keydown",c),()=>{l.removeEventListener("mousedown",s),l.removeEventListener("keydown",c)}}),[])}var Lu=window.wp.keyboardShortcuts;function Uu(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,d.useSelect)(sr),{multiSelect:r,selectBlock:o}=(0,d.useDispatch)(sr),i=(0,Lu.__unstableUseShortcutEventMatch)();return(0,p.useRefEffect)((l=>{function a(a){if(!i("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,Hi.isEntirelySelected)(a.target))return;a.preventDefault();const[c]=s,u=n(c),p=e(u);s.length!==p.length?r(p[0],p[p.length-1]):u&&(l.ownerDocument.defaultView.getSelection().removeAllRanges(),o(u))}return l.addEventListener("keydown",a),()=>{l.removeEventListener("keydown",a)}}),[])}function ju(e,t){e.contentEditable=t,t&&e.focus()}function zu(){const{startMultiSelect:e,stopMultiSelect:t}=(0,d.useDispatch)(sr),{isSelectionEnabled:n,hasMultiSelection:r,isDraggingBlocks:o}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((i=>{const{ownerDocument:l}=i,{defaultView:a}=l;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(r())return;ju(i,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function p(t){let{buttons:r,target:c}=t;o()||1===r&&c.getAttribute("contenteditable")&&n()&&(s=l.activeElement,e(),a.addEventListener("mouseup",u),ju(i,!0))}return i.addEventListener("mouseout",p),()=>{i.removeEventListener("mouseout",p),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,r])}function Vu(e,t){e.contentEditable=t,t&&e.focus()}function Gu(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,d.useDispatch)(sr),{getBlockParents:r,getBlockSelectionStart:o}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((n=>{const{ownerDocument:i}=n,{defaultView:l}=i;function a(i){const a=l.getSelection();if(!a.rangeCount)return;const s=i.shiftKey&&"mouseup"===i.type;if(a.isCollapsed&&!s)return void Vu(n,!1);let c=eu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=eu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=o(),t=eu(i.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void Vu(n,!1);if(c===u)t(c);else{const t=[...r(c),c],n=[...r(u),u],o=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[o],n[o])}}function s(){i.addEventListener("selectionchange",a),l.addEventListener("mouseup",a)}function c(){i.removeEventListener("selectionchange",a),l.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,r])}function Hu(){const{selectBlock:e}=(0,d.useDispatch)(sr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:r}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((o=>{function i(i){if(!t()||0!==i.button)return;const l=n(),a=eu(i.target);i.shiftKey?l!==a&&(o.contentEditable=!0,o.focus()):r()&&e(a)}return o.addEventListener("mousedown",i),()=>{o.removeEventListener("mousedown",i)}}),[e,t,n,r])}function Wu(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:r}=(0,d.useSelect)(sr),{replaceBlocks:i,__unstableSplitSelection:l,removeBlocks:a,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((u=>{function p(e){var t;r()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function d(p){p.defaultPrevented||r()&&(p.keyCode===cu.ENTER?(u.contentEditable=!1,p.preventDefault(),e()?i(t(),(0,o.createBlock)((0,o.getDefaultBlockName)())):l()):p.keyCode===cu.BACKSPACE||p.keyCode===cu.DELETE?(u.contentEditable=!1,p.preventDefault(),e()?a(t()):n()?s(p.keyCode===cu.DELETE):c()):1!==p.key.length||p.metaKey||p.ctrlKey||(u.contentEditable=!1,n()?s(p.keyCode===cu.DELETE):(p.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function f(e){r()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",p),u.addEventListener("keydown",d),u.addEventListener("compositionstart",f),()=>{u.removeEventListener("beforeinput",p),u.removeEventListener("keydown",d),u.removeEventListener("compositionstart",f)}}),[])}function $u(){const[e,t,n]=function(){const e=(0,a.useRef)(),t=(0,a.useRef)(),n=(0,a.useRef)(),r=(0,a.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i,getBlockCount:l}=(0,d.useSelect)(sr),{setNavigationMode:s}=(0,d.useDispatch)(sr),c=(0,d.useSelect)((e=>e(sr).isNavigationMode()),[])?void 0:"0",u=(0,a.useRef)();function f(t){if(u.current)u.current=null;else if(o())e.current.focus();else if(i())r.current.focus();else{s(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Hi.focus.tabbable[n](t.target).focus()}}const y=(0,a.createElement)("div",{ref:t,tabIndex:c,onFocus:f}),m=(0,a.createElement)("div",{ref:n,tabIndex:c,onFocus:f}),g=(0,p.useRefEffect)((a=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===cu.ESCAPE)return e.preventDefault(),void s(!0);if(e.keyCode!==cu.TAB)return;const r=e.shiftKey,l=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===a&&s(!0));if(((0,Hi.isFormElement)(e.target)||e.target.getAttribute("data-block")===i())&&(0,Hi.isFormElement)(Hi.focus.tabbable[l](e.target)))return;const c=r?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function p(e){r.current=e.target;const{ownerDocument:t}=a;e.relatedTarget||t.activeElement!==t.body||0!==l()||a.focus()}function d(r){var o;if(r.keyCode!==cu.TAB)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const i=r.shiftKey?"findPrevious":"findNext",l=Hi.focus.tabbable[i](r.target);l!==t.current&&l!==n.current||(r.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:f}=a,{defaultView:y}=f;return y.addEventListener("keydown",d),a.addEventListener("keydown",c),a.addEventListener("focusout",p),()=>{y.removeEventListener("keydown",d),a.removeEventListener("keydown",c),a.removeEventListener("focusout",p)}}),[]);return[y,(0,p.useMergeRefs)([e,g]),m]}(),r=(0,d.useSelect)((e=>e(sr).hasMultiSelection()),[]);return[e,(0,p.useMergeRefs)([t,Wu(),zu(),Gu(),Hu(),Fu(),Uu(),Du(),(0,p.useRefEffect)((e=>{if(e.tabIndex=-1,e.contentEditable=r,r)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,m.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[r])]),n]}var Ku=(0,a.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,i,s]=$u();return(0,a.createElement)(a.Fragment,null,o,(0,a.createElement)("div",l({},r,{ref:(0,p.useMergeRefs)([i,t]),className:c()(r.className,"block-editor-writing-flow")}),n),s)}));const qu="editor-styles-wrapper";function Ju(e){return(0,a.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var Yu=(0,a.forwardRef)((function(e,t){let{contentRef:n,children:r,head:o,tabIndex:i=0,assets:s,isZoomedOut:u,...d}=e;const[,y]=(0,a.useReducer)((()=>({}))),[g,h]=(0,a.useState)(),[b,v]=(0,a.useState)([]),_=Ju(null==s?void 0:s.styles),k=Ju(null==s?void 0:s.scripts),S=Ou(),[E,w,A]=$u(),[C,{height:I}]=(0,p.useResizeObserver)(),x=(0,p.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function r(){const{contentDocument:r,ownerDocument:o}=e,{readyState:i,documentElement:l}=r;return t=r,("interactive"===i||"complete"===i)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function r(e){const r=Object.getPrototypeOf(e).constructor.name,o=window[r],i={};for(const t in e)i[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();i.clientX+=e.left,i.clientY+=e.top}const l=new o(e.type,i);!n.dispatchEvent(l)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(r),h(r),S(l),v(Array.from(o.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),r.dir=o.dir,l.removeChild(r.head),l.removeChild(r.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",r),()=>{var o,i;e.removeEventListener("load",r),null===(o=t)||void 0===o||o.removeEventListener("dragover",n),null===(i=t)||void 0===i||i.removeEventListener("drop",n)}}),[]),B=(0,p.useRefEffect)((e=>{k.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:r}=t;return new Promise(((t,o)=>{const i=e.ownerDocument.createElement("script");i.id=n,r?(i.src=r,i.onload=()=>t(),i.onerror=()=>o()):t(),e.appendChild(i)}))}(e,n)))),Promise.resolve()).finally((()=>{y()}))}),[]),P=(0,p.useMergeRefs)([n,S,w]),T=(0,p.useRefEffect)((e=>{Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:r}=t;if(r&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:r,cssRules:o}=t;return r?e(o):n&&(n.includes(`.${qu}`)||n.includes(".wp-block"))}))}(r)&&!e.ownerDocument.getElementById(n.id)){e.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.appendChild(r.cloneNode(!0))}}))}),[]);return o=(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,"html{height:auto!important;}body{margin:0}"),_.map((e=>{let{tagName:t,href:n,id:r,rel:o,media:i,textContent:l}=e;const s=t.toLowerCase();return"style"===s?(0,a.createElement)(s,{id:r,key:r},l):(0,a.createElement)(s,{href:n,id:r,rel:o,media:i,key:r})})),o),(0,a.createElement)(a.Fragment,null,i>=0&&E,(0,a.createElement)("iframe",l({},d,{ref:(0,p.useMergeRefs)([t,x]),tabIndex:i,srcDoc:"<!doctype html>",title:(0,m.__)("Editor canvas")}),g&&(0,a.createPortal)((0,a.createElement)(a.Fragment,null,(0,a.createElement)("head",{ref:B},o,(0,a.createElement)("style",null,`html { transition: background 5s; ${u?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,a.createElement)("body",{ref:P,className:c()("block-editor-iframe__body",qu,...b,{"is-zoomed-out":u}),style:u?{marginBottom:`-${.55*I-100}px`}:{}},C,(0,a.createElement)("div",{style:{display:"none"},ref:T}),(0,a.createElement)(f.__experimentalStyleProvider,{document:g},r))),g.documentElement)),i>=0&&A)})),Qu={grad:.9,turn:360,rad:360/(2*Math.PI)},Zu=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Xu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ep=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},tp=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},np=function(e){return{r:ep(e.r,0,255),g:ep(e.g,0,255),b:ep(e.b,0,255),a:ep(e.a)}},rp=function(e){return{r:Xu(e.r),g:Xu(e.g),b:Xu(e.b),a:Xu(e.a,3)}},op=/^#([0-9a-f]{3,8})$/i,ip=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},lp=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),l=i-Math.min(t,n,r),a=l?i===t?(n-r)/l:i===n?2+(r-t)/l:4+(t-n)/l:0;return{h:60*(a<0?a+6:a),s:i?l/i*100:0,v:i/255*100,a:o}},ap=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),l=r*(1-n),a=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,l,l,s,r][c],g:255*[s,r,r,a,l,l][c],b:255*[l,l,s,r,r,a][c],a:o}},sp=function(e){return{h:tp(e.h),s:ep(e.s,0,100),l:ep(e.l,0,100),a:ep(e.a)}},cp=function(e){return{h:Xu(e.h),s:Xu(e.s),l:Xu(e.l),a:Xu(e.a,3)}},up=function(e){return ap((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},pp=function(e){return{h:(t=lp(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},dp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gp={string:[[function(e){var t=op.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Xu(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Xu(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=yp.exec(e)||mp.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:np({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=dp.exec(e)||fp.exec(e);if(!t)return null;var n,r,o=sp({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Qu[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return up(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Zu(t)&&Zu(n)&&Zu(r)?np({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Zu(t)||!Zu(n)||!Zu(r))return null;var l=sp({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return up(l)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Zu(t)||!Zu(n)||!Zu(r))return null;var l=function(e){return{h:tp(e.h),s:ep(e.s,0,100),v:ep(e.v,0,100),a:ep(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return ap(l)},"hsv"]]},hp=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},bp=function(e){return"string"==typeof e?hp(e.trim(),gp.string):"object"==typeof e&&null!==e?hp(e,gp.object):[null,void 0]},vp=function(e,t){var n=pp(e);return{h:n.h,s:ep(n.s+100*t,0,100),l:n.l,a:n.a}},_p=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},kp=function(e,t){var n=pp(e);return{h:n.h,s:n.s,l:ep(n.l+100*t,0,100),a:n.a}},Sp=function(){function e(e){this.parsed=bp(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Xu(_p(this.rgba),2)},e.prototype.isDark=function(){return _p(this.rgba)<.5},e.prototype.isLight=function(){return _p(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=rp(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?ip(Xu(255*o)):"","#"+ip(t)+ip(n)+ip(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return rp(this.rgba)},e.prototype.toRgbString=function(){return t=(e=rp(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return cp(pp(this.rgba))},e.prototype.toHslString=function(){return t=(e=cp(pp(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=lp(this.rgba),{h:Xu(e.h),s:Xu(e.s),v:Xu(e.v),a:Xu(e.a,3)};var e},e.prototype.invert=function(){return Ep({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Ep(vp(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Ep(vp(this.rgba,-e))},e.prototype.grayscale=function(){return Ep(vp(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Ep(kp(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Ep(kp(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Ep({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Xu(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=pp(this.rgba);return"number"==typeof e?Ep({h:e,s:t.s,l:t.l,a:t.a}):Xu(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Ep(e).toHex()},e}(),Ep=function(e){return e instanceof Sp?e:new Sp(e)},wp=[],Ap=function(e){e.forEach((function(e){wp.indexOf(e)<0&&(e(Sp,gp),wp.push(e))}))};function Cp(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!i.length)for(var p in n)i[p]=new e(n[p]).toRgb();for(var d in n){var f=(o=s,l=i[d],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));f<c&&(c=f,u=d)}return u}},t.string.push([function(t){var r=t.toLowerCase(),o="transparent"===r?"#0000":n[r];return o?new e(o).toRgb():null},"name"])}var Ip=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},xp=function(e){return.2126*Ip(e.r)+.7152*Ip(e.g)+.0722*Ip(e.b)};function Bp(e){e.prototype.luminance=function(){return e=xp(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,o,i,l,a,s,c=t instanceof e?t:new e(t);return i=this.rgba,l=c.toRgb(),n=(a=xp(i))>(s=xp(l))?(a+.05)/(s+.05):(s+.05)/(a+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(l=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===l?7:"AA"===o&&"large"===l?3:4.5);var n,r,o,i,l}}var Pp=n(3124),Tp=n.n(Pp);const Op=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Rp(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){const e={line:n,column:r};return function(t){return t.position=new l(e),f(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;const a=[];function s(o){const i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function c(){return d(/^{\s*/)}function u(){return d(/^}/)}function p(){let t;const n=[];for(f(),y(n);e.length&&"}"!==e.charAt(0)&&(t=w()||A());)!1!==t&&(n.push(t),y(n));return n}function d(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function f(){d(/^\s*/)}function y(e){let t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){const t=i();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 s("End of comment missing");const l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}function g(){const e=d(/^([^{]+)/);if(e)return Np(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=i();let t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Np(t[0]),!d(/^:\s*/))return s("property missing ':'");const n=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Op,""),value:n?Np(n[0]).replace(Op,""):""});return d(/^[;\s]*/),r}function b(){const e=[];if(!c())return s("missing '{'");let t;for(y(e);t=h();)!1!==t&&(e.push(t),y(e));return u()?e:s("missing '}'")}function v(){let e;const t=[],n=i();for(;e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const _=E("import"),k=E("charset"),S=E("namespace");function E(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=d(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function w(){if("@"===e[0])return function(){const e=i();let t=d(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=d(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,l=y();for(;o=v();)l.push(o),l=l.concat(y());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:l}):s("@keyframes missing '}'")}()||function(){const e=i(),t=d(/^@media *([^{]+)/);if(!t)return;const n=Np(t[1]);if(!c())return s("@media missing '{'");const r=y().concat(p());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=i(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Np(t[1]),media:Np(t[2])})}()||function(){const e=i(),t=d(/^@supports *([^{]+)/);if(!t)return;const n=Np(t[1]);if(!c())return s("@supports missing '{'");const r=y().concat(p());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||_()||k()||S()||function(){const e=i(),t=d(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Np(t[1]),r=Np(t[2]);if(!c())return s("@document missing '{'");const o=y().concat(p());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=i();if(!d(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=y();for(;n=h();)r.push(n),r=r.concat(y());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=i();if(!d(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=y().concat(p());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=i();if(!d(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=y();for(;t=h();)n.push(t),n=n.concat(y());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function A(){const e=i(),t=g();return t?(y(),e({type:"rule",selectors:t,declarations:b()})):s("selector missing")}return Fp(function(){const e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function Np(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Fp(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Fp(e,r)})):n&&"object"==typeof n&&Fp(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Mp=n(8575),Dp=n.n(Mp),Lp=Up;function Up(e){this.options=e||{}}Up.prototype.emit=function(e){return e},Up.prototype.visit=function(e){return this[e.type](e)},Up.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var jp=zp;function zp(e){Lp.call(this,e)}Dp()(zp,Lp),zp.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},zp.prototype.comment=function(e){return this.emit("",e.position)},zp.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},zp.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},zp.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("}")},zp.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},zp.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},zp.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},zp.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},zp.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},zp.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("}")},zp.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},zp.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},zp.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},zp.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("}"):""},zp.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Vp=Gp;function Gp(e){e=e||{},Lp.call(this,e),this.indentation=e.indent}Dp()(Gp,Lp),Gp.prototype.compile=function(e){return this.stylesheet(e)},Gp.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Gp.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Gp.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Gp.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}")},Gp.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}")},Gp.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Gp.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Gp.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}")},Gp.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)+"}")},Gp.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")},Gp.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}")},Gp.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}")},Gp.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}")},Gp.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Gp.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()+"}"):""},Gp.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Gp.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||"  ")};var Hp=function(e,t){try{const o=Rp(e),i=Tp().map(o,(function(e){if(!e)return e;const n=t(e);return this.update(n)}));return n=i,((r=r||{}).compress?new jp(r):new Vp(r)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,r};function Wp(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 $p(e,t){return new URL(e,t).toString()}var Kp=e=>t=>{if("declaration"===t.type){const i=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Wp(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+$p(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=i,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t};const qp=/^(body|html|:root).*$/;var Jp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const r=n=>t.includes(n.trim())?n:n.match(qp)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(r)}:n}};var Yp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(Jp(t)),r&&o.push(Kp(r)),o.length?Hp(n,(0,p.compose)(o)):n}))};const Qp=".editor-styles-wrapper";function Zp(e){return(0,a.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(Qp);let i;if(o)i=n.getComputedStyle(o,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=n.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=Ep(i);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function Xp(e){let{styles:t}=e;const n=(0,a.useMemo)((()=>Yp(t,Qp)),[t]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",{ref:Zp(t)}),n.map(((e,t)=>(0,a.createElement)("style",{key:t},e))))}function ed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Ep(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function td(e){let{selector:t,id:n}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,a.createElement)("style",null,r)}function nd(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,a.createElement)("style",null,n)}function rd(e){let{id:t,colors:n}=e;const r=ed(n);return(0,a.createElement)(f.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,a.createElement)("defs",null,(0,a.createElement)("filter",{id:t},(0,a.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,a.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,a.createElement)("feFuncR",{type:"table",tableValues:r.r.join(" ")}),(0,a.createElement)("feFuncG",{type:"table",tableValues:r.g.join(" ")}),(0,a.createElement)("feFuncB",{type:"table",tableValues:r.b.join(" ")}),(0,a.createElement)("feFuncA",{type:"table",tableValues:r.a.join(" ")})),(0,a.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function od(e){let{preset:t}=e;return(0,a.createElement)(rd,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let id;Ap([Cp,Bp]);const ld=2e3;var ad=function(e){let{viewportWidth:t,__experimentalPadding:n,__experimentalMinHeight:r}=e;const[o,{width:i}]=(0,p.useResizeObserver)(),[l,{height:s}]=(0,p.useResizeObserver)(),{styles:c,assets:u,duotone:y}=(0,d.useSelect)((e=>{var t,n;const r=e(sr).getSettings();return{styles:r.styles,assets:r.__unstableResolvedAssets,duotone:null===(t=r.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),m=(0,a.useMemo)((()=>c?[...c,{css:"body{height:auto;overflow:hidden;}",__unstableType:"presets"}]:c),[c]),g=(0,a.useMemo)((()=>{var e,t;return[...null!==(e=null==y?void 0:y.default)&&void 0!==e?e:[],...null!==(t=null==y?void 0:y.theme)&&void 0!==t?t:[]]}),[y]);id=id||(0,p.pure)(Wm);const h=i/t;return(0,a.createElement)("div",{className:"block-editor-block-preview__container"},o,(0,a.createElement)(f.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${h})`,height:s*h,maxHeight:s>ld?ld*h:void 0,minHeight:r}},(0,a.createElement)(Yu,{head:(0,a.createElement)(Xp,{styles:m}),assets:u,contentRef:(0,p.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:s,pointerEvents:"none",maxHeight:ld,minHeight:0!==h&&h<1&&r?r/h:r}},l,g.map((e=>(0,a.createElement)(od,{preset:e,key:e.slug}))),(0,a.createElement)(id,{renderAppender:!1}))))};var sd=(0,a.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:r=1200,__experimentalLive:o=!1,__experimentalOnClick:i,__experimentalMinHeight:l}=e;const s=(0,d.useSelect)((e=>e(sr).getSettings()),[]),c=(0,a.useMemo)((()=>{const e={...s};return e.__experimentalBlockPatterns=[],e}),[s]),p=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,a.createElement)(Pu,{value:p,settings:c},o?(0,a.createElement)(Tu,{onClick:i}):(0,a.createElement)(ad,{viewportWidth:r,__experimentalPadding:n,__experimentalMinHeight:l})):null}));function cd(e){let{blocks:t,props:n={},__experimentalLayout:r}=e;const o=(0,d.useSelect)((e=>e(sr).getSettings()),[]),i=(0,p.useDisabled)(),l=(0,p.useMergeRefs)([n.ref,i]),s=(0,a.useMemo)((()=>({...o,__experimentalBlockPatterns:[]})),[o]),f=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]),y=(0,a.createElement)(Pu,{value:f,settings:s},(0,a.createElement)(Km,{renderAppender:!1,__experimentalLayout:r}));return{...n,ref:l,className:c()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?y:null}}var ud=function(e){var t;let{item:n}=e;const{name:r,title:i,icon:l,description:s,initialAttributes:c,example:u}=n,p=(0,o.isReusableBlock)(n);return(0,a.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,a.createElement)("div",{className:"block-editor-inserter__preview"},p||u?(0,a.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,a.createElement)(sd,{__experimentalPadding:16,viewportWidth:null!==(t=null==u?void 0:u.viewportWidth)&&void 0!==t?t:500,blocks:u?(0,o.getBlockFromExample)(r,{attributes:{...u.attributes,...c},innerBlocks:u.innerBlocks}):(0,o.createBlock)(r,c)})):(0,a.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,m.__)("No Preview Available."))),!p&&(0,a.createElement)(Cu,{title:i,icon:l,description:s}))};var pd=(0,a.createContext)();var dd=(0,a.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...i}=e;const s=(0,a.useContext)(pd);return(0,a.createElement)(f.__unstableCompositeItem,l({ref:t,state:s,role:"option",focusable:!0},i),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,a.createElement)(r,t,o):"function"==typeof o?o(t):(0,a.createElement)(f.Button,t,o)}))}));var fd=(0,a.createElement)(M.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function yd(e){let{count:t,icon:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,a.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,a.createElement)(f.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,a.createElement)(f.FlexItem,null,n?(0,a.createElement)(Au,{icon:n}):(0,m.sprintf)((0,m._n)("%d block","%d blocks",t),t)),(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(Au,{icon:fd})))))}var md=e=>{let{isEnabled:t,blocks:n,icon:r,children:o}=e;const i={type:"inserter",blocks:n};return(0,a.createElement)(f.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:i,__experimentalDragComponent:(0,a.createElement)(yd,{count:n.length,icon:r})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};var gd=(0,a.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:i,onHover:s,isDraggable:u,...p}=e;const d=(0,a.useRef)(!1),y=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},m=(0,a.useMemo)((()=>[(0,o.createBlock)(r.name,r.initialAttributes,(0,o.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]);return(0,a.createElement)(md,{isEnabled:u&&!r.disabled,blocks:m,icon:r.icon},(e=>{let{draggable:o,onDragStart:u,onDragEnd:m}=e;return(0,a.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:o,onDragStart:e=>{d.current=!0,u&&(s(null),u(e))},onDragEnd:e=>{d.current=!1,m&&m(e)}},(0,a.createElement)(dd,l({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),i(r,(0,cu.isAppleOS)()?e.metaKey:e.ctrlKey),s(null)},onKeyDown:e=>{const{keyCode:t}=e;t===cu.ENTER&&(e.preventDefault(),i(r,(0,cu.isAppleOS)()?e.metaKey:e.ctrlKey),s(null))},onFocus:()=>{d.current||s(r)},onMouseEnter:()=>{d.current||s(r)},onMouseLeave:()=>s(null),onBlur:()=>s(null)},p),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:y},(0,a.createElement)(Au,{icon:r.icon,showColors:!0})),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,a.createElement)(f.__experimentalTruncate,{numberOfLines:3},r.title))))}))}));var hd=(0,a.forwardRef)((function(e,t){const[n,r]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{n&&(0,qt.speak)((0,m.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,a.createElement)("div",l({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))}));var bd=(0,a.forwardRef)((function(e,t){const n=(0,a.useContext)(pd);return(0,a.createElement)(f.__unstableCompositeGroup,l({state:n,role:"presentation",ref:t},e))}));var vd=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:i,label:l,isDraggable:s=!0}=e;return(0,a.createElement)(hd,{className:"block-editor-block-types-list","aria-label":l},function(e,t){const n=[];for(let r=0,o=e.length;r<o;r+=t)n.push(e.slice(r,r+t));return n}(t,3).map(((e,t)=>(0,a.createElement)(bd,{key:t},e.map(((e,i)=>(0,a.createElement)(gd,{key:e.id,item:e,className:(0,o.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:r,isDraggable:s&&!e.isDisabled,isFirst:0===t&&0===i})))))),i)};var _d=function(e){let{title:t,icon:n,children:r}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,a.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,a.createElement)(f.Icon,{icon:n})),(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var kd=(e,t)=>{const{categories:n,collections:r,items:i}=(0,d.useSelect)((t=>{const{getInserterItems:n}=t(sr),{getCategories:r,getCollections:i}=t(o.store);return{categories:r(),collections:i(),items:n(e)}}),[e]);return[i,n,r,(0,a.useCallback)(((e,n)=>{let{name:r,initialAttributes:i,innerBlocks:l}=e;const a=(0,o.createBlock)(r,i,(0,o.createBlocksFromInnerBlocksTemplate)(l));t(a,void 0,n)}),[t])]};var Sd=function(e){let{children:t}=e;const n=(0,f.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,a.createElement)(pd.Provider,{value:n},t)};const Ed=[];var wd=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[i,l,s,c]=kd(t,n),d=(0,a.useMemo)((()=>(0,u.orderBy)(i,["frecency"],["desc"]).slice(0,6)),[i]),f=(0,a.useMemo)((()=>i.filter((e=>!e.category))),[i]),y=(0,a.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(i)),[i]),g=(0,a.useMemo)((()=>{const e={...s};return Object.keys(s).forEach((t=>{e[t]=i.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[i,s]);(0,a.useEffect)((()=>()=>r(null)),[]);const h=(0,p.useAsyncList)(l),b=l.length===h.length,v=(0,a.useMemo)((()=>Object.entries(s)),[s]),_=(0,p.useAsyncList)(b?v:Ed);return(0,a.createElement)(Sd,null,(0,a.createElement)("div",null,o&&!!d.length&&(0,a.createElement)(_d,{title:(0,m._x)("Most used","blocks")},(0,a.createElement)(vd,{items:d,onSelect:c,onHover:r,label:(0,m._x)("Most used","blocks")})),(0,u.map)(h,(e=>{const t=y[e.slug];return t&&t.length?(0,a.createElement)(_d,{key:e.slug,title:e.title,icon:e.icon},(0,a.createElement)(vd,{items:t,onSelect:c,onHover:r,label:e.title})):null})),b&&f.length>0&&(0,a.createElement)(_d,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,m.__)("Uncategorized")},(0,a.createElement)(vd,{items:f,onSelect:c,onHover:r,label:(0,m.__)("Uncategorized")})),(0,u.map)(_,(e=>{let[t,n]=e;const o=g[t];return o&&o.length?(0,a.createElement)(_d,{key:t,title:n.title,icon:n.icon},(0,a.createElement)(vd,{items:o,onSelect:c,onHover:r,label:n.title})):null}))))};var Ad=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,openPatternExplorer:o}=e;const i=(0,p.useViewportMatch)("medium","<"),l=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,a.createElement)(f.Flex,{justify:"space-between",align:"start",gap:"4",className:l},(0,a.createElement)(f.FlexItem,{isBlock:!0},(0,a.createElement)(f.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,m.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{r(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!i&&(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(f.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,m.__)("Explore all patterns"),onClick:()=>o()},(0,m._x)("Explore","Label for showing all block patterns"))))},Cd=window.wp.notices;var Id=(e,t)=>{const{patternCategories:n,patterns:r}=(0,d.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(sr);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:i}=(0,d.useDispatch)(Cd.store),l=(0,a.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,o.cloneBlock)(e))),t.name),i((0,m.sprintf)((0,m.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[r,n,l]};function xd(e){let{isDraggable:t,pattern:n,onClick:r,composite:o}=e;const{blocks:i,viewportWidth:s}=n,c=`block-editor-block-patterns-list__item-description-${(0,p.useInstanceId)(xd)}`;return(0,a.createElement)(md,{isEnabled:t,blocks:i},(e=>{let{draggable:t,onDragStart:u,onDragEnd:p}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?c:void 0,draggable:t,onDragStart:u,onDragEnd:p},(0,a.createElement)(f.__unstableCompositeItem,l({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:()=>r(n,i)}),(0,a.createElement)(sd,{blocks:i,viewportWidth:s}),(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,a.createElement)(f.VisuallyHidden,{id:c},n.description)))}))}function Bd(){return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Pd=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onClickPattern:o,orientation:i,label:s=(0,m.__)("Block Patterns")}=e;const c=(0,f.__unstableUseCompositeState)({orientation:i});return(0,a.createElement)(f.__unstableComposite,l({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),n.map((e=>r.includes(e)?(0,a.createElement)(xd,{key:e.name,pattern:e,onClick:o,isDraggable:t,composite:c}):(0,a.createElement)(Bd,{key:e.name}))))};function Td(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,a.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:i}=e;return(0,a.createElement)(f.Button,{key:n,label:i,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},i)})))}function Od(e){let{filterValue:t,setFilterValue:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,a.createElement)(f.SearchControl,{onChange:n,value:t,label:(0,m.__)("Search for patterns"),placeholder:(0,m.__)("Search")}))}var Rd=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:i}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,a.createElement)(Od,{filterValue:o,setFilterValue:i}),!o&&(0,a.createElement)(Td,{selectedCategory:t,patternCategories:n,onClickCategory:r}))};var Nd=function(){return(0,a.createElement)("div",{className:"block-editor-inserter__no-results"},(0,a.createElement)(ui,{className:"block-editor-inserter__no-results-icon",icon:wu}),(0,a.createElement)("p",null,(0,m.__)("No results found.")))};var Fd=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:i,onSelect:l,shouldFocusBlock:s=!0}=e;const{getSelectedBlock:c}=(0,d.useSelect)(sr),{destinationRootClientId:p,destinationIndex:f}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:o,getBlockRootClientId:l,getBlockIndex:a,getBlockOrder:s}=e(sr),c=o();let u,p=t;return void 0!==n?u=n:r?u=a(r):!i&&c?(p=l(c),u=a(c)+1):u=s(p).length,{destinationRootClientId:p,destinationIndex:u}}),[t,n,r,i]),{replaceBlocks:y,insertBlocks:g,showInsertionPoint:h,hideInsertionPoint:b}=(0,d.useDispatch)(sr),v=(0,a.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=c();!i&&r&&(0,o.isUnmodifiedDefaultBlock)(r)?y(r.clientId,e,null,s||n?0:null,t):g(e,f,p,!0,s||n?0:null,t);const a=(0,m.sprintf)((0,m._n)("%d block added.","%d blocks added.",(0,u.castArray)(e).length),(0,u.castArray)(e).length);(0,qt.speak)(a),l&&l()}),[i,c,y,g,p,f,l,s]),_=(0,a.useCallback)((e=>{e?h(p,f):b()}),[h,b,p,f]);return[p,v,_]},Md=n(4793),Dd=n.n(Md);const Ld=e=>e.name||"",Ud=e=>e.title,jd=e=>e.description||"",zd=e=>e.keywords||[],Vd=e=>e.category,Gd=()=>null;function Hd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=Dd()(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Wd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,u.words)(Hd(e))},$d=(e,t)=>e.filter((e=>!Wd(t).some((t=>t.includes(e))))),Kd=(e,t,n,r)=>{if(0===Wd(r).length)return e;return qd(e,r,{getCategory:e=>{var n;return null===(n=(0,u.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},qd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Wd(t);if(0===r.length)return e;const o=e.map((e=>[e,Jd(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return o.sort(((e,t)=>{let[,n]=e,[,r]=t;return r-n})),o.map((e=>{let[t]=e;return t}))};function Jd(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=Ld,getTitle:o=Ud,getDescription:i=jd,getKeywords:l=zd,getCategory:a=Vd,getCollection:s=Gd}=n,c=r(e),p=o(e),d=i(e),f=l(e),y=a(e),m=s(e),g=Hd(t),h=Hd(p);let b=0;if(g===h)b+=30;else if(h.startsWith(g))b+=20;else{const e=[c,p,d,...f,y,m].join(" "),t=(0,u.words)(g);0===$d(t,e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}function Yd(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,a.createElement)(f.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,m.sprintf)((0,m._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var Qd=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=(0,p.useDebounce)(qt.speak,500),[i,l]=Fd({shouldFocusBlock:!0}),[s,,c]=Id(l,i),u=(0,a.useMemo)((()=>r.map((e=>e.name))),[r]),d=(0,a.useMemo)((()=>t?qd(s,t):s.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!u.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,s]);(0,a.useEffect)((()=>{if(!t)return;const e=d.length,n=(0,m.sprintf)((0,m._n)("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const f=(0,p.useAsyncList)(d,{step:2}),y=!(null==d||!d.length);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},y&&(0,a.createElement)(Yd,{filterValue:t,filteredBlockPatternsLength:d.length}),(0,a.createElement)(Sd,null,!y&&(0,a.createElement)(Nd,null),y&&(0,a.createElement)(Pd,{shownPatterns:f,blockPatterns:d,onClickPattern:c,isDraggable:!1})))};function Zd(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,a.useState)(""),[i,l]=(0,a.useState)(null==t?void 0:t.name);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,a.createElement)(Rd,{selectedCategory:i,patternCategories:n,onClickCategory:l,filterValue:r,setFilterValue:o}),(0,a.createElement)(Qd,{filterValue:r,selectedCategory:i,patternCategories:n}))}var Xd=function(e){let{onModalClose:t,...n}=e;return(0,a.createElement)(f.Modal,{title:(0,m.__)("Patterns"),closeLabel:(0,m.__)("Close"),onRequestClose:t,isFullScreen:!0},(0,a.createElement)(Zd,n))};function ef(e){let{rootClientId:t,onInsert:n,selectedCategory:r,populatedCategories:o}=e;const[i,,l]=Id(n,t),s=(0,a.useCallback)((e=>{var t;if(null===(t=e.categories)||void 0===t||!t.length)return 1/0;const n=o.reduce(((e,t,n)=>{let{name:r}=t;return e[r]=n,e}),{});return Math.min(...e.categories.map((e=>void 0!==n[e]?n[e]:1/0)))}),[o]),c=(0,a.useMemo)((()=>i.filter((e=>{var t;return"uncategorized"===r.name?s(e)===1/0:null===(t=e.categories)||void 0===t?void 0:t.includes(r.name)}))),[i,r]),u=(0,a.useMemo)((()=>c.sort(((e,t)=>s(e)-s(t)))),[c,s]),d=(0,p.useAsyncList)(u);return c.length?(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,a.createElement)(Pd,{shownPatterns:d,blockPatterns:c,onClickPattern:l,label:r.label,orientation:"vertical",isDraggable:!0})):null}var tf=function(e){let{rootClientId:t,onInsert:n,onClickCategory:r,selectedCategory:o}=e;const[i,l]=(0,a.useState)(!1),[s,c]=Id(),u=(0,a.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>c.some((t=>t.name===e))))),[c]),p=(0,a.useMemo)((()=>{const e=c.filter((e=>s.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:r}=t;return[n,r].includes("featured")?"featured"===n?-1:1:0}));return s.some((e=>!u(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,m._x)("Uncategorized")}),e}),[s,c]),d=o||p[0];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Ad,{selectedCategory:d,patternCategories:p,onClickCategory:r,openPatternExplorer:()=>l(!0)}),!i&&(0,a.createElement)(ef,{rootClientId:t,onInsert:n,selectedCategory:d,populatedCategories:p}),i&&(0,a.createElement)(Xd,{initialCategory:d,patternCategories:p,onModalClose:()=>l(!1)}))},nf=window.wp.url;function rf(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,i]=kd(r,n),l=(0,a.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===l.length?(0,a.createElement)(Nd,null):(0,a.createElement)(_d,{title:(0,m.__)("Reusable blocks")},(0,a.createElement)(vd,{items:l,onSelect:i,onHover:t,label:(0,m.__)("Reusable blocks")}))}var of=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(rf,{onHover:r,onInsert:n,rootClientId:t}),(0,a.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,a.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:(0,nf.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,m.__)("Manage Reusable blocks"))))};const{Fill:lf,Slot:af}=(0,f.createSlotFill)("__unstableInserterMenuExtension");lf.Slot=af;var sf=lf;const cf=[];var uf=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:i,isAppender:l,__experimentalInsertionIndex:s,maxBlockPatterns:c,maxBlockTypes:d,showBlockDirectory:y=!1,isDraggable:g=!0,shouldFocusBlock:h=!0,prioritizePatterns:b}=e;const v=(0,p.useDebounce)(qt.speak,500),[_,k]=Fd({onSelect:n,rootClientId:o,clientId:i,isAppender:l,insertionIndex:s,shouldFocusBlock:h}),[S,E,w,A]=kd(_,k),[C,,I]=Id(k,_),x=(0,a.useMemo)((()=>{if(0===c)return[];const e=qd(C,t);return void 0!==c?e.slice(0,c):e}),[t,C,c]);let B=d;b&&x.length>2&&(B=0);const P=(0,a.useMemo)((()=>{if(0===B)return[];const e=Kd((0,u.orderBy)(S,["frecency"],["desc"]),E,w,t);return void 0!==B?e.slice(0,B):e}),[t,S,E,w,d]);(0,a.useEffect)((()=>{if(!t)return;const e=P.length+x.length,n=(0,m.sprintf)((0,m._n)("%d result found.","%d results found.",e),e);v(n)}),[t,v]);const T=(0,p.useAsyncList)(P,{step:9}),O=(0,p.useAsyncList)(T.length===P.length?x:cf),R=!(0,u.isEmpty)(P)||!(0,u.isEmpty)(x),N=!!P.length&&(0,a.createElement)(_d,{title:(0,a.createElement)(f.VisuallyHidden,null,(0,m.__)("Blocks"))},(0,a.createElement)(vd,{items:T,onSelect:A,onHover:r,label:(0,m.__)("Blocks"),isDraggable:g})),F=!!x.length&&(0,a.createElement)(_d,{title:(0,a.createElement)(f.VisuallyHidden,null,(0,m.__)("Block Patterns"))},(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,a.createElement)(Pd,{shownPatterns:O,blockPatterns:x,onClickPattern:I,isDraggable:g})));return(0,a.createElement)(Sd,null,!y&&!R&&(0,a.createElement)(Nd,null),b?F:N,!!P.length&&!!x.length&&(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?N:F,y&&(0,a.createElement)(sf.Slot,{fillProps:{onSelect:A,onHover:r,filterValue:t,hasItems:R,rootClientId:_}},(e=>e.length?e:R?null:(0,a.createElement)(Nd,null))))};const pf={name:"blocks",title:(0,m.__)("Blocks")},df={name:"patterns",title:(0,m.__)("Patterns")},ff={name:"reusable",title:(0,m.__)("Reusable")};var yf=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,onSelect:o,prioritizePatterns:i}=e;const l=(0,a.useMemo)((()=>{const e=[];return i&&n&&e.push(df),e.push(pf),!i&&n&&e.push(df),r&&e.push(ff),e}),[i,pf,n,df,r,ff]);return(0,a.createElement)(f.TabPanel,{className:"block-editor-inserter__tabs",tabs:l,onSelect:o},t)};var mf=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,onSelect:l,showInserterHelpPanel:s,showMostUsedBlocks:u,__experimentalFilterValue:p="",shouldFocusBlock:y=!0,prioritizePatterns:g}=e;const[h,b]=(0,a.useState)(p),[v,_]=(0,a.useState)(null),[k,S]=(0,a.useState)(null),[E,w,A]=Fd({rootClientId:n,clientId:r,isAppender:o,insertionIndex:i,shouldFocusBlock:y}),{showPatterns:C,hasReusableBlocks:I}=(0,d.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(sr);return{showPatterns:!!n(E).length,hasReusableBlocks:!(null===(t=r().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[E]),x=(0,a.useCallback)(((e,t,n)=>{w(e,t,n),l()}),[w,l]),B=(0,a.useCallback)(((e,t)=>{w(e,{patternName:t}),l()}),[w,l]),P=(0,a.useCallback)((e=>{A(!!e),_(e)}),[A,_]),T=(0,a.useCallback)((e=>{S(e)}),[S]),O=(0,a.useMemo)((()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__block-list"},(0,a.createElement)(wd,{rootClientId:E,onInsert:x,onHover:P,showMostUsedBlocks:u})),s&&(0,a.createElement)("div",{className:"block-editor-inserter__tips"},(0,a.createElement)(f.VisuallyHidden,{as:"h2"},(0,m.__)("A tip for using the block editor")),(0,a.createElement)(Eu,null)))),[E,x,P,h,u,s]),R=(0,a.useMemo)((()=>(0,a.createElement)(tf,{rootClientId:E,onInsert:B,onClickCategory:T,selectedCategory:k})),[E,B,T,k]),N=(0,a.useMemo)((()=>(0,a.createElement)(of,{rootClientId:E,onInsert:x,onHover:P})),[E,x,P]),F=(0,a.useCallback)((e=>"blocks"===e.name?O:"patterns"===e.name?R:N),[O,R,N]),M=(0,a.useRef)();(0,a.useImperativeHandle)(t,(()=>({focusSearch:()=>{M.current.focus()}})));const D=!h&&(C||I);return(0,a.createElement)("div",{className:"block-editor-inserter__menu"},(0,a.createElement)("div",{className:c()("block-editor-inserter__main-area",{"show-as-tabs":D})},(0,a.createElement)(f.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{v&&_(null),b(e)},value:h,label:(0,m.__)("Search for blocks and patterns"),placeholder:(0,m.__)("Search"),ref:M}),!!h&&(0,a.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,a.createElement)(uf,{filterValue:h,onSelect:l,onHover:P,rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,showBlockDirectory:!0,shouldFocusBlock:y})),D&&(0,a.createElement)(yf,{showPatterns:C,showReusableBlocks:I,prioritizePatterns:g},F),!h&&!D&&(0,a.createElement)("div",{className:"block-editor-inserter__no-tab-container"},O)),s&&v&&(0,a.createElement)(ud,{item:v}))}));function gf(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:i}=e;const[l,s]=(0,a.useState)(""),[u,p]=Fd({onSelect:t,rootClientId:n,clientId:r,isAppender:o}),[y]=kd(u,p),[g]=Id(p,u),{setInserterIsOpened:h,insertionIndex:b}=(0,d.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(sr),i=t(),l=n(r),a=o();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===l?a:l}}),[r]),v=g.length&&(!!l||i),_=v&&g.length>6||y.length>6;(0,a.useEffect)((()=>{h&&h(!1)}),[h]);let k=0;return v&&(k=i?4:2),(0,a.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":h})},_&&(0,a.createElement)(f.SearchControl,{className:"block-editor-inserter__search",value:l,onChange:e=>{s(e)},label:(0,m.__)("Search for blocks and patterns"),placeholder:(0,m.__)("Search")}),(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,a.createElement)(uf,{filterValue:l,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:k,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:i})),h&&(0,a.createElement)(f.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{h({rootClientId:n,insertionIndex:b,filterValue:l})},"aria-label":(0,m.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,m.__)("Browse all")))}const hf=e=>{let t,{onToggle:n,disabled:r,isOpen:o,blockTitle:i,hasSingleBlockType:s,toggleProps:c={},prioritizePatterns:u}=e;t=s?(0,m.sprintf)((0,m._x)("Add %s","directly add the only allowed block"),i):u?(0,m.__)("Add pattern"):(0,m._x)("Add block","Generic label for block inserter button");const{onClick:p,...d}=c;return(0,a.createElement)(f.Button,l({icon:ku,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),p&&p(e)},className:"block-editor-inserter__toggle","aria-haspopup":!s&&"true","aria-expanded":!s&&o,disabled:r},d))};class bf extends a.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(e){let{onToggle:t,isOpen:n}=e;const{disabled:r,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,hasItems:s,renderToggle:c=hf,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!s,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,__experimentalIsQuick:l,prioritizePatterns:s}=this.props;return l?(0,a.createElement)(gf,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:s}):(0,a.createElement)(mf,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,prioritizePatterns:s})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:r}):(0,a.createElement)(f.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":o}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,m.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}var vf=(0,p.compose)([(0,d.withSelect)(((e,t)=>{var n;let{clientId:r,rootClientId:i}=t;const{getBlockRootClientId:l,hasInserterItems:a,__experimentalGetAllowedBlocks:s,__experimentalGetDirectInsertBlock:c,getSettings:u}=e(sr),{getBlockVariations:p}=e(o.store);i=i||l(r)||void 0;const d=s(i),f=c(i),y=u(),m=1===(null==d?void 0:d.length)&&0===(null===(n=p(d[0].name,"inserter"))||void 0===n?void 0:n.length);let g=!1;return m&&(g=d[0]),{hasItems:a(i),hasSingleBlockType:m,blockTitle:g?g.title:"",allowedBlockType:g,directInsertBlock:f,rootClientId:i,prioritizePatterns:y.__experimentalPreferPatternsOnRoot&&!i}})),(0,d.withDispatch)(((e,t,n)=>{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:i,isAppender:l,hasSingleBlockType:a,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u}=t;if(!a&&!c)return;const{insertBlock:p}=e(sr);let d;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:o}=r(sr);if(!e||!i&&!n)return{};const l={};let a={};if(i){const e=t(i),n=t(o(i));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(l[e]=a[e])})),l}(c.attributesToCopy);d=(0,o.createBlock)(c.name,{...c.attributes||{},...e})}else d=(0,o.createBlock)(s.name);p(d,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:o,getBlockRootClientId:a}=r(sr);if(i)return e(i);const s=t();return!l&&s&&a(s)===n?e(s)+1:o(n).length}(),n),u&&u();const f=(0,m.sprintf)((0,m.__)("%s block added"),s.title);(0,qt.speak)(f)}}})),(0,p.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(bf);var _f=(0,p.compose)((0,d.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:r,getTemplateLock:o}=e(sr),i=!n(t.rootClientId),{bodyPlaceholder:l}=r();return{showPrompt:i,isLocked:!!o(t.rootClientId),placeholder:l}})),(0,d.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(sr);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:i}=e;if(t)return null;const l=(0,_u.decodeEntities)(o)||(0,m.__)("Type / to choose a block");return(0,a.createElement)("div",{"data-root-client-id":i||"",className:c()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,a.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,m.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{cu.ENTER!==e.keyCode&&cu.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{r&&n()}},r?l:"\ufeff"),(0,a.createElement)(vf,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function kf(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:i}=e;return(0,a.createElement)(vf,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:l,disabled:s,isOpen:u,blockTitle:p,hasSingleBlockType:d}=e;n=d?(0,m.sprintf)((0,m._x)("Add %s","directly add the only allowed block"),p):(0,m._x)("Add block","Generic label for block inserter button");const y=!d;let g=(0,a.createElement)(f.Button,{ref:t,onFocus:o,tabIndex:i,className:c()(r,"block-editor-button-block-appender"),onClick:l,"aria-haspopup":y?"true":void 0,"aria-expanded":y?u:void 0,disabled:s,label:n},!d&&(0,a.createElement)(f.VisuallyHidden,{as:"span"},n),(0,a.createElement)(ui,{icon:ku}));return(y||d)&&(g=(0,a.createElement)(f.Tooltip,{text:n},g)),g},isAppender:!0})}const Sf=(0,a.forwardRef)(((e,t)=>(j()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),kf(e,t))));var Ef=(0,a.forwardRef)(kf);var wf=function(e){let{rootClientId:t,renderAppender:n,className:r,tagName:i="div"}=e;const{hideInserter:l,canInsertDefaultBlock:s,selectedBlockClientId:u}=(0,d.useSelect)((e=>{const{canInsertBlockType:n,getTemplateLock:r,getSelectedBlockClientId:i,__unstableGetEditorMode:l}=e(sr);return{hideInserter:!!r(t)||"zoom-out"===l(),canInsertDefaultBlock:n((0,o.getDefaultBlockName)(),t),selectedBlockClientId:i()}}),[t]);if(l||!1===n)return null;let p;if(n)p=(0,a.createElement)(n,null);else{if(!(u===t||!t&&!u))return null;p=s?(0,a.createElement)(_f,{rootClientId:t}):(0,a.createElement)(Ef,{rootClientId:t,className:"block-list-appender__toggle"})}return(0,a.createElement)(i,{tabIndex:-1,className:c()("block-list-appender wp-block",r),contentEditable:!1,"data-block":!0},p)};const Af=Number.MAX_SAFE_INTEGER;(0,a.createContext)();var Cf=function(e){let{previousClientId:t,nextClientId:n,children:r,__unstablePopoverSlot:o,__unstableContentRef:i,...s}=e;const[u,p]=(0,a.useReducer)((e=>(e+1)%Af),0),{orientation:y,rootClientId:g,isVisible:h}=(0,d.useSelect)((e=>{var r;const{getBlockListSettings:o,getBlockRootClientId:i,isBlockVisible:l}=e(sr),a=i(null!=t?t:n);return{orientation:(null===(r=o(a))||void 0===r?void 0:r.orientation)||"vertical",rootClientId:a,isVisible:l(t)&&l(n)}}),[t,n]),b=Or(t),v=Or(n),_="vertical"===y,k=(0,a.useMemo)((()=>{if(u<0||!b&&!v||!h)return{};const e=b?b.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;if(_)return{width:e?e.width:t.width,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,m.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:e?e.height:t.height}}),[b,v,_,u,h]),S=(0,a.useMemo)((()=>{if(u<0||!b&&!v||!h)return;const{ownerDocument:e}=b||v;return{ownerDocument:e,getBoundingClientRect(){const e=b?b.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;let n=0,r=0;return _?(r=e?e.bottom:t.top,n=(0,m.isRTL)()?e?e.right:t.right:e?e.left:t.left):(r=e?e.top:t.top,n=(0,m.isRTL)()?e?e.left:t.right:e?e.right:t.left),new window.DOMRect(n,r,0,0)}}}),[b,v,u,_,h]),E=vo(i);return(0,a.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(p);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,a.useLayoutEffect)((()=>{if(!v)return;const e=new window.MutationObserver(p);return e.observe(v,{attributes:!0}),()=>{e.disconnect()}}),[v]),(0,a.useLayoutEffect)((()=>{if(b)return b.ownerDocument.defaultView.addEventListener("resize",p),()=>{var e;null===(e=b.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",p)}}),[b]),(b||v)&&h?(0,a.createElement)(f.Popover,l({ref:E,animate:!1,anchor:S,focusOnMount:!1,__unstableSlotName:o||null,key:n+"--"+g},s,{className:c()("block-editor-block-popover","block-editor-block-popover__inbetween",s.className),resize:!1,flip:!1,placement:"bottom-start"}),(0,a.createElement)("div",{className:"block-editor-block-popover__inbetween-container",style:k},r)):null};const If=(0,a.createContext)();function xf(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r,hideInsertionPoint:o}=(0,d.useDispatch)(sr),i=(0,a.useContext)(If),l=(0,a.useRef)(),{orientation:s,previousClientId:u,nextClientId:y,rootClientId:m,isInserterShown:g}=(0,d.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:l,getNextBlockClientId:a}=e(sr),s=o(),c=n(s.rootClientId);if(!c.length)return{};let u=c[s.index-1],p=c[s.index];for(;i(u);)u=l(u);for(;i(p);)p=a(p);return{previousClientId:u,nextClientId:p,orientation:(null===(t=r(s.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:s.rootClientId,isInserterShown:null==s?void 0:s.__unstableWithInserter}}),[]),h="vertical"===s,b=(0,p.useReducedMotion)();const v={start:{...h?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{...h?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:g?.4:0}},hover:{...h?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},_={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.2}}},k=c()("block-editor-block-list__insertion-point","is-"+s);return(0,a.createElement)(Cf,{previousClientId:u,nextClientId:y,__unstablePopoverSlot:t,__unstableContentRef:n},(0,a.createElement)(f.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&y&&r(y,-1)},onFocus:function(e){e.target!==l.current&&(i.current=!0)},className:c()(k,{"is-with-inserter":g}),onHoverEnd:function(e){e.target!==l.current||i.current||o()}},(0,a.createElement)(f.__unstableMotion.div,{variants:v,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),g&&(0,a.createElement)(f.__unstableMotion.div,{variants:_,className:c()("block-editor-block-list__insertion-point-inserter")},(0,a.createElement)(vf,{position:"bottom center",clientId:y,rootClientId:m,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function Bf(e){return(0,d.useSelect)((e=>e(sr).isBlockInsertionPointVisible()),[])&&(0,a.createElement)(xf,e)}function Pf(){const e=(0,a.useContext)(If),t=(0,d.useSelect)((e=>e(sr).getSettings().hasReducedUI||"zoom-out"===e(sr).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:l,getSelectedBlockClientIds:s,getTemplateLock:c,__unstableIsWithinBlockOverlay:u}=(0,d.useSelect)(sr),{showInsertionPoint:f,hideInsertionPoint:y}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((r=>{if(!t)return r.addEventListener("mousemove",a),()=>{r.removeEventListener("mousemove",a)};function a(t){var r;if(e.current)return;if(l())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(i()&&y());let a;if(!t.target.classList.contains("is-root-container")){a=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(c(a))return;const p=(null===(r=n(a))||void 0===r?void 0:r.orientation)||"vertical",d=t.target.getBoundingClientRect(),m=t.clientY-d.top,g=t.clientX-d.left;let h=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===p&&e.offsetTop>m||e.classList.contains("wp-block")&&"horizontal"===p&&e.offsetLeft>g));if(!h)return;if(!h.id&&(h=h.firstElementChild,!h))return;const b=h.id.slice("block-".length);if(!b||u(b))return;if(s().includes(b))return;const v=h.getBoundingClientRect();if("horizontal"===p&&(t.clientY>v.bottom||t.clientY<v.top)||"vertical"===p&&(t.clientX>v.right||t.clientX<v.left))return void(i()&&y());const _=o(b);0!==_?f(a,_,{__unstableWithInserter:!0}):i()&&y()}}),[e,n,r,o,i,l,f,y,s,t])}const Tf="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Of="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Rf(e){return(0,d.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(sr),{getBlockType:i,getActiveBlockVariation:l}=t(o.store),a=n(e),s=i(a);if(!s)return null;const c=r(e),u=l(a,c),p={title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description,anchor:null==c?void 0:c.anchor}:p}),[e])}function Nf(e){let{clientId:t,maximumLength:n,context:r}=e;const{attributes:i,name:l,reusableBlockTitle:a}=(0,d.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:i}=e(sr),l=n(t);if(!l)return{};const a=(0,o.isReusableBlock)((0,o.getBlockType)(l));return{attributes:r(t),name:l,reusableBlockTitle:a&&i(r(t).ref)}}),[t]),s=Rf(t);if(!l||!s)return null;const c=(0,o.getBlockType)(l),u=c?(0,o.__experimentalGetBlockLabel)(c,i,r):null,p=a||u,f=p&&p!==c.title?p:s.title;if(n&&n>0&&f.length>n){const e="...";return f.slice(0,n-e.length)+e}return f}function Ff(e){let{clientId:t,maximumLength:n,context:r}=e;return Nf({clientId:t,maximumLength:n,context:r})}var Mf=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:i,onDragEnd:l}=e;const{srcRootClientId:s,isDraggable:c,icon:u}=(0,d.useSelect)((e=>{var t;const{canMoveBlocks:r,getBlockRootClientId:i,getBlockName:l}=e(sr),a=i(n[0]),s=l(n[0]);return{srcRootClientId:a,isDraggable:r(n,a),icon:null===(t=(0,o.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),p=(0,a.useRef)(!1),[y,m,g]=function(){const e=(0,a.useRef)(null),t=(0,a.useRef)(null),n=(0,a.useRef)(null),r=(0,a.useRef)(null);return(0,a.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,a.useCallback)((o=>{e.current=o.clientY,n.current=(0,Hi.getScrollContainer)(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,a.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,l=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(l-i-50,0)/e;t.current=25*n}else if(r.clientY<i){const e=Math.max(i-50,0),n=Math.max(i-l-50,0)/e;t.current=-25*n}else t.current=0}),[]),()=>{e.current=null,n.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:b}=(0,d.useDispatch)(sr);if((0,a.useEffect)((()=>()=>{p.current&&b()}),[]),!c)return t({isDraggable:!1});const v={type:"block",srcClientIds:n,srcRootClientId:s};return(0,a.createElement)(f.Draggable,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:v,onDragStart:e=>{h(n),p.current=!0,y(e),i&&i()},onDragOver:m,onDragEnd:()=>{b(),p.current=!1,g(),l&&l()},__experimentalDragComponent:(0,a.createElement)(yd,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))};var Df=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var Lf=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var Uf=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var jf=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const zf=(e,t)=>"up"===e?"horizontal"===t?(0,m.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,m.isRTL)()?"left":"right":"down":null;function Vf(e,t,n,r,o,i,l){const a=n+1;if(e>1)return function(e,t,n,r,o,i){const l=t+1;if(n&&r)return(0,m.__)("All blocks are selected, and cannot be moved");if(o>0&&!r){const t=zf("down",i);if("down"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d down by one place"),e,l);if("left"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o>0&&r){const e=zf("down",i);if("down"===e)return(0,m.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,m.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,m.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(o<0&&!n){const t=zf("up",i);if("up"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d up by one place"),e,l);if("left"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,m.sprintf)((0,m.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o<0&&n){const e=zf("up",i);if("up"===e)return(0,m.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,m.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,m.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,r,o,i,l);if(r&&o)return(0,m.sprintf)((0,m.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=zf("down",l);if("down"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&o){const e=zf("down",l);if("down"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=zf("up",l);if("up"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){const e=zf("up",l);if("up"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const Gf=(e,t)=>"up"===e?"horizontal"===t?(0,m.isRTL)()?Df:Lf:Uf:"down"===e?"horizontal"===t?(0,m.isRTL)()?Lf:Df:jf:null,Hf=(e,t)=>"up"===e?"horizontal"===t?(0,m.isRTL)()?(0,m.__)("Move right"):(0,m.__)("Move left"):(0,m.__)("Move up"):"down"===e?"horizontal"===t?(0,m.isRTL)()?(0,m.__)("Move left"):(0,m.__)("Move right"):(0,m.__)("Move down"):null,Wf=(0,a.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:i,...s}=e;const u=(0,p.useInstanceId)(Wf),y=Array.isArray(n)?n:[n],m=y.length,{blockType:g,isDisabled:h,rootClientId:b,isFirst:v,isLast:_,firstIndex:k,orientation:S="vertical"}=(0,d.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:l,getBlock:a,getBlockListSettings:s}=e(sr),c=y[0],u=n(c),p=t(c),d=t(y[y.length-1]),f=l(u),m=a(c),g=0===p,h=d===f.length-1,{orientation:b}=s(u)||{};return{blockType:m?(0,o.getBlockType)(m.name):null,isDisabled:"up"===r?g:h,rootClientId:u,firstIndex:p,isFirst:g,isLast:h,orientation:i||b}}),[n,r]),{moveBlocksDown:E,moveBlocksUp:w}=(0,d.useDispatch)(sr),A="up"===r?w:E,C=`block-editor-block-mover-button__description-${u}`;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.Button,l({ref:t,className:c()("block-editor-block-mover-button",`is-${r}-button`),icon:Gf(r,S),label:Hf(r,S),"aria-describedby":C},s,{onClick:h?null:e=>{A(n,b),s.onClick&&s.onClick(e)},disabled:h,__experimentalIsFocusable:!0})),(0,a.createElement)(f.VisuallyHidden,{id:C},Vf(m,g&&g.title,k,v,_,"up"===r?-1:1,S)))})),$f=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(Wf,l({direction:"up",ref:t},e)))),Kf=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(Wf,l({direction:"down",ref:t},e))));var qf=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:r,rootClientId:o,isFirst:i,isLast:s,orientation:u}=(0,d.useSelect)((e=>{var n;const{getBlockIndex:r,getBlockListSettings:o,canMoveBlocks:i,getBlockOrder:l,getBlockRootClientId:a}=e(sr),s=Array.isArray(t)?t:[t],c=s[0],u=a(c),p=r(c),d=r(s[s.length-1]),f=l(u);return{canMove:i(t,u),rootClientId:u,isFirst:0===p,isLast:d===f.length-1,orientation:null===(n=o(u))||void 0===n?void 0:n.orientation}}),[t]);if(!r||i&&s&&!o)return null;const p=(0,m.__)("Drag");return(0,a.createElement)(f.ToolbarGroup,{className:c()("block-editor-block-mover",{"is-horizontal":"horizontal"===u})},!n&&(0,a.createElement)(Mf,{clientIds:t},(e=>(0,a.createElement)(f.Button,l({icon:fd,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:p,tabIndex:"-1"},e)))),(0,a.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)($f,l({clientIds:t},e)))),(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)(Kf,l({clientIds:t},e))))))};var Jf=function(e){let{clientId:t,rootClientId:n}=e;const r=Rf(t),i=(0,d.useSelect)((e=>{var r;const{getBlock:o,getBlockIndex:i,hasBlockMovingClientId:l,getBlockListSettings:a,__unstableGetEditorMode:s}=e(sr),c=i(t),{name:u,attributes:p}=o(t);return{index:c,name:u,attributes:p,blockMovingMode:l(),orientation:null===(r=a(n))||void 0===r?void 0:r.orientation,editorMode:s()}}),[t,n]),{index:s,name:u,attributes:p,blockMovingMode:y,orientation:g,editorMode:h}=i,{setNavigationMode:b,removeBlock:v}=(0,d.useDispatch)(sr),_=(0,a.useRef)(),k=(0,o.getBlockType)(u),S=(0,o.__experimentalGetAccessibleBlockLabel)(k,p,s+1,g);(0,a.useEffect)((()=>{_.current.focus(),(0,qt.speak)(S)}),[S]);const E=Or(t),{hasBlockMovingClientId:w,getBlockIndex:A,getBlockRootClientId:C,getClientIdsOfDescendants:I,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:B,getPreviousBlockClientId:P,getNextBlockClientId:T}=(0,d.useSelect)(sr),{selectBlock:O,clearSelectedBlock:R,setBlockMovingClientId:N,moveBlockToPosition:F}=(0,d.useDispatch)(sr),M=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!y}),D=(0,m.__)("Drag");return(0,a.createElement)("div",{className:M},(0,a.createElement)(f.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(Au,{icon:null==r?void 0:r.icon,showColors:!0})),(0,a.createElement)(f.FlexItem,null,"zoom-out"===h&&(0,a.createElement)(qf,{clientIds:[t],hideDragHandle:!0}),"navigation"===h&&(0,a.createElement)(Mf,{clientIds:[t]},(e=>(0,a.createElement)(f.Button,l({icon:fd,className:"block-selection-button_drag-handle","aria-hidden":"true",label:D,tabIndex:"-1"},e))))),(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(f.Button,{ref:_,onClick:"navigation"===h?()=>b(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,r=n===cu.UP,o=n===cu.DOWN,i=n===cu.LEFT,l=n===cu.RIGHT,a=n===cu.TAB,s=n===cu.ESCAPE,c=n===cu.ENTER,u=n===cu.SPACE,p=e.shiftKey;if(n===cu.BACKSPACE||n===cu.DELETE)return v(t),void e.preventDefault();const d=x(),f=B(),y=P(f||d),m=T(f||d),g=a&&p||r,h=a&&!p||o,b=i,_=l;let k;if(g)k=y;else if(h)k=m;else if(b){var S;k=null!==(S=C(d))&&void 0!==S?S:d}else if(_){var M;k=null!==(M=I([d])[0])&&void 0!==M?M:d}const D=w();if(s&&D&&!e.defaultPrevented&&(N(null),e.preventDefault()),(c||u)&&D){const e=C(D),t=C(d),n=A(D);let r=A(d);n<r&&e===t&&(r-=1),F(D,e,t,r),O(D),N(null)}if(h||g||b||_)if(k)e.preventDefault(),O(k);else if(a&&d){let t;if(h){t=E;do{t=Hi.focus.tabbable.findNext(t)}while(t&&E.contains(t));t||(t=E.ownerDocument.defaultView.frameElement,t=Hi.focus.tabbable.findNext(t))}else t=Hi.focus.tabbable.findPrevious(E);t&&(e.preventDefault(),t.focus(),R())}},label:S,showTooltip:!1,className:"block-selection-button_select-button"},(0,a.createElement)(Ff,{clientId:t,maximumLength:35})))))};function Yf(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}function Qf(e,t,n,r,o){const[i]=(0,a.useState)(t),[l]=(0,a.useState)(r),s=(0,a.useCallback)((()=>{!function(e){const[t]=Hi.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,Lu.useShortcut)("core/block-editor/focus-toolbar",s),(0,a.useEffect)((()=>{i&&s()}),[n,i,s]),(0,a.useEffect)((()=>{let t=0;return l&&!i&&(t=window.requestAnimationFrame((()=>{const t=Yf(e.current),n=l||0;var r;t[n]&&(r=e.current).contains(r.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=Yf(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[l,i])}var Zf=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:r,__experimentalOnIndexChange:o,...i}=e;const s=(0,a.useRef)(),c=function(e){const[t,n]=(0,a.useState)(!0),r=(0,a.useCallback)((()=>{const t=!Hi.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||j()("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(0,a.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(s);return Qf(s,n,c,r,o),c?(0,a.createElement)(f.Toolbar,l({label:i["aria-label"],ref:s},i),t):(0,a.createElement)(f.NavigableMenu,l({orientation:"horizontal",role:"toolbar",ref:s},i),t)};const{clearTimeout:Xf,setTimeout:ey}=window,ty=()=>{},ny=200;function ry(e){let{ref:t,isFocused:n,debounceTimeout:r=ny,onChange:o=ty}=e;const[i,l]=(0,a.useState)(!1),s=(0,a.useRef)(),c=e=>{null!=t&&t.current&&l(e),o(e)},u=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},p=()=>{const e=s.current;e&&Xf&&Xf(e)};return(0,a.useEffect)((()=>()=>{c(!1),p()}),[]),{showMovers:i,debouncedShowMovers:e=>{e&&e.stopPropagation(),p(),i||c(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),p(),s.current=ey((()=>{u()&&c(!1)}),r)}}}function oy(e){let{ref:t,debounceTimeout:n=ny,onChange:r=ty}=e;const[o,i]=(0,a.useState)(!1),{showMovers:l,debouncedShowMovers:s,debouncedHideMovers:c}=ry({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),u=(0,a.useRef)(!1),p=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,a.useEffect)((()=>{const e=t.current,n=()=>{p()&&(i(!0),s())},r=()=>{p()||(i(!1),c())};return e&&!u.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),u.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,u,i,s,c]),{showMovers:l,gestures:{onMouseMove:s,onMouseLeave:c}}}function iy(){const{selectBlock:e,toggleBlockHighlight:t}=(0,d.useDispatch)(sr),{firstParentClientId:n,shouldHide:r,hasReducedUI:i}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:i}=e(sr),{hasBlockSupport:l}=e(o.store),a=n(r()),s=a[a.length-1],c=t(s),u=(0,o.getBlockType)(c),p=i();return{firstParentClientId:s,shouldHide:!l(u,"__experimentalParentSelector",!0),hasReducedUI:p.hasReducedUI}}),[]),s=Rf(n),c=(0,a.useRef)(),{gestures:u}=oy({ref:c,onChange(e){e&&i||t(n,e)}});return r||void 0===n?null:(0,a.createElement)("div",l({className:"block-editor-block-parent-selector",key:n,ref:c},u),(0,a.createElement)(f.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,m.sprintf)((0,m.__)("Select %s"),null==s?void 0:s.title),showTooltip:!0,icon:(0,a.createElement)(Au,{icon:null==s?void 0:s.icon})}))}var ly=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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 ay(e){let{blocks:t}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(f.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,m.__)("Preview")),(0,a.createElement)(sd,{viewportWidth:500,blocks:t})))))}function sy(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:r}=e;return t.map((e=>(0,a.createElement)(cy,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:r})))}function cy(e){let{item:t,onSelect:n,setHoveredTransformItemName:r}=e;const{name:i,icon:l,title:s,isDisabled:c}=t;return(0,a.createElement)(f.MenuItem,{className:(0,o.getBlockMenuDefaultClassName)(i),onClick:e=>{e.preventDefault(),n(i)},disabled:c,onMouseLeave:()=>r(null),onMouseEnter:()=>r(i)},(0,a.createElement)(Au,{icon:l,showColors:!0}),s)}var uy=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:i}=e;const[l,s]=(0,a.useState)(),{priorityTextTransformations:c,restTransformations:u}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,a.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:r}=t;return n.includes(r)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:r}=e,{name:o}=n;return t[r]<t[o]?-1:1})),n}(n),p=c.length&&u.length,d=!!u.length&&(0,a.createElement)(sy,{restTransformations:u,onSelect:r,setHoveredTransformItemName:s});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuGroup,{label:(0,m.__)("Transform to"),className:t},l&&(0,a.createElement)(ay,{blocks:(0,o.switchToBlockType)(i,l)}),c.map((e=>(0,a.createElement)(cy,{key:e.name,item:e,onSelect:r,setHoveredTransformItemName:s}))),!p&&d),!!p&&(0,a.createElement)(f.MenuGroup,{className:t},d))};var py=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),dy=window.wp.tokenList,fy=n.n(dy);function yy(e,t,n){const r=new(fy())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}function my(e){return(0,u.find)(e,"isDefault")}function gy(e){let{clientId:t,onSwitch:n}=e;const{styles:r,block:i,blockType:l,className:s}=(0,d.useSelect)((e=>{const{getBlock:n}=e(sr),r=n(t);if(!r)return{};const i=(0,o.getBlockType)(r.name),{getBlockStyles:l}=e(o.store);return{block:r,blockType:i,styles:l(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:c}=(0,d.useDispatch)(sr),p=function(e){return e&&0!==e.length?my(e)?e:[{name:"default",label:(0,m._x)("Default","block style"),isDefault:!0},...e]:[]}(r),f=function(e,t){for(const n of new(fy())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,u.find)(e,{name:t});if(r)return r}return(0,u.find)(e,"isDefault")}(p,s),y=function(e,t){return(0,a.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?(0,o.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,o.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(i,l);return{onSelect:e=>{const r=yy(s,f,e);c(t,{className:r}),n()},stylesToRender:p,activeStyle:f,genericPreviewBlock:y,className:s}}const hy=()=>{};function by(e){let{clientId:t,onSwitch:n=hy}=e;const{onSelect:r,stylesToRender:o,activeStyle:i}=gy({clientId:t,onSwitch:n});return o&&0!==o.length?(0,a.createElement)(a.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,a.createElement)(f.MenuItem,{key:e.name,icon:i.name===e.name?py:null,onClick:()=>r(e)},(0,a.createElement)(f.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function vy(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:r}=t;return(0,a.createElement)(f.MenuGroup,{label:(0,m.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,a.createElement)(by,{clientId:r,onSwitch:n}))}const _y=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:r,name:o,innerBlocks:i=[]}=e;if(!n.has(r)){if(o===t)return e;for(const e of i){const r=_y(e,t,n);if(r)return r}}},ky=(e,t)=>{const n=((e,t)=>{const n=(0,o.__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}};var Sy=(e,t)=>(0,a.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>(0,o.cloneBlock)(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=_y(o,t.name,r);if(n){e=!0,r.add(n.clientId),ky(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]);function Ey(e){let{patterns:t,onSelect:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(f.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,m.__)("Preview")),(0,a.createElement)(wy,{patterns:t,onSelect:n})))))}function wy(e){let{patterns:t,onSelect:n}=e;const r=(0,f.__unstableUseCompositeState)();return(0,a.createElement)(f.__unstableComposite,l({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,m.__)("Patterns list")}),t.map((e=>(0,a.createElement)(Ay,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function Ay(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",i=(0,p.useInstanceId)(Ay,`${o}-list__item-description`);return(0,a.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?i:void 0},(0,a.createElement)(f.__unstableCompositeItem,l({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,a.createElement)(sd,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,a.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,a.createElement)(f.VisuallyHidden,{id:i},t.description))}var Cy=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,a.useState)(!1),l=Sy(n,t);return l.length?(0,a.createElement)(f.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,a.createElement)(Ey,{patterns:l,onSelect:r}),(0,a.createElement)(f.MenuItem,{onClick:e=>{e.preventDefault(),i(!o)},icon:Df},(0,m.__)("Patterns"))):null};const Iy=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r}=(0,d.useDispatch)(sr),i=Rf(n[0].clientId),{possibleBlockTransformations:l,canRemove:s,hasBlockStyles:c,icon:p,patterns:y}=(0,d.useSelect)((e=>{const{getBlockRootClientId:r,getBlockTransformItems:l,__experimentalGetPatternTransformItems:a}=e(sr),{getBlockStyles:s,getBlockType:c}=e(o.store),{canRemoveBlocks:p}=e(sr),d=r((0,u.castArray)(t)[0]),[{name:f}]=n,y=1===n.length,m=y&&s(f);let g;if(y)g=null==i?void 0:i.icon;else{var h;g=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size?null===(h=c(f))||void 0===h?void 0:h.icon:ly}return{possibleBlockTransformations:l(n,d),canRemove:p(t,d),hasBlockStyles:!(null==m||!m.length),icon:g,patterns:a(n,d)}}),[t,n,null==i?void 0:i.icon]),g=Nf({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),h=1===n.length&&(0,o.isReusableBlock)(n[0]),b=1===n.length&&(0,o.isTemplatePart)(n[0]),v=!!l.length&&s&&!b,_=!(null==y||!y.length)&&s;if(!c&&!v)return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:g,icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Au,{icon:p,showColors:!0}),(h||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},g))}));const k=g,S=1===n.length?(0,m.sprintf)((0,m.__)("%s: Change block type or style"),g):(0,m.sprintf)((0,m._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),E=c||v||_;return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)(f.DropdownMenu,{className:"block-editor-block-switcher",label:k,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Au,{icon:p,className:"block-editor-block-switcher__toggle",showColors:!0}),(h||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},g)),toggleProps:{describedBy:S,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:i}=e;return E&&(0,a.createElement)("div",{className:"block-editor-block-switcher__container"},_&&(0,a.createElement)(Cy,{blocks:n,patterns:y,onSelect:e=>{(e=>{r(t,e)})(e),i()}}),v&&(0,a.createElement)(uy,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,blocks:n,onSelect:e=>{(e=>{r(t,(0,o.switchToBlockType)(n,e))})(e),i()}}),c&&(0,a.createElement)(vy,{hoveredBlock:n[0],onSwitch:i}))})))))};var xy=e=>{let{clientIds:t}=e;const n=(0,d.useSelect)((e=>e(sr).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,a.createElement)(Iy,{clientIds:t,blocks:n})};const{Fill:By,Slot:Py}=(0,f.createSlotFill)("__unstableBlockToolbarLastItem");By.Slot=Py;var Ty=By;var Oy=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Ry=window.wp.blob;function Ny(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;if(1!==(null===(n=t.match(e))||void 0===n?void 0:n.length))return!0;const r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}function Fy(){const{getBlockName:e}=(0,d.useSelect)(sr),{getBlockType:t}=(0,d.useSelect)(o.store),{createSuccessNotice:n}=(0,d.useDispatch)(Cd.store);return(0,a.useCallback)(((r,o)=>{let i="";if(1===o.length){var l;const n=o[0],a=null===(l=t(e(n)))||void 0===l?void 0:l.title;i="copy"===r?(0,m.sprintf)((0,m.__)('Copied "%s" to clipboard.'),a):(0,m.sprintf)((0,m.__)('Moved "%s" to clipboard.'),a)}else i="copy"===r?(0,m.sprintf)((0,m._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):(0,m.sprintf)((0,m._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}function My(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:r,__unstableIsFullySelected:i,__unstableIsSelectionCollapsed:l,__unstableIsSelectionMergeable:a,__unstableGetSelectedBlocksWithPartialSelection:s}=(0,d.useSelect)(sr),{flashBlock:c,removeBlocks:u,replaceBlocks:f,__unstableDeleteSelection:y,__unstableExpandSelection:m}=(0,d.useDispatch)(sr),g=Fy();return(0,p.useRefEffect)((p=>{function d(d){const h=t();if(0===h.length)return;if(!n()){const{target:e}=d,{ownerDocument:t}=e;if("copy"===d.type||"cut"===d.type?(0,Hi.documentHasUncollapsedSelection)(t):(0,Hi.documentHasSelection)(t))return}if(!p.contains(d.target.ownerDocument.activeElement))return;const b=d.defaultPrevented;d.preventDefault();const v=a(),_=l()||i(),k=!_&&!v;if("copy"===d.type||"cut"===d.type)if(1===h.length&&c(h[0]),k)m();else{let t;if(g(d.type,h),_)t=e(h);else{const[n,r]=s();t=[n,...e(h.slice(1,h.length-1)),r]}const n=d.clipboardData.getData("__unstableWrapperBlockName");n&&(t=(0,o.createBlock)(n,JSON.parse(d.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const r=(0,o.serialize)(t);d.clipboardData.setData("text/plain",function(e){e=e.replace(/<br>/g,"\n");return(0,Hi.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(r)),d.clipboardData.setData("text/html",r)}if("cut"===d.type)_&&!k?u(h):y();else if("paste"===d.type){if(b)return;const{__experimentalCanUserUseUnfilteredHTML:e}=r(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}const o=(0,Hi.getFilesFromDataTransfer)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return o.length&&!Ny(o,r)&&(r=o.map((e=>`<img src="${(0,Ry.createBlobURL)(e)}">`)).join(""),n=""),{html:r,plainText:n}}(d),i=(0,o.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});f(h,i,i.length-1,-1)}}return p.ownerDocument.addEventListener("copy",d),p.ownerDocument.addEventListener("cut",d),p.ownerDocument.addEventListener("paste",d),()=>{p.ownerDocument.removeEventListener("copy",d),p.ownerDocument.removeEventListener("cut",d),p.ownerDocument.removeEventListener("paste",d)}}),[])}var Dy=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:My()},t)};function Ly(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:i,getBlockRootClientId:l,getBlocksByClientId:a,canMoveBlocks:s,canRemoveBlocks:c}=(0,d.useSelect)(sr),{getDefaultBlockName:u,getGroupingBlockName:p}=(0,d.useSelect)(o.store),f=a(t),y=l(t[0]),m=f.every((e=>!!e&&(0,o.hasBlockSupport)(e.name,"multiple",!0)&&i(e.name,y))),g=i(u(),y),h=s(t,y),b=c(t,y),{removeBlocks:v,replaceBlocks:_,duplicateBlocks:k,insertAfterBlock:S,insertBeforeBlock:E,flashBlock:w,setBlockMovingClientId:A,setNavigationMode:C,selectBlock:I}=(0,d.useDispatch)(sr),x=Fy();return n({canDuplicate:m,canInsertDefaultBlock:g,canMove:h,canRemove:b,rootClientId:y,blocks:f,onDuplicate(){return k(t,r)},onRemove(){return v(t,r)},onInsertBefore(){const e=Array.isArray(t)?t[0]:e;E(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;S(e)},onMoveTo(){C(!0),I(t[0]),A(t[0])},onGroup(){if(!f.length)return;const e=p(),n=(0,o.switchToBlockType)(f,e);n&&_(t,n)},onUngroup(){if(!f.length)return;const e=f[0].innerBlocks;e.length&&_(t,e)},onCopy(){const e=f.map((e=>{let{clientId:t}=e;return t}));1===f.length&&w(e[0]),x("copy",e)}})}const Uy=()=>{};var jy=(0,p.compose)([(0,d.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:i,getSettings:l}=e(sr),a=r(n),s=l().codeEditingEnabled;return{mode:i(n),blockType:a?(0,o.getBlockType)(a.name):null,isCodeEditingEnabled:s}})),(0,d.withDispatch)(((e,t)=>{let{onToggle:n=Uy,clientId:r}=t;return{onToggleMode(){e(sr).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:i=!1,isCodeEditingEnabled:l=!0}=e;if(!t||!(0,o.hasBlockSupport)(t,"html",!0)||!l)return null;const s="visual"===n?(0,m.__)("Edit as HTML"):(0,m.__)("Edit visually");return(0,a.createElement)(f.MenuItem,{onClick:r},!i&&s)}));var zy=(0,p.compose)((0,d.withSelect)(((e,t)=>{let{clientId:n}=t;const r=e(sr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),(0,d.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(sr).replaceBlocks(n.clientId,(0,o.rawHandler)({HTML:(0,o.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=(0,m.__)("Convert to Blocks");return(0,a.createElement)(f.MenuItem,{onClick:n},!r&&o)}));const{Fill:Vy,Slot:Gy}=(0,f.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Vy.Slot=Gy;var Hy=Vy;function Wy(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:i}=(0,d.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:i,getSelectedBlockClientIds:l}=e(sr),{getGroupingBlockName:a}=e(o.store),s=l(),c=a(),u=i(c,null!=s&&s.length?n(s[0]):void 0),p=r(s),d=1===p.length&&(null===(t=p[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&p.length,isUngroupable:d&&!!p[0].innerBlocks.length,blocksSelection:p,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:i}}function $y(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:i,groupingBlockName:l,onClose:s=(()=>{})}=e;const{replaceBlocks:c}=(0,d.useDispatch)(sr);return n||r?(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(f.MenuItem,{onClick:()=>{(()=>{const e=(0,o.switchToBlockType)(i,l);e&&c(t,e)})(),s()}},(0,m._x)("Group","verb")),r&&(0,a.createElement)(f.MenuItem,{onClick:()=>{(()=>{const e=i[0].innerBlocks;e.length&&c(t,e)})(),s()}},(0,m._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Ky(e){return(0,d.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:r,canRemoveBlock:o,canLockBlockType:i,getBlockName:l,getBlockRootClientId:a,getTemplateLock:s}=t(sr),c=a(e),u=n(e),p=r(e,c),d=o(e,c);return{canEdit:u,canMove:p,canRemove:d,canLock:i(l(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!p||!d}}),[e])}var qy=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var Jy=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));function Yy(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Qy(e){let{clientId:t,onClose:n}=e;const[r,i]=(0,a.useState)({move:!1,remove:!1}),{canEdit:l,canMove:s,canRemove:c}=Ky(t),{isReusable:u,templateLock:y,hasTemplateLock:g}=(0,d.useSelect)((e=>{var n,r;const{getBlockName:i,getBlockAttributes:l}=e(sr),a=i(t),s=(0,o.getBlockType)(a);return{isReusable:(0,o.isReusableBlock)(s),templateLock:null===(n=l(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==s||null===(r=s.attributes)||void 0===r||!r.templateLock)}}),[t]),[h,b]=(0,a.useState)(!!y),{updateBlockAttributes:v}=(0,d.useDispatch)(sr),_=Rf(t),k=(0,p.useInstanceId)(Qy,"block-editor-block-lock-modal__options-title");(0,a.useEffect)((()=>{i({move:!s,remove:!c,...u?{edit:!l}:{}})}),[l,s,c,u]);const S=Object.values(r).every(Boolean),E=Object.values(r).some(Boolean)&&!S;return(0,a.createElement)(f.Modal,{title:(0,m.sprintf)((0,m.__)("Lock %s"),_.title),overlayClassName:"block-editor-block-lock-modal",closeLabel:(0,m.__)("Close"),onRequestClose:n},(0,a.createElement)("p",null,(0,m.__)("Choose specific attributes to restrict or lock all available options.")),(0,a.createElement)("form",{onSubmit:e=>{e.preventDefault(),v([t],{lock:r,templateLock:h?Yy(r):void 0}),n()}},(0,a.createElement)("div",{role:"group","aria-labelledby":k,className:"block-editor-block-lock-modal__options"},(0,a.createElement)(f.CheckboxControl,{className:"block-editor-block-lock-modal__options-title",label:(0,a.createElement)("span",{id:k},(0,m.__)("Lock all")),checked:S,indeterminate:E,onChange:e=>i({move:e,remove:e,...u?{edit:e}:{}})}),(0,a.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},u&&(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(f.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Restrict editing"),(0,a.createElement)(f.Icon,{icon:r.edit?Jy:qy})),checked:!!r.edit,onChange:e=>i((t=>({...t,edit:e})))})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(f.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Disable movement"),(0,a.createElement)(f.Icon,{icon:r.move?Jy:qy})),checked:r.move,onChange:e=>i((t=>({...t,move:e})))})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(f.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Prevent removal"),(0,a.createElement)(f.Icon,{icon:r.remove?Jy:qy})),checked:r.remove,onChange:e=>i((t=>({...t,remove:e})))}))),g&&(0,a.createElement)(f.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,m.__)("Apply to all blocks inside"),checked:h,disabled:r.move&&!r.remove,onChange:()=>b(!h)})),(0,a.createElement)(f.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(f.Button,{variant:"tertiary",onClick:n},(0,m.__)("Cancel"))),(0,a.createElement)(f.FlexItem,null,(0,a.createElement)(f.Button,{variant:"primary",type:"submit"},(0,m.__)("Apply"))))))}function Zy(e){let{clientId:t}=e;const{canLock:n,isLocked:r}=Ky(t),[o,i]=(0,a.useReducer)((e=>!e),!1);if(!n)return null;const l=r?(0,m.__)("Unlock"):(0,m.__)("Lock");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuItem,{icon:r?qy:Jy,onClick:i},l),o&&(0,a.createElement)(Qy,{clientId:t,onClose:i}))}const{Fill:Xy,Slot:em}=(0,f.createSlotFill)("BlockSettingsMenuControls");function tm(e){let{...t}=e;return(0,a.createElement)(f.__experimentalStyleProvider,{document:document},(0,a.createElement)(Xy,t))}tm.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:r}=e;const{selectedBlocks:o,selectedClientIds:i,canRemove:s}=(0,d.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:r,canRemoveBlocks:o}=e(sr),i=null!==n?n:r();return{selectedBlocks:(0,u.map)(t(i).filter(Boolean),(e=>e.name)),selectedClientIds:i,canRemove:o(i)}}),[n]),{canLock:c}=Ky(i[0]),p=1===i.length&&c,y=Wy(),{isGroupable:m,isUngroupable:g}=y,h=(m||g)&&s;return(0,a.createElement)(em,{fillProps:{...t,__unstableDisplayLocation:r,selectedBlocks:o,selectedClientIds:i}},(e=>!(null!=e&&e.length)>0&&!h&&!p?null:(0,a.createElement)(f.MenuGroup,null,p&&(0,a.createElement)(Zy,{clientId:i[0]}),e,h&&(0,a.createElement)($y,l({},y,{onClose:null==t?void 0:t.onClose})))))};var nm=tm;const rm=()=>{},om={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function im(e){let{blocks:t,onCopy:n}=e;const r=(0,p.useCopyToClipboard)((()=>(0,o.serialize)(t)),n),i=t.length>1?(0,m.__)("Copy blocks"):(0,m.__)("Copy block");return(0,a.createElement)(f.MenuItem,{ref:r},i)}var lm=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,__unstableDisplayLocation:i,...s}=e;const c=(0,u.castArray)(t),p=c.length,y=c[0],{firstParentClientId:g,hasReducedUI:h,onlyBlock:b,parentBlockType:v,previousBlockClientId:_,nextBlockClientId:k,selectedBlockClientIds:S}=(0,d.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockParents:r,getPreviousBlockClientId:i,getNextBlockClientId:l,getSelectedBlockClientIds:a,getSettings:s}=e(sr),c=r(y),u=c[c.length-1],p=n(u);return{firstParentClientId:u,hasReducedUI:s().hasReducedUI,onlyBlock:1===t(),parentBlockType:(0,o.getBlockType)(p),previousBlockClientId:i(y),nextBlockClientId:l(y),selectedBlockClientIds:a()}}),[y]),E=(0,d.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Lu.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")}}),[]),{selectBlock:w,toggleBlockHighlight:A}=(0,d.useDispatch)(sr),C=(0,a.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:rm,[n]),I=Nf({clientId:y,maximumLength:25}),x=(0,a.useCallback)(n?()=>{const e=_||k;e&&S.includes(y)&&!S.includes(e)&&n(e)}:rm,[n,_,k,S]),B=(0,m.sprintf)((0,m.__)("Remove %s"),I),P=1===p?B:(0,m.__)("Remove blocks"),T=(0,a.useRef)(),{gestures:O}=oy({ref:T,onChange(e){e&&h||A(g,e)}});return(0,a.createElement)(Ly,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:o,canMove:c,canRemove:d,onDuplicate:h,onInsertAfter:_,onInsertBefore:k,onRemove:S,onCopy:A,onMoveTo:I,blocks:B}=e;return(0,a.createElement)(f.DropdownMenu,l({icon:Oy,label:(0,m.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:om,noIcons:!0},s),(e=>{let{onClose:s}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuGroup,null,(0,a.createElement)(Hy.Slot,{fillProps:{onClose:s}}),void 0!==g&&(0,a.createElement)(f.MenuItem,l({},O,{ref:T,icon:(0,a.createElement)(Au,{icon:v.icon}),onClick:()=>w(g)}),(0,m.sprintf)((0,m.__)("Select parent block (%s)"),v.title)),1===p&&(0,a.createElement)(zy,{clientId:y}),(0,a.createElement)(im,{blocks:B,onCopy:A}),n&&(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,h,C),shortcut:E.duplicate},(0,m.__)("Duplicate")),o&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,k),shortcut:E.insertBefore},(0,m.__)("Insert before")),(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,_),shortcut:E.insertAfter},(0,m.__)("Insert after"))),c&&!b&&(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,I)},(0,m.__)("Move to")),1===p&&(0,a.createElement)(jy,{clientId:y,onToggle:s})),(0,a.createElement)(nm.Slot,{fillProps:{onClose:s},clientIds:t,__unstableDisplayLocation:i}),"function"==typeof r?r({onClose:s}):a.Children.map((e=>(0,a.cloneElement)(e,{onClose:s}))),d&&(0,a.createElement)(f.MenuGroup,null,(0,a.createElement)(f.MenuItem,{onClick:(0,u.flow)(s,S,x),shortcut:E.remove},P)))}))}))};var am=function(e){let{clientIds:t,...n}=e;return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)(lm,l({clientIds:t,toggleProps:e},n)))))};function sm(e){let{clientId:t}=e;const n=Rf(t),{canEdit:r,canMove:o,canRemove:i,canLock:l}=Ky(t),[s,c]=(0,a.useReducer)((e=>!e),!1);return l?r&&o&&i?null:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,a.createElement)(f.ToolbarButton,{icon:Jy,label:(0,m.sprintf)((0,m.__)("Unlock %s"),n.title),onClick:c})),s&&(0,a.createElement)(Qy,{clientId:t,onClose:c})):null}var cm=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var um=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var pm=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const dm={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var fm=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:r}=Wy(),{replaceBlocks:i}=(0,d.useDispatch)(sr),{canRemove:l,variations:s}=(0,d.useSelect)((e=>{const{canRemoveBlocks:r}=e(sr),{getBlockVariations:i}=e(o.store);return{canRemove:r(t),variations:i(n,"transform")}}),[t,n]),c=r=>{const l=(0,o.switchToBlockType)(e,n);"string"!=typeof r&&(r="group"),l&&l.length>0&&(l[0].attributes.layout=dm[r],i(t,l))};if(!r||!l)return null;const u=!!s.find((e=>{let{name:t}=e;return"group-row"===t})),p=!!s.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarButton,{icon:cm,label:(0,m._x)("Group","verb"),onClick:c}),u&&(0,a.createElement)(f.ToolbarButton,{icon:um,label:(0,m._x)("Row","single horizontal line"),onClick:()=>c("row")}),p&&(0,a.createElement)(f.ToolbarButton,{icon:pm,label:(0,m._x)("Stack","verb"),onClick:()=>c("stack")}))};function ym(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,r=(0,d.useSelect)((e=>!!n&&"html"===e(sr).getBlockMode(n)),[n]),{toggleBlockMode:o}=(0,d.useDispatch)(sr);return r?(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarButton,{onClick:()=>{o(n)}},(0,m.__)("Edit visually"))):null}var mm=(0,a.createContext)("");var gm=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:i,hasFixedToolbar:s,hasReducedUI:u,isValid:y,isVisual:m,isContentLocked:g}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:i,getBlockRootClientId:l,getSettings:a,__unstableGetContentLockingParent:s}=e(sr),c=r(),u=c[0],p=l(u),d=a();return{blockClientIds:c,blockClientId:u,blockType:u&&(0,o.getBlockType)(t(u)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:p,isValid:c.every((e=>i(e))),isVisual:c.every((e=>"visual"===n(e))),isContentLocked:!!s(u)}}),[]),{toggleBlockHighlight:h}=(0,d.useDispatch)(sr),b=(0,a.useRef)(),{showMovers:v,gestures:_}=oy({ref:b,onChange(e){e&&u||h(r,e)}}),k=(0,p.useViewportMatch)("medium","<")||s;if(i&&!(0,o.hasBlockSupport)(i,"__experimentalToolbar",!0))return null;const S=k||v;if(0===n.length)return null;const E=y&&m,w=n.length>1,A=c()("block-editor-block-toolbar",S&&"is-showing-movers");return(0,a.createElement)("div",{className:A},!w&&!k&&!g&&(0,a.createElement)(iy,null),(0,a.createElement)("div",l({ref:b},_),(E||w)&&!g&&(0,a.createElement)(f.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,a.createElement)(xy,{clientIds:n}),!w&&(0,a.createElement)(sm,{clientId:n[0]}),(0,a.createElement)(qf,{clientIds:n,hideDragHandle:t||u}))),E&&w&&(0,a.createElement)(fm,null),E&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(br.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(br.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(br.Slot,{className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(br.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(br.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(mm.Provider,{value:null==i?void 0:i.name},(0,a.createElement)(Ty.Slot,null))),(0,a.createElement)(ym,{clientIds:n}),!g&&(0,a.createElement)(am,{clientIds:n}))};var hm=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:i,hasParents:s,showParentSelector:u}=(0,d.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r,__unstableGetContentLockingParent:i}=e(sr),{getBlockType:l}=e(o.store),a=r(),s=a[0],c=n(s),u=l(t(c[c.length-1]));return{blockType:s&&l(t(s)),hasParents:c.length,showParentSelector:u&&(0,o.hasBlockSupport)(u,"__experimentalParentSelector",!0)&&a.length<=1&&!i(s)}}),[]);if(i&&!(0,o.hasBlockSupport)(i,"__experimentalToolbar",!0))return null;const p=c()("block-editor-block-contextual-toolbar",{"has-parent":s&&u,"is-fixed":n});return(0,a.createElement)(Zf,l({focusOnMount:t,className:p,"aria-label":(0,m.__)("Block tools")},r),(0,a.createElement)(gm,{hideDragHandle:n}))};const bm={flip:!1,shift:!0},vm={flip:!0,shift:!1};function _m(e,t,n){if(!e||!t)return bm;const r=t.getBoundingClientRect(),o=e.getBoundingClientRect(),i=e.ownerDocument.documentElement.clientHeight,l=r.top-o.top>n,a=r.height>i-n;return l||a?bm:vm}function km(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,getSettings:i,getLastMultiSelectedBlockClientId:l}=e(sr);return{editorMode:t(),isMultiSelecting:n(),isTyping:o(),hasFixedToolbar:i().hasFixedToolbar,lastClientId:r()?l():null}}function Sm(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:r,capturingClientId:o,__unstablePopoverSlot:i,__unstableContentRef:s}=e;const{editorMode:u,isMultiSelecting:f,isTyping:y,hasFixedToolbar:m,lastClientId:g}=(0,d.useSelect)(km,[]),h=(0,d.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(sr);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===t}),[t]),b=(0,p.useViewportMatch)("medium"),v=(0,a.useRef)(!1),{stopTyping:_}=(0,d.useDispatch)(sr),k=!y&&"edit"===u&&r,S="navigation"===u||"zoom-out"===u,E="edit"===u&&!m&&b&&!f&&!k&&!y,w="edit"===u&&!E&&!m&&!r;(0,Lu.useShortcut)("core/block-editor/focus-toolbar",(()=>{v.current=!0,_(!0)}),{isDisabled:!w}),(0,a.useEffect)((()=>{v.current=!1}));const A=(0,a.useRef)(),C=function(e){let{contentElement:t,clientId:n}=e;const r=Or(n),[o,i]=(0,a.useState)(0),[l,s]=(0,a.useState)((()=>_m(t,r,o))),c=(0,d.useSelect)((e=>e(sr).getBlockIndex(n)),[n]),u=(0,p.useRefEffect)((e=>{i(e.offsetHeight)}),[]),f=(0,a.useCallback)((()=>s(_m(t,r,o))),[t,r,o]);return(0,a.useLayoutEffect)(f,[c,f]),(0,a.useLayoutEffect)((()=>{var e,n,o;if(!t||!r)return;const i=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let l;null==i||null===(n=i.addEventHandler)||void 0===n||n.call(i,"resize",f);const a=null==r||null===(o=r.ownerDocument)||void 0===o?void 0:o.defaultView;return a.ResizeObserver&&(l=new a.ResizeObserver(f),l.observe(r)),()=>{var e;null==i||null===(e=i.removeEventHandler)||void 0===e||e.call(i,"resize",f),l&&l.disconnect()}}),[f,t,r]),{...l,ref:u}}({contentElement:null==s?void 0:s.current,clientId:t});return S||E||k?(0,a.createElement)(a.Fragment,null,k&&(0,a.createElement)(ko,l({clientId:o||t,__unstableCoverTarget:!0,bottomClientId:g,className:c()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":h}),__unstablePopoverSlot:i,__unstableContentRef:s,resize:!1,shift:!1},C),(0,a.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,a.createElement)(vf,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))),(S||E)&&(0,a.createElement)(ko,l({clientId:o||t,bottomClientId:g,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":h}),__unstablePopoverSlot:i,__unstableContentRef:s,resize:!1},C),E&&(0,a.createElement)(hm,{focusOnMount:v.current,__experimentalInitialIndex:A.current,__experimentalOnIndexChange:e=>{A.current=e},key:t}),S&&(0,a.createElement)(Jf,{clientId:t,rootClientId:n}))):null}function Em(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:i,getBlockParents:l,__experimentalGetBlockListSettingsForBlocks:a}=e(sr),s=t()||n();if(!s)return;const{name:c,attributes:p={}}=i(s)||{},d=l(s),f=a(d),y=(0,u.find)(d,(e=>{var t;return null===(t=f[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:s,rootClientId:r(s),name:c,isEmptyDefaultBlock:c&&(0,o.isUnmodifiedDefaultBlock)({name:c,attributes:p}),capturingClientId:y}}function wm(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,d.useSelect)(Em,[]);if(!r)return null;const{clientId:o,rootClientId:i,name:l,isEmptyDefaultBlock:s,capturingClientId:c}=r;return l?(0,a.createElement)(Sm,{clientId:o,rootClientId:i,isEmptyDefaultBlock:s,capturingClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Am(e){let{children:t}=e;const n=(0,a.useContext)(If),r=(0,a.useContext)(f.Disabled.Context);return n||r?t:(j()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8"}),(0,a.createElement)(Bf,{__unstablePopoverSlot:"block-toolbar"},(0,a.createElement)(wm,{__unstablePopoverSlot:"block-toolbar"}),t))}var Cm=(0,p.createHigherOrderComponent)((e=>t=>{const{clientId:n}=dr();return(0,a.createElement)(e,l({},t,{clientId:n}))}),"withClientId");var Im=Cm((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:i}=e;return(0,a.createElement)(Ef,{className:c()({"block-list-appender__toggle":i}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})}));var xm=(0,p.compose)([Cm,(0,d.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(sr),o=r(n);return{lastBlockClientId:o[o.length-1]}}))])((e=>{let{clientId:t}=e;return(0,a.createElement)(_f,{rootClientId:t})}));const Bm=new WeakMap;const Pm=new WeakMap;function Tm(e,t,n,r,i,l,a){return s=>{const{srcRootClientId:c,srcClientIds:u,type:p,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}(s);if("inserter"===p){a();const n=d.map((e=>(0,o.cloneBlock)(e)));l(n,t,e,!0,null)}if("block"===p){const o=n(u[0]);if(c===e&&o===t)return;if(u.includes(e)||r(u).some((t=>t===e)))return;const l=c===e,a=u.length;i(u,c,e,l&&o<t?t-a:t)}}}function Om(e,t){const n=(0,d.useSelect)((e=>e(sr).getSettings().mediaUpload),[]),{canInsertBlockType:r,getBlockIndex:i,getClientIdsOfDescendants:l}=(0,d.useSelect)(sr),{insertBlocks:a,moveBlocksToPosition:s,updateBlockAttributes:c,clearSelectedBlock:u}=(0,d.useDispatch)(sr),p=Tm(e,t,i,l,s,a,u),f=function(e,t,n,r,i,l){return a=>{if(!n)return;const s=(0,o.findTransform)((0,o.getBlockTransforms)("from"),(t=>"files"===t.type&&i(t.blockName,e)&&t.isMatch(a)));if(s){const n=s.transform(a,r);l(n,t,e)}}}(e,t,n,c,r,a),y=function(e,t,n){return r=>{const i=(0,o.pasteHandler)({HTML:r,mode:"BLOCKS"});i.length&&n(i,t,e)}}(e,t,a);return e=>{const t=(0,Hi.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?y(n):t.length?f(t):p(e)}}function Rm(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,l=r?o:i,a=r?i:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let p;return p=l>=s&&l<=c?l:l<c?s:c,Math.sqrt((l-p)**2+(a-u)**2)}function Nm(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((o=>{const i=Rm(e,t,o);(void 0===n||i<n)&&(n=i,r=o)})),[n,r]}function Fm(e,t,n){const r="horizontal"===n?["left","right"]:["top","bottom"],o=(0,m.isRTL)();let i,l;return e.forEach(((e,n)=>{const a=e.getBoundingClientRect(),[s,c]=Nm(t,a,r);if(void 0===l||s<l){l=s,i=n+("bottom"===c||!o&&"right"===c||o&&"left"===c?1:0)}})),i}function Mm(){let{rootClientId:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,a.useState)(null),r=(0,d.useSelect)((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:r,__unstableHasActiveBlockOverlayActive:o}=t(sr),i=n(e);return["all","contentOnly"].some((e=>e===i))||o(e)||r(e)}),[e]),{getBlockListSettings:o}=(0,d.useSelect)(sr),{showInsertionPoint:i,hideInsertionPoint:l}=(0,d.useDispatch)(sr),s=Om(e,t),c=(0,p.useThrottle)((0,a.useCallback)(((t,r)=>{var l;const a=Fm(Array.from(r.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(l=o(e))||void 0===l?void 0:l.orientation);n(void 0===a?0:a),null!==a&&i(e,a)}),[]),200);return(0,p.__experimentalUseDropZone)({isDisabled:r,onDrop:s,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),l(),n(null)},onDragEnd(){c.cancel(),l(),n(null)}})}function Dm(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:i,template:l,templateLock:s,wrapperRef:c,templateInsertUpdatesSelection:p,__experimentalCaptureToolbars:f,__experimentalAppenderTagName:y,renderAppender:m,orientation:g,placeholder:h,__experimentalLayout:b}=e;!function(e,t,n,r,o,i,l,s){const{updateBlockListSettings:c}=(0,d.useDispatch)(sr),u=(0,d.useRegistry)(),{blockListSettings:p,parentLock:f}=(0,d.useSelect)((t=>{const n=t(sr).getBlockRootClientId(e);return{blockListSettings:t(sr).getBlockListSettings(e),parentLock:t(sr).getTemplateLock(n)}}),[e]),y=(0,a.useMemo)((()=>t),t);(0,a.useLayoutEffect)((()=>{const t={allowedBlocks:y,templateLock:void 0===o||"contentOnly"===f?f:o};if(void 0!==i&&(t.__experimentalCaptureToolbars=i),void 0!==l)t.orientation=l;else{const e=gi(null==s?void 0:s.type);t.orientation=e.getOrientation(s)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),bo()(p,t)||(Bm.get(u)||Bm.set(u,[]),Bm.get(u).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=Bm.get(u))&&void 0!==e&&e.length&&u.batch((()=>{Bm.get(u).forEach((e=>{c(...e)})),Bm.set(u,[])}))})))}),[e,p,y,n,r,o,f,i,l,c,s,u])}(t,n,r,i,s,f,g,b),function(e,t,n,r){const{getSelectedBlocksInitialCaretPosition:i,isBlockSelected:l}=(0,d.useSelect)(sr),{replaceInnerBlocks:s}=(0,d.useDispatch)(sr),c=(0,d.useSelect)((t=>t(sr).getBlocks(e)),[e]),{getBlocks:p}=(0,d.useSelect)(sr),f=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{window.queueMicrotask((()=>{const a=p(e),c=0===a.length||"all"===n||"contentOnly"===n,d=!(0,u.isEqual)(t,f.current);if(!c||!d)return;f.current=t;const y=(0,o.synchronizeBlocksWithTemplate)(a,t);(0,u.isEqual)(y,a)||s(e,y,0===a.length&&r&&0!==y.length&&l(e),i())}))}),[c,t,n,e])}(t,l,s,p);const v=(0,d.useSelect)((e=>{const n=e(sr).getBlock(t);if(!n)return;const r=(0,o.getBlockType)(n.name);return r&&r.providesContext?function(e,t){Pm.has(t)||Pm.set(t,new WeakMap);const n=Pm.get(t);if(!n.has(e)){const r=(0,u.mapValues)(t.providesContext,(t=>e[t]));n.set(e,r)}return n.get(e)}(n.attributes,r):void 0}),[t]);return(0,a.createElement)($i,{value:v},(0,a.createElement)(Km,{rootClientId:t,renderAppender:m,__experimentalAppenderTagName:y,__experimentalLayout:b,wrapperRef:c,placeholder:h}))}function Lm(e){return Bu(e),(0,a.createElement)(Dm,e)}const Um=(0,a.forwardRef)(((e,t)=>{const n=jm({ref:t},e);return(0,a.createElement)("div",{className:"block-editor-inner-blocks"},(0,a.createElement)("div",n))}));function jm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableDropZone:n}=t,{clientId:r}=dr(),i=(0,p.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:s,hasOverlay:u}=(0,d.useSelect)((e=>{if(!r)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:l,__unstableGetEditorMode:a}=e(sr),s=t(r),c="navigation"===a()||i;return{__experimentalCaptureToolbars:e(o.store).hasBlockSupport(s,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==s&&!n(r)&&!l(r,!0)&&c}}),[r,i]),f=Mm({rootClientId:r}),y=(0,p.useMergeRefs)([e.ref,n?null:f]),m={__experimentalCaptureToolbars:s,...t},g=m.value&&m.onChange?Lm:Dm;return{...e,ref:y,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":u}),children:r?(0,a.createElement)(g,l({},m,{clientId:r})):(0,a.createElement)(Km,t)}}jm.save=o.__unstableGetInnerBlocksProps,Um.DefaultBlockAppender=xm,Um.ButtonBlockAppender=Im,Um.Content=()=>jm.save().children;var zm=Um;const Vm=(0,a.createContext)(),Gm=(0,a.createContext)();function Hm(e){let{className:t,...n}=e;const[r,o]=(0,a.useState)(),i=(0,p.useViewportMatch)("medium"),{isOutlineMode:l,isFocusMode:s,editorMode:u}=(0,d.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(sr),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,editorMode:n()}}),[]),{setBlockVisibility:f}=(0,d.useDispatch)(sr),y=(0,a.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{const t={};for(const n of e){t[n.target.getAttribute("data-block")]=n.isIntersecting}f(t)}))}),[]),m=jm({ref:(0,p.useMergeRefs)([Ou(),Pf(),o]),className:c()("is-root-container",t,{"is-outline-mode":l,"is-focus-mode":s&&i,"is-navigate-mode":"navigation"===u})},n);return(0,a.createElement)(Vm.Provider,{value:r},(0,a.createElement)(Gm.Provider,{value:y},(0,a.createElement)("div",m)))}function Wm(e){return function(){const e=(0,d.useSelect)((e=>e(sr).getSettings().__experimentalBlockPatterns),[]);(0,a.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const r=()=>{n++,n>=e.length||((0,d.select)(sr).__experimentalGetParsedPattern(e[n].name),t=Tf(r))};return t=Tf(r),()=>Of(t)}),[e])}(),(0,a.createElement)(Am,null,(0,a.createElement)(pr,{value:cr},(0,a.createElement)(Hm,e)))}function $m(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:i=hi}=e;const{order:l,selectedBlocks:s,visibleBlocks:c}=(0,d.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:o}=e(sr);return{order:t(n),selectedBlocks:r(),visibleBlocks:o()}}),[n]);return(0,a.createElement)(vi,{value:i},l.map((e=>(0,a.createElement)(d.AsyncModeProvider,{key:e,value:!c.has(e)&&!s.includes(e)},(0,a.createElement)(vu,{rootClientId:n,clientId:e})))),l.length<1&&t,(0,a.createElement)(wf,{tagName:o,rootClientId:n,renderAppender:r}))}function Km(e){return(0,a.createElement)(d.AsyncModeProvider,{value:!1},(0,a.createElement)($m,e))}function qm(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Jm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat:t,...n}=e;return t||qm(Object.values(n).filter(Boolean))||"px"}function Ym(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,f.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",i=qm(r),l=0===o||o?`${o}${i}`:void 0;return l}function Qm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Ym(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function Zm(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function Xm(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e,s=Ym(o);void 0===s&&(s=Jm(n));const c=Zm(o)&&Qm(o),u=c?(0,m.__)("Mixed"):null;return(0,a.createElement)(f.__experimentalUnitControl,l({},i,{"aria-label":(0,m.__)("Border radius"),disableUnits:c,isOnly:!0,value:s,onChange:e=>{const n=!isNaN(parseFloat(e));t(n?e:void 0)},onUnitChange:e=>{r({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:u}))}Wm.__unstableElementContext=Vm;const eg={topLeft:(0,m.__)("Top left"),topRight:(0,m.__)("Top right"),bottomLeft:(0,m.__)("Bottom left"),bottomRight:(0,m.__)("Bottom right")};function tg(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e;const s=e=>n=>{if(!t)return;const r=!isNaN(parseFloat(n))?n:void 0;t({...c,[e]:r})},c="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,a.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(eg).map((e=>{let[t,o]=e;const[u,p]=(0,f.__experimentalParseQuantityAndUnitFromRawValue)(c[t]),d=c[t]?p:n[t]||n.flat;return(0,a.createElement)(f.Tooltip,{text:o,position:"top",key:t},(0,a.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,a.createElement)(f.__experimentalUnitControl,l({},i,{"aria-label":o,value:[u,d].join(""),onChange:s(t),onUnitChange:(y=t,e=>{const t={...n};t[y]=e,r(t)})}))));var y})))}function ng(e){let{isLinked:t,...n}=e;const r=t?(0,m.__)("Unlink radii"):(0,m.__)("Link radii");return(0,a.createElement)(f.Tooltip,{text:r},(0,a.createElement)("span",null,(0,a.createElement)(f.Button,l({},n,{className:"component-border-radius-control__linked-button",isSmall:!0,icon:t?Xr:eo,iconSize:24,"aria-label":r}))))}const rg={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},og={px:100,em:20,rem:20};function ig(e){let{onChange:t,values:n}=e;const[r,o]=(0,a.useState)(!Zm(n)||!Qm(n)),[i,l]=(0,a.useState)({flat:"string"==typeof n?(0,f.__experimentalParseQuantityAndUnitFromRawValue)(n)[1]:void 0,topLeft:(0,f.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topLeft)[1],topRight:(0,f.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topRight)[1],bottomLeft:(0,f.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomLeft)[1],bottomRight:(0,f.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomRight)[1]}),s=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["px","em","rem"]}),c=Jm(i),u=s&&s.find((e=>e.value===c)),p=(null==u?void 0:u.step)||1,[d]=(0,f.__experimentalParseQuantityAndUnitFromRawValue)(Ym(n));return(0,a.createElement)("fieldset",{className:"components-border-radius-control"},(0,a.createElement)(f.BaseControl.VisualLabel,{as:"legend"},(0,m.__)("Radius")),(0,a.createElement)("div",{className:"components-border-radius-control__wrapper"},r?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Xm,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,units:s}),(0,a.createElement)(f.RangeControl,{label:(0,m.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=d?d:"",min:0,max:og[c],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${c}`:void 0)},step:p})):(0,a.createElement)(tg,{min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,values:n||rg,units:s}),(0,a.createElement)(ng,{onClick:()=>o(!r),isLinked:r})))}function lg(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(ig,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{const t=lo({...n,border:{...null==n?void 0:n.border,radius:e}});r({style:t})}})}Ap([Cp,Bp]);const ag=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},sg=(e,t)=>(0,u.find)(e,{color:t});function cg(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}function ug(){return{disableCustomColors:!Kr("color.custom"),disableCustomGradients:!Kr("color.customGradient")}}function pg(){const e=ug(),t=Kr("color.palette.custom"),n=Kr("color.palette.theme"),r=Kr("color.palette.default"),o=Kr("color.defaultPalette");e.colors=(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,m._x)("Theme","Indicates this palette comes from the theme."),colors:n}),o&&r&&r.length&&e.push({name:(0,m._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&e.push({name:(0,m._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[r,n,t]);const i=Kr("color.gradients.custom"),l=Kr("color.gradients.theme"),s=Kr("color.gradients.default"),c=Kr("color.defaultGradients");return e.gradients=(0,a.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,m._x)("Theme","Indicates this palette comes from the theme."),gradients:l}),c&&s&&s.length&&e.push({name:(0,m._x)("Default","Indicates this palette comes from WordPress."),gradients:s}),i&&i.length&&e.push({name:(0,m._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,l,s]),e}const dg="__experimentalBorder",fg=["top","right","bottom","left"],yg=e=>{var t,n;return{...e,borderColor:void 0,style:{...e.style,border:{radius:null===(t=e.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius}}}},mg=(e,t,n)=>{let r;return e.some((e=>e.colors.some((e=>e[t]===n&&(r=e,!0))))),r},gg=e=>{let{colors:t,namedColor:n,customColor:r}=e;if(n){const e=mg(t,"slug",n);if(e)return e}if(!r)return{color:void 0};const o=mg(t,"color",r);return o||{color:r}};function hg(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function bg(e){const{attributes:t,clientId:n,setAttributes:r}=e,{style:i}=t,{colors:l}=pg(),s=vg(e.name),c=Kr("border.color")&&vg(e.name,"color"),u=Kr("border.radius")&&vg(e.name,"radius"),p=Kr("border.style")&&vg(e.name,"style"),d=Kr("border.width")&&vg(e.name,"width");if([!c,!u,!p,!d].every(Boolean)||!s)return null;const y=(0,o.getBlockSupport)(e.name,[dg,"__experimentalDefaultControls"]),g=(null==y?void 0:y.color)||(null==y?void 0:y.width),h=((e,t)=>{const{borderColor:n,style:r}=e,{border:o}=r||{};if(n){const{color:e}=gg({colors:t,namedColor:n});return e?{...o,color:e}:o}if(!o)return o;const i={...o};return fg.forEach((e=>{var n;const r=hg(null===(n=i[e])||void 0===n?void 0:n.color);if(r){const{color:n}=gg({colors:t,namedColor:r});i[e]={...i[e],color:n}}})),i})(t,l);return(0,a.createElement)(go,{__experimentalGroup:"border"},(d||c)&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>(e=>{const{borderColor:t,style:n}=e.attributes;return(0,f.__experimentalIsDefinedBorder)(null==n?void 0:n.border)||!!t})(e),label:(0,m.__)("Border"),onDeselect:()=>(e=>{var t;let{attributes:n={},setAttributes:r}=e;const{style:o}=n;r({borderColor:void 0,style:{...o,border:lo({radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius})}})})(e),isShownByDefault:g,resetAllFilter:yg,panelId:n},(0,a.createElement)(f.__experimentalBorderBoxControl,{colors:l,enableAlpha:!0,enableStyle:p,onChange:e=>{var t;let n,o={...e};if((0,f.__experimentalHasSplitBorders)(e))o={top:{...e.top},right:{...e.right},bottom:{...e.bottom},left:{...e.left}},fg.forEach((t=>{var n;if(null!==(n=e[t])&&void 0!==n&&n.color){var r;const n=gg({colors:l,customColor:null===(r=e[t])||void 0===r?void 0:r.color});n.slug&&(o[t].color=`var:preset|color|${n.slug}`)}}));else if(null!=e&&e.color){const t=null==e?void 0:e.color,r=gg({colors:l,customColor:t});r.slug&&(n=r.slug,o.color=void 0)}const a=lo({...i,border:{radius:null==i||null===(t=i.border)||void 0===t?void 0:t.radius,...o}});r({style:a,borderColor:n})},popoverOffset:40,popoverPlacement:"left-start",value:h,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0})),u&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const r=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof r?Object.entries(r).some(Boolean):!!r}(e),label:(0,m.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:_g(r,"radius")})}(e),isShownByDefault:null==y?void 0:y.radius,resetAllFilter:e=>{var t;return{...e,style:{...e.style,border:{...null===(t=e.style)||void 0===t?void 0:t.border,radius:void 0}}}},panelId:n},(0,a.createElement)(lg,e)))}function vg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==a.Platform.OS)return!1;const n=(0,o.getBlockSupport)(e,dg);return!0===n||("any"===t?!!(null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style):!(null==n||!n[t]))}function _g(e,t){return lo({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function kg(e,t,n){if(!vg(t,"color")||co(t,dg,"color"))return e;const r=Sg(n),o=c()(e.className,r);return e.className=o||void 0,e}function Sg(e){var t;const{borderColor:n,style:r}=e,o=cg("border-color",n);return c()({"has-border-color":n||(null==r||null===(t=r.border)||void 0===t?void 0:t.color),[o]:!!o})}const Eg=(0,p.createHigherOrderComponent)((e=>t=>{var n,r,o,i,s,c,u,p,d;const{name:f,attributes:y}=t,{borderColor:m,style:g}=y,{colors:h}=pg();if(!vg(f,"color")||co(f,dg,"color"))return(0,a.createElement)(e,t);const{color:b}=gg({colors:h,namedColor:m}),{color:v}=gg({colors:h,namedColor:hg(null==g||null===(n=g.border)||void 0===n||null===(r=n.top)||void 0===r?void 0:r.color)}),{color:_}=gg({colors:h,namedColor:hg(null==g||null===(o=g.border)||void 0===o||null===(i=o.right)||void 0===i?void 0:i.color)}),{color:k}=gg({colors:h,namedColor:hg(null==g||null===(s=g.border)||void 0===s||null===(c=s.bottom)||void 0===c?void 0:c.color)}),{color:S}=gg({colors:h,namedColor:hg(null==g||null===(u=g.border)||void 0===u||null===(p=u.left)||void 0===p?void 0:p.color)}),E={borderTopColor:v||b,borderRightColor:_||b,borderBottomColor:k||b,borderLeftColor:S||b};let w=t.wrapperProps;return w={...t.wrapperProps,style:{...null===(d=t.wrapperProps)||void 0===d?void 0:d.style,...E}},(0,a.createElement)(e,l({},t,{wrapperProps:w}))}));function wg(e){if(e)return`has-${e}-gradient-background`}function Ag(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function Cg(e,t){return(0,u.find)(e,["gradient",t])}function Ig(e,t){const n=Cg(e,t);return n&&n.slug}function xg(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=dr(),r=Kr("color.gradients.custom"),o=Kr("color.gradients.theme"),i=Kr("color.gradients.default"),l=(0,a.useMemo)((()=>[...r||[],...o||[],...i||[]]),[r,o,i]),{gradient:s,customGradient:c}=(0,d.useSelect)((r=>{const{getBlockAttributes:o}=r(sr),i=o(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:u}=(0,d.useDispatch)(sr),p=(0,a.useCallback)((r=>{const o=Ig(l,r);u(n,o?{[e]:o,[t]:void 0}:{[e]:void 0,[t]:r})}),[l,n,u]),f=wg(s);let y;return y=s?Ag(l,s):c,{gradientClass:f,gradientValue:y,setGradient:p}}(0,i.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return vg(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",kg),(0,i.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!vg(e,"color")||co(e,dg,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),kg(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Eg);const Bg=["colors","disableCustomColors","gradients","disableCustomGradients"],Pg={name:"color",title:"Solid",value:"color"},Tg={name:"gradient",title:"Gradient",value:"gradient"},Og=[Pg,Tg];function Rg(e){let{colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:l,className:s,label:p,onColorChange:d,onGradientChange:y,colorValue:m,gradientValue:g,clearable:h,showTitle:b=!0,enableAlpha:v}=e;const _=d&&(!(0,u.isEmpty)(t)||!r),k=y&&(!(0,u.isEmpty)(n)||!o);if(!_&&!k)return null;const S={[Pg.value]:(0,a.createElement)(f.ColorPalette,{value:m,onChange:k?e=>{d(e),y()}:d,colors:t,disableCustomColors:r,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:l,clearable:h,enableAlpha:v}),[Tg.value]:(0,a.createElement)(f.GradientPicker,{__nextHasNoMargin:!0,value:g,onChange:_?e=>{y(e),d()}:y,gradients:n,disableCustomGradients:o,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:l,clearable:h})},E=e=>(0,a.createElement)("div",{className:"block-editor-color-gradient-control__panel"},S[e]);return(0,a.createElement)(f.BaseControl,{__nextHasNoMarginBottom:!0,className:c()("block-editor-color-gradient-control",s)},(0,a.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,a.createElement)(f.__experimentalVStack,{spacing:1},b&&(0,a.createElement)("legend",null,(0,a.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,a.createElement)(f.BaseControl.VisualLabel,null,p))),_&&k&&(0,a.createElement)(f.TabPanel,{className:"block-editor-color-gradient-control__tabs",tabs:Og,initialTabName:g?Tg.value:!!_&&Pg.value},(e=>E(e.value))),!k&&E(Pg.value),!_&&E(Tg.value))))}function Ng(e){const t={};return t.colors=Kr("color.palette"),t.gradients=Kr("color.gradients"),t.disableCustomColors=!Kr("color.custom"),t.disableCustomGradients=!Kr("color.customGradient"),(0,a.createElement)(Rg,l({},t,e))}var Fg=function(e){return(0,u.every)(Bg,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(Rg,e):(0,a.createElement)(Ng,e)};const Mg=e=>{let{setting:t,children:n,panelId:r,...o}=e;return(0,a.createElement)(f.__experimentalToolsPanelItem,l({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},o,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:r,resetAllFilter:t.resetAllFilter}),n)},Dg=e=>{let{colorValue:t,label:n}=e;return(0,a.createElement)(f.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(f.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,a.createElement)(f.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))},Lg=e=>t=>{let{onToggle:n,isOpen:r}=t;const{colorValue:o,label:i}=e,l={onClick:n,className:c()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r};return(0,a.createElement)(f.Button,l,(0,a.createElement)(Dg,{colorValue:o,label:i}))};function Ug(e){let t,{colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradients:s,settings:c,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:p,...d}=e;return p&&(t={placement:"left-start",offset:36,shift:!0}),(0,a.createElement)(a.Fragment,null,c.map(((e,c)=>{var y;const m={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradientValue:e.gradientValue,gradients:s,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:p,...e},g={colorValue:null!==(y=e.gradientValue)&&void 0!==y?y:e.colorValue,label:e.label};return e&&(0,a.createElement)(Mg,l({key:c,setting:e},d),(0,a.createElement)(f.Dropdown,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:Lg(g),renderContent:()=>(0,a.createElement)(f.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,a.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,a.createElement)(Fg,m)))}))})))}Ap([Cp,Bp]);var jg=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:r,fallbackLinkColor:o,fontSize:i,isLargeText:l,textColor:s,linkColor:c,enableAlphaChecker:u=!1}=e;const p=t||n;if(!p)return null;const d=s||r,y=c||o;if(!d&&!y)return null;const g=[{color:d,description:(0,m.__)("text color")},{color:y,description:(0,m.__)("link color")}],h=Ep(p),b=h.alpha()<1,v=h.brightness(),_={level:"AA",size:l||!1!==l&&i>=24?"large":"small"};let k="",S="";for(const e of g){if(!e.color)continue;const t=Ep(e.color),n=t.isReadable(h,_),r=t.alpha()<1;if(!n){if(b||r)continue;k=v<t.brightness()?(0,m.sprintf)((0,m.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),e.description):(0,m.sprintf)((0,m.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),e.description),S=(0,m.__)("This color combination may be hard for people to read.");break}r&&u&&(k=(0,m.__)("Transparent text may be hard for people to read."),S=(0,m.__)("Transparent text may be hard for people to read."))}return k?((0,qt.speak)(S),(0,a.createElement)("div",{className:"block-editor-contrast-checker"},(0,a.createElement)(f.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},k))):null};function zg(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Vg(e){let{enableAlpha:t=!1,settings:n,clientId:r,enableContrastChecking:o=!0}=e;const[i,s]=(0,a.useState)(),[c,u]=(0,a.useState)(),[p,d]=(0,a.useState)(),f=Tr(r),y=n.filter((e=>null==e?void 0:e.colorValue));(0,a.useEffect)((()=>{var e;if(!o||!y.length)return;if(!f.current)return;u(zg(f.current).color);const t=null===(e=f.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&d(zg(t).color);let n=f.current,r=zg(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=zg(n).backgroundColor;s(r)}));const m=pg();return(0,a.createElement)(go,{__experimentalGroup:"color"},(0,a.createElement)(Ug,l({enableAlpha:t,panelId:r,settings:n,__experimentalIsItemGroup:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},m)),o&&(0,a.createElement)(jg,{backgroundColor:i,textColor:c,enableAlphaChecker:t,linkColor:p}))}const Gg="color",Hg=e=>{const t=(0,o.getBlockSupport)(e,Gg);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Wg=e=>{if("web"!==a.Platform.OS)return!1;const t=(0,o.getBlockSupport)(e,Gg);return null!==t&&"object"==typeof t&&!!t.link},$g=e=>{const t=(0,o.getBlockSupport)(e,Gg);return null!==t&&"object"==typeof t&&!!t.gradients},Kg=e=>{const t=(0,o.getBlockSupport)(e,Gg);return t&&!1!==t.background},qg=e=>{const t=(0,o.getBlockSupport)(e,Gg);return t&&!1!==t.text},Jg=(e,t)=>lo(ao(t,e,void 0)),Yg=e=>({textColor:void 0,style:Jg(["color","text"],e.style)}),Qg=e=>({style:Jg(["elements","link","color","text"],e.style)}),Zg=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function Xg(e,t,n){var r,o,i,l,a,s;if(!Hg(t)||co(t,Gg))return e;const u=$g(t),{backgroundColor:p,textColor:d,gradient:f,style:y}=n,m=e=>!co(t,Gg,e),g=m("text")?cg("color",d):void 0,h=m("gradients")?wg(f):void 0,b=m("background")?cg("background-color",p):void 0,v=m("background")||m("gradients"),_=p||(null==y||null===(r=y.color)||void 0===r?void 0:r.background)||u&&(f||(null==y||null===(o=y.color)||void 0===o?void 0:o.gradient)),k=c()(e.className,g,h,{[b]:!(u&&null!=y&&null!==(i=y.color)&&void 0!==i&&i.gradient||!b),"has-text-color":m("text")&&(d||(null==y||null===(l=y.color)||void 0===l?void 0:l.text)),"has-background":v&&_,"has-link-color":m("link")&&(null==y||null===(a=y.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=k||void 0,e}const eh=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?ag(e,n[1]).color:t};function th(e){var t,n,r,i,l,s,c,u,p;const{name:d,attributes:f}=e,y=Kr("color.palette.custom"),g=Kr("color.palette.theme"),h=Kr("color.palette.default"),b=(0,a.useMemo)((()=>[...y||[],...g||[],...h||[]]),[y,g,h]),v=Kr("color.gradients.custom"),_=Kr("color.gradients.theme"),k=Kr("color.gradients.default"),S=(0,a.useMemo)((()=>[...v||[],..._||[],...k||[]]),[v,_,k]),E=Kr("color.custom"),w=Kr("color.customGradient"),A=Kr("color.background"),C=Kr("color.link"),I=Kr("color.text"),x=E||!g||(null==g?void 0:g.length)>0,B=w||!_||(null==_?void 0:_.length)>0,P=(0,a.useRef)(f);if((0,a.useEffect)((()=>{P.current=f}),[f]),!Hg(d))return null;const T=Wg(d)&&C&&x,O=qg(d)&&I&&x,R=Kg(d)&&A&&x,N=$g(d)&&B;if(!(T||O||R||N))return null;const{style:F,textColor:M,backgroundColor:D,gradient:L}=f;let U;if(N&&L)U=Ag(S,L);else if(N){var j;U=null==F||null===(j=F.color)||void 0===j?void 0:j.gradient}const z=t=>n=>{var r,o;const i=sg(b,n),l=t+"Color",a={...P.current.style,color:{...null===(r=P.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,[t]:null!=i&&i.slug?void 0:n}},s=null!=i&&i.slug?i.slug:void 0,c={style:lo(a),[l]:s};e.setAttributes(c),P.current={...P.current,...c}},V=(0,o.getBlockSupport)(e.name,[Gg,"__experimentalDefaultControls"]),G=!("web"!==a.Platform.OS||L||null!=F&&null!==(t=F.color)&&void 0!==t&&t.gradient||!1===(0,o.getBlockSupport)(e.name,[Gg,"enableContrastChecker"]));return(0,a.createElement)(Vg,{enableContrastChecking:G,clientId:e.clientId,enableAlpha:!0,settings:[...O?[{label:(0,m.__)("Text"),onColorChange:z("text"),colorValue:ag(b,M,null==F||null===(n=F.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==V?void 0:V.text,resetAllFilter:Yg}]:[],...R||N?[{label:(0,m.__)("Background"),onColorChange:R?z("background"):void 0,colorValue:ag(b,D,null==F||null===(r=F.color)||void 0===r?void 0:r.background).color,gradientValue:U,onGradientChange:N?t=>{const n=Ig(S,t);let r;if(n){var o,i,l;const e={...null===(o=P.current)||void 0===o?void 0:o.style,color:{...null===(i=P.current)||void 0===i||null===(l=i.style)||void 0===l?void 0:l.color,gradient:void 0}};r={style:lo(e),gradient:n}}else{var a,s,c;const e={...null===(a=P.current)||void 0===a?void 0:a.style,color:{...null===(s=P.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};r={style:lo(e),gradient:void 0}}e.setAttributes(r),P.current={...P.current,...r}}:void 0,isShownByDefault:null==V?void 0:V.background,resetAllFilter:Zg}]:[],...T?[{label:(0,m.__)("Link"),onColorChange:t=>{var n;const r=sg(b,t),o=null!=r&&r.slug?`var:preset|color|${r.slug}`:t,i=lo(ao(null===(n=P.current)||void 0===n?void 0:n.style,["elements","link","color","text"],o));e.setAttributes({style:i}),P.current={...P.current,style:i}},colorValue:eh(b,null==F||null===(i=F.elements)||void 0===i||null===(l=i.link)||void 0===l||null===(s=l.color)||void 0===s?void 0:s.text),clearable:!(null==F||null===(c=F.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(p=u.color)||void 0===p||!p.text),isShownByDefault:null==V?void 0:V.link,resetAllFilter:Qg}]:[]]})}const nh=(0,p.createHigherOrderComponent)((e=>t=>{var n;const{name:r,attributes:o}=t,{backgroundColor:i,textColor:s}=o,c=Kr("color.palette.custom")||[],u=Kr("color.palette.theme")||[],p=Kr("color.palette.default")||[],d=(0,a.useMemo)((()=>[...c||[],...u||[],...p||[]]),[c,u,p]);if(!Hg(r)||co(r,Gg))return(0,a.createElement)(e,t);const f={};var y,m;s&&!co(r,Gg,"text")&&(f.color=null===(y=ag(d,s))||void 0===y?void 0:y.color);i&&!co(r,Gg,"background")&&(f.backgroundColor=null===(m=ag(d,i))||void 0===m?void 0:m.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...f,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,a.createElement)(e,l({},t,{wrapperProps:g}))})),rh={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,i.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Hg(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),$g(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",Xg),(0,i.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Hg(e)||co(e,Gg))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Xg(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",nh),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){const o=e.name;return so({linkColor:Wg(o),textColor:qg(o),backgroundColor:Kg(o),gradient:$g(o)},rh,e,t,n,r)}));const oh=[{name:(0,m._x)("Regular","font style"),value:"normal"},{name:(0,m._x)("Italic","font style"),value:"italic"}],ih=[{name:(0,m._x)("Thin","font weight"),value:"100"},{name:(0,m._x)("Extra Light","font weight"),value:"200"},{name:(0,m._x)("Light","font weight"),value:"300"},{name:(0,m._x)("Regular","font weight"),value:"400"},{name:(0,m._x)("Medium","font weight"),value:"500"},{name:(0,m._x)("Semi Bold","font weight"),value:"600"},{name:(0,m._x)("Bold","font weight"),value:"700"},{name:(0,m._x)("Extra Bold","font weight"),value:"800"},{name:(0,m._x)("Black","font weight"),value:"900"}],lh=(e,t)=>e?t?(0,m.__)("Appearance"):(0,m.__)("Font style"):(0,m.__)("Font weight");function ah(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:i},...s}=e,c=n||r,u=lh(n,r),p={key:"default",name:(0,m.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},d=(0,a.useMemo)((()=>n&&r?(()=>{const e=[p];return oh.forEach((t=>{let{name:n,value:r}=t;ih.forEach((t=>{let{name:o,value:i}=t;const l="normal"===r?o:(0,m.sprintf)((0,m.__)("%1$s %2$s"),o,n);e.push({key:`${r}-${i}`,name:l,style:{fontStyle:r,fontWeight:i}})}))})),e})():n?(()=>{const e=[p];return oh.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e})():(()=>{const e=[p];return ih.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e})()),[e.options]),y=d.find((e=>e.style.fontStyle===o&&e.style.fontWeight===i))||d[0];return c&&(0,a.createElement)(f.CustomSelectControl,l({},s,{className:"components-font-appearance-control",label:u,describedBy:y?n?r?(0,m.sprintf)((0,m.__)("Currently selected font appearance: %s"),y.name):(0,m.sprintf)((0,m.__)("Currently selected font style: %s"),y.name):(0,m.sprintf)((0,m.__)("Currently selected font weight: %s"),y.name):(0,m.__)("No selected font appearance"),options:d,value:y,onChange:e=>{let{selectedItem:n}=e;return t(n.style)},__nextUnconstrainedWidth:!0}))}const sh=1.5,ch=.1;var uh=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:r=!1,__unstableInputWidth:o="60px",...i}=e;const s=function(e){return void 0!==e&&""!==e}(t),c=s?t:"";r||j()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const u=r?void 0:{marginBottom:24};return(0,a.createElement)("div",{className:"block-editor-line-height-control",style:u},(0,a.createElement)(f.__experimentalNumberControl,l({},i,{__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{var n;const r=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),o=((e,t)=>{if(s)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return sh;default:return e}})(e.value,r);return{...e,value:o}},onChange:n,label:(0,m.__)("Line height"),placeholder:sh,step:ch,value:c,min:0})))};const ph="typography.lineHeight";function dh(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(uh,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};r({style:lo(t)})},size:"__unstable-large"})}function fh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Kr("typography.lineHeight");return!(0,o.hasBlockSupport)(e,ph)||t}const yh="typography.__experimentalFontStyle",mh="typography.__experimentalFontWeight";function gh(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,i=!hh(e),l=!bh(e),s=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,c=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return(0,a.createElement)(ah,{onChange:e=>{o({style:lo({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:l,value:{fontStyle:s,fontWeight:c},size:"__unstable-large"})}function hh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.hasBlockSupport)(e,yh),n=Kr("typography.fontStyle");return!t||!n}function bh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.hasBlockSupport)(e,mh),n=Kr("typography.fontWeight");return!t||!n}function vh(e){const t=hh(e),n=bh(e);return t&&n}function _h(e){let{value:t="",onChange:n,fontFamilies:r,...o}=e;const i=Kr("typography.fontFamilies");if(r||(r=i),(0,u.isEmpty)(r))return null;const s=[{value:"",label:(0,m.__)("Default")},...r.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,a.createElement)(f.SelectControl,l({label:(0,m.__)("Font"),options:s,value:t,onChange:n,labelPosition:"top"},o))}const kh="typography.__experimentalFontFamily";function Sh(e,t,n){if(!(0,o.hasBlockSupport)(t,kh))return e;if(co(t,cb,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const r=new(fy())(e.className);r.add(`has-${(0,u.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const i=r.value;return e.className=i||void 0,e}function Eh(e){var t;let{setAttributes:n,attributes:{fontFamily:r}}=e;const o=Kr("typography.fontFamilies"),i=null===(t=(0,u.find)(o,(e=>{let{slug:t}=e;return r===t})))||void 0===t?void 0:t.fontFamily;return(0,a.createElement)(_h,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:i,onChange:function(e){const t=(0,u.find)(o,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})},size:"__unstable-large",__nextHasNoMarginBottom:!0})}function wh(e){let{name:t}=e;const n=Kr("typography.fontFamilies");return!n||0===n.length||!(0,o.hasBlockSupport)(t,kh)}(0,i.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,o.hasBlockSupport)(e,kh)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Sh),(0,i.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,o.hasBlockSupport)(e,kh))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Sh(r,e,n)},e}));const Ah=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function Ch(e,t){const n=(0,u.find)(e,{size:t});return n||{size:t}}function Ih(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var xh=function(e){const t=Kr("typography.fontSizes"),n=!Kr("typography.customFontSize");return(0,a.createElement)(f.FontSizePicker,l({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Bh="1600px",Ph="768px",Th=1,Oh=.75,Rh="14px";function Nh(e){let{minimumFontSize:t,maximumFontSize:n,fontSize:r,minimumViewPortWidth:o=Ph,maximumViewPortWidth:i=Bh,scaleFactor:l=Th,minimumFontSizeFactor:a=Oh,minimumFontSizeLimit:s=Rh}=e;if(r){const e=Fh(r);if(null==e||!e.unit)return null;const o=Fh(s,{coerceTo:e.unit});if(null!=o&&o.value&&!t&&!n&&(null==e?void 0:e.value)<=(null==o?void 0:o.value))return null;if(n||(n=`${e.value}${e.unit}`),!t){const n=Mh(e.value*a,3);t=null!=o&&o.value&&n<(null==o?void 0:o.value)?`${o.value}${o.unit}`:`${n}${e.unit}`}}const c=Fh(t),u=(null==c?void 0:c.unit)||"rem",p=Fh(n,{coerceTo:u});if(!c||!p)return null;const d=Fh(t,{coerceTo:"rem"}),f=Fh(i,{coerceTo:u}),y=Fh(o,{coerceTo:u});if(!f||!y||!d)return null;const m=Mh(y.value/100,3),g=Mh(m,3)+u,h=Mh(((p.value-c.value)/(f.value-y.value)*100||1)*l,3);return`clamp(${t}, ${`${d.value}${d.unit} + ((1vw - ${g}) * ${h})`}, ${n})`}function Fh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:r,acceptableUnits:o}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=null==o?void 0:o.join("|"),l=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(l);if(!a||a.length<3)return null;let[,s,c]=a,u=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(u*=r,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=r,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Mh(u,3),unit:c}}function Mh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}const Dh="typography.fontSize";function Lh(e,t,n){if(!(0,o.hasBlockSupport)(t,Dh))return e;if(co(t,cb,"fontSize"))return e;const r=new(fy())(e.className);r.add(Ih(n.fontSize));const i=r.value;return e.className=i||void 0,e}function Uh(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:i}=e,l=Kr("typography.fontSizes"),s=Ah(l,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),c=(null==s?void 0:s.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,a.createElement)(xh,{onChange:e=>{const t=Ch(l,e).slug;i({style:lo({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1,size:"__unstable-large",__nextHasNoMarginBottom:!0})}function jh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Kr("typography.fontSizes"),n=!(null==t||!t.length);return!(0,o.hasBlockSupport)(e,Dh)||!n}const zh=(0,p.createHigherOrderComponent)((e=>t=>{var n,r;const i=Kr("typography.fontSizes"),{name:l,attributes:{fontSize:s,style:c},wrapperProps:u}=t;if(!(0,o.hasBlockSupport)(l,Dh)||co(l,cb,"fontSize")||!s||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,a.createElement)(e,t);const p=Ah(i,s,null==c||null===(r=c.typography)||void 0===r?void 0:r.fontSize).size,d={...t,wrapperProps:{...u,style:{fontSize:p,...null==u?void 0:u.style}}};return(0,a.createElement)(e,d)}),"withFontSizeInlineStyles"),Vh={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,i.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,o.hasBlockSupport)(e,Dh)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Lh),(0,i.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,o.hasBlockSupport)(e,Dh))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Lh(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",zh),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,r){const i=e.name;return so({fontSize:(0,o.hasBlockSupport)(i,Dh)},Vh,e,t,n,r)})),(0,i.addFilter)("blocks.registerBlockType","core/font-size/addEditPropsForFluidCustomFontSizes",(function(e){if(!(0,o.hasBlockSupport)(e,Dh)||co(e,cb,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{var n,r,o;const i=t?t(e):{},l=null==i||null===(n=i.style)||void 0===n?void 0:n.fontSize,a=!(null===(r=(0,d.select)(sr).getSettings().__experimentalFeatures)||void 0===r||null===(o=r.typography)||void 0===o||!o.fluid),s=l&&a?Nh({fontSize:l}):null;return null===s?i:{...i,style:{...null==i?void 0:i.style,fontSize:s}}},e}),11);var Gh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7 11.5h10V13H7z"}));var Hh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));var Wh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));const $h=[{name:(0,m.__)("None"),value:"none",icon:Gh},{name:(0,m.__)("Underline"),value:"underline",icon:Hh},{name:(0,m.__)("Strikethrough"),value:"line-through",icon:Wh}];function Kh(e){let{value:t,onChange:n,className:r}=e;return(0,a.createElement)("fieldset",{className:c()("block-editor-text-decoration-control",r)},(0,a.createElement)(f.BaseControl.VisualLabel,{as:"legend"},(0,m.__)("Decoration")),(0,a.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},$h.map((e=>(0,a.createElement)(f.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const qh="typography.__experimentalTextDecoration";function Jh(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(Kh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:lo({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})},size:"__unstable-large"})}function Yh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,o.hasBlockSupport)(e,qh),n=Kr("typography.textDecoration");return t||!n}var Qh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"}));var Zh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"}));var Xh=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const eb=[{name:(0,m.__)("None"),value:"none",icon:Gh},{name:(0,m.__)("Uppercase"),value:"uppercase",icon:Qh},{name:(0,m.__)("Lowercase"),value:"lowercase",icon:Zh},{name:(0,m.__)("Capitalize"),value:"capitalize",icon:Xh}];function tb(e){let{className:t,value:n,onChange:r}=e;return(0,a.createElement)("fieldset",{className:c()("block-editor-text-transform-control",t)},(0,a.createElement)(f.BaseControl.VisualLabel,{as:"legend"},(0,m.__)("Letter case")),(0,a.createElement)("div",{className:"block-editor-text-transform-control__buttons"},eb.map((e=>(0,a.createElement)(f.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===n,onClick:()=>{r(e.value===n?void 0:e.value)}})))))}const nb="typography.__experimentalTextTransform";function rb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(tb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:lo({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})},size:"__unstable-large"})}function ob(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,o.hasBlockSupport)(e,nb),n=Kr("typography.textTransform");return t||!n}function ib(e){let{value:t,onChange:n,__unstableInputWidth:r="60px",...o}=e;const i=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,a.createElement)(f.__experimentalUnitControl,l({},o,{label:(0,m.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:i,onChange:n}))}const lb="typography.__experimentalLetterSpacing";function ab(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(ib,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:lo({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%",size:"__unstable-large"})}function sb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,o.hasBlockSupport)(e,lb),n=Kr("typography.letterSpacing");return t||!n}const cb="typography",ub=[ph,Dh,yh,mh,kh,qh,nb,lb];function pb(e){const{clientId:t}=e,n=wh(e),r=jh(e),i=vh(e),l=fh(e),s=Yh(e),c=ob(e),u=sb(e),p=!hh(e),d=!bh(e),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[vh(e),jh(e),fh(e),wh(e),Yh(e),ob(e),sb(e)];return t.filter(Boolean).length===t.length}(e),g=db(e.name);if(y||!g)return null;const h=(0,o.getBlockSupport)(e.name,[cb,"__experimentalDefaultControls"]),b=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,a.createElement)(go,{__experimentalGroup:"typography"},!n&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,m.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==h?void 0:h.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,a.createElement)(Eh,e)),!r&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:r}=e.attributes;return!!n||!(null==r||null===(t=r.typography)||void 0===t||!t.fontSize)}(e),label:(0,m.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({fontSize:void 0,style:lo({...r,typography:{...null==r?void 0:r.typography,fontSize:void 0}})})}(e),isShownByDefault:null==h?void 0:h.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,a.createElement)(Uh,e)),!i&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:r}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!r}(e),label:lh(p,d),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==h?void 0:h.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,a.createElement)(gh,e)),!l&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,m.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==h?void 0:h.lineHeight,resetAllFilter:b("lineHeight"),panelId:t},(0,a.createElement)(dh,e)),!u&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,m.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==h?void 0:h.letterSpacing,resetAllFilter:b("letterSpacing"),panelId:t},(0,a.createElement)(ab,e)),!s&&(0,a.createElement)(f.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,m.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==h?void 0:h.textDecoration,resetAllFilter:b("textDecoration"),panelId:t},(0,a.createElement)(Jh,e)),!c&&(0,a.createElement)(f.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,m.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:lo({...r,typography:{...null==r?void 0:r.typography,textTransform:void 0}})})}(e),isShownByDefault:null==h?void 0:h.textTransform,resetAllFilter:b("textTransform"),panelId:t},(0,a.createElement)(rb,e)))}const db=e=>ub.some((t=>(0,o.hasBlockSupport)(e,t)));const fb=[...ub,dg,Gg,Po],yb=e=>fb.some((t=>(0,o.hasBlockSupport)(e,t)));function mb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return(0,fi.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const gb={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[Gg],[`${cb}.__experimentalSkipSerialization`]:[cb],[`${Po}.__experimentalSkipSerialization`]:["spacing"]},hb={...gb,[`${Po}`]:["spacing.blockGap"]},bb={gradients:"gradient"};function vb(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:hb;if(!yb(t))return e;let{style:i}=n;return Object.entries(r).forEach((e=>{let[n,r]=e;const l=(0,o.getBlockSupport)(t,n);!0===l&&(i=(0,u.omit)(i,r)),Array.isArray(l)&&l.forEach((e=>{const t=bb[e]||e;i=(0,u.omit)(i,[[...r,t]])}))})),e.style={...mb(i),...e.style},e}const _b=(0,p.createHigherOrderComponent)((e=>t=>{const n=fr();return(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(th,t),(0,a.createElement)(pb,t),(0,a.createElement)(bg,t),(0,a.createElement)(Ro,t)),(0,a.createElement)(e,t))}),"withToolbarControls"),kb=(0,p.createHigherOrderComponent)((e=>t=>{var n,r;const i=`wp-elements-${(0,p.useInstanceId)(e)}`,s=co(t.name,Gg,"link"),u=(0,a.useMemo)((()=>{var e;const n=null===(e=t.attributes.style)||void 0===e?void 0:e.elements,r=[];if(n&&Object.keys(n).length>0){var l;const e={...n,link:{...n.link,color:s||null===(l=n.link)||void 0===l?void 0:l.color}};for(const[t,n]of Object.entries(e)){const e=(0,fi.compileCSS)(n,{selector:`.editor-styles-wrapper .${i} ${o.__EXPERIMENTAL_ELEMENTS[t]}`});e&&r.push(e)}}return r.length>0?r:void 0}),[null===(n=t.attributes.style)||void 0===n?void 0:n.elements]),d=(0,a.useContext)(Wm.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,u&&d&&(0,a.createPortal)((0,a.createElement)("style",{dangerouslySetInnerHTML:{__html:u}}),d),(0,a.createElement)(e,l({},t,{className:null!==(r=t.attributes.style)&&void 0!==r&&r.elements?c()(t.className,i):t.className})))}));(0,i.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return yb(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",vb),(0,i.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!yb(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),vb(r,e,n,gb)},e})),(0,i.addFilter)("editor.BlockEdit","core/style/with-block-controls",_b),(0,i.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",kb);(0,i.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t,n;return n=e,(0,o.hasBlockSupport)(n,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));var Sb=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));var Eb=function(e){let t,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:s}=e;return t="unset"===l?(0,a.createElement)(f.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):l?(0,a.createElement)(f.DuotoneSwatch,{values:l}):(0,a.createElement)(ui,{icon:Sb}),(0,a.createElement)(f.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,m.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,a.createElement)(f.ToolbarButton,{showTooltip:!0,onClick:r,"aria-haspopup":"true","aria-expanded":n,onKeyDown:e=>{n||e.keyCode!==cu.DOWN||(e.preventDefault(),r())},label:(0,m.__)("Apply duotone filter"),icon:t})},renderContent:()=>(0,a.createElement)(f.MenuGroup,{label:(0,m.__)("Duotone")},(0,a.createElement)("div",{className:"block-editor-duotone-control__description"},(0,m.__)("Create a two-tone color effect without losing your original image.")),(0,a.createElement)(f.DuotonePicker,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:s}))})};const wb=[];function Ab(e){let{selector:t,id:n,colors:r}=e;return"unset"===r?(0,a.createElement)(nd,{selector:t}):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(rd,{id:n,colors:r}),(0,a.createElement)(td,{id:n,selector:t}))}function Cb(e){let{presetSetting:t,defaultSetting:n}=e;const r=!Kr(n),o=Kr(`${t}.custom`)||wb,i=Kr(`${t}.theme`)||wb,l=Kr(`${t}.default`)||wb;return(0,a.useMemo)((()=>[...o,...i,...r?wb:l]),[r,o,i,l])}function Ib(e){var t;let{attributes:n,setAttributes:r}=e;const o=null==n?void 0:n.style,i=null==o||null===(t=o.color)||void 0===t?void 0:t.duotone,l=Cb({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),s=Cb({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),c=!Kr("color.custom"),u=!Kr("color.customDuotone")||0===(null==s?void 0:s.length)&&c;return 0===(null==l?void 0:l.length)&&u?null:(0,a.createElement)(br,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Eb,{duotonePalette:l,colorPalette:s,disableCustomDuotone:u,disableCustomColors:c,value:i,onChange:e=>{const t={...o,color:{...null==o?void 0:o.color,duotone:e}};r({style:t})}}))}Ap([Cp]);const xb=(0,p.createHigherOrderComponent)((e=>t=>{const n=(0,o.hasBlockSupport)(t.name,"color.__experimentalDuotone"),r=(0,d.useSelect)((e=>e(sr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&!r&&(0,a.createElement)(Ib,t))}),"withDuotoneControls");const Bb=(0,p.createHigherOrderComponent)((e=>t=>{var n,r,i;const s=(0,o.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(r=n.style)||void 0===r||null===(i=r.color)||void 0===i?void 0:i.duotone;if(!s||!u)return(0,a.createElement)(e,t);const d=`wp-duotone-${(0,p.useInstanceId)(e)}`,f=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(`.editor-styles-wrapper .${d}`,s),y=c()(null==t?void 0:t.className,d),m=(0,a.useContext)(Wm.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,m&&(0,a.createPortal)((0,a.createElement)(Ab,{selector:f,id:d,colors:u}),m),(0,a.createElement)(e,l({},t,{className:y})))}),"withDuotoneStyles");(0,i.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,o.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,i.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",xb),(0,i.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",Bb);const Pb="__experimentalLayout";function Tb(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,d.useSelect)((e=>{var t;const{getSettings:n}=e(sr);return null===(t=n().__experimentalFeatures)||void 0===t?void 0:t.useRootPaddingAwareAlignments}),[]),i=Kr("layout")||{},{attributes:l={},name:a}=n,{layout:s}=l,{default:c}=(0,o.getBlockSupport)(a,Pb)||{},p=null!=s&&s.inherit||null!=s&&s.contentSize||null!=s&&s.wideSize?{...s,type:"constrained"}:s||c||{},f=[];var y,m;null!=i&&null!==(e=i.definitions)&&void 0!==e&&null!==(t=e[(null==p?void 0:p.type)||"default"])&&void 0!==t&&t.className&&f.push(null==i||null===(y=i.definitions)||void 0===y||null===(m=y[(null==p?void 0:p.type)||"default"])||void 0===m?void 0:m.className);return(null!=p&&p.inherit||null!=p&&p.contentSize||"constrained"===(null==p?void 0:p.type))&&r&&f.push("has-global-padding"),null!=p&&p.orientation&&f.push(`is-${(0,u.kebabCase)(p.orientation)}`),null!=p&&p.justifyContent&&f.push(`is-content-justification-${(0,u.kebabCase)(p.justifyContent)}`),null!=p&&p.flexWrap&&"nowrap"===p.flexWrap&&f.push("is-nowrap"),f}function Ob(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const{attributes:r={},name:o}=t,{layout:i={},style:l={}}=r,a=null!=i&&i.inherit||null!=i&&i.contentSize||null!=i&&i.wideSize?{...i,type:"constrained"}:i||{},s=gi((null==a?void 0:a.type)||"default"),c=Kr("layout")||{},u=Kr("spacing.blockGap"),p=null!==u,d=null==s||null===(e=s.getLayoutStyle)||void 0===e?void 0:e.call(s,{blockName:o,selector:n,layout:i,layoutDefinitions:null==c?void 0:c.definitions,style:l,hasBlockGapSupport:p});return d}function Rb(e){let{setAttributes:t,attributes:n,name:r}=e;const{layout:i}=n,l=Kr("layout"),s=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return t().supportsLayout}),[]),c=(0,o.getBlockSupport)(r,Pb,{}),{allowSwitching:u,allowEditing:p=!0,allowInheriting:y=!0,default:g}=c;if(!p)return null;const h=!(!y||!l||null!=i&&i.type&&"default"!==(null==i?void 0:i.type)&&"constrained"!==(null==i?void 0:i.type)&&(null==i||!i.inherit)),b=i||g||{},{inherit:v=!1,type:_="default",contentSize:k=null}=b;if(("default"===_||"constrained"===_)&&!s)return null;const S=gi(_),E=gi("constrained"),w=!b.type&&(k||v),A=!!v||!!k,C=e=>t({layout:e});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(go,null,(0,a.createElement)(f.PanelBody,{title:(0,m.__)("Layout")},h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToggleControl,{className:"block-editor-hooks__toggle-control",label:(0,m.__)("Inner blocks use content width"),checked:"constrained"===(null==S?void 0:S.name)||A,onChange:()=>t({layout:{type:"constrained"===(null==S?void 0:S.name)||A?"default":"constrained"}}),help:"constrained"===(null==S?void 0:S.name)||A?(0,m.__)("Nested blocks use content width with options for full and wide widths."):(0,m.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!v&&u&&(0,a.createElement)(Nb,{type:_,onChange:e=>t({layout:{type:e}})}),S&&"default"!==S.name&&(0,a.createElement)(S.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:c}),E&&w&&(0,a.createElement)(E.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:c}))),!v&&S&&(0,a.createElement)(S.toolBarControls,{layout:b,onChange:C,layoutBlockSupport:c}))}function Nb(e){let{type:t,onChange:n}=e;return(0,a.createElement)(f.ButtonGroup,null,mi.map((e=>{let{name:r,label:o}=e;return(0,a.createElement)(f.Button,{key:r,isPressed:t===r,onClick:()=>n(r)},o)})))}const Fb=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,o.hasBlockSupport)(n,Pb)&&(0,a.createElement)(Rb,l({key:"layout"},t)),(0,a.createElement)(e,l({key:"edit"},t))]}),"withInspectorControls"),Mb=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r,block:i}=t,s=(0,o.hasBlockSupport)(n,Pb),u=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return!!t().disableLayoutStyles})),f=s&&!u,y=(0,p.useInstanceId)(e),m=Kr("layout")||{},g=(0,a.useContext)(Wm.__unstableElementContext),{layout:h}=r,{default:b}=(0,o.getBlockSupport)(n,Pb)||{},v=null!=h&&h.inherit||null!=h&&h.contentSize||null!=h&&h.wideSize?{...h,type:"constrained"}:h||b||{},_=s?Tb(i):null,k=`.${(0,o.getBlockDefaultClassName)(n)}.wp-container-${y}`,S=null!==Kr("spacing.blockGap");let E;if(f){var w;const e=gi((null==v?void 0:v.type)||"default");E=null==e||null===(w=e.getLayoutStyle)||void 0===w?void 0:w.call(e,{blockName:n,selector:k,layout:v,layoutDefinitions:null==m?void 0:m.definitions,style:null==r?void 0:r.style,hasBlockGapSupport:S})}const A=c()(null==t?void 0:t.className,{[`wp-container-${y}`]:f&&!!E},_);return(0,a.createElement)(a.Fragment,null,f&&g&&!!E&&(0,a.createPortal)((0,a.createElement)(ki,{blockName:n,selector:k,css:E,layout:v,style:null==r?void 0:r.style}),g),(0,a.createElement)(e,l({},t,{className:A})))}));function Db(e){let{clientId:t,stopEditingAsBlock:n}=e;const r=(0,d.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e(sr);return n(t)||r(t,!0)}),[t]);return(0,a.useEffect)((()=>{r||n()}),[r]),null}(0,i.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.layout)&&void 0!==t?t:{})||(0,o.hasBlockSupport)(e,Pb)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,i.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Mb),(0,i.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",Fb);const Lb=(0,p.createHigherOrderComponent)((e=>t=>{const{getBlockListSettings:n,getSettings:r}=(0,d.useSelect)(sr),o=(0,a.useRef)(),{templateLock:i,isLockedByParent:s,isEditingAsBlocks:u}=(0,d.useSelect)((e=>{const{__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(sr);return{templateLock:r(t.clientId),isLockedByParent:!!n(t.clientId),isEditingAsBlocks:o()===t.clientId}}),[t.clientId]),{updateSettings:p,updateBlockListSettings:y,__unstableSetTemporarilyEditingAsBlocks:g}=(0,d.useDispatch)(sr),h=!s&&"contentOnly"===i,{__unstableMarkNextChangeAsNotPersistent:b,updateBlockAttributes:v}=(0,d.useDispatch)(sr),_=(0,a.useCallback)((()=>{b(),v(t.clientId,{templateLock:"contentOnly"}),y(t.clientId,{...n(t.clientId),templateLock:"contentOnly"}),p({focusMode:o.current}),g()}),[t.clientId,o,p,y,n,b,v,g]);return h||u?(0,a.createElement)(a.Fragment,null,u&&!h&&(0,a.createElement)(Db,{clientId:t.clientId,stopEditingAsBlock:_}),(0,a.createElement)(br,{group:"other"},(0,a.createElement)(f.ToolbarButton,{onClick:()=>{u&&!h?_():(b(),v(t.clientId,{templateLock:void 0}),y(t.clientId,{...n(t.clientId),templateLock:!1}),o.current=r().focusMode,p({focusMode:!0}),g(t.clientId))}},u&&!h?(0,m.__)("Done"):(0,m.__)("Modify"))),(0,a.createElement)(e,l({},t,{className:c()(t.className,u&&"is-content-locked-editing-as-blocks")}))):(0,a.createElement)(e,t)}),"withToolbarControls");(0,i.addFilter)("editor.BlockEdit","core/style/with-block-controls",Lb);const Ub="metadata";function jb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,o.getBlockSupport)(e,"__experimentalMetadata");return!!(!0===n||null!=n&&n[t])}function zb(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:Sg(e)||void 0,style:mb({border:n})}}function Vb(e){const{colors:t}=pg(),n=zb(e),{borderColor:r}=e;if(r){const e=gg({colors:t,namedColor:r});n.style.borderColor=e.color}return n}function Gb(e){var t,n,r,o,i,l;const{backgroundColor:a,textColor:s,gradient:u,style:p}=e,d=cg("background-color",a),f=cg("color",s),y=wg(u),m=y||(null==p||null===(t=p.color)||void 0===t?void 0:t.gradient);return{className:c()(f,y,{[d]:!m&&!!d,"has-text-color":s||(null==p||null===(n=p.color)||void 0===n?void 0:n.text),"has-background":a||(null==p||null===(r=p.color)||void 0===r?void 0:r.background)||u||(null==p||null===(o=p.color)||void 0===o?void 0:o.gradient),"has-link-color":null==p||null===(i=p.elements)||void 0===i||null===(l=i.link)||void 0===l?void 0:l.color})||void 0,style:mb({color:(null==p?void 0:p.color)||{}})}}(0,i.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.metadata)&&void 0!==n&&n.type||jb(e,"name",!1)&&(e.attributes={...e.attributes,[Ub]:{type:"object"}}),e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/metadata/save-props",(function(e,t,n){return jb(t)&&(e.metadata=n.metadata),e})),(0,i.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||jb(e,"name",!1)&&(e.__experimentalLabel=(e,t)=>{let{context:n}=t;const{metadata:r}=e;if("list-view"===n&&null!=r&&r.name)return r.name}),e}));const Hb={};function Wb(e){const{backgroundColor:t,textColor:n,gradient:r}=e,o=Kr("color.palette.custom")||[],i=Kr("color.palette.theme")||[],l=Kr("color.palette.default")||[],s=Kr("color.gradients")||Hb,c=(0,a.useMemo)((()=>[...o||[],...i||[],...l||[]]),[o,i,l]),u=(0,a.useMemo)((()=>[...(null==s?void 0:s.custom)||[],...(null==s?void 0:s.theme)||[],...(null==s?void 0:s.default)||[]]),[s]),p=Gb(e);if(t){const e=ag(c,t);p.style.backgroundColor=e.color}if(r&&(p.style.background=Ag(u,r)),n){const e=ag(c,n);p.style.color=e.color}return p}function $b(e){const{style:t}=e;return{style:mb({spacing:(null==t?void 0:t.spacing)||{}})}}function Kb(e,t){var n;let r=(null==e||null===(n=e.style)||void 0===n?void 0:n.typography)||{};var o,i;t&&(r={...r,fontSize:Nh({fontSize:null==e||null===(o=e.style)||void 0===o||null===(i=o.typography)||void 0===i?void 0:i.fontSize})});const l=mb({typography:r}),a=null!=e&&e.fontFamily?`has-${(0,u.kebabCase)(e.fontFamily)}-font-family`:"";return{className:c()(a,Ih(null==e?void 0:e.fontSize)),style:l}}function qb(e){const[t,n]=(0,a.useState)(e);return(0,a.useEffect)((()=>{e&&n(e)}),[e]),t}const Jb=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")},Yb=e=>(0,p.createHigherOrderComponent)((t=>n=>(0,a.createElement)(t,l({},n,{colors:e}))),"withCustomColorPalette"),Qb=()=>(0,p.createHigherOrderComponent)((e=>t=>{const n=Kr("color.palette.custom"),r=Kr("color.palette.theme"),o=Kr("color.palette.default"),i=(0,a.useMemo)((()=>[...n||[],...r||[],...o||[]]),[n,r,o]);return(0,a.createElement)(e,l({},t,{colors:i}))}),"withEditorColorPalette");function Zb(e,t){const n=(0,u.reduce)(e,((e,t)=>({...e,..."string"==typeof t?{[t]:(0,u.kebabCase)(t)}:t})),{});return(0,p.compose)([t,e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Ep(t),r=e=>{let{color:t}=e;return n.contrast(t)},o=Math.max(...e.map(r));return e.find((e=>r(e)===o)).color}(t,e)}createSetters(){return(0,u.reduce)(n,((e,t,n)=>{const r=Jb(n),o=`custom${r}`;return e[`set${r}`]=this.createSetColor(n,o),e}),{})}createSetColor(e,t){return n=>{const r=sg(this.props.colors,n);this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:r,colors:o}=e;return(0,u.reduce)(n,((e,n,i)=>{const l=ag(o,r[i],r[`custom${Jb(i)}`]),a=t[i];return(null==a?void 0:a.color)===l.color&&a?e[i]=a:e[i]={...l,class:cg(n,l.slug)},e}),{})}render(){return(0,a.createElement)(e,l({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function Xb(e){return function(){const t=Yb(e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(0,p.createHigherOrderComponent)(Zb(r,t),"withCustomColors")}}function ev(){const e=Qb();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(0,p.createHigherOrderComponent)(Zb(n,e),"withColors")}const tv=[],nv=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")};var rv=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=(0,u.reduce)(t,((e,t)=>(e[t]=`custom${nv(t)}`,e)),{});return(0,p.createHigherOrderComponent)((0,p.compose)([(0,p.createHigherOrderComponent)((e=>t=>{const n=Kr("typography.fontSizes")||tv;return(0,a.createElement)(e,l({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,u.reduce)(r,((e,t,n)=>(e[`set${nv(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const r=(0,u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:o}=e;const i=(e,r)=>!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e]);if(!(0,u.some)(r,i))return null;const l=(0,u.reduce)((0,u.pickBy)(r,i),((e,t,r)=>{const i=n[r],l=Ah(o,i,n[t]);return e[r]={...l,class:Ih(i)},e}),{});return{...t,...l}}render(){return(0,a.createElement)(e,l({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var ov=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var iv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var lv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const av=[{icon:ov,title:(0,m.__)("Align text left"),align:"left"},{icon:iv,title:(0,m.__)("Align text center"),align:"center"},{icon:lv,title:(0,m.__)("Align text right"),align:"right"}],sv={position:"bottom right",isAlternate:!0};var cv=function(e){let{value:t,onChange:n,alignmentControls:r=av,label:o=(0,m.__)("Align"),describedBy:i=(0,m.__)("Change text alignment"),isCollapsed:s=!0,isToolbar:c}=e;function p(e){return()=>n(t===e?void 0:e)}const d=(0,u.find)(r,(e=>e.align===t)),y=c?f.ToolbarGroup:f.ToolbarDropdownMenu,g=c?{isCollapsed:s}:{toggleProps:{describedBy:i},popoverProps:sv};return(0,a.createElement)(y,l({icon:d?d.icon:(0,m.isRTL)()?lv:ov,label:o,controls:r.map((e=>{const{align:n}=e,r=t===n;return{...e,isActive:r,role:s?"menuitemradio":void 0,onClick:p(n)}}))},g))};const uv=e=>(0,a.createElement)(cv,l({},e,{isToolbar:!1})),pv=e=>(0,a.createElement)(cv,l({},e,{isToolbar:!0})),dv=()=>{};var fv={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(sr),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,i]=kd(t,dv),l=(0,a.useMemo)((()=>(e.trim()?Kd(r,o,i,e):(0,u.orderBy)(r,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,i]),s=(0,a.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Au,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[l]);return[s]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:(0,o.createBlock)(t,n,(0,o.createBlocksFromInnerBlocksTemplate)(r))}}},yv=window.wp.apiFetch,mv=n.n(yv);var gv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var hv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var bv={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await mv()({path:(0,nf.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ui,{key:"icon",icon:"page"===e.subtype?gv:hv}),e.title)},getOptionCompletion(e){return(0,a.createElement)("a",{href:e.url},e.title)}};const vv=[];function _v(e){let{completers:t=vv}=e;const{name:n}=dr();return(0,a.useMemo)((()=>{let e=[...t,bv];return(n===(0,o.getDefaultBlockName)()||(0,o.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=[...e,fv]),(0,i.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(u.clone)),e=(0,i.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var kv=function(e){return(0,a.createElement)(f.Autocomplete,l({},e,{completers:_v(e)}))};var Sv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var Ev=function(e){let{isActive:t,label:n=(0,m.__)("Toggle full height"),onToggle:r,isDisabled:o}=e;return(0,a.createElement)(f.ToolbarButton,{isActive:t,icon:Sv,label:n,onClick:()=>r(!t),disabled:o})};const wv=()=>{};var Av=function(e){const{label:t=(0,m.__)("Change matrix alignment"),onChange:n=wv,value:r="center",isDisabled:o}=e,i=(0,a.createElement)(f.__experimentalAlignmentMatrixControl.Icon,{value:r});return(0,a.createElement)(f.Dropdown,{position:"bottom right",popoverProps:{isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:r}=e;return(0,a.createElement)(f.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":r,onKeyDown:e=>{r||e.keyCode!==cu.DOWN||(e.preventDefault(),n())},label:t,icon:i,showTooltip:!0,disabled:o})},renderContent:()=>(0,a.createElement)(f.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:r})})};var Cv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var Iv=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:r}=(0,d.useDispatch)(sr),{clientId:o,parents:i,hasSelection:l}=(0,d.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:r}=e(sr),o=n();return{parents:r(o),clientId:o,hasSelection:!!t().clientId}}),[]),s=t||(0,m.__)("Document");return(0,a.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,m.__)("Block breadcrumb")},(0,a.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,a.createElement)(f.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:r},s),!l&&s,!!o&&(0,a.createElement)(ui,{icon:Cv,className:"block-editor-block-breadcrumb__separator"})),i.map((e=>(0,a.createElement)("li",{key:e},(0,a.createElement)(f.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,a.createElement)(Ff,{clientId:e,maximumLength:35})),(0,a.createElement)(ui,{icon:Cv,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,a.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,a.createElement)(Ff,{clientId:o,maximumLength:35})))};const xv=()=>(0,a.createElement)(f.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,a.createElement)(f.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),Bv=e=>{let{style:t,className:n}=e;return(0,a.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,a.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,a.createElement)(xv,null)))},Pv=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:r,isOpen:o}=e;return(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(f.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,m.__)("Open Colors Selector"),onClick:r,onKeyDown:e=>{o||e.keyCode!==cu.DOWN||(e.preventDefault(),r())},icon:(0,a.createElement)(n,null,(0,a.createElement)(t,null,(0,a.createElement)(Bv,null)))}))}};var Tv=e=>{let{children:t,...n}=e;return j()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,a.createElement)(f.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Pv(n),renderContent:()=>t})};var Ov=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const Rv=$c(f.__experimentalTreeGridRow);function Nv(e){let{isSelected:t,position:n,level:r,rowCount:o,children:i,className:s,path:u,...p}=e;const d=Jc({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:u});return(0,a.createElement)(Rv,l({ref:d,className:c()("block-editor-list-view-leaf",s),level:r,positionInSet:n,setSize:o},p),i)}var Fv=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));function Mv(e){let{onClick:t}=e;return(0,a.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,a.createElement)(ui,{icon:(0,m.isRTL)()?Fv:Cv}))}var Dv=(0,a.forwardRef)((function(e,t){let{className:n,block:{clientId:r},onClick:o,onToggleExpanded:i,tabIndex:l,onFocus:s,onDragStart:u,onDragEnd:p,draggable:d}=e;const y=Rf(r),m=Nf({clientId:r,context:"list-view"}),{isLocked:g}=Ky(r);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.Button,{className:c()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==cu.ENTER&&e.keyCode!==cu.SPACE||o(e)},ref:t,tabIndex:l,onFocus:s,onDragStart:e=>{e.dataTransfer.clearData(),null==u||u(e)},onDragEnd:p,draggable:d,href:`#block-${r}`,"aria-hidden":!0},(0,a.createElement)(Mv,{onClick:i}),(0,a.createElement)(Au,{icon:null==y?void 0:y.icon,showColors:!0}),(0,a.createElement)(f.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,a.createElement)(f.__experimentalTruncate,{ellipsizeMode:"auto"},m)),(null==y?void 0:y.anchor)&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,a.createElement)(f.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},y.anchor)),g&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,a.createElement)(ui,{icon:Jy})))))}));const Lv=(0,a.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:i,position:s,siblingBlockCount:u,level:p,isExpanded:f,selectedClientIds:y,...m}=e;const{clientId:g}=o,{blockMovingClientId:h,selectedBlockInBlockEditor:b}=(0,d.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(sr);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[g]),v=h&&b===g,_=c()("block-editor-list-view-block-contents",{"is-dropping-before":v}),k=y.includes(g)?y:[g];return(0,a.createElement)(Mf,{clientIds:k},(e=>{let{draggable:c,onDragStart:d,onDragEnd:y}=e;return(0,a.createElement)(Dv,l({ref:t,className:_,block:o,onClick:n,onToggleExpanded:r,isSelected:i,position:s,siblingBlockCount:u,level:p,draggable:c,onDragStart:d,onDragEnd:y,isExpanded:f},m))}))}));var Uv=Lv;const jv=(0,a.createContext)({}),zv=()=>(0,a.useContext)(jv);var Vv=(0,a.memo)((function e(t){let{block:n,isDragged:r,isSelected:i,isBranchSelected:l,selectBlock:s,position:u,level:y,rowCount:g,siblingBlockCount:h,showBlockMovers:b,path:v,isExpanded:_,selectedClientIds:k,preventAnnouncement:S}=t;const E=(0,a.useRef)(null),[w,A]=(0,a.useState)(!1),{clientId:C}=n,{isLocked:I,isContentLocked:x}=Ky(C),B=(0,d.useSelect)((e=>!i&&(!!x&&e(sr).hasSelectedInnerBlock(C,!0))),[x,C,i]),P=B||i&&k[0]===C,T=B||i&&k[k.length-1]===C,{toggleBlockHighlight:O}=(0,d.useDispatch)(sr),R=Rf(C),N=(0,d.useSelect)((e=>e(sr).getBlockName(C)),[C]),F=(0,o.hasBlockSupport)(N,"__experimentalToolbar",!0),M=`list-view-block-select-button__${(0,p.useInstanceId)(e)}`,D=((e,t,n)=>(0,m.sprintf)((0,m.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(u,h,y);let L=(0,m.__)("Link");R&&(L=I?(0,m.sprintf)((0,m.__)("%s link (locked)"),R.title):(0,m.sprintf)((0,m.__)("%s link"),R.title));const U=R?(0,m.sprintf)((0,m.__)("Options for %s block"),R.title):(0,m.__)("Options"),{isTreeGridMounted:j,expand:z,collapse:V}=zv(),G=b&&h>0,H=c()("block-editor-list-view-block__mover-cell",{"is-visible":w||i}),W=c()("block-editor-list-view-block__menu-cell",{"is-visible":w||P});(0,a.useEffect)((()=>{!j&&i&&E.current.focus()}),[]);const $=(0,a.useCallback)((()=>{A(!0),O(C,!0)}),[C,A,O]),K=(0,a.useCallback)((()=>{A(!1),O(C,!1)}),[C,A,O]),q=(0,a.useCallback)((e=>{s(e,C),e.preventDefault()}),[C,s]),J=(0,a.useCallback)((e=>{s(void 0,e)}),[s]),Y=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===_?V(C):!1===_&&z(C)}),[C,z,V,_]);let Q;G?Q=2:F||(Q=3);const Z=c()({"is-selected":i||B,"is-first-selected":P,"is-last-selected":T,"is-branch-selected":l,"is-dragging":r,"has-single-cell":!F}),X=k.includes(C)?k:[C];return(0,a.createElement)(Nv,{className:Z,onMouseEnter:$,onMouseLeave:K,onFocus:$,onBlur:K,level:y,position:u,rowCount:g,path:v,id:`list-view-block-${C}`,"data-block":C,isExpanded:x?void 0:_,"aria-selected":!!i||B},(0,a.createElement)(f.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Q,ref:E,"aria-label":L,"aria-selected":!!i||B,"aria-expanded":x?void 0:_,"aria-describedby":M},(e=>{let{ref:t,tabIndex:r,onFocus:o}=e;return(0,a.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,a.createElement)(Uv,{block:n,onClick:q,onToggleExpanded:Y,isSelected:i,position:u,siblingBlockCount:h,level:y,ref:t,tabIndex:r,onFocus:o,isExpanded:_,selectedClientIds:k,preventAnnouncement:S}),(0,a.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:M},D))})),G&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.__experimentalTreeGridCell,{className:H,withoutGridItem:!0},(0,a.createElement)(f.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,a.createElement)($f,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})),(0,a.createElement)(f.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,a.createElement)(Kf,{orientation:"vertical",clientIds:[C],ref:t,tabIndex:n,onFocus:r})})))),F&&(0,a.createElement)(f.__experimentalTreeGridCell,{className:W,"aria-selected":!!i||B},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,a.createElement)(lm,{clientIds:X,icon:Oy,label:U,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:J})})))}));function Gv(e,t,n,r){var o;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(Hv(t,n,r),0):1}const Hv=(e,t,n)=>(r,o)=>{var i;if(null==t?void 0:t.includes(o.clientId))return r;return(null!==(i=e[o.clientId])&&void 0!==i?i:n)&&o.innerBlocks.length>0?r+Gv(o,e,t,n):r+1};function Wv(e){const{blocks:t,selectBlock:n,showBlockMovers:r,selectedClientIds:o,level:i=1,path:l="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:u,isExpanded:p,parentId:f,shouldShowInnerBlocks:y=!0}=e,m=(0,d.useSelect)((e=>!(!f||"contentOnly"!==e(sr).getTemplateLock(f))),[f]),{expandedState:g,draggedClientIds:h}=zv();if(m)return null;const b=t.filter(Boolean),v=b.length;let _=c;return(0,a.createElement)(a.Fragment,null,b.map(((e,t)=>{var c;const{clientId:f,innerBlocks:m}=e;t>0&&(_+=Gv(b[t-1],g,h,p));const{itemInView:k}=u,S=k(_),E=t+1,w=l.length>0?`${l}_${E}`:`${E}`,A=!(null==m||!m.length),C=A&&y?null!==(c=g[f])&&void 0!==c?c:p:void 0,I=!(null==h||!h.includes(f)),x=I||S,B=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(f,o),P=s||B&&A;return(0,a.createElement)(d.AsyncModeProvider,{key:f,value:!B},x&&(0,a.createElement)(Vv,{block:e,selectBlock:n,isSelected:B,isBranchSelected:P,isDragged:I,level:i,position:E,rowCount:v,siblingBlockCount:v,showBlockMovers:r,path:w,isExpanded:C,listPosition:_,selectedClientIds:o}),!x&&(0,a.createElement)("tr",null,(0,a.createElement)("td",{className:"block-editor-list-view-placeholder"})),A&&C&&!I&&(0,a.createElement)(Wv,{parentId:f,blocks:m,selectBlock:n,showBlockMovers:r,level:i+1,path:w,listPosition:_+1,fixedListWindow:u,isBranchSelected:P,selectedClientIds:o,isExpanded:p}))})))}Wv.defaultProps={selectBlock:()=>{}};var $v=(0,a.memo)(Wv);function Kv(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:i}=n||{},[l,s]=(0,a.useMemo)((()=>{if(!t.current)return[];return[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]}),[r,o]),c=s||l,u=(0,a.useCallback)((()=>{if(!l)return 0;const e=c.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,c]),p=(0,a.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),d=(0,a.useMemo)((()=>{if(c&&("top"===i||"bottom"===i||"inside"===i))return{ownerDocument:c.ownerDocument,getBoundingClientRect(){const e=c.getBoundingClientRect(),t=u(),n=e.left+t,r=e.right;let o=0,l=0;"top"===i?(o=e.top,l=e.top):(o=e.bottom,l=e.bottom);const a=r-n,s=l-o;return new window.DOMRect(n,o,a,s)}}}),[c,i,u]);return c?(0,a.createElement)(f.Popover,{animate:!1,anchor:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,a.createElement)("div",{style:p,className:"block-editor-list-view-drop-indicator__line"})):null}function qv(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,d.useDispatch)(sr),{getBlockName:r,getBlockParents:i,getBlockSelectionStart:l,getBlockSelectionEnd:s,getSelectedBlockClientIds:c,hasMultiSelection:u,hasSelectedBlock:p}=(0,d.useSelect)(sr),{getBlockType:f}=(0,d.useSelect)(o.store),y=(0,a.useCallback)((async(o,a,s)=>{if(null==o||!o.shiftKey)return void n(a);o.preventDefault();const d="keydown"===o.type&&(o.keyCode===cu.UP||o.keyCode===cu.DOWN||o.keyCode===cu.HOME||o.keyCode===cu.END);if(!d&&!p()&&!u())return void n(a,null);const y=c(),g=[...i(a),a];d&&!y.some((e=>g.includes(e)))&&await e();let h=l(),b=a;d&&(p()||u()||(h=a),s&&(b=s));const v=i(h),_=i(b),{start:k,end:S}=function(e,t,n,r){const o=[...n,e],i=[...r,t],l=Math.min(o.length,i.length)-1;return{start:o[l],end:i[l]}}(h,b,v,_);await t(k,S,null);const E=c();if((o.keyCode===cu.HOME||o.keyCode===cu.END)&&E.length>1)return;const w=y.filter((e=>!E.includes(e)));let A;if(1===w.length){var C;const e=null===(C=f(r(w[0])))||void 0===C?void 0:C.title;e&&(A=(0,m.sprintf)((0,m.__)("%s deselected."),e))}else w.length>1&&(A=(0,m.sprintf)((0,m.__)("%s blocks deselected."),w.length));A&&(0,qt.speak)(A)}),[e,r,f,i,l,s,c,u,p,t,n]);return{updateBlockSelection:y}}function Jv(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const Yv=["top","bottom"];function Qv(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,d.useSelect)(sr),[i,l]=(0,a.useState)(),{rootClientId:s,blockIndex:c}=i||{},u=Om(s,c),f=r(),y=(0,p.useThrottle)((0,a.useCallback)(((r,i)=>{const a={x:r.clientX,y:r.clientY},s=!(null==f||!f.length),c=function(e,t){let n,r,o,i;for(const l of e){if(l.isDraggedBlock)continue;const a=l.element.getBoundingClientRect(),[s,c]=Nm(t,a,Yv),u=Jv(t,a);if(void 0===o||s<o||u){o=s;const t=e.indexOf(l),p=e[t-1];if("top"===c&&p&&p.rootClientId===l.rootClientId&&!p.isDraggedBlock?(r=p,n="bottom",i=p.element.getBoundingClientRect()):(r=l,n=c,i=a),u)break}}if(!r)return;const l="bottom"===n;if(l&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,i)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const a=l?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+a,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map((r=>{const i=r.dataset.block,l=e(i);return{clientId:i,rootClientId:l,blockIndex:t(i),element:r,isDraggedBlock:!!s&&f.includes(i),innerBlockCount:n(i),canInsertDraggedBlocksAsSibling:!s||o(f,l),canInsertDraggedBlocksAsChild:!s||o(f,i)}})),a);c&&l(c)}),[f]),200);return{ref:(0,p.__experimentalUseDropZone)({onDrop:u,onDragOver(e){y(e,e.currentTarget)},onDragEnd(){y.cancel(),l(null)}}),target:i}}const Zv=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var Xv=(0,a.forwardRef)((function(e,t){let{id:n,blocks:r,showBlockMovers:o=!1,isExpanded:i=!1}=e;const{clientIdsTree:l,draggedClientIds:s,selectedClientIds:c}=function(e){return(0,d.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(sr);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(r),{visibleBlockCount:u,shouldShowInnerBlocks:y}=(0,d.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:r}=e(sr),o=(null==s?void 0:s.length)>0?n(s).length+1:0;return{visibleBlockCount:t()-o,shouldShowInnerBlocks:"zoom-out"!==r()}}),[s]),{updateBlockSelection:g}=qv(),[h,b]=(0,a.useReducer)(Zv,{}),{ref:v,target:_}=Qv(),k=(0,a.useRef)(),S=(0,p.useMergeRefs)([k,v,t]),E=(0,a.useRef)(!1),{setSelectedTreeId:w}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,a.useState)(null),{selectedBlockParentClientIds:i}=(0,d.useSelect)((e=>{const{getBlockParents:n}=e(sr);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),l=Array.isArray(i)&&i.length?i:null;return(0,a.useEffect)((()=>{r!==t&&l&&n({type:"expand",clientIds:i})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:c[0],setExpandedState:b}),A=(0,a.useCallback)(((e,t)=>{g(e,t),w(t)}),[w,g]);(0,a.useEffect)((()=>{E.current=!0}),[]);const[C]=(0,p.__experimentalUseFixedWindowList)(k,36,u,{useWindowing:!0,windowOverscan:40}),I=(0,a.useCallback)((e=>{e&&b({type:"expand",clientIds:[e]})}),[b]),x=(0,a.useCallback)((e=>{e&&b({type:"collapse",clientIds:[e]})}),[b]),B=(0,a.useCallback)((e=>{var t;I(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[I]),P=(0,a.useCallback)((e=>{var t;x(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[x]),T=(0,a.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&g(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[g]),O=(0,a.useMemo)((()=>({isTreeGridMounted:E.current,draggedClientIds:s,expandedState:h,expand:I,collapse:x})),[E.current,s,h,I,x]);return(0,a.createElement)(d.AsyncModeProvider,{value:!0},(0,a.createElement)(Kv,{listViewRef:k,blockDropTarget:_}),(0,a.createElement)(f.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,m.__)("Block navigation structure"),ref:S,onCollapseRow:P,onExpandRow:B,onFocusRow:T,applicationAriaLabel:(0,m.__)("Block navigation structure")},(0,a.createElement)(jv.Provider,{value:O},(0,a.createElement)($v,{blocks:l,selectBlock:A,showBlockMovers:o,fixedListWindow:C,selectedClientIds:c,isExpanded:i,shouldShowInnerBlocks:y}))))}));function e_(e){let{isEnabled:t,onToggle:n,isOpen:r,innerRef:o,...i}=e;return(0,a.createElement)(f.Button,l({},i,{ref:o,icon:Ov,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,m.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var t_=(0,a.forwardRef)((function(e,t){let{isDisabled:n,...r}=e;j()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,d.useSelect)((e=>!!e(sr).getBlockCount()),[])&&!n;return(0,a.createElement)(f.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:i}=e;return(0,a.createElement)(e_,l({},r,{innerRef:t,isOpen:n,onToggle:i,isEnabled:o}))},renderContent:()=>(0,a.createElement)("div",{className:"block-editor-block-navigation__container"},(0,a.createElement)("p",{className:"block-editor-block-navigation__label"},(0,m.__)("List view")),(0,a.createElement)(Xv,null))})}));function n_(e){var t;let{genericPreviewBlock:n,style:r,className:i,activeStyle:l}=e;const s=null===(t=(0,o.getBlockType)(n.name))||void 0===t?void 0:t.example,c=yy(i,l,r),u=(0,a.useMemo)((()=>({...n,title:r.label||r.name,description:r.description,initialAttributes:{...n.attributes,className:c+" block-editor-block-styles__block-preview-container"},example:s})),[n,c]);return(0,a.createElement)(ud,{item:u,isStylePreview:!0})}function r_(e){let{children:t,scope:n,...r}=e;return(0,a.createElement)(f.Fill,{name:`BlockStylesPreviewPanel/${n}`},(0,a.createElement)("div",r,t))}const o_=()=>{};function i_(e){let{clientId:t,onSwitch:n=o_,onHoverClassName:r=o_,scope:o}=e;const{onSelect:i,stylesToRender:l,activeStyle:s,genericPreviewBlock:d,className:y}=gy({clientId:t,onSwitch:n}),[m,g]=(0,a.useState)(null),[h,b]=(0,a.useState)(0),v=(0,p.useViewportMatch)("medium","<");if((0,a.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;b(t+16)}),[m]),!l||0===l.length)return null;const _=(0,u.debounce)(g,250),k=e=>{var t;m!==e?(_(e),r(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):_.cancel()};return(0,a.createElement)("div",{className:"block-editor-block-styles"},(0,a.createElement)("div",{className:"block-editor-block-styles__variants"},l.map((e=>{const t=e.label||e.name;return(0,a.createElement)(f.Button,{className:c()("block-editor-block-styles__item",{"is-active":s.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>k(e),onFocus:()=>k(e),onMouseLeave:()=>k(null),onBlur:()=>k(null),onClick:()=>(e=>{i(e),r(null),g(null),_.cancel()})(e),"aria-current":s.name===e.name},(0,a.createElement)(f.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),m&&!v&&(0,a.createElement)(r_,{scope:o,className:"block-editor-block-styles__preview-panel",style:{top:h},onMouseLeave:()=>k(null)},(0,a.createElement)(n_,{activeStyle:s,className:y,genericPreviewBlock:d,style:m})))}i_.Slot=function(e){let{scope:t}=e;return(0,a.createElement)(f.Slot,{name:`BlockStylesPreviewPanel/${t}`})};var l_=i_;var a_=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));var s_=function(e){let{icon:t=a_,label:n=(0,m.__)("Choose variation"),instructions:r=(0,m.__)("Select a variation to start with."),variations:o,onSelect:i,allowSkip:l}=e;const s=c()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,a.createElement)(f.Placeholder,{icon:t,label:n,instructions:r,className:s},(0,a.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,m.__)("Block variations")},o.map((e=>(0,a.createElement)("li",{key:e.name},(0,a.createElement)(f.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>i(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,a.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),l&&(0,a.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,a.createElement)(f.Button,{variant:"link",onClick:()=>i()},(0,m.__)("Skip"))))};var c_=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));const u_="carousel",p_="grid",d_=e=>{let{onBlockPatternSelect:t}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,a.createElement)(f.Button,{variant:"primary",onClick:t},(0,m.__)("Choose")))},f_=e=>{let{handlePrevious:t,handleNext:n,activeSlide:r,totalSlides:o}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,a.createElement)(f.Button,{icon:Lf,label:(0,m.__)("Previous pattern"),onClick:t,disabled:0===r}),(0,a.createElement)(f.Button,{icon:Df,label:(0,m.__)("Next pattern"),onClick:n,disabled:r===o-1}))};var y_=e=>{let{viewMode:t,setViewMode:n,handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l,onBlockPatternSelect:s}=e;const c=t===u_,u=(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,a.createElement)(f.Button,{icon:xi,label:(0,m.__)("Carousel view"),onClick:()=>n(u_),isPressed:c}),(0,a.createElement)(f.Button,{icon:c_,label:(0,m.__)("Grid view"),onClick:()=>n(p_),isPressed:t===p_}));return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},c&&(0,a.createElement)(f_,{handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l}),u,c&&(0,a.createElement)(d_,{onBlockPatternSelect:s}))};var m_=function(e,t,n){return(0,d.useSelect)((r=>{const{getBlockRootClientId:o,__experimentalGetPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:l}=r(sr),a=o(e);return n?l(a).filter(n):i(t,a)}),[e,t,n])};const g_=e=>{let{viewMode:t,activeSlide:n,patterns:r,onBlockPatternSelect:o}=e;const i=(0,f.__unstableUseCompositeState)(),s="block-editor-block-pattern-setup__container";if(t===u_){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,a.createElement)("div",{className:s},(0,a.createElement)("ul",{className:"carousel-container"},r.map(((t,n)=>(0,a.createElement)(b_,{className:e.get(n)||"",key:t.name,pattern:t}))))))}return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,a.createElement)(f.__unstableComposite,l({},i,{role:"listbox",className:s,"aria-label":(0,m.__)("Patterns list")}),r.map((e=>(0,a.createElement)(h_,{key:e.name,pattern:e,onSelect:o,composite:i})))))};function h_(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-pattern-setup-list",{blocks:i,description:s,viewportWidth:c=700}=t,u=(0,p.useInstanceId)(h_,`${o}__item-description`);return(0,a.createElement)("div",{className:`${o}__list-item`,"aria-label":t.title,"aria-describedby":t.description?u:void 0},(0,a.createElement)(f.__unstableCompositeItem,l({role:"option",as:"div"},r,{className:`${o}__item`,onClick:()=>n(i)}),(0,a.createElement)(sd,{blocks:i,viewportWidth:c})),!!s&&(0,a.createElement)(f.VisuallyHidden,{id:u},s))}function b_(e){let{className:t,pattern:n,minHeight:r}=e;const{blocks:o,title:i,description:l}=n,s=(0,p.useInstanceId)(b_,"block-editor-block-pattern-setup-list__item-description");return(0,a.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":l?s:void 0},(0,a.createElement)(sd,{blocks:o,__experimentalMinHeight:r}),!!l&&(0,a.createElement)(f.VisuallyHidden,{id:s},l))}var v_=e=>{let{clientId:t,blockName:n,filterPatternsFn:r,onBlockPatternSelect:i}=e;const[l,s]=(0,a.useState)(u_),[c,u]=(0,a.useState)(0),{replaceBlock:p}=(0,d.useDispatch)(sr),f=m_(t,n,r);if(null==f||!f.length)return null;const y=i||(e=>{const n=e.map((e=>(0,o.cloneBlock)(e)));p(t,n)});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${l}`},(0,a.createElement)(g_,{viewMode:l,activeSlide:c,patterns:f,onBlockPatternSelect:y}),(0,a.createElement)(y_,{viewMode:l,setViewMode:s,activeSlide:c,totalSlides:f.length,handleNext:()=>{u((e=>e+1))},handlePrevious:()=>{u((e=>e-1))},onBlockPatternSelect:()=>{y(f[c].blocks)}})))};function __(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;return(0,a.createElement)("fieldset",{className:t},(0,a.createElement)(f.VisuallyHidden,{as:"legend"},(0,m.__)("Transform to variation")),o.map((e=>(0,a.createElement)(f.Button,{key:e.name,icon:(0,a.createElement)(Au,{icon:e.icon,showColors:!0}),isPressed:r===e.name,label:r===e.name?e.title:(0,m.sprintf)((0,m.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function k_(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;const i=o.map((e=>{let{name:t,title:n,description:r}=e;return{value:t,label:n,info:r}}));return(0,a.createElement)(f.DropdownMenu,{className:t,label:(0,m.__)("Transform to variation"),text:(0,m.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:jf,toggleProps:{iconPosition:"right"}},(()=>(0,a.createElement)("div",{className:`${t}__container`},(0,a.createElement)(f.MenuGroup,null,(0,a.createElement)(f.MenuItemsChoice,{choices:i,value:r,onSelect:n})))))}var S_=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,d.useDispatch)(sr),{activeBlockVariation:r,variations:i}=(0,d.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:r}=e(o.store),{getBlockName:i,getBlockAttributes:l}=e(sr),a=t&&i(t);return{activeBlockVariation:n(a,l(t)),variations:a&&r(a,"transform")}}),[t]),l=null==r?void 0:r.name,s=(0,a.useMemo)((()=>{const e=new Set;return!!i&&(i.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===i.length)}),[i]);if(null==i||!i.length)return null;const c=s?__:k_;return(0,a.createElement)(c,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...i.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:l,variations:i})},E_=(0,p.createHigherOrderComponent)((e=>t=>{const n=Kr("color.palette"),r=!Kr("color.custom"),o=void 0===t.colors?n:t.colors,i=void 0===t.disableCustomColors?r:t.disableCustomColors,s=!(0,u.isEmpty)(o)||!i;return(0,a.createElement)(e,l({},t,{colors:o,disableCustomColors:i,hasColorsToChoose:s}))}),"withColorContext"),w_=E_(f.ColorPalette);function A_(e){let{onChange:t,value:n,...r}=e;return(0,a.createElement)(Fg,l({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var C_=window.wp.date;const I_=new Date(2022,0,25);function x_(e){let{format:t,defaultFormat:n,onChange:r}=e;return(0,a.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,a.createElement)(f.VisuallyHidden,{as:"legend"},(0,m.__)("Date format")),(0,a.createElement)(f.ToggleControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Default format"),(0,a.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,C_.dateI18n)(n,I_))),checked:!t,onChange:e=>r(e?null:n)}),t&&(0,a.createElement)(B_,{format:t,onChange:r}))}function B_(e){var t;let{format:n,onChange:r}=e;const o=[...new Set(["Y-m-d",(0,m._x)("n/j/Y","short date format"),(0,m._x)("n/j/Y g:i A","short date format with time"),(0,m._x)("M j, Y","medium date format"),(0,m._x)("M j, Y g:i A","medium date format with time"),(0,m._x)("F j, Y","long date format"),(0,m._x)("M j","short date format without the year")])],i=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,C_.dateI18n)(e,I_),format:e}))),l={key:"custom",name:(0,m.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,m.__)("Enter your own date format")},[s,c]=(0,a.useState)((()=>!!n&&!o.includes(n)));return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.BaseControl,{className:"block-editor-date-format-picker__custom-format-select-control"},(0,a.createElement)(f.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,m.__)("Choose a format"),options:[...i,l],value:s?l:null!==(t=i.find((e=>e.format===n)))&&void 0!==t?t:l,onChange:e=>{let{selectedItem:t}=e;t===l?c(!0):(c(!1),r(t.format))}})),s&&(0,a.createElement)(f.TextControl,{label:(0,m.__)("Custom format"),hideLabelFromVision:!0,help:(0,a.createInterpolateElement)((0,m.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,a.createElement)(f.ExternalLink,{href:(0,m.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>r(e)}))}const P_=["colors","disableCustomColors","gradients","disableCustomGradients"],T_=e=>{let{className:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,children:l,settings:s,title:y,showTitle:m=!0,__experimentalHasMultipleOrigins:g,__experimentalIsRenderedInSidebar:h,enableAlpha:b}=e;const v=(0,p.useInstanceId)(T_),{batch:_}=(0,d.useRegistry)();return(0,u.isEmpty)(n)&&(0,u.isEmpty)(r)&&o&&i&&(0,u.every)(s,(e=>(0,u.isEmpty)(e.colors)&&(0,u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?null:(0,a.createElement)(f.__experimentalToolsPanel,{className:c()("block-editor-panel-color-gradient-settings",t),label:m?y:void 0,resetAll:()=>{_((()=>{s.forEach((e=>{let{colorValue:t,gradientValue:n,onColorChange:r,onGradientChange:o}=e;t?r():n&&o()}))}))},panelId:v,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,a.createElement)(Ug,{settings:s,panelId:v,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalHasMultipleOrigins:g,__experimentalIsRenderedInSidebar:h,enableAlpha:b}),!!l&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.__experimentalSpacer,{marginY:4})," ",l))},O_=e=>{const t=ug();return t.colors=Kr("color.palette"),t.gradients=Kr("color.gradients"),(0,a.createElement)(T_,l({},t,e))},R_=e=>{const t=pg();return(0,a.createElement)(T_,l({},t,e))};var N_=e=>(0,u.every)(P_,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(T_,e):e.__experimentalHasMultipleOrigins?(0,a.createElement)(R_,e):(0,a.createElement)(O_,e),F_=function(e,t){return F_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},F_(e,t)};var M_=function(){return M_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},M_.apply(this,arguments)};Object.create;Object.create;var D_=n(7970),L_=n.n(D_);function U_(e,t,n,r,o,i){void 0===i&&(i=0);var l=Y_(e,t,i),a=l.width,s=l.height,c=Math.min(a,n),u=Math.min(s,r);return c>u*o?{width:u*o,height:u}:{width:c,height:c/o}}function j_(e,t,n,r,o){void 0===o&&(o=0);var i=Y_(t.width,t.height,o),l=i.width,a=i.height;return{x:z_(e.x,l,n.width,r),y:z_(e.y,a,n.height,r)}}function z_(e,t,n,r){var o=t*r/2-n/2;return Q_(e,-o,o)}function V_(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function G_(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function H_(e,t,n,r,o,i,l){void 0===i&&(i=0),void 0===l&&(l=!0);var a=l?W_:$_,s=Y_(t.width,t.height,i),c=Y_(t.naturalWidth,t.naturalHeight,i),u={x:a(100,((s.width-n.width/o)/2-e.x/o)/s.width*100),y:a(100,((s.height-n.height/o)/2-e.y/o)/s.height*100),width:a(100,n.width/s.width*100/o),height:a(100,n.height/s.height*100/o)},p=Math.round(a(c.width,u.width*c.width/100)),d=Math.round(a(c.height,u.height*c.height/100)),f=c.width>=c.height*r?{width:Math.round(d*r),height:d}:{width:p,height:Math.round(p/r)};return{croppedAreaPercentages:u,croppedAreaPixels:M_(M_({},f),{x:Math.round(a(c.width-f.width,u.x*c.width/100)),y:Math.round(a(c.height-f.height,u.y*c.height/100))})}}function W_(e,t){return Math.min(e,Math.max(0,t))}function $_(e,t){return t}function K_(e,t,n,r,o,i){var l=Y_(t.width,t.height,n),a=Q_(r.width/l.width*(100/e.width),o,i);return{crop:{x:a*l.width/2-r.width/2-l.width*a*(e.x/100),y:a*l.height/2-r.height/2-l.height*a*(e.y/100)},zoom:a}}function q_(e,t,n,r,o,i){void 0===n&&(n=0);var l=Y_(t.naturalWidth,t.naturalHeight,n),a=Q_(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),s=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((l.width-e.width)/2-e.x)*s,y:((l.height-e.height)/2-e.y)*s},zoom:a}}function J_(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Y_(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function Q_(e,t,n){return Math.min(Math.max(e,t),n)}function Z_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var X_=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=pl().createRef(),n.videoRef=pl().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=K_(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=q_(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,r,o,i,l,a=n.imageRef.current||n.videoRef.current;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef.current)||void 0===o?void 0:o.videoHeight)||0,p=c/u,d=void 0;if(a.offsetWidth<c||a.offsetHeight<u)switch(n.props.objectFit){default:case"contain":d=s>p?{width:n.containerRect.height*p,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/p};break;case"horizontal-cover":d={width:n.containerRect.width,height:n.containerRect.width/p};break;case"vertical-cover":d={width:n.containerRect.height*p,height:n.containerRect.height};break;case"auto-cover":d=c>u?{width:n.containerRect.width,height:n.containerRect.width/p}:{width:n.containerRect.height*p,height:n.containerRect.height}}else d={width:a.offsetWidth,height:a.offsetHeight};n.mediaSize=M_(M_({},d),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var f=n.props.cropSize?n.props.cropSize:U_(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===f.height&&(null===(l=n.state.cropSize)||void 0===l?void 0:l.width)===f.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(f),n.setState({cropSize:f},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(f),f}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=M_({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},l=n.props.restrictPosition?j_(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(l)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),o=L_()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,l=o.zoom;return{x:(t+i.x)/l,y:(r+i.y)/l}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var l=Q_(e,n.props.minZoom,n.props.maxZoom);if(i){var a=n.getPointOnContainer(t),s=n.getPointOnMedia(a),c={x:s.x*l-a.x,y:s.y*l-a.y},u=n.props.restrictPosition?j_(c,n.mediaSize,n.state.cropSize,l,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(l)}},n.getCropData=function(){return n.state.cropSize?H_(n.props.restrictPosition?j_(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?j_(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}F_(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  overflow: hidden;\n  user-select: none;\n  touch-action: none;\n  cursor: move;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n  max-width: 100%;\n  max-height: 100%;\n  margin: auto;\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n  width: 100%;\n  height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n  width: auto;\n  height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  transform: translate(-50%, -50%);\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  box-sizing: border-box;\n  box-shadow: 0 0 0 9999em;\n  color: rgba(0, 0, 0, 0.5);\n  overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n  border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 0;\n  bottom: 0;\n  left: 33.33%;\n  right: 33.33%;\n  border-top: 0;\n  border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 33.33%;\n  bottom: 33.33%;\n  left: 0;\n  right: 0;\n  border-left: 0;\n  border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,l,a,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(l=this.props.crop)||void 0===l?void 0:l.x)&&(null===(a=e.crop)||void 0===a?void 0:a.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=V_(n,r),this.lastPinchRotation=G_(n,r),this.onDragStart(J_(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=J_(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=V_(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var l=G_(r,o),a=n.props.rotation+(l-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=l}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,r=t.video,o=t.mediaProps,i=t.transform,l=t.crop,a=l.x,s=l.y,c=t.rotation,u=t.zoom,p=t.cropShape,d=t.showGrid,f=t.style,y=f.containerStyle,m=f.cropAreaStyle,g=f.mediaStyle,h=t.classes,b=h.containerClassName,v=h.cropAreaClassName,_=h.mediaClassName,k=t.objectFit;return pl().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:y,className:Z_("reactEasyCrop_Container",b)},n?pl().createElement("img",M_({alt:"",className:Z_("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical","auto-cover"===k&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),_)},o,{src:n,ref:this.imageRef,style:M_(M_({},g),{transform:i||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):r&&pl().createElement("video",M_({autoPlay:!0,loop:!0,muted:!0,className:Z_("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical","auto-cover"===k&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),_)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:M_(M_({},g),{transform:i||"translate(".concat(a,"px, ").concat(s,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map((function(e){return pl().createElement("source",M_({key:e.src},e))}))),this.state.cropSize&&pl().createElement("div",{style:M_(M_({},m),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Z_("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",v)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(pl().Component);const ek={position:"bottom right",isAlternate:!0};function tk(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:r}=e;const[o,l]=(0,a.useState)(),[s,c]=(0,a.useState)(),[u,p]=(0,a.useState)({x:0,y:0}),[d,f]=(0,a.useState)(),[y,m]=(0,a.useState)(),[g,h]=(0,a.useState)(),[b,v]=(0,a.useState)(),_=(0,a.useCallback)((()=>{p({x:0,y:0}),f(100),m(0),h(n/r),v(n/r)}),[n,r,p,f,m,h,v]),k=(0,a.useCallback)((()=>{const e=(y+90)%360;let o=n/r;if(y%180==90&&(o=r/n),0===e)return l(),m(e),h(n/r),void p({x:-u.y*o,y:u.x*o});const a=new window.Image;a.src=t,a.onload=function(t){const n=document.createElement("canvas");let r=0,i=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(r=n.width),270!==e&&180!==e||(i=n.height);const a=n.getContext("2d");a.translate(r,i),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),n.toBlob((t=>{l(URL.createObjectURL(t)),m(e),h(n.width/n.height),p({x:-u.y*o,y:u.x*o})}))};const s=(0,i.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof s&&(a.crossOrigin=s)}),[y,n,r,l,m,h,p]);return(0,a.useMemo)((()=>({editedUrl:o,setEditedUrl:l,crop:s,setCrop:c,position:u,setPosition:p,zoom:d,setZoom:f,rotation:y,setRotation:m,rotateClockwise:k,aspect:g,setAspect:h,defaultAspect:b,initializeTransformValues:_})),[o,l,s,c,u,p,d,f,y,m,k,g,h,b,_])}(e),{initializeTransformValues:r}=n;return(0,a.useEffect)((()=>{t&&r()}),[t,r]),n}const nk=(0,a.createContext)({}),rk=()=>(0,a.useContext)(nk);function ok(e){let{id:t,url:n,naturalWidth:r,naturalHeight:o,isEditing:i,onFinishEditing:l,onSaveImage:s,children:c}=e;const u=tk({url:n,naturalWidth:r,naturalHeight:o},i),p=function(e){let{crop:t,rotation:n,height:r,width:o,aspect:i,url:l,id:s,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:p}=(0,d.useDispatch)(Cd.store),[f,y]=(0,a.useState)(!1),g=(0,a.useCallback)((()=>{y(!1),u()}),[y,u]),h=(0,a.useCallback)((()=>{y(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=l,mv()({path:`/wp/v2/media/${s}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:r&&o?o/i:void 0})})).catch((e=>{p((0,m.sprintf)((0,m.__)("Could not edit image. %s"),(0,Hi.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{y(!1),u()}))}),[y,t,n,r,o,i,l,c,p,y,u]);return(0,a.useMemo)((()=>({isInProgress:f,apply:h,cancel:g})),[f,h,g])}({id:t,url:n,onSaveImage:s,onFinishEditing:l,...u}),f=(0,a.useMemo)((()=>({...u,...p})),[u,p]);return(0,a.createElement)(nk.Provider,{value:f},c)}function ik(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l,borderProps:s}=e;const{isInProgress:u,editedUrl:p,position:d,zoom:y,aspect:m,setPosition:g,setCrop:h,setZoom:b,rotation:v}=rk();let _=r||o*i/l;return v%180==90&&(_=o*l/i),(0,a.createElement)("div",{className:c()("wp-block-image__crop-area",null==s?void 0:s.className,{"is-applying":u}),style:{...null==s?void 0:s.style,width:n||o,height:_}},(0,a.createElement)(X_,{image:p||t,disabled:u,minZoom:1,maxZoom:3,crop:d,zoom:y/100,aspect:m,onCropChange:g,onCropComplete:e=>{h(e)},onZoomChange:e=>{b(100*e)}}),u&&(0,a.createElement)(f.Spinner,null))}var lk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));function ak(){const{isInProgress:e,zoom:t,setZoom:n}=rk();return(0,a.createElement)(f.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:ek,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,a.createElement)(f.ToolbarButton,{icon:lk,label:(0,m.__)("Zoom"),onClick:r,"aria-expanded":n,disabled:e})},renderContent:()=>(0,a.createElement)(f.RangeControl,{label:(0,m.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var sk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function ck(e){let{aspectRatios:t,isDisabled:n,label:r,onClick:o,value:i}=e;return(0,a.createElement)(f.MenuGroup,{label:r},t.map((e=>{let{title:t,aspect:r}=e;return(0,a.createElement)(f.MenuItem,{key:r,disabled:n,onClick:()=>{o(r)},role:"menuitemradio",isSelected:r===i,icon:r===i?py:void 0},t)})))}function uk(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:r,setAspect:o,defaultAspect:i}=rk();return(0,a.createElement)(f.DropdownMenu,{icon:sk,label:(0,m.__)("Aspect Ratio"),popoverProps:ek,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ck,{isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,m.__)("Original"),aspect:i},{title:(0,m.__)("Square"),aspect:1}]}),(0,a.createElement)(ck,{label:(0,m.__)("Landscape"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,m.__)("16:10"),aspect:1.6},{title:(0,m.__)("16:9"),aspect:16/9},{title:(0,m.__)("4:3"),aspect:4/3},{title:(0,m.__)("3:2"),aspect:1.5}]}),(0,a.createElement)(ck,{label:(0,m.__)("Portrait"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,m.__)("10:16"),aspect:.625},{title:(0,m.__)("9:16"),aspect:9/16},{title:(0,m.__)("3:4"),aspect:3/4},{title:(0,m.__)("2:3"),aspect:2/3}]}))}))}var pk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function dk(){const{isInProgress:e,rotateClockwise:t}=rk();return(0,a.createElement)(f.ToolbarButton,{icon:pk,label:(0,m.__)("Rotate"),onClick:t,disabled:e})}function fk(){const{isInProgress:e,apply:t,cancel:n}=rk();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToolbarButton,{onClick:t,disabled:e},(0,m.__)("Apply")),(0,a.createElement)(f.ToolbarButton,{onClick:n},(0,m.__)("Cancel")))}function yk(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l,borderProps:s}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ik,{borderProps:s,url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l}),(0,a.createElement)(br,null,(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(ak,null),(0,a.createElement)(f.ToolbarItem,null,(e=>(0,a.createElement)(uk,{toggleProps:e}))),(0,a.createElement)(dk,null)),(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(fk,null))))}const mk=[25,50,75,100],gk=()=>{};function hk(e){let{imageSizeHelp:t,imageWidth:n,imageHeight:r,imageSizeOptions:o=[],isResizable:i=!0,slug:l,width:s,height:c,onChange:p,onChangeImage:d=gk}=e;const{currentHeight:y,currentWidth:g,updateDimension:h,updateDimensions:b}=function(e,t,n,r,o){var i,l;const[s,c]=(0,a.useState)(null!==(i=null!=t?t:r)&&void 0!==i?i:""),[u,p]=(0,a.useState)(null!==(l=null!=e?e:n)&&void 0!==l?l:"");return(0,a.useEffect)((()=>{void 0===t&&void 0!==r&&c(r),void 0===e&&void 0!==n&&p(n)}),[r,n]),(0,a.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&p(e)}),[t,e]),{currentHeight:u,currentWidth:s,updateDimension:(e,t)=>{"width"===e?c(t):p(t),o({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{p(null!=e?e:n),c(null!=t?t:r),o({height:e,width:t})}}}(c,s,r,n,p);return(0,a.createElement)(a.Fragment,null,!(0,u.isEmpty)(o)&&(0,a.createElement)(f.SelectControl,{label:(0,m.__)("Image size"),value:l,options:o,onChange:d,help:t}),i&&(0,a.createElement)("div",{className:"block-editor-image-size-control"},(0,a.createElement)("p",{className:"block-editor-image-size-control__row"},(0,m.__)("Image dimensions")),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(f.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,m.__)("Width"),value:g,min:1,onChange:e=>h("width",e)}),(0,a.createElement)(f.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,m.__)("Height"),value:y,min:1,onChange:e=>h("height",e)})),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(f.ButtonGroup,{"aria-label":(0,m.__)("Image size presets")},mk.map((e=>{const t=Math.round(n*(e/100)),o=Math.round(r*(e/100)),i=g===t&&y===o;return(0,a.createElement)(f.Button,{key:e,isSmall:!0,variant:i?"primary":void 0,isPressed:i,onClick:()=>b(o,t)},e,"%")}))),(0,a.createElement)(f.Button,{isSmall:!0,onClick:()=>b()},(0,m.__)("Reset")))))}var bk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(M.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"}));const vk=()=>{};var _k=e=>{let{value:t,onChange:n=vk,settings:r}=e;if(!r||!r.length)return null;const o=e=>r=>{n({...t,[e.id]:r})},i=r.map((e=>(0,a.createElement)(f.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:o(e),checked:!!t&&!!t[e.id]})));return(0,a.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,a.createElement)(f.VisuallyHidden,{as:"legend"},(0,m.__)("Currently selected link settings")),i)},kk=n(5425),Sk=n.n(kk);function Ek(e){return"function"==typeof e}class wk extends a.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||(0,a.createRef)(),this.inputRef=(0,a.createRef)(),this.updateSuggestions=(0,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:r,__experimentalShowInitialSuggestions:o=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Sk()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===r||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=r&&r.length?this.updateSuggestions(r):o&&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(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:r}=this.props;if(!n)return;const o=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!o&&(t.length<2||!r&&(0,nf.isURL)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const i=n(t,{isInitialSuggestions:o});i.then((e=>{this.suggestionsRequest===i&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,m.sprintf)((0,m._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((0,m.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===i&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:r,loading:o}=this.state;if(!t||!r.length||o){switch(e.keyCode){case cu.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case cu.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case cu.ENTER:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case cu.UP:{e.preventDefault();const t=n?n-1:r.length-1;this.setState({selectedSuggestion:t});break}case cu.DOWN:{e.preventDefault();const t=null===n||n===r.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case cu.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,m.__)("Link selected.")));break;case cu.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}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(e,t){let{value:n,instanceId:r,disableSuggestions:o,__experimentalShowInitialSuggestions:i=!1}=e,{showSuggestions:l}=t,a=l;const s=n&&n.length;return i||s||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:`block-editor-url-input-suggestions-${r}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${r}`}}render(){return(0,a.createElement)(a.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:r,placeholder:o=(0,m.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:l=""}=this.props,{loading:s,showSuggestions:u,selectedSuggestion:p,suggestionsListboxId:d,suggestionOptionIdPrefix:y}=this.state,g=`url-input-control-${r}`,h={id:g,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},b={id:g,value:l,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:o,onKeyDown:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,m.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-controls":d,"aria-activedescendant":null!==p?`${y}-${p}`:void 0,ref:this.inputRef};return i?i(h,b,s):(0,a.createElement)(f.BaseControl,h,(0,a.createElement)("input",b),s&&(0,a.createElement)(f.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:r=!1}=this.props,{showSuggestions:o,suggestions:i,selectedSuggestion:s,suggestionsListboxId:u,suggestionOptionIdPrefix:p,loading:d}=this.state,y={id:u,ref:this.autocompleteRef,role:"listbox"},m=(e,t)=>({role:"option",tabIndex:"-1",id:`${p}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===s});return Ek(t)&&o&&i.length?t({suggestions:i,selectedSuggestion:s,suggestionsListProps:y,buildSuggestionItemProps:m,isLoading:d,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:r&&!(n&&n.length)}):!Ek(t)&&o&&i.length?(0,a.createElement)(f.Popover,{position:"bottom",focusOnMount:!1},(0,a.createElement)("div",l({},y,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),i.map(((e,t)=>(0,a.createElement)(f.Button,l({},m(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===s}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var Ak=(0,p.compose)(p.withSafeTimeout,f.withSpokenMessages,p.withInstanceId,(0,d.withSelect)(((e,t)=>{if(Ek(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(sr);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(wk);var Ck=e=>{let t,{searchTerm:n,onClick:r,itemProps:o,isSelected:i,buttonText:s}=e;return n?(t=s?"function"==typeof s?s(n):s:(0,a.createInterpolateElement)((0,m.sprintf)((0,m.__)("Create: <mark>%s</mark>"),n),{mark:(0,a.createElement)("mark",null)}),(0,a.createElement)(f.Button,l({},o,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":i}),onClick:r}),(0,a.createElement)(ui,{className:"block-editor-link-control__search-item-icon",icon:ku}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};var Ik=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"}));var xk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"}));var Bk=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"}));var Pk=(0,a.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(M.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"}));var Tk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));const Ok={post:Ik,page:gv,post_tag:xk,category:Bk,attachment:Pk};function Rk(e){let{isURL:t,suggestion:n}=e,r=null;return t?r=Tk:n.type in Ok&&(r=Ok[n.type]),r?(0,a.createElement)(ui,{className:"block-editor-link-control__search-item-icon",icon:r}):null}var Nk=e=>{let{itemProps:t,suggestion:n,isSelected:r=!1,onClick:o,isURL:i=!1,searchTerm:s="",shouldShowType:u=!1}=e;return(0,a.createElement)(f.Button,l({},t,{onClick:o,className:c()("block-editor-link-control__search-item",{"is-selected":r,"is-url":i,"is-entity":!i})}),(0,a.createElement)(Rk,{suggestion:n,isURL:i}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,a.createElement)(f.TextHighlight,{text:n.title,highlight:s})),(0,a.createElement)("span",{"aria-hidden":!i,className:"block-editor-link-control__search-item-info"},!i&&((0,nf.filterURLForDisplay)((0,nf.safeDecodeURI)(n.url))||""),i&&(0,m.__)("Press ENTER to add this link"))),u&&n.type&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){if(e.isFrontPage)return"front page";return"post_tag"===e.type?"tag":e.type}(n)))};const Fk="__CREATE__",Mk="mailto",Dk="internal",Lk=["URL",Mk,"tel",Dk],Uk=[{id:"opensInNewTab",title:(0,m.__)("Open in new tab")}];function jk(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:r,handleSuggestionClick:o,suggestionsListProps:i,buildSuggestionItemProps:s,suggestions:u,selectedSuggestion:p,isLoading:d,isInitialSuggestions:y,createSuggestionButtonText:g,suggestionsQuery:h}=e;const b=c()("block-editor-link-control__search-results",{"is-loading":d}),v=1===u.length&&Lk.includes(u[0].type),_=n&&!v&&!y,k=!(null!=h&&h.type),S=`block-editor-link-control-search-results-label-${t}`,E=y?(0,m.__)("Recently updated"):(0,m.sprintf)((0,m.__)('Search results for "%s"'),r),w=(0,a.createElement)(y?a.Fragment:f.VisuallyHidden,{},(0,a.createElement)("span",{className:"block-editor-link-control__search-results-label",id:S},E));return(0,a.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,(0,a.createElement)("div",l({},i,{className:b,"aria-labelledby":S}),u.map(((e,t)=>_&&Fk===e.type?(0,a.createElement)(Ck,{searchTerm:r,buttonText:g,onClick:()=>o(e),key:e.type,itemProps:s(e,t),isSelected:t===p}):Fk===e.type?null:(0,a.createElement)(Nk,{key:`${e.id}-${e.type}`,itemProps:s(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===p,isURL:Lk.includes(e.type),searchTerm:r,shouldShowType:k,isFrontPage:null==e?void 0:e.isFrontPage})))))}function zk(e){const t=null==e?void 0:e.startsWith("#");return(0,nf.isURL)(e)||e&&e.includes("www.")||t}const Vk=()=>Promise.resolve([]),Gk=e=>{let t="URL";const n=(0,nf.getProtocol)(e)||"";return n.includes("mailto")&&(t=Mk),n.includes("tel")&&(t="tel"),null!=e&&e.startsWith("#")&&(t=Dk),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,nf.prependHTTP)(e):e,type:t}])};function Hk(e,t,n,r){const{fetchSearchSuggestions:o,pageOnFront:i}=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?Gk:Vk;return(0,a.useCallback)(((t,a)=>{let{isInitialSuggestions:s}=a;return zk(t)?l(t,{isInitialSuggestions:s}):(async(e,t,n,r,o,i,l)=>{const{isInitialSuggestions:a}=t;let s=!1,c=await Promise.all([n(e,t),r(e)]);c[0]=c[0].map((e=>Number(e.id)===l?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&i&&!a?c[0].concat(c[1]):c[0],a||zk(e)||!o?c:c.concat({title:e,url:e,type:Fk})})(t,{...e,isInitialSuggestions:s},o,l,n,r,i)}),[l,o,n])}const Wk=()=>Promise.resolve([]),$k=()=>{},Kk=(0,a.forwardRef)(((e,t)=>{let{value:n,children:r,currentLink:o={},className:i=null,placeholder:l=null,withCreateSuggestion:s=!1,onCreateSuggestion:u=$k,onChange:d=$k,onSelect:f=$k,showSuggestions:y=!0,renderSuggestions:g=(e=>(0,a.createElement)(jk,e)),fetchSuggestions:h=null,allowDirectEntry:b=!0,showInitialSuggestions:v=!1,suggestionsQuery:_={},withURLSuggestion:k=!0,createSuggestionButtonText:S,useLabel:E=!1}=e;const w=Hk(_,b,s,k),A=y?h||w:Wk,C=(0,p.useInstanceId)(Kk),[I,x]=(0,a.useState)(),B=async e=>{let t=e;if(Fk!==e.type){if(b||t&&Object.keys(t).length>=1){const{id:e,url:n,...r}=o;f({...r,...t},t)}}else try{var n;t=await u(e.title),null!==(n=t)&&void 0!==n&&n.url&&f(t)}catch(e){}},P=c()(i,{"has-no-label":!E});return(0,a.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,a.createElement)(Ak,{label:E?"URL":void 0,className:P,value:n,onChange:(e,t)=>{d(e),x(t)},placeholder:null!=l?l:(0,m.__)("Search or type url"),__experimentalRenderSuggestions:y?e=>g({...e,instanceId:C,withCreateSuggestion:s,currentInputValue:n,createSuggestionButtonText:S,suggestionsQuery:_,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),B(t)}}):null,__experimentalFetchLinkSuggestions:A,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:v,onSubmit:(e,t)=>{var r;const o=e||I;o||null!=n&&null!==(r=n.trim())&&void 0!==r&&r.length?B(o||{url:n}):t.preventDefault()},ref:t}),r)}));var qk=Kk;var Jk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));var Yk=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));const{Slot:Qk,Fill:Zk}=(0,f.createSlotFill)("BlockEditorLinkControlViewer");function Xk(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}var eS=function(e){const[t,n]=(0,a.useReducer)(Xk,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,a.useEffect)((()=>{if(null!=e&&e.length&&r&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,o=t.signal;return r(e,{signal:o}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{o.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function tS(e){var t;let{value:n,onEditClick:r,hasRichPreviews:o=!1,hasUnlinkControl:i=!1,onRemove:l}=e;const s=o?null==n?void 0:n.url:null,{richData:u,isFetching:p}=eS(s),d=u&&Object.keys(u).length,y=n&&(0,nf.filterURLForDisplay)((0,nf.safeDecodeURI)(n.url),16)||"",g=(null==u?void 0:u.title)||(null==n?void 0:n.title)||y,h=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let b;return b=null!=u&&u.icon?(0,a.createElement)("img",{src:null==u?void 0:u.icon,alt:""}):h?(0,a.createElement)(ui,{icon:Jk,size:32}):(0,a.createElement)(ui,{icon:Tk}),(0,a.createElement)("div",{"aria-label":(0,m.__)("Currently selected"),className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!p,"is-preview":!0,"is-error":h})},(0,a.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:c()("block-editor-link-control__search-item-icon",{"is-image":null==u?void 0:u.icon})},b),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-details"},h?(0,a.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,m.__)("Link is empty")):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},(0,Hi.__unstableStripHTML)(g)),(null==n?void 0:n.url)&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-info"},y)))),(0,a.createElement)(f.Button,{icon:Yk,label:(0,m.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:r,iconSize:24}),i&&(0,a.createElement)(f.Button,{icon:eo,label:(0,m.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:l,iconSize:24}),(0,a.createElement)(Qk,{fillProps:n})),!!(d&&(null!=u&&u.image||null!=u&&u.description)||p)&&(0,a.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==u?void 0:u.image)||p)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=u&&u.image)})},(null==u?void 0:u.image)&&(0,a.createElement)("img",{src:null==u?void 0:u.image,alt:""})),((null==u?void 0:u.description)||p)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=u&&u.description)})},(null==u?void 0:u.description)&&(0,a.createElement)(f.__experimentalText,{truncate:!0,numberOfLines:"2"},u.description))))}const nS=e=>{let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}},rS=()=>{};function oS(e){var t,n,r;let{searchInputPlaceholder:o,value:i,settings:l=Uk,onChange:s=rS,onRemove:u,noDirectEntry:p=!1,showSuggestions:d=!0,showInitialSuggestions:y,forceIsEditingLink:g,createSuggestion:h,withCreateSuggestion:b,inputValue:v="",suggestionsQuery:_={},noURLSuggestion:k=!1,createSuggestionButtonText:S,hasRichPreviews:E=!1,hasTextControl:w=!1,renderControlBottom:A=null}=e;void 0===b&&h&&(b=!0);const C=(0,a.useRef)(!0),I=(0,a.useRef)(),x=(0,a.useRef)(),[B,P]=(0,a.useState)((null==i?void 0:i.url)||""),[T,O]=(0,a.useState)((null==i?void 0:i.title)||""),R=v||B,[N,F]=(0,a.useState)(void 0!==g?g:!i||!i.url),M=(0,a.useRef)(!1),D=!(null!=R&&null!==(t=R.trim())&&void 0!==t&&t.length),{createPage:L,isCreatingPage:U,errorMessage:j}=function(e){const t=(0,a.useRef)(),[n,r]=(0,a.useState)(!1),[o,i]=(0,a.useState)(null);return(0,a.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){r(!0),i(null);try{return t.current=nS(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,m.__)("An unknown error occurred during creation. Please try again.")),e}finally{r(!1)}},isCreatingPage:n,errorMessage:o}}(h);function z(){var e;M.current=!(null===(e=I.current)||void 0===e||!e.contains(I.current.ownerDocument.activeElement)),F(!1)}(0,a.useEffect)((()=>{void 0!==g&&g!==N&&F(g)}),[g]),(0,a.useEffect)((()=>{if(C.current)return void(C.current=!1);const e=null!=x&&x.current?1:0;(Hi.focus.focusable.find(I.current)[e]||I.current).focus(),M.current=!1}),[N,U]),(0,a.useEffect)((()=>{null!=i&&i.title&&i.title!==T&&O(i.title),null!=i&&i.url&&P(i.url)}),[i]);const V=()=>{R===(null==i?void 0:i.url)&&T===(null==i?void 0:i.title)||s({...i,url:R,title:T}),z()},G=u&&i&&!N&&!U,H=!(null==l||!l.length),W=(null==i||null===(n=i.url)||void 0===n||null===(r=n.trim())||void 0===r?void 0:r.length)>0&&w;return(0,a.createElement)("div",{tabIndex:-1,ref:I,className:"block-editor-link-control"},U&&(0,a.createElement)("div",{className:"block-editor-link-control__loading"},(0,a.createElement)(f.Spinner,null)," ",(0,m.__)("Creating"),"…"),(N||!i)&&!U&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:c()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":W})},W&&(0,a.createElement)(f.TextControl,{ref:x,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:T,onChange:O,onKeyDown:e=>{const{keyCode:t}=e;t!==cu.ENTER||D||(e.preventDefault(),V())}}),(0,a.createElement)(qk,{currentLink:i,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:o,value:R,withCreateSuggestion:b,onCreateSuggestion:L,onChange:P,onSelect:e=>{s({...e,title:T||(null==e?void 0:e.title)}),z()},showInitialSuggestions:y,allowDirectEntry:!p,showSuggestions:d,suggestionsQuery:_,withURLSuggestion:!k,createSuggestionButtonText:S,useLabel:W},(0,a.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,a.createElement)(f.Button,{onClick:V,label:(0,m.__)("Submit"),icon:bk,className:"block-editor-link-control__search-submit",disabled:D})))),j&&(0,a.createElement)(f.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},j)),i&&!N&&!U&&(0,a.createElement)(tS,{key:null==i?void 0:i.url,value:i,onEditClick:()=>F(!0),hasRichPreviews:E,hasUnlinkControl:G,onRemove:u}),H&&(0,a.createElement)("div",{className:"block-editor-link-control__tools"},(0,a.createElement)(_k,{value:i,settings:l,onChange:s})),A&&A())}oS.ViewerFill=Zk;var iS=oS;var lS=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));var aS=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));var sS=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"}));var cS=(0,f.withFilters)("editor.MediaUpload")((()=>null));var uS=function(e){let{fallback:t=null,children:n}=e;const r=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return!!t().mediaUpload}),[]);return r?n:t};const pS=()=>{};let dS=0;var fS=(0,p.compose)([(0,d.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Cd.store);return{createNotice:t,removeNotice:n}})),(0,f.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:r,allowedTypes:o,accept:i,onError:l,onSelect:s,onSelectURL:c,onToggleFeaturedImage:u,useFeaturedImage:p,onFilesUpload:y=pS,name:g=(0,m.__)("Replace"),createNotice:h,removeNotice:b,children:v,multiple:_=!1,addToGallery:k,handleUpload:S=!0}=e;const E=(0,d.useSelect)((e=>e(sr).getSettings().mediaUpload),[]),w=(0,a.useRef)(),A="block-editor/media-replace-flow/error-notice/"+ ++dS,C=e=>{const t=(0,Hi.__unstableStripHTML)(e);l?l(t):setTimeout((()=>{h("error",t,{speak:!0,id:A,isDismissible:!0})}),1e3)},I=(e,t)=>{p&&u&&u(),t(),s(e),(0,qt.speak)((0,m.__)("The media file has been replaced")),b(A)},x=e=>{e.keyCode===cu.DOWN&&(e.preventDefault(),e.target.click())},B=_&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,a.createElement)(f.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,a.createElement)(f.ToolbarButton,{ref:w,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:x},g)},renderContent:e=>{let{onClose:l}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,a.createElement)(a.Fragment,null,(0,a.createElement)(cS,{gallery:B,addToGallery:k,multiple:_,value:_?r:n,onSelect:e=>I(e,l),allowedTypes:o,render:e=>{let{open:t}=e;return(0,a.createElement)(f.MenuItem,{icon:lS,onClick:t},(0,m.__)("Open Media Library"))}}),(0,a.createElement)(uS,null,(0,a.createElement)(f.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!S)return t(),s(n);y(n),E({allowedTypes:o,filesList:n,onFileChange:e=>{let[n]=e;I(n,t)},onError:C})})(e,l)},accept:i,multiple:_,render:e=>{let{openFileDialog:t}=e;return(0,a.createElement)(f.MenuItem,{icon:aS,onClick:()=>{t()}},(0,m.__)("Upload"))}}))),u&&(0,a.createElement)(f.MenuItem,{icon:sS,onClick:u,isPressed:p},(0,m.__)("Use featured image")),v),c&&(0,a.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,a.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,m.__)("Current media URL:")),(0,a.createElement)(f.Tooltip,{text:t,position:"bottom"},(0,a.createElement)("div",null,(0,a.createElement)(iS,{value:{url:t},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;c(t),w.current.focus()}})))))}})}));function yS(e){let{url:t,urlLabel:n,className:r}=e;const o=c()(r,"block-editor-url-popover__link-viewer-url");return t?(0,a.createElement)(f.ExternalLink,{className:o,href:t},n||(0,nf.filterURLForDisplay)((0,nf.safeDecodeURI)(t))):(0,a.createElement)("span",{className:o})}function mS(e){let{additionalControls:t,children:n,renderSettings:r,position:o="bottom center",focusOnMount:i="firstElement",...s}=e;const[c,u]=(0,a.useState)(!1),p=!!r&&c;return(0,a.createElement)(f.Popover,l({className:"block-editor-url-popover",focusOnMount:i,position:o,shift:!0},s),(0,a.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,a.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&(0,a.createElement)(f.Button,{className:"block-editor-url-popover__settings-toggle",icon:jf,label:(0,m.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),p&&(0,a.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!p&&(0,a.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}mS.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:r,value:o,...i}=e;return(0,a.createElement)("form",l({className:c()("block-editor-url-popover__link-editor",n)},i),(0,a.createElement)(Ak,{value:o,onChange:r,autocompleteRef:t}),(0,a.createElement)(f.Button,{icon:bk,label:(0,m.__)("Apply"),type:"submit"}))},mS.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:r,url:o,urlLabel:i,...s}=e;return(0,a.createElement)("div",l({className:c()("block-editor-url-popover__link-viewer",t)},s),(0,a.createElement)(yS,{url:o,urlLabel:i,className:n}),r&&(0,a.createElement)(f.Button,{icon:Yk,label:(0,m.__)("Edit"),onClick:r}))};var gS=mS;const hS=()=>{},bS=e=>{let{src:t,onChange:n,onSubmit:r,onClose:o}=e;return(0,a.createElement)(gS,{onClose:o},(0,a.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},(0,a.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,m.__)("URL"),placeholder:(0,m.__)("Paste or type URL"),onChange:n,value:t}),(0,a.createElement)(f.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:bk,label:(0,m.__)("Apply"),type:"submit"})))};var vS=(0,f.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:r,icon:o,labels:i={},mediaPreview:l,notices:s,isAppender:u,accept:p,addToGallery:y,multiple:g=!1,handleUpload:h=!0,disableDropZone:b,disableMediaButtons:v,onError:_,onSelect:k,onCancel:S,onSelectURL:E,onToggleFeaturedImage:w,onDoubleClick:A,onFilesPreUpload:C=hS,onHTMLDrop:I=hS,children:x,mediaLibraryButton:B,placeholder:P,style:T}=e;const O=(0,d.useSelect)((e=>{const{getSettings:t}=e(sr);return t().mediaUpload}),[]),[R,N]=(0,a.useState)(""),[F,M]=(0,a.useState)(!1);(0,a.useEffect)((()=>{var e;N(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const D=e=>{N(e.target.value)},L=()=>{M(!0)},U=()=>{M(!1)},j=e=>{e.preventDefault(),R&&E&&(E(R),U())},z=e=>{if(!h)return k(e);let r;if(C(e),g)if(y){let e=[];r=n=>{const r=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));k(r.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else r=k;else r=e=>{let[t]=e;return k(t)};O({allowedTypes:n,filesList:e,onFileChange:r,onError:_})},V=e=>{z(e.target.files)},G=null!=P?P:e=>{let{instructions:t,title:p}=i;if(O||E||(t=(0,m.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===p){const e=null!=n?n:[],[r]=e,o=1===e.length,i=o&&"audio"===r,l=o&&"image"===r,a=o&&"video"===r;void 0===t&&O&&(t=(0,m.__)("Upload a media file or pick one from your media library."),i?t=(0,m.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?t=(0,m.__)("Upload an image file, pick one from your media library, or add one with a URL."):a&&(t=(0,m.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===p&&(p=(0,m.__)("Media"),i?p=(0,m.__)("Audio"):l?p=(0,m.__)("Image"):a&&(p=(0,m.__)("Video")))}const d=c()("block-editor-media-placeholder",r,{"is-appender":u});return(0,a.createElement)(f.Placeholder,{icon:o,label:p,instructions:t,className:d,notices:s,onDoubleClick:A,preview:l,style:T},e,x)},H=()=>b?null:(0,a.createElement)(f.DropZone,{onFilesDrop:z,onHTMLDrop:I}),W=()=>S&&(0,a.createElement)(f.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,m.__)("Cancel"),variant:"link",onClick:S},(0,m.__)("Cancel")),$=()=>E&&(0,a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,a.createElement)(f.Button,{className:"block-editor-media-placeholder__button",onClick:L,isPressed:F,variant:"tertiary"},(0,m.__)("Insert from URL")),F&&(0,a.createElement)(bS,{src:R,onChange:D,onSubmit:j,onClose:U})),K=()=>w&&(0,a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,a.createElement)(f.Button,{className:"block-editor-media-placeholder__button",onClick:w,variant:"tertiary"},(0,m.__)("Use featured image")));return v?(0,a.createElement)(uS,null,H()):(0,a.createElement)(uS,{fallback:G($())},(()=>{const e=null!=B?B:e=>{let{open:t}=e;return(0,a.createElement)(f.Button,{variant:"tertiary",onClick:()=>{t()}},(0,m.__)("Media Library"))},r=(0,a.createElement)(cS,{addToGallery:y,gallery:g&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:g,onSelect:k,allowedTypes:n,mode:"browse",value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(O&&u)return(0,a.createElement)(a.Fragment,null,H(),(0,a.createElement)(f.FormFileUpload,{onChange:V,accept:p,multiple:g,render:e=>{let{openFileDialog:t}=e;const n=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,m.__)("Upload")),r,$(),K(),W());return G(n)}}));if(O){const e=(0,a.createElement)(a.Fragment,null,H(),(0,a.createElement)(f.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:V,accept:p,multiple:g},(0,m.__)("Upload")),r,$(),K(),W());return G(e)}return G(r)})())}));var _S=e=>{let{colorSettings:t,...n}=e;const r=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...r}=e;return{...r,colorValue:t,onColorChange:n}}));return(0,a.createElement)(N_,l({settings:r,gradients:[],disableCustomGradients:!0},n))};const kS={position:"bottom right",isAlternate:!0};var SS=()=>(0,a.createElement)(a.Fragment,null,["bold","italic","link"].map((e=>(0,a.createElement)(f.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,a.createElement)(f.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,a.createElement)(f.ToolbarItem,null,(n=>(0,a.createElement)(f.DropdownMenu,{icon:jf,label:(0,m.__)("More"),toggleProps:{...n,className:c()(n.className,{"is-pressed":t}),describedBy:(0,m.__)("Displays more block tools")},controls:(0,u.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:kS})))})));function ES(e){let{value:t,editableContentElement:n,activeFormats:r}=e;const o=r[r.length-1],i=null==o?void 0:o.type,l=(0,d.useSelect)((e=>e(L.store).getFormatType(i)),[i]),s=(0,L.useAnchor)({editableContentElement:n,value:t,settings:l});return(0,a.createElement)(wS,{popoverAnchor:s})}function wS(e){let{popoverAnchor:t}=e;return(0,a.createElement)(f.Popover,{position:"top center",focusOnMount:!1,anchor:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,a.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,a.createElement)(f.ToolbarGroup,null,(0,a.createElement)(SS,null))))}var AS=e=>{let{inline:t,editableContentElement:n,value:r}=e;const o=(0,d.useSelect)((e=>e(sr).getSettings().hasInlineToolbar),[]);if(t)return(0,a.createElement)(wS,{popoverAnchor:n});if(o){const e=(0,L.getActiveFormats)(r);return(0,L.isCollapsed)(r)&&!e.length?null:(0,a.createElement)(ES,{editableContentElement:n,value:r,activeFormats:e})}return(0,a.createElement)(br,{group:"inline"},(0,a.createElement)(SS,null))};function CS(){const{didAutomaticChange:e,getSettings:t}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((n=>{function r(n){const{keyCode:r}=n;n.defaultPrevented||r!==cu.DELETE&&r!==cu.BACKSPACE&&r!==cu.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}),[])}function IS(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>`<img src="${(0,Ry.createBlobURL)(e)}">`)).join("")}var xS=window.wp.shortcode;function BS(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function PS(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function TS(e){let{allowedFormats:t,formattingControls:n,disableFormats:r}=e;return r?TS.EMPTY_ARRAY:t||n?t||(j()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats",version:"6.2"}),n.map((e=>`core/${e}`))):void 0}TS.EMPTY_ARRAY=[];function OS(e){let{value:t,pastedBlocks:n=[],onReplace:r,onSplit:o,onSplitMiddle:i,multilineTag:l}=e;if(!r||!o)return;const{start:a=0,end:s=0}=t,c={...t,start:a,end:s},u=[],[p,d]=(0,L.split)(c),f=n.length>0;let y=-1;const m=(0,L.isEmpty)(p)&&!(0,L.isEmpty)(d);f&&(0,L.isEmpty)(p)||(u.push(o((0,L.toHTMLString)({value:p,multilineTag:l}),!m)),y+=1),f?(u.push(...n),y+=n.length):i&&u.push(i()),(f||i)&&(0,L.isEmpty)(d)||u.push(o((0,L.toHTMLString)({value:d,multilineTag:l}),m));r(u,f?y:1,f?-1:0)}function RS(e,t){return t?(0,L.replace)(e,/\n+/g,L.__UNSTABLE_LINE_SEPARATOR):(0,L.replace)(e,new RegExp(L.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function NS(e){const t=(0,a.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:r,onChange:i,value:l,formatTypes:a,tagName:s,onReplace:c,onSplit:u,onSplitMiddle:p,__unstableEmbedURLOnPaste:d,multilineTag:f,preserveWhiteSpace:y,pastePlainText:m}=t.current;if(!n)return;const{clipboardData:g}=e;let h="",b="";try{h=g.getData("text/plain"),b=g.getData("text/html")}catch(e){try{b=g.getData("Text")}catch(e){return}}if(b=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const r="\x3c!--EndFragment--\x3e",o=e.indexOf(r);o>-1&&(e=e.substring(0,o));return e}(b),b=function(e){const t="<meta charset='utf-8'>";if(e.startsWith(t))return e.slice(t.length);return e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",h),r)return void i((0,L.insert)(l,h));const v=a.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===l&&(e=n(l,{html:b,plainText:h})),e}),l);if(v!==l)return void i(v);const _=[...(0,Hi.getFilesFromDataTransfer)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,L.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:y});return t=RS(t,!!f),BS(t,l.activeFormats),void i((0,L.insert)(l,t))}if(m)return void i((0,L.insert)(l,(0,L.create)({text:h})));if(null!=_&&_.length&&!Ny(_,b)){const e=(0,o.pasteHandler)({HTML:IS(_),mode:"BLOCKS",tagName:s,preserveWhiteSpace:y});return window.console.log("Received items:\n\n",_),void(c&&(0,L.isEmpty)(l)?c(e):OS({value:l,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}let k=c&&u?"AUTO":"INLINE";var S;"AUTO"===k&&(0,L.isEmpty)(l)&&(S=h,(0,xS.regexp)(".*").test(S))&&(k="BLOCKS"),d&&(0,L.isEmpty)(l)&&(0,nf.isURL)(h.trim())&&(k="BLOCKS");const E=(0,o.pasteHandler)({HTML:b,plainText:h,mode:k,tagName:s,preserveWhiteSpace:y});if("string"==typeof E){let e=(0,L.create)({html:E});e=RS(e,!!f),BS(e,l.activeFormats),i((0,L.insert)(l,e))}else E.length>0&&(c&&(0,L.isEmpty)(l)?c(E,E.length-1,-1):OS({value:l,pastedBlocks:E,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const FS=["`",'"',"'","“â€","‘’"];function MS(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(sr),r=(0,a.useRef)(e);return r.current=e,(0,p.useRefEffect)((e=>{function o(o){const{inputType:l,data:a}=o,{value:s,onChange:c}=r.current;if("insertText"!==l)return;if((0,L.isCollapsed)(s))return;const u=(0,i.applyFilters)("blockEditor.wrapSelectionSettings",FS).find((e=>{let[t,n]=e;return t===a||n===a}));if(!u)return;const[p,d=p]=u,f=s.start,y=s.end+p.length;let m=(0,L.insert)(s,p,f,f);m=(0,L.insert)(m,d,y,y),t(),c(m),n();const g={};for(const e in o)g[e]=o[e];g.data=d;const{ownerDocument:h}=e,{defaultView:b}=h,v=new b.InputEvent("input",g);o.target.dispatchEvent(v),o.preventDefault()}return e.addEventListener("beforeinput",o),()=>{e.removeEventListener("beforeinput",o)}}),[])}function DS(e){let t=e.length;for(;t--;){const n=Yt(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(Jt,""),e[t].clientId;const r=DS(e[t].innerBlocks);if(r)return r}}function LS(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,d.useDispatch)(sr),r=(0,a.useRef)(e);return r.current=e,(0,p.useRefEffect)((e=>{function i(){const{value:e,onReplace:t,selectionChange:i}=r.current;if(!t)return;const{start:l,text:a}=e;if(" "!==a.slice(l-1,l))return;const s=a.slice(0,l).trim(),c=(0,o.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),u=(0,o.findTransform)(c,(e=>{let{prefix:t}=e;return s===t}));if(!u)return;const p=(0,L.toHTMLString)({value:(0,L.insert)(e,Jt,0,l)}),d=u.transform(p);i(DS([d])),t([d]),n()}function l(e){const{inputType:o,type:l}=e,{value:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=r.current;if("insertText"!==o&&"compositionend"!==l)return;c&&i&&i();const p=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:r}=e;return n<t.length||r.slice(n-t.length,n).toLowerCase()!==t?e:(0,L.insert)(e," ðŸ¡ðŸ¢ðŸ¦€ðŸ¤ðŸ¦‹ðŸ˜ðŸ§ðŸ¹ðŸ¦ðŸ¦„ðŸ¦ðŸ¼ðŸ¿ðŸŽƒðŸ´ðŸðŸ†ðŸ¦•ðŸ¦”🌱ðŸ‡Ï€ðŸŒðŸ‰ðŸ’§ðŸ¥¨ðŸŒŒðŸ‚ðŸ ðŸ¥¦ðŸ¥šðŸ¥ðŸŽŸðŸ¥¥ðŸ¥’🛵🥖ðŸ’ðŸ¯ðŸŽ¾ðŸŽ²ðŸºðŸšðŸ®âŒ›ï¸")}(a));p!==a&&(t(),s({...p,activeFormats:a.activeFormats}),n())}return e.addEventListener("input",l),e.addEventListener("compositionend",l),()=>{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function US(e){const{__unstableMarkAutomaticChange:t}=(0,d.useDispatch)(sr),n=(0,a.useRef)(e);return n.current=e,(0,p.useRefEffect)((e=>{function r(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:r,value:i,onReplace:l,onSplit:a,onSplitMiddle:s,multilineTag:c,onChange:u,disableLineBreaks:p,onSplitAtEnd:d}=n.current;if(e.keyCode!==cu.ENTER)return;e.preventDefault();const f={...i};f.formats=r(i);const y=l&&a;if(l){const e=(0,o.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,o.findTransform)(e,(e=>e.regExp.test(f.text)));n&&(l([n.transform({content:f.text})]),t())}if(c)e.shiftKey?p||u((0,L.insert)(f,"\n")):y&&(0,L.__unstableIsEmptyLine)(f)?OS({value:f,onReplace:l,onSplit:a,onSplitMiddle:s,multilineTag:c}):u((0,L.__unstableInsertLineSeparator)(f));else{const{text:t,start:n,end:r}=f,o=d&&n===r&&r===t.length;e.shiftKey||!y&&!o?p||u((0,L.insert)(f,"\n")):!y&&o?d():y&&OS({value:f,onReplace:l,onSplit:a,onSplitMiddle:s,multilineTag:c})}}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function jS(e){return e(L.store).getFormatTypes()}const zS=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function VS(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;return[`${t}.${n}`,r]})))}function GS(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,r)=>(n[r.slice(t.length+1)]=e[r],n)),{})}function HS(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function WS(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function $S(){const{isMultiSelecting:e}=(0,d.useSelect)(sr);return(0,p.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function KS(e){let{formatTypes:t,onChange:n,onFocus:r,value:o,forwardedRef:i}=e;return t.map((e=>{const{name:t,edit:l}=e;if(!l)return null;const s=(0,L.getActiveFormat)(o,t);let c=void 0!==s;const p=(0,L.getActiveObject)(o),d=void 0!==p&&p.type===t;if("core/link"===t&&!(0,L.isCollapsed)(o)){const e=o.formats,t=(0,u.find)(e[o.start],{type:"core/link"}),n=(0,u.find)(e[o.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,a.createElement)(l,{key:t,isActive:c,activeAttributes:c&&s.attributes||{},isObjectActive:d,activeObjectAttributes:d&&p.attributes||{},value:o,onChange:n,onFocus:r,contentRef:i})}))}const qS=(0,a.createContext)(),JS=(0,a.createContext)();const YS=(0,a.forwardRef)((function e(t,n){let{children:r,tagName:i="div",value:s="",onChange:u,isSelected:y,multiline:m,inlineToolbar:g,wrapperClassName:h,autocompleters:b,onReplace:v,placeholder:_,allowedFormats:k,formattingControls:S,withoutInteractiveFormatting:E,onRemove:w,onMerge:A,onSplit:C,__unstableOnSplitAtEnd:I,__unstableOnSplitMiddle:x,identifier:B,preserveWhiteSpace:P,__unstablePastePlainText:T,__unstableEmbedURLOnPaste:O,__unstableDisableFormats:R,disableLineBreaks:N,unstableOnFocus:F,__unstableAllowPrefixTransformations:M,...D}=t;m&&j()("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});const U=(0,p.useInstanceId)(e);B=B||U,D=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:r,textAlign:o,selectionColor:i,tagsToEliminate:l,rootTagsToEliminate:a,disableEditingMenu:s,fontSize:c,fontFamily:u,fontWeight:p,fontStyle:d,minWidth:f,maxWidth:y,setRef:m,disableSuggestions:g,disableAutocorrection:h,...b}=e;return b}(D);const z=(0,a.useRef)(),{clientId:V}=dr(),{selectionStart:G,selectionEnd:H,isSelected:W}=(0,d.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(sr),r=t(),o=n();let i;return void 0===y?i=r.clientId===V&&o.clientId===V&&r.attributeKey===B:y&&(i=r.clientId===V),{selectionStart:i?r.offset:void 0,selectionEnd:i?o.offset:void 0,isSelected:i}})),{selectionChange:$}=(0,d.useDispatch)(sr),K=PS(m),q=TS({allowedFormats:k,formattingControls:S,disableFormats:R}),J=!q||q.length>0;let Y=s,Q=u;Array.isArray(s)&&(j()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),Y=o.children.toHTML(s),Q=e=>u(o.children.fromDOM((0,L.__unstableCreateElement)(document,e).childNodes)));const Z=(0,a.useCallback)(((e,t)=>{const n={},r=void 0===e&&void 0===t;("number"==typeof e||r)&&(n.start={clientId:V,attributeKey:B,offset:e}),("number"==typeof t||r)&&(n.end={clientId:V,attributeKey:B,offset:t}),$(n)}),[V,B]),{formatTypes:X,prepareHandlers:ee,valueHandlers:te,changeHandlers:ne,dependencies:re}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:r,allowedFormats:o}=e;const i=(0,d.useSelect)(jS,[]),l=(0,a.useMemo)((()=>i.filter((e=>{let{name:t,tagName:n}=e;return!(o&&!o.includes(t)||r&&zS.has(n))}))),[i,o,zS]),s=(0,d.useSelect)((e=>l.reduce(((r,o)=>o.__experimentalGetPropsForEditableTreePreparation?{...r,...VS(o.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t}),o.name)}:r),{})),[l,t,n]),c=(0,d.useDispatch)(),u=[],p=[],f=[],y=[];for(const e in s)y.push(s[e]);return l.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const r=e.__experimentalCreatePrepareEditableTree(GS(s,e.name),{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?p.push(r):u.push(r)}if(e.__experimentalCreateOnChangeEditableValue){let r={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(r=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t}));const o=GS(s,e.name);f.push(e.__experimentalCreateOnChangeEditableValue({..."object"==typeof o?o:{},...r},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:l,prepareHandlers:u,valueHandlers:p,changeHandlers:f,dependencies:y}}({clientId:V,identifier:B,withoutInteractiveFormatting:E,allowedFormats:q});function oe(e){return X.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,L.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:ie,onChange:le,ref:ae}=(0,L.__unstableUseRichText)({value:Y,onChange(e,t){let{__unstableFormats:n,__unstableText:r}=t;Q(e),Object.values(ne).forEach((e=>{e(n,r)}))},selectionStart:G,selectionEnd:H,onSelectionChange:Z,placeholder:_,__unstableIsSelected:W,__unstableMultilineTag:K,__unstableDisableFormats:R,preserveWhiteSpace:P,__unstableDependencies:[...re,i],__unstableAfterParse:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:oe,__unstableAddInvisibleFormats:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)}}),se=function(e){return(0,f.__unstableUseAutocompleteProps)({...e,completers:_v(e)})}({onReplace:v,completers:b,record:ie,onChange:le});!function(e){let{html:t,value:n}=e;const r=(0,a.useRef)(),o=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:i}=(0,d.useDispatch)(sr);(0,a.useLayoutEffect)((()=>{if(r.current){if(r.current!==n.text){const e=window.setTimeout((()=>{i()}),1e3);return r.current=n.text,()=>{window.clearTimeout(e)}}i()}else r.current=n.text}),[t,o])}({html:Y,value:ie});const ce=(0,a.useRef)(new Set),ue=(0,a.useRef)(new Set);function pe(){var e;null===(e=z.current)||void 0===e||e.focus()}const de=i;return(0,a.createElement)(a.Fragment,null,W&&(0,a.createElement)(qS.Provider,{value:ce},(0,a.createElement)(JS.Provider,{value:ue},(0,a.createElement)(f.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},r&&r({value:ie,onChange:le,onFocus:pe}),(0,a.createElement)(KS,{value:ie,onChange:le,onFocus:pe,formatTypes:X,forwardedRef:z})))),W&&J&&(0,a.createElement)(AS,{inline:g,editableContentElement:z.current,value:ie}),(0,a.createElement)(de,l({role:"textbox","aria-multiline":!N,"aria-label":_},D,se,{ref:(0,p.useMergeRefs)([n,se.ref,D.ref,ae,MS({value:ie,onChange:le}),LS({value:ie,onChange:le,__unstableAllowPrefixTransformations:M,formatTypes:X,onReplace:v,selectionChange:$}),(0,p.useRefEffect)((e=>{function t(e){(cu.isKeyboardEvent.primary(e,"z")||cu.isKeyboardEvent.primary(e,"y")||cu.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),HS(ce),WS(ue),CS(),NS({isSelected:W,disableFormats:R,onChange:le,value:ie,formatTypes:X,tagName:i,onReplace:v,onSplit:C,onSplitMiddle:x,__unstableEmbedURLOnPaste:O,multilineTag:K,preserveWhiteSpace:P,pastePlainText:T}),US({removeEditorOnlyFormats:oe,value:ie,onReplace:v,onSplit:C,onSplitMiddle:x,multilineTag:K,onChange:le,disableLineBreaks:N,onSplitAtEnd:I}),$S(),z]),contentEditable:!0,suppressContentEditableWarning:!0,className:c()("block-editor-rich-text__editable",D.className,"rich-text"),onFocus:F,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===cu.DELETE||t===cu.BACKSPACE)){const{start:n,end:r,text:o}=ie,i=t===cu.BACKSPACE,l=ie.activeFormats&&!!ie.activeFormats.length;if(!(0,L.isCollapsed)(ie)||l||i&&0!==n||!i&&r!==o.length)return;A&&A(!i),w&&(0,L.isEmpty)(ie)&&i&&w(!i),e.preventDefault()}}})))}));YS.Content=e=>{let{value:t,tagName:n,multiline:r,...i}=e;Array.isArray(t)&&(j()("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),t=o.children.toHTML(t));const l=PS(r);!t&&l&&(t=`<${l}></${l}>`);const s=(0,a.createElement)(a.RawHTML,null,t);if(n){const{format:e,...t}=i;return(0,a.createElement)(n,t,s)}return s},YS.isEmpty=e=>!e||0===e.length;var QS=YS;const ZS=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(QS,l({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));ZS.Content=e=>{let{value:t="",tagName:n="div",...r}=e;return(0,a.createElement)(n,r,t)};var XS=ZS;var eE=(0,a.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...r}=e;if(2===n)return(0,a.createElement)(XS,l({ref:t},r));const{className:o,onChange:i,...s}=r;return(0,a.createElement)(sl.Z,l({ref:t,className:c()("block-editor-plain-text",o),onChange:e=>i(e.target.value)},s))}));function tE(e){let{property:t,viewport:n,desc:r}=e;const o=(0,p.useInstanceId)(tE),i=r||(0,m.sprintf)((0,m._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."),t,n.label);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},n.label),(0,a.createElement)(f.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},i))}var nE=function(e){const{title:t,property:n,toggleLabel:r,onIsResponsiveChange:o,renderDefaultControl:i,renderResponsiveControls:l,isResponsive:s=!1,defaultLabel:u={id:"all",label:(0,m.__)("All")},viewports:p=[{id:"small",label:(0,m.__)("Small screens")},{id:"medium",label:(0,m.__)("Medium screens")},{id:"large",label:(0,m.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const d=r||(0,m.sprintf)((0,m.__)("Use the same %s on all screensizes."),n),y=(0,m.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=i((0,a.createElement)(tE,{property:n,viewport:u}),u);return(0,a.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,a.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,a.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,a.createElement)(f.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!s,onChange:o,help:y}),(0,a.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&g,s&&(l?l(p):p.map((e=>(0,a.createElement)(a.Fragment,{key:e.id},i((0,a.createElement)(tE,{property:n,viewport:e}),e))))))))};function rE(e){let{character:t,type:n,onUse:r}=e;const o=(0,a.useContext)(qS),i=(0,a.useRef)();return i.current=r,(0,a.useEffect)((()=>{function e(e){cu.isKeyboardEvent[n](e,t)&&(i.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t,n]),null}function oE(e){let t,{name:n,shortcutType:r,shortcutCharacter:o,...i}=e,s="RichText.ToolbarControls";return n&&(s+=`.${n}`),r&&o&&(t=cu.displayShortcut[r](o)),(0,a.createElement)(f.Fill,{name:s},(0,a.createElement)(f.ToolbarButton,l({},i,{shortcut:t})))}function iE(e){let{inputType:t,onInput:n}=e;const r=(0,a.useContext)(JS),o=(0,a.useRef)();return o.current=n,(0,a.useEffect)((()=>{function e(e){e.inputType===t&&(o.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t]),null}const lE=(0,a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)(f.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 aE=(0,a.forwardRef)((function(e,t){const n=(0,d.useSelect)((e=>e(sr).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:r}=(0,d.useDispatch)(sr);return(0,a.createElement)(f.Dropdown,{renderToggle:r=>{let{isOpen:o,onToggle:i}=r;return(0,a.createElement)(f.Button,l({},e,{ref:t,icon:"navigation"===n?lE:Yk,"aria-expanded":o,"aria-haspopup":"true",onClick:i,label:(0,m.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.NavigableMenu,{role:"menu","aria-label":(0,m.__)("Tools")},(0,a.createElement)(f.MenuItemsChoice,{value:"navigation"===n?"navigation":"edit",onSelect:r,choices:[{value:"edit",label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ui,{icon:Yk}),(0,m.__)("Edit"))},{value:"navigation",label:(0,a.createElement)(a.Fragment,null,lE,(0,m.__)("Select"))}]})),(0,a.createElement)("div",{className:"block-editor-tool-selector__help"},(0,m.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function sE(e){let{units:t,...n}=e;const r=(0,f.__experimentalUseCustomUnits)({availableUnits:Kr("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,a.createElement)(f.__experimentalUnitControl,l({units:r},n))}var cE=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));class uE extends a.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,r=e?(0,m.__)("Edit link"):(0,m.__)("Insert link");return(0,a.createElement)("div",{className:"block-editor-url-input__button"},(0,a.createElement)(f.Button,{icon:Xr,label:r,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,a.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,a.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,a.createElement)(f.Button,{className:"block-editor-url-input__back",icon:cE,label:(0,m.__)("Close"),onClick:this.toggle}),(0,a.createElement)(Ak,{value:e||"",onChange:t}),(0,a.createElement)(f.Button,{icon:bk,label:(0,m.__)("Submit"),type:"submit"}))))}}var pE=uE;var dE=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));const fE="none",yE="custom",mE="media",gE="attachment",hE=["noreferrer","noopener"],bE=(0,a.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(f.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,a.createElement)(f.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"}),(0,a.createElement)(f.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),vE=e=>{let{linkDestination:t,onChangeUrl:n,url:r,mediaType:o="image",mediaUrl:i,mediaLink:l,linkTarget:s,linkClass:c,rel:p}=e;const[d,y]=(0,a.useState)(!1),[g,h]=(0,a.useState)(null),b=(0,a.useCallback)((()=>{y(!0)})),[v,_]=(0,a.useState)(!1),[k,S]=(0,a.useState)(null),E=(0,a.useRef)(null),w=(0,a.useCallback)((()=>{t!==mE&&t!==gE||S(""),_(!0)})),A=(0,a.useCallback)((()=>{_(!1)})),C=(0,a.useCallback)((()=>{S(null),A(),y(!1)})),I=(0,a.useCallback)((()=>e=>{const t=E.current;t&&t.contains(e.target)||(y(!1),S(null),A())})),x=(0,a.useCallback)((()=>e=>{if(k){var t;const e=(null===(t=P().find((e=>e.url===k)))||void 0===t?void 0:t.linkDestination)||yE;n({href:k,linkDestination:e})}A(),S(null),e.preventDefault()})),B=(0,a.useCallback)((()=>{n({linkDestination:fE,href:""})})),P=()=>{const e=[{linkDestination:mE,title:(0,m.__)("Media File"),url:"image"===o?i:void 0,icon:bE}];return"image"===o&&l&&e.push({linkDestination:gE,title:(0,m.__)("Attachment Page"),url:"image"===o?l:void 0,icon:(0,a.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(f.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,a.createElement)(f.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},T=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToggleControl,{label:(0,m.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=p?p:"").split(" ");hE.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=p?p:"").split(" ").filter((e=>!1===hE.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===s}),(0,a.createElement)(f.TextControl,{label:(0,m.__)("Link Rel"),value:null!=p?p:"",onChange:e=>{n({rel:e})}}),(0,a.createElement)(f.TextControl,{label:(0,m.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),O=null!==k?k:r,R=((0,u.find)(P(),["linkDestination",t])||{}).title;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.ToolbarButton,{icon:Xr,className:"components-toolbar__control",label:r?(0,m.__)("Edit link"):(0,m.__)("Insert link"),"aria-expanded":d,onClick:b,ref:h}),d&&(0,a.createElement)(gS,{anchor:g,onFocusOutside:I(),onClose:C,renderSettings:()=>T,additionalControls:!O&&(0,a.createElement)(f.NavigableMenu,null,(0,u.map)(P(),(e=>(0,a.createElement)(f.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{S(null),(e=>{const t=P();let r;r=e?((0,u.find)(t,(t=>t.url===e))||{linkDestination:yE}).linkDestination:fE,n({linkDestination:r,href:e})})(e.url),A()}},e.title))))},(!r||v)&&(0,a.createElement)(gS.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:O,onChangeInputValue:S,onSubmit:x(),autocompleteRef:E}),r&&!v&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(gS.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:w,urlLabel:R}),(0,a.createElement)(f.Button,{icon:dE,label:(0,m.__)("Remove link"),onClick:B}))))};function _E(e){let{children:t,viewLabel:n,className:r,isEnabled:o=!0,deviceType:i,setDeviceType:l}=e;if((0,p.useViewportMatch)("small","<"))return null;const s={className:c()(r,"block-editor-post-preview__dropdown-content"),position:"bottom left"},u={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!o,children:n},d={"aria-label":(0,m.__)("View options")};return(0,a.createElement)(f.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:s,toggleProps:u,menuProps:d,icon:null},(()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.MenuGroup,null,(0,a.createElement)(f.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===i&&py},(0,m.__)("Desktop")),(0,a.createElement)(f.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===i&&py},(0,m.__)("Tablet")),(0,a.createElement)(f.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===i&&py},(0,m.__)("Mobile"))),t)))}function kE(e){const[t,n]=(0,a.useState)(window.innerWidth);(0,a.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const r=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n<t?n:t};return(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 SE=(0,d.withSelect)((e=>({selectedBlockClientId:e(sr).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Tr(t);return t?(0,a.createElement)(f.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,m.__)("Skip to the selected block")):null})),EE=window.wp.wordcount;var wE=(0,d.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(sr);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,EE.count)((0,o.serialize)(t),"words");return(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,a.createElement)(Au,{icon:ly,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,m.sprintf)((0,m._n)("%d block","%d blocks",t.length),t.length)),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,m.sprintf)((0,m._n)("%d word","%d words",n),n))))}));function AE(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:r,styles:i}=(0,d.useSelect)((e=>{var n,r;const i=e(sr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==i||null===(n=i.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==i?void 0:i.onChange)&&void 0!==r?r:null,styles:e(o.store).getBlockStyles(t)}}),[t]),l=(0,a.useMemo)((()=>[{label:(0,m.__)("Not set"),value:""},...i.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[i]),s=(0,a.useMemo)((()=>{var e;return null===(e=my(i))||void 0===e?void 0:e.name}),[i]),c=(0,a.useCallback)((e=>{r(t,e)}),[t,r]);return n&&n!==s?r&&(0,a.createElement)("div",{className:"default-style-picker__default-switcher"},(0,a.createElement)(f.SelectControl,{options:l,value:n||"",label:(0,m.__)("Default Style"),onChange:c})):null}function CE(e,t){const n=(0,a.useMemo)((()=>e.reduce(((e,t)=>("core/list-item"!==t.name&&Object.entries(t.attributes).some((e=>{let[,{__experimentalRole:t}]=e;return"content"===t}))&&(e[t.name]=!0),e)),{})),[e]),r=(0,a.useCallback)((e=>!!n[e]),[e]);return(0,a.useMemo)((()=>IE([t],r)),[t,r])}function IE(e,t){const n=[];for(const r of e)t(r.name)&&n.push(r),n.push(...IE(r.innerBlocks,t));return n}function xE(e){let{blockTypes:t,block:n,selectedBlock:r}=e;const{selectBlock:o}=(0,d.useDispatch)(sr),i=t.find((e=>{let{name:t}=e;return t===n.name})),l=r&&r.clientId===n.clientId;return(0,a.createElement)(f.Button,{isPressed:l,onClick:()=>o(n.clientId)},(0,a.createElement)(f.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(Au,{icon:i.icon}),(0,a.createElement)(f.FlexItem,null,i.title)))}function BE(e){let{topLevelLockedBlock:t}=e;const{blockTypes:n,block:r,selectedBlock:i}=(0,d.useSelect)((e=>({blockTypes:e(o.store).getBlockTypes(),block:e(sr).getBlock(t),selectedBlock:e(sr).getSelectedBlock()})),[t]),l=Rf(t),s=CE(n,r);return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(Cu,l),(0,a.createElement)(S_,{blockClientId:t}),(0,a.createElement)(f.__experimentalVStack,{spacing:1,padding:4,className:"block-editor-block-inspector__block-buttons-container"},(0,a.createElement)("h2",{className:"block-editor-block-card__title"},(0,m.__)("Content")),s.map((e=>(0,a.createElement)(xE,{selectedBlock:i,key:e.clientId,block:e,blockTypes:n})))))}const PE=e=>{let{clientId:t,blockName:n}=e;const r=(0,d.useSelect)((e=>{const{getBlockStyles:t}=e(o.store),r=t(n);return r&&r.length>0}),[n]),i=Rf(t);return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(Cu,i),(0,a.createElement)(S_,{blockClientId:t}),r&&(0,a.createElement)("div",null,(0,a.createElement)(f.PanelBody,{title:(0,m.__)("Styles")},(0,a.createElement)(l_,{scope:"core/block-inspector",clientId:t}),(0,o.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,a.createElement)(AE,{blockName:n}))),(0,a.createElement)(go.Slot,null),(0,a.createElement)(go.Slot,{__experimentalGroup:"color",label:(0,m.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(go.Slot,{__experimentalGroup:"typography",label:(0,m.__)("Typography")}),(0,a.createElement)(go.Slot,{__experimentalGroup:"dimensions",label:(0,m.__)("Dimensions")}),(0,a.createElement)(go.Slot,{__experimentalGroup:"border",label:(0,m.__)("Border")}),(0,a.createElement)("div",null,(0,a.createElement)(TE,null)),(0,a.createElement)(SE,{key:"back"}))},TE=()=>{const e=(0,f.__experimentalUseSlot)(mo.slotName);return Boolean(e.fills&&e.fills.length)?(0,a.createElement)(f.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,m.__)("Advanced"),initialOpen:!1},(0,a.createElement)(go.Slot,{__experimentalGroup:"advanced"})):null};var OE=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,selectedBlockName:r,selectedBlockClientId:i,blockType:l,topLevelLockedBlock:s}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:r,__unstableGetContentLockingParent:i,getTemplateLock:l}=e(sr),a=t(),s=a&&r(a),c=s&&(0,o.getBlockType)(s);return{count:n(),selectedBlockClientId:a,selectedBlockName:s,blockType:c,topLevelLockedBlock:i(a)||("contentOnly"===l(a)?a:void 0)}}),[]);if(n>1)return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(wE,null),(0,a.createElement)(go.Slot,null),(0,a.createElement)(go.Slot,{__experimentalGroup:"color",label:(0,m.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(go.Slot,{__experimentalGroup:"typography",label:(0,m.__)("Typography")}),(0,a.createElement)(go.Slot,{__experimentalGroup:"dimensions",label:(0,m.__)("Dimensions")}),(0,a.createElement)(go.Slot,{__experimentalGroup:"border",label:(0,m.__)("Border")}));const c=r===(0,o.getUnregisteredTypeHandlerName)();return l&&i&&!c?s?(0,a.createElement)(BE,{topLevelLockedBlock:s}):(0,a.createElement)(PE,{clientId:i,blockName:l.name}):t?(0,a.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,m.__)("No block selected.")):null};var RE=function(e){let{__unstableContentRef:t}=e;const[n,r]=(0,a.useState)(!1),o=(0,d.useSelect)((e=>e(sr).getBlockOrder()),[]);return(0,a.useEffect)((()=>{const e=setTimeout((()=>{r(!0)}),500);return()=>{clearTimeout(e)}}),[]),n?o.map(((e,n)=>n===o.length-1?null:(0,a.createElement)(Cf,{key:e,previousClientId:e,nextClientId:o[n+1],__unstableContentRef:t},(0,a.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,a.createElement)(vf,{position:"bottom center",clientId:o[n+1],__experimentalIsQuick:!0}))))):null};function NE(e){let{children:t,__unstableContentRef:n,...r}=e;const o=(0,p.useViewportMatch)("medium"),{hasFixedToolbar:i,isZoomOutMode:s}=(0,d.useSelect)((e=>{const{__unstableGetEditorMode:t,getSettings:n}=e(sr);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar}}),[]),c=(0,Lu.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:u,getBlockRootClientId:y}=(0,d.useSelect)(sr),{duplicateBlocks:m,removeBlocks:g,insertAfterBlock:h,insertBeforeBlock:b,clearSelectedBlock:v,moveBlocksUp:_,moveBlocksDown:k}=(0,d.useDispatch)(sr);const S=vo(n),E=vo(n);return(0,a.createElement)("div",l({},r,{onKeyDown:function(e){if(!e.defaultPrevented)if(c("core/block-editor/move-up",e)){const t=u();if(t.length){e.preventDefault();const n=y(t[0]);_(t,n)}}else if(c("core/block-editor/move-down",e)){const t=u();if(t.length){e.preventDefault();const n=y(t[0]);k(t,n)}}else if(c("core/block-editor/duplicate",e)){const t=u();t.length&&(e.preventDefault(),m(t))}else if(c("core/block-editor/remove",e)){const t=u();t.length&&(e.preventDefault(),g(t))}else if(c("core/block-editor/insert-after",e)){const t=u();t.length&&(e.preventDefault(),h(t[t.length-1]))}else if(c("core/block-editor/insert-before",e)){const t=u();t.length&&(e.preventDefault(),b(t[0]))}else if(c("core/block-editor/unselect",e)){u().length&&(e.preventDefault(),v(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==n||n.current.focus())}}}),(0,a.createElement)(If.Provider,{value:(0,a.useRef)(!1)},!s&&(0,a.createElement)(Bf,{__unstableContentRef:n}),!s&&(i||!o)&&(0,a.createElement)(hm,{isFixed:!0}),(0,a.createElement)(wm,{__unstableContentRef:n}),(0,a.createElement)(f.Popover.Slot,{name:"block-toolbar",ref:S}),t,(0,a.createElement)(f.Popover.Slot,{name:"__unstable-block-tools-after",ref:E}),s&&(0,a.createElement)(RE,{__unstableContentRef:n})))}const FE=()=>{};var ME=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l=!1,__experimentalInsertionIndex:s,__experimentalFilterValue:c,onSelect:u=FE,shouldFocusBlock:p=!1}=e;const{destinationRootClientId:f,prioritizePatterns:y}=(0,d.useSelect)((e=>{const{getBlockRootClientId:t,getSettings:o}=e(sr);return{destinationRootClientId:n||t(r)||void 0,prioritizePatterns:o().__experimentalPreferPatternsOnRoot}}),[r,n]);return(0,a.createElement)(mf,{onSelect:u,rootClientId:f,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l,__experimentalInsertionIndex:s,__experimentalFilterValue:c,shouldFocusBlock:p,prioritizePatterns:y,ref:t})}));function DE(){return null}DE.Register=function(){const{registerShortcut:e}=(0,d.useDispatch)(Lu.store);return(0,a.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,m.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,m.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,m.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,m.__)("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:(0,m.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,m.__)("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:(0,m.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,m.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,m.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,m.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var LE=DE;function UE(){return j()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const jE=new Set([cu.UP,cu.RIGHT,cu.DOWN,cu.LEFT,cu.ENTER,cu.BACKSPACE]);function zE(){const e=(0,d.useSelect)((e=>e(sr).isTyping()),[]),{stopTyping:t}=(0,d.useDispatch)(sr);return(0,p.useRefEffect)((n=>{if(!e)return;const{ownerDocument:r}=n;let o,i;function l(e){const{clientX:n,clientY:r}=e;o&&i&&(o!==n||i!==r)&&t(),o=n,i=r}return r.addEventListener("mousemove",l),()=>{r.removeEventListener("mousemove",l)}}),[e,t])}function VE(){const{isTyping:e,hasInlineToolbar:t}=(0,d.useSelect)((e=>{const{isTyping:t,getSettings:n}=e(sr);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:r}=(0,d.useDispatch)(sr),o=zE(),i=(0,p.useRefEffect)((o=>{const{ownerDocument:i}=o,{defaultView:l}=i,a=l.getSelection();if(e){let c;function u(e){const{target:t}=e;c=l.setTimeout((()=>{(0,Hi.isTextField)(t)||r()}))}function p(e){const{keyCode:t}=e;t!==cu.ESCAPE&&t!==cu.TAB||r()}function d(){a.isCollapsed||r()}return o.addEventListener("focus",u),o.addEventListener("keydown",p),t||i.addEventListener("selectionchange",d),()=>{l.clearTimeout(c),o.removeEventListener("focus",u),o.removeEventListener("keydown",p),i.removeEventListener("selectionchange",d)}}function s(e){const{type:t,target:r}=e;(0,Hi.isTextField)(r)&&o.contains(r)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&jE.has(t)}(e))&&n()}return o.addEventListener("keypress",s),o.addEventListener("keydown",s),()=>{o.removeEventListener("keypress",s),o.removeEventListener("keydown",s)}}),[e,t,n,r]);return(0,p.useMergeRefs)([o,i])}var GE=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:VE()},t)};const HE=-1!==window.navigator.userAgent.indexOf("Trident"),WE=new Set([cu.UP,cu.DOWN,cu.LEFT,cu.RIGHT]);function $E(){const e=(0,d.useSelect)((e=>e(sr).hasSelectedBlock()),[]);return(0,p.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:r}=n;let o,i,l;function a(){o||(o=r.requestAnimationFrame((()=>{d(),o=null})))}function s(e){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame((()=>{c(e),i=null}))}function c(e){let{keyCode:o}=e;if(!f())return;const i=(0,Hi.computeCaretRect)(r);if(!i)return;if(!l)return void(l=i);if(WE.has(o))return void(l=i);const a=i.top-l.top;if(0===a)return;const s=(0,Hi.getScrollContainer)(t);if(!s)return;const c=s===n.body,u=c?r.scrollY:s.scrollTop,p=c?0:s.getBoundingClientRect().top,d=c?l.top/r.innerHeight:(l.top-p)/(r.innerHeight-p);if(0===u&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(l=i);const y=c?r.innerHeight:s.clientHeight;l.top+l.height>p+y||l.top<p?l=i:c?r.scrollBy(0,a):s.scrollTop+=a}function u(){n.addEventListener("selectionchange",p)}function p(){n.removeEventListener("selectionchange",p),d()}function d(){f()&&(l=(0,Hi.computeCaretRect)(r))}function f(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return r.addEventListener("scroll",a,!0),r.addEventListener("resize",a,!0),t.addEventListener("keydown",s),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",p),r.cancelAnimationFrame(o),r.cancelAnimationFrame(i)}}),[e])}var KE=HE?e=>e.children:function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:$E(),className:"block-editor__typewriter"},t)};const qE=(0,a.createContext)({});function JE(e){let{children:t,uniqueId:n,blockName:r=""}=e;const o=(0,a.useContext)(qE),{name:i}=dr();r=r||i;const l=(0,a.useMemo)((()=>function(e,t,n){const r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(n),r}(o,r,n)),[o,r,n]);return(0,a.createElement)(qE.Provider,{value:l},t)}function YE(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=(0,a.useContext)(qE),{name:o}=dr();return n=n||o,Boolean(null===(t=r[n])||void 0===t?void 0:t.has(e))}var QE=(0,a.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(M.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"}));function ZE(e){let{title:t,help:n,actions:r=[],onClose:o}=e;return(0,a.createElement)(f.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4},(0,a.createElement)(f.__experimentalHStack,{alignment:"center"},(0,a.createElement)(f.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},t),(0,a.createElement)(f.__experimentalSpacer,null),r.map((e=>{let{label:t,icon:n,onClick:r}=e;return(0,a.createElement)(f.Button,{key:t,className:"block-editor-inspector-popover-header__action",label:t,icon:n,variant:!n&&"tertiary",onClick:r},!n&&t)})),o&&(0,a.createElement)(f.Button,{className:"block-editor-inspector-popover-header__action",label:(0,m.__)("Close"),icon:QE,onClick:o})),n&&(0,a.createElement)(f.__experimentalText,null,n))}var XE=(0,a.forwardRef)((function(e,t){let{onClose:n,onChange:r,...o}=e;return(0,a.createElement)("div",{ref:t,className:"block-editor-publish-date-time-picker"},(0,a.createElement)(ZE,{title:(0,m.__)("Publish"),actions:[{label:(0,m.__)("Now"),onClick:()=>null==r?void 0:r(null)}],onClose:n}),(0,a.createElement)(f.DateTimePicker,l({startOfWeek:(0,C_.getSettings)().l10n.startOfWeek,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:r},o)))}));const ew={button:"wp-element-button",caption:"wp-element-caption"},tw=e=>ew[e]?ew[e]:"";function nw(e,t){return Object.entries(t).every((t=>{let[n,r]=t;return"object"==typeof r&&"object"==typeof e[n]?nw(e[n],r):e[n]===r}))}const rw=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&nw(e,n)}));return 1===n.length?n[0]:void 0};function ow(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function iw(e,t){const n=e.split(/[(),]/g).filter(Boolean),r=n.slice(1).map((e=>ow(uw(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...r)+"px";case"max":return Math.max(...r)+"px";case"clamp":return 3!==r.length?null:r[1]<r[0]?r[0]+"px":r[1]>r[2]?r[2]+"px":r[1]+"px";case"calc":return r[0]+"px"}}function lw(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=iw(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return ow(e)}function aw(e){for(let t=0;t<e.length;t++)if(["+","-","/","*"].includes(e[t]))return!0;return!1}function sw(e){let t=!1;const n=e.split(/[+-/*/]/g).filter(Boolean);for(const r of n){const n=ow(uw(r));if(!parseFloat(n.value)){t=!0;break}e=e.replace(r,n.value)}return t?null:(r=e,Function(`'use strict'; return (${r})`)()).toFixed(0)+"px";var r}function cw(e,t){const n=96,r=.01,o=Object.assign({},{fontSize:16,lineHeight:16,width:375,height:812,type:"font"},t),i={em:o.fontSize,rem:o.fontSize,vh:o.height*r,vw:o.width*r,vmin:(o.width<o.height?o.width:o.height)*r,vmax:(o.width>o.height?o.width:o.height)*r,"%":("font"===o.type?o.fontSize:o.width)*r,ch:8,ex:7.15625,lh:o.lineHeight},l={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":null}function uw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=ow(e);return n.unit||(n=lw(e)),aw(e)&&!n.unit?sw(e):cw(n,t)}const pw={};function dw(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var fw=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+dw(t);return pw[n]||(pw[n]=uw(e,t)),pw[n]}}(),(window.wp=window.wp||{}).blockEditor=r}();