D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
tvinntxo
/
www
/
wp-content
/
plugins
/
mailpoet
/
assets
/
dist
/
js
/
Filename :
form_editor.cbaec386.js
back
Copy
/*! For license information please see form_editor.cbaec386.js.LICENSE.txt */ (self.webpackChunkMailPoet3=self.webpackChunkMailPoet3||[]).push([[514],{83804:function(e,t,n){"use strict";var r=n(12717),o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=(0,r.Z)((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.Z=i},32901:function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var i=0,a=t.length,s=0,l=0;i<a;i++){var c=t[i];if(c.removed){if(c.value=e.join(r.slice(l,l+c.count)),l+=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 d=n.slice(s,s+c.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(l+=c.count)}}var p=t[a-1];return a>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[a-2].value+=p.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 a=this;function s(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 l=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=l+c,p=[{newPos:-1,components:[]}],f=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=l&&f+1>=c)return s([{value:this.join(t),count:t.length}]);function m(){for(var n=-1*u;n<=u;n+=2){var i=void 0,d=p[n-1],f=p[n+1],m=(f?f.newPos:0)-n;d&&(p[n-1]=void 0);var h=d&&d.newPos+1<l,g=f&&0<=m&&m<c;if(h||g){if(!h||g&&d.newPos<f.newPos?(i=o(f),a.pushComponent(i.components,void 0,!0)):((i=d).newPos++,a.pushComponent(i.components,!0,void 0)),m=a.extractCommon(i,t,e,n),i.newPos+1>=l&&m+1>=c)return s(r(a,i.components,t,e,a.useLongestToken));p[n]=i}else p[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>d)return i();m()||e()}),0)}();else for(;u<=d;){var h=m();if(h)return h}},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,a=e.newPos,s=a-r,l=0;a+1<o&&s+1<i&&this.equals(t[a+1],n[s+1]);)a++,s++,l++;return l&&e.components.push({count:l}),e.newPos=a,s},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("")}}},36884: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(32901))&&r.__esModule?r:{default:r}).default)},9936: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},a=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 s=n(93858),l=n(45697),c=n(79367),u=n(58303),d="autosize:resized",p=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(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,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),l=a(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return s.createElement("textarea",i({},l,{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:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef((function(e,t){return s.createElement(p,i({},e,{innerRef:t}))}))},94773:function(e,t,n){"use strict";var r=n(9936);t.Z=r.TextareaAutosize},90520:function(e,t,n){"use strict";var r=n(27418),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,u=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,f=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,h=o?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function w(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||b}function k(){}function x(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=w.prototype;var _=x.prototype=new k;_.constructor=x,r(_,w.prototype),_.isPureReactComponent=!0;var E={current:null},C=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)C.call(t,r)&&!S.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:E.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var N=/\/+/g,A=[];function P(e,t,n,r){if(A.length){var o=A.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function R(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>A.length&&A.push(e)}function L(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return n(r,e,""===t?"."+M(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=t+M(o=e[l],l);s+=L(o,c,n,r)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=g&&e[g]||e["@@iterator"])?c:null))for(e=c.call(e),l=0;!(o=e.next()).done;)s+=L(o=o.value,c=t+M(o,l++),n,r);else if("object"===o)throw n=""+e,Error(v(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function O(e,t,n){return null==e?0:L(e,"",t,n)}function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function B(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?F(e,r,n,(function(e){return e})):null!=e&&(T(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(N,"$&/")+"/")+n)),r.push(e))}function F(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(N,"$&/")+"/"),O(e,B,t=P(t,i,r,o)),R(t)}var j={current:null};function z(){var e=j.current;if(null===e)throw Error(v(321));return e}var H={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return F(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;O(e,D,t=P(null,null,t,n)),R(t)},count:function(e){return O(e,(function(){return null}),null)},toArray:function(e){var t=[];return F(e,t,null,(function(e){return e})),t},only:function(e){if(!T(e))throw Error(v(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=x,t.StrictMode=l,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,t.cloneElement=function(e,t,n){if(null==e)throw Error(v(267,e));var o=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)C.call(t,u)&&!S.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=I,t.createFactory=function(e){var t=I.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:h,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return z().useCallback(e,t)},t.useContext=function(e,t){return z().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return z().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return z().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return z().useLayoutEffect(e,t)},t.useMemo=function(e,t){return z().useMemo(e,t)},t.useReducer=function(e,t,n){return z().useReducer(e,t,n)},t.useRef=function(e){return z().useRef(e)},t.useState=function(e){return z().useState(e)},t.version="16.14.0"},93858:function(e,t,n){"use strict";e.exports=n(90520)},10721:function(e,t,n){var r;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return s(c(e),arguments)}function a(e,t){return i.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,l,c,u,d,p,f=1,m=e.length,h="";for(r=0;r<m;r++)if("string"==typeof e[r])h+=e[r];else if("object"==typeof e[r]){if((s=e[r]).keys)for(n=t[f],a=0;a<s.keys.length;a++){if(null==n)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));n=n[s.keys[a]]}else n=s.param_no?t[s.param_no]:t[f++];if(o.not_type.test(s.type)&&o.not_primitive.test(s.type)&&n instanceof Function&&(n=n()),o.numeric_arg.test(s.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(i("[sprintf] expecting number but found %T",n));switch(o.number.test(s.type)&&(d=n>=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}o.json.test(s.type)?h+=n:(!o.number.test(s.type)||d&&!s.sign?p="":(p=d?"+":"-",n=n.toString().replace(o.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(p+n).length,l=s.width&&u>0?c.repeat(u):"",h+=s.align?p+n+l:"0"===c?p+l+n:l+p+n)}return h}var l=Object.create(null);function c(e){if(l[e])return l[e];for(var t,n=e,r=[],i=0;n;){if(null!==(t=o.text.exec(n)))r.push(t[0]);else if(null!==(t=o.modulo.exec(n)))r.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var a=[],s=t[2],c=[];if(null===(c=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=o.key_access.exec(s)))a.push(c[1]);else{if(null===(c=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return l[e]=r}t.sprintf=i,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=a,void 0===(r=function(){return{sprintf:i,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},79892:function(e,t,n){e=n.nmd(e),function(t){"use strict";var n,r="function"==typeof(n=t.atob)?n:"function"==typeof Buffer?function(e){return new Buffer(e,"base64").toString("binary")}:"object"==typeof t.base64js?function(e){var n=t.base64js.b64ToByteArray(e);return Array.prototype.map.call(n,(function(e){return String.fromCharCode(e)})).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")};t.atob=r,e&&e.exports&&(e.exports=r)}(window)},79367:function(e,t){var n,r;void 0===(r="function"==typeof(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 a(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,a=function(){e.clientWidth!==n&&d()},s=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!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",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!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:s,update:d}),"vertical"===(l=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===l.resize&&(e.style.resize="horizontal"),t="content-box"===l.boxSizing?-(parseFloat(l.paddingTop)+parseFloat(l.paddingBottom)):parseFloat(l.borderTopWidth)+parseFloat(l.borderBottomWidth),isNaN(t)&&(t=0),d()}var l;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var r=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),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(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o<t?"hidden"===n.overflowY&&(c("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),r!==o){r=o;var a=i("autosize:resized");try{e.dispatchEvent(a)}catch(e){}}}}function s(e){var t=o.get(e);t&&t.destroy()}function l(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 a(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default})?n.apply(t,[e,t]):n)||(e.exports=r)},31235:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,{__experimentalBatch:function(){return ut},__experimentalReceiveCurrentGlobalStylesId:function(){return et},__experimentalReceiveThemeBaseGlobalStyles:function(){return tt},__experimentalSaveSpecifiedEntityEdits:function(){return pt},__unstableCreateUndoLevel:function(){return lt},addEntities:function(){return Xe},deleteEntityRecord:function(){return ot},editEntityRecord:function(){return it},receiveAutosaves:function(){return ht},receiveCurrentTheme:function(){return Qe},receiveCurrentUser:function(){return Ye},receiveEmbedPreview:function(){return rt},receiveEntityRecords:function(){return Je},receiveThemeSupports:function(){return nt},receiveUploadPermissions:function(){return ft},receiveUserPermission:function(){return mt},receiveUserQuery:function(){return Ke},redo:function(){return st},saveEditedEntityRecord:function(){return dt},saveEntityRecord:function(){return ct},undo:function(){return at}});var o={};n.r(o),n.d(o,{__experimentalGetCurrentGlobalStylesId:function(){return _n},__experimentalGetCurrentThemeBaseGlobalStyles:function(){return On},__experimentalGetDirtyEntityRecords:function(){return an},__experimentalGetEntitiesBeingSaved:function(){return sn},__experimentalGetEntityRecordNoResolver:function(){return tn},__experimentalGetTemplateForLink:function(){return Ln},canUser:function(){return In},canUserEditEntityRecord:function(){return Tn},getAuthors:function(){return Kt},getAutosave:function(){return An},getAutosaves:function(){return Nn},getCurrentTheme:function(){return xn},getCurrentUser:function(){return Yt},getEditedEntityRecord:function(){return dn},getEmbedPreview:function(){return Cn},getEntitiesByKind:function(){return Jt},getEntity:function(){return Qt},getEntityRecord:function(){return en},getEntityRecordEdits:function(){return ln},getEntityRecordNonTransientEdits:function(){return cn},getEntityRecords:function(){return on},getLastEntityDeleteError:function(){return gn},getLastEntitySaveError:function(){return hn},getRawEntityRecord:function(){return nn},getRedoEdit:function(){return yn},getReferenceByDistinctEdits:function(){return Rn},getThemeSupports:function(){return En},getUndoEdit:function(){return bn},getUserQueryResults:function(){return Xt},hasEditsForEntityRecord:function(){return un},hasEntityRecords:function(){return rn},hasFetchedAutosaves:function(){return Pn},hasRedo:function(){return kn},hasUndo:function(){return wn},isAutosavingEntityRecord:function(){return pn},isDeletingEntityRecord:function(){return mn},isPreviewEmbedFallback:function(){return Sn},isRequestingEmbedPreview:function(){return qt},isSavingEntityRecord:function(){return fn}});var i={};n.r(i),n.d(i,{__experimentalGetCurrentGlobalStylesId:function(){return Yn},__experimentalGetCurrentThemeBaseGlobalStyles:function(){return Xn},__experimentalGetTemplateForLink:function(){return Kn},canUser:function(){return Un},canUserEditEntityRecord:function(){return $n},getAuthors:function(){return Dn},getAutosave:function(){return qn},getAutosaves:function(){return Gn},getCurrentTheme:function(){return Vn},getCurrentUser:function(){return Bn},getEditedEntityRecord:function(){return zn},getEmbedPreview:function(){return Zn},getEntityRecord:function(){return Fn},getEntityRecords:function(){return Hn},getRawEntityRecord:function(){return jn},getThemeSupports:function(){return Wn}});var a={};n.r(a),n.d(a,{find:function(){return fo}});var s={};n.r(s),n.d(s,{find:function(){return wo},findNext:function(){return xo},findPrevious:function(){return ko},isTabbableIndex:function(){return ho}});var l={};n.r(l),n.d(l,{__experimentalGetUnprocessedBlockTypes:function(){return es},getActiveBlockVariation:function(){return is},getBlockStyles:function(){return rs},getBlockSupport:function(){return ms},getBlockType:function(){return ns},getBlockTypes:function(){return ts},getBlockVariations:function(){return os},getCategories:function(){return ss},getChildBlockNames:function(){return fs},getCollections:function(){return ls},getDefaultBlockName:function(){return cs},getDefaultBlockVariation:function(){return as},getFreeformFallbackBlockName:function(){return us},getGroupingBlockName:function(){return ps},getUnregisteredFallbackBlockName:function(){return ds},hasBlockSupport:function(){return hs},hasChildBlocks:function(){return vs},hasChildBlocksWithInserterSupport:function(){return bs},isMatchingSearchTerm:function(){return gs}});var c={};n.r(c),n.d(c,{__experimentalReapplyBlockTypeFilters:function(){return Jl},__experimentalRegisterBlockType:function(){return Xl},addBlockCollection:function(){return uc},addBlockStyles:function(){return ec},addBlockTypes:function(){return Yl},addBlockVariations:function(){return nc},removeBlockCollection:function(){return dc},removeBlockStyles:function(){return tc},removeBlockTypes:function(){return Ql},removeBlockVariations:function(){return rc},setCategories:function(){return lc},setDefaultBlockName:function(){return oc},setFreeformFallbackBlockName:function(){return ic},setGroupingBlockName:function(){return sc},setUnregisteredFallbackBlockName:function(){return ac},updateCategory:function(){return cc}});var u={};n.r(u),n.d(u,{__experimentalGetActiveBlockIdByBlockNames:function(){return tg},__experimentalGetAllowedBlocks:function(){return Mh},__experimentalGetAllowedPatterns:function(){return jh},__experimentalGetBlockListSettingsForBlocks:function(){return Uh},__experimentalGetDirectInsertBlock:function(){return Dh},__experimentalGetLastBlockAttributeChanges:function(){return qh},__experimentalGetParsedPattern:function(){return Bh},__experimentalGetPatternTransformItems:function(){return Hh},__experimentalGetPatternsByBlockTypes:function(){return zh},__experimentalGetReusableBlockTitle:function(){return $h},__unstableGetBlockWithoutInnerBlocks:function(){return vm},__unstableGetClientIdWithClientIdsTree:function(){return ym},__unstableGetClientIdsTree:function(){return wm},__unstableIsLastBlockChangeIgnored:function(){return Gh},areInnerBlocksControlled:function(){return eg},canInsertBlockType:function(){return kh},canInsertBlocks:function(){return xh},canMoveBlock:function(){return Ch},canMoveBlocks:function(){return Sh},canRemoveBlock:function(){return _h},canRemoveBlocks:function(){return Eh},didAutomaticChange:function(){return Jh},getAdjacentBlockClientId:function(){return jm},getBlock:function(){return gm},getBlockAttributes:function(){return hm},getBlockCount:function(){return Cm},getBlockHierarchyRootClientId:function(){return Bm},getBlockIndex:function(){return eh},getBlockInsertionPoint:function(){return mh},getBlockListSettings:function(){return Vh},getBlockMode:function(){return sh},getBlockName:function(){return fm},getBlockOrder:function(){return Qm},getBlockParents:function(){return Mm},getBlockParentsByBlockName:function(){return Dm},getBlockRootClientId:function(){return Om},getBlockSelectionEnd:function(){return Nm},getBlockSelectionStart:function(){return Tm},getBlockTransformItems:function(){return Lh},getBlocks:function(){return bm},getBlocksByClientId:function(){return Em},getClientIdsOfDescendants:function(){return km},getClientIdsWithDescendants:function(){return xm},getDraggedBlockClientIds:function(){return uh},getFirstMultiSelectedBlockClientId:function(){return $m},getGlobalBlockCount:function(){return _m},getInserterItems:function(){return Rh},getLastMultiSelectedBlockClientId:function(){return Gm},getLowestCommonAncestorWithSelectedBlock:function(){return Fm},getMultiSelectedBlockClientIds:function(){return Zm},getMultiSelectedBlocks:function(){return Um},getMultiSelectedBlocksEndClientId:function(){return Jm},getMultiSelectedBlocksStartClientId:function(){return Xm},getNextBlockClientId:function(){return Hm},getPreviousBlockClientId:function(){return zm},getSelectedBlock:function(){return Lm},getSelectedBlockClientId:function(){return Rm},getSelectedBlockClientIds:function(){return Wm},getSelectedBlockCount:function(){return Am},getSelectedBlocksInitialCaretPosition:function(){return Vm},getSelectionEnd:function(){return Im},getSelectionStart:function(){return Sm},getSettings:function(){return Wh},getTemplate:function(){return vh},getTemplateLock:function(){return bh},hasBlockMovingClientId:function(){return Xh},hasInserterItems:function(){return Oh},hasMultiSelection:function(){return oh},hasSelectedBlock:function(){return Pm},hasSelectedInnerBlock:function(){return nh},isAncestorBeingDragged:function(){return ph},isAncestorMultiSelected:function(){return Ym},isBlockBeingDragged:function(){return dh},isBlockHighlighted:function(){return Qh},isBlockInsertionPointVisible:function(){return hh},isBlockMultiSelected:function(){return Km},isBlockSelected:function(){return th},isBlockValid:function(){return mm},isBlockWithinSelection:function(){return rh},isCaretWithinFormattedText:function(){return fh},isDraggingBlocks:function(){return ch},isFirstMultiSelectedBlock:function(){return qm},isLastBlockChangePersistent:function(){return Zh},isMultiSelecting:function(){return ih},isNavigationMode:function(){return Yh},isSelectionEnabled:function(){return ah},isTyping:function(){return lh},isValidTemplate:function(){return gh},wasBlockJustInserted:function(){return ng}});var d={};n.r(d),n.d(d,{getFormatType:function(){return cg},getFormatTypeForBareElement:function(){return ug},getFormatTypeForClassName:function(){return dg},getFormatTypes:function(){return lg}});var p={};n.r(p),n.d(p,{addFormatTypes:function(){return pg},removeFormatTypes:function(){return fg}});var f={};n.r(f),n.d(f,{__unstableMarkAutomaticChange:function(){return Eb},__unstableMarkLastChangeAsPersistent:function(){return xb},__unstableMarkNextChangeAsNotPersistent:function(){return _b},__unstableSaveReusableBlock:function(){return kb},clearSelectedBlock:function(){return Zv},duplicateBlocks:function(){return Ib},enterFormattedText:function(){return hb},exitFormattedText:function(){return gb},flashBlock:function(){return Pb},hideInsertionPoint:function(){return rb},insertAfterBlock:function(){return Nb},insertBeforeBlock:function(){return Tb},insertBlock:function(){return eb},insertBlocks:function(){return tb},insertDefaultBlock:function(){return bb},mergeBlocks:function(){return ab},moveBlockToPosition:function(){return Qv},moveBlocksDown:function(){return Yv},moveBlocksToPosition:function(){return Jv},moveBlocksUp:function(){return Xv},multiSelect:function(){return Wv},receiveBlocks:function(){return Mv},removeBlock:function(){return lb},removeBlocks:function(){return sb},replaceBlock:function(){return qv},replaceBlocks:function(){return Gv},replaceInnerBlocks:function(){return cb},resetBlocks:function(){return Rv},resetSelection:function(){return Ov},selectBlock:function(){return Fv},selectNextBlock:function(){return zv},selectPreviousBlock:function(){return jv},selectionChange:function(){return vb},setBlockMovingClientId:function(){return Sb},setHasControlledInnerBlocks:function(){return Rb},setNavigationMode:function(){return Cb},setTemplateValidity:function(){return ob},showInsertionPoint:function(){return nb},startDraggingBlocks:function(){return fb},startMultiSelect:function(){return Hv},startTyping:function(){return db},stopDraggingBlocks:function(){return mb},stopMultiSelect:function(){return Vv},stopTyping:function(){return pb},synchronizeTemplate:function(){return ib},toggleBlockHighlight:function(){return Ab},toggleBlockMode:function(){return ub},toggleSelection:function(){return Uv},updateBlock:function(){return Bv},updateBlockAttributes:function(){return Dv},updateBlockListSettings:function(){return yb},updateSettings:function(){return wb},validateBlocksToTemplate:function(){return Lv}});var m={};n.r(m),n.d(m,{Text:function(){return qw},block:function(){return Kw},destructive:function(){return Xw},highlighterText:function(){return Qw},muted:function(){return Jw},positive:function(){return Yw},upperCase:function(){return ek}});var h={};n.r(h),n.d(h,{registerShortcut:function(){return yA},unregisterShortcut:function(){return wA}});var g={};n.r(g),n.d(g,{getAllShortcutKeyCombinations:function(){return TA},getAllShortcutRawKeyCombinations:function(){return NA},getCategoryShortcuts:function(){return AA},getShortcutAliases:function(){return IA},getShortcutDescription:function(){return SA},getShortcutKeyCombination:function(){return EA},getShortcutRepresentation:function(){return CA}});var v={};n.r(v),n.d(v,{createErrorNotice:function(){return vR},createInfoNotice:function(){return gR},createNotice:function(){return mR},createSuccessNotice:function(){return hR},createWarningNotice:function(){return bR},removeNotice:function(){return yR}});var b={};n.r(b),n.d(b,{getNotices:function(){return kR}});var y={};n.r(y),n.d(y,{ButtonContentView:function(){return kV},LabelPlaceholderView:function(){return _V},LabelView:function(){return vV},buttonActive:function(){return wV},buttonView:function(){return yV},labelBlock:function(){return bV},medium:function(){return EV},separatorActive:function(){return xV}});var w={};n.r(w),n.d(w,{TooltipContent:function(){return PW},TooltipPopoverView:function(){return RW},TooltipShortcut:function(){return OW},noOutline:function(){return LW}});var k={};n.r(k),n.d(k,{applyStylesToAllTextInputs:function(){return h2},blocksChangedInBlockEditor:function(){return m2},changeActiveSidebar:function(){return n2},changeFormBlocks:function(){return j1},changeFormName:function(){return z1},changeFormSettings:function(){return J1},changeFormStyles:function(){return Z1},changePreviewSettings:function(){return r2},createCustomField:function(){return p2},createCustomFieldDone:function(){return K1},createCustomFieldFailed:function(){return X1},createCustomFieldStarted:function(){return Y1},customFieldEdited:function(){return U1},deleteCustomField:function(){return f2},deleteCustomFieldDone:function(){return V1},deleteCustomFieldFailed:function(){return W1},deleteCustomFieldStarted:function(){return H1},hidePreview:function(){return a2},historyRedo:function(){return v2},historyUndo:function(){return g2},removeNotice:function(){return s2},saveCustomField:function(){return d2},saveCustomFieldDone:function(){return $1},saveCustomFieldFailed:function(){return q1},saveCustomFieldStarted:function(){return G1},saveForm:function(){return u2},saveFormDone:function(){return Q1},saveFormFailed:function(){return t2},saveFormStarted:function(){return e2},showPlacementSettings:function(){return o2},showPreview:function(){return i2},switchDefaultSidebarTab:function(){return l2},toggleForm:function(){return B1},toggleFullscreen:function(){return F1},toggleInserter:function(){return D1},toggleSidebar:function(){return M1},toggleSidebarPanel:function(){return c2},tutorialDismissed:function(){return b2}});var x={};n.r(x),n.d(x,{selectCategory:function(){return Fre},selectTemplate:function(){return Bre}});var _=n(45993),E=n.n(_),C=n(52524),S=n.n(C),I=n(59588),T=n.n(I),N=n(10721),A=n.n(N);const P=T()(console.error);function R(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return A().sprintf(e,...n)}catch(t){return t instanceof Error&&P("sprintf error: \n\n"+t.toString()),e}}var L,O,M,D;L={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},O=["(","?"],M={")":["("],":":["?","?:"]},D=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var B={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};var F={contextDelimiter:"",onMissingKey:null};function j(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},F)this.options[n]=void 0!==t&&n in t?t[n]:F[n]}j.prototype.getPluralForm=function(e,t){var n,r,o,i,a=this.pluralForms[e];return a||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=function(e){var t=function(e){for(var t,n,r,o,i=[],a=[];t=e.match(D);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=a.pop();){if(M[n]){if(M[n][0]===o){n=M[n][1]||n;break}}else if(O.indexOf(o)>=0||L[o]<L[n]){a.push(o);break}i.push(o)}M[n]||a.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(a.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,a,s,l=[];for(n=0;n<e.length;n++){if(a=e[n],i=B[a]){for(r=i.length,o=Array(r);r--;)o[r]=l.pop();try{s=i.apply(null,o)}catch(e){return e}}else s=t.hasOwnProperty(a)?t[a]:+a;l.push(s)}return l[0]}(t,e)}}(r),o=function(e){return+i({n:e})}),a=this.pluralForms[e]=o),a(t)},j.prototype.dcnpgettext=function(e,t,n,r,o){var i,a,s;return i=void 0===o?0:this.getPluralForm(e,o),a=n,t&&(a=t+this.options.contextDelimiter+n),(s=this.data[e][a])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};const z={"":{plural_forms:e=>1===e?0:1}},H=/^i18n\.(n?gettext|has_translation)(_|$)/;var V=n(52416);const W=((e,t,n)=>{const r=new j({}),o=new Set,i=()=>{o.forEach((e=>e()))},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";r.data[t]={...z,...r.data[t],...e},r.data[t][""]={...z[""],...r.data[t][""]}},s=(e,t)=>{a(e,t),i()},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return r.data[e]||a(void 0,e),r.dcnpgettext(e,t,n,o,i)},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return e},u=(e,t,r)=>{let o=l(r,t,e);return n?(o=n.applyFilters("i18n.gettext_with_context",o,e,t,r),n.applyFilters("i18n.gettext_with_context_"+c(r),o,e,t,r)):o};if(n){const e=e=>{H.test(e)&&i()};n.addAction("hookAdded","core/i18n",e),n.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[e]},setLocaleData:s,resetLocaleData:(e,t)=>{r.data={},r.pluralForms={},s(e,t)},subscribe:e=>(o.add(e),()=>o.delete(e)),__:(e,t)=>{let r=l(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+c(t),r,e,t)):r},_x:u,_n:(e,t,r,o)=>{let i=l(o,void 0,e,t,r);return n?(i=n.applyFilters("i18n.ngettext",i,e,t,r,o),n.applyFilters("i18n.ngettext_"+c(o),i,e,t,r,o)):i},_nx:(e,t,r,o,i)=>{let a=l(i,o,e,t,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,r,o,i),n.applyFilters("i18n.ngettext_with_context_"+c(i),a,e,t,r,o,i)):a},isRTL:()=>"rtl"===u("ltr","text direction"),hasTranslation:(e,t,o)=>{var i,a;const s=t?t+""+e:e;let l=!(null===(i=r.data)||void 0===i||null===(a=i[null!=o?o:"default"])||void 0===a||!a[s]);return n&&(l=n.applyFilters("i18n.has_translation",l,e,t,o),l=n.applyFilters("i18n.has_translation_"+c(o),l,e,t,o)),l}}})(0,0,V.JQ);W.getLocaleData.bind(W);const Z=W.setLocaleData.bind(W),U=(W.resetLocaleData.bind(W),W.subscribe.bind(W),W.__.bind(W)),$=W._x.bind(W),G=W._n.bind(W),q=(W._nx.bind(W),W.isRTL.bind(W));W.hasTranslation.bind(W);var K=(e,t)=>{let n,r,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),o=r?n+"/"+r:n),delete e.namespace,delete e.endpoint,t({...e,path:o})};function Y(e){const t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((e=>e.split("="))).sort(((e,t)=>e[0].localeCompare(t[0]))).map((e=>e.join("="))).join("&"):r}function X(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}function J(e){return(X(e)||"").replace(/\+/g,"%20").split("&").reduce(((e,t)=>{const[n,r=""]=t.split("=").filter(Boolean).map(decodeURIComponent);return n&&function(e,t,n){const r=t.length,o=r-1;for(let i=0;i<r;i++){let r=t[i];!r&&Array.isArray(e)&&(r=e.length.toString());const a=!isNaN(Number(t[i+1]));e[r]=i===o?n:e[r]||(a?[]:{}),Array.isArray(e[r])&&!a&&(e[r]={...e[r]}),e=e[r]}}(e,n.replace(/\]/g,"").split("["),r),e}),{})}function Q(e,t){return J(e)[t]}function ee(e){let t="";const n=Object.entries(e);let r;for(;r=n.shift();){let[e,o]=r;if(Array.isArray(o)||o&&o.constructor===Object){const t=Object.entries(o).reverse();for(const[r,o]of t)n.unshift([`${e}[${r}]`,o])}else void 0!==o&&(null===o&&(o=""),t+="&"+[e,o].map(encodeURIComponent).join("="))}return t.substr(1)}function te(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;let n=e;const r=e.indexOf("?");return-1!==r&&(t=Object.assign(J(e),t),n=n.substr(0,r)),n+"?"+ee(t)}const ne=(e,t)=>{let{path:n,url:r,...o}=e;return{...o,url:r&&te(r,t),path:n&&te(n,t)}},re=e=>e.json?e.json():Promise.reject(e),oe=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t};var ie=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n})(e))return t(e);const n=await ye({...ne(e,{per_page:100}),parse:!1}),r=await re(n);if(!Array.isArray(r))return r;let o=oe(n);if(!o)return r;let i=[].concat(r);for(;o;){const t=await ye({...e,path:void 0,url:o,parse:!1}),n=await re(t);i=i.concat(n),o=oe(t)}return i};const ae=new Set(["PATCH","PUT","DELETE"]),se="GET";function le(e,t){return void 0!==Q(e,t)}const ce=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},ue=e=>{const t={code:"invalid_json",message:U("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((()=>{throw t}))},de=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ce(e,t)).catch((e=>pe(e,t)))};function pe(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return ue(e).then((e=>{const t={code:"unknown_error",message:U("An unknown error occurred.")};throw e||t}))}const fe={Accept:"application/json, */*;q=0.1"},me={credentials:"include"},he=[(e,t)=>("string"!=typeof e.url||le(e.url,"_locale")||(e.url=te(e.url,{_locale:"user"})),"string"!=typeof e.path||le(e.path,"_locale")||(e.path=te(e.path,{_locale:"user"})),t(e)),K,(e,t)=>{const{method:n=se}=e;return ae.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},ie],ge=e=>{if(e.status>=200&&e.status<300)return e;throw e};let ve=e=>{const{url:t,path:n,data:r,parse:o=!0,...i}=e;let{body:a,headers:s}=e;return s={...fe,...s},r&&(a=JSON.stringify(r),s["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...me,...i,body:a,headers:s}).then((e=>Promise.resolve(e).then(ge).catch((e=>pe(e,o))).then((e=>de(e,o)))),(e=>{if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:U("You are probably offline.")}}))};function be(e){return he.reduceRight(((e,t)=>n=>t(n,e)),ve)(e).catch((t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(be.nonceEndpoint).then(ge).then((e=>e.text())).then((t=>(be.nonceMiddleware.nonce=t,be(e))))))}be.use=function(e){he.unshift(e)},be.setFetchHandler=function(e){ve=e},be.createNonceMiddleware=function(e){const t=(e,n)=>{const{headers:r={}}=e;for(const o in r)if("x-wp-nonce"===o.toLowerCase()&&r[o]===t.nonce)return n(e);return n({...e,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t},be.createPreloadingMiddleware=function(e){const t=Object.keys(e).reduce(((t,n)=>(t[Y(n)]=e[n],t)),{});return(e,n)=>{const{parse:r=!0}=e;let o=e.path;if(!o&&e.url){const t=Q(e.url,"rest_route");"string"==typeof t&&(o=t)}if("string"==typeof o){const n=e.method||"GET",i=Y(o);if("GET"===n&&t[i]){const e=t[i];return delete t[i],Promise.resolve(r?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}if("OPTIONS"===n&&t[n]&&t[n][i]){const e=t[n][i];return delete t[n][i],Promise.resolve(r?e.body:e)}}return n(e)}},be.createRootURLMiddleware=e=>(t,n)=>K(t,(t=>{let r,o=t.url,i=t.path;return"string"==typeof i&&(r=e,-1!==e.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(i=i.replace("?","&")),o=r+i),n({...t,url:o})})),be.fetchAllMiddleware=ie,be.mediaUploadMiddleware=(e,t)=>{if(!function(e){const t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);let n=0;const r=e=>(n++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((()=>n<5?r(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject()))));return t({...e,parse:!1}).catch((t=>{const n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?r(n).catch((()=>!1!==e.parse?Promise.reject({code:"post_process",message:U("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t))):pe(t,e.parse)})).then((t=>de(t,e.parse)))};var ye=be,we=n(71304),ke=n(93726),xe=n(61299),_e=n(79887),Ee=n(96486),Ce=n(49884),Se=n.n(Ce),Ie=n(26015),Te=e=>t=>(n,r)=>void 0===n||e(r)?t(n,r):n,Ne=e=>t=>(n,r)=>t(n,e(r));function Ae(e,t){if(!e)return t;let n=!1;const r={};for(const o in t)(0,Ee.isEqual)(e[o],t[o])?r[o]=e[o]:(n=!0,r[o]=t[o]);if(!n)return e;for(const t in e)r.hasOwnProperty(t)||(r[t]=e[t]);return r}var Pe,Re=e=>t=>function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;const o=r[e];if(void 0===o)return n;const i=t(n[o],r);return i===n[o]?n:{...n,[o]:i}},Le=new Uint8Array(16);function Oe(){if(!Pe&&!(Pe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pe(Le)}for(var Me=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,De=function(e){return"string"==typeof e&&Me.test(e)},Be=[],Fe=0;Fe<256;++Fe)Be.push((Fe+256).toString(16).substr(1));var je=function(e,t,n){var r=(e=e||{}).random||(e.rng||Oe)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Be[e[t+0]]+Be[e[t+1]]+Be[e[t+2]]+Be[e[t+3]]+"-"+Be[e[t+4]]+Be[e[t+5]]+"-"+Be[e[t+6]]+Be[e[t+7]]+"-"+Be[e[t+8]]+Be[e[t+9]]+"-"+Be[e[t+10]]+Be[e[t+11]]+Be[e[t+12]]+Be[e[t+13]]+Be[e[t+14]]+Be[e[t+15]]).toLowerCase();if(!De(n))throw TypeError("Stringified UUID is invalid");return n}(r)};const ze=Object.create(null);function He(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{since:n,version:r,alternative:o,plugin:i,link:a,hint:s}=t,l=i?` from ${i}`:"",c=n?` since version ${n}`:"",u=r?` and will be removed${l} in version ${r}`:"",d=o?` Please use ${o} instead.`:"",p=a?` See: ${a}`:"",f=s?` Note: ${s}`:"",m=`${e} is deprecated${c}${u}.${d}${p}${f}`;m in ze||((0,V.Kw)("deprecated",e,t,m),console.warn(m),ze[m]=!0)}function Ve(e,t){return{type:"RECEIVE_ITEMS",items:(0,Ee.castArray)(e),persistedEdits:t}}function We(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return{type:"REMOVE_ITEMS",itemIds:(0,Ee.castArray)(n),kind:e,name:t,invalidateCache:r}}function Ze(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return{...Ve(e,n),query:t}}let Ue=null;async function $e(e){if(null===Ue){const e=await ye({path:"/batch/v1",method:"OPTIONS"});Ue=e.endpoints[0].args.requests.maxItems}const t=[];for(const n of(0,Ee.chunk)(e,Ue)){const e=await ye({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map((e=>({path:e.path,body:e.data,method:e.method,headers:e.headers})))}});let r;r=e.failed?e.responses.map((e=>({error:null==e?void 0:e.body}))):e.responses.map((e=>{const t={};return e.status>=200&&e.status<300?t.output=e.body:t.error=e.body,t})),t.push(...r)}return t}class Ge{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(){return this.set.add(...arguments),this.subscribers.forEach((e=>e())),this}delete(){const e=this.set.delete(...arguments);return this.subscribers.forEach((e=>e())),e}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}}const qe="core";function Ke(e,t){return{type:"RECEIVE_USER_QUERY",users:(0,Ee.castArray)(t),queryID:e}}function Ye(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function Xe(e){return{type:"ADD_ENTITIES",entities:e}}function Je(e,t,n,r){let o,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5?arguments[5]:void 0;return"postType"===e&&(n=(0,Ee.castArray)(n).map((e=>"auto-draft"===e.status?{...e,title:""}:e))),o=r?Ze(n,r,a):Ve(n,a),{...o,kind:e,name:t,invalidateCache:i}}function Qe(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function et(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function tt(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function nt(){return He("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function rt(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const ot=function(e,t,n,r){let{__unstableFetch:o=ye}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return async i=>{let{dispatch:a}=i;const s=await a(xt(e)),l=(0,Ee.find)(s,{kind:e,name:t});let c,u=!1;if(!l||null!=l&&l.__experimentalNoFetch)return;const d=await a.__unstableAcquireStoreLock(qe,["entities","data",e,t,n],{exclusive:!0});try{a({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});try{let i=`${l.baseURL}/${n}`;r&&(i=te(i,r)),u=await o({path:i,method:"DELETE"}),await a(We(e,t,n,!0))}catch(e){c=e}return a({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:c}),u}finally{a.__unstableReleaseStoreLock(d)}}},it=function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return i=>{let{select:a,dispatch:s}=i;const l=a.getEntity(e,t);if(!l)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{transientEdits:c={},mergedEdits:u={}}=l,d=a.getRawEntityRecord(e,t,n),p=a.getEditedEntityRecord(e,t,n),f={kind:e,name:t,recordId:n,edits:Object.keys(r).reduce(((e,t)=>{const n=d[t],o=p[t],i=u[t]?{...o,...r[t]}:r[t];return e[t]=(0,Ee.isEqual)(n,i)?void 0:i,e}),{}),transientEdits:c};s({type:"EDIT_ENTITY_RECORD",...f,meta:{undo:!o.undoIgnore&&{...f,edits:Object.keys(r).reduce(((e,t)=>(e[t]=p[t],e)),{})}}})}},at=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getUndoEdit();r&&n({type:"EDIT_ENTITY_RECORD",...r,meta:{isUndo:!0}})},st=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getRedoEdit();r&&n({type:"EDIT_ENTITY_RECORD",...r,meta:{isRedo:!0}})};function lt(){return{type:"CREATE_UNDO_LEVEL"}}const ct=function(e,t,n){let{isAutosave:r=!1,__unstableFetch:o=ye}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return async i=>{let{select:a,resolveSelect:s,dispatch:l}=i;const c=await l(xt(e)),u=(0,Ee.find)(c,{kind:e,name:t});if(!u||null!=u&&u.__experimentalNoFetch)return;const d=u.key||gt,p=n[d],f=await l.__unstableAcquireStoreLock(qe,["entities","data",e,t,p||je()],{exclusive:!0});try{for(const[r,o]of Object.entries(n))if("function"==typeof o){const i=o(a.getEditedEntityRecord(e,t,p));l.editEntityRecord(e,t,p,{[r]:i},{undoIgnore:!0}),n[r]=i}let i,c;l({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:p,isAutosave:r});try{const c=`${u.baseURL}${p?"/"+p:""}`,d=a.getRawEntityRecord(e,t,p);if(r){const r=a.getCurrentUser(),u=r?r.id:void 0,p=s.getAutosave(d.type,d.id,u);let f={...d,...p,...n};if(f=Object.keys(f).reduce(((e,t)=>(["title","excerpt","content"].includes(t)&&(e[t]=f[t]),e)),{status:"auto-draft"===f.status?"draft":f.status}),i=await o({path:`${c}/autosaves`,method:"POST",data:f}),d.id===i.id){let n={...d,...f,...i};n=Object.keys(n).reduce(((e,t)=>(["title","excerpt","content"].includes(t)?e[t]=n[t]:e[t]="status"===t?"auto-draft"===d.status&&"draft"===n.status?n.status:d.status:d[t],e)),{}),l.receiveEntityRecords(e,t,n,void 0,!0)}else l.receiveAutosaves(d.id,i)}else{let r=n;u.__unstablePrePersist&&(r={...r,...u.__unstablePrePersist(d,r)}),i=await o({path:c,method:p?"PUT":"POST",data:r}),l.receiveEntityRecords(e,t,i,void 0,!0,r)}}catch(e){c=e}return l({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:p,error:c,isAutosave:r}),i}finally{l.__unstableReleaseStoreLock(f)}}},ut=e=>async t=>{let{dispatch:n}=t;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$e,t=0,n=[];const r=new Ge;return{add(e){const o=++t;r.add(o);const i=e=>new Promise(((t,i)=>{n.push({input:e,resolve:t,reject:i}),r.delete(o)}));return(0,Ee.isFunction)(e)?Promise.resolve(e(i)).finally((()=>{r.delete(o)})):i(e)},async run(){let t;r.size&&await new Promise((e=>{const t=r.subscribe((()=>{r.size||(t(),e())}))}));try{if(t=await e(n.map((e=>{let{input:t}=e;return t}))),t.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(e){for(const{reject:t}of n)t(e);throw e}let o=!0;for(const[e,{resolve:r,reject:a}]of(0,Ee.zip)(t,n)){var i;null!=e&&e.error?(a(e.error),o=!1):r(null!==(i=null==e?void 0:e.output)&&void 0!==i?i:e)}return n=[],o}}}(),o={saveEntityRecord:(e,t,o,i)=>r.add((r=>n.saveEntityRecord(e,t,o,{...i,__unstableFetch:r}))),saveEditedEntityRecord:(e,t,o,i)=>r.add((r=>n.saveEditedEntityRecord(e,t,o,{...i,__unstableFetch:r}))),deleteEntityRecord:(e,t,o,i,a)=>r.add((r=>n.deleteEntityRecord(e,t,o,i,{...a,__unstableFetch:r})))},i=e.map((e=>e(o))),[,...a]=await Promise.all([r.run(),...i]);return a},dt=(e,t,n,r)=>async o=>{let{select:i,dispatch:a}=o;if(!i.hasEditsForEntityRecord(e,t,n))return;const s=await a(xt(e)),l=(0,Ee.find)(s,{kind:e,name:t});if(!l)return;const c=l.key||gt,u=i.getEntityRecordNonTransientEdits(e,t,n),d={[c]:n,...u};return await a.saveEntityRecord(e,t,d,r)},pt=(e,t,n,r,o)=>async i=>{let{select:a,dispatch:s}=i;if(!a.hasEditsForEntityRecord(e,t,n))return;const l=a.getEntityRecordNonTransientEdits(e,t,n),c={};for(const e in l)r.some((t=>t===e))&&(c[e]=l[e]);return await s.saveEntityRecord(e,t,c,o)};function ft(e){return{type:"RECEIVE_USER_PERMISSION",key:"create/media",isAllowed:e}}function mt(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function ht(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:(0,Ee.castArray)(t)}}const gt="id",vt=["title","excerpt","content"],bt=[{label:U("Base"),name:"__unstableBase",kind:"root",baseURL:"/"},{label:U("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",getTitle:e=>(0,Ee.get)(e,["title"],U("Site Title"))},{label:U("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},rawAttributes:vt},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:U("Media")},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:U("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",plural:"sidebars",transientEdits:{blocks:!0},label:U("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:U("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:U("Widget types")},{label:U("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:U("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:U("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:U("Menu Item"),rawAttributes:["title","content"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:U("Menu Location"),key:"name"},{name:"navigationArea",kind:"root",baseURL:"/wp/v2/block-navigation-areas",baseURLParams:{context:"edit"},plural:"navigationAreas",label:U("Navigation Area"),key:"name",getTitle:e=>null==e?void 0:e.description},{label:U("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>{var t;return(null==e||null===(t=e.title)||void 0===t?void 0:t.rendered)||(null==e?void 0:e.title)}},{label:U("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},key:"stylesheet"},{label:U("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},key:"plugin"}],yt=[{name:"postType",loadEntities:async function(){const e=await ye({path:"/wp/v2/types?context=edit"});return(0,Ee.map)(e,((e,t)=>{var n;const r=["wp_template","wp_template_part"].includes(t);return{kind:"postType",baseURL:`/${null!==(n=null==e?void 0:e.rest_namespace)&&void 0!==n?n:"wp/v2"}/${e.rest_base}`,baseURLParams:{context:"edit"},name:t,label:e.labels.singular_name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:vt,getTitle:e=>{var t;return(null==e||null===(t=e.title)||void 0===t?void 0:t.rendered)||(null==e?void 0:e.title)||(r?(0,Ee.startCase)(e.slug):String(e.id))},__unstablePrePersist:r?void 0:wt,__unstable_rest_base:e.rest_base}}))}},{name:"taxonomy",loadEntities:async function(){const e=await ye({path:"/wp/v2/taxonomies?context=edit"});return(0,Ee.map)(e,((e,t)=>{var n;return{kind:"taxonomy",baseURL:`/${null!==(n=null==e?void 0:e.rest_namespace)&&void 0!==n?n:"wp/v2"}/${e.rest_base}`,baseURLParams:{context:"edit"},name:t,label:e.labels.singular_name}}))}}],wt=(e,t)=>{const n={};return"auto-draft"===(null==e?void 0:e.status)&&(t.status||n.status||(n.status="draft"),t.title&&"Auto Draft"!==t.title||n.title||null!=e&&e.title&&"Auto Draft"!==(null==e?void 0:e.title)||(n.title="")),n},kt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"get",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=(0,Ee.find)(bt,{kind:e,name:t}),i="root"===e?"":(0,Ee.upperFirst)((0,Ee.camelCase)(e)),a=(0,Ee.upperFirst)((0,Ee.camelCase)(t))+(r?"s":""),s=r&&o.plural?(0,Ee.upperFirst)((0,Ee.camelCase)(o.plural)):a;return`${n}${i}${s}`},xt=e=>async t=>{let{select:n,dispatch:r}=t,o=n.getEntitiesByKind(e);if(o&&0!==o.length)return o;const i=(0,Ee.find)(yt,{name:e});return i?(o=await i.loadEntities(),r(Xe(o)),o):[]};var _t=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null},Et=function(e){const t=new WeakMap;return e=>{let n;return t.has(e)?n=t.get(e):(n=function(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let r=0;r<n.length;r++){const o=n[r];let i=e[o];switch(o){case"page":t[o]=Number(i);break;case"per_page":t.perPage=Number(i);break;case"context":t.context=i;break;default:"_fields"===o&&(t.fields=_t(i),i=t.fields.join()),"include"===o&&(t.include=_t(i).map(Number),i=t.include.join()),t.stableKey+=(t.stableKey?"&":"")+te("",{[o]:i}).slice(1)}}return t}(e),(0,Ee.isObjectLike)(e)&&t.set(e,n)),n}}();function Ct(e){const{query:t}=e;return t?Et(t).context:"default"}function St(e,t,n,r){if(1===n&&-1===r)return t;const o=(n-1)*r,i=Math.max(e.length,o+t.length),a=new Array(i);for(let n=0;n<i;n++){const r=n>=o&&n<o+t.length;a[n]=r?t[n-o]:e[n]}return a}const It=(0,Ee.flowRight)([Te((e=>"query"in e)),Ne((e=>e.query?{...e,...Et(e.query)}:e)),Re("context"),Re("stableKey")])((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;const{type:n,page:r,perPage:o,key:i=gt}=t;return"RECEIVE_ITEMS"!==n?e:St(e||[],(0,Ee.map)(t.items,i),r,o)}));var Tt=Se()({items:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":{const n=Ct(t),r=t.key||gt;return{...e,[n]:{...e[n],...t.items.reduce(((t,o)=>{var i;const a=o[r];return t[a]=Ae(null==e||null===(i=e[n])||void 0===i?void 0:i[a],o),t}),{})}}}case"REMOVE_ITEMS":return(0,Ee.mapValues)(e,(e=>(0,Ee.omit)(e,t.itemIds)))}return e},itemIsComplete:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":{const n=Ct(t),{query:r,key:o=gt}=t,i=r?Et(r):{},a=!r||!Array.isArray(i.fields);return{...e,[n]:{...e[n],...t.items.reduce(((t,r)=>{var i;const s=r[o];return t[s]=(null==e||null===(i=e[n])||void 0===i?void 0:i[s])||a,t}),{})}}}case"REMOVE_ITEMS":return(0,Ee.mapValues)(e,(e=>(0,Ee.omit)(e,t.itemIds)))}return e},queries:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":return It(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce(((e,t)=>(e[t]=!0,e)),{});return(0,Ee.mapValues)(e,(e=>(0,Ee.mapValues)(e,(e=>(0,Ee.filter)(e,(e=>!n[e]))))));default:return e}}});function Nt(e){return(0,Ee.flowRight)([Te((t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind)),Ne((t=>({...t,key:e.key||gt})))])(Se()({queriedData:Tt,edits:function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"RECEIVE_ITEMS":if("default"!==(null!==(e=null==r||null===(t=r.query)||void 0===t?void 0:t.context)&&void 0!==e?e:"default"))return n;const o={...n};for(const e of r.items){const t=e[r.key],n=o[t];if(!n)continue;const i=Object.keys(n).reduce(((t,o)=>((0,Ee.isEqual)(n[o],(0,Ee.get)(e[o],"raw",e[o]))||r.persistedEdits&&(0,Ee.isEqual)(n[o],r.persistedEdits[o])||(t[o]=n[o]),t)),{});Object.keys(i).length?o[t]=i:delete o[t]}return o;case"EDIT_ENTITY_RECORD":const i={...n[r.recordId],...r.edits};return Object.keys(i).forEach((e=>{void 0===i[e]&&delete i[e]})),{...n,[r.recordId]:i}}return n},saving:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...e,[t.recordId]:{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}}}return e},deleting:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...e,[t.recordId]:{pending:"DELETE_ENTITY_RECORD_START"===t.type,error:t.error}}}return e}}))}function At(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_ENTITIES":return[...e,...t.entities]}return e}const Pt=[];let Rt;Pt.offset=0;var Lt,Ot,Mt=Se()({terms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_TERMS":return{...e,[t.taxonomy]:t.terms}}return e},users:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{byId:{},queries:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_USER_QUERY":return{byId:{...e.byId,...(0,Ee.keyBy)(t.users,"id")},queries:{...e.queries,[t.queryID]:(0,Ee.map)(t.users,(e=>e.id))}}}return e},currentTheme:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e},currentGlobalStylesId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_GLOBAL_STYLES_ID":return t.id}return e},currentUser:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e},themeBaseGlobalStyles:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLES":return{...e,[t.stylesheet]:t.globalStyles}}return e},taxonomies:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e},entities:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const n=At(e.config,t);let r=e.reducer;if(!r||n!==e.config){const e=(0,Ee.groupBy)(n,"kind");r=Se()(Object.entries(e).reduce(((e,t)=>{let[n,r]=t;const o=Se()(r.reduce(((e,t)=>({...e,[t.name]:Nt(t)})),{}));return e[n]=o,e}),{}))}const o=r(e.data,t);return o===e.data&&n===e.config&&r===e.reducer?e:{reducer:r,data:o,config:n}},undo:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_ENTITY_RECORD":case"CREATE_UNDO_LEVEL":let n="CREATE_UNDO_LEVEL"===t.type;const r=!n&&(t.meta.isUndo||t.meta.isRedo);let o;if(n?t=Rt:r||(Rt=Object.keys(t.edits).some((e=>!t.transientEdits[e]))?t:{...t,edits:{...Rt&&Rt.edits,...t.edits}}),r){if(o=[...e],o.offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return o;n=!0,t=Rt}if(!t.meta.undo)return e;if(!n&&!Object.keys(t.edits).some((e=>!t.transientEdits[e])))return o=[...e],o.flattenedUndo={...e.flattenedUndo,...t.edits},o.offset=e.offset,o;o=o||e.slice(0,e.offset||void 0),o.offset=o.offset||0,o.pop(),n||o.push({kind:t.meta.undo.kind,name:t.meta.undo.name,recordId:t.meta.undo.recordId,edits:{...e.flattenedUndo,...t.meta.undo.edits}});const i=Object.values(t.meta.undo.edits).filter((e=>"function"!=typeof e)),a=Object.values(t.edits).filter((e=>"function"!=typeof e));return(0,Ie.ZP)(i,a)||o.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:n?{...e.flattenedUndo,...t.edits}:t.edits}),o}return e},embedPreviews:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_EMBED_PREVIEW":const{url:n,preview:r}=t;return{...e,[n]:r}}return e},userPermissions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed}}return e},autosaves:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_AUTOSAVES":const{postId:n,autosaves:r}=t;return{...e,[n]:r}}return e}});function Dt(e){return[e]}function Bt(){var e={clear:function(){e.head=null}};return e}function Ft(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 jt(e,t){var n,r;function o(){n=Ot?new WeakMap:Bt()}function i(){var n,o,i,a,s,l=arguments.length;for(a=new Array(l),i=0;i<l;i++)a[i]=arguments[i];for(s=t.apply(null,a),(n=r(s)).isUniqueByDependants||(n.lastDependants&&!Ft(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),o=n.head;o;){if(Ft(o.args,a,1))return o!==n.head&&(o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n.head,o.prev=null,n.head.prev=o,n.head=o),o.val;o=o.next}return o={val:e.apply(null,a)},a[0]=null,o.args=a,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=Dt),r=Ot?function(e){var t,r,o,i,a,s=n,l=!0;for(t=0;t<e.length;t++){if(!(a=r=e[t])||"object"!=typeof a){l=!1;break}s.has(r)?s=s.get(r):(o=new WeakMap,s.set(r,o),s=o)}return s.has(Lt)||((i=Bt()).isUniqueByDependants=l,s.set(Lt,i)),s.get(Lt)}:function(){return n},i.getDependants=t,i.clear=o,o(),i}Lt={},Ot="undefined"!=typeof WeakMap;var zt=n(67775),Ht=n(83909),Vt=n.n(Ht);const Wt=new WeakMap;function Zt(e,t){var n,r;const{stableKey:o,page:i,perPage:a,include:s,fields:l,context:c}=Et(t);let u;if(null!==(n=e.queries)&&void 0!==n&&null!==(r=n[c])&&void 0!==r&&r[o]&&(u=e.queries[c][o]),!u)return null;const d=-1===a?0:(i-1)*a,p=-1===a?u.length:Math.min(d+a,u.length),f=[];for(let t=d;t<p;t++){var m;const n=u[t];if(Array.isArray(s)&&!s.includes(n))continue;if(null===(m=e.items[c])||void 0===m||!m.hasOwnProperty(n))return null;const r=e.items[c][n];let o;if(Array.isArray(l)){o={};for(let e=0;e<l.length;e++){const t=l[e].split("."),n=(0,Ee.get)(r,t);(0,Ee.set)(o,t,n)}}else{var h;if(null===(h=e.itemIsComplete[c])||void 0===h||!h[n])return null;o=r}f.push(o)}return f}const Ut=jt((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Wt.get(e);if(n){const e=n.get(t);if(void 0!==e)return e}else n=new(Vt()),Wt.set(e,n);const r=Zt(e,t);return n.set(t,r),r})),$t={},Gt=[],qt=(0,zt.M)((e=>(t,n)=>e(qe).isResolving("getEmbedPreview",[n])));function Kt(e,t){He("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=te("/wp/v2/users/?who=authors&per_page=100",t);return Xt(e,n)}function Yt(e){return e.currentUser}const Xt=jt(((e,t)=>{const n=e.users.queries[t];return(0,Ee.map)(n,(t=>e.users.byId[t]))}),((e,t)=>[e.users.queries[t],e.users.byId]));function Jt(e,t){return(0,Ee.filter)(e.entities.config,{kind:t})}function Qt(e,t,n){return(0,Ee.find)(e.entities.config,{kind:t,name:n})}const en=jt(((e,t,n,r,o)=>{var i,a;const s=(0,Ee.get)(e.entities.data,[t,n,"queriedData"]);if(!s)return;const l=null!==(i=null==o?void 0:o.context)&&void 0!==i?i:"default";if(void 0===o){var c;if(null===(c=s.itemIsComplete[l])||void 0===c||!c[r])return;return s.items[l][r]}const u=null===(a=s.items[l])||void 0===a?void 0:a[r];if(u&&o._fields){const e={},t=_t(o._fields);for(let n=0;n<t.length;n++){const r=t[n].split("."),o=(0,Ee.get)(u,r);(0,Ee.set)(e,r,o)}return e}return u}),((e,t,n,r,o)=>{var i;const a=null!==(i=null==o?void 0:o.context)&&void 0!==i?i:"default";return[(0,Ee.get)(e.entities.data,[t,n,"queriedData","items",a,r]),(0,Ee.get)(e.entities.data,[t,n,"queriedData","itemIsComplete",a,r])]}));function tn(e,t,n,r){return en(e,t,n,r)}const nn=jt(((e,t,n,r)=>{const o=en(e,t,n,r);return o&&Object.keys(o).reduce(((r,i)=>(function(e,t){return(e.rawAttributes||[]).includes(t)}(Qt(e,t,n),i)?r[i]=(0,Ee.get)(o[i],"raw",o[i]):r[i]=o[i],r)),{})}),((e,t,n,r,o)=>{var i;const a=null!==(i=null==o?void 0:o.context)&&void 0!==i?i:"default";return[e.entities.config,(0,Ee.get)(e.entities.data,[t,n,"queriedData","items",a,r]),(0,Ee.get)(e.entities.data,[t,n,"queriedData","itemIsComplete",a,r])]}));function rn(e,t,n,r){return Array.isArray(on(e,t,n,r))}function on(e,t,n,r){const o=(0,Ee.get)(e.entities.data,[t,n,"queriedData"]);return o?Ut(o,r):Gt}const an=jt((e=>{const{entities:{data:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((o=>{const i=Object.keys(t[r][o].edits).filter((t=>en(e,r,o,t)&&un(e,r,o,t)));if(i.length){const t=Qt(e,r,o);i.forEach((i=>{var a;const s=dn(e,r,o,i);n.push({key:s[t.key||gt],title:(null==t||null===(a=t.getTitle)||void 0===a?void 0:a.call(t,s))||"",name:o,kind:r})}))}}))})),n}),(e=>[e.entities.data])),sn=jt((e=>{const{entities:{data:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((o=>{const i=Object.keys(t[r][o].saving).filter((t=>fn(e,r,o,t)));if(i.length){const t=Qt(e,r,o);i.forEach((i=>{var a;const s=dn(e,r,o,i);n.push({key:s[t.key||gt],title:(null==t||null===(a=t.getTitle)||void 0===a?void 0:a.call(t,s))||"",name:o,kind:r})}))}}))})),n}),(e=>[e.entities.data]));function ln(e,t,n,r){return(0,Ee.get)(e.entities.data,[t,n,"edits",r])}const cn=jt(((e,t,n,r)=>{const{transientEdits:o}=Qt(e,t,n)||{},i=ln(e,t,n,r)||{};return o?Object.keys(i).reduce(((e,t)=>(o[t]||(e[t]=i[t]),e)),{}):i}),((e,t,n,r)=>[e.entities.config,(0,Ee.get)(e.entities.data,[t,n,"edits",r])]));function un(e,t,n,r){return fn(e,t,n,r)||Object.keys(cn(e,t,n,r)).length>0}const dn=jt(((e,t,n,r)=>({...nn(e,t,n,r),...ln(e,t,n,r)})),((e,t,n,r,o)=>{var i;const a=null!==(i=null==o?void 0:o.context)&&void 0!==i?i:"default";return[e.entities.config,(0,Ee.get)(e.entities.data,[t,n,"queriedData","items",a,r]),(0,Ee.get)(e.entities.data,[t,n,"queriedData","itemIsComplete",a,r]),(0,Ee.get)(e.entities.data,[t,n,"edits",r])]}));function pn(e,t,n,r){const{pending:o,isAutosave:i}=(0,Ee.get)(e.entities.data,[t,n,"saving",r],{});return Boolean(o&&i)}function fn(e,t,n,r){return(0,Ee.get)(e.entities.data,[t,n,"saving",r,"pending"],!1)}function mn(e,t,n,r){return(0,Ee.get)(e.entities.data,[t,n,"deleting",r,"pending"],!1)}function hn(e,t,n,r){return(0,Ee.get)(e.entities.data,[t,n,"saving",r,"error"])}function gn(e,t,n,r){return(0,Ee.get)(e.entities.data,[t,n,"deleting",r,"error"])}function vn(e){return e.undo.offset}function bn(e){return e.undo[e.undo.length-2+vn(e)]}function yn(e){return e.undo[e.undo.length+vn(e)]}function wn(e){return Boolean(bn(e))}function kn(e){return Boolean(yn(e))}function xn(e){return en(e,"root","theme",e.currentTheme)}function _n(e){return e.currentGlobalStylesId}function En(e){var t,n;return null!==(t=null===(n=xn(e))||void 0===n?void 0:n.theme_supports)&&void 0!==t?t:$t}function Cn(e,t){return e.embedPreviews[t]}function Sn(e,t){const n=e.embedPreviews[t],r='<a href="'+t+'">'+t+"</a>";return!!n&&n.html===r}function In(e,t,n,r){const o=(0,Ee.compact)([t,n,r]).join("/");return(0,Ee.get)(e,["userPermissions",o])}function Tn(e,t,n,r){const o=Qt(e,t,n);return!!o&&In(e,"update",o.__unstable_rest_base,r)}function Nn(e,t,n){return e.autosaves[n]}function An(e,t,n,r){if(void 0===r)return;const o=e.autosaves[n];return(0,Ee.find)(o,{author:r})}const Pn=(0,zt.M)((e=>(t,n,r)=>e(qe).hasFinishedResolution("getAutosaves",[n,r]))),Rn=jt((()=>[]),(e=>[e.undo.length,e.undo.offset,e.undo.flattenedUndo]));function Ln(e,t){const n=on(e,"postType","wp_template",{"find-template":t}),r=null!=n&&n.length?n[0]:null;return r?dn(e,"postType","wp_template",r.id):r}function On(e){const t=xn(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}var Mn=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return async t=>{let{resolveSelect:r}=t;await r[e](...n)}};const Dn=e=>async t=>{let{dispatch:n}=t;const r=te("/wp/v2/users/?who=authors&per_page=100",e),o=await ye({path:r});n.receiveUserQuery(r,o)},Bn=()=>async e=>{let{dispatch:t}=e;const n=await ye({path:"/wp/v2/users/me"});t.receiveCurrentUser(n)},Fn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return async o=>{let{select:i,dispatch:a}=o;const s=await a(xt(e)),l=(0,Ee.find)(s,{kind:e,name:t});if(!l||null!=l&&l.__experimentalNoFetch)return;const c=await a.__unstableAcquireStoreLock(qe,["entities","data",e,t,n],{exclusive:!1});try{void 0!==r&&r._fields&&(r={...r,_fields:(0,Ee.uniq)([..._t(r._fields)||[],l.key||gt]).join()});const o=te(l.baseURL+(n?"/"+n:""),{...l.baseURLParams,...r});if(void 0!==r&&(r={...r,include:[n]},i.hasEntityRecords(e,t,r)))return;const s=await ye({path:o});a.receiveEntityRecords(e,t,s,r)}catch(e){}finally{a.__unstableReleaseStoreLock(c)}}},jn=Mn("getEntityRecord"),zn=Mn("getEntityRecord"),Hn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async r=>{let{dispatch:o}=r;const i=await o(xt(e)),a=(0,Ee.find)(i,{kind:e,name:t});if(!a||null!=a&&a.__experimentalNoFetch)return;const s=await o.__unstableAcquireStoreLock(qe,["entities","data",e,t],{exclusive:!1});try{var l;n._fields&&(n={...n,_fields:(0,Ee.uniq)([..._t(n._fields)||[],a.key||gt]).join()});const r=te(a.baseURL,{...a.baseURLParams,...n});let i=Object.values(await ye({path:r}));if(n._fields&&(i=i.map((e=>(n._fields.split(",").forEach((t=>{e.hasOwnProperty(t)||(e[t]=void 0)})),e)))),o.receiveEntityRecords(e,t,i,n),!(null!==(l=n)&&void 0!==l&&l._fields||n.context)){const n=a.key||gt,r=i.filter((e=>e[n])).map((r=>[e,t,r[n]]));o({type:"START_RESOLUTIONS",selectorName:"getEntityRecord",args:r}),o({type:"FINISH_RESOLUTIONS",selectorName:"getEntityRecord",args:r})}}catch(e){}finally{o.__unstableReleaseStoreLock(s)}}};Hn.shouldInvalidate=(e,t,n)=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&n===e.name;const Vn=()=>async e=>{let{dispatch:t,resolveSelect:n}=e;const r=await n.getEntityRecords("root","theme",{status:"active"});t.receiveCurrentTheme(r[0])},Wn=Mn("getCurrentTheme"),Zn=e=>async t=>{let{dispatch:n}=t;try{const t=await ye({path:te("/oembed/1.0/proxy",{url:e})});n.receiveEmbedPreview(e,t)}catch(t){n.receiveEmbedPreview(e,!1)}},Un=(e,t,n)=>async r=>{let{dispatch:o}=r;const i={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e];if(!i)throw new Error(`'${e}' is not a valid action.`);const a=n?`/wp/v2/${t}/${n}`:`/wp/v2/${t}`;let s,l;try{s=await ye({path:a,method:n?"GET":"OPTIONS",parse:!1})}catch(e){return}l=(0,Ee.hasIn)(s,["headers","get"])?s.headers.get("allow"):(0,Ee.get)(s,["headers","Allow"],"");const c=(0,Ee.compact)([e,t,n]).join("/"),u=(0,Ee.includes)(l,i);o.receiveUserPermission(c,u)},$n=(e,t,n)=>async r=>{let{dispatch:o}=r;const i=await o(xt(e)),a=(0,Ee.find)(i,{kind:e,name:t});if(!a)return;const s=a.__unstable_rest_base;await o(Un("update",s,n))},Gn=(e,t)=>async n=>{let{dispatch:r,resolveSelect:o}=n;const{rest_base:i}=await o.getPostType(e),a=await ye({path:`/wp/v2/${i}/${t}/autosaves?context=edit`});a&&a.length&&r.receiveAutosaves(t,a)},qn=(e,t)=>async n=>{let{resolveSelect:r}=n;await r.getAutosaves(e,t)},Kn=e=>async t=>{let n,{dispatch:r,resolveSelect:o}=t;try{n=await window.fetch(te(e,{"_wp-find-template":!0})).then((e=>e.json())).then((e=>{let{data:t}=e;return t}))}catch(e){}if(!n)return;const i=await o.getEntityRecord("postType","wp_template",n.id);i&&r.receiveEntityRecords("postType","wp_template",[i],{"find-template":e})};Kn.shouldInvalidate=e=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&"postType"===e.kind&&"wp_template"===e.name;const Yn=()=>async e=>{let{dispatch:t,resolveSelect:n}=e;const r=await n.getEntityRecords("root","theme",{status:"active"}),o=(0,Ee.get)(r,[0,"_links","wp:user-global-styles",0,"href"]);if(o){const e=await ye({url:o});t.__experimentalReceiveCurrentGlobalStylesId(e.id)}},Xn=()=>async e=>{let{resolveSelect:t,dispatch:n}=e;const r=await t.getCurrentTheme(),o=await ye({path:`/wp/v2/global-styles/themes/${r.stylesheet}`});await n.__experimentalReceiveThemeBaseGlobalStyles(r.stylesheet,o)};function Jn(e,t){const n={...e};let r=n;for(const e of t)r.children={...r.children,[e]:{locks:[],children:{},...r.children[e]}},r=r.children[e];return n}function Qn(e,t){let n=e;for(const e of t){const t=n.children[e];if(!t)return null;n=t}return n}function er(e,t){let{exclusive:n}=e;return!(!n||!t.length)||!(n||!t.filter((e=>e.exclusive)).length)}const tr={requests:[],tree:{locks:[],children:{}}};function nr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:r}=t,{store:o,path:i}=r,a=[o,...i],s=Jn(e.tree,a),l=Qn(s,a);return l.locks=[...l.locks,n],{...e,requests:e.requests.filter((e=>e!==r)),tree:s}}case"RELEASE_LOCK":{const{lock:n}=t,r=[n.store,...n.path],o=Jn(e.tree,r),i=Qn(o,r);return i.locks=i.locks.filter((e=>e!==n)),{...e,tree:o}}}return e}function rr(e,t,n,r){let{exclusive:o}=r;const i=[t,...n],a=e.tree;for(const e of function*(e,t){let n=e;yield n;for(const e of t){const t=n.children[e];if(!t)break;yield t,n=t}}(a,i))if(er({exclusive:o},e.locks))return!1;const s=Qn(a,i);if(!s)return!0;for(const e of function*(e){const t=Object.values(e.children);for(;t.length;){const e=t.pop();yield e,t.push(...Object.values(e.children))}}(s))if(er({exclusive:o},e.locks))return!1;return!0}function or(){let e=nr(void 0,{type:"@@INIT"});function t(){for(const t of function(e){return e.requests}(e)){const{store:n,path:r,exclusive:o,notifyAcquired:i}=t;if(rr(e,n,r,{exclusive:o})){const a={store:n,path:r,exclusive:o};e=nr(e,{type:"GRANT_LOCK_REQUEST",lock:a,request:t}),i(a)}}}return{acquire:function(n,r,o){return new Promise((i=>{e=nr(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:n,path:r,exclusive:o,notifyAcquired:i}}),t()}))},release:function(n){e=nr(e,{type:"RELEASE_LOCK",lock:n}),t()}}}const ir=bt.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[kt(n,r)]=(e,t,o)=>en(e,n,r,t,o),e[kt(n,r,"get",!0)]=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];return on(e,n,r,...o)},e}),{}),ar=bt.reduce(((e,t)=>{const{kind:n,name:r}=t;e[kt(n,r)]=(e,t)=>Fn(n,r,e,t);const o=kt(n,r,"get",!0);return e[o]=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return Hn(n,r,...t)},e[o].shouldInvalidate=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];return Hn.shouldInvalidate(e,n,r,...o)},e}),{}),sr=bt.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[kt(n,r,"save")]=e=>ct(n,r,e),e[kt(n,r,"delete")]=(e,t)=>ot(n,r,e,t),e}),{}),lr=(0,_e.Z)(qe,{reducer:Mt,actions:{...r,...sr,...function(){const e=or();return{__unstableAcquireStoreLock:function(t,n,r){let{exclusive:o}=r;return()=>e.acquire(t,n,o)},__unstableReleaseStoreLock:function(t){return()=>e.release(t)}}}()},selectors:{...o,...ir},resolvers:{...i,...ar},__experimentalUseThunks:!0});(0,xe.z2)(lr);var cr=n(94878),ur=n(41882),dr=n(87462),pr=(0,_.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function fr(e){let{name:t,children:n,registerFill:r,unregisterFill:o}=e;const i=(e=>{const{getSlot:t,subscribe:n}=(0,_.useContext)(pr),[r,o]=(0,_.useState)(t(e));return(0,_.useEffect)((()=>(o(t(e)),n((()=>{o(t(e))})))),[e]),r})(t),a=(0,_.useRef)({name:t,children:n});return(0,_.useLayoutEffect)((()=>(r(t,a.current),()=>o(t,a.current))),[]),(0,_.useLayoutEffect)((()=>{a.current.children=n,i&&i.forceUpdate()}),[n]),(0,_.useLayoutEffect)((()=>{t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,r(t,a.current))}),[t]),i&&i.node?((0,Ee.isFunction)(n)&&(n=n(i.props.fillProps)),(0,C.createPortal)(n,i.node)):null}var mr=e=>(0,_.createElement)(pr.Consumer,null,(t=>{let{registerFill:n,unregisterFill:r}=t;return(0,_.createElement)(fr,(0,dr.Z)({},e,{registerFill:n,unregisterFill:r}))}));const hr=e=>!(0,Ee.isNumber)(e)&&((0,Ee.isString)(e)||(0,Ee.isArray)(e)?!e.length:!e);class gr extends _.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:n={},getFills:r}=this.props,o=(0,Ee.map)(r(t,this),(e=>{const t=(0,Ee.isFunction)(e.children)?e.children(n):e.children;return _.Children.map(t,((e,t)=>{if(!e||(0,Ee.isString)(e))return e;const n=e.key||t;return(0,_.cloneElement)(e,{key:n})}))})).filter((0,Ee.negate)(hr));return(0,_.createElement)(_.Fragment,null,(0,Ee.isFunction)(e)?e(o):o)}}var vr=e=>(0,_.createElement)(pr.Consumer,null,(t=>{let{registerSlot:n,unregisterSlot:r,getFills:o}=t;return(0,_.createElement)(gr,(0,dr.Z)({},e,{registerSlot:n,unregisterSlot:r,getFills:o}))})),br=n(34155),yr=(0,_.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==br&&br.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function wr(e){const t=(0,_.useContext)(yr),n=t.slots[e]||{},r=t.fills[e],o=(0,_.useMemo)((()=>r||[]),[r]);return{...n,updateSlot:(0,_.useCallback)((n=>{t.updateSlot(e,n)}),[e,t.updateSlot]),unregisterSlot:(0,_.useCallback)((n=>{t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),fills:o,registerFill:(0,_.useCallback)((n=>{t.registerFill(e,n)}),[e,t.registerFill]),unregisterFill:(0,_.useCallback)((n=>{t.unregisterFill(e,n)}),[e,t.unregisterFill])}}function kr(){const[,e]=(0,_.useState)({}),t=(0,_.useRef)(!0);return(0,_.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function xr(e){let{name:t,children:n}=e;const r=wr(t),o=(0,_.useRef)({rerender:kr()});return(0,_.useEffect)((()=>(r.registerFill(o),()=>{r.unregisterFill(o)})),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof n&&(n=n(r.fillProps)),(0,C.createPortal)(n,r.ref.current)):null}function _r(e,t){"function"==typeof e?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function Er(e){const t=(0,_.useRef)(),n=(0,_.useRef)(!1),r=(0,_.useRef)([]),o=(0,_.useRef)(e);return o.current=e,(0,_.useLayoutEffect)((()=>{!1===n.current&&e.forEach(((e,n)=>{const o=r.current[n];e!==o&&(_r(o,null),_r(e,t.current))})),r.current=e}),e),(0,_.useLayoutEffect)((()=>{n.current=!1})),(0,_.useCallback)((e=>{_r(t,e),n.current=!0;const i=e?o.current:r.current;for(const t of i)_r(t,e)}),[])}var Cr=(0,_.forwardRef)((function(e,t){let{name:n,fillProps:r={},as:o="div",...i}=e;const a=(0,_.useContext)(yr),s=(0,_.useRef)();return(0,_.useLayoutEffect)((()=>(a.registerSlot(n,s,r),()=>{a.unregisterSlot(n,s)})),[a.registerSlot,a.unregisterSlot,n]),(0,_.useLayoutEffect)((()=>{a.updateSlot(n,r)})),(0,_.createElement)(o,(0,dr.Z)({ref:Er([t,s])},i))}));function Sr(e){let{children:t}=e;const n=function(){const[e,t]=(0,_.useState)({}),[n,r]=(0,_.useState)({}),o=(0,_.useCallback)(((e,n,r)=>{t((t=>{const o=t[e]||{};return{...t,[e]:{...o,ref:n||o.ref,fillProps:r||o.fillProps||{}}}}))}),[]),i=(0,_.useCallback)(((e,n)=>{t((t=>{const{[e]:r,...o}=t;return(null==r?void 0:r.ref)===n?o:t}))}),[]),a=(0,_.useCallback)(((t,r)=>{const o=e[t];if(o&&!(0,Ie.ZP)(o.fillProps,r)){o.fillProps=r;const e=n[t];e&&e.map((e=>e.current.rerender()))}}),[e,n]),s=(0,_.useCallback)(((e,t)=>{r((n=>({...n,[e]:[...n[e]||[],t]})))}),[]),l=(0,_.useCallback)(((e,t)=>{r((n=>n[e]?{...n,[e]:n[e].filter((e=>e!==t))}:n))}),[]);return(0,_.useMemo)((()=>({slots:e,fills:n,registerSlot:o,updateSlot:a,unregisterSlot:i,registerFill:s,unregisterFill:l})),[e,n,o,a,i,s,l])}();return(0,_.createElement)(yr.Provider,{value:n},t)}class Ir extends _.Component{constructor(){super(...arguments),this.registerSlot=this.registerSlot.bind(this),this.registerFill=this.registerFill.bind(this),this.unregisterSlot=this.unregisterSlot.bind(this),this.unregisterFill=this.unregisterFill.bind(this),this.getSlot=this.getSlot.bind(this),this.getFills=this.getFills.bind(this),this.hasFills=this.hasFills.bind(this),this.subscribe=this.subscribe.bind(this),this.slots={},this.fills={},this.listeners=[],this.contextValue={registerSlot:this.registerSlot,unregisterSlot:this.unregisterSlot,registerFill:this.registerFill,unregisterFill:this.unregisterFill,getSlot:this.getSlot,getFills:this.getFills,hasFills:this.hasFills,subscribe:this.subscribe}}registerSlot(e,t){const n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}registerFill(e,t){this.fills[e]=[...this.fills[e]||[],t],this.forceUpdateSlot(e)}unregisterSlot(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}unregisterFill(e,t){this.fills[e]=(0,Ee.without)(this.fills[e],t),this.forceUpdateSlot(e)}getSlot(e){return this.slots[e]}getFills(e,t){return this.slots[e]!==t?[]:this.fills[e]}hasFills(e){return this.fills[e]&&!!this.fills[e].length}forceUpdateSlot(e){const t=this.getSlot(e);t&&t.forceUpdate()}triggerListeners(){this.listeners.forEach((e=>e()))}subscribe(e){return this.listeners.push(e),()=>{this.listeners=(0,Ee.without)(this.listeners,e)}}render(){return(0,_.createElement)(pr.Provider,{value:this.contextValue},this.props.children)}}function Tr(e){return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(mr,e),(0,_.createElement)(xr,e))}const Nr=(0,_.forwardRef)(((e,t)=>{let{bubblesVirtually:n,...r}=e;return n?(0,_.createElement)(Cr,(0,dr.Z)({},r,{ref:t})):(0,_.createElement)(vr,r)}));function Ar(e){let{children:t,...n}=e;return(0,_.createElement)(Ir,n,(0,_.createElement)(Sr,null,t))}function Pr(e){const t=t=>(0,_.createElement)(Tr,(0,dr.Z)({name:e},t));t.displayName=e+"Fill";const n=t=>(0,_.createElement)(Nr,(0,dr.Z)({name:e},t));return n.displayName=e+"Slot",n.__unstableName=e,{Fill:t,Slot:n}}var Rr=n(78596),Lr=n.n(Rr);function Or(e){if(!e.collapsed){const t=Array.from(e.getClientRects());if(1===t.length)return t[0];const n=t.filter((e=>{let{width:t}=e;return t>1}));if(0===n.length)return e.getBoundingClientRect();if(1===n.length)return n[0];let{top:r,bottom:o,left:i,right:a}=n[0];for(const{top:e,bottom:t,left:s,right:l}of n)e<r&&(r=e),t>o&&(o=t),s<i&&(i=s),l>a&&(a=l);return new window.DOMRect(i,r,a-i,o-r)}const{startContainer:t}=e,{ownerDocument:n}=t;if("BR"===t.nodeName){const{parentNode:r}=t,o=Array.from(r.childNodes).indexOf(t);(e=n.createRange()).setStart(r,o),e.setEnd(r,o)}let r=e.getClientRects()[0];if(!r){const t=n.createTextNode("");(e=e.cloneRange()).insertNode(t),r=e.getClientRects()[0],t.parentNode,t.parentNode.removeChild(t)}return r}function Mr(e){const[t,n]=(0,_.useState)((()=>!(!e||"undefined"==typeof window||!window.matchMedia(e).matches)));return(0,_.useEffect)((()=>{if(!e)return;const t=()=>n(window.matchMedia(e).matches);t();const r=window.matchMedia(e);return r.addListener(t),()=>{r.removeListener(t)}}),[e]),!!e&&t}const Dr={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},Br={">=":"min-width","<":"max-width"},Fr={">=":(e,t)=>t>=e,"<":(e,t)=>t<e},jr=(0,_.createContext)(null),zr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">=";const n=(0,_.useContext)(jr),r=!n&&`(${Br[t]}: ${Dr[e]}px)`,o=Mr(r||void 0);return n?Fr[t](Dr[e],n):o};zr.__experimentalWidthProvider=jr.Provider;var Hr=zr,Vr=n(5464),Wr=n.n(Vr),Zr=Wr();function Ur(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e){if("undefined"==typeof window)return!1;e=window}const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||(0,Ee.includes)(["iPad","iPhone"],t)}const $r=13,Gr=27,qr=37,Kr=38,Yr=39,Xr=40,Jr="alt",Qr="ctrl",eo="meta",to="shift",no={primary:e=>e()?[eo]:[Qr],primaryShift:e=>e()?[to,eo]:[Qr,to],primaryAlt:e=>e()?[Jr,eo]:[Qr,Jr],secondary:e=>e()?[to,Jr,eo]:[Qr,to,Jr],access:e=>e()?[Qr,Jr]:[to,Jr],ctrl:()=>[Qr],alt:()=>[Jr],ctrlShift:()=>[Qr,to],shift:()=>[to],shiftAlt:()=>[to,Jr],undefined:()=>[]},ro=(0,Ee.mapValues)(no,(e=>function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ur;return[...e(n),t.toLowerCase()].join("+")})),oo=(0,Ee.mapValues)(no,(e=>function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ur;const r=n(),o={[Jr]:r?"⌥":"Alt",[Qr]:r?"⌃":"Ctrl",[eo]:"⌘",[to]:r?"⇧":"Shift"},i=e(n).reduce(((e,t)=>{const n=(0,Ee.get)(o,t,t);return r?[...e,n]:[...e,n,"+"]}),[]),a=(0,Ee.capitalize)(t);return[...i,a]})),io=(0,Ee.mapValues)(oo,(e=>function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ur;return e(t,n).join("")})),ao=(0,Ee.mapValues)(no,(e=>function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ur;const r=n(),o={[to]:"Shift",[eo]:r?"Command":"Control",[Qr]:"Control",[Jr]:r?"Option":"Alt",",":U("Comma"),".":U("Period"),"`":U("Backtick")};return[...e(n),t].map((e=>(0,Ee.capitalize)((0,Ee.get)(o,e,e)))).join(r?" ":" + ")}));function so(e){return[Jr,Qr,eo,to].filter((t=>e[`${t}Key`]))}const lo=(0,Ee.mapValues)(no,(e=>function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ur;const o=e(r),i=so(t);if((0,Ee.xor)(o,i).length)return!1;let a=t.key.toLowerCase();return n?(t.altKey&&1===n.length&&(a=String.fromCharCode(t.keyCode).toLowerCase()),"del"===n&&(n="delete"),a===n.toLowerCase()):(0,Ee.includes)(o,a)}));function co(e){return[e?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function uo(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function po(e){const t=e.closest("map[name]");if(!t)return!1;const n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&uo(n)}function fo(e){let{sequential:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.querySelectorAll(co(t));return Array.from(n).filter((e=>{if(!uo(e))return!1;const{nodeName:t}=e;return"AREA"!==t||po(e)}))}function mo(e){const t=e.getAttribute("tabindex");return null===t?0:parseInt(t,10)}function ho(e){return-1!==mo(e)}function go(e,t){return{element:e,index:t}}function vo(e){return e.element}function bo(e,t){const n=mo(e.element),r=mo(t.element);return n===r?e.index-t.index:n-r}function yo(e){return e.filter(ho).map(go).sort(bo).map(vo).reduce(function(){const e={};return function(t,n){const{nodeName:r,type:o,checked:i,name:a}=n;if("INPUT"!==r||"radio"!==o||!a)return t.concat(n);const s=e.hasOwnProperty(a);if(!i&&s)return t;if(s){const n=e[a];t=(0,Ee.without)(t,n)}return e[a]=n,t.concat(n)}}(),[])}function wo(e){return yo(fo(e))}function ko(e){const t=fo(e.ownerDocument.body),n=t.indexOf(e);return t.length=n,(0,Ee.last)(yo(t))}function xo(e){const t=fo(e.ownerDocument.body),n=t.indexOf(e),r=t.slice(n+1);return(0,Ee.first)(yo(r))}const _o={focusable:a,tabbable:s};function Eo(e,t){const n=(0,_.useRef)();return(0,_.useCallback)((t=>{t?n.current=e(t):n.current&&n.current()}),t)}var Co=function(){return Eo((e=>{let t;function n(n){const{keyCode:r,shiftKey:o,target:i}=n;if(9!==r)return;const a=o?"findPrevious":"findNext",s=_o.tabbable[a](i)||null;if(e.contains(s))return;const l=o?"append":"prepend",{ownerDocument:c}=e,u=c.createElement("div");u.tabIndex=-1,e[l](u),u.focus(),t=setTimeout((()=>e.removeChild(u)))}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n),clearTimeout(t)}}),[])};function So(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"firstElement";const t=(0,_.useRef)(e);return(0,_.useEffect)((()=>{t.current=e}),[e]),(0,_.useCallback)((e=>{var n,r;if(!e||!1===t.current)return;if(e.contains(null!==(n=null===(r=e.ownerDocument)||void 0===r?void 0:r.activeElement)&&void 0!==n?n:null))return;let o=e;if("firstElement"===t.current){const t=_o.tabbable.find(e)[0];t&&(o=t)}o.focus()}),[])}var Io=function(e){const t=(0,_.useRef)(null),n=(0,_.useRef)(null),r=(0,_.useRef)(e);return(0,_.useEffect)((()=>{r.current=e}),[e]),(0,_.useCallback)((e=>{if(e){if(t.current=e,n.current)return;n.current=e.ownerDocument.activeElement}else if(n.current){var o,i,a;const e=null===(o=t.current)||void 0===o?void 0:o.contains(null===(i=t.current)||void 0===i?void 0:i.ownerDocument.activeElement);if(null!==(a=t.current)&&void 0!==a&&a.isConnected&&!e)return;var s;r.current?r.current():null===(s=n.current)||void 0===s||s.focus()}}),[])};const To=["button","submit"];function No(e){const t=(0,_.useRef)(e);(0,_.useEffect)((()=>{t.current=e}),[e]);const n=(0,_.useRef)(!1),r=(0,_.useRef)(),o=(0,_.useCallback)((()=>{clearTimeout(r.current)}),[]);(0,_.useEffect)((()=>()=>o()),[]),(0,_.useEffect)((()=>{e||o()}),[e,o]);const i=(0,_.useCallback)((e=>{const{type:t,target:r}=e;(0,Ee.includes)(["mouseup","touchend"],t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return(0,Ee.includes)(To,e.type)}return!1}(r)&&(n.current=!0)}),[]),a=(0,_.useCallback)((e=>{e.persist(),n.current||(r.current=setTimeout((()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()}),0))}),[]);return{onFocus:o,onMouseDown:i,onMouseUp:i,onTouchStart:i,onTouchEnd:i,onBlur:a}}const Ao=e=>(0,_.createElement)("g",e),Po=e=>(0,_.createElement)("path",e),Ro=e=>(0,_.createElement)("rect",e),Lo=e=>{let{className:t,isPressed:n,...r}=e;const o={...r,className:Lr()(t,{"is-pressed":n})||void 0,role:"img","aria-hidden":!0,focusable:!1};return(0,_.createElement)("svg",o)};var Oo=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"}));function Mo(e,t,n,r,o,i,a,s,l){const{width:c}=t;"left"===n&&q()?n="right":"right"===n&&q()&&(n="left"),"left"===r&&q()?r="right":"right"===r&&q()&&(r="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-c/2>0?c/2:u)+(u+c/2>window.innerWidth?window.innerWidth-u:c/2)};let p=e.left;"right"===r?p=e.right:"middle"===i||l||(p=u);let f=e.right;"left"===r?f=e.left:"middle"===i||l||(f=u);const m={popoverLeft:p,contentWidth:p-c>0?c:p},h={popoverLeft:f,contentWidth:f+c>window.innerWidth?window.innerWidth-f:c};let g,v=n,b=null;if(!o&&!s)if("center"===n&&d.contentWidth===c)v="center";else if("left"===n&&m.contentWidth===c)v="left";else if("right"===n&&h.contentWidth===c)v="right";else{v=m.contentWidth>h.contentWidth?"left":"right";const e="left"===v?m.contentWidth:h.contentWidth;c>window.innerWidth&&(b=window.innerWidth),e!==c&&(v="center",d.popoverLeft=window.innerWidth/2)}return g="center"===v?d.popoverLeft:"left"===v?m.popoverLeft:h.popoverLeft,a&&(g=Math.min(g,a.offsetLeft+a.offsetWidth-c),q()||(g=Math.max(g,0))),{xAxis:v,popoverLeft:g,contentWidth:b}}function Do(e,t,n,r,o,i,a,s,l){const{height:c}=t;if(o){const t=o.getBoundingClientRect(),r=t.top+c-a,i=t.bottom-c-a;if(e.top<=r)return!l||c+10<l.scrollTop+e.top?{yAxis:n,popoverTop:Math.min(e.bottom,r)}:{yAxis:"bottom",popoverTop:Math.min(e.bottom,i)}}let u=e.top+e.height/2;"bottom"===r?u=e.bottom:"top"===r&&(u=e.top);const d={popoverTop:u,contentHeight:(u-c/2>0?c/2:u)+(u+c/2>window.innerHeight?window.innerHeight-u:c/2)},p={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},f={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c};let m,h=n,g=null;if(!o&&!s)if("middle"===n&&d.contentHeight===c)h="middle";else if("top"===n&&p.contentHeight===c)h="top";else if("bottom"===n&&f.contentHeight===c)h="bottom";else{h=p.contentHeight>f.contentHeight?"top":"bottom";const e="top"===h?p.contentHeight:f.contentHeight;g=e!==c?e:null}return m="middle"===h?d.popoverTop:"top"===h?p.popoverTop:f.popoverTop,{yAxis:h,popoverTop:m,contentHeight:g}}function Bo(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const i=o.getBoundingClientRect();return new r.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}const Fo=new WeakMap;function jo(e){const t=Fo.get(e)||0;return Fo.set(e,t+1),t}function zo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,_.useMemo)((()=>{if(n)return n;const r=jo(e);return t?`${t}-${r}`:r}),[e])}var Ho=n(51163);function Vo(e,t,n){const r=(0,Ho.Pr)((()=>(0,Ee.debounce)(e,t,n)),[e,t,n]);return(0,_.useEffect)((()=>()=>r.cancel()),[r]),r}var Wo=function(e){let t,n,{shortcut:r,className:o}=e;return r?((0,Ee.isString)(r)&&(t=r),(0,Ee.isObject)(r)&&(t=r.display,n=r.ariaLabel),(0,_.createElement)("span",{className:o,"aria-label":n},t)):null};const Zo=700,Uo=(0,_.createElement)("div",{className:"event-catcher"}),$o=e=>{let{eventHandlers:t,child:n,childrenWithPopover:r}=e;return(0,_.cloneElement)((0,_.createElement)("span",{className:"disabled-element-wrapper"},(0,_.cloneElement)(Uo,t),(0,_.cloneElement)(n,{children:r})),t)},Go=e=>{let{child:t,eventHandlers:n,childrenWithPopover:r}=e;return(0,_.cloneElement)(t,{...n,children:r})},qo=e=>{let{grandchildren:t,isOver:n,position:r,text:o,shortcut:i}=e;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t,n)=>(_.Children.forEach(t,((t,r)=>{t&&"string"!=typeof t&&(t=(0,_.cloneElement)(t,{key:[n,r].join()})),e.push(t)})),e)),[])}(t,n&&(0,_.createElement)(Na,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,(0,_.createElement)(Wo,{className:"components-tooltip__shortcut",shortcut:i})))},Ko=(e,t,n)=>{if(1!==_.Children.count(e))return;const r=_.Children.only(e);r.props.disabled||"function"==typeof r.props[t]&&r.props[t](n)};var Yo=function(e){const{children:t,position:n,text:r,shortcut:o,delay:i=Zo}=e,[a,s]=(0,_.useState)(!1),[l,c]=(0,_.useState)(!1),u=Vo(c,i),d=e=>{Ko(t,"onMouseDown",e),document.addEventListener("mouseup",m),s(!0)},p=e=>{Ko(t,"onMouseUp",e),document.removeEventListener("mouseup",m),s(!1)},f=e=>"mouseUp"===e?p:"mouseDown"===e?d:void 0,m=f("mouseUp"),h=(e,n)=>r=>{if(Ko(t,e,r),r.currentTarget.disabled)return;if("focus"===r.type&&a)return;u.cancel();const o=(0,Ee.includes)(["focus","mouseenter"],r.type);o!==l&&(n?u(o):c(o))},g=()=>{u.cancel(),document.removeEventListener("mouseup",m)};if((0,_.useEffect)((()=>g),[]),1!==_.Children.count(t))return t;const v={onMouseEnter:h("onMouseEnter",!0),onMouseLeave:h("onMouseLeave"),onClick:h("onClick"),onFocus:h("onFocus"),onBlur:h("onBlur"),onMouseDown:f("mouseDown")},b=_.Children.only(t),{children:y,disabled:w}=b.props;return(w?$o:Go)({child:b,eventHandlers:v,childrenWithPopover:qo({grandchildren:y,isOver:l,position:n,text:r,shortcut:o})})},Xo=function(e){let{icon:t,className:n,...r}=e;const o=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return(0,_.createElement)("span",(0,dr.Z)({className:o},r))},Jo=function(e){let{icon:t=null,size:n=24,...r}=e;if("string"==typeof t)return(0,_.createElement)(Xo,(0,dr.Z)({icon:t},r));if((0,_.isValidElement)(t)&&Xo===t.type)return(0,_.cloneElement)(t,{...r});if("function"==typeof t)return t.prototype instanceof _.Component?(0,_.createElement)(t,{size:n,...r}):t({size:n,...r});if(t&&("svg"===t.type||t.type===Lo)){const e={width:n,height:n,...t.props,...r};return(0,_.createElement)(Lo,e)}return(0,_.isValidElement)(t)?(0,_.cloneElement)(t,{size:n,...r}):t},Qo=n(34155);const ei=(0,_.createContext)({}),ti=()=>(0,_.useContext)(ei);function ni(e){let{value:t}=e;const n=ti(),r=(0,_.useRef)(t);return function(e,n){const o=(0,_.useRef)(!1);(0,_.useEffect)((()=>{o.current?(0,Ee.isEqual)(r.current,t)&&r.current!==t&&void 0!==Qo&&Qo.env:o.current=!0}),n)}(0,[t]),(0,_.useMemo)((()=>(0,Ee.merge)((0,Ee.cloneDeep)(n),t)),[n,t])}(0,_.memo)((e=>{let{children:t,value:n}=e;const r=ni({value:n});return(0,_.createElement)(ei.Provider,{value:r},t)}));const ri=T()((function(e){return`components-${(0,Ee.kebabCase)(e)}`}));var oi=n(5638);function ii(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var ai=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},si=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),li=n(46411),ci=n(26686),ui=n(19685),di=n(20211),pi=n(92190),fi=function(e,t,n){for(var r=0,o=0;r=o,o=(0,li.fj)(),38===r&&12===o&&(t[n]=1),!(0,li.r)(o);)(0,li.lp)();return(0,li.tP)(e,li.FK)},mi=new WeakMap,hi=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||mi.get(n))&&!r){mi.set(e,!0);for(var o=[],i=function(e,t){return(0,li.cE)(function(e,t){var n=-1,r=44;do{switch((0,li.r)(r)){case 0:38===r&&12===(0,li.fj)()&&(t[n]=1),e[n]+=fi(li.FK-1,t,n);break;case 2:e[n]+=(0,li.iF)(r);break;case 4:if(44===r){e[++n]=58===(0,li.fj)()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=(0,ci.Dp)(r)}}while(r=(0,li.lp)());return e}((0,li.un)(e),t))}(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},gi=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},vi=[ui.Ji],bi=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||vi,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c=[hi,gi],u=[di.P,(0,ui.cD)((function(e){l.insert(e)}))],d=(0,ui.qR)(c.concat(i,u));o=function(e,t,n,r){l=n,function(e){(0,di.q)((0,pi.MY)(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new si({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return p.sheet.hydrate(s),p},yi=n(62506),wi=n(40351),ki=n(12717),xi=/[A-Z]|^ms/g,_i=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ei=function(e){return 45===e.charCodeAt(1)},Ci=function(e){return null!=e&&"boolean"!=typeof e},Si=(0,ki.Z)((function(e){return Ei(e)?e:e.replace(xi,"-$&").toLowerCase()})),Ii=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(_i,(function(e,t,n){return Ni={name:t,styles:n,next:Ni},t}))}return 1===wi.Z[e]||Ei(e)||"number"!=typeof t||0===t?t:t+"px"};function Ti(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ni={name:n.name,styles:n.styles,next:Ni},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Ni={name:r.name,styles:r.styles,next:Ni},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ti(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Ci(a)&&(r+=Si(i)+":"+Ii(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Ti(e,t,a);switch(i){case"animation":case"animationName":r+=Si(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Ci(a[l])&&(r+=Si(i)+":"+Ii(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Ni,i=n(e);return Ni=o,Ti(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Ni,Ai=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Pi=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Ni=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Ti(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Ti(n,t,e[a]),r&&(o+=i[a]);Ai.lastIndex=0;for(var s,l="";null!==(s=Ai.exec(o));)l+="-"+s[1];return{name:(0,yi.Z)(o)+l,styles:o,next:Ni}};function Ri(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function Li(e,t,n){var r=[],o=ii(e,r,n);return r.length<2?n:o+t(r)}var Oi=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var a in i="",o)o[a]&&a&&(i&&(i+=" "),i+=a);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},Mi=function(e){var t=bi({key:"css"});t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Pi(n,t.registered,void 0);return ai(t,o,!1),t.key+"-"+o.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return Li(t.registered,n,Oi(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Pi(n,t.registered);Ri(t,o)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Pi(n,t.registered),i="animation-"+o.name;return Ri(t,{name:o.name,styles:"@keyframes "+i+"{"+o.styles+"}"}),i},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:ii.bind(null,t.registered),merge:Li.bind(null,t.registered,n)}}(),Di=(Mi.flush,Mi.hydrate,Mi.cx);Mi.merge,Mi.getRegisteredStyles,Mi.injectGlobal,Mi.keyframes,Mi.css,Mi.sheet,Mi.cache;const Bi=e=>null!=e&&["name","styles"].every((t=>void 0!==e[t])),Fi=()=>{const e=(0,oi._)();return(0,_.useCallback)((function(){if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Di(...n.map((t=>Bi(t)?(ai(e,t,!1),`${e.key}-${t.name}`):t)))}),[e])};var ji=n(34155);function zi(e,t){const n=ti();void 0===t&&void 0!==ji&&ji.env;const r=(null==n?void 0:n[t])||{},o={"data-wp-c16t":!0,...(i=t,{"data-wp-component":i})};var i;const{_overrides:a,...s}=r,l=Object.entries(s).length?Object.assign({},s,e):e,c=Fi()(ri(t),e.className),u="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in a)o[e]=a[e];return o.children=u,o.className=c,o}var Hi=n(34155);function Vi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{memo:r=!1}=n;let o=(0,_.forwardRef)(e);r&&(o=(0,_.memo)(o)),void 0===t&&void 0!==Hi&&Hi.env;let i=o.__contextSystemKey__||[t];return Array.isArray(t)&&(i=[...i,...t]),"string"==typeof t&&(i=[...i,t]),o.displayName=t,o.__contextSystemKey__=(0,Ee.uniq)(i),o.selector=`.${ri(t)}`,o}function Wi(e){if(!e)return[];let t=[];return e.__contextSystemKey__&&(t=e.__contextSystemKey__),e.type&&e.type.__contextSystemKey__&&(t=e.type.__contextSystemKey__),t}function Zi(e,t){return!!e&&("string"==typeof t?Wi(e).includes(t):!!Array.isArray(t)&&t.some((t=>Wi(e).includes(t))))}const Ui={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var $i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Gi=(0,ki.Z)((function(e){return $i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));function qi(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Ki=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},Yi=/[A-Z]|^ms/g,Xi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ji=function(e){return 45===e.charCodeAt(1)},Qi=function(e){return null!=e&&"boolean"!=typeof e},ea=(0,ki.Z)((function(e){return Ji(e)?e:e.replace(Yi,"-$&").toLowerCase()})),ta=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Xi,(function(e,t,n){return ra={name:t,styles:n,next:ra},t}))}return 1===wi.Z[e]||Ji(e)||"number"!=typeof t||0===t?t:t+"px"};function na(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return ra={name:n.name,styles:n.styles,next:ra},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)ra={name:r.name,styles:r.styles,next:ra},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=na(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":Qi(a)&&(r+=ea(i)+":"+ta(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=na(e,t,a);switch(i){case"animation":case"animationName":r+=ea(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Qi(a[l])&&(r+=ea(i)+":"+ta(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=ra,i=n(e);return ra=o,na(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var ra,oa=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ia=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";ra=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=na(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=na(n,t,e[a]),r&&(o+=i[a]);oa.lastIndex=0;for(var s,l="";null!==(s=oa.exec(o));)l+="-"+s[1];return{name:(0,yi.Z)(o)+l,styles:o,next:ra}},aa=Gi,sa=function(e){return"theme"!==e},la=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?aa:sa},ca=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},ua=function(){return null},da=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=ca(t,n,i),l=s||la(a),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{d.push(u[0][0]);for(var p=u.length,f=1;f<p;f++)d.push(u[f],u[0][f])}var m=(0,oi.w)((function(e,t,n){var r=c&&e.as||a,i="",u=[],p=e;if(null==e.theme){for(var f in p={},e)p[f]=e[f];p.theme=(0,_.useContext)(oi.T)}"string"==typeof e.className?i=qi(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var m=ia(d.concat(u),t.registered,p);Ki(t,m,"string"==typeof r),i+=t.key+"-"+m.name,void 0!==o&&(i+=" "+o);var h=c&&void 0===s?la(r):l,g={};for(var v in e)c&&"as"===v||h(v)&&(g[v]=e[v]);g.className=i,g.ref=n;var b=(0,_.createElement)(r,g),y=(0,_.createElement)(ua,null);return(0,_.createElement)(_.Fragment,null,y,b)}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+o}}),m.withComponent=function(t,r){return e(t,(0,dr.Z)({},n,r,{shouldForwardProp:ca(m,r,!0)})).apply(void 0,d)},m}};const pa=da("div",{target:"em57xhy0"})("");pa.selector=".components-view",pa.displayName="View";var fa=pa,ma=Vi((function(e,t){const{style:n,...r}=zi(e,"VisuallyHidden");return(0,_.createElement)(fa,(0,dr.Z)({ref:t},r,{style:{...Ui,...n||{}}}))}),"VisuallyHidden");const ha=["onMouseDown","onClick"];var ga=(0,_.forwardRef)((function e(t,n){const{href:r,target:o,isSmall:i,isPressed:a,isBusy:s,isDestructive:l,className:c,disabled:u,icon:d,iconPosition:p="left",iconSize:f,showTooltip:m,tooltipPosition:h,shortcut:g,label:v,children:b,text:y,variant:w,__experimentalIsFocusable:k,describedBy:x,...E}=function(e){let{isDefault:t,isPrimary:n,isSecondary:r,isTertiary:o,isLink:i,variant:a,...s}=e,l=a;var c,u,d,p,f;return n&&(null!==(c=l)&&void 0!==c||(l="primary")),o&&(null!==(u=l)&&void 0!==u||(l="tertiary")),r&&(null!==(d=l)&&void 0!==d||(l="secondary")),t&&(He("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=l)&&void 0!==p||(l="secondary")),i&&(null!==(f=l)&&void 0!==f||(l="link")),{...s,variant:l}}(t),C=zo(e,"components-button__description"),S=Lr()("components-button",c,{"is-secondary":"secondary"===w,"is-primary":"primary"===w,"is-small":i,"is-tertiary":"tertiary"===w,"is-pressed":a,"is-busy":s,"is-link":"link"===w,"is-destructive":l,"has-text":!!d&&!!b,"has-icon":!!d}),I=u&&!k,T=void 0===r||I?"button":"a",N="a"===T?{href:r,target:o}:{type:"button",disabled:I,"aria-pressed":a};if(u&&k){N["aria-disabled"]=!0;for(const e of ha)E[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!I&&(m&&v||g||!!v&&(!b||(0,Ee.isArray)(b)&&!b.length)&&!1!==m),P=x?C:null,R=E["aria-describedby"]||P,L=(0,_.createElement)(T,(0,dr.Z)({},N,E,{className:S,"aria-label":E["aria-label"]||v,"aria-describedby":R,ref:n}),d&&"left"===p&&(0,_.createElement)(Jo,{icon:d,size:f}),y&&(0,_.createElement)(_.Fragment,null,y),d&&"right"===p&&(0,_.createElement)(Jo,{icon:d,size:f}),b);return A?(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Yo,{text:x||v,shortcut:g,position:h},L),x&&(0,_.createElement)(ma,null,(0,_.createElement)("span",{id:P},x))):(0,_.createElement)(_.Fragment,null,L,x&&(0,_.createElement)(ma,null,(0,_.createElement)("span",{id:P},x)))}));let va=0;function ba(e){const t=document.scrollingElement||document.body;e&&(va=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=va)}let ya=0;function wa(){return(0,_.useEffect)((()=>(0===ya&&ba(!0),++ya,()=>{1===ya&&ba(!1),--ya})),[]),null}function ka(e){return"appear"===e?"top":"left"}const xa="Popover",_a=(0,_.createContext)();function Ea(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:i}=(u=t).ownerDocument.defaultView.getComputedStyle(u),a=n?parseInt(n,10):0,s=r?parseInt(r,10):0,l=o?parseInt(o,10):0,c=i?parseInt(i,10):0;var u;return{x:e.left+l,y:e.top+a,width:e.width-l-c,height:e.height-a-s,left:e.left+l,right:e.right-c,top:e.top+a,bottom:e.bottom-s}}function Ca(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Sa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Ia(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const Ta=(0,_.forwardRef)(((e,t)=>{let{headerTitle:n,onClose:r,children:o,className:i,noArrow:a=!0,isAlternate:s,position:l="bottom right",range:c,focusOnMount:u="firstElement",anchorRef:d,shouldAnchorIncludePadding:p,anchorRect:f,getAnchorRect:m,expandOnMobile:h,animate:g=!0,onFocusOutside:v,__unstableStickyBoundaryElement:b,__unstableSlotName:y=xa,__unstableObserveElement:w,__unstableBoundaryParent:k,__unstableForcePosition:x,__unstableForceXAlignment:E,__unstableEditorCanvasWrapper:C,...S}=e;const I=(0,_.useRef)(null),T=(0,_.useRef)(null),N=(0,_.useRef)(),A=Hr("medium","<"),[P,R]=(0,_.useState)(),L=(0,_.useContext)(_a)||y,O=wr(L),M=h&&A,[D,B]=Zr();a=M||a,(0,_.useLayoutEffect)((()=>{if(M)return Ia(N.current,"is-without-arrow",a),Ia(N.current,"is-alternate",s),Ca(N.current,"data-x-axis"),Ca(N.current,"data-y-axis"),Sa(N.current,"top"),Sa(N.current,"left"),Sa(T.current,"maxHeight"),void Sa(T.current,"maxWidth");const e=()=>{if(!N.current||!T.current)return;let e=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return Bo(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return Bo(Or(r),r.endContainer.ownerDocument,i);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=Bo(r.getBoundingClientRect(),r.ownerDocument,i);return o?e:Ea(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=Bo(new window.DOMRect(n.left,n.top,n.width,a.bottom-n.top),e.ownerDocument,i);return o?s:Ea(s,r)}if(!e.current)return;const{parentNode:a}=e.current,s=Bo(a.getBoundingClientRect(),a.ownerDocument,i);return o?s:Ea(s,a)}(I,f,m,d,p,N.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=N.current;let r,o=0;if(t&&t!==n.body){const n=t.getBoundingClientRect();o=n.top,e=new window.DOMRect(e.left-n.left,e.top-n.top,e.width,e.height)}k&&(r=N.current.parentElement);const i=B.height?B:T.current.getBoundingClientRect(),{popoverTop:c,popoverLeft:u,xAxis:h,yAxis:g,contentHeight:v,contentWidth:y}=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,l=arguments.length>9?arguments[9]:void 0;const[c,u="center",d]=n.split(" "),p=Do(e,t,c,d,r,0,o,a,l);return{...Mo(e,t,u,d,r,p.yAxis,i,a,s),...p}}(e,i,l,b,N.current,o,r,x,E,C);"number"==typeof c&&"number"==typeof u&&(Sa(N.current,"top",c+"px"),Sa(N.current,"left",u+"px")),Ia(N.current,"is-without-arrow",a||"center"===h&&"middle"===g),Ia(N.current,"is-alternate",s),Ca(N.current,"data-x-axis",h),Ca(N.current,"data-y-axis",g),Sa(T.current,"maxHeight","number"==typeof v?v+"px":""),Sa(T.current,"maxWidth","number"==typeof y?y+"px":""),R(({left:"right",right:"left"}[h]||"center")+" "+({top:"bottom",bottom:"top"}[g]||"middle"))};e();const{ownerDocument:t}=N.current,{defaultView:n}=t,r=n.setInterval(e,500);let o;const i=()=>{n.cancelAnimationFrame(o),o=n.requestAnimationFrame(e)};n.addEventListener("click",i),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const c=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(d);let u;return c&&c!==t&&(c.defaultView.addEventListener("resize",e),c.defaultView.addEventListener("scroll",e,!0)),w&&(u=new n.MutationObserver(e),u.observe(w,{attributes:!0})),()=>{var a,s;n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",i),n.cancelAnimationFrame(o),c&&c!==t&&(null===(a=c.defaultView)||void 0===a||a.removeEventListener("resize",e),null===(s=c.defaultView)||void 0===s||s.removeEventListener("scroll",e,!0)),u&&u.disconnect()}}),[M,f,m,d,p,l,B,b,w,k]);const F=(e,t)=>{"focus-outside"===e&&v?v(t):r&&r()},[j,z]=function(e){const t=(0,_.useRef)();(0,_.useEffect)((()=>{t.current=e}),Object.values(e));const n=Co(),r=So(e.focusOnMount),o=Io(),i=No((e=>{var n,r;null!==(n=t.current)&&void 0!==n&&n.__unstableOnClose?t.current.__unstableOnClose("focus-outside",e):null!==(r=t.current)&&void 0!==r&&r.onClose&&t.current.onClose()})),a=(0,_.useCallback)((e=>{e&&e.addEventListener("keydown",(e=>{var n;e.keyCode===Gr&&!e.defaultPrevented&&null!==(n=t.current)&&void 0!==n&&n.onClose&&(e.preventDefault(),t.current.onClose())}))}),[]);return[Er([!1!==e.focusOnMount?n:null,!1!==e.focusOnMount?o:null,!1!==e.focusOnMount?r:null,a]),{...i,tabIndex:"-1"}]}({focusOnMount:u,__unstableOnClose:F,onClose:F}),H=Er([N,j,t]),V=Boolean(g&&P)&&function(e){if("loading"===e.type)return Lr()("components-animate__loading");const{type:t,origin:n=ka(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return Lr()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?Lr()("components-animate__slide-in","is-from-"+n):void 0}({type:"appear",origin:P});let W=(0,_.createElement)("div",(0,dr.Z)({className:Lr()("components-popover",i,V,{"is-expanded":M,"is-without-arrow":a,"is-alternate":s})},S,{ref:H},z,{tabIndex:"-1"}),M&&(0,_.createElement)(wa,null),M&&(0,_.createElement)("div",{className:"components-popover__header"},(0,_.createElement)("span",{className:"components-popover__header-title"},n),(0,_.createElement)(ga,{className:"components-popover__close",icon:Oo,onClick:r})),(0,_.createElement)("div",{ref:T,className:"components-popover__content"},(0,_.createElement)("div",{style:{position:"relative"}},D,o)));return O.ref&&(W=(0,_.createElement)(Tr,{name:L},W)),d||f?W:(0,_.createElement)("span",{ref:I},W)}));Ta.Slot=(0,_.forwardRef)((function(e,t){let{name:n=xa}=e;return(0,_.createElement)(Nr,{bubblesVirtually:!0,name:n,className:"popover-slot",ref:t})})),Ta.__unstableSlotNameProvider=_a.Provider;var Na=Ta;const{wp:Aa}=window,Pa=[],Ra=()=>Aa.media.view.MediaFrame.Select.extend({featuredImageToolbar(e){this.createSelectToolbar(e,{text:Aa.media.view.l10n.setFeaturedImage,state:this.options.state})},editState(){const e=this.state("featured-image").get("selection"),t=new Aa.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(t),t.loadEditor()},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new Aa.media.controller.FeaturedImage,new Aa.media.controller.EditImage({model:this.options.editImage})])}}),La=()=>Aa.media.view.MediaFrame.Post.extend({galleryToolbar(){const e=this.state().get("editing");this.toolbar.set(new Aa.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:e?Aa.media.view.l10n.updateGallery:Aa.media.view.l10n.insertGallery,priority:80,requires:{library:!0},click(){const e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},editState(){const e=this.state("gallery").get("selection"),t=new Aa.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(t),t.loadEditor()},createStates:function(){this.on("toolbar:create:main-gallery",this.galleryToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new Aa.media.controller.Library({id:"gallery",title:Aa.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:Aa.media.query((0,Ee.defaults)({type:"image"},this.options.library))}),new Aa.media.controller.EditImage({model:this.options.editImage}),new Aa.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new Aa.media.controller.GalleryAdd])}}),Oa=e=>(0,Ee.pick)(e,["sizes","mime","type","subtype","id","url","alt","link","caption"]),Ma=e=>Aa.media.query({order:"ASC",orderby:"post__in",post__in:e,posts_per_page:-1,query:!0,type:"image"});class Da extends _.Component{constructor(e){let{allowedTypes:t,gallery:n=!1,unstableFeaturedImageFlow:r=!1,modalClass:o,multiple:i=!1,title:a=U("Select or Upload Media")}=e;if(super(...arguments),this.openModal=this.openModal.bind(this),this.onOpen=this.onOpen.bind(this),this.onSelect=this.onSelect.bind(this),this.onUpdate=this.onUpdate.bind(this),this.onClose=this.onClose.bind(this),n)this.buildAndSetGalleryFrame();else{const e={title:a,multiple:i};t&&(e.library={type:t}),this.frame=Aa.media(e)}o&&this.frame.$el.addClass(o),r&&this.buildAndSetFeatureImageFrame(),this.initializeListeners()}initializeListeners(){this.frame.on("select",this.onSelect),this.frame.on("update",this.onUpdate),this.frame.on("open",this.onOpen),this.frame.on("close",this.onClose)}buildAndSetGalleryFrame(){const{addToGallery:e=!1,allowedTypes:t,multiple:n=!1,value:r=Pa}=this.props;if(r===this.lastGalleryValue)return;let o;this.lastGalleryValue=r,this.frame&&this.frame.remove(),o=e?"gallery-library":r&&r.length?"gallery-edit":"gallery",this.GalleryDetailsMediaFrame||(this.GalleryDetailsMediaFrame=La());const i=Ma(r),a=new Aa.media.model.Selection(i.models,{props:i.props.toJSON(),multiple:n});this.frame=new this.GalleryDetailsMediaFrame({mimeType:t,state:o,multiple:n,selection:a,editing:!(!r||!r.length)}),Aa.media.frame=this.frame,this.initializeListeners()}buildAndSetFeatureImageFrame(){const e=Ra(),t=Ma(this.props.value),n=new Aa.media.model.Selection(t.models,{props:t.props.toJSON()});this.frame=new e({mimeType:this.props.allowedTypes,state:"featured-image",multiple:this.props.multiple,selection:n,editing:!!this.props.value}),Aa.media.frame=this.frame}componentWillUnmount(){this.frame.remove()}onUpdate(e){const{onSelect:t,multiple:n=!1}=this.props,r=this.frame.state(),o=e||r.get("selection");o&&o.models.length&&t(n?o.models.map((e=>Oa(e.toJSON()))):Oa(o.models[0].toJSON()))}onSelect(){const{onSelect:e,multiple:t=!1}=this.props,n=this.frame.state().get("selection").toJSON();e(t?n:n[0])}onOpen(){var e;if(this.updateCollection(),!(Array.isArray(this.props.value)?null!==(e=this.props.value)&&void 0!==e&&e.length:this.props.value))return;const t=this.props.gallery,n=this.frame.state().get("selection");t||(0,Ee.castArray)(this.props.value).forEach((e=>{n.add(Aa.media.attachment(e))}));const r=Ma((0,Ee.castArray)(this.props.value));r.more().done((function(){var e;t&&null!=r&&null!==(e=r.models)&&void 0!==e&&e.length&&n.add(r.models)}))}onClose(){const{onClose:e}=this.props;e&&e()}updateCollection(){const e=this.frame.content.get();if(e&&e.collection){const t=e.collection;t.toArray().forEach((e=>e.trigger("destroy",e))),t.mirroring._hasMore=!0,t.more()}}openModal(){this.props.gallery&&this.buildAndSetGalleryFrame(),this.frame.open()}render(){return this.props.render({open:this.openModal})}}var Ba=Da;const{createObjectURL:Fa,revokeObjectURL:ja}=window.URL,za={};function Ha(e){const t=Fa(e);return za[t]=e,t}function Va(e){za[e]&&ja(e),delete za[e]}function Wa(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}async function Za(e){let{allowedTypes:t,additionalData:n={},filesList:r,maxUploadFileSize:o,onError:i=Ee.noop,onFileChange:a,wpAllowedMimeTypes:s=null}=e;const l=[...r],c=[],u=(e,t)=>{Va((0,Ee.get)(c,[e,"url"])),c[e]=t,a((0,Ee.compact)(c))},d=e=>!t||(0,Ee.some)(t,(t=>(0,Ee.includes)(t,"/")?t===e:(0,Ee.startsWith)(e,`${t}/`))),p=(f=s)?(0,Ee.flatMap)(f,((e,t)=>{const[n]=e.split("/"),r=t.split("|");return[e,...(0,Ee.map)(r,(e=>`${n}/${e}`))]})):f;var f;const m=e=>{e.message=[(0,_.createElement)("strong",{key:"filename"},e.file.name),": ",e.message],i(e)},h=[];for(const e of l)p&&e.type&&(g=e.type,!(0,Ee.includes)(p,g))?m({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:U("Sorry, you are not allowed to upload this file type."),file:e}):!e.type||d(e.type)?o&&e.size>o?m({code:"SIZE_ABOVE_LIMIT",message:U("This file exceeds the maximum upload size for this site."),file:e}):e.size<=0?m({code:"EMPTY_FILE",message:U("This file is empty."),file:e}):(h.push(e),c.push({url:Ha(e)}),a(c)):m({code:"MIME_TYPE_NOT_SUPPORTED",message:U("Sorry, this file type is not supported here."),file:e});var g;for(let e=0;e<h.length;++e){const t=h[e];try{const r=await Ua(t,n);u(e,{...(0,Ee.omit)(r,["alt_text","source_url"]),alt:r.alt_text,caption:(0,Ee.get)(r,["caption","raw"],""),title:r.title.raw,url:r.source_url})}catch(n){let r;u(e,null),r=(0,Ee.has)(n,["message"])?(0,Ee.get)(n,["message"]):R(U("Error while uploading file %s to the media library."),t.name),i({code:"GENERAL",message:r,file:t})}}}function Ua(e,t){const n=new window.FormData;return n.append("file",e,e.name||e.type.replace("/",".")),(0,Ee.forEach)(t,((e,t)=>n.append(t,e))),ye({path:"/wp/v2/media",body:n,method:"POST"})}const $a=[{slug:"text",title:U("Text")},{slug:"media",title:U("Media")},{slug:"design",title:U("Design")},{slug:"widgets",title:U("Widgets")},{slug:"theme",title:U("Theme")},{slug:"embed",title:U("Embeds")},{slug:"reusable",title:U("Reusable blocks")}];function Ga(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"REMOVE_BLOCK_TYPES":return-1!==n.names.indexOf(t)?null:t;case e:return n.name||null}return t}}const qa=Ga("SET_DEFAULT_BLOCK_NAME"),Ka=Ga("SET_FREEFORM_FALLBACK_BLOCK_NAME"),Ya=Ga("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),Xa=Ga("SET_GROUPING_BLOCK_NAME");var Ja=Se()({unprocessedBlockTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.blockType.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return(0,Ee.omit)(e,t.names)}return e},blockTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,Ee.keyBy)(t.blockTypes,"name")};case"REMOVE_BLOCK_TYPES":return(0,Ee.omit)(e,t.names)}return e},blockStyles:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,Ee.mapValues)((0,Ee.keyBy)(t.blockTypes,"name"),(t=>(0,Ee.uniqBy)([...(0,Ee.get)(t,["styles"],[]).map((e=>({...e,source:"block"}))),...(0,Ee.get)(e,[t.name],[]).filter((e=>{let{source:t}=e;return"block"!==t}))],(e=>e.name))))};case"ADD_BLOCK_STYLES":return{...e,[t.blockName]:(0,Ee.uniqBy)([...(0,Ee.get)(e,[t.blockName],[]),...t.styles],(e=>e.name))};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:(0,Ee.filter)((0,Ee.get)(e,[t.blockName],[]),(e=>-1===t.styleNames.indexOf(e.name)))}}return e},blockVariations:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,Ee.mapValues)((0,Ee.keyBy)(t.blockTypes,"name"),(t=>(0,Ee.uniqBy)([...(0,Ee.get)(t,["variations"],[]).map((e=>({...e,source:"block"}))),...(0,Ee.get)(e,[t.name],[]).filter((e=>{let{source:t}=e;return"block"!==t}))],(e=>e.name))))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:(0,Ee.uniqBy)([...(0,Ee.get)(e,[t.blockName],[]),...t.variations],(e=>e.name))};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:(0,Ee.filter)((0,Ee.get)(e,[t.blockName],[]),(e=>-1===t.variationNames.indexOf(e.name)))}}return e},defaultBlockName:qa,freeformFallbackBlockName:Ka,unregisteredFallbackBlockName:Ya,groupingBlockName:Xa,categories:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CATEGORIES":return t.categories||[];case"UPDATE_CATEGORY":if(!t.category||(0,Ee.isEmpty)(t.category))return e;if((0,Ee.find)(e,["slug",t.slug]))return(0,Ee.map)(e,(e=>e.slug===t.slug?{...e,...t.category}:e))}return e},collections:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return(0,Ee.omit)(e,t.namespace)}return e}});const Qa=(e,t)=>"string"==typeof t?ns(e,t):t;function es(e){return e.unprocessedBlockTypes}const ts=jt((e=>Object.values(e.blockTypes)),(e=>[e.blockTypes]));function ns(e,t){return e.blockTypes[t]}function rs(e,t){return e.blockStyles[t]}const os=jt(((e,t,n)=>{const r=e.blockVariations[t];return r&&n?r.filter((e=>(e.scope||["block","inserter"]).includes(n))):r}),((e,t)=>[e.blockVariations[t]]));function is(e,t,n,r){const o=os(e,t,r);return null==o?void 0:o.find((r=>{var o;if(Array.isArray(r.isActive)){const o=ns(e,t),i=Object.keys((null==o?void 0:o.attributes)||{}),a=r.isActive.filter((e=>i.includes(e)));return 0!==a.length&&a.every((e=>n[e]===r.attributes[e]))}return null===(o=r.isActive)||void 0===o?void 0:o.call(r,n,r.attributes)}))}function as(e,t,n){const r=os(e,t,n);return(0,Ee.findLast)(r,"isDefault")||(0,Ee.first)(r)}function ss(e){return e.categories}function ls(e){return e.collections}function cs(e){return e.defaultBlockName}function us(e){return e.freeformFallbackBlockName}function ds(e){return e.unregisteredFallbackBlockName}function ps(e){return e.groupingBlockName}const fs=jt(((e,t)=>(0,Ee.map)((0,Ee.filter)(e.blockTypes,(e=>(0,Ee.includes)(e.parent,t))),(e=>{let{name:t}=e;return t}))),(e=>[e.blockTypes])),ms=(e,t,n,r)=>{const o=Qa(e,t);return null!=o&&o.supports?(0,Ee.get)(o.supports,n,r):r};function hs(e,t,n,r){return!!ms(e,t,n,r)}function gs(e,t,n){const r=Qa(e,t),o=(0,Ee.flow)([Ee.deburr,e=>e.toLowerCase(),e=>e.trim()]),i=o(n),a=(0,Ee.flow)([o,e=>(0,Ee.includes)(e,i)]);return a(r.title)||(0,Ee.some)(r.keywords,a)||a(r.category)}const vs=(e,t)=>fs(e,t).length>0,bs=(e,t)=>(0,Ee.some)(fs(e,t),(t=>hs(e,t,"inserter",!0))),ys="core/blocks";var ws={grad:.9,turn:360,rad:360/(2*Math.PI)},ks=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},xs=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},_s=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Es=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Cs=function(e){return{r:_s(e.r,0,255),g:_s(e.g,0,255),b:_s(e.b,0,255),a:_s(e.a)}},Ss=function(e){return{r:xs(e.r),g:xs(e.g),b:xs(e.b),a:xs(e.a,3)}},Is=/^#([0-9a-f]{3,8})$/i,Ts=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ns=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:o}},As=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),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,s,a,a,l,r][c],g:255*[l,r,r,s,a,a][c],b:255*[a,a,l,r,r,s][c],a:o}},Ps=function(e){return{h:Es(e.h),s:_s(e.s,0,100),l:_s(e.l,0,100),a:_s(e.a)}},Rs=function(e){return{h:xs(e.h),s:xs(e.s),l:xs(e.l),a:xs(e.a,3)}},Ls=function(e){return As((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},Os=function(e){return{h:(t=Ns(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},Ms=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ds=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bs=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fs=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,js={string:[[function(e){var t=Is.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?xs(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?xs(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Bs.exec(e)||Fs.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Cs({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=Ms.exec(e)||Ds.exec(e);if(!t)return null;var n,r,o=Ps({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(ws[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Ls(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 ks(t)&&ks(n)&&ks(r)?Cs({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(!ks(t)||!ks(n)||!ks(r))return null;var a=Ps({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return Ls(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!ks(t)||!ks(n)||!ks(r))return null;var a=function(e){return{h:Es(e.h),s:_s(e.s,0,100),v:_s(e.v,0,100),a:_s(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return As(a)},"hsv"]]},zs=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]},Hs=function(e,t){var n=Os(e);return{h:n.h,s:_s(n.s+100*t,0,100),l:n.l,a:n.a}},Vs=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Ws=function(e,t){var n=Os(e);return{h:n.h,s:n.s,l:_s(n.l+100*t,0,100),a:n.a}},Zs=function(){function e(e){this.parsed=function(e){return"string"==typeof e?zs(e.trim(),js.string):"object"==typeof e&&null!==e?zs(e,js.object):[null,void 0]}(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 xs(Vs(this.rgba),2)},e.prototype.isDark=function(){return Vs(this.rgba)<.5},e.prototype.isLight=function(){return Vs(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Ss(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?Ts(xs(255*o)):"","#"+Ts(t)+Ts(n)+Ts(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return Ss(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Ss(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 Rs(Os(this.rgba))},e.prototype.toHslString=function(){return t=(e=Rs(Os(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=Ns(this.rgba),{h:xs(e.h),s:xs(e.s),v:xs(e.v),a:xs(e.a,3)};var e},e.prototype.invert=function(){return Us({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),Us(Hs(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Us(Hs(this.rgba,-e))},e.prototype.grayscale=function(){return Us(Hs(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Us(Ws(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Us(Ws(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?Us({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):xs(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Os(this.rgba);return"number"==typeof e?Us({h:e,s:t.s,l:t.l,a:t.a}):xs(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Us(e).toHex()},e}(),Us=function(e){return e instanceof Zs?e:new Zs(e)},$s=[],Gs=function(e){e.forEach((function(e){$s.indexOf(e)<0&&(e(Zs,js),$s.push(e))}))};function qs(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,a,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var f=(o=l,a=i[p],Math.pow(o.r-a.r,2)+Math.pow(o.g-a.g,2)+Math.pow(o.b-a.b,2));f<c&&(c=f,u=p)}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 Ks=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Ys=function(e){return.2126*Ks(e.r)+.7152*Ks(e.g)+.0722*Ks(e.b)};function Xs(e){e.prototype.luminance=function(){return e=Ys(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,a,s,l,c=t instanceof e?t:new e(t);return i=this.rgba,a=c.toRgb(),n=(s=Ys(i))>(l=Ys(a))?(s+.05)/(l+.05):(l+.05)/(s+.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)>=(a=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===a?7:"AA"===o&&"large"===a?3:4.5);var n,r,o,i,a}}function Js(e){e.parentNode,e.parentNode.removeChild(e)}function Qs(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const n=t.getElementsByTagName("*");let r=n.length;for(;r--;){const e=n[r];if("SCRIPT"===e.tagName)Js(e);else{let t=e.attributes.length;for(;t--;){const{name:n}=e.attributes[t];n.startsWith("on")&&e.removeAttribute(n)}}}return t.innerHTML}function el(e){e=Qs(e);const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}const tl="block-default",nl=["attributes","supports","save","migrate","isEligible","apiVersion"],rl={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},background:{value:["color","gradient"],support:["color","gradients"]},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"]},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"}},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"]},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"]},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0},linkColor:{value:["elements","link","color","text"],support:["color","link"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"]},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"]},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"]},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"]},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"]},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"}},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"}},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"]},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"]},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"]},"--wp--style--block-gap":{value:["spacing","blockGap"],support:["spacing","blockGap"]}},ol={link:"a",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},il={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"typography.fontFamilies":!0,"typography.fontSizes":!0},al={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]},sl={};function ll(e){let{textdomain:t,...n}=e;const r=(0,Ee.pick)(n,["apiVersion","title","category","parent","icon","description","keywords","attributes","providesContext","usesContext","supports","styles","example","variations"]);return t&&Object.keys(al).forEach((e=>{r[e]&&(r[e]=ul(al[e],r[e],t))})),r}function cl(e,t){const n=(0,Ee.isObject)(e)?e.name:e;if("string"!=typeof n)return void console.error("Block names must be strings.");if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(n))return void console.error("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");if((0,xe.Ys)(pc).getBlockType(n))return void console.error('Block "'+n+'" is already registered.');(0,Ee.isObject)(e)&&function(e){for(const t of Object.keys(e))sl[t]?void 0===sl[t].apiVersion&&e[t].apiVersion&&(sl[t].apiVersion=e[t].apiVersion):sl[t]=(0,Ee.mapKeys)((0,Ee.pickBy)(e[t],(e=>!(0,Ee.isNil)(e))),((e,t)=>(0,Ee.camelCase)(t)))}({[n]:ll(e)});const r={name:n,icon:tl,keywords:[],attributes:{},providesContext:{},usesContext:[],supports:{},styles:[],variations:[],save:()=>null,...null==sl?void 0:sl[n],...t};return(0,xe.WI)(pc).__experimentalRegisterBlockType(r),(0,xe.Ys)(pc).getBlockType(n)}function ul(e,t,n){return(0,Ee.isString)(e)&&(0,Ee.isString)(t)?$(t,e,n):(0,Ee.isArray)(e)&&!(0,Ee.isEmpty)(e)&&(0,Ee.isArray)(t)?t.map((t=>ul(e[0],t,n))):(0,Ee.isObject)(e)&&!(0,Ee.isEmpty)(e)&&(0,Ee.isObject)(t)?Object.keys(t).reduce(((r,o)=>e[o]?(r[o]=ul(e[o],t[o],n),r):(r[o]=t[o],r)),{}):t}function dl(){return(0,xe.Ys)(pc).getFreeformFallbackBlockName()}function pl(){return(0,xe.Ys)(pc).getUnregisteredFallbackBlockName()}function fl(){return(0,xe.Ys)(pc).getDefaultBlockName()}function ml(e){var t;return null===(t=(0,xe.Ys)(pc))||void 0===t?void 0:t.getBlockType(e)}function hl(){return(0,xe.Ys)(pc).getBlockTypes()}function gl(e,t,n){return(0,xe.Ys)(pc).getBlockSupport(e,t,n)}function vl(e,t,n){return(0,xe.Ys)(pc).hasBlockSupport(e,t,n)}function bl(e){return"core/block"===(null==e?void 0:e.name)}const yl=(e,t)=>(0,xe.Ys)(pc).getBlockVariations(e,t);var wl,kl=new Uint8Array(16);function xl(){if(!wl&&!(wl="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wl(kl)}for(var _l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,El=function(e){return"string"==typeof e&&_l.test(e)},Cl=[],Sl=0;Sl<256;++Sl)Cl.push((Sl+256).toString(16).substr(1));var Il=function(e,t,n){var r=(e=e||{}).random||(e.rng||xl)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Cl[e[t+0]]+Cl[e[t+1]]+Cl[e[t+2]]+Cl[e[t+3]]+"-"+Cl[e[t+4]]+Cl[e[t+5]]+"-"+Cl[e[t+6]]+Cl[e[t+7]]+"-"+Cl[e[t+8]]+Cl[e[t+9]]+"-"+Cl[e[t+10]]+Cl[e[t+11]]+Cl[e[t+12]]+Cl[e[t+13]]+Cl[e[t+14]]+Cl[e[t+15]]).toLowerCase();if(!El(n))throw TypeError("Stringified UUID is invalid");return n}(r)};function Tl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=Ul(e,t),o=Il();return{clientId:o,name:e,isValid:!0,attributes:r,innerBlocks:n}}function Nl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{const t=Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],[n,r,o=[]]=t;return Tl(n,r,Nl(o))}))}function Al(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=Il(),o=Ul(e.name,{...e.attributes,...t});return{...e,clientId:r,attributes:o,innerBlocks:n||e.innerBlocks.map((e=>Al(e)))}}function Pl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=Il();return{...e,clientId:r,attributes:{...e.attributes,...t},innerBlocks:n||e.innerBlocks.map((e=>Pl(e)))}}const Rl=(e,t,n)=>{if((0,Ee.isEmpty)(n))return!1;const r=n.length>1,o=(0,Ee.first)(n).name;if(!Ll(e)&&r&&!e.isMultiBlock)return!1;if(!Ll(e)&&!(0,Ee.every)(n,{name:o}))return!1;if("block"!==e.type)return!1;const i=(0,Ee.first)(n);if("from"===t&&-1===e.blocks.indexOf(i.name)&&!Ll(e))return!1;if(!r&&Ol(i.name)&&Ol(e.blockName))return!1;if((0,Ee.isFunction)(e.isMatch)){const t=e.isMultiBlock?n.map((e=>e.attributes)):i.attributes,r=e.isMultiBlock?n:i;if(!e.isMatch(t,r))return!1}return!(e.usingMobileTransformations&&Ll(e)&&!Ol(i.name))},Ll=e=>e&&"block"===e.type&&Array.isArray(e.blocks)&&e.blocks.includes("*"),Ol=e=>e===(0,xe.Ys)(pc).getGroupingBlockName();function Ml(e){if((0,Ee.isEmpty)(e))return[];const t=(e=>{if((0,Ee.isEmpty)(e))return[];const t=hl();return(0,Ee.filter)(t,(t=>!!Dl(Bl("from",t.name),(t=>Rl(t,"from",e)))))})(e),n=(e=>{if((0,Ee.isEmpty)(e))return[];const t=ml((0,Ee.first)(e).name),n=t?Bl("to",t.name):[],r=(0,Ee.filter)(n,(t=>t&&Rl(t,"to",e)));return(0,Ee.flatMap)(r,(e=>e.blocks)).map((e=>ml(e)))})(e);return(0,Ee.uniq)([...t,...n])}function Dl(e,t){const n=(0,V.Hu)();for(let r=0;r<e.length;r++){const o=e[r];t(o)&&n.addFilter("transform","transform/"+r.toString(),(e=>e||o),o.priority)}return n.applyFilters("transform",null)}function Bl(e,t){if(void 0===t)return(0,Ee.flatMap)(hl(),(t=>{let{name:n}=t;return Bl(e,n)}));const n=Wl(t),{name:r,transforms:o}=n||{};if(!o||!Array.isArray(o[e]))return[];const i=o.supportedMobileTransforms&&Array.isArray(o.supportedMobileTransforms);return(i?(0,Ee.filter)(o[e],(e=>"raw"===e.type||!(!e.blocks||!e.blocks.length)&&(!!Ll(e)||(0,Ee.every)(e.blocks,(e=>o.supportedMobileTransforms.includes(e)))))):o[e]).map((e=>({...e,blockName:r,usingMobileTransformations:i})))}function Fl(e,t){const n=(0,Ee.castArray)(e),r=n.length>1,o=n[0],i=o.name,a=Bl("from",t),s=Dl(Bl("to",i),(e=>"block"===e.type&&(Ll(e)||-1!==e.blocks.indexOf(t))&&(!r||e.isMultiBlock)))||Dl(a,(e=>"block"===e.type&&(Ll(e)||-1!==e.blocks.indexOf(i))&&(!r||e.isMultiBlock)));if(!s)return null;let l;return l=s.isMultiBlock?(0,Ee.has)(s,"__experimentalConvert")?s.__experimentalConvert(n):s.transform(n.map((e=>e.attributes)),n.map((e=>e.innerBlocks))):(0,Ee.has)(s,"__experimentalConvert")?s.__experimentalConvert(o):s.transform(o.attributes,o.innerBlocks),(0,Ee.isObjectLike)(l)?(l=(0,Ee.castArray)(l),l.some((e=>!ml(e.name)))?null:(0,Ee.some)(l,(e=>e.name===t))?l.map((t=>(0,V.O)("blocks.switchToBlockType.transformedBlock",t,e))):null):null}const jl=(e,t)=>Tl(e,t.attributes,(0,Ee.map)(t.innerBlocks,(e=>jl(e.name,e))));Gs([qs,Xs]);const zl=["#191e23","#f8f9f9"];function Hl(e){const t=fl();if(e.name!==t)return!1;Hl.block&&Hl.block.name===t||(Hl.block=Tl(t));const n=Hl.block,r=ml(t);return(0,Ee.every)(null==r?void 0:r.attributes,((t,r)=>n.attributes[r]===e.attributes[r]))}function Vl(e){return!!e&&((0,Ee.isString)(e)||(0,_.isValidElement)(e)||(0,Ee.isFunction)(e)||e instanceof _.Component)}function Wl(e){return(0,Ee.isString)(e)?ml(e):e}function Zl(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"visual";const{__experimentalLabel:r,title:o}=e,i=r&&r(t,{context:n});return i?el(i):o}function Ul(e,t){const n=ml(e);if(void 0===n)throw new Error(`Block type '${e}' is not registered.`);return(0,Ee.reduce)(n.attributes,((e,n,r)=>{const o=t[r];return void 0!==o?e[r]=o:n.hasOwnProperty("default")&&(e[r]=n.default),-1!==["node","children"].indexOf(n.source)&&("string"==typeof e[r]?e[r]=[e[r]]:Array.isArray(e[r])||(e[r]=[])),e}),{})}const{error:$l,warn:Gl}=window.console,ql={common:"text",formatting:"text",layout:"design"};function Kl(e){const{name:t}=e,n=(0,V.O)("blocks.registerBlockType",{...e},t);if(n.deprecated&&(n.deprecated=n.deprecated.map((n=>(0,Ee.pick)((0,V.O)("blocks.registerBlockType",{...(0,Ee.omit)(e,nl),...n},t),nl)))),(0,Ee.isPlainObject)(n))if((0,Ee.isFunction)(n.save))if(!("edit"in n)||(0,Ee.isFunction)(n.edit))if(ql.hasOwnProperty(n.category)&&(n.category=ql[n.category]),"category"in n&&!(0,Ee.some)((0,xe.Ys)(ys).getCategories(),{slug:n.category})&&(Gl('The block "'+t+'" is registered with an invalid category "'+n.category+'".'),delete n.category),"title"in n&&""!==n.title)if("string"==typeof n.title){if(n.icon=function(e){if(Vl(e=e||tl))return{src:e};if((0,Ee.has)(e,["background"])){const t=Us(e.background);return{...e,foreground:e.foreground?e.foreground:(0,Ee.maxBy)(zl,(e=>t.contrast(e))),shadowColor:t.alpha(.3).toRgbString()}}return e}(n.icon),Vl(n.icon.src))return n;$l("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional")}else $l("Block titles must be strings.");else $l('The block "'+t+'" must have a title.');else $l('The "edit" property must be a valid function.');else $l('The "save" property must be a valid function.');else $l("Block settings must be a valid object.")}function Yl(e){return{type:"ADD_BLOCK_TYPES",blockTypes:(0,Ee.castArray)(e)}}function*Xl(e){yield{type:"ADD_UNPROCESSED_BLOCK_TYPE",blockType:e};const t=Kl(e);t&&(yield Yl(t))}function*Jl(){const e=(0,xe.Ys)(ys).__experimentalGetUnprocessedBlockTypes(),t=Object.keys(e).reduce(((t,n)=>{const r=Kl(e[n]);return r&&t.push(r),t}),[]);t.length&&(yield Yl(t))}function Ql(e){return{type:"REMOVE_BLOCK_TYPES",names:(0,Ee.castArray)(e)}}function ec(e,t){return{type:"ADD_BLOCK_STYLES",styles:(0,Ee.castArray)(t),blockName:e}}function tc(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:(0,Ee.castArray)(t),blockName:e}}function nc(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:(0,Ee.castArray)(t),blockName:e}}function rc(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:(0,Ee.castArray)(t),blockName:e}}function oc(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function ic(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function ac(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function sc(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function lc(e){return{type:"SET_CATEGORIES",categories:e}}function cc(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function uc(e,t,n){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:n}}function dc(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const pc=(0,_e.Z)(ys,{reducer:Ja,selectors:l,actions:c});let fc,mc,hc,gc;(0,xe.z2)(pc);const vc=/<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function bc(e,t,n,r,o){return{blockName:e,attrs:t,innerBlocks:n,innerHTML:r,innerContent:o}}function yc(e){return bc(null,{},[],e,[e])}function wc(){const e=function(){const e=vc.exec(fc);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,o,i,a,,s]=e,l=n.length,c=!!r,u=!!s,d=(o||"core/")+i,p=!!a?function(e){try{return JSON.parse(e)}catch(e){return null}}(a):{};return u?["void-block",d,p,t,l]:c?["block-closer",d,null,t,l]:["block-opener",d,p,t,l]}(),[t,n,r,o,i]=e,a=gc.length,s=o>mc?mc:null;switch(t){case"no-more-tokens":if(0===a)return kc(),!1;if(1===a)return _c(),!1;for(;0<gc.length;)_c();return!1;case"void-block":return 0===a?(null!==s&&hc.push(yc(fc.substr(s,o-s))),hc.push(bc(n,r,[],"",[])),mc=o+i,!0):(xc(bc(n,r,[],"",[]),o,i),mc=o+i,!0);case"block-opener":return gc.push(function(e,t,n,r,o){return{block:e,tokenStart:t,tokenLength:n,prevOffset:r||t+n,leadingHtmlStart:o}}(bc(n,r,[],"",[]),o,i,o+i,s)),mc=o+i,!0;case"block-closer":if(0===a)return kc(),!1;if(1===a)return _c(o),mc=o+i,!0;const e=gc.pop(),t=fc.substr(e.prevOffset,o-e.prevOffset);return e.block.innerHTML+=t,e.block.innerContent.push(t),e.prevOffset=o+i,xc(e.block,e.tokenStart,e.tokenLength,o+i),mc=o+i,!0;default:return kc(),!1}}function kc(e){const t=e||fc.length-mc;0!==t&&hc.push(yc(fc.substr(mc,t)))}function xc(e,t,n,r){const o=gc[gc.length-1];o.block.innerBlocks.push(e);const i=fc.substr(o.prevOffset,t-o.prevOffset);i&&(o.block.innerHTML+=i,o.block.innerContent.push(i)),o.block.innerContent.push(null),o.prevOffset=r||t+n}function _c(e){const{block:t,leadingHtmlStart:n,prevOffset:r,tokenStart:o}=gc.pop(),i=e?fc.substr(r,e-r):fc.substr(r);i&&(t.innerHTML+=i,t.innerContent.push(i)),null!==n&&hc.push(yc(fc.substr(n,o-n))),hc.push(t)}const Ec=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");function Cc(e,t){const n=function(e){const t=[];let n,r=e;for(;n=r.match(Ec);){const e=n.index;t.push(r.slice(0,e)),t.push(n[0]),r=r.slice(e+n[0].length)}return r.length&&t.push(r),t}(e);let r=!1;const o=Object.keys(t);for(let e=1;e<n.length;e+=2)for(let i=0;i<o.length;i++){const a=o[i];if(-1!==n[e].indexOf(a)){n[e]=n[e].replace(new RegExp(a,"g"),t[a]),r=!0;break}}return r&&(e=n.join("")),e}function Sc(e){let{children:t,...n}=e,r="";return _.Children.toArray(t).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(r+=e)})),(0,_.createElement)("div",{dangerouslySetInnerHTML:{__html:r},...n})}var Ic=n(56692);const{Provider:Tc,Consumer:Nc}=(0,_.createContext)(void 0),Ac=(0,_.forwardRef)((()=>null)),Pc=new Set(["string","boolean","number"]),Rc=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Lc=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),Oc=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),Mc=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function Dc(e,t){return t.some((t=>0===e.indexOf(t)))}function Bc(e){return"key"===e||"children"===e}function Fc(e,t){switch(e){case"style":return function(e){if(!(0,Ee.isPlainObject)(e))return e;let t;for(const n in e){const r=e[n];null!=r&&(t?t+=";":t="",t+=zc(n)+":"+Hc(n,r))}return t}(t)}return t}function jc(e){switch(e){case"htmlFor":return"for";case"className":return"class"}return e.toLowerCase()}function zc(e){return(0,Ee.startsWith)(e,"--")?e:Dc(e,["ms","O","Moz","Webkit"])?"-"+(0,Ee.kebabCase)(e):(0,Ee.kebabCase)(e)}function Hc(e,t){return"number"!=typeof t||0===t||Mc.has(e)?t:t+"px"}function Vc(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null==e||!1===e)return"";if(Array.isArray(e))return Uc(e,t,n);switch(typeof e){case"string":return(0,Ic.r)(e);case"number":return e.toString()}const{type:r,props:o}=e;switch(r){case _.StrictMode:case _.Fragment:return Uc(o.children,t,n);case Sc:const{children:e,...r}=o;return Wc((0,Ee.isEmpty)(r)?null:"div",{...r,dangerouslySetInnerHTML:{__html:e}},t,n)}switch(typeof r){case"string":return Wc(r,o,t,n);case"function":return r.prototype&&"function"==typeof r.prototype.render?Zc(r,o,t,n):Vc(r(o,n),t,n)}switch(r&&r.$$typeof){case Tc.$$typeof:return Uc(o.children,o.value,n);case Nc.$$typeof:return Vc(o.children(t||r._currentValue),t,n);case Ac.$$typeof:return Vc(r.render(o),t,n)}return""}function Wc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o="";if("textarea"===e&&t.hasOwnProperty("value")?(o=Uc(t.value,n,r),t=(0,Ee.omit)(t,"value")):t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=Uc(t.children,n,r)),!e)return o;const i=$c(t);return Rc.has(e)?"<"+e+i+"/>":"<"+e+i+">"+o+"</"+e+">"}function Zc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=new e(t,r);"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext());const i=Vc(o.render(),n,r);return i}function Uc(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";e=(0,Ee.castArray)(e);for(let o=0;o<e.length;o++)r+=Vc(e[o],t,n);return r}function $c(e){let t="";for(const n in e){const r=jc(n);if(!(0,Ic.$b)(r))continue;let o=Fc(n,e[n]);if(!Pc.has(typeof o))continue;if(Bc(n))continue;const i=Lc.has(r);if(i&&!1===o)continue;const a=i||Dc(n,["data-","aria-"])||Oc.has(r);("boolean"!=typeof o||a)&&(t+=" "+r,i||("string"==typeof o&&(o=(0,Ic.kb)(o)),t+='="'+o+'"'))}return t}var Gc=Vc;function qc(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,V.O)("blocks.getBlockDefaultClassName",t,e)}function Kc(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,V.O)("blocks.getBlockMenuDefaultClassName",t,e)}const Yc={},Xc={};function Jc(e,t,n){const r=Wl(e);return Gc(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=Wl(e);let{save:o}=r;if(o.prototype instanceof _.Component){const e=new o({attributes:t});o=e.render.bind(e)}Yc.blockType=r,Yc.attributes=t,Xc.innerBlocks=n;let i=o({attributes:t,innerBlocks:n});if((0,Ee.isObject)(i)&&(0,V.H7)("blocks.getSaveContent.extraProps")&&!(r.apiVersion>1)){const e=(0,V.O)("blocks.getSaveContent.extraProps",{...i.props},r,t);(0,Ie.ZP)(e,i.props)||(i=(0,_.cloneElement)(i,e))}return(0,V.O)("blocks.getSaveElement",i,r,t)}(r,t,n))}function Qc(e,t){return(0,Ee.reduce)(e.attributes,((e,n,r)=>{const o=t[r];return void 0===o||void 0!==n.source||"default"in n&&n.default===o||(e[r]=o),e}),{})}function eu(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=Jc(e.name,e.attributes,e.innerBlocks)}catch(e){}return t}function tu(e,t,n){const r=(0,Ee.isEmpty)(t)?"":function(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(t)+" ",o=(0,Ee.startsWith)(e,"core/")?e.slice(5):e;return n?`\x3c!-- wp:${o} ${r}--\x3e\n`+n+`\n\x3c!-- /wp:${o} --\x3e`:`\x3c!-- wp:${o} ${r}/--\x3e`}function nu(e,t){return(0,Ee.castArray)(e).map((e=>function(e){let{isInnerBlocks:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.name,r=eu(e);if(n===pl()||!t&&n===dl())return r;const o=Qc(ml(n),e.attributes);return tu(n,o,r)}(e,t))).join("\n\n")}var ru=/[\t\n\f ]/,ou=/[A-Za-z]/,iu=/\r\n?/g;function au(e){return ru.test(e)}function su(e){return ou.test(e)}var lu=function(){function e(e,t,n){void 0===n&&(n="precompile"),this.delegate=e,this.entityParser=t,this.mode=n,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var e=this.peek();if("<"!==e||this.isIgnoredEndTag()){if("precompile"===this.mode&&"\n"===e){var t=this.tagNameBuffer.toLowerCase();"pre"!==t&&"textarea"!==t||this.consume()}this.transitionTo("data"),this.delegate.beginData()}else this.transitionTo("tagOpen"),this.markTagStart(),this.consume()},data:function(){var e=this.peek(),t=this.tagNameBuffer;"<"!==e||this.isIgnoredEndTag()?"&"===e&&"script"!==t&&"style"!==t?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e)):(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume())},tagOpen:function(){var e=this.consume();"!"===e?this.transitionTo("markupDeclarationOpen"):"/"===e?this.transitionTo("endTagOpen"):("@"===e||":"===e||su(e))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(e))},markupDeclarationOpen:function(){var e=this.consume();"-"===e&&"-"===this.peek()?(this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment()):"DOCTYPE"===e.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase()&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())},doctype:function(){au(this.consume())&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var e=this.consume();au(e)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase()))},doctypeName:function(){var e=this.consume();au(e)?this.transitionTo("afterDoctypeName"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase())},afterDoctypeName:function(){var e=this.consume();if(!au(e))if(">"===e)this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var t=e.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),n="PUBLIC"===t.toUpperCase(),r="SYSTEM"===t.toUpperCase();(n||r)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),n?this.transitionTo("afterDoctypePublicKeyword"):r&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var e=this.peek();au(e)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):'"'===e?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):"'"===e?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):">"===e&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},doctypePublicIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},afterDoctypePublicIdentifier:function(){var e=this.consume();au(e)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var e=this.consume();au(e)||(">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},doctypeSystemIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},afterDoctypeSystemIdentifier:function(){var e=this.consume();au(e)||">"===e&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var e=this.consume();"-"===e?this.transitionTo("commentStartDash"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(e),this.transitionTo("comment"))},commentStartDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var e=this.consume();"-"===e?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+e),this.transitionTo("comment"))},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+e),this.transitionTo("comment"))},tagName:function(){var e=this.consume();au(e)?this.transitionTo("beforeAttributeName"):"/"===e?this.transitionTo("selfClosingStartTag"):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(e)},endTagName:function(){var e=this.consume();au(e)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):"/"===e?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();au(e)?this.consume():"/"===e?(this.transitionTo("selfClosingStartTag"),this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();au(e)?(this.transitionTo("afterAttributeName"),this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.transitionTo("beforeAttributeValue"),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();au(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.consume(),this.transitionTo("beforeAttributeValue")):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();au(e)?this.consume():'"'===e?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();au(e)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();au(e)?(this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.consume(),this.transitionTo("selfClosingStartTag")):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var e=this.consume();("@"===e||":"===e||su(e))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(e))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(e){this.state=e},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(iu,"\n")}(e);this.index<this.input.length;){var t=this.states[this.state];if(void 0===t)throw new Error("unhandled state "+this.state);t.call(this)}},e.prototype.tokenizeEOF=function(){this.flushData()},e.prototype.flushData=function(){"data"===this.state&&(this.delegate.finishData(),this.transitionTo("beforeData"))},e.prototype.peek=function(){return this.input.charAt(this.index)},e.prototype.consume=function(){var e=this.peek();return this.index++,"\n"===e?(this.line++,this.column=0):this.column++,e},e.prototype.consumeCharRef=function(){var e=this.input.indexOf(";",this.index);if(-1!==e){var t=this.input.slice(this.index,e),n=this.entityParser.parse(t);if(n){for(var r=t.length;r;)this.consume(),r--;return this.consume(),n}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(e){this.tagNameBuffer+=e,this.delegate.appendToTagName(e)},e.prototype.isIgnoredEndTag=function(){var e=this.tagNameBuffer;return"title"===e&&"</title>"!==this.input.substring(this.index,this.index+8)||"style"===e&&"</style>"!==this.input.substring(this.index,this.index+8)||"script"===e&&"<\/script>"!==this.input.substring(this.index,this.index+9)},e}(),cu=function(){function e(e,t){void 0===t&&(t={}),this.options=t,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new lu(this,e,t.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},e.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var e=this.token;if(null===e)throw new Error("token was unexpectedly null");if(0===arguments.length)return e;for(var t=0;t<arguments.length;t++)if(e.type===arguments[t])return e;throw new Error("token type was unexpectedly "+e.type)},e.prototype.push=function(e){this.token=e,this.tokens.push(e)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(e){this.current("Doctype").name+=e},e.prototype.appendToDoctypePublicIdentifier=function(e){var t=this.current("Doctype");void 0===t.publicIdentifier?t.publicIdentifier=e:t.publicIdentifier+=e},e.prototype.appendToDoctypeSystemIdentifier=function(e){var t=this.current("Doctype");void 0===t.systemIdentifier?t.systemIdentifier=e:t.systemIdentifier+=e},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(e){this.current("Chars").chars+=e},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(e){this.current("Comment").chars+=e},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(e){this.current("StartTag","EndTag").tagName+=e},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(e){this.currentAttribute()[0]+=e},e.prototype.beginAttributeValue=function(e){this.currentAttribute()[2]=e},e.prototype.appendToAttributeValue=function(e){this.currentAttribute()[1]+=e},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(e){this.current().syntaxError=e},e}();let uu;function du(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===uu&&(uu=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),uu.innerHTML=e;const t=uu.textContent;return uu.innerHTML="",t}function pu(){function e(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e("Block validation: "+t,...r)}}return{error:e(console.error),warning:e(console.warn),getItems:()=>[]}}const fu=/[\t\n\r\v\f ]+/g,mu=/^[\t\n\r\v\f ]*$/,hu=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,gu=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],vu=[...gu,"autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],bu=[Ee.identity,function(e){return _u(e).join(" ")}],yu=/^[\da-z]+$/i,wu=/^#\d+$/,ku=/^#x[\da-f]+$/i;class xu{parse(e){if(t=e,yu.test(t)||wu.test(t)||ku.test(t))return du("&"+e+";");var t}}function _u(e){return e.trim().split(fu)}function Eu(e){return e.attributes.filter((e=>{const[t,n]=e;return n||0===t.indexOf("data-")||(0,Ee.includes)(vu,t)}))}function Cu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pu(),r=e.chars,o=t.chars;for(let e=0;e<bu.length;e++){const t=bu[e];if(r=t(r),o=t(o),r===o)return!0}return n.warning("Expected text `%s`, saw `%s`.",t.chars,e.chars),!1}function Su(e){return 0===parseFloat(e)?"0":0===e.indexOf(".")?"0"+e:e}function Iu(e){return _u(e).map(Su).join(" ").replace(hu,"url($1)")}function Tu(e){const t=e.replace(/;?\s*$/,"").split(";").map((e=>{const[t,...n]=e.split(":"),r=n.join(":");return[t.trim(),Iu(r.trim())]}));return(0,Ee.fromPairs)(t)}const Nu={class:(e,t)=>!(0,Ee.xor)(...[e,t].map(_u)).length,style:(e,t)=>(0,Ee.isEqual)(...[e,t].map(Tu)),...(0,Ee.fromPairs)(gu.map((e=>[e,Ee.stubTrue])))};function Au(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pu();if(e.length!==t.length)return n.warning("Expected attributes %o, instead saw %o.",t,e),!1;const r={};for(let e=0;e<t.length;e++)r[t[e][0].toLowerCase()]=t[e][1];for(let t=0;t<e.length;t++){const[o,i]=e[t],a=o.toLowerCase();if(!r.hasOwnProperty(a))return n.warning("Encountered unexpected attribute `%s`.",o),!1;const s=r[a],l=Nu[a];if(l){if(!l(i,s))return n.warning("Expected attribute `%s` of value `%s`, saw `%s`.",o,s,i),!1}else if(i!==s)return n.warning("Expected attribute `%s` of value `%s`, saw `%s`.",o,s,i),!1}return!0}const Pu={StartTag:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pu();return e.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(n.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):Au(...[e,t].map(Eu),n)},Chars:Cu,Comment:Cu};function Ru(e){let t;for(;t=e.shift();){if("Chars"!==t.type)return t;if(!mu.test(t.chars))return t}}function Lu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pu();try{return new cu(new xu).tokenize(e)}catch(n){t.warning("Malformed HTML detected: %s",e)}return null}function Ou(e,t){return!!e.selfClosing&&!(!t||t.tagName!==e.tagName||"EndTag"!==t.type)}function Mu(e,t){if(e.name===dl()||e.name===pl())return[!0];const n=function(){const e=[],t=pu();return{error(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.push({log:t.error,args:r})},warning(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.push({log:t.warning,args:r})},getItems:()=>e}}(),r=Wl(t);let o;try{o=Jc(r,e.attributes)}catch(e){return n.error("Block validation failed because an error occurred while generating block content:\n\n%s",e.toString()),[!1,n.getItems()]}const i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pu();if(e===t)return!0;const[r,o]=[e,t].map((e=>Lu(e,n)));if(!r||!o)return!1;let i,a;for(;i=Ru(r);){if(a=Ru(o),!a)return n.warning("Expected end of content, instead saw %o.",i),!1;if(i.type!==a.type)return n.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",a.type,a,i.type,i),!1;const e=Pu[i.type];if(e&&!e(i,a,n))return!1;Ou(i,o[0])?Ru(o):Ou(a,r[0])&&Ru(r)}return!(a=Ru(o))||(n.warning("Expected %o, instead saw end of content.",a),!1)}(e.originalContent,o,n);return i||n.error("Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",r.name,r,o,e.originalContent),[i,n.getItems()]}function Du(e,t){const n={...t};if("core/cover-image"===e&&(e="core/cover"),"core/text"!==e&&"core/cover-text"!==e||(e="core/paragraph"),e&&0===e.indexOf("core/social-link-")&&(n.service=e.substring(17),e="core/social-link"),e&&0===e.indexOf("core-embed/")){const t=e.substring(11),r={speaker:"speaker-deck",polldaddy:"crowdsignal"};n.providerNameSlug=t in r?r[t]:t,["amazon-kindle","wordpress"].includes(t)||(n.responsive=!0),e="core/embed"}return"core/query-loop"===e&&(e="core/post-template"),"core/post-comment-author"===e&&(e="core/comment-author-name"),"core/post-comment-content"===e&&(e="core/comment-content"),"core/post-comment-date"===e&&(e="core/comment-date"),[e,n]}function Bu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isCommentDelimited:n=!0}=t,{blockName:r,attrs:o={},innerBlocks:i=[],innerContent:a=[]}=e;let s=0;const l=a.map((e=>null!==e?e:Bu(i[s++],t))).join("\n").replace(/\n+/g,"\n").trim();return n?tu(r,o,l):l}function Fu(e,t){for(var n,r=t.split(".");n=r.shift();){if(!(n in e))return;e=e[n]}return e}var ju,zu=function(){return ju||(ju=document.implementation.createHTMLDocument("")),ju};function Hu(e,t){if(t){if("string"==typeof e){var n=zu();n.body.innerHTML=e,e=n.body}if("function"==typeof t)return t(e);if(Object===t.constructor)return Object.keys(t).reduce((function(n,r){return n[r]=Hu(e,t[r]),n}),{})}}function Vu(e,t){return 1===arguments.length&&(t=e,e=void 0),function(n){var r=n;if(e&&(r=n.querySelector(e)),r)return Fu(r,t)}}function Wu(e){const t={};for(let n=0;n<e.length;n++){const{name:r,value:o}=e[n];t[r]=o}return t}function Zu(e){if(e.nodeType===e.TEXT_NODE)return e.nodeValue;if(e.nodeType!==e.ELEMENT_NODE)throw new TypeError("A block node can only be created from a node of type text or element.");return{type:e.nodeName.toLowerCase(),props:{...Wu(e.attributes),children:Uu(e.childNodes)}}}function Uu(e){const t=[];for(let n=0;n<e.length;n++)try{t.push(Zu(e[n]))}catch(e){}return t}function $u(e){return t=>{let n=t;return e&&(n=t.querySelector(e)),n?Uu(n.childNodes):[]}}var Gu={concat:function(){const e=[];for(let t=0;t<arguments.length;t++){const n=(0,Ee.castArray)(t<0||arguments.length<=t?void 0:arguments[t]);for(let t=0;t<n.length;t++){const r=n[t];"string"==typeof r&&"string"==typeof e[e.length-1]?e[e.length-1]+=r:e.push(r)}}return e},getChildrenArray:function(e){return e},fromDOM:Uu,toHTML:function(e){return Gc(e)},matcher:$u};function qu(e,t,n,r){const{type:o,enum:i}=t;let a;switch(t.source){case void 0:a=r?r[e]:void 0;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":a=Yu(n,t)}return function(e,t){return void 0===t||function(e,t){return t.some((t=>function(e,t){switch(t){case"string":return"string"==typeof e;case"boolean":return"boolean"==typeof e;case"object":return!!e&&e.constructor===Object;case"null":return null===e;case"array":return Array.isArray(e);case"integer":case"number":return"number"==typeof e}return!0}(e,t)))}(e,(0,Ee.castArray)(t))}(a,o)&&function(e,t){return!Array.isArray(t)||t.includes(e)}(a,i)||(a=void 0),void 0===a?t.default:a}function Ku(e){switch(e.source){case"attribute":let t=function(e,t){return 1===arguments.length&&(t=e,e=void 0),function(n){var r=Vu(e,"attributes")(n);if(r&&r.hasOwnProperty(t))return r[t].value}}(e.selector,e.attribute);return"boolean"===e.type&&(t=(e=>(0,Ee.flow)([e,e=>void 0!==e]))(t)),t;case"html":return function(e,t){return n=>{let r=n;if(e&&(r=n.querySelector(e)),!r)return"";if(t){let e="";const n=r.children.length;for(let o=0;o<n;o++){const n=r.children[o];n.nodeName.toLowerCase()===t&&(e+=n.outerHTML)}return e}return r.innerHTML}}(e.selector,e.multiline);case"text":return function(e){return Vu(e,"textContent")}(e.selector);case"children":return $u(e.selector);case"node":return function(e){return t=>{let n=t;e&&(n=t.querySelector(e));try{return Zu(n)}catch(e){return null}}}(e.selector);case"query":const n=(0,Ee.mapValues)(e.query,Ku);return function(e,t){return function(n){var r=n.querySelectorAll(e);return[].map.call(r,(function(e){return Hu(e,t)}))}}(e.selector,n);case"tag":return(0,Ee.flow)([Vu(e.selector,"nodeName"),e=>e?e.toLowerCase():void 0]);default:console.error(`Unknown source type "${e.source}"`)}}function Yu(e,t){return Hu(e,Ku(t))}function Xu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Wl(e),o=(0,Ee.mapValues)(r.attributes,((e,r)=>qu(r,e,t,n)));return(0,V.O)("blocks.getBlockAttributes",o,r,t,n)}function Ju(e){const t=Yu(e=`<div data-custom-class-name>${e}</div>`,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}function Qu(e,t){const n=function(e,t,n){if(vl(t,"customClassName",!0)){const r=Jc(t,(0,Ee.omit)(e,["className"])),o=Ju(r),i=Ju(n),a=(0,Ee.difference)(i,o);a.length?e.className=a.join(" "):r&&delete e.className}return e}(e.attributes,t,e.originalContent);return{...e,attributes:n}}function ed(e){let t=function(e){const t=dl(),n=e.blockName||dl(),r=e.attrs||{},o=e.innerBlocks||[];let i=e.innerHTML.trim();return n===t&&(i=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=[];if(""===e.trim())return"";if(-1!==(e+="\n").indexOf("<pre")){const t=e.split("</pre>"),r=t.pop();e="";for(let r=0;r<t.length;r++){const o=t[r],i=o.indexOf("<pre");if(-1===i){e+=o;continue}const a="<pre wp-pre-tag-"+r+"></pre>";n.push([a,o.substr(i)+"</pre>"]),e+=o.substr(0,i)+a}e+=r}const r="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=Cc(e=(e=(e=(e=e.replace(/<br\s*\/?>\s*<br\s*\/?>/g,"\n\n")).replace(new RegExp("(<"+r+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("(</"+r+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"<option")).replace(/<\/option>\s*/g,"</option>")),-1!==e.indexOf("</object>")&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/g,"$1")).replace(/\s*<\/object>/g,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("<source")&&-1===e.indexOf("<track")||(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),-1!==e.indexOf("<figcaption")&&(e=(e=e.replace(/\s*(<figcaption[^>]*>)/,"$1")).replace(/<\/figcaption>\s*/,"</figcaption>"));const o=(e=e.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return e="",o.forEach((t=>{e+="<p>"+t.replace(/^\n*|\n*$/g,"")+"</p>\n"})),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/g,"")).replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>")).replace(new RegExp("<p>\\s*(</?"+r+"[^>]*>)\\s*</p>","g"),"$1")).replace(/<p>(<li.+?)<\/p>/g,"$1")).replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/g,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?"+r+"[^>]*>)","g"),"$1")).replace(new RegExp("(</?"+r+"[^>]*>)\\s*</p>","g"),"$1"),t&&(e=(e=(e=(e=e.replace(/<(script|style).*?<\/\\1>/g,(e=>e[0].replace(/\n/g,"<WPPreserveNewline />")))).replace(/<br>|<br\/>/g,"<br />")).replace(/(<br \/>)?\s*\n/g,((e,t)=>t?e:"<br />\n"))).replace(/<WPPreserveNewline \/>/g,"\n")),e=(e=(e=e.replace(new RegExp("(</?"+r+"[^>]*>)\\s*<br />","g"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"</p>"),n.forEach((t=>{const[n,r]=t;e=e.replace(n,r)})),-1!==e.indexOf("\x3c!-- wpnl --\x3e")&&(e=e.replace(/\s?<!-- wpnl -->\s?/g,"\n")),e}(i).trim()),{...e,blockName:n,attrs:r,innerHTML:i,innerBlocks:o}}(e);t=function(e){const[t,n]=Du(e.blockName,e.attrs);return{...e,blockName:t,attrs:n}}(t);let n=ml(t.blockName);n||(t=function(e){const t=pl()||dl(),n=Bu(e,{isCommentDelimited:!1}),r=Bu(e,{isCommentDelimited:!0});return{blockName:t,attrs:{originalName:e.blockName,originalContent:r,originalUndelimitedContent:n},innerHTML:e.blockName?r:e.innerHTML,innerBlocks:e.innerBlocks,innerContent:e.innerContent}}(t),n=ml(t.blockName));const r=t.blockName===dl()||t.blockName===pl();if(!n||!t.innerHTML&&r)return;const o=t.innerBlocks.map(ed).filter((e=>!!e));let i=Tl(t.blockName,Xu(n,t.innerHTML,t.attrs),o);i.originalContent=t.innerHTML;let[a,s]=Mu(i,n);return a||(i=Qu(i,n),[a,s]=Mu(i,n)),i.isValid=a,i.validationIssues=s,i=function(e,t,n){const r=t.attrs,{deprecated:o}=n;if(!o||!o.length)return e;for(let t=0;t<o.length;t++){const{isEligible:i=Ee.stubFalse}=o[t];if(e.isValid&&!i(r,e.innerBlocks))continue;const a=Object.assign((0,Ee.omit)(n,nl),o[t]);let s={...e,attributes:Xu(a,e.originalContent,r)},[l]=Mu(s,a);if(l||(s=Qu(s,a),[l]=Mu(s,a)),!l)continue;let c=s.innerBlocks,u=s.attributes;const{migrate:d}=a;d&&([u=r,c=e.innerBlocks]=(0,Ee.castArray)(d(u,e.innerBlocks))),e={...e,attributes:u,innerBlocks:c,isValid:!0,validationIssues:[]}}return e}(i,t,n),s&&s.length>0&&(i.isValid?(console.groupCollapsed("Updated Block: %s",n.name),console.info("Block successfully updated for `%s` (%o).\n\nNew content generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",n.name,n,Jc(n,i.attributes),i.originalContent),console.groupEnd()):s.forEach((e=>{let{log:t,args:n}=e;return t(...n)}))),i}function td(e){return(e=>{fc=e,mc=0,hc=[],gc=[],vc.lastIndex=0;do{}while(wc());return hc})(e).reduce(((e,t)=>{const n=ed(t);return n&&e.push(n),e}),[])}function nd(){return(0,Ee.filter)(Bl("from"),{type:"raw"}).map((e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)}))}function rd(e){const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children).flatMap((e=>{const t=Dl(nd(),(t=>{let{isMatch:n}=t;return n(e)}));if(!t)return Tl("core/html",Xu("core/html",e.outerHTML));const{transform:n,blockName:r}=t;return n?n(e):Tl(r,Xu(r,e.outerHTML))}))}function od(e){switch(e.nodeType){case e.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(e.nodeValue||"");case e.ELEMENT_NODE:return!e.hasAttributes()&&(!e.hasChildNodes()||Array.from(e.childNodes).every(od));default:return!0}}const id={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}};(0,Ee.without)(Object.keys(id),"#text","br").forEach((e=>{id[e].children=(0,Ee.omit)(id,e)}));const ad={...id,audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","autoplay","mediagroup","loop","muted","controls","width","height"]}};function sd(e){return"paste"!==e?ad:(0,Ee.omit)({...ad,ins:{children:ad.ins.children},del:{children:ad.del.children}},["u","abbr","data","time","wbr","bdi","bdo"])}function ld(e){const t=e.nodeName.toLowerCase();return sd().hasOwnProperty(t)||"span"===t}function cd(e){const t=e.nodeName.toLowerCase();return id.hasOwnProperty(t)||"span"===t}function ud(e){const t=document.implementation.createHTMLDocument(""),n=document.implementation.createHTMLDocument(""),r=t.body,o=n.body;for(r.innerHTML=e;r.firstChild;){const e=r.firstChild;e.nodeType===e.TEXT_NODE?od(e)?r.removeChild(e):(o.lastChild&&"P"===o.lastChild.nodeName||o.appendChild(n.createElement("P")),o.lastChild.appendChild(e)):e.nodeType===e.ELEMENT_NODE?"BR"===e.nodeName?(e.nextSibling&&"BR"===e.nextSibling.nodeName&&(o.appendChild(n.createElement("P")),r.removeChild(e.nextSibling)),o.lastChild&&"P"===o.lastChild.nodeName&&o.lastChild.hasChildNodes()?o.lastChild.appendChild(e):r.removeChild(e)):"P"===e.nodeName?od(e)?r.removeChild(e):o.appendChild(e):ld(e)?(o.lastChild&&"P"===o.lastChild.nodeName||o.appendChild(n.createElement("P")),o.lastChild.appendChild(e)):o.appendChild(e):r.removeChild(e)}return o.innerHTML}function dd(e,t){t.parentNode,t.parentNode.insertBefore(e,t.nextSibling)}function pd(e,t){e.parentNode,dd(t,e.parentNode),Js(e)}function fd(e,t){if(e.nodeType===e.COMMENT_NODE)if("nextpage"!==e.nodeValue){if(0===e.nodeValue.indexOf("more")){const n=e.nodeValue.slice(4).trim();let r=e,o=!1;for(;r=r.nextSibling;)if(r.nodeType===r.COMMENT_NODE&&"noteaser"===r.nodeValue){o=!0,Js(r);break}pd(e,function(e,t,n){const r=n.createElement("wp-block");return r.dataset.block="core/more",e&&(r.dataset.customText=e),t&&(r.dataset.noTeaser=""),r}(n,o,t))}}else pd(e,function(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t))}function md(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function hd(e){return"OL"===e.nodeName||"UL"===e.nodeName}function gd(e){if(!hd(e))return;const t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}const r=e.parentNode;if(r&&"LI"===r.nodeName&&1===r.children.length&&!/\S/.test((o=r,Array.from(o.childNodes).map((e=>{let{nodeValue:t=""}=e;return t})).join("")))){const e=r,n=e.previousElementSibling,o=e.parentNode;n?(n.appendChild(t),o.removeChild(e)):(o.parentNode.insertBefore(t,o),o.parentNode.removeChild(o))}var o;if(r&&hd(r)){const t=e.previousElementSibling;t?t.appendChild(e):md(e)}}function vd(e){"BLOCKQUOTE"===e.nodeName&&(e.innerHTML=ud(e.innerHTML))}function bd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(n,t),n.appendChild(e)}function yd(e,t,n){if(!function(e,t){const n=e.nodeName.toLowerCase();return"figcaption"!==n&&!cd(e)&&(0,Ee.has)(t,["figure","children",n])}(e,n))return;let r=e;const o=e.parentNode;(function(e,t){const n=e.nodeName.toLowerCase();return(0,Ee.has)(t,["figure","children","a","children",n])})(e,n)&&"A"===o.nodeName&&1===o.childNodes.length&&(r=e.parentNode);const i=r.closest("p,div");i?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!i.textContent.trim())&&bd(r,i):bd(r,i):"BODY"===r.parentNode.nodeName&&bd(r)}function wd(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=kd(e);r.lastIndex=n;const o=r.exec(t);if(!o)return;if("["===o[1]&&"]"===o[7])return wd(e,t,r.lastIndex);const i={index:o.index,content:o[0],shortcode:_d(o)};return o[1]&&(i.content=i.content.slice(1),i.index++),o[7]&&(i.content=i.content.slice(0,-1)),i}function kd(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const xd=T()((e=>{const t={},n=[],r=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;let o;for(e=e.replace(/[\u00a0\u200b]/g," ");o=r.exec(e);)o[1]?t[o[1].toLowerCase()]=o[2]:o[3]?t[o[3].toLowerCase()]=o[4]:o[5]?t[o[5].toLowerCase()]=o[6]:o[7]?n.push(o[7]):o[8]?n.push(o[8]):o[9]&&n.push(o[9]);return{named:t,numeric:n}}));function _d(e){let t;return t=e[4]?"self-closing":e[6]?"closed":"single",new Ed({tag:e[2],attrs:e[3],type:t,content:e[5]})}const Ed=(0,Ee.extend)((function(e){(0,Ee.extend)(this,(0,Ee.pick)(e||{},"tag","attrs","type","content"));const t=this.attrs;this.attrs={named:{},numeric:[]},t&&((0,Ee.isString)(t)?this.attrs=xd(t):(0,Ee.isEqual)(Object.keys(t),["named","numeric"])?this.attrs=t:(0,Ee.forEach)(t,((e,t)=>{this.set(t,e)})))}),{next:wd,replace:function(e,t,n){return t.replace(kd(e),(function(e,t,r,o,i,a,s,l){if("["===t&&"]"===l)return e;const c=n(_d(arguments));return c||""===c?t+c+l:e}))},string:function(e){return new Ed(e).string()},regexp:kd,attrs:xd,fromMatch:_d});(0,Ee.extend)(Ed.prototype,{get(e){return this.attrs[(0,Ee.isNumber)(e)?"numeric":"named"][e]},set(e,t){return this.attrs[(0,Ee.isNumber)(e)?"numeric":"named"][e]=t,this},string(){let e="["+this.tag;return(0,Ee.forEach)(this.attrs.numeric,(t=>{/\s/.test(t)?e+=' "'+t+'"':e+=" "+t})),(0,Ee.forEach)(this.attrs.named,((t,n)=>{e+=" "+n+'="'+t+'"'})),"single"===this.type?e+"]":"self-closing"===this.type?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});var Cd=function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const o=Bl("from"),i=Dl(o,(e=>-1===r.indexOf(e.blockName)&&"shortcode"===e.type&&(0,Ee.some)((0,Ee.castArray)(e.tag),(e=>kd(e).test(t)))));if(!i)return[t];const a=(0,Ee.castArray)(i.tag),s=(0,Ee.find)(a,(e=>kd(e).test(t)));let l;const c=n;if(l=wd(s,t,n)){n=l.index+l.content.length;const o=t.substr(0,l.index),a=t.substr(n);if(!((0,Ee.includes)(l.shortcode.content||"","<")||/(\n|<p>)\s*$/.test(o)&&/^\s*(\n|<\/p>)/.test(a)))return e(t,n);if(i.isMatch&&!i.isMatch(l.shortcode.attrs))return e(t,c,[...r,i.blockName]);const s=(0,Ee.mapValues)((0,Ee.pickBy)(i.attributes,(e=>e.shortcode)),(e=>e.shortcode(l.shortcode.attrs,l))),u={...ml(i.blockName),attributes:i.attributes};let d=Tl(i.blockName,Xu(u,l.shortcode.content,s));return d.originalContent=l.shortcode.content,d=Qu(d,u),[...e(o),d,...e(a)]}return[t]};function Sd(e){return function(e,t){const n={phrasingContentSchema:sd(t),isPaste:"paste"===t},r=e.map((e=>{let{isMatch:t,blockName:r,schema:o}=e;const i=vl(r,"anchor");return o=(0,Ee.isFunction)(o)?o(n):o,i||t?(0,Ee.mapValues)(o,(e=>{let n=e.attributes||[];return i&&(n=[...n,"id"]),{...e,attributes:n,isMatch:t||void 0}})):o}));return(0,Ee.mergeWith)({},...r,((e,t,n)=>{switch(n){case"children":return"*"===e||"*"===t?"*":{...e,...t};case"attributes":case"require":return[...e||[],...t||[]];case"isMatch":if(!e||!t)return;return function(){return e(...arguments)||t(...arguments)}}}))}(nd(),e)}function Id(e,t,n,r){Array.from(e).forEach((e=>{Id(e.childNodes,t,n,r),t.forEach((t=>{n.contains(e)&&t(e,n,r)}))}))}function Td(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;const r=document.implementation.createHTMLDocument("");return r.body.innerHTML=e,Id(r.body.childNodes,t,r,n),r.body.innerHTML}function Nd(e,t){const n=e[`${t}Sibling`];if(n&&ld(n))return n;const{parentNode:r}=e;return r&&ld(r)?Nd(r,t):void 0}function Ad(e){let{HTML:t=""}=e;if(-1!==t.indexOf("\x3c!-- wp:"))return td(t);const n=Cd(t),r=Sd();return(0,Ee.compact)((0,Ee.flatMap)(n,(e=>"string"!=typeof e?e:rd(e=ud(e=Td(e,[gd,fd,yd,vd],r))))))}function Pd(e,t,n,r){Array.from(e).forEach((e=>{var o,i;const a=e.nodeName.toLowerCase();if(n.hasOwnProperty(a)&&(!n[a].isMatch||null!==(o=(i=n[a]).isMatch)&&void 0!==o&&o.call(i,e))){if(function(e){return!!e&&e.nodeType===e.ELEMENT_NODE}(e)){const{attributes:o=[],classes:i=[],children:s,require:l=[],allowEmpty:c}=n[a];if(s&&!c&&od(e))return void Js(e);if(e.hasAttributes()&&(Array.from(e.attributes).forEach((t=>{let{name:n}=t;"class"===n||(0,Ee.includes)(o,n)||e.removeAttribute(n)})),e.classList&&e.classList.length)){const t=i.map((e=>"string"==typeof e?t=>t===e:e instanceof RegExp?t=>e.test(t):Ee.noop));Array.from(e.classList).forEach((n=>{t.some((e=>e(n)))||e.classList.remove(n)})),e.classList.length||e.removeAttribute("class")}if(e.hasChildNodes()){if("*"===s)return;if(s)l.length&&!e.querySelector(l.join(","))?(Pd(e.childNodes,t,n,r),md(e)):e.parentNode&&"BODY"===e.parentNode.nodeName&&ld(e)?(Pd(e.childNodes,t,n,r),Array.from(e.childNodes).some((e=>!ld(e)))&&md(e)):Pd(e.childNodes,t,s,r);else for(;e.firstChild;)Js(e.firstChild)}}}else Pd(e.childNodes,t,n,r),r&&!ld(e)&&e.nextElementSibling&&dd(t.createElement("br"),e),md(e)}))}function Rd(e,t,n){const r=document.implementation.createHTMLDocument("");return r.body.innerHTML=e,Pd(r.body.childNodes,r,t,n),r.body.innerHTML}function Ld(e){e.nodeType===e.COMMENT_NODE&&Js(e)}function Od(e,t){return e.every((e=>function(e,t){if(cd(e))return!0;if(!t)return!1;const n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some((e=>0===(0,Ee.difference)([n,t],e).length))}(e,t)&&Od(Array.from(e.children),t)))}function Md(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}function Dd(e,t){t.parentNode,t.parentNode.insertBefore(e,t),e.appendChild(t)}function Bd(e,t){const n=e.ownerDocument.createElement(t);for(;e.firstChild;)n.appendChild(e.firstChild);return e.parentNode,e.parentNode.replaceChild(n,e),n}function Fd(e,t){if("SPAN"===e.nodeName&&e.style){const{fontWeight:n,fontStyle:r,textDecorationLine:o,textDecoration:i,verticalAlign:a}=e.style;"bold"!==n&&"700"!==n||Dd(t.createElement("strong"),e),"italic"===r&&Dd(t.createElement("em"),e),("line-through"===o||(0,Ee.includes)(i,"line-through"))&&Dd(t.createElement("s"),e),"super"===a?Dd(t.createElement("sup"),e):"sub"===a&&Dd(t.createElement("sub"),e)}else"B"===e.nodeName?e=Bd(e,"strong"):"I"===e.nodeName?e=Bd(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function jd(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)}const{parseInt:zd}=window;function Hd(e){return"OL"===e.nodeName||"UL"===e.nodeName}function Vd(e,t){if("P"!==e.nodeName)return;const n=e.getAttribute("style");if(!n)return;if(-1===n.indexOf("mso-list"))return;const r=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);if(!r)return;let o=zd(r[1],10)-1||0;const i=e.previousElementSibling;if(!i||!Hd(i)){const n=e.textContent.trim().slice(0,1),r=/[1iIaA]/.test(n),o=t.createElement(r?"ol":"ul");r&&o.setAttribute("type",n),e.parentNode.insertBefore(o,e)}const a=e.previousElementSibling,s=a.nodeName,l=t.createElement("li");let c=a;for(e.removeChild(e.firstElementChild);e.firstChild;)l.appendChild(e.firstChild);for(;o--;)c=c.lastElementChild||c,Hd(c)&&(c=c.lastElementChild||c);Hd(c)||(c=c.appendChild(t.createElement(s))),c.appendChild(l),e.parentNode.removeChild(e)}const{atob:Wd,File:Zd}=window;function Ud(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){const[t,n]=e.src.split(","),[r]=t.slice(5).split(";");if(!n||!r)return void(e.src="");let o;try{o=Wd(n)}catch(t){return void(e.src="")}const i=new Uint8Array(o.length);for(let e=0;e<i.length;e++)i[e]=o.charCodeAt(e);const a=r.replace("/","."),s=new Zd([i],a,{type:r});e.src=Ha(s)}1!==e.height&&1!==e.width||e.parentNode.removeChild(e)}}var $d=n(53787);const Gd=new(n.n($d)().Converter)({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function qd(e){if("IFRAME"===e.nodeName){const t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}function Kd(e){e.id&&0===e.id.indexOf("docs-internal-guid-")&&md(e)}function Yd(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&"PRE"===t.nodeName)return;let n=e.data.replace(/[ \r\n\t]+/g," ");if(" "===n[0]){const t=Nd(e,"previous");t&&"BR"!==t.nodeName&&" "!==t.textContent.slice(-1)||(n=n.slice(1))}if(" "===n[n.length-1]){const t=Nd(e,"next");(!t||"BR"===t.nodeName||t.nodeType===t.TEXT_NODE&&function(e){return" "===e||"\r"===e||"\n"===e||"\t"===e}(t.textContent[0]))&&(n=n.slice(0,-1))}n?e.data=n:e.parentNode.removeChild(e)}function Xd(e){"BR"===e.nodeName&&(Nd(e,"next")||e.parentNode.removeChild(e))}function Jd(e){"P"===e.nodeName&&(e.hasChildNodes()||e.parentNode.removeChild(e))}const{console:Qd}=window;function ep(e,t){return e=Rd(e=Td(e,[Kd,Fd,Ld]),sd("paste"),{inline:!0}),t||(e=Td(e,[Yd,Xd])),Qd.log("Processed inline HTML:\n\n",e),e}function tp(e){let{HTML:t="",plainText:n="",mode:r="AUTO",tagName:o,preserveWhiteSpace:i}=e;if(t=t.replace(/<meta[^>]+>/g,""),t=t.replace(/^\s*<html[^>]*>\s*<body[^>]*>(?:\s*<!--\s*StartFragment\s*-->)?/i,""),t=t.replace(/(?:<!--\s*EndFragment\s*-->\s*)?<\/body>\s*<\/html>\s*$/i,""),"INLINE"!==r){const e=t||n;if(-1!==e.indexOf("\x3c!-- wp:"))return td(e)}var a;if(String.prototype.normalize&&(t=t.normalize()),!n||t&&!function(e){return!/<(?!br[ />])/i.test(e)}(t)||(t=n,/^\s+$/.test(n)||(a=t,t=Gd.makeHtml(function(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,((e,t,n,r)=>`${t}\n${n}\n${r}`))}(a))),"AUTO"===r&&-1===n.indexOf("\n")&&0!==n.indexOf("<p>")&&0===t.indexOf("<p>")&&(r="INLINE")),"INLINE"===r)return ep(t,i);const s=Cd(t),l=s.length>1;if("AUTO"===r&&!l&&function(e,t){const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const r=Array.from(n.body.children);return!r.some(Md)&&Od(r,t)}(t,o))return ep(t,i);const c=sd("paste"),u=Sd("paste"),d=(0,Ee.compact)((0,Ee.flatMap)(s,(e=>{if("string"!=typeof e)return e;const t=[Kd,Vd,jd,gd,Ud,Fd,fd,Ld,qd,yd,vd],n={...u,...c};return e=Td(e,t,u),e=Td(e=ud(e=Rd(e,n)),[Yd,Xd,Jd],u),Qd.log("Processed HTML piece:\n\n",e),rd(e)})));if("AUTO"===r&&1===d.length&&vl(d[0].name,"__unstablePasteTextInline",!1)){const e=n.replace(/^[\n]+|[\n]+$/g,"");if(""!==e&&-1===e.indexOf("\n"))return Rd(eu(d[0]),c)}return d}function np(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&(0,Ee.every)(t,((t,n)=>{let[r,,o]=t;const i=e[n];return r===i.name&&np(i.innerBlocks,o)}))}function rp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?(0,Ee.map)(t,((t,n)=>{let[r,o,i]=t;const a=e[n];if(a&&a.name===r){const e=rp(a.innerBlocks,i);return{...a,innerBlocks:e}}const s=ml(r),l=(e,t)=>(0,Ee.mapValues)(t,((t,n)=>c(e[n],t))),c=(e,t)=>{return n=e,"html"===(0,Ee.get)(n,["source"])&&(0,Ee.isArray)(t)?Gc(t):(e=>"query"===(0,Ee.get)(e,["source"]))(e)&&t?t.map((t=>l(e.query,t))):t;var n},u=l((0,Ee.get)(s,["attributes"],{}),o),[d,p]=Du(r,u);return Tl(d,p,rp([],i))})):e}(0,V.KJ)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&vl(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));var op,ip=function(e,t){return n=>{const r=e(n),o=n.displayName||n.name||"Component";return r.displayName=`${(0,Ee.upperFirst)((0,Ee.camelCase)(t))}(${o})`,r}},ap=new Uint8Array(16);function sp(){if(!op&&!(op="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return op(ap)}for(var lp=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,cp=function(e){return"string"==typeof e&&lp.test(e)},up=[],dp=0;dp<256;++dp)up.push((dp+256).toString(16).substr(1));var pp=function(e,t,n){var r=(e=e||{}).random||(e.rng||sp)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(up[e[t+0]]+up[e[t+1]]+up[e[t+2]]+up[e[t+3]]+"-"+up[e[t+4]]+up[e[t+5]]+"-"+up[e[t+6]]+up[e[t+7]]+"-"+up[e[t+8]]+up[e[t+9]]+"-"+up[e[t+10]]+up[e[t+11]]+up[e[t+12]]+up[e[t+13]]+up[e[t+14]]+up[e[t+15]]).toLowerCase();if(!cp(n))throw TypeError("Stringified UUID is invalid");return n}(r)};const fp=new Set,mp=T()((e=>{let t=pp().replace(/[0-9]/g,"");for(;fp.has(t);)t=pp().replace(/[0-9]/g,"");return fp.add(t),bi({container:e,key:t})}));function hp(e){let{children:t,document:n}=e;if(!n)return null;const r=mp(n.head);return(0,_.createElement)(oi.C,{value:r},t)}var gp=(0,_.createContext)();function vp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bp(Object(n),!0).forEach((function(t){vp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kp(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function xp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _p(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xp(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var Ep,Cp=(0,_.createContext)({}),Sp=function(e,t,n){void 0===n&&(n=t.children);var r=(0,_.useContext)(Cp);return r.useCreateElement?r.useCreateElement(e,t,n):"string"==typeof e&&function(e){return"function"==typeof e}(n)?(t.children,n(kp(t,["children"]))):(0,_.createElement)(e,t,n)};function Ip(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Np(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tp(Object(n),!0).forEach((function(t){Ip(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ap(e){var t;if(!function(e){return"object"==typeof e&&null!=e}(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null===(t=n.constructor)||void 0===t?void 0:t.toString())===Object.toString()}function Pp(e,t){for(var n={},r={},o=0,i=Object.keys(e);o<i.length;o++){var a=i[o];t.indexOf(a)>=0?n[a]=e[a]:r[a]=e[a]}return[n,r]}function Rp(e,t){if(void 0===t&&(t=[]),!Ap(e.state))return Pp(e,t);var n=Pp(e,[].concat(t,["state"])),r=n[0],o=n[1],i=r.state,a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,["state"]);return[Np(Np({},i),a),o]}function Lp(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var i=0,a=n;i<a.length;i++){var s=a[i];if(e[s]!==t[s])return!1}return!0}function Op(e){return"normalizePropsAreEqualInner"===e.name?e:function(t,n){return Ap(t.state)&&Ap(n.state)?e(Np(Np({},t.state),t),Np(Np({},n.state),n)):e(t,n)}}function Mp(e){var t=e.as,n=e.useHook,r=e.memo,o=e.propsAreEqual,i=void 0===o?null==n?void 0:n.unstable_propsAreEqual:o,a=e.keys,s=void 0===a?(null==n?void 0:n.__keys)||[]:a,l=e.useCreateElement,c=void 0===l?Sp:l,u=function(e,r){var o=e.as,i=void 0===o?t:o,a=kp(e,["as"]);if(n){var l,u=Rp(a,s),d=u[0],p=u[1],f=n(d,yp({ref:r},p)),m=f.wrapElement,h=kp(f,["wrapElement"]),g=(null===(l=i.render)||void 0===l?void 0:l.__keys)||i.__keys,v=g&&Rp(a,g)[0],b=v?yp(yp({},h),v):h,y=c(i,b);return m?m(y):y}return c(i,yp({ref:r},a))};return u=function(e){return(0,_.forwardRef)(e)}(u),r&&(u=function(e,t){return(0,_.memo)(e,t)}(u,i&&Op(i))),u.__keys=s,u.unstable_propsAreEqual=Op(i||Lp),u}function Dp(e,t){(0,_.useDebugValue)(e);var n=(0,_.useContext)(Cp);return null!=n[e]?n[e]:t}function Bp(e){var t,n,r,o=(r=e.compose,Array.isArray(r)?r:void 0!==r?[r]:[]),i=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r="use"+e+"Options";(0,_.useDebugValue)(r);var o=Dp(r);return o?yp(yp({},t),o(t,n)):t}(e.name,t,n)),e.compose)for(var r,i=_p(o);!(r=i()).done;)t=r.value.__useOptions(t,n);return t},a=function(t,n,r){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===r&&(r=!1),r||(t=i(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r="use"+e+"Props";(0,_.useDebugValue)(r);var o=Dp(r);return o?o(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,s=_p(o);!(a=s()).done;)n=(0,a.value)(t,n,!0);var l={},c=n||{};for(var u in c)void 0!==c[u]&&(l[u]=c[u]);return l};a.__useOptions=i;var s=o.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return a.__keys=[].concat(s,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),a.unstable_propsAreEqual=e.propsAreEqual||(null===(n=o[0])||void 0===n?void 0:n.unstable_propsAreEqual)||Lp,a}function Fp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jp(Object(n),!0).forEach((function(t){Fp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hp(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Vp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wp(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Vp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vp(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Zp(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function Up(e,t){return(0,_.useMemo)((function(){return null==e&&null==t?null:function(n){Zp(e,n),Zp(t,n)}}),[e,t])}function $p(e){return e?e.ownerDocument||e:document}try{Ep=window}catch(e){}function Gp(e){return e&&$p(e).defaultView||Ep}var qp=function(){var e=Gp();return Boolean(void 0!==e&&e.document&&e.document.createElement)}(),Kp=qp?_.useLayoutEffect:_.useEffect;function Yp(e){var t=(0,_.useRef)(e);return Kp((function(){t.current=e})),t}function Xp(e){return e.target===e.currentTarget}function Jp(e){var t=$p(e).activeElement;return null!=t&&t.nodeName?t:null}function Qp(e,t){return e===t||e.contains(t)}function ef(e){var t=Jp(e);if(!t)return!1;if(Qp(e,t))return!0;var n=t.getAttribute("aria-activedescendant");return!(!n||n!==e.id&&!e.querySelector("#"+n))}function tf(e){return!Qp(e.currentTarget,e.target)}var nf=["button","color","file","image","reset","submit"];function rf(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==nf.indexOf(t.type)}return!1}function of(e){return!!qp&&-1!==window.navigator.userAgent.indexOf(e)}var af=Bp({name:"Role",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=Hp(e,["unstable_system"]),o=t.unstable_system,i=Hp(t,["unstable_system"]);return!(n!==o&&!Lp(n,o))&&Lp(r,i)}}),sf=(Mp({as:"div",useHook:af}),of("Mac")&&!of("Chrome")&&(of("Safari")||of("Firefox")));function lf(e){!ef(e)&&function(e){return function(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}(e,"input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])")&&function(e){var t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)}(e)&&e.focus()}function cf(e,t,n,r){return e?t&&!n?-1:void 0:t?r:r||0}function uf(e,t){return(0,_.useCallback)((function(n){var r;null===(r=e.current)||void 0===r||r.call(e,n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}),[e,t])}var df=Bp({name:"Tabbable",compose:af,keys:["disabled","focusable"],useOptions:function(e,t){return zp({disabled:t.disabled},e)},useProps:function(e,t){var n=t.ref,r=t.tabIndex,o=t.onClickCapture,i=t.onMouseDownCapture,a=t.onMouseDown,s=t.onKeyPressCapture,l=t.style,c=Hp(t,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),u=(0,_.useRef)(null),d=Yp(o),p=Yp(i),f=Yp(a),m=Yp(s),h=!!e.disabled&&!e.focusable,g=(0,_.useState)(!0),v=g[0],b=g[1],y=(0,_.useState)(!0),w=y[0],k=y[1],x=e.disabled?zp({pointerEvents:"none"},l):l;Kp((function(){var e=u.current;e&&(["BUTTON","INPUT","SELECT","TEXTAREA","A"].includes(e.tagName)||b(!1),["BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)||k(!1))}),[]);var E=uf(d,e.disabled),C=uf(p,e.disabled),S=uf(m,e.disabled),I=(0,_.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e);var n=e.currentTarget;if(!e.defaultPrevented&&sf&&!tf(e)&&rf(n)){var r=requestAnimationFrame((function(){n.removeEventListener("mouseup",o,!0),lf(n)})),o=function(){cancelAnimationFrame(r),lf(n)};n.addEventListener("mouseup",o,{once:!0,capture:!0})}}),[]);return zp({ref:Up(u,n),style:x,tabIndex:cf(h,v,w,r),disabled:!(!h||!w)||void 0,"aria-disabled":!!e.disabled||void 0,onClickCapture:E,onMouseDownCapture:C,onMouseDown:I,onKeyPressCapture:S},c)}});Mp({as:"div",useHook:df});var pf=Bp({name:"Clickable",compose:df,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,r=e.unstable_clickOnSpace;return zp({unstable_clickOnEnter:n,unstable_clickOnSpace:void 0===r||r},Hp(e,["unstable_clickOnEnter","unstable_clickOnSpace"]))},useProps:function(e,t){var n=t.onKeyDown,r=t.onKeyUp,o=Hp(t,["onKeyDown","onKeyUp"]),i=(0,_.useState)(!1),a=i[0],s=i[1],l=Yp(n),c=Yp(r),u=(0,_.useCallback)((function(t){var n;if(null===(n=l.current)||void 0===n||n.call(l,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Xp(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(rf(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&s(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),d=(0,_.useCallback)((function(t){var n;if(null===(n=c.current)||void 0===n||n.call(c,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;a&&r&&(s(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,a]);return zp({"data-active":a||void 0,onKeyDown:u,onKeyUp:d},o)}});function ff(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function mf(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=ff(e.items||[]))||void 0===n?void 0:n.id}Mp({as:"button",memo:!0,useHook:pf});var hf=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],gf=hf,vf=gf;function bf(e){e.userFocus=!0,e.focus(),e.userFocus=!1}function yf(e,t){e.userFocus=t}function wf(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}function kf(e){var t=Jp(e);if(!t)return!1;if(t===e)return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function xf(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}var _f=(0,_.createContext)(xf),Ef=Bp({keys:[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),useOptions:function(e,t){var n=(0,_.useContext)(_f),r=(0,_.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],o=(0,_.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),i=t.id||e.id||""+o+r;return zp(zp({},e),{},{id:i})},useProps:function(e,t){return zp({id:e.id},t)}});function Cf(e,t,n){if("function"==typeof Event)return new Event(t,n);var r=$p(e).createEvent("Event");return r.initEvent(t,null==n?void 0:n.bubbles,null==n?void 0:n.cancelable),r}function Sf(e,t){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){var n,r=Object.getPrototypeOf(e),o=null===(n=Object.getOwnPropertyDescriptor(r,"value"))||void 0===n?void 0:n.set;o&&(o.call(e,t),function(e,t,n){e.dispatchEvent(Cf(e,"input",{bubbles:!0}))}(e))}}function If(e){return e.querySelector("[data-composite-item-widget]")}Mp({as:"div",useHook:Ef});var Tf=Bp({name:"CompositeItem",compose:[pf,Ef],keys:vf,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return pf.unstable_propsAreEqual(e,t);var n=e.currentId,r=e.unstable_moves,o=Hp(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,s=Hp(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(r!==a)return!1;return pf.unstable_propsAreEqual(o,s)},useOptions:function(e){return zp(zp({},e),{},{id:e.id,currentId:mf(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,r=t.ref,o=t.tabIndex,i=void 0===o?0:o,a=t.onMouseDown,s=t.onFocus,l=t.onBlurCapture,c=t.onKeyDown,u=t.onClick,d=Hp(t,["ref","tabIndex","onMouseDown","onFocus","onBlurCapture","onKeyDown","onClick"]),p=(0,_.useRef)(null),f=e.id,m=e.disabled&&!e.focusable,h=e.currentId===f,g=Yp(h),v=(0,_.useRef)(!1),b=function(e){return(0,_.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),y=Yp(a),w=Yp(s),k=Yp(l),x=Yp(c),E=Yp(u),C=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&h||!(null!==(n=e.items)&&void 0!==n&&n.length);(0,_.useEffect)((function(){var t;if(f)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:f,ref:p,disabled:!!m}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,f)}}),[f,m,e.registerItem,e.unregisterItem]),(0,_.useEffect)((function(){var t=p.current;t&&e.unstable_moves&&g.current&&bf(t)}),[e.unstable_moves]);var S=(0,_.useCallback)((function(e){var t;null===(t=y.current)||void 0===t||t.call(y,e),yf(e.currentTarget,!0)}),[]),I=(0,_.useCallback)((function(t){var n,r,o=!!t.currentTarget.userFocus;if(yf(t.currentTarget,!1),null===(n=w.current)||void 0===n||n.call(w,t),!t.defaultPrevented&&!tf(t)&&f&&!function(e,t){if(Xp(e))return!1;for(var n,r=Wp(t);!(n=r()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(r=e.setCurrentId)||void 0===r||r.call(e,f),o&&e.unstable_virtual&&e.baseId&&Xp(t))){var i=$p(t.target).getElementById(e.baseId);i&&(v.current=!0,function(e,t){var n={},r=n.preventScroll,o=n.isActive,i=void 0===o?kf:o;i(e)||(e.focus({preventScroll:r}),i(e)||requestAnimationFrame((function(){e.focus({preventScroll:r})})))}(i))}}),[f,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),T=(0,_.useCallback)((function(t){var n;null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||e.unstable_virtual&&v.current&&(v.current=!1,t.preventDefault(),t.stopPropagation())}),[e.unstable_virtual]),N=(0,_.useCallback)((function(t){var n;if(Xp(t)){var r="horizontal"!==e.orientation,o="vertical"!==e.orientation,i=!(null==b||!b.groupId),a={ArrowUp:(i||r)&&e.up,ArrowRight:(i||o)&&e.next,ArrowDown:(i||r)&&e.down,ArrowLeft:(i||o)&&e.previous,Home:function(){var n,r;!i||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(r=e.previous)||void 0===r||r.call(e,!0)},End:function(){var n,r;!i||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(r=e.next)||void 0===r||r.call(e,!0)},PageUp:function(){var t,n;i?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;i?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}[t.key];if(a)return t.preventDefault(),void a();if(null===(n=x.current)||void 0===n||n.call(x,t),!t.defaultPrevented)if(1===t.key.length&&" "!==t.key){var s=If(t.currentTarget);s&&wf(s)&&(s.focus(),Sf(s,""))}else if("Delete"===t.key||"Backspace"===t.key){var l=If(t.currentTarget);l&&wf(l)&&(t.preventDefault(),Sf(l,""))}}}),[e.orientation,b,e.up,e.next,e.down,e.previous,e.first,e.last]),A=(0,_.useCallback)((function(e){var t;if(null===(t=E.current)||void 0===t||t.call(E,e),!e.defaultPrevented){var n=If(e.currentTarget);n&&!ef(n)&&n.focus()}}),[]);return zp({ref:Up(p,r),id:f,tabIndex:C?i:-1,"aria-selected":!(!e.unstable_virtual||!h)||void 0,onMouseDown:S,onFocus:I,onBlurCapture:T,onKeyDown:N,onClick:A},d)}}),Nf=Mp({as:"button",memo:!0,useHook:Tf}),Af=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],Pf=Mp({as:"button",memo:!0,useHook:Bp({name:"ToolbarItem",compose:Tf,keys:Af})}),Rf=n(34155),Lf=(0,_.forwardRef)((function(e,t){let{children:n,as:r,...o}=e;const i=(0,_.useContext)(gp);if("function"!=typeof n&&!r)return void 0!==Rf&&Rf.env,null;const a={...o,ref:t,"data-toolbar-item":!0};return i?(0,_.createElement)(Pf,(0,dr.Z)({},i,a,{as:r}),n):r?(0,_.createElement)(r,a,n):n(a)})),Of=e=>(0,_.createElement)("div",{className:e.className},e.children),Mf=(0,_.forwardRef)((function(e,t){let{containerClassName:n,className:r,extraProps:o,children:i,title:a,isActive:s,isDisabled:l,...c}=e;return(0,_.useContext)(gp)?(0,_.createElement)(Lf,(0,dr.Z)({className:Lr()("components-toolbar-button",r)},o,c,{ref:t}),(e=>(0,_.createElement)(ga,(0,dr.Z)({label:a,isPressed:s,disabled:l},e),i))):(0,_.createElement)(Of,{className:n},(0,_.createElement)(ga,(0,dr.Z)({ref:t,icon:c.icon,label:a,shortcut:c.shortcut,"data-subscript":c.subscript,onClick:e=>{e.stopPropagation(),c.onClick&&c.onClick(e)},className:Lr()("components-toolbar__control",r),isPressed:s,disabled:l,"data-toolbar-item":!0},o,c),i))})),Df=e=>{let{className:t,children:n,...r}=e;return(0,_.createElement)("div",(0,dr.Z)({className:t},r),n)},Bf=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function Ff(e){var t;let{renderContent:n,renderToggle:r,position:o="bottom right",className:i,contentClassName:a,expandOnMobile:s,headerTitle:l,focusOnMount:c,popoverProps:u,onClose:d,onToggle:p}=e;const f=(0,_.useRef)(),[m,h]=function(e,t){const[n,r]=(0,_.useState)(!1);return[n,e=>{r(e),t&&t(e)}]}(0,p);function g(){d&&d(),h(!1)}(0,_.useEffect)((()=>()=>{p&&p(!1)}),[]);const v={isOpen:m,onToggle:function(){h(!m)},onClose:g};return(0,_.createElement)("div",{className:Lr()("components-dropdown",i),ref:f,tabIndex:"-1"},r(v),m&&(0,_.createElement)(Na,(0,dr.Z)({position:o,onClose:g,onFocusOutside:function(){const{ownerDocument:e}=f.current,t=e.activeElement.closest('[role="dialog"]');f.current.contains(e.activeElement)||t&&!t.contains(f.current)||g()},expandOnMobile:s,headerTitle:l,focusOnMount:c},u,{anchorRef:null!==(t=null==u?void 0:u.anchorRef)&&void 0!==t?t:f.current,className:Lr()("components-dropdown__content",u?u.className:void 0,a)}),n(v)))}const jf=["menuitem","menuitemradio","menuitemcheckbox"];class zf extends _.Component{constructor(){super(...arguments),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}componentWillUnmount(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,(0,Ee.isFunction)(t)?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){const{onlyBrowserTabstops:t}=this.props,n=(t?_o.tabbable:_o.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){const n=e.indexOf(t);if(-1!==n)return n}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=Ee.noop,stopNavigationEvents:i}=this.props,a=r(e);if(void 0!==a&&i){e.stopImmediatePropagation();const t=e.target.getAttribute("role");jf.includes(t)&&e.preventDefault()}if(!a)return;const s=t(e.target.ownerDocument.activeElement);if(!s)return;const{index:l,focusables:c}=s,u=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(l,c.length,a):l+a;u>=0&&u<c.length&&(c[u].focus(),o(u,c[u]))}render(){const{children:e,...t}=this.props;return(0,_.createElement)("div",(0,dr.Z)({ref:this.bindContainer},(0,Ee.omit)(t,["stopNavigationEvents","eventToOffset","onNavigate","onKeyDown","cycle","onlyBrowserTabstops","forwardedRef"])),e)}}const Hf=(e,t)=>(0,_.createElement)(zf,(0,dr.Z)({},e,{forwardedRef:t}));Hf.displayName="NavigableContainer";var Vf=(0,_.forwardRef)(Hf),Wf=(0,_.forwardRef)((function(e,t){let{role:n="menu",orientation:r="vertical",...o}=e;return(0,_.createElement)(Vf,(0,dr.Z)({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:n,"aria-orientation":"presentation"===n?null:r,eventToOffset:e=>{const{keyCode:t}=e;let n=[Xr],o=[Kr];return"horizontal"===r&&(n=[Yr],o=[qr]),"both"===r&&(n=[Yr,Xr],o=[qr,Kr]),(0,Ee.includes)(n,t)?1:(0,Ee.includes)(o,t)?-1:(0,Ee.includes)([Xr,Kr,qr,Yr],t)?0:void 0}},o))}));function Zf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...e,...t};return t.className&&e.className&&(n.className=Lr()(t.className,e.className)),n}var Uf=function(e){const{children:t,className:n,controls:r,icon:o=Bf,label:i,popoverProps:a,toggleProps:s,menuProps:l,disableOpenOnArrowDown:c=!1,text:u,noIcons:d}=e;if((0,Ee.isEmpty)(r)&&!(0,Ee.isFunction)(t))return null;let p;(0,Ee.isEmpty)(r)||(p=r,Array.isArray(p[0])||(p=[p]));const f=Zf({className:"components-dropdown-menu__popover"},a);return(0,_.createElement)(Ff,{className:Lr()("components-dropdown-menu",n),popoverProps:f,renderToggle:e=>{var t;let{isOpen:n,onToggle:r}=e;const a=Zf({className:Lr()("components-dropdown-menu__toggle",{"is-opened":n})},s);return(0,_.createElement)(ga,(0,dr.Z)({},a,{icon:o,onClick:e=>{r(e),a.onClick&&a.onClick(e)},onKeyDown:e=>{(e=>{c||n||e.keyCode!==Xr||(e.preventDefault(),r())})(e),a.onKeyDown&&a.onKeyDown(e)},"aria-haspopup":"true","aria-expanded":n,label:i,text:u,showTooltip:null===(t=null==s?void 0:s.showTooltip)||void 0===t||t}),a.children)},renderContent:e=>{const n=Zf({"aria-label":i,className:Lr()("components-dropdown-menu__menu",{"no-icons":d})},l);return(0,_.createElement)(Wf,(0,dr.Z)({},n,{role:"menu"}),(0,Ee.isFunction)(t)?t(e):null,(0,Ee.flatMap)(p,((t,n)=>t.map(((t,r)=>(0,_.createElement)(ga,{key:[n,r].join(),onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:Lr()("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===r,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",disabled:t.isDisabled},t.title))))))}})},$f=function(e){let{controls:t=[],toggleProps:n,...r}=e;const o=e=>(0,_.createElement)(Uf,(0,dr.Z)({controls:t,toggleProps:{...e,"data-toolbar-item":!0}},r));return(0,_.useContext)(gp)?(0,_.createElement)(Lf,n,o):o(n)},Gf=function(e){let{controls:t=[],children:n,className:r,isCollapsed:o,title:i,...a}=e;const s=(0,_.useContext)(gp);if(!(t&&t.length||n))return null;const l=Lr()(s?"components-toolbar-group":"components-toolbar",r);let c=t;return Array.isArray(c[0])||(c=[c]),o?(0,_.createElement)($f,(0,dr.Z)({label:i,controls:c,className:l,children:n},a)):(0,_.createElement)(Df,(0,dr.Z)({className:l},a),(0,Ee.flatMap)(c,((e,t)=>e.map(((e,n)=>(0,_.createElement)(Mf,(0,dr.Z)({key:[t,n].join(),containerClassName:t>0&&0===n?"has-left-divider":null},e)))))),n)},qf={default:Pr("BlockControls"),block:Pr("BlockControlsBlock"),inline:Pr("BlockFormatControls"),other:Pr("BlockControlsOther"),parent:Pr("BlockControlsParent")};const Kf={insertUsage:{}},Yf={alignWide:!1,supportsLayout:!0,colors:[{name:U("Black"),slug:"black",color:"#000000"},{name:U("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:U("White"),slug:"white",color:"#ffffff"},{name:U("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:U("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:U("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:U("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:U("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:U("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:U("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:U("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:U("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:$("Small","font size name"),size:13,slug:"small"},{name:$("Normal","font size name"),size:16,slug:"normal"},{name:$("Medium","font size name"),size:20,slug:"medium"},{name:$("Large","font size name"),size:36,slug:"large"},{name:$("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:U("Thumbnail")},{slug:"medium",name:U("Medium")},{slug:"large",name:U("Large")},{slug:"full",name:U("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],__unstableGalleryWithImageBlocks:!1,gradients:[{name:U("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:U("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:U("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:U("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:U("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:U("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:U("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:U("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:U("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:U("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:U("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:U("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function Xf(e,t,n){return[...e.slice(0,n),...(0,Ee.castArray)(t),...e.slice(n)]}function Jf(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),Xf(o,e.slice(t,t+r),n)}function Qf(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,Qf(o,r))})),n}function em(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},em(n.innerBlocks,n.clientId))),{})}function tm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee.identity;const n={},r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n[o.clientId]=t(o)}return n}function nm(e){return tm(e,(e=>(0,Ee.omit)(e,"attributes")))}function rm(e){return tm(e,(e=>e.attributes))}function om(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,Ee.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,Ee.isEqual)((0,Ee.keys)(e),(0,Ee.keys)(t))}(e.attributes,t.attributes)}function im(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 am(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 sm=(0,Ee.flow)(Se(),(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,Ee.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=im(r,n.blocks);r.tree=am(r,{...r.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=am(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=am(r,{...r.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=im(r,n.blocks);r.tree=am(r,{...(0,Ee.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=am(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=am(r,(0,Ee.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),n.toRootClientId&&e.push(n.toRootClientId),n.fromRootClientId&&n.fromRootClientId||e.push(""),r.tree=am(r,r.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=am(r,r.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,Ee.keys)((0,Ee.omitBy)(r.attributes,((e,t)=>"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId)));r.tree=am(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,Ee.reduce)(r,((e,n,r)=>(t.order[r]&&(e[r]=t.order[r]),e)),{})}),i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:nm(n.blocks),attributes:rm(n.blocks),order:Qf(n.blocks),parents:em(n.blocks),controlledInnerBlocks:{}},r=im(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 a="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!a){var s;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(s=null==r?void 0:r.isPersistentChange)||void 0===s||s;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:a?!n:!om(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,...nm(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,Ee.omit)(t.updates,"attributes");return(0,Ee.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,Ee.omit)(e,t.replacedClientIds),...nm(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,Ee.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,...rm(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,Ee.reduce)(t.uniqueByBlock?t.attributes[r]:t.attributes,((t,n,o)=>{var i,a;return n!==t[o]&&((t=(i=e[r])===(a=t)?{...i}:a)[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,Ee.omit)(e,t.replacedClientIds),...rm(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,Ee.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=Qf(t.blocks);return{...e,...(0,Ee.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e[n]||[],o=Qf(t.blocks,n),{index:i=r.length}=t;return{...e,...o,[n]:Xf(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]:Jf(e[r],t,i,o.length)}}return{...e,[n]:(0,Ee.without)(e[n],...o),[r]:Xf(e[r],o,i)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=(0,Ee.first)(n),i=e[r];if(!i.length||o===(0,Ee.first)(i))return e;const a=i.indexOf(o);return{...e,[r]:Jf(i,a,a-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=(0,Ee.first)(n),i=(0,Ee.last)(n),a=e[r];if(!a.length||i===(0,Ee.last)(a))return e;const s=a.indexOf(o);return{...e,[r]:Jf(a,s,s+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=Qf(t.blocks);return(0,Ee.flow)([e=>(0,Ee.omit)(e,t.replacedClientIds),e=>({...e,...(0,Ee.omit)(r,"")}),e=>(0,Ee.mapValues)(e,(e=>(0,Ee.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,Ee.flow)([e=>(0,Ee.omit)(e,t.removedClientIds),e=>(0,Ee.mapValues)(e,(e=>(0,Ee.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,...em(t.blocks)};case"INSERT_BLOCKS":return{...e,...em(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,Ee.omit)(e,t.replacedClientIds),...em(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,Ee.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}});function lm(){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 cm=Se()({blocks:sm,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},isCaretWithinFormattedText:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.startOffset},selectionEnd:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.endOffset}};case"RESET_SELECTION":const{selectionStart:o,selectionEnd:i}=r;return{selectionStart:o,selectionEnd:i};case"MULTI_SELECT":const{start:a,end:s}=r;return{selectionStart:{clientId:a},selectionEnd:{clientId:s}};case"RESET_BLOCKS":const l=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,c=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!l&&!c)return n;if(!r.blocks.some((e=>e.clientId===l)))return{selectionStart:{},selectionEnd:{}};if(!r.blocks.some((e=>e.clientId===c)))return{...n,selectionEnd:n.selectionStart}}return{selectionStart:lm(n.selectionStart,r),selectionEnd:lm(n.selectionEnd,r)}},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;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return 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||["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,Ee.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,Ee.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,Ee.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;switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yf,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Kf,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:o}=n,i=(0,xe.Ys)(pc).getActiveBlockVariation(o,r);let a=null!=i&&i.name?`${o}/${i.name}`:o;const s={name:a};return"core/block"===o&&(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},isNavigationMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode: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_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted: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":return n.blocks.length?{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source}:t;case"RESET_BLOCKS":return{}}return t}}),um={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0},dm=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"}));const pm=[];function fm(e,t){const n=e.blocks.byClientId[t],r="core/social-link";if("web"!==um.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 mm(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function hm(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}function gm(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const vm=jt(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:hm(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function bm(e,t){var n;const r=t&&eg(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[r])||void 0===n?void 0:n.innerBlocks)||pm}const ym=jt(((e,t)=>({clientId:t,innerBlocks:wm(e,t)})),(e=>[e.blocks.order])),wm=jt((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,Ee.map)(Qm(e,t),(t=>ym(e,t)))}),(e=>[e.blocks.order])),km=(e,t)=>(0,Ee.flatMap)(t,(t=>{const n=Qm(e,t);return[...n,...km(e,n)]})),xm=jt((e=>{const t=Qm(e);return[...t,...km(e,t)]}),(e=>[e.blocks.order])),_m=jt(((e,t)=>{const n=xm(e);return t?(0,Ee.reduce)(n,((n,r)=>e.blocks.byClientId[r].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),Em=jt(((e,t)=>(0,Ee.map)((0,Ee.castArray)(t),(t=>gm(e,t)))),((e,t)=>(0,Ee.map)((0,Ee.castArray)(t),(t=>e.blocks.tree[t]))));function Cm(e,t){return Qm(e,t).length}function Sm(e){return e.selection.selectionStart}function Im(e){return e.selection.selectionEnd}function Tm(e){return e.selection.selectionStart.clientId}function Nm(e){return e.selection.selectionEnd.clientId}function Am(e){return Zm(e).length||(e.selection.selectionStart.clientId?1:0)}function Pm(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function Rm(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function Lm(e){const t=Rm(e);return t?gm(e,t):null}function Om(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const Mm=jt((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])),Dm=jt((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=Mm(e,t,r);return(0,Ee.map)((0,Ee.filter)((0,Ee.map)(o,(t=>({id:t,name:fm(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 Bm(e,t){let n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function Fm(e,t){const n=Rm(e),r=[...Mm(e,t),t],o=[...Mm(e,n),n];let i;const a=Math.min(r.length,o.length);for(let e=0;e<a&&r[e]===o[e];e++)i=r[e];return i}function jm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Rm(e)),void 0===t&&(t=n<0?$m(e):Gm(e)),!t)return null;const r=Om(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o[r],a=i.indexOf(t),s=a+1*n;return s<0||s===i.length?null:i[s]}function zm(e,t){return jm(e,t,-1)}function Hm(e,t){return jm(e,t,1)}function Vm(e){return e.initialPosition}const Wm=jt((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return pm;if(t.clientId===n.clientId)return[t.clientId];const r=Om(e,t.clientId);if(null===r)return pm;const o=Qm(e,r),i=o.indexOf(t.clientId),a=o.indexOf(n.clientId);return i>a?o.slice(a,i+1):o.slice(i,a+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Zm(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?pm:Wm(e)}const Um=jt((e=>{const t=Zm(e);return t.length?t.map((t=>gm(e,t))):pm}),(e=>[...Wm.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function $m(e){return(0,Ee.first)(Zm(e))||null}function Gm(e){return(0,Ee.last)(Zm(e))||null}function qm(e,t){return $m(e)===t}function Km(e,t){return-1!==Zm(e).indexOf(t)}const Ym=jt(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=Om(e,n),r=Km(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Xm(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Jm(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Qm(e,t){return e.blocks.order[t||""]||pm}function eh(e,t){return Qm(e,Om(e,t)).indexOf(t)}function th(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function nh(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,Ee.some)(Qm(e,t),(t=>th(e,t)||Km(e,t)||n&&nh(e,t,n)))}function rh(e,t){if(!t)return!1;const n=Zm(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function oh(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function ih(e){return e.isMultiSelecting}function ah(e){return e.isSelectionEnabled}function sh(e,t){return e.blocksMode[t]||"visual"}function lh(e){return e.isTyping}function ch(e){return!!e.draggedBlocks.length}function uh(e){return e.draggedBlocks}function dh(e,t){return e.draggedBlocks.includes(t)}function ph(e,t){if(!ch(e))return!1;const n=Mm(e,t);return(0,Ee.some)(n,(t=>dh(e,t)))}function fh(e){return e.isCaretWithinFormattedText}function mh(e){let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=Om(e,i)||void 0,n=eh(e,o.clientId)+1):n=Qm(e).length,{rootClientId:t,index:n}}function hh(e){return null!==e.insertionPoint}function gh(e){return e.template.isValid}function vh(e){return e.settings.template}function bh(e,t){if(!t)return e.settings.templateLock;const n=Vh(e,t);return n?n.templateLock:null}const yh=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,Ee.isBoolean)(e)?e:(0,Ee.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},wh=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=ml(t),!n)return!1;const{allowedBlockTypes:o}=Wh(e),i=yh(o,t,!0);if(!i)return!1;const a=!!bh(e,r);if(a)return!1;const s=Vh(e,r);if(r&&void 0===s)return!1;const l=null==s?void 0:s.allowedBlocks,c=yh(l,t),u=n.parent,d=fm(e,r),p=yh(u,d),f=null===c&&null===p||!0===c||!0===p;return f?(0,V.O)("blockEditor.__unstableCanInsertBlockType",f,n,r,{getBlock:gm.bind(null,e),getBlockParentsByBlockName:Dm.bind(null,e)}):f},kh=jt(wh,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function xh(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>kh(e,fm(e,t),n)))}function _h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=hm(e,t);if(null===r)return!0;const{lock:o}=r,i=!!bh(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!i:!(null!=o&&o.remove)}function Eh(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>_h(e,t,n)))}function Ch(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=hm(e,t);if(null===r)return;const{lock:o}=r,i="all"===bh(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!i:!(null!=o&&o.move)}function Sh(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Ch(e,t,n)))}function Ih(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 Th=(e,t,n)=>!!vl(t,"inserter",!0)&&wh(e,t.name,n),Nh=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=Ih(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:Ah(o,i)}},Ah=(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}},Ph=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let o=!1;vl(t.name,"multiple",!0)||(o=(0,Ee.some)(Em(e,xm(e)),{name:t.name}));const{time:i,count:a=0}=Ih(e,r)||{},s={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:Ah(i,a)};if("transform"===n)return s;const l=yl(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:l,example:t.example,utility:1}}},Rh=jt((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Ph(e,{buildScope:"inserter"}),r=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,o=t=>{let n=dm;if("web"===um.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,o=ml(t+r);o&&(n=o.icon)}}const o=`core/block/${t.id}`,{time:i,count:a=0}=Ih(e,o)||{},s=Ah(i,a);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:s}},i=hl().filter((n=>Th(e,n,t))).map(n),a=wh(e,"core/block",t)?Kh(e).map(o):[],s=i.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=Nh(e,n);t.push(...r.map(o))}return t}),[]),l=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:c,noncore:u}=s.reduce(l,{core:[],noncore:[]}),d=[...c,...u];return[...d,...a]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Kh(e),hl()])),Lh=jt((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=Ph(e,{buildScope:"transform"}),o=hl().filter((t=>Th(e,t,n))).map(r),i=(0,Ee.mapKeys)(o,(e=>{let{name:t}=e;return t})),a=Ml(t).reduce(((e,t)=>(i[null==t?void 0:t.name]&&e.push(i[t.name]),e)),[]),s=(0,Ee.orderBy)(a,(e=>i[e.name].frecency),"desc");return s}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,hl()])),Oh=jt((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,Ee.some)(hl(),(n=>Th(e,n,t)));if(n)return!0;const r=wh(e,"core/block",t)&&Kh(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Kh(e),hl()])),Mh=jt((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,Ee.filter)(hl(),(n=>Th(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,hl()])),Dh=jt((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(gm(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),Bh=jt(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:td(n.content)}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Fh=jt((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=Wh(e);return t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return Bh(e,n)})).filter((e=>{let{blocks:t}=e;return((e,t)=>{if((0,Ee.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!yh(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)}))}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),jh=jt((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Fh(e),r=(0,Ee.filter)(n,(n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return kh(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),zh=jt((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return pm;const r=jh(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)=>[...jh.getDependants(e,t)])),Hh=jt((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return pm;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||eg(e,n)})))return pm;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return zh(e,r,n)}),((e,t)=>[...zh.getDependants(e,t)]));function Vh(e,t){return e.blockListSettings[t]}function Wh(e){return e.settings}function Zh(e){return e.blocks.isPersistentChange}const Uh=jt((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])),$h=jt(((e,t)=>{var n;const r=(0,Ee.find)(Kh(e),(e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[Kh(e)]));function Gh(e){return e.blocks.isIgnoredChange}function qh(e){return e.lastBlockAttributesChange}function Kh(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:pm}function Yh(e){return e.isNavigationMode}function Xh(e){return e.hasBlockMovingClientId}function Jh(e){return!!e.automaticChangeStatus}function Qh(e,t){return e.highlightedBlock===t}function eg(e,t){return!!e.blocks.controlledInnerBlocks[t]}const tg=jt(((e,t)=>{if(!t.length)return null;const n=Rm(e);if(t.includes(fm(e,n)))return n;const r=Zm(e),o=Dm(e,n||r[0],t);return o?(0,Ee.last)(o):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function ng(e,t,n){const{lastBlockInserted:r}=e;return r.clientId===t&&r.source===n}function rg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite";const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}let og="";var ig;function ag(e,t){!function(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let t=0;t<e.length;t++)e[t].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),og===e&&(e+=" "),og=e,e}(e);const n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),o=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:o&&(o.textContent=e),n&&n.removeAttribute("hidden")}ig=function(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=U("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;t&&t.appendChild(e)}(),null===t&&rg("assertive"),null===n&&rg("polite")},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",ig):ig());var sg=Se()({formatTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...(0,Ee.keyBy)(t.formatTypes,"name")};case"REMOVE_FORMAT_TYPES":return(0,Ee.omit)(e,t.names)}return e}});const lg=jt((e=>Object.values(e.formatTypes)),(e=>[e.formatTypes]));function cg(e,t){return e.formatTypes[t]}function ug(e,t){return(0,Ee.find)(lg(e),(e=>{let{className:n,tagName:r}=e;return null===n&&t===r}))}function dg(e,t){return(0,Ee.find)(lg(e),(e=>{let{className:n}=e;return null!==n&&` ${t} `.indexOf(` ${n} `)>=0}))}function pg(e){return{type:"ADD_FORMAT_TYPES",formatTypes:(0,Ee.castArray)(e)}}function fg(e){return{type:"REMOVE_FORMAT_TYPES",names:(0,Ee.castArray)(e)}}const mg=(0,_e.Z)("core/rich-text",{reducer:sg,selectors:d,actions:p});function hg(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;const n=e.attributes,r=t.attributes;if(n===r)return!0;if(!n||!r)return!1;const o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;const a=o.length;for(let e=0;e<a;e++){const t=o[e];if(n[t]!==r[t])return!1}return!0}function gg(e){const t=e.formats.slice();return t.forEach(((e,n)=>{const r=t[n-1];if(r){const o=e.slice();o.forEach(((e,t)=>{const n=r[t];hg(e,n)&&(o[t]=n)})),t[n]=o}})),{...e,formats:t}}function vg(e,t,n){return(e=e.slice())[t]=n,e}function bg(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end;const{formats:o,activeFormats:i}=e,a=o.slice();if(n===r){const e=(0,Ee.find)(a[n],{type:t.type});if(e){const o=a[n].indexOf(e);for(;a[n]&&a[n][o]===e;)a[n]=vg(a[n],o,t),n--;for(r++;a[r]&&a[r][o]===e;)a[r]=vg(a[r],o,t),r++}}else{let e=1/0;for(let o=n;o<r;o++)if(a[o]){a[o]=a[o].filter((e=>{let{type:n}=e;return n!==t.type}));const n=a[o].length;n<e&&(e=n)}else a[o]=[],e=0;for(let o=n;o<r;o++)a[o].splice(e,0,t)}return gg({...e,formats:a,activeFormats:[...(0,Ee.reject)(i,{type:t.type}),t]})}function yg(e,t){let{implementation:n}=e;return yg.body||(yg.body=n.createHTMLDocument("").body),yg.body.innerHTML=t,yg.body}function wg(e,t){return e.formats=e.formats.concat(t.formats),e.replacements=e.replacements.concat(t.replacements),e.text+=t.text,e}(0,xe.z2)(mg);const kg="\u2028",xg="";function _g(e){let t,{type:n,attributes:r}=e;if(r&&r.class&&(t=(0,xe.Ys)(mg).getFormatTypeForClassName(r.class),t&&(r.class=` ${r.class} `.replace(` ${t.className} `," ").trim(),r.class||delete r.class)),t||(t=(0,xe.Ys)(mg).getFormatTypeForBareElement(n)),!t)return r?{type:n,attributes:r}:{type:n};if(t.__experimentalCreatePrepareEditableTree&&!t.__experimentalCreateOnChangeEditableValue)return null;if(!r)return{type:t.name};const o={},i={},a={...r};for(const e in t.attributes){const n=t.attributes[e];o[e]=a[n],t.__unstableFilterAttributeValue&&(o[e]=t.__unstableFilterAttributeValue(e,o[e])),delete a[n],void 0===o[e]&&delete o[e]}for(const e in a)i[e]=r[e];return{type:t.name,attributes:o,unregisteredAttributes:i}}function Eg(){let{element:e,text:t,html:n,range:r,multilineTag:o,multilineWrapperTags:i,__unstableIsEditableTree:a,preserveWhiteSpace:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"string"==typeof t&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:("string"==typeof n&&n.length>0&&(e=yg(document,n)),"object"!=typeof e?{formats:[],replacements:[],text:""}:o?Ag({element:e,range:r,multilineTag:o,multilineWrapperTags:i,isEditableTree:a,preserveWhiteSpace:s}):Ng({element:e,range:r,isEditableTree:a,preserveWhiteSpace:s}))}function Cg(e,t,n,r){if(!n)return;const{parentNode:o}=t,{startContainer:i,startOffset:a,endContainer:s,endOffset:l}=n,c=e.text.length;void 0!==r.start?e.start=c+r.start:t===i&&t.nodeType===t.TEXT_NODE?e.start=c+a:o===i&&t===i.childNodes[a]?e.start=c:o===i&&t===i.childNodes[a-1]?e.start=c+r.text.length:t===i&&(e.start=c),void 0!==r.end?e.end=c+r.end:t===s&&t.nodeType===t.TEXT_NODE?e.end=c+l:o===s&&t===s.childNodes[l-1]?e.end=c+r.text.length:o===s&&t===s.childNodes[l]?e.end=c:t===s&&(e.end=c+l)}function Sg(e,t,n){if(!t)return;const{startContainer:r,endContainer:o}=t;let{startOffset:i,endOffset:a}=t;return e===r&&(i=n(e.nodeValue.slice(0,i)).length),e===o&&(a=n(e.nodeValue.slice(0,a)).length),{startContainer:r,startOffset:i,endContainer:o,endOffset:a}}function Ig(e){return e.replace(/[\n\r\t]+/g," ")}function Tg(e){return e.replace(new RegExp("[\ufeff]","gu"),"")}function Ng(e){let{element:t,range:n,multilineTag:r,multilineWrapperTags:o,currentWrapperTags:i=[],isEditableTree:a,preserveWhiteSpace:s}=e;const l={formats:[],replacements:[],text:""};if(!t)return l;if(!t.hasChildNodes())return Cg(l,t,n,{formats:[],replacements:[],text:""}),l;const c=t.childNodes.length;for(let e=0;e<c;e++){const c=t.childNodes[e],u=c.nodeName.toLowerCase();if(c.nodeType===c.TEXT_NODE){let e=Tg;s||(e=e=>Tg(Ig(e)));const t=e(c.nodeValue);n=Sg(c,n,e),Cg(l,c,n,{text:t}),l.formats.length+=t.length,l.replacements.length+=t.length,l.text+=t;continue}if(c.nodeType!==c.ELEMENT_NODE)continue;if(a&&(c.getAttribute("data-rich-text-placeholder")||"br"===u&&!c.getAttribute("data-rich-text-line-break"))){Cg(l,c,n,{formats:[],replacements:[],text:""});continue}if("script"===u){const e={formats:[,],replacements:[{type:u,attributes:{"data-rich-text-script":c.getAttribute("data-rich-text-script")||encodeURIComponent(c.innerHTML)}}],text:xg};Cg(l,c,n,e),wg(l,e);continue}if("br"===u){Cg(l,c,n,{formats:[],replacements:[],text:""}),wg(l,Eg({text:"\n"}));continue}const d=_g({type:u,attributes:Pg({element:c})});if(o&&-1!==o.indexOf(u)){const e=Ag({element:c,range:n,multilineTag:r,multilineWrapperTags:o,currentWrapperTags:[...i,d],isEditableTree:a,preserveWhiteSpace:s});Cg(l,c,n,e),wg(l,e);continue}const p=Ng({element:c,range:n,multilineTag:r,multilineWrapperTags:o,isEditableTree:a,preserveWhiteSpace:s});if(Cg(l,c,n,p),d)if(0===p.text.length)d.attributes&&wg(l,{formats:[,],replacements:[d],text:xg});else{function e(t){if(e.formats===t)return e.newFormats;const n=t?[d,...t]:[d];return e.formats=t,e.newFormats=n,n}e.newFormats=[d],wg(l,{...p,formats:Array.from(p.formats,e)})}else wg(l,p)}return l}function Ag(e){let{element:t,range:n,multilineTag:r,multilineWrapperTags:o,currentWrapperTags:i=[],isEditableTree:a,preserveWhiteSpace:s}=e;const l={formats:[],replacements:[],text:""};if(!t||!t.hasChildNodes())return l;const c=t.children.length;for(let e=0;e<c;e++){const c=t.children[e];if(c.nodeName.toLowerCase()!==r)continue;const u=Ng({element:c,range:n,multilineTag:r,multilineWrapperTags:o,currentWrapperTags:i,isEditableTree:a,preserveWhiteSpace:s});(0!==e||i.length>0)&&wg(l,{formats:[,],replacements:i.length>0?[i]:[,],text:kg}),Cg(l,c,n,u),wg(l,u)}return l}function Pg(e){let{element:t}=e;if(!t.hasAttributes())return;const n=t.attributes.length;let r;for(let e=0;e<n;e++){const{name:n,value:o}=t.attributes[e];0!==n.indexOf("data-rich-text-")&&(r=r||{},r[/^on/i.test(n)?"data-disable-rich-text-"+n:n]=o)}return r}function Rg(e){let{formats:t,start:n,end:r,activeFormats:o}=e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===n)return i;if(n===r){if(o)return o;const e=t[n-1]||i,r=t[n]||i;return e.length<r.length?e:r}return t[n]||i}function Lg(e,t){return(0,Ee.find)(Rg(e),{type:t})}function Og(e){let{text:t}=e;return t.replace(new RegExp(xg,"g"),"").replace(new RegExp(kg,"g"),"\n")}function Mg(e){let{start:t,end:n}=e;if(void 0!==t&&void 0!==n)return t===n}function Dg(e){let{text:t}=e;return 0===t.length}function Bg(e){let{text:t,start:n,end:r}=e;return n===r&&(0===t.length||0===n&&t.slice(0,1)===kg||n===t.length&&t.slice(-1)===kg||"\u2028\u2028"===t.slice(n-1,r+1))}function Fg(e,t){if("string"==typeof(t={name:e,...t}).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if((0,xe.Ys)(mg).getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){const e=(0,xe.Ys)(mg).getFormatTypeForBareElement(t.tagName);if(e)return void window.console.error(`Format "${e.name}" is already registered to handle bare tag name "${t.tagName}".`)}else{const e=(0,xe.Ys)(mg).getFormatTypeForClassName(t.className);if(e)return void window.console.error(`Format "${e.name}" is already registered to handle class name "${t.className}".`)}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title)return(0,xe.WI)(mg).addFormatTypes(t),t;window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function jg(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end;const{formats:o,activeFormats:i}=e,a=o.slice();if(n===r){const e=(0,Ee.find)(a[n],{type:t});if(e){for(;(0,Ee.find)(a[n],e);)zg(a,n,t),n--;for(r++;(0,Ee.find)(a[r],e);)zg(a,r,t),r++}}else for(let e=n;e<r;e++)a[e]&&zg(a,e,t);return gg({...e,formats:a,activeFormats:(0,Ee.reject)(i,{type:t})})}function zg(e,t,n){const r=e[t].filter((e=>{let{type:t}=e;return t!==n}));r.length?e[t]=r:delete e[t]}function Hg(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end;const{formats:o,replacements:i,text:a}=e;"string"==typeof t&&(t=Eg({text:t}));const s=n+t.text.length;return gg({formats:o.slice(0,n).concat(t.formats,o.slice(r)),replacements:i.slice(0,n).concat(t.replacements,i.slice(r)),text:a.slice(0,n)+t.text+a.slice(r),start:s,end:s})}function Vg(e,t,n){return Hg(e,Eg(),t,n)}function Wg(e,t,n){let{formats:r,replacements:o,text:i,start:a,end:s}=e;return i=i.replace(t,(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),l=1;l<t;l++)i[l-1]=arguments[l];const c=i[i.length-2];let u,d,p=n;return"function"==typeof p&&(p=n(e,...i)),"object"==typeof p?(u=p.formats,d=p.replacements,p=p.text):(u=Array(p.length),d=Array(p.length),r[c]&&(u=u.fill(r[c]))),r=r.slice(0,c).concat(u,r.slice(c+e.length)),o=o.slice(0,c).concat(d,o.slice(c+e.length)),a&&(a=s=c+p.length),p})),gg({formats:r,replacements:o,text:i,start:a,end:s})}function Zg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end;const{formats:r,replacements:o,text:i}=e;return void 0===t||void 0===n?{...e}:{formats:r.slice(t,n),replacements:o.slice(t,n),text:i.slice(t,n)}}function Ug(e){let{formats:t,replacements:n,text:r,start:o,end:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;if(void 0===o||void 0===i)return;const l={formats:t.slice(0,a),replacements:n.slice(0,a),text:r.slice(0,a)},c={formats:t.slice(s),replacements:n.slice(s),text:r.slice(s),start:0,end:0};return[Wg(l,/\u2028+$/,""),Wg(c,/^\u2028+/,"")]}function $g(e,t){if(t)return e;const n={};for(const t in e){let r=t;t.startsWith("data-disable-rich-text-")&&(r=t.slice("data-disable-rich-text-".length)),n[r]=e[t]}return n}function Gg(e){let{type:t,attributes:n,unregisteredAttributes:r,object:o,boundaryClass:i,isEditableTree:a}=e;const s=(l=t,(0,xe.Ys)(mg).getFormatType(l));var l;let c={};if(i&&(c["data-rich-text-format-boundary"]="true"),!s)return n&&(c={...n,...c}),{type:t,attributes:$g(c,a),object:o};c={...r,...c};for(const e in n){const t=!!s.attributes&&s.attributes[e];t?c[t]=n[e]:c[e]=n[e]}return s.className&&(c.class?c.class=`${s.className} ${c.class}`:c.class=s.className),{type:s.tagName,object:s.object,attributes:$g(c,a)}}function qg(e,t,n){do{if(e[n]!==t[n])return!1}while(n--);return!0}function Kg(e){let{value:t,multilineTag:n,preserveWhiteSpace:r,createEmpty:o,append:i,getLastChild:a,getParent:s,isText:l,getText:c,remove:u,appendText:d,onStartIndex:p,onEndIndex:f,isEditableTree:m,placeholder:h}=e;const{formats:g,replacements:v,text:b,start:y,end:w}=t,k=g.length+1,x=o(),_={type:n},E=Rg(t),C=E[E.length-1];let S,I,T;n?(i(i(x,{type:n}),""),I=S=[_]):i(x,"");for(let e=0;e<k;e++){const t=b.charAt(e),o=m&&(!T||T===kg||"\n"===T);let k=g[e];n&&(k=t===kg?S=(v[e]||[]).reduce(((e,t)=>(e.push(t,_),e)),[_]):[...S,...k||[]]);let E=a(x);if(o&&t===kg){let e=E;for(;!l(e);)e=a(e);i(s(e),"\ufeff")}if(T===kg){let t=E;for(;!l(t);)t=a(t);p&&y===e&&p(x,t),f&&w===e&&f(x,t)}var N;if(k&&k.forEach(((e,n)=>{if(E&&I&&qg(k,I,n)&&(t!==kg||k.length-1!==n))return void(E=a(E));const{type:r,attributes:o,unregisteredAttributes:d}=e,p=m&&t!==kg&&e===C,f=s(E),h=i(f,Gg({type:r,attributes:o,unregisteredAttributes:d,boundaryClass:p,isEditableTree:m}));l(E)&&0===c(E).length&&u(E),E=i(h,"")})),t!==kg)0===e&&(p&&0===y&&p(x,E),f&&0===w&&f(x,E)),t===xg?(m||"script"!==(null===(N=v[e])||void 0===N?void 0:N.type)?E=i(s(E),Gg({...v[e],object:!0,isEditableTree:m})):(E=i(s(E),Gg({type:"script",isEditableTree:m})),i(E,{html:decodeURIComponent(v[e].attributes["data-rich-text-script"])})),E=i(s(E),"")):r||"\n"!==t?l(E)?d(E,t):E=i(s(E),t):(E=i(s(E),{type:"br",attributes:m?{"data-rich-text-line-break":"true"}:void 0,object:!0}),E=i(s(E),"")),p&&y===e+1&&p(x,E),f&&w===e+1&&f(x,E),o&&e===b.length&&(i(s(E),"\ufeff"),h&&0===b.length&&i(s(E),{type:"span",attributes:{"data-rich-text-placeholder":h,contenteditable:"false",style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),I=k,T=t;else I=k,T=t}return x}function Yg(e){let{value:t,multilineTag:n,preserveWhiteSpace:r}=e;return av(Kg({value:t,multilineTag:n,preserveWhiteSpace:r,createEmpty:Xg,append:Qg,getLastChild:Jg,getParent:tv,isText:nv,getText:rv,remove:ov,appendText:ev}).children)}function Xg(){return{}}function Jg(e){let{children:t}=e;return t&&t[t.length-1]}function Qg(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function ev(e,t){e.text+=t}function tv(e){let{parent:t}=e;return t}function nv(e){let{text:t}=e;return"string"==typeof t}function rv(e){let{text:t}=e;return t}function ov(e){const t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function iv(e){let{type:t,attributes:n,object:r,children:o}=e,i="";for(const e in n)(0,Ic.$b)(e)&&(i+=` ${e}="${(0,Ic.kb)(n[e])}"`);return r?`<${t}${i}>`:`<${t}${i}>${av(o)}</${t}>`}function av(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>void 0!==e.html?e.html:void 0===e.text?iv(e):(0,Ic.N2)(e.text))).join("")}function sv(e,t){return Lg(e,t.type)?(t.title&&ag(R(U("%s removed."),t.title),"assertive"),jg(e,t.type)):(t.title&&ag(R(U("%s applied."),t.title),"assertive"),bg(e,t))}function lv(e){let{ref:t,value:n,settings:r={}}=e;const{tagName:o,className:i,name:a}=r,s=a?Lg(n,a):void 0;return(0,_.useMemo)((()=>{if(!t.current)return;const{ownerDocument:{defaultView:e}}=t.current,n=e.getSelection();if(!n.rangeCount)return;const r=n.getRangeAt(0);if(!s)return r;let a=r.startContainer;for(a=a.nextElementSibling||a;a.nodeType!==a.ELEMENT_NODE;)a=a.parentNode;return a.closest(o+(i?"."+i:""))}),[s,n.start,n.end,o,i])}var cv=n(57589);function uv(e,t,n){const r=e.parentNode;let o=0;for(;e=e.previousSibling;)o++;return n=[o,...n],r!==t&&(n=uv(r,t,n)),n}function dv(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function pv(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:r}=t;if(n){t=e.ownerDocument.createElement(n);for(const e in r)t.setAttribute(e,r[e])}return e.appendChild(t)}function fv(e,t){e.appendData(t)}function mv(e){let{lastChild:t}=e;return t}function hv(e){let{parentNode:t}=e;return t}function gv(e){return e.nodeType===e.TEXT_NODE}function vv(e){let{nodeValue:t}=e;return t}function bv(e){return e.parentNode.removeChild(e)}function yv(e){let{value:t,current:n,multilineTag:r,prepareEditableTree:o,__unstableDomOnly:i,placeholder:a}=e;const{body:s,selection:l}=function(e){let{value:t,multilineTag:n,prepareEditableTree:r,isEditableTree:o=!0,placeholder:i,doc:a=document}=e,s=[],l=[];return r&&(t={...t,formats:r(t)}),{body:Kg({value:t,multilineTag:n,createEmpty:()=>yg(a,""),append:pv,getLastChild:mv,getParent:hv,isText:gv,getText:vv,remove:bv,appendText:fv,onStartIndex(e,t){s=uv(t,e,[t.nodeValue.length])},onEndIndex(e,t){l=uv(t,e,[t.nodeValue.length])},isEditableTree:o,placeholder:i}),selection:{startPath:s,endPath:l}}}({value:t,multilineTag:r,prepareEditableTree:o,placeholder:a,doc:n.ownerDocument});wv(s,n),void 0===t.start||i||function(e,t){let{startPath:n,endPath:r}=e;const{node:o,offset:i}=dv(t,n),{node:a,offset:s}=dv(t,r),{ownerDocument:l}=t,{defaultView:c}=l,u=c.getSelection(),d=l.createRange();d.setStart(o,i),d.setEnd(a,s);const{activeElement:p}=l;if(u.rangeCount>0){if(function(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}(d,u.getRangeAt(0)))return;u.removeAllRanges()}u.addRange(d),p!==l.activeElement&&p instanceof c.HTMLElement&&p.focus()}(l,n)}function wv(e,t){let n,r=0;for(;n=e.firstChild;){const o=t.childNodes[r];if(o)if(o.isEqualNode(n))e.removeChild(n);else if(o.nodeName!==n.nodeName||o.nodeType===o.TEXT_NODE&&o.data!==n.data)t.replaceChild(n,o);else{const t=o.attributes,r=n.attributes;if(t){let e=t.length;for(;e--;){const{name:r}=t[e];n.getAttribute(r)||o.removeAttribute(r)}}if(r)for(let e=0;e<r.length;e++){const{name:t,value:n}=r[e];o.getAttribute(t)!==n&&o.setAttribute(t,n)}wv(n,o),e.removeChild(n)}else t.appendChild(n);r++}for(;t.childNodes[r];)t.removeChild(t.childNodes[r])}function kv(e){let{record:t}=e;const n=(0,_.useRef)(),{activeFormats:r=[]}=t.current;return(0,_.useEffect)((()=>{if(!r||!r.length)return;const e="*[data-rich-text-format-boundary]",t=n.current.querySelector(e);if(!t)return;const{ownerDocument:o}=t,{defaultView:i}=o,a=`.rich-text:focus ${e} {background-color: ${i.getComputedStyle(t).color.replace(")",", 0.2)").replace("rgb","rgba")}}`,s="rich-text-boundary-style";let l=o.getElementById(s);l||(l=o.createElement("style"),l.id=s,o.head.appendChild(l)),l.innerHTML!==a&&(l.innerHTML=a)}),[r]),n}function xv(e){const t=(0,_.useRef)(e);return t.current=e,Eo((e=>{function n(n){const{record:r,multilineTag:o,preserveWhiteSpace:i}=t.current;if(Mg(r.current)||!e.contains(e.ownerDocument.activeElement))return;const a=Zg(r.current),s=Og(a),l=Yg({value:a,multilineTag:o,preserveWhiteSpace:i});n.clipboardData.setData("text/plain",s),n.clipboardData.setData("text/html",l),n.clipboardData.setData("rich-text","true"),n.clipboardData.setData("rich-text-multi-line-tag",o||""),n.preventDefault()}return e.addEventListener("copy",n),()=>{e.removeEventListener("copy",n)}}),[])}const _v=[];function Ev(e){const[,t]=(0,_.useReducer)((()=>({}))),n=(0,_.useRef)(e);return n.current=e,Eo((e=>{function r(r){const{keyCode:o,shiftKey:i,altKey:a,metaKey:s,ctrlKey:l}=r;if(i||a||s||l||o!==qr&&o!==Yr)return;const{record:c,applyRecord:u}=n.current,{text:d,formats:p,start:f,end:m,activeFormats:h=[]}=c.current,g=Mg(c.current),{ownerDocument:v}=e,{defaultView:b}=v,{direction:y}=b.getComputedStyle(e),w="rtl"===y?Yr:qr,k=r.keyCode===w;if(g&&0===h.length){if(0===f&&k)return;if(m===d.length&&!k)return}if(!g)return;const x=p[f-1]||_v,_=p[f]||_v,E=k?x:_,C=h.every(((e,t)=>e===E[t]));let S=h.length;if(C?S<E.length&&S++:S--,S===h.length)return void(c.current._newActiveFormats=E);r.preventDefault();const I=(C?E:k?_:x).slice(0,S),T={...c.current,activeFormats:I};c.current=T,u(T),t()}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function Cv(e){let{start:t,text:n}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,o=r;for(;o--;)if(n[o]===kg)return o}function Sv(e){const t=(0,_.useRef)(e);return t.current=e,Eo((e=>{function n(n){const{keyCode:r,shiftKey:o,altKey:i,metaKey:a,ctrlKey:s}=n,{multilineTag:l,createRecord:c,handleChange:u}=t.current;if(o||i||a||s||32!==r||"li"!==l)return;const d=c();if(!Mg(d))return;const{text:p,start:f}=d,m=p[f-1];m&&m!==kg||(u(function(e,t){if(!function(e){const t=Cv(e);if(void 0===t)return!1;const{replacements:n}=e,r=Cv(e,t),o=n[t]||[],i=n[r]||[];return o.length<=i.length}(e))return e;const n=Cv(e),r=Cv(e,n),{text:o,replacements:i,end:a}=e,s=i.slice(),l=function(e,t){let{text:n,replacements:r}=e;const o=r[t]||[];let i=t;for(;i-- >=0;){if(n[i]!==kg)continue;const e=r[i]||[];if(e.length===o.length+1)return i;if(e.length<=o.length)return}}(e,n);for(let e=n;e<a;e++)if(o[e]===kg)if(l){const t=i[l]||[];s[e]=t.concat((s[e]||[]).slice(t.length-1))}else{const n=i[r]||[],o=n[n.length-1]||t;s[e]=n.concat([o],(s[e]||[]).slice(n.length))}return{...e,replacements:s}}(d,{type:e.tagName.toLowerCase()})),n.preventDefault())}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}const Iv=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),Tv=[];function Nv(e){const t=(0,_.useRef)(e);return t.current=e,Eo((e=>{const{ownerDocument:n}=e,{defaultView:r}=n;let o,i=!1;function a(e){if(i)return;let n;e&&(n=e.inputType);const{record:r,applyRecord:o,createRecord:a,handleChange:s}=t.current;if(n&&(0===n.indexOf("format")||Iv.has(n)))return void o(r.current);const l=a(),{start:c,activeFormats:u=[]}=r.current;s(function(e){let{value:t,start:n,end:r,formats:o}=e;const i=Math.min(n,r),a=Math.max(n,r),s=t.formats[i-1]||[],l=t.formats[a]||[];for(t.activeFormats=o.map(((e,t)=>{if(s[t]){if(hg(e,s[t]))return s[t]}else if(l[t]&&hg(e,l[t]))return l[t];return e}));--r>=n;)t.activeFormats.length>0?t.formats[r]=t.activeFormats:delete t.formats[r];return t}({value:l,start:c,end:l.start,formats:u}))}function s(o){if(n.activeElement!==e)return;const{record:s,applyRecord:l,createRecord:c,isSelected:u,onSelectionChange:d}=t.current;if("selectionchange"!==o.type&&!u)return;if("true"!==e.contentEditable)return;if(i)return;const{start:p,end:f,text:m}=c(),h=s.current;if(m!==h.text)return void a();if(p===h.start&&f===h.end)return void(0===h.text.length&&0===p&&function(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:r}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const o=n.childNodes[r];o&&o.nodeType===o.ELEMENT_NODE&&o.getAttribute("data-rich-text-placeholder")&&t.collapseToStart()}(r));const g={...h,start:p,end:f,activeFormats:h._newActiveFormats,_newActiveFormats:void 0},v=Rg(g,Tv);g.activeFormats=v,s.current=g,l(g,{domOnly:!0}),d(p,f)}function l(){i=!0,n.removeEventListener("selectionchange",s)}function c(){i=!1,a({inputType:"insertText"}),n.addEventListener("selectionchange",s)}function u(){const{record:e,isSelected:i,onSelectionChange:a,applyRecord:l}=t.current;if(i)l(e.current),a(e.current.start,e.current.end);else{const t=void 0;e.current={...e.current,start:t,end:t,activeFormats:Tv},a(t,t)}o=r.requestAnimationFrame(s),n.addEventListener("selectionchange",s)}function d(){n.removeEventListener("selectionchange",s)}return e.addEventListener("input",a),e.addEventListener("compositionstart",l),e.addEventListener("compositionend",c),e.addEventListener("focus",u),e.addEventListener("blur",d),e.addEventListener("keyup",s),e.addEventListener("mouseup",s),e.addEventListener("touchend",s),()=>{e.removeEventListener("input",a),e.removeEventListener("compositionstart",l),e.removeEventListener("compositionend",c),e.removeEventListener("focus",u),e.removeEventListener("blur",d),e.removeEventListener("keyup",s),e.removeEventListener("mouseup",s),e.removeEventListener("touchend",s),n.removeEventListener("selectionchange",s),r.cancelAnimationFrame(o)}}),[])}function Av(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{replacements:n,text:r,start:o,end:i}=e,a=Mg(e);let s,l=o-1,c=a?o-1:o,u=i;if(t||(l=i,c=o,u=a?i+1:i),r[l]===kg){if(a&&n[l]&&n[l].length){const t=n.slice();t[l]=n[l].slice(0,-1),s={...e,replacements:t}}else s=Vg(e,c,u);return s}}function Pv(e){const t=(0,_.useRef)(e);return t.current=e,Eo((e=>{function n(e){const{keyCode:n}=e,{createRecord:r,handleChange:o,multilineTag:i}=t.current;if(e.defaultPrevented)return;if(46!==n&&8!==n)return;const a=r(),{start:s,end:l,text:c}=a,u=8===n;if(0===s&&0!==l&&l===c.length)return o(Vg(a)),void e.preventDefault();if(i){let t;t=u&&0===a.start&&0===a.end&&Bg(a)?Av(a,!u):Av(a,u),t&&(o(t),e.preventDefault())}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}const Rv=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(Lv(e))},Lv=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getTemplate(),i=n.getTemplateLock(),a=!o||"all"!==i||np(e,o);if(a!==n.isValidTemplate())return r.setTemplateValidity(a),a};function Ov(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Mv(e){return He('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Dv(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,Ee.castArray)(e),attributes:t,uniqueByBlock:n}}function Bv(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Fv(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const jv=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getPreviousBlockClientId(e);o&&r.selectBlock(o,-1)},zv=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function Hv(){return{type:"START_MULTI_SELECT"}}function Vv(){return{type:"STOP_MULTI_SELECT"}}const Wv=(e,t)=>n=>{let{select:r,dispatch:o}=n;if(r.getBlockRootClientId(e)!==r.getBlockRootClientId(t))return;o({type:"MULTI_SELECT",start:e,end:t});const i=r.getSelectedBlockCount();ag(R(G("%s block selected.","%s blocks selected.",i),i),"assertive")};function Zv(){return{type:"CLEAR_SELECTED_BLOCK"}}function Uv(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function $v(e,t){var n,r;const o=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(!vl(n,"defaultStylePicker",!0))return e;if(!o[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:i={}}=e,a=o[n];return{...e,attributes:{...i,className:`${r||""} is-style-${a}`.trim()}}}))}const Gv=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:a,dispatch:s}=i;e=(0,Ee.castArray)(e),t=$v((0,Ee.castArray)(t),a.getSettings());const l=a.getBlockRootClientId((0,Ee.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!a.canInsertBlockType(n.name,l))return}s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o}),s((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function qv(e,t){return Gv(e,t)}const Kv=e=>(t,n)=>r=>{let{select:o,dispatch:i}=r;o.canMoveBlocks(t,n)&&i({type:e,clientIds:(0,Ee.castArray)(t),rootClientId:n})},Yv=Kv("MOVE_BLOCKS_DOWN"),Xv=Kv("MOVE_BLOCKS_UP"),Jv=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:a}=o;if(i.canMoveBlocks(e,t)){if(t!==n){if(!i.canRemoveBlocks(e,t))return;if(!i.canInsertBlocks(e,n))return}a({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function Qv(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 Jv([e],t,n,r)}function eb(e,t,n,r,o){return tb([e],t,n,r,0,o)}const tb=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 a=>{let{select:s,dispatch:l}=a;(0,Ee.isObject)(o)&&(i=o,o=0,He("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),e=$v((0,Ee.castArray)(e),s.getSettings());const c=[];for(const t of e)s.canInsertBlockType(t.name,n)&&c.push(t);c.length&&l({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i})}};function nb(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 rb(){return{type:"HIDE_INSERTION_POINT"}}function ob(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const ib=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=rp(t.getBlocks(),t.getTemplate());n.resetBlocks(r)},ab=(e,t)=>n=>{let{select:r,dispatch:o}=n;const i=[e,t];o({type:"MERGE_BLOCKS",blocks:i});const[a,s]=i,l=r.getBlock(a),c=ml(l.name);if(c&&!c.merge)return void o.selectBlock(l.clientId);const u=r.getBlock(s),d=ml(u.name),{clientId:p,attributeKey:f,offset:m}=r.getSelectionStart(),h=(p===a?c:d).attributes[f],g=(p===a||p===s)&&void 0!==f&&void 0!==m&&!!h;h||("number"==typeof f?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 f):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const v=Pl(l),b=Pl(u);if(g){const e=p===a?v:b,t=e.attributes[f],{multiline:n,__unstableMultilineWrapperTags:r,__unstablePreserveWhiteSpace:o}=h,i=Hg(Eg({html:t,multilineTag:n,multilineWrapperTags:r,preserveWhiteSpace:o}),"",m,m);e.attributes[f]=Yg({value:i,multilineTag:n,preserveWhiteSpace:o})}const y=l.name===u.name?[b]:Fl(b,l.name);if(!y||!y.length)return;const w=c.merge(v.attributes,y[0].attributes);if(g){const e=(0,Ee.findKey)(w,(e=>"string"==typeof e&&-1!==e.indexOf(""))),t=w[e],{multiline:n,__unstableMultilineWrapperTags:r,__unstablePreserveWhiteSpace:i}=c.attributes[e],a=Eg({html:t,multilineTag:n,multilineWrapperTags:r,preserveWhiteSpace:i}),s=a.text.indexOf(""),u=Yg({value:Vg(a,s,s+1),multilineTag:n,preserveWhiteSpace:i});w[e]=u,o.selectionChange(l.clientId,e,s,s)}o.replaceBlocks([l.clientId,u.clientId],[{...l,attributes:{...l.attributes,...w}},...y.slice(1)],0)},sb=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=(0,Ee.castArray)(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 lb(e,t){return sb([e],t)}function cb(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 ub(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function db(){return{type:"START_TYPING"}}function pb(){return{type:"STOP_TYPING"}}function fb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function mb(){return{type:"STOP_DRAGGING_BLOCKS"}}function hb(){return{type:"ENTER_FORMATTED_TEXT"}}function gb(){return{type:"EXIT_FORMATTED_TEXT"}}function vb(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function bb(e,t,n){const r=fl();if(r)return eb(Tl(r,e),n,t)}function yb(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function wb(e){return{type:"UPDATE_SETTINGS",settings:e}}function kb(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function xb(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function _b(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Eb=()=>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"})}))},Cb=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n({type:"SET_NAVIGATION_MODE",isNavigationMode:e}),ag(U(e?"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.":"You are currently in edit mode. To return to the navigation mode, press Escape."))}},Sb=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&&ag(U("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."))}},Ib=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;const i=r.getBlocksByClientId(e);if((0,Ee.some)(i,(e=>!e)))return;if(i.map((e=>e.name)).some((e=>!vl(e,"multiple",!0))))return;const a=r.getBlockRootClientId(e[0]),s=r.getBlockIndex((0,Ee.last)((0,Ee.castArray)(e))),l=i.map((e=>Al(e)));return o.insertBlocks(l,s+1,a,t),l.length>1&&t&&o.multiSelect((0,Ee.first)(l).clientId,(0,Ee.last)(l).clientId),l.map((e=>e.clientId))}},Tb=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)},Nb=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 Ab(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Pb=e=>async t=>{let{dispatch:n}=t;n(Ab(e,!0)),await new Promise((e=>setTimeout(e,150))),n(Ab(e,!1))};function Rb(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const Lb="core/block-editor",Ob={reducer:cm,selectors:u,actions:f,__experimentalUseThunks:!0},Mb=(0,_e.Z)(Lb,{...Ob,persist:["preferences"]});(0,xe.R9)(Lb,{...Ob,persist:["preferences"]});const Db={name:"",isSelected:!1},Bb=(0,_.createContext)(Db),{Provider:Fb}=Bb;function jb(){return(0,_.useContext)(Bb)}function zb(){const{isSelected:e,clientId:t,name:n}=jb();return(0,cr.Z)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:a}=r(Mb);return!!i(t)&&a().every((e=>o(e)===n))}),[t,e,n])}function Hb(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:o=!1}=e;const i=function(e,t){const n=zb(),{clientId:r}=jb(),o=(0,cr.Z)((e=>{const{getBlockName:n,hasSelectedInnerBlock:o}=e(Mb),{hasBlockSupport:i}=e(pc);return t&&i(n(r),"__experimentalExposeControlsToChildren",!1)&&o(r)}),[t,r]);var i;return n?null===(i=qf[e])||void 0===i?void 0:i.Fill:o?qf.parent.Fill:null}(t,o);return i?(0,_.createElement)(hp,{document:document},(0,_.createElement)(i,null,(e=>{const o=(0,Ee.isEmpty)(e)?null:e;return(0,_.createElement)(gp.Provider,{value:o},"default"===t&&(0,_.createElement)(Gf,{controls:n}),r)}))):null}function Vb(e){let{group:t="default",...n}=e;const r=(0,_.useContext)(gp),o=qf[t].Slot,i=wr(o.__unstableName);return Boolean(i.fills&&i.fills.length)?"default"===t?(0,_.createElement)(o,(0,dr.Z)({},n,{bubblesVirtually:!0,fillProps:r})):(0,_.createElement)(Gf,null,(0,_.createElement)(o,(0,dr.Z)({},n,{bubblesVirtually:!0,fillProps:r}))):null}const Wb=Hb;Wb.Slot=Vb;const Zb=e=>(0,_.createElement)(Hb,(0,dr.Z)({group:"inline"},e));Zb.Slot=e=>(0,_.createElement)(Vb,(0,dr.Z)({group:"inline"},e));var Ub=Wb,$b=(0,_.forwardRef)((function(e,t){return(0,_.useContext)(gp)?(0,_.createElement)(Lf,(0,dr.Z)({ref:t},e.toggleProps),(t=>(0,_.createElement)(Uf,(0,dr.Z)({},e,{popoverProps:{isAlternate:!0,...e.popoverProps},toggleProps:t})))):(0,_.createElement)(Uf,e)})),Gb=function e(t){const{children:n,className:r="",label:o,hideSeparator:i}=t,a=zo(e);if(!_.Children.count(n))return null;const s=`components-menu-group-label-${a}`,l=Lr()(r,"components-menu-group",{"has-hidden-separator":i});return(0,_.createElement)("div",{className:l},o&&(0,_.createElement)("div",{className:"components-menu-group__label",id:s,"aria-hidden":"true"},o),(0,_.createElement)("div",{role:"group","aria-labelledby":o?s:null},n))},qb=(0,_.forwardRef)((function(e,t){let{children:n,info:r,className:o,icon:i,iconPosition:a="right",shortcut:s,isSelected:l,role:c="menuitem",...u}=e;return o=Lr()("components-menu-item__button",o),r&&(n=(0,_.createElement)("span",{className:"components-menu-item__info-wrapper"},(0,_.createElement)("span",{className:"components-menu-item__item"},n),(0,_.createElement)("span",{className:"components-menu-item__info"},r))),i&&!(0,Ee.isString)(i)&&(i=(0,_.cloneElement)(i,{className:Lr()("components-menu-items__item-icon",{"has-icon-right":"right"===a})})),(0,_.createElement)(ga,(0,dr.Z)({ref:t,"aria-checked":"menuitemcheckbox"===c||"menuitemradio"===c?l:void 0,role:c,icon:"left"===a?i:void 0,className:o},u),(0,_.createElement)("span",{className:"components-menu-item__item"},n),(0,_.createElement)(Wo,{className:"components-menu-item__shortcut",shortcut:s}),i&&"right"===a&&(0,_.createElement)(Jo,{icon:i}))})),Kb=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Yb=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Xb=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"})),Jb=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),Qb=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),ey=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),ty=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),ny=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),ry=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),oy=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),iy=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),ay=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),sy=n(70917);const ly=["40em","52em","64em"],cy=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>ly.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${ly.length} breakpoints, got index ${t}`);const[n,r]=(0,_.useState)(t);return(0,_.useEffect)((()=>{const e=()=>{const e=ly.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function uy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=cy(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}function dy(e){var t,n;if(void 0===e)return;if(!e)return"0";const r="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&null!==(t=window.CSS)&&void 0!==t&&null!==(n=t.supports)&&void 0!==n&&n.call(t,"margin",e.toString())||Number.isNaN(r)?e.toString():`calc(4px * ${e})`}const py={name:"zjik7",styles:"display:flex"},fy={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},my={name:"82a6rk",styles:"flex:1"},hy={name:"13nosa1",styles:">*{min-height:0;}"},gy={name:"1pwxzk4",styles:">*{min-width:0;}"},vy=new RegExp(/-left/g),by=new RegExp(/-right/g),yy=new RegExp(/Left/g),wy=new RegExp(/Right/g);function ky(e){return"left"===e?"right":"right"===e?"left":vy.test(e)?e.replace(vy,"-right"):by.test(e)?e.replace(by,"-left"):yy.test(e)?e.replace(yy,"Right"):wy.test(e)?e.replace(wy,"Left"):e}const xy=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,Ee.mapKeys)(e,((e,t)=>ky(t)))};function _y(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return()=>t?q()?(0,sy.iv)(t,""):(0,sy.iv)(e,""):q()?(0,sy.iv)(xy(e),""):(0,sy.iv)(e,"")}function Ey(e){const{align:t="center",className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:a="space-between",wrap:s=!1,...l}=zi(function(e){let{isReversed:t,...n}=e;return void 0!==t?(He("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),c=uy(Array.isArray(r)?r:[r]),u="string"==typeof c&&!!c.includes("column"),d="string"==typeof c&&c.includes("reverse"),p=Fi();return{...l,className:(0,_.useMemo)((()=>{const e={};return e.Base=(0,sy.iv)({alignItems:u?"normal":t,flexDirection:c,flexWrap:s?"wrap":void 0,justifyContent:a,height:u&&o?"100%":void 0,width:!u&&o?"100%":void 0,marginBottom:s?`calc(${dy(i)} * -1)`:void 0},"",""),e.Items=(0,sy.iv)(">*+*:not( marquee ){margin-top:",u?dy(i):void 0,";",_y({marginLeft:u||d?void 0:dy(i),marginRight:!u&&d?dy(i):void 0})(),";}",""),e.WrapItems=(0,sy.iv)(">*:not( marquee ){margin-bottom:",dy(i),";",_y({marginLeft:!u&&d?dy(i):void 0,marginRight:u||d?void 0:dy(i)})(),";}>*:last-child:not( marquee ){",_y({marginLeft:!u&&d?0:void 0,marginRight:u||d?void 0:0})(),";}",""),p(py,e.Base,s?e.WrapItems:e.Items,u?hy:gy,n)}),[t,n,c,o,i,u,d,a,s,_y.watch()]),isColumn:u}}_y.watch=()=>q();const Cy=(0,_.createContext)({flexItemDisplay:void 0});var Sy=Vi((function(e,t){const{children:n,isColumn:r,...o}=Ey(e);return(0,_.createElement)(Cy.Provider,{value:{flexItemDisplay:r?"block":void 0}},(0,_.createElement)(fa,(0,dr.Z)({},o,{ref:t}),n))}),"Flex");function Iy(e){const{className:t,display:n,isBlock:r=!1,...o}=zi(e,"FlexItem"),i={},a=(0,_.useContext)(Cy).flexItemDisplay;return i.Base=(0,sy.iv)({display:n||a},"",""),{...o,className:Fi()(fy,i.Base,r&&my,t)}}var Ty=Vi((function(e,t){const n=Iy(e);return(0,_.createElement)(fa,(0,dr.Z)({},n,{ref:t}))}),"FlexItem"),Ny=function(e){let{className:t,checked:n,id:r,disabled:o,onChange:i=Ee.noop,...a}=e;const s=Lr()("components-form-toggle",t,{"is-checked":n,"is-disabled":o});return(0,_.createElement)("span",{className:s},(0,_.createElement)("input",(0,dr.Z)({className:"components-form-toggle__input",id:r,type:"checkbox",checked:n,onChange:i,disabled:o},a)),(0,_.createElement)("span",{className:"components-form-toggle__track"}),(0,_.createElement)("span",{className:"components-form-toggle__thumb"}))},Ay={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function Py(e){return(0,Ee.get)(Ay,e,"")}function Ry(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Us(e).alpha(t).toRgbString()}Gs([qs]);const Ly={black:"#000",white:"#fff"},Oy={blue:{medium:{focus:"#007cba",focusDark:"#fff"}},gray:{900:"#1e1e1e",700:"#757575",600:"#949494",400:"#ccc",200:"#ddd",100:"#f0f0f0"},darkGray:{primary:"#1e1e1e",heading:"#050505"},mediumGray:{text:"#757575"},lightGray:{ui:"#949494",secondary:"#ccc",tertiary:"#e7e8e9"}},My={900:"#191e23",800:"#23282d",700:"#32373c",600:"#40464d",500:"#555d66",400:"#606a73",300:"#6c7781",200:"#7e8993",150:"#8d96a0",100:"#8f98a1",placeholder:Ry(Oy.gray[900],.62)},Dy={900:Ry("#000510",.9),800:Ry("#00000a",.85),700:Ry("#06060b",.8),600:Ry("#000913",.75),500:Ry("#0a1829",.7),400:Ry("#0a1829",.65),300:Ry("#0e1c2e",.62),200:Ry("#162435",.55),100:Ry("#223443",.5),backgroundFill:Ry(My[700],.7)},By={900:Ry("#304455",.45),800:Ry("#425863",.4),700:Ry("#667886",.35),600:Ry("#7b86a2",.3),500:Ry("#9197a2",.25),400:Ry("#95959c",.2),300:Ry("#829493",.15),200:Ry("#8b8b96",.1),100:Ry("#747474",.05)},Fy={900:"#a2aab2",800:"#b5bcc2",700:"#ccd0d4",600:"#d7dade",500:"#e2e4e7",400:"#e8eaeb",300:"#edeff0",200:"#f3f4f5",100:"#f8f9f9",placeholder:Ry(Ly.white,.65)},jy={900:Ry(Ly.white,.5),800:Ry(Ly.white,.45),700:Ry(Ly.white,.4),600:Ry(Ly.white,.35),500:Ry(Ly.white,.3),400:Ry(Ly.white,.25),300:Ry(Ly.white,.2),200:Ry(Ly.white,.15),100:Ry(Ly.white,.1),backgroundFill:Ry(Fy[300],.8)},zy={wordpress:{700:"#00669b"},dark:{900:"#0071a1"},medium:{900:"#006589",800:"#00739c",700:"#007fac",600:"#008dbe",500:"#00a0d2",400:"#33b3db",300:"#66c6e4",200:"#bfe7f3",100:"#e5f5fa",highlight:"#b3e7fe",focus:"#007cba"}},Hy={theme:`var( --wp-admin-theme-color, ${zy.wordpress[700]})`,themeDark10:`var( --wp-admin-theme-color-darker-10, ${zy.medium.focus})`},Vy={theme:Hy.theme,background:Ly.white,backgroundDisabled:Fy[200],border:Oy.gray[700],borderHover:Oy.gray[700],borderFocus:Hy.themeDark10,borderDisabled:Oy.gray[400],borderLight:Oy.gray[200],label:My[500],textDisabled:My[150],textDark:Ly.white,textLight:Ly.black},Wy={...Ly,darkGray:(0,Ee.merge)({},My,Oy.darkGray),darkOpacity:Dy,darkOpacityLight:By,mediumGray:Oy.mediumGray,gray:Oy.gray,lightGray:(0,Ee.merge)({},Fy,Oy.lightGray),lightGrayLight:jy,blue:(0,Ee.merge)({},zy,Oy.blue),alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},admin:Hy,ui:Vy},Zy=da("div",{target:"e1puf3u3"})("font-family:",Py("default.fontFamily"),";font-size:",Py("default.fontSize"),";"),Uy=da("div",{target:"e1puf3u2"})("margin-bottom:",dy(2),";.components-panel__row &{margin-bottom:inherit;}"),$y=da("label",{target:"e1puf3u1"})("display:inline-block;margin-bottom:",dy(2),";"),Gy=da("p",{target:"e1puf3u0"})("font-size:",Py("helpText.fontSize"),";font-style:normal;color:",Wy.mediumGray.text,";");function qy(e){let{id:t,label:n,hideLabelFromVision:r,help:o,className:i,children:a}=e;return(0,_.createElement)(Zy,{className:Lr()("components-base-control",i)},(0,_.createElement)(Uy,{className:"components-base-control__field"},n&&t&&(r?(0,_.createElement)(ma,{as:"label",htmlFor:t},n):(0,_.createElement)($y,{className:"components-base-control__label",htmlFor:t},n)),n&&!t&&(r?(0,_.createElement)(ma,{as:"label"},n):(0,_.createElement)(qy.VisualLabel,null,n)),a),!!o&&(0,_.createElement)(Gy,{id:t?t+"__help":void 0,className:"components-base-control__help"},o))}qy.VisualLabel=e=>{let{className:t,children:n}=e;return t=Lr()("components-base-control__label",t),(0,_.createElement)("span",{className:t},n)};var Ky=qy;function Yy(e){let{label:t,checked:n,help:r,className:o,onChange:i,disabled:a}=e;const s=`inspector-toggle-control-${zo(Yy)}`;let l,c;return r&&(l=s+"__help",c=(0,Ee.isFunction)(r)?r(n):r),(0,_.createElement)(Ky,{id:s,help:c,className:Lr()("components-toggle-control",o)},(0,_.createElement)(Ny,{id:s,checked:n,onChange:function(e){i(e.target.checked)},"aria-describedby":l,disabled:a}),(0,_.createElement)("label",{htmlFor:s,className:"components-toggle-control__label"},t))}function Xy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}const Jy=["color","border","typography","spacing"],Qy={"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},ew={"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 tw(e){const{name:t}=jb();return(0,cr.Z)((n=>{var r;if(Jy.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");const o=n(Mb).getSettings(),i=(e=>ew[e]||e)(e),a=`__experimentalFeatures.${i}`,s=`__experimentalFeatures.blocks.${t}.${i}`,l=null!==(r=(0,Ee.get)(o,s))&&void 0!==r?r:(0,Ee.get)(o,a);var c,u;if(void 0!==l)return il[i]?null!==(c=null!==(u=l.custom)&&void 0!==u?u:l.theme)&&void 0!==c?c:l.default:l;const d=Qy[i]?Qy[i](o):void 0;return void 0!==d?d:"typography.dropCap"===i||void 0}),[t,e])}const nw={left:ty,center:ny,right:ry,"space-between":oy};var rw=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:i,isToolbar:a}=e;const s=e=>{r(e===o?void 0:e)},l=o?nw[o]:nw.left,c=[{name:"left",icon:ty,title:U("Justify items left"),isActive:"left"===o,onClick:()=>s("left")},{name:"center",icon:ny,title:U("Justify items center"),isActive:"center"===o,onClick:()=>s("center")},{name:"right",icon:ry,title:U("Justify items right"),isActive:"right"===o,onClick:()=>s("right")},{name:"space-between",icon:oy,title:U("Space between items"),isActive:"space-between"===o,onClick:()=>s("space-between")}],u=a?Gf:$b,d=a?{isCollapsed:n}:{};return(0,_.createElement)(u,(0,dr.Z)({icon:l,popoverProps:i,label:U("Change items justification"),controls:c.filter((e=>t.includes(e.name)))},d))};function ow(e){return(0,_.createElement)(rw,(0,dr.Z)({},e,{isToolbar:!1}))}const iw={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},aw={left:"flex-start",right:"flex-end",center:"center"},sw=["wrap","nowrap"];var lw={name:"flex",label:U("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n}=e;const{allowOrientation:r=!0}=t;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Sy,null,(0,_.createElement)(Ty,null,(0,_.createElement)(cw,{layout:t,onChange:n})),(0,_.createElement)(Ty,null,r&&(0,_.createElement)(dw,{layout:t,onChange:n}))),(0,_.createElement)(uw,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;return null!=r&&r.allowSwitching?null:(0,_.createElement)(Ub,{group:"block",__experimentalShareWithChildBlocks:!0},(0,_.createElement)(cw,{layout:t,onChange:n,isToolbar:!0}))},save:function(e){var t,n;let{selector:r,layout:o,style:i}=e;const{orientation:a="horizontal"}=o,s=null!==tw("spacing.blockGap"),l=null!==(t=null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap)&&void 0!==t?t:"var( --wp--style--block-gap, 0.5em )",c=iw[o.justifyContent]||iw.left,u=sw.includes(o.flexWrap)?o.flexWrap:"wrap",d=`\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tjustify-content: ${c};\n\t\t`,p=`\n\t\tflex-direction: column;\n\t\talign-items: ${aw[o.justifyContent]||aw.left};\n\t\t`;return(0,_.createElement)("style",null,`\n\t\t\t\t${Xy(r)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tgap: ${s?l:"0.5em"};\n\t\t\t\t\tflex-wrap: ${u};\n\t\t\t\t\t${"horizontal"===a?d:p}\n\t\t\t\t}\n\n\t\t\t\t${Xy(r,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function cw(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:i="horizontal"}=t,a=e=>{n({...t,justifyContent:e})},s=["left","center","right"];if("horizontal"===i&&s.push("space-between"),r)return(0,_.createElement)(ow,{allowedControls:s,value:o,onChange:a,popoverProps:{position:"bottom right",isAlternate:!0}});const l=[{value:"left",icon:ty,label:U("Justify items left")},{value:"center",icon:ny,label:U("Justify items center")},{value:"right",icon:ry,label:U("Justify items right")}];return"horizontal"===i&&l.push({value:"space-between",icon:oy,label:U("Space between items")}),(0,_.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,_.createElement)("legend",null,U("Justification")),(0,_.createElement)("div",null,l.map((e=>{let{value:t,icon:n,label:r}=e;return(0,_.createElement)(ga,{key:t,label:r,icon:n,isPressed:o===t,onClick:()=>a(t)})}))))}function uw(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,_.createElement)(Yy,{label:U("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function dw(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal"}=t;return(0,_.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,_.createElement)("legend",null,U("Orientation")),(0,_.createElement)(ga,{label:"horizontal",icon:iy,isPressed:"horizontal"===r,onClick:()=>n({...t,orientation:"horizontal"})}),(0,_.createElement)(ga,{label:"vertical",icon:ay,isPressed:"vertical"===r,onClick:()=>n({...t,orientation:"vertical"})}))}const pw="web"===um.OS,fw={px:{value:"px",label:pw?"px":U("Pixels (px)"),default:"",a11yLabel:U("Pixels (px)"),step:1},"%":{value:"%",label:pw?"%":U("Percentage (%)"),default:"",a11yLabel:U("Percent (%)"),step:.1},em:{value:"em",label:pw?"em":U("Relative to parent font size (em)"),default:"",a11yLabel:$("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:pw?"rem":U("Relative to root font size (rem)"),default:"",a11yLabel:$("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:pw?"vw":U("Viewport width (vw)"),default:"",a11yLabel:U("Viewport width (vw)"),step:.1},vh:{value:"vh",label:pw?"vh":U("Viewport height (vh)"),default:"",a11yLabel:U("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:pw?"vmin":U("Viewport smallest dimension (vmin)"),default:"",a11yLabel:U("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:pw?"vmax":U("Viewport largest dimension (vmax)"),default:"",a11yLabel:U("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:pw?"ch":U("Width of the zero (0) character (ch)"),default:"",a11yLabel:U("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:pw?"ex":U("x-height of the font (ex)"),default:"",a11yLabel:U("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:pw?"cm":U("Centimeters (cm)"),default:"",a11yLabel:U("Centimeters (cm)"),step:.001},mm:{value:"mm",label:pw?"mm":U("Millimeters (mm)"),default:"",a11yLabel:U("Millimeters (mm)"),step:.1},in:{value:"in",label:pw?"in":U("Inches (in)"),default:"",a11yLabel:U("Inches (in)"),step:.001},pc:{value:"pc",label:pw?"pc":U("Picas (pc)"),default:"",a11yLabel:U("Picas (pc)"),step:1},pt:{value:"pt",label:pw?"pt":U("Points (pt)"),default:"",a11yLabel:U("Points (pt)"),step:1}},mw=Object.values(fw),hw=[fw.px,fw["%"],fw.em,fw.rem,fw.vw,fw.vh],gw=fw.px;function vw(e,t,n){return yw(t?`${e}${t}`:e,n)}function bw(e){return Array.isArray(e)&&!!e.length}function yw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mw;const n=String(e).trim();let r=parseFloat(n);r=isNaN(r)?"":r;const o=n.match(/[\d.\-\+]*\s*(.*)/);let i=void 0!==(null==o?void 0:o[1])?o[1]:"";if(i=i.toLowerCase(),bw(t)&&!1!==t){const e=t.find((e=>e.value===i));i=null==e?void 0:e.value}else i=gw.value;return[r,i]}function ww(e,t,n,r){const[o,i]=yw(e,t);let a,s=o;var l;return Number.isFinite(o)&&""!==o||(s=n),a=i||r,Array.isArray(t)&&bw(t)&&!a&&(a=null===(l=t[0])||void 0===l?void 0:l.value),[s,a]}const kw=e=>{let{units:t,availableUnits:n,defaultValues:r}=e;t=t||mw;const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(n||[],t);return r&&o.forEach(((e,t)=>{r[e.value]&&(o[t].default=r[e.value])})),0!==o.length&&o},xw="CHANGE",_w="COMMIT",Ew="DRAG_END",Cw="DRAG_START",Sw="DRAG",Iw="INVALIDATE",Tw="PRESS_DOWN",Nw="PRESS_ENTER",Aw="PRESS_UP",Pw="RESET",Rw="UPDATE",Lw=e=>e,Ow={_event:{},error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""};function Mw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ow;const{value:t}=e;return{...Ow,...e,initialValue:t}}const Dw=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.reduceRight(((e,t)=>{const r=t(...n);return(0,Ee.isEmpty)(r)?e:{...e,...r}}),{})}};function Bw(e){return(t,n)=>{const r={...t};switch(n.type){case Aw:case Tw:r.isDirty=!1;break;case Cw:r.isDragging=!0;break;case Ew:r.isDragging=!1;break;case xw:r.error=null,r.value=n.payload.value,t.isPressEnterToChange&&(r.isDirty=!0);break;case _w:r.value=n.payload.value,r.isDirty=!1;break;case Pw:r.error=null,r.isDirty=!1,r.value=n.payload.value||t.initialValue;break;case Rw:r.value=n.payload.value,r.isDirty=!1;break;case Iw:r.error=n.payload.error}return n.payload.event&&(r._event=n.payload.event),e(r,n)}}const Fw={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"},jw="…",zw={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},Hw={ellipsis:jw,ellipsizeMode:zw.auto,limit:0,numberOfLines:0};function Vw(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,a=~~n,s=(0,Ee.isNil)(r)?jw:r;return 0===i&&0===a||i>=o||a>=o||i+a>=o?e:0===a?e.slice(0,i)+s:e.slice(0,i)+s+e.slice(o-a)}let Ww;Gs([qs]);const Zw=T()((function(e){var t,n;if("string"!=typeof e)return"";if("string"==typeof(n=e)&&Us(n).isValid())return e;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const r=function(){if("undefined"!=typeof document){if(!Ww){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),Ww=e}return Ww}}();if(!r)return"";r.style.background=e;const o=null===(t=window)||void 0===t?void 0:t.getComputedStyle(r).background;return r.style.background="",o||""}));const Uw={controlSurfaceColor:Wy.white,controlTextActiveColor:Wy.ui.theme,controlPaddingX:"12px",controlPaddingXLarge:"calc(12px * 1.3334)",controlPaddingXSmall:"calc(12px / 1.3334)",controlBackgroundColor:Wy.white,controlBorderRadius:"2px",controlBorderColor:Wy.gray[700],controlBoxShadow:"transparent",controlBorderColorHover:Wy.gray[700],controlBoxShadowFocus:`0 0 0 0.5px ${Wy.admin.theme}`,controlDestructiveBorderColor:Wy.alert.red,controlHeight:"36px",controlHeightXSmall:"calc( 36px * 0.6 )",controlHeightSmall:"calc( 36px * 0.8 )",controlHeightLarge:"calc( 36px * 1.2 )",controlHeightXLarge:"calc( 36px * 1.4 )"},$w={toggleGroupControlBackgroundColor:Uw.controlBackgroundColor,toggleGroupControlBorderColor:Wy.ui.border,toggleGroupControlBackdropBackgroundColor:Uw.controlSurfaceColor,toggleGroupControlBackdropBorderColor:Wy.ui.border,toggleGroupControlBackdropBoxShadow:"transparent",toggleGroupControlButtonColorActive:Uw.controlBackgroundColor};var Gw={...Uw,...$w,colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:"18px",fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${dy(2)}`,cardPaddingSmall:`${dy(4)}`,cardPaddingMedium:`${dy(4)} ${dy(6)}`,cardPaddingLarge:`${dy(6)} ${dy(8)}`,surfaceBackgroundColor:Wy.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:Wy.white,surfaceColor:Wy.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"};const qw=(0,sy.iv)("color:",Wy.darkGray.primary,";line-height:",Gw.fontLineHeightBase,";margin:0;",""),Kw={name:"4zleql",styles:"display:block"},Yw=(0,sy.iv)("color:",Wy.alert.green,";",""),Xw=(0,sy.iv)("color:",Wy.alert.red,";",""),Jw=(0,sy.iv)("color:",Wy.mediumGray.text,";",""),Qw=(0,sy.iv)("mark{background:",Wy.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),ek={name:"50zrmy",styles:"text-transform:uppercase"};var tk=n(96928);const nk=T()((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t})),rk={body:13,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},ok=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function ik(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:13;if(e in rk)return ik(rk[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}const t=`(${e} / 13)`;return`calc(${t} * ${Gw.fontSize})`}function ak(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if(!ok.includes(e))return ik(e);const t=`fontSizeH${e}`;return Gw[t]}var sk={name:"50zrmy",styles:"text-transform:uppercase"};function lk(e){const{adjustLineHeightForInnerControls:t,align:n,children:r,className:o,color:i,ellipsizeMode:a,isDestructive:s=!1,display:l,highlightEscape:c=!1,highlightCaseSensitive:u=!1,highlightWords:d,highlightSanitize:p,isBlock:f=!1,letterSpacing:h,lineHeight:g,optimizeReadabilityFor:v,size:b,truncate:y=!1,upperCase:w=!1,variant:k,weight:x=Gw.fontWeight,...E}=zi(e,"Text");let C=r;const S=Array.isArray(d),I="caption"===b;if(S){if("string"!=typeof r)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");C=function(e){let{activeClassName:t="",activeIndex:n=-1,activeStyle:r,autoEscape:o,caseSensitive:i=!1,children:a,findChunks:s,highlightClassName:l="",highlightStyle:c={},highlightTag:u="mark",sanitize:d,searchWords:p=[],unhighlightClassName:f="",unhighlightStyle:m}=e;if(!a)return null;if("string"!=typeof a)return a;const h=a,g=(0,tk.findAll)({autoEscape:o,caseSensitive:i,findChunks:s,sanitize:d,searchWords:p,textToHighlight:h}),v=u;let b,y=-1,w="";return g.map(((e,o)=>{const a=h.substr(e.start,e.end-e.start);if(e.highlight){let e;y++,"object"==typeof l?i?e=l[a]:(l=nk(l),e=l[a.toLowerCase()]):e=l;const s=y===+n;w=`${e} ${s?t:""}`,b=!0===s&&null!==r?Object.assign({},c,r):c;const u={children:a,className:w,key:o,style:b};return"string"!=typeof v&&(u.highlightIndex=y),(0,_.createElement)(v,u)}return(0,_.createElement)("span",{children:a,className:f,key:o,style:m})}))}({autoEscape:c,children:r,caseSensitive:u,searchWords:d,sanitize:p})}const T=Fi();let N;!0===y&&(N="auto"),!1===y&&(N="none");const A=function(e){const{className:t,children:n,ellipsis:r=jw,ellipsizeMode:o=zw.auto,limit:i=0,numberOfLines:a=0,...s}=zi(e,"Truncate"),l=Fi(),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n={...Hw,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===zw.none)return e;let a,s;switch(o){case zw.head:a=0,s=i;break;case zw.middle:a=Math.floor(i/2),s=Math.floor(i/2);break;default:a=i,s=0}return o!==zw.auto?Vw(e,a,s,r):e}("string"==typeof n?n:"",{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:a}),u=o===zw.auto;return{...s,className:(0,_.useMemo)((()=>{const e={};return e.numberOfLines=(0,sy.iv)("-webkit-box-orient:vertical;-webkit-line-clamp:",a,";display:-webkit-box;overflow:hidden;",""),l(u&&!a&&Fw,u&&!!a&&e.numberOfLines,t)}),[t,a,u]),children:c}}({...E,className:(0,_.useMemo)((()=>{const e={},r=function(e,t){if(t)return t;if(!e)return;let n=`calc(${Gw.controlHeight} + ${dy(2)})`;switch(e){case"large":n=`calc(${Gw.controlHeightLarge} + ${dy(2)})`;break;case"small":n=`calc(${Gw.controlHeightSmall} + ${dy(2)})`;break;case"xSmall":n=`calc(${Gw.controlHeightXSmall} + ${dy(2)})`}return n}(t,g);if(e.Base=(0,sy.iv)({color:i,display:l,fontSize:ik(b),fontWeight:x,lineHeight:r,letterSpacing:h,textAlign:n},"",""),e.upperCase=sk,e.optimalTextColor=null,v){const t="dark"==("#000000"===function(e){const t=Zw(e);return Us(t).isLight()?"#000000":"#ffffff"}(v)?"dark":"light");e.optimalTextColor=t?(0,sy.iv)({color:Wy.black},"",""):(0,sy.iv)({color:Wy.white},"","")}return T(qw,e.Base,e.optimalTextColor,s&&Xw,!!S&&Qw,f&&Kw,I&&Jw,k&&m[k],w&&e.upperCase,o)}),[t,n,o,i,l,f,I,s,S,h,g,v,b,w,k,x]),children:r,ellipsizeMode:a||N});return!y&&Array.isArray(r)&&(C=_.Children.map(r,(e=>(0,Ee.isPlainObject)(e)&&"props"in e&&Zi(e,["Link"])?(0,_.cloneElement)(e,{size:e.props.size||"inherit"}):e))),{...A,children:y?A.children:C}}var ck=Vi((function(e,t){const n=lk(e);return(0,_.createElement)(fa,(0,dr.Z)({as:"span"},n,{ref:t}))}),"Text"),uk={name:"1739oy8",styles:"z-index:1"};const dk=e=>{let{isFocused:t}=e;return t?uk:""};var pk={name:"2o6p8u",styles:"justify-content:space-between"},fk={name:"14qk3ip",styles:"align-items:flex-start;flex-direction:column-reverse"},mk={name:"hbng6e",styles:"align-items:flex-start;flex-direction:column"};const hk=e=>{let{labelPosition:t}=e;switch(t){case"top":return mk;case"bottom":return fk;case"edge":return pk;default:return""}},gk=da(Sy,{target:"em5sgkm7"})("position:relative;border-radius:2px;padding-top:0;",dk," ",hk,";");var vk={name:"wyxldh",styles:"margin:0 !important"},bk={name:"1d3w5wq",styles:"width:100%"};const yk=da("div",{target:"em5sgkm6"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(e=>{let{disabled:t}=e;const n=t?Wy.ui.backgroundDisabled:Wy.ui.background;return(0,sy.iv)({backgroundColor:n},"","")})," ",(e=>{let{hideLabel:t}=e;return t?vk:null})," ",(e=>{let{__unstableInputWidth:t,labelPosition:n}=e;return t?"side"===n?"":"edge"===n?(0,sy.iv)({flex:`0 0 ${t}`},"",""):(0,sy.iv)({width:t},"",""):bk}),";"),wk=da("input",{target:"em5sgkm5"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Wy.black,";display:block;margin:0;outline:none;padding-left:8px;padding-right:8px;width:100%;",(e=>{let t,n,{isDragging:r,dragCursor:o}=e;return r&&(t=(0,sy.iv)("cursor:",o,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),r&&o&&(n=(0,sy.iv)("&:active{cursor:",o,";}","")),(0,sy.iv)(t," ",n,";","")})," ",(e=>{let{disabled:t}=e;return t?(0,sy.iv)({color:Wy.ui.textDisabled},"",""):""})," ",(e=>{let{inputSize:t}=e;const n={default:"13px",small:"11px"},r=n[t]||n.default;return r?(0,sy.iv)("font-size:","16px",";@media ( min-width: 600px ){font-size:",r,";}",""):""})," ",(e=>{let{inputSize:t}=e;const n={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},r=n[t]||n.default;return(0,sy.iv)(r,"","")})," &::-webkit-input-placeholder{line-height:normal;}}"),kk=e=>{let{labelPosition:t}=e,n=4;return"edge"!==t&&"side"!==t||(n=0),(0,sy.iv)({paddingTop:0,paddingBottom:n},"","")},xk=da(ck,{target:"em5sgkm4"})("&&&{box-sizing:border-box;color:currentColor;display:block;margin:0;max-width:100%;z-index:1;",kk," overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),_k=e=>(0,_.createElement)(xk,(0,dr.Z)({},e,{as:"label"})),Ek=da(Ty,{target:"em5sgkm3"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),Ck=da("div",{target:"em5sgkm2"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(e=>{let t,{disabled:n,isFocused:r}=e,o=r?Wy.ui.borderFocus:Wy.ui.border;return r&&(t=`0 0 0 1px ${Wy.ui.borderFocus} inset`),n&&(o=Wy.ui.borderDisabled),(0,sy.iv)({boxShadow:t,borderColor:o,borderStyle:"solid",borderWidth:1},"","")})," ",_y({paddingLeft:2}),";}"),Sk=da("span",{target:"em5sgkm1"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Ik=da("span",{target:"em5sgkm0"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"});var Tk=(0,_.memo)((function(e){let{disabled:t=!1,isFocused:n=!1}=e;return(0,_.createElement)(Ck,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:t,isFocused:n})}));function Nk(e){let{children:t,hideLabelFromVision:n,htmlFor:r,...o}=e;return t?n?(0,_.createElement)(ma,{as:"label",htmlFor:r},t):(0,_.createElement)(_k,(0,dr.Z)({htmlFor:r},o),t):null}var Ak=(0,_.forwardRef)((function e(t,n){let{__unstableInputWidth:r,children:o,className:i,disabled:a=!1,hideLabelFromVision:s=!1,labelPosition:l,id:c,isFocused:u=!1,label:d,prefix:p,size:f="default",suffix:m,...h}=t;const g=function(t){const n=zo(e);return t||`input-base-control-${n}`}(c),v=s||!d;return(0,_.createElement)(gk,(0,dr.Z)({},h,function(e){const t={};switch(e){case"top":t.direction="column",t.gap=0;break;case"bottom":t.direction="column-reverse",t.gap=0;break;case"edge":t.justify="space-between"}return t}(l),{className:i,isFocused:u,labelPosition:l,ref:n}),(0,_.createElement)(Ek,null,(0,_.createElement)(Nk,{className:"components-input-control__label",hideLabelFromVision:s,labelPosition:l,htmlFor:g,size:f},d)),(0,_.createElement)(yk,{__unstableInputWidth:r,className:"components-input-control__container",disabled:a,hideLabel:v,labelPosition:l},p&&(0,_.createElement)(Sk,{className:"components-input-control__prefix"},p),o,m&&(0,_.createElement)(Ik,{className:"components-input-control__suffix"},m),(0,_.createElement)(Tk,{disabled:a,isFocused:u})))}));function Pk(e,t){return e.map((function(e,n){return e+t[n]}))}function Rk(e,t){return e.map((function(e,n){return e-t[n]}))}function Lk(e){return Math.hypot.apply(Math,e)}function Ok(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Mk(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function Dk(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Mk(t-e,n-t,r)+t:e>n?+Mk(e-n,n-t,r)+n:e}function Bk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fk(){return(Fk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function jk(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function zk(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Hk(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wk(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Vk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vk(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Zk(){}function Uk(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Zk:1===t.length?t[0]:function(){for(var e,n,r=Wk(t);!(n=r()).done;){var o=n.value;e=o.apply(this,arguments)||e}return e}}function $k(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function Gk(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function qk(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=qk(e[a],s);break;case"boolean":s&&(n[a]=e[a])}}return n}function Kk(){return"undefined"!=typeof window&&"ontouchstart"in window}function Yk(e){return"pointerId"in e?null:"touchend"===e.type?e.changedTouches:e.targetTouches}function Xk(e){return Array.from(Yk(e)).map((function(e){return e.identifier}))}function Jk(e){return{buttons:"buttons"in e?e.buttons:0,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}var Qk=function(e){return e};function ex(e,t){void 0===t&&(t=Qk);var n=Yk(e),r=n?n[0]:e;return t([r.clientX,r.clientY])}var tx=Fk({},{threshold:function(e){return void 0===e&&(e=0),$k(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return $k(.15);case!1:return $k(0);default:return $k(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:$k(e)},transform:!0},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return tx.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,a=t.top,s=void 0===a?-1/0:a,l=t.bottom;return[[r,i],[s,void 0===l?1/0:l]]}}),nx="undefined"!=typeof window&&window.document&&window.document.createElement,rx={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=nx?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}},transform:!0},ox=Fk({},tx,{useTouch:function(e){void 0===e&&(e=!1);var t=Kk(),n="undefined"!=typeof window&&"onpointerdown"in window;return!(!e||!t)||!(!t||n)},experimental_preventWindowScrollY:function(e){return void 0===e&&(e=!1),e},threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,a=void 0!==i&&i,s=n.axis,l=$k(e,o?3:a||(void 0===s?void 0:s)?1:0);return this.filterTaps=o,l},swipeVelocity:function(e){return void 0===e&&(e=.5),$k(e)},swipeDistance:function(e){return void 0===e&&(e=50),$k(e)},swipeDuration:function(e){return void 0===e&&(e=250),e},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function ix(e){return void 0===e&&(e={}),qk(e,rx)}function ax(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=zk(e,["domTarget","eventOptions","window","enabled"]),a=ix({domTarget:t,eventOptions:n,window:r,enabled:o});return a.hover=Fk({enabled:!0},i),a}function sx(e){var t,n=e.domTarget,r=e.eventOptions,o=e.window,i=e.enabled,a=zk(e,["domTarget","eventOptions","window","enabled"]),s=ix({domTarget:n,eventOptions:r,window:o,enabled:i});return s.drag=(void 0===(t=a)&&(t={}),qk(t,ox)),s}function lx(e){return Fk({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_threshold:[0,0],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Zk,canceled:!1,memo:void 0,args:void 0},e)}function cx(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},drag:lx({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),pinch:lx({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:lx({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:lx({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:lx({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var ux=new Map,dx=function(e){return e};function px(e,t){return Math.abs(e)>=t&&Ok(e)*t}function fx(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],s=e[0],l=s[0],c=s[1],u=e[1],d=u[0],p=u[1];return[Dk(r,l,c,i),Dk(o,d,p,a)]}function mx(e,t,n){var r=e.state,o=t.timeStamp,i=t.type,a=r.values;return{_lastEventType:i,event:t,timeStamp:o,elapsedTime:n?0:o-r.startTime,previous:a}}function hx(e,t,n,r){var o=e.state,i=e.config,a=e.stateKey,s=e.args,l=e.transform,c=o.offset,u=n.timeStamp,d=i.initial,p=i.bounds,f=Rk(l(i.threshold),l([0,0])).map(Math.abs),m=Fk({},cx()[a],{_active:!0,args:s,values:t,initial:null!=r?r:t,_threshold:f,offset:c,lastOffset:c,startTime:u});return Fk({},m,{_initial:Gk(d,m),_bounds:Gk(p,m)})}var gx=function(e){var t=this;this.classes=e,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Kk(),this.supportsGestureEvents=function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),this.bind=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var o,i={},a=Wk(t.classes);!(o=a()).done;){var s=o.value;new s(t,n).addBindings(i)}var l=function(e){Cx(i,e,(function(r){return t.nativeRefs[e](Fk({},t.state.shared,{event:r,args:n}))}))};for(var c in t.nativeRefs)l(c);return t.config.domTarget?kx(t,i):xx(t,i)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=Ex(t.config),n=t.config.eventOptions;e&&Ix(e,_x(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(n){for(var i in o)Ix(n,o[i],r);e.windowListeners={}}}(t)},this.classes=e,this.state=cx(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function vx(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set(Xk(t))}function bx(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):Xk(t).forEach((function(t){return e.touchIds.delete(t)}))}function yx(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=r.eventOptions),r.window&&(Ix(r.window,o[t],n),delete o[t])}function wx(e,t,n,r){var o=e.config,i=e.windowListeners;void 0===n&&(n=[]),void 0===r&&(r=o.eventOptions),o.window&&(Ix(o.window,i[t],r),Sx(o.window,i[t]=n,r))}function kx(e,t){var n=e.config,r=e.domListeners,o=Ex(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Ix(o,_x(r),i);for(var a=0,s=Object.entries(t);a<s.length;a++){var l=s[a],c=l[0],u=l[1],d=c.slice(2).toLowerCase();r.push([d,Uk.apply(void 0,u)])}Sx(o,r,i)}function xx(e,t){for(var n={},r=e.config.eventOptions.capture?"Capture":"",o=0,i=Object.entries(t);o<i.length;o++){var a=i[o],s=a[0],l=a[1],c=Array.isArray(l)?l:[l];n[s+r]=Uk.apply(void 0,c)}return n}function _x(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function Ex(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Cx(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Sx(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Wk(t);!(r=o()).done;){var i=r.value,a=i[0],s=i[1];e.addEventListener(a,s,n)}}function Ix(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Wk(t);!(r=o()).done;){var i=r.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function Tx(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;return e.drag&&t.add(ux.get("drag")),e.wheel&&t.add(ux.get("wheel")),e.scroll&&t.add(ux.get("scroll")),e.move&&t.add(ux.get("move")),e.pinch&&t.add(ux.get("pinch")),e.hover&&t.add(ux.get("hover")),t}(e),o=E().useMemo((function(){return new gx(r)}),[]);return o.config=t,o.handlers=e,o.nativeRefs=n,E().useEffect(o.effect,[]),o.config.domTarget?Nx:o.bind}function Nx(){}var Ax=function(e){function t(){return e.apply(this,arguments)||this}jk(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Rk(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=Lk(t),o=0===r?0:1/r,i=0===n?0:1/n,a=i*r,s=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:s,velocity:a,distance:Lk(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=n.controller.pointerIds.size||n.controller.touchIds.size,i=n.controller.state.shared.buttons>0||o>0,a=Fk({},n.controller.state.shared,n.state,n.mapStateValues(n.state),{locked:!!document.pointerLockElement,touches:o,down:i}),s=n.handler(a);return n.state.memo=void 0!==s?s:n.state.memo,a},this.controller=e,this.args=t}var t,n,r=e.prototype;return r.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},r.updateGestureState=function(e){Object.assign(this.state,e)},r.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},r.getMovement=function(e){var t=this.config.rubberband,n=this.state,r=n._bounds,o=n._initial,i=n._active,a=n._intentional,s=n.lastOffset,l=n.movement,c=n._threshold,u=this.getInternalMovement(e,this.state),d=!1===a[0]?px(u[0],c[0]):a[0],p=!1===a[1]?px(u[1],c[1]):a[1],f=this.checkIntentionality([d,p],u);if(f._blocked)return Fk({},f,{_movement:u,delta:[0,0]});var m=f._intentional,h=u,g=[!1!==m[0]?u[0]-m[0]:0,!1!==m[1]?u[1]-m[1]:0],v=Pk(g,s),b=i?t:[0,0];return g=fx(r,Pk(g,o),b),Fk({},f,{intentional:!1!==m[0]||!1!==m[1],_initial:o,_movement:h,movement:g,values:e,offset:fx(r,v,b),delta:Rk(g,l)})},r.clean=function(){this.clearTimeout()},t=e,(n=[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||dx}}])&&Bk(t.prototype,n),e}());function Px(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}var Rx=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.setPointerCapture=function(e){if(!t.config.useTouch&&!document.pointerLockElement){var n=e.target,r=e.pointerId;n&&"setPointerCapture"in n&&n.setPointerCapture(r),t.updateGestureState({_dragTarget:n,_dragPointerId:r})}},t.releasePointerCapture=function(){if(!t.config.useTouch&&!document.pointerLockElement){var e=t.state,n=e._dragTarget,r=e._dragPointerId;if(r&&n&&"releasePointerCapture"in n&&(!("hasPointerCapture"in n)||n.hasPointerCapture(r)))try{n.releasePointerCapture(r)}catch(e){}}},t.preventScroll=function(e){t.state._dragPreventScroll&&e.cancelable&&e.preventDefault()},t.getEventId=function(e){return t.config.useTouch?e.changedTouches[0].identifier:e.pointerId},t.isValidEvent=function(e){return t.state._pointerId===t.getEventId(e)},t.shouldPreventWindowScrollY=t.config.experimental_preventWindowScrollY&&t.controller.supportsTouchEvents,t.setUpWindowScrollDetection=function(e){Px(e),wx(t.controller,t.stateKey,[["touchmove",t.preventScroll],["touchend",t.clean.bind(Hk(t))],["touchcancel",t.clean.bind(Hk(t))]],{passive:!1}),t.setTimeout(t.startDrag.bind(Hk(t)),250,e)},t.setUpDelayedDragTrigger=function(e){t.state._dragDelayed=!0,Px(e),t.setTimeout(t.startDrag.bind(Hk(t)),t.config.delay,e)},t.setStartState=function(e){var n=ex(e,t.transform);t.updateSharedState(Jk(e)),t.updateGestureState(Fk({},hx(Hk(t),n,e),mx(Hk(t),e,!0),{_pointerId:t.getEventId(e)})),t.updateGestureState(t.getMovement(n))},t.onDragStart=function(e){vx(t.controller,e),t.enabled&&!t.state._active&&(t.setStartState(e),t.setPointerCapture(e),t.shouldPreventWindowScrollY?t.setUpWindowScrollDetection(e):t.config.delay>0?t.setUpDelayedDragTrigger(e):t.startDrag(e,!0))},t.onDragChange=function(e){if(!t.state.canceled&&t.state._active&&t.isValidEvent(e)&&(t.state._lastEventType!==e.type||e.timeStamp!==t.state.timeStamp)){var n;if(document.pointerLockElement){var r=e.movementX,o=e.movementY;n=Pk(t.transform([r,o]),t.state.values)}else n=ex(e,t.transform);var i=t.getKinematics(n,e);if(!t.state._dragStarted){if(t.state._dragDelayed)return void t.startDrag(e);if(!t.shouldPreventWindowScrollY)return;if(t.state._dragPreventScroll||!i.axis)return;if("x"!==i.axis)return void(t.state._active=!1);t.startDrag(e)}var a=Jk(e);t.updateSharedState(a);var s=mx(Hk(t),e),l=Lk(i._movement),c=t.state._dragIsTap;c&&l>=3&&(c=!1),t.updateGestureState(Fk({},s,i,{_dragIsTap:c})),t.fireGestureHandler()}},t.onDragEnd=function(e){if(bx(t.controller,e),t.isValidEvent(e)&&(t.clean(),t.state._active)){t.state._active=!1;var n=t.state._dragIsTap,r=t.state.velocities,o=r[0],i=r[1],a=t.state.movement,s=a[0],l=a[1],c=t.state._intentional,u=c[0],d=c[1],p=t.config.swipeVelocity,f=p[0],m=p[1],h=t.config.swipeDistance,g=h[0],v=h[1],b=t.config.swipeDuration,y=Fk({},mx(Hk(t),e),t.getMovement(t.state.values)),w=[0,0];y.elapsedTime<b&&(!1!==u&&Math.abs(o)>f&&Math.abs(s)>g&&(w[0]=Ok(o)),!1!==d&&Math.abs(i)>m&&Math.abs(l)>v&&(w[1]=Ok(i))),t.updateSharedState({buttons:0}),t.updateGestureState(Fk({},y,{tap:n,swipe:w})),t.fireGestureHandler(t.config.filterTaps&&!0===n)}},t.clean=function(){e.prototype.clean.call(Hk(t)),t.state._dragStarted=!1,t.releasePointerCapture(),yx(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0,_active:!1}),t.updateSharedState({buttons:0}),setTimeout((function(){return t.fireGestureHandler()}),0))},t.onClick=function(e){t.state._dragIsTap||e.stopPropagation()},t}jk(t,e);var n=t.prototype;return n.startDrag=function(e,t){void 0===t&&(t=!1),this.state._active&&!this.state._dragStarted&&(t||this.setStartState(e),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())},n.addBindings=function(e){this.config.useTouch?(Cx(e,"onTouchStart",this.onDragStart),Cx(e,"onTouchMove",this.onDragChange),Cx(e,"onTouchEnd",this.onDragEnd),Cx(e,"onTouchCancel",this.onDragEnd)):(Cx(e,"onPointerDown",this.onDragStart),Cx(e,"onPointerMove",this.onDragChange),Cx(e,"onPointerUp",this.onDragEnd),Cx(e,"onPointerCancel",this.onDragEnd)),this.config.filterTaps&&Cx(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(Ax);function Lx(e,t){var n,r,o=[],i=!1;return function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return i&&n===this&&t(s,o)||(r=e.apply(this,s),i=!0,n=this,o=s),r}}function Ox(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!Ox(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Ox(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||Ox(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function Mx(e,t){try{return Ox(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}var Dx=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="moving",t.stateKey="move",t.debounced=!0,t.onMove=function(e){t.enabled&&(t.setTimeout(t.onMoveEnd),t.state._active?t.onMoveChange(e):t.onMoveStart(e))},t.onMoveStart=function(e){t.updateSharedState(Jk(e));var n=ex(e,t.transform);t.updateGestureState(Fk({},hx(Hk(t),n,e),mx(Hk(t),e,!0))),t.updateGestureState(t.getMovement(n)),t.fireGestureHandler()},t.onMoveChange=function(e){t.updateSharedState(Jk(e));var n=ex(e,t.transform);t.updateGestureState(Fk({},mx(Hk(t),e),t.getKinematics(n,e))),t.fireGestureHandler()},t.onMoveEnd=function(){if(t.clean(),t.state._active){var e=t.state.values;t.updateGestureState(t.getMovement(e)),t.updateGestureState({velocities:[0,0],velocity:0,_active:!1}),t.fireGestureHandler()}},t.hoverTransform=function(){return t.controller.config.hover.transform||t.controller.config.transform},t.onPointerEnter=function(e){if(t.controller.state.shared.hovering=!0,t.controller.config.enabled){if(t.controller.config.hover.enabled){var n=ex(e,t.hoverTransform()),r=Fk({},t.controller.state.shared,t.state,mx(Hk(t),e,!0),{args:t.args,values:n,active:!0,hovering:!0});t.controller.handlers.hover(Fk({},r,t.mapStateValues(r)))}"move"in t.controller.handlers&&t.onMoveStart(e)}},t.onPointerLeave=function(e){if(t.controller.state.shared.hovering=!1,"move"in t.controller.handlers&&t.onMoveEnd(),t.controller.config.hover.enabled){var n=ex(e,t.hoverTransform()),r=Fk({},t.controller.state.shared,t.state,mx(Hk(t),e),{args:t.args,values:n,active:!1});t.controller.handlers.hover(Fk({},r,t.mapStateValues(r)))}},t}return jk(t,e),t.prototype.addBindings=function(e){"move"in this.controller.handlers&&Cx(e,"onPointerMove",this.onMove),"hover"in this.controller.handlers&&(Cx(e,"onPointerEnter",this.onPointerEnter),Cx(e,"onPointerLeave",this.onPointerLeave))},t}(Ax);function Bx(e){return null!=e}function Fx(e){const t=""===e;return!Bx(e)||t}function jx(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return null!==(e=t.find(Bx))&&void 0!==e?e:n}var zx=function(e,t){const n=(0,_.useRef)(!1);(0,_.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)},Hx=(0,_.forwardRef)((function(e,t){let{disabled:n=!1,dragDirection:r="n",dragThreshold:o=10,id:i,isDragEnabled:a=!1,isFocused:s,isPressEnterToChange:l=!1,onBlur:c=Ee.noop,onChange:u=Ee.noop,onDrag:d=Ee.noop,onDragEnd:p=Ee.noop,onDragStart:f=Ee.noop,onFocus:m=Ee.noop,onKeyDown:h=Ee.noop,onValidate:g=Ee.noop,size:v="default",setIsFocused:b,stateReducer:y=(e=>e),value:w,type:k,...x}=e;const{state:E,change:C,commit:S,drag:I,dragEnd:T,dragStart:N,invalidate:A,pressDown:P,pressEnter:R,pressUp:L,reset:O,update:M}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Lw,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ow;const[n,r]=(0,_.useReducer)(Bw(e),Mw(t)),o=e=>(t,n)=>{n&&n.persist&&n.persist(),r({type:e,payload:{value:t,event:n}})},i=e=>t=>{t&&t.persist&&t.persist(),r({type:e,payload:{event:t}})},a=e=>t=>{r({type:e,payload:t})},s=o(xw),l=(e,t)=>r({type:Iw,payload:{error:e,event:t}}),c=o(Pw),u=o(_w),d=o(Rw),p=a(Cw),f=a(Sw),m=a(Ew),h=i(Aw),g=i(Tw),v=i(Nw);return{change:s,commit:u,dispatch:r,drag:f,dragEnd:m,dragStart:p,invalidate:l,pressDown:g,pressEnter:v,pressUp:h,reset:c,state:n,update:d}}(y,{isDragEnabled:a,value:w,isPressEnterToChange:l}),{_event:D,value:B,isDragging:F,isDirty:j}=E,z=(0,_.useRef)(!1),H=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,_.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e]),n}(F,r);zx((()=>{w!==B&&(s||z.current?j||(u(B,{event:D}),z.current=!1):M(w,D))}),[B,j,s,w]);const V=e=>{const t=e.currentTarget.value;try{g(t),S(t,e)}catch(t){A(t,e)}},W=function(e,t){void 0===t&&(t={}),ux.set("drag",Rx);var n=(0,_.useRef)();return n.current||(n.current=Lx(sx,Mx)),Tx({drag:e=>{const{distance:t,dragging:n,event:r}=e;if(r.persist(),t){if(r.stopPropagation(),!n)return p(e),void T(e);d(e),I(e),F||(f(e),N(e))}}},n.current(t))}(0,{threshold:o,enabled:a}),Z=a?W():{};let U;return"number"===k&&(U=e=>{var t;null===(t=x.onMouseDown)||void 0===t||t.call(x,e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,_.createElement)(wk,(0,dr.Z)({},x,Z,{className:"components-input-control__input",disabled:n,dragCursor:H,isDragging:F,id:i,onBlur:e=>{c(e),null==b||b(!1),l&&j&&(z.current=!0,Fx(B)?O(w,e):V(e))},onChange:e=>{const t=e.target.value;C(t,e)},onFocus:e=>{m(e),null==b||b(!0)},onKeyDown:e=>{const{keyCode:t}=e;switch(h(e),t){case Kr:L(e);break;case Xr:P(e);break;case $r:R(e),l&&(e.preventDefault(),V(e))}},onMouseDown:U,ref:t,inputSize:v,value:B,type:k}))}));var Vx=(0,_.forwardRef)((function e(t,n){let{__unstableStateReducer:r=(e=>e),__unstableInputWidth:o,className:i,disabled:a=!1,hideLabelFromVision:s=!1,id:l,isPressEnterToChange:c=!1,label:u,labelPosition:d="top",onChange:p=Ee.noop,onValidate:f=Ee.noop,onKeyDown:m=Ee.noop,prefix:h,size:g="default",suffix:v,value:b,...y}=t;const[w,k]=(0,_.useState)(!1),x=function(t){const n=zo(e);return t||`inspector-input-control-${n}`}(l),E=Lr()("components-input-control",i);return(0,_.createElement)(Ak,{__unstableInputWidth:o,className:E,disabled:a,gap:3,hideLabelFromVision:s,id:x,isFocused:w,justify:"left",label:u,labelPosition:d,prefix:h,size:g,suffix:v},(0,_.createElement)(Hx,(0,dr.Z)({},y,{className:"components-input-control__input",disabled:a,id:x,isFocused:w,isPressEnterToChange:c,onChange:p,onKeyDown:m,onValidate:f,ref:n,setIsFocused:k,size:g,stateReducer:r,value:b})))})),Wx={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const Zx=e=>{let{hideHTMLArrows:t}=e;return t?Wx:""},Ux=da(Vx,{target:"ep48uk90"})(Zx,";");function $x(e){const t=Number(e);return isNaN(t)?0:t}function Gx(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>e+$x(t)),0)}function qx(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}function Kx(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=$x(e),i=$x(r),a=qx(r),s=Math.round(o/i)*i,l=(0,Ee.clamp)(s,t,n);return a?$x(l.toFixed(a)):l}var Yx=(0,_.forwardRef)((function(e,t){let{__unstableStateReducer:n=(e=>e),className:r,dragDirection:o="n",hideHTMLArrows:i=!1,isDragEnabled:a=!0,isShiftStepEnabled:s=!0,label:l,max:c=1/0,min:u=-1/0,required:d=!1,shiftStep:p=10,step:f=1,type:m="number",value:h,...g}=e;const v="any"===f,b=v?1:parseFloat(f),y=Kx(0,u,c,b),w=(e,t)=>v?Math.min(c,Math.max(u,e)):Kx(e,u,c,null!=t?t:b),k="number"===m?"off":null,x=Lr()("components-number-control",r);return(0,_.createElement)(Ux,(0,dr.Z)({autoComplete:k,inputMode:"numeric"},g,{className:x,dragDirection:o,hideHTMLArrows:i,isDragEnabled:a,label:l,max:c,min:u,ref:t,required:d,step:f,type:m,value:h,__unstableStateReducer:Dw(((e,t)=>{const{type:n,payload:r}=t,i=null==r?void 0:r.event,l=e.value;if(n===Aw||n===Tw){const t=i.shiftKey&&s,r=t?parseFloat(p)*b:b;let o=Fx(l)?y:l;null!=i&&i.preventDefault&&i.preventDefault(),n===Aw&&(o=Gx(o,r)),n===Tw&&(o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t,n)=>{const r=$x(t);return 0===n?r:e-r}),0)}(o,r)),e.value=w(o,t?r:null)}if(n===Sw&&a){const[t,n]=r.delta,i=r.shiftKey&&s,a=i?parseFloat(p)*b:b;let c,u;switch(o){case"n":u=n,c=-1;break;case"e":u=t,c=q()?-1:1;break;case"s":u=n,c=1;break;case"w":u=t,c=q()?1:-1}if(0!==u){u=Math.ceil(Math.abs(u))*Math.sign(u);const t=u*a*c;e.value=w(Gx(l,t),i?a:null)}}if(n===Nw||n===_w){const t=!1===d&&""===l;e.value=t?l:w(l)}return e}),n)}))}));const Xx=da("div",{target:"e1bagdl33"})({name:"100d0a9",styles:"box-sizing:border-box;position:relative"}),Jx=e=>{let{disableUnits:t}=e;const n=t?3:24;return(0,sy.iv)(_y({paddingRight:n})(),";","")};var Qx={name:"1y65o8",styles:"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}"};const e_=e=>{let{disableUnits:t}=e;return t?"":Qx},t_=da(Yx,{target:"e1bagdl32"})("&&&{input{appearance:none;-moz-appearance:textfield;display:block;width:100%;",e_,";",Jx,";}}"),n_=e=>(0,sy.iv)("appearance:none;background:transparent;border-radius:2px;border:none;box-sizing:border-box;color:",Wy.darkGray[500],";display:block;font-size:8px;line-height:1;letter-spacing:-0.5px;outline:none;padding:2px 1px;position:absolute;text-align-last:center;text-transform:uppercase;width:20px;",_y({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," ",_y({right:0})()," ",(e=>{let{selectSize:t}=e;return(0,sy.iv)({default:{height:28,lineHeight:"24px",minHeight:28,top:1},small:{height:22,lineHeight:"18px",minHeight:22,top:1}}[t],"","")})(e),";",""),r_=da("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",n_,";}"),o_=da("select",{target:"e1bagdl30"})("&&&{",n_,";cursor:pointer;border:1px solid transparent;&:hover{background-color:",Wy.lightGray[300],";}&:focus{border-color:",Wy.ui.borderFocus,";outline:2px solid transparent;outline-offset:0;}&:disabled{cursor:initial;&:hover{background-color:transparent;}}}");function i_(e){let{className:t,isUnitSelectTabbable:n=!0,onChange:r=Ee.noop,size:o="default",unit:i="px",units:a=hw,...s}=e;if(!a||!bw(a)||1===(null==a?void 0:a.length))return(0,_.createElement)(r_,{className:"components-unit-control__unit-label",selectSize:o},i);const l=Lr()("components-unit-control__select",t);return(0,_.createElement)(o_,(0,dr.Z)({className:l,onChange:e=>{const{value:t}=e.target,n=a.find((e=>e.value===t));r(t,{event:e,data:n})},selectSize:o,tabIndex:n?void 0:-1,value:i},s),a.map((e=>(0,_.createElement)("option",{value:e.value,key:e.value},e.label))))}const a_={initial:void 0,fallback:""};var s_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a_;const{initial:n,fallback:r}={...a_,...t},[o,i]=(0,_.useState)(e),a=Bx(e);(0,_.useEffect)((()=>{a&&o&&i(void 0)}),[a,o]);const s=jx([e,o,n],r),l=e=>{a||i(e)};return[s,l]},l_=(0,_.forwardRef)((function(e,t){let{__unstableStateReducer:n=(e=>e),autoComplete:r="off",className:o,disabled:i=!1,disableUnits:a=!1,isPressEnterToChange:s=!1,isResetValueOnUnitChange:l=!1,isUnitSelectTabbable:c=!0,label:u,onChange:d=Ee.noop,onUnitChange:p=Ee.noop,size:f="default",style:m,unit:h,units:g=hw,value:v,...b}=e;const y=(0,_.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:mw;if(!Array.isArray(n))return n;const r=[...n],[,o]=vw(e,t,mw);return o&&!r.some((e=>e.value===o))&&fw[o]&&r.unshift(fw[o]),r}(v,h,g)),[v,h,g]),[w,k]=vw(v,h,y),[x,E]=s_(h,{initial:k,fallback:""}),C=(0,_.useRef)(null),S=Lr()("components-unit-control",o),I=e=>{if(!isNaN(Number(e.currentTarget.value)))return void(C.current=null);const[t,n]=ww(e.currentTarget.value,y,w,x);if(C.current=t.toString(),s&&n!==x){const r={event:e,data:Array.isArray(y)?y.find((e=>e.value===n)):void 0};d(`${t}${n}`,r),p(n,r),E(n)}},T=I,N=a?null:(0,_.createElement)(i_,{"aria-label":U("Select unit"),disabled:i,isUnitSelectTabbable:c,onChange:(e,t)=>{const{data:n}=t;let r=`${w}${e}`;l&&void 0!==(null==n?void 0:n.default)&&(r=`${n.default}${e}`),d(r,t),p(e,t),E(e)},size:f,unit:x,units:y});let A=b.step;if(!A&&y){var P;const e=y.find((e=>e.value===x));A=null!==(P=null==e?void 0:e.step)&&void 0!==P?P:1}return(0,_.createElement)(Xx,{className:"components-unit-control-wrapper",style:m},(0,_.createElement)(t_,(0,dr.Z)({"aria-label":u,type:s?"text":"number"},(0,Ee.omit)(b,["children"]),{autoComplete:r,className:S,disabled:i,disableUnits:a,isPressEnterToChange:s,label:u,onBlur:T,onKeyDown:e=>{const{keyCode:t}=e;t===$r&&I(e)},onChange:(e,t)=>{""!==e?(e=ww(e,y,w,x).join(""),d(e,t)):d("",t)},ref:t,size:f,suffix:N,value:w,step:A,__unstableStateReducer:Dw(((e,t)=>(t.type===_w&&null!==C.current&&(e.value=C.current,C.current=null),e)),n)})))})),c_=function(e){let{icon:t,size:n=24,...r}=e;return(0,_.cloneElement)(t,{width:n,height:n,...r})};const u_=[{name:"default",label:U("Flow"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o}=t,i=kw({availableUnits:tw("spacing.units")||["%","px","em","rem","vw"]});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,_.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,_.createElement)(l_,{label:U("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:i}),(0,_.createElement)(c_,{icon:Xb})),(0,_.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,_.createElement)(l_,{label:U("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:i}),(0,_.createElement)(c_,{icon:Qb}))),(0,_.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,_.createElement)(ga,{variant:"secondary",isSmall:!0,disabled:!o&&!r,onClick:()=>n({contentSize:void 0,wideSize:void 0,inherit:!1})},U("Reset"))),(0,_.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},U("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function(){return null},save:function(e){var t,n;let{selector:r,layout:o={},style:i}=e;const{contentSize:a,wideSize:s}=o,l=null!==tw("spacing.blockGap"),c=null!==(t=null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap)&&void 0!==t?t:"var( --wp--style--block-gap )";let u=a||s?`\n\t\t\t\t\t${Xy(r,"> *")} {\n\t\t\t\t\t\tmax-width: ${null!=a?a:s};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\n\t\t\t\t\t${Xy(r,'> [data-align="wide"]')} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:a};\n\t\t\t\t\t}\n\n\t\t\t\t\t${Xy(r,'> [data-align="full"]')} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return u+=`\n\t\t\t${Xy(r,'> [data-align="left"]')} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-right: 2em;\n\t\t\t}\n\n\t\t\t${Xy(r,'> [data-align="right"]')} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-left: 2em;\n\t\t\t}\n\n\t\t`,l&&(u+=`\n\t\t\t\t${Xy(r,"> *")} {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t\t${Xy(r,"> * + *")} {\n\t\t\t\t\tmargin-top: ${c};\n\t\t\t\t}\n\t\t\t`),(0,_.createElement)("style",null,u)},getOrientation:()=>"vertical",getAlignments(e){const t=function(e){const{contentSize:t,wideSize:n}=e,r={},o=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return o.test(t)&&(r.none=R(U("Max %s wide"),t)),o.test(n)&&(r.wide=R(U("Max %s wide"),n)),r}(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}},lw];function d_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return u_.find((t=>t.name===e))}const p_={type:"default"},f_=(0,_.createContext)(p_),m_=f_.Provider;function h_(){return(0,_.useContext)(f_)}function g_(e){let{layout:t={},...n}=e;const r=d_(t.type);return r?(0,_.createElement)(r.save,(0,dr.Z)({layout:t},n)):null}const v_=["none","left","center","right","wide","full"],b_=["wide","full"];function y_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v_;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,cr.Z)((e=>{const{getSettings:t}=e(Mb),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),r=h_(),o=d_(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)return[];const{alignments:a=v_}=r,s=e.filter((e=>(r.alignments||t||!b_.includes(e))&&a.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?[]:s}const w_={none:{icon:Kb,title:U("None")},left:{icon:Yb,title:U("Align left")},center:{icon:Xb,title:U("Align center")},right:{icon:Jb,title:U("Align right")},wide:{icon:Qb,title:U("Wide width")},full:{icon:ey,title:U("Full width")}},k_={isAlternate:!0};var x_=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:i=!0}=e;const a=y_(r);if(!a.length)return null;function s(e){n([t,"none"].includes(e)?void 0:e)}const l=w_[t],c=w_.none,u=o?Gf:$b,d={popoverProps:k_,icon:l?l.icon:c.icon,label:U("Align"),toggleProps:{describedBy:U("Change alignment")}},p=o||um.isNative?{isCollapsed:o?i:void 0,controls:a.map((e=>{let{name:n}=e;return{...w_[n],isActive:t===n||!t&&"none"===n,role:i?"menuitemradio":void 0,onClick:()=>s(n)}}))}:{children:e=>{let{onClose:n}=e;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Gb,{className:"block-editor-block-alignment-control__menu-group"},a.map((e=>{let{name:r,info:o}=e;const{icon:i,title:a}=w_[r],l=r===t||!t&&"none"===r;return(0,_.createElement)(qb,{key:r,icon:i,iconPosition:"left",className:Lr()("components-dropdown-menu__menu-item",{"is-active":l}),isSelected:l,onClick:()=>{s(r),n()},role:"menuitemradio",info:o},a)}))))}};return(0,_.createElement)(u,(0,dr.Z)({},d,p))};function __(e){return(0,_.createElement)(x_,(0,dr.Z)({},e,{isToolbar:!1}))}const E_=["left","center","right","wide","full"],C_=["wide","full"];function S_(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)?E_.filter((t=>e.includes(t))):!0===e?[...E_]:[],!r||!0===e&&!n?(0,Ee.without)(t,...C_):t}const I_=ip((e=>t=>{const{name:n}=t,r=y_(S_(gl(n,"align"),vl(n,"alignWide",!0))).map((e=>{let{name:t}=e;return t}));return(0,_.createElement)(_.Fragment,null,!!r.length&&(0,_.createElement)(Ub,{group:"block",__experimentalShareWithChildBlocks:!0},(0,_.createElement)(__,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const o=ml(t.name);(null==o||null===(n=o.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:r})),(0,_.createElement)(e,t))}),"withToolbarControls"),T_=ip((e=>t=>{const{name:n,attributes:r}=t,{align:o}=r,i=y_(S_(gl(n,"align"),vl(n,"alignWide",!0)));if(void 0===o)return(0,_.createElement)(e,t);let a=t.wrapperProps;return i.some((e=>e.name===o))&&(a={...a,"data-align":o}),(0,_.createElement)(e,(0,dr.Z)({},t,{wrapperProps:a}))}));(0,V.KJ)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,Ee.has)(e.attributes,["align","type"])||vl(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...E_,""]}}),e})),(0,V.KJ)("editor.BlockListBlock","core/editor/align/with-data-align",T_),(0,V.KJ)("editor.BlockEdit","core/editor/align/with-toolbar-controls",I_),(0,V.KJ)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return S_(gl(t,"align"),vl(t,"alignWide",!0)).includes(r)&&(e.className=Lr()(`align${r}`,e.className)),e})),(0,V.KJ)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return(0,Ee.has)(e.attributes,["lock","type"])||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));var N_=(0,_.forwardRef)((function e(t,n){let{label:r,hideLabelFromVision:o,value:i,help:a,className:s,onChange:l,type:c="text",...u}=t;const d=`inspector-text-control-${zo(e)}`;return(0,_.createElement)(Ky,{label:r,hideLabelFromVision:o,id:d,help:a,className:s},(0,_.createElement)("input",(0,dr.Z)({className:"components-text-control__input",type:c,id:d,value:i,onChange:e=>l(e.target.value),"aria-describedby":a?d+"__help":void 0,ref:n},u)))})),A_=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));const P_=da(c_,{target:"etxm6pv0"})({name:"bqq7t3",styles:"width:1.4em;height:1.4em;margin:-0.2em 0.1em 0;vertical-align:middle;fill:currentColor"});var R_=(0,_.forwardRef)((function(e,t){let{href:n,children:r,className:o,rel:i="",...a}=e;i=(0,Ee.uniq)((0,Ee.compact)([...i.split(" "),"external","noreferrer","noopener"])).join(" ");const s=Lr()("components-external-link",o);return(0,_.createElement)("a",(0,dr.Z)({},a,{className:s,href:n,target:"_blank",rel:i,ref:t}),r,(0,_.createElement)(ma,{as:"span"},U("(opens in a new tab)")),(0,_.createElement)(P_,{icon:A_,className:"components-external-link__icon"}))})),L_=()=>Mr("(prefers-reduced-motion: reduce)"),O_=(0,_.createElement)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),M_=(0,_.createElement)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const D_=(0,_.forwardRef)(((e,t)=>{let{isOpened:n,icon:r,title:o,...i}=e;return o?(0,_.createElement)("h2",{className:"components-panel__body-title"},(0,_.createElement)(ga,(0,dr.Z)({className:"components-panel__body-toggle","aria-expanded":n,ref:t},i),(0,_.createElement)("span",{"aria-hidden":"true"},(0,_.createElement)(Jo,{className:"components-panel__arrow",icon:n?O_:M_})),o,r&&(0,_.createElement)(Jo,{icon:r,className:"components-panel__icon",size:20}))):null})),B_=(0,_.forwardRef)((function(e,t){let{buttonProps:n={},children:r,className:o,icon:i,initialOpen:a,onToggle:s=Ee.noop,opened:l,title:c,scrollAfterOpen:u=!0}=e;const[d,p]=s_(l,{initial:void 0===a||a}),f=(0,_.useRef)(),m=L_()?"auto":"smooth",h=(0,_.useRef)();h.current=u,zx((()=>{var e;d&&h.current&&null!==(e=f.current)&&void 0!==e&&e.scrollIntoView&&f.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:m})}),[d,m]);const g=Lr()("components-panel__body",o,{"is-opened":d});return(0,_.createElement)("div",{className:g,ref:Er([f,t])},(0,_.createElement)(D_,(0,dr.Z)({icon:i,isOpened:d,onClick:e=>{e.preventDefault();const t=!d;p(t),s(t)},title:c},n)),"function"==typeof r?r({opened:d}):d&&r)}));B_.displayName="PanelBody";var F_=B_;const j_=()=>{},z_=(0,_.createContext)({menuItems:{default:{},optional:{}},hasMenuItems:!1,isResetting:!1,shouldRenderPlaceholderItems:!1,registerPanelItem:j_,deregisterPanelItem:j_,flagItemCustomization:j_,areAllOptionalControlsHidden:!0}),H_=()=>(0,_.useContext)(z_);var V_={default:Pr("InspectorControls"),advanced:Pr("InspectorAdvancedControls"),dimensions:Pr("InspectorControlsDimensions"),typography:Pr("InspectorControlsTypography")},W_=n(34155);function Z_(e){var t;let{__experimentalGroup:n="default",children:r}=e;const o=zb(),i=null===(t=V_[n])||void 0===t?void 0:t.Fill;return i?o?(0,_.createElement)(hp,{document:document},(0,_.createElement)(i,null,(e=>{const t=(0,Ee.isEmpty)(e)?null:e;return(0,_.createElement)(z_.Provider,{value:t},r)}))):null:(void 0!==W_&&W_.env,null)}var U_=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M7 11.5h10V13H7z"})),$_=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),G_=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),q_=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const K_={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-start",justify:"flex-end"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},Y_={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-start",align:"flex-end"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{justify:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function X_(e){const{alignment:t="edge",children:n,direction:r,spacing:o=2,...i}=zi(e,"HStack"),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row";if((0,Ee.isNil)(e))return{};const n="column"===t?Y_:K_;return e in n?n[e]:{align:e}}(t,r);return Ey({children:function(e){return"string"==typeof e?[e]:_.Children.toArray(e).filter((e=>(0,_.isValidElement)(e)))}(n).map(((e,t)=>{const n=e.key||`hstack-${t}`;return Zi(e,["Spacer"])?(0,_.createElement)(Ty,(0,dr.Z)({isBlock:!0,key:n},e.props)):e})),direction:r,justify:"center",...a,...i,gap:o})}var J_=Vi((function(e,t){const n=X_(e);return(0,_.createElement)(fa,(0,dr.Z)({},n,{ref:t}))}),"HStack"),Q_=Vi((function(e,t){const n=function(e){const{as:t,level:n=2,...r}=zi(e,"Heading"),o=t||`h${n}`,i={};return"string"==typeof o&&"h"!==o[0]&&(i.role="heading",i["aria-level"]="string"==typeof n?parseInt(n):n),{...lk({color:Wy.darkGray.heading,size:ak(n),isBlock:!0,weight:Gw.fontWeightHeading,...r}),...i,as:o}}(e);return(0,_.createElement)(fa,(0,dr.Z)({},n,{ref:t}))}),"Heading");const eE={spacing:(0,sy.iv)("column-gap:",dy(4),";row-gap:",dy(6),";",""),item:{fullWidth:{name:"18iuzk9",styles:"grid-column:1/-1"}}},tE=(0,sy.iv)(eE.spacing,";border-top:",Gw.borderWidth," solid ",Wy.gray[200],";margin-top:-1px;padding:",dy(4),";",""),nE={name:"huufmu",styles:">div:not( :first-of-type ){display:none;}"},rE=(0,sy.iv)(eE.item.fullWidth," gap:",dy(2),";.components-dropdown-menu{margin:",dy(-1)," 0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:",dy(6),";}",""),oE={name:"1pmxm02",styles:"font-size:inherit;font-weight:500;line-height:normal;&&{margin:0;}"},iE=(0,sy.iv)(eE.item.fullWidth,"&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ",Zy,"{margin-bottom:0;",Uy,"{margin-bottom:0;}}",""),aE={name:"eivff4",styles:"display:none"},sE={name:"16gsvie",styles:"min-width:200px"},lE=()=>{},cE=e=>{let{items:t,onClose:n,toggleItem:r}=e;return t.length?(0,_.createElement)(Gb,null,t.map((e=>{let[t,o]=e;const i=o?U_:$_,a=o?R(U("Reset %s"),t):void 0;return(0,_.createElement)(qb,{key:t,icon:i,isSelected:!0,disabled:!o,label:a,onClick:()=>{r(t),n()},role:"menuitemcheckbox"},t)}))):null},uE=e=>{let{items:t,onClose:n,toggleItem:r}=e;return t.length?(0,_.createElement)(Gb,null,t.map((e=>{let[t,o]=e;const i=R(U(o?"Hide and reset %s":"Show %s"),t);return(0,_.createElement)(qb,{key:t,icon:o&&$_,isSelected:o,label:i,onClick:()=>{r(t),n()},role:"menuitemcheckbox"},t)}))):null};var dE=Vi(((e,t)=>{const{areAllOptionalControlsHidden:n,dropdownMenuClassName:r,hasMenuItems:o,headingClassName:i,label:a,menuItems:s,resetAll:l,toggleItem:c,...u}=function(e){const{className:t,...n}=zi(e,"ToolsPanelHeader"),r=Fi(),o=(0,_.useMemo)((()=>r(rE,t)),[t]),i=(0,_.useMemo)((()=>r(sE)),[]),a=(0,_.useMemo)((()=>r(oE)),[]),{menuItems:s,hasMenuItems:l,areAllOptionalControlsHidden:c}=H_();return{...n,areAllOptionalControlsHidden:c,dropdownMenuClassName:i,hasMenuItems:l,headingClassName:a,menuItems:s,className:o}}(e);if(!a)return null;const d=Object.entries((null==s?void 0:s.default)||{}),p=Object.entries((null==s?void 0:s.optional)||{}),f=n?G_:q_,m=$(n?"View and add options":"View options","Button label to reveal tool panel options");return(0,_.createElement)(J_,(0,dr.Z)({},u,{ref:t}),(0,_.createElement)(Q_,{level:2,className:i},a),o&&(0,_.createElement)(Uf,{icon:f,label:m,menuProps:{className:r},toggleProps:{isSmall:!0}},(e=>{let{onClose:t=lE}=e;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(cE,{items:d,onClose:t,toggleItem:c}),(0,_.createElement)(uE,{items:p,onClose:t,toggleItem:c}),(0,_.createElement)(Gb,null,(0,_.createElement)(qb,{variant:"tertiary",onClick:()=>{l(),t()}},U("Reset all"))))})))}),"ToolsPanelHeader");const pE=e=>{let{panelItems:t,shouldReset:n,currentMenuItems:r}=e;const o={default:{},optional:{}};return t.forEach((e=>{var t;let{hasValue:i,isShownByDefault:a,label:s}=e;const l=a?"default":"optional",c=null==r||null===(t=r[l])||void 0===t?void 0:t[s],u=void 0!==c?c:i();o[l][s]=!n&&u})),o};const fE={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};var mE=Vi((function(e,t){const n=function(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:a=3,isInline:s=!1,justify:l,rowGap:c,rows:u,templateColumns:d,templateRows:p,...f}=zi(e,"Grid"),m=uy(Array.isArray(i)?i:[i]),h=uy(Array.isArray(u)?u:[u]),g=d||!!i&&`repeat( ${m}, 1fr )`,v=p||!!u&&`repeat( ${h}, 1fr )`,b=Fi();return{...f,className:(0,_.useMemo)((()=>{const e=function(e){return e?fE[e]:{}}(n),i=(0,sy.iv)({alignItems:t,display:s?"inline-grid":"grid",gap:`calc( ${Gw.gridBase} * ${a} )`,gridTemplateColumns:g||void 0,gridTemplateRows:v||void 0,gridRowGap:c,gridColumnGap:o,justifyContent:l,verticalAlign:s?"middle":void 0,...e},"","");return b(i,r)}),[t,n,r,o,a,g,v,s,l,c])}}(e);return(0,_.createElement)(fa,(0,dr.Z)({},n,{ref:t}))}),"Grid"),hE=Vi(((e,t)=>{const{children:n,label:r,panelContext:o,resetAllItems:i,toggleItem:a,className:s}=function(e){const{className:t,resetAll:n,panelId:r,hasInnerWrapper:o,shouldRenderPlaceholderItems:i,...a}=zi(e,"ToolsPanel"),s=(0,_.useRef)(!1),l=s.current;(0,_.useEffect)((()=>{l&&(s.current=!1)}),[l]);const[c,u]=(0,_.useState)([]),[d,p]=(0,_.useState)({default:{},optional:{}});(0,_.useEffect)((()=>{p((e=>pE({panelItems:c,shouldReset:!1,currentMenuItems:e})))}),[c]);const[f,m]=(0,_.useState)(!1);(0,_.useEffect)((()=>{if(d.optional){const e=Object.entries(d.optional),t=e.length>0&&!e.some((e=>{let[,t]=e;return t}));m(t)}}),[d.optional]);const h=Fi(),g=(0,_.useMemo)((()=>{const e=(null==d?void 0:d.default)&&!!Object.keys(null==d?void 0:d.default).length,n=o&&(0,sy.iv)(">div:not( :first-of-type ){display:grid;grid-template-columns:","repeat( 2, 1fr )",";",eE.spacing," ",eE.item.fullWidth,";}","");return h(tE,n,!e&&f&&nE,t)}),[t,o,d,f]);return{...a,panelContext:{panelId:r,menuItems:d,registerPanelItem:e=>{u((t=>{const n=[...t],r=n.findIndex((t=>t.label===e.label));return-1!==r&&n.splice(r,1),[...n,e]}))},deregisterPanelItem:e=>{u((t=>{const n=[...t],r=n.findIndex((t=>t.label===e));return-1!==r&&n.splice(r,1),n}))},flagItemCustomization:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";p((n=>({...n,[t]:{...n[t],[e]:!0}})))},areAllOptionalControlsHidden:f,hasMenuItems:!!c.length,isResetting:s.current,shouldRenderPlaceholderItems:i},resetAllItems:()=>{"function"==typeof n&&(s.current=!0,n((()=>{const e=[];return c.forEach((t=>{t.resetAllFilter&&e.push(t.resetAllFilter)})),e})()));const e=pE({panelItems:c,shouldReset:!0});p(e)},toggleItem:e=>{const t=c.find((t=>t.label===e));if(!t)return;const n=t.isShownByDefault?"default":"optional",r={...d,[n]:{...d[n],[e]:!d[n][e]}};p(r)},className:g}}(e);return(0,_.createElement)(mE,{columns:2,className:s,ref:t},(0,_.createElement)(z_.Provider,{value:o},(0,_.createElement)(dE,{label:r,resetAll:i,toggleItem:a}),n))}),"ToolsPanel");const gE=e=>{if(!(0,Ee.isObject)(e)||Array.isArray(e))return e;const t=(0,Ee.pickBy)((0,Ee.mapValues)(e,gE),Ee.identity);return(0,Ee.isEmpty)(t)?void 0:t};function vE(e){let{children:t,group:n,label:r}=e;const{attributes:o,clientIds:i,panelId:a}=(0,cr.Z)((e=>{const{getBlockAttributes:t,getMultiSelectedBlockClientIds:n,getSelectedBlockClientId:r,hasMultiSelection:o}=e(Mb),i=r();if(o()){const e=n(),r=e.reduce(((e,n)=>(e[n]=t(n),e)),{});return{panelId:i,clientIds:e,attributes:r}}return{panelId:i,clientIds:[i],attributes:{[i]:t(i)}}}),[]),{updateBlockAttributes:s}=(0,ur.Z)(Mb);return(0,_.createElement)(hE,{className:`${n}-block-support-panel`,label:r,resetAll:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={};i.forEach((n=>{const{style:r}=o[n];let i={style:r};e.forEach((e=>{i={...i,...e(i)}})),i={...i,style:gE(i.style)},t[n]=i})),s(i,t,!0)},key:a,panelId:a,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0},t)}function bE(e){let{Slot:t,...n}=e;const r=(0,_.useContext)(z_);return(0,_.createElement)(t,(0,dr.Z)({},n,{fillProps:r}))}var yE=n(34155);function wE(e){var t;let{__experimentalGroup:n="default",bubblesVirtually:r=!0,label:o,...i}=e;const a=null===(t=V_[n])||void 0===t?void 0:t.Slot,s=wr(null==a?void 0:a.__unstableName);return a&&s?Boolean(s.fills&&s.fills.length)?o?(0,_.createElement)(vE,{group:n,label:o},(0,_.createElement)(bE,(0,dr.Z)({},i,{bubblesVirtually:r,Slot:a}))):(0,_.createElement)(a,(0,dr.Z)({},i,{bubblesVirtually:r})):null:(void 0!==yE&&yE.env,null)}const kE=Z_;kE.Slot=wE;const xE=e=>(0,_.createElement)(Z_,(0,dr.Z)({},e,{__experimentalGroup:"advanced"}));xE.Slot=e=>(0,_.createElement)(wE,(0,dr.Z)({},e,{__experimentalGroup:"advanced"})),xE.slotName="InspectorAdvancedControls";var _E=kE;const EE=/[\s#]/g,CE=ip((e=>t=>{if(vl(t.name,"anchor")&&t.isSelected){const n="web"===um.OS,r=(0,_.createElement)(N_,{className:"html-anchor-control",label:U("HTML anchor"),help:(0,_.createElement)(_.Fragment,null,U("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,_.createElement)(R_,{href:U("https://wordpress.org/support/article/page-jumps/")},U("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:U("Add an anchor"),onChange:e=>{e=e.replace(EE,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(e,t),n&&(0,_.createElement)(_E,{__experimentalGroup:"advanced"},r),!n&&"core/heading"===t.name&&(0,_.createElement)(_E,null,(0,_.createElement)(F_,{title:U("Heading settings")},r)))}return(0,_.createElement)(e,t)}),"withInspectorControl");(0,V.KJ)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,Ee.has)(e.attributes,["anchor","type"])||vl(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),(0,V.KJ)("editor.BlockEdit","core/editor/anchor/with-inspector-control",CE),(0,V.KJ)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return vl(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const SE=ip((e=>t=>vl(t.name,"customClassName",!0)&&t.isSelected?(0,_.createElement)(_.Fragment,null,(0,_.createElement)(e,t),(0,_.createElement)(_E,{__experimentalGroup:"advanced"},(0,_.createElement)(N_,{autoComplete:"off",label:U("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:U("Separate multiple classes with spaces.")}))):(0,_.createElement)(e,t)),"withInspectorControl");(0,V.KJ)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return vl(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,V.KJ)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",SE),(0,V.KJ)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return vl(t,"customClassName",!0)&&n.className&&(e.className=Lr()(e.className,n.className)),e})),(0,V.KJ)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return vl(t,"className",!0)&&("string"==typeof e.className?e.className=(0,Ee.uniq)([qc(t.name),...e.className.split(" ")]).join(" ").trim():e.className=qc(t.name)),e}));var IE=n(93361);function TE(e){return ip((t=>{const n="core/with-filters/"+e;let r;class o extends _.Component{constructor(){super(...arguments),void 0===r&&(r=(0,V.O)(e,t))}componentDidMount(){o.instances.push(this),1===o.instances.length&&((0,V.KG)("hookRemoved",n,a),(0,V.KG)("hookAdded",n,a))}componentWillUnmount(){o.instances=(0,Ee.without)(o.instances,this),0===o.instances.length&&((0,V.iR)("hookRemoved",n),(0,V.iR)("hookAdded",n))}render(){return(0,_.createElement)(r,this.props)}}o.instances=[];const i=(0,Ee.debounce)((()=>{r=(0,V.O)(e,t),o.instances.forEach((e=>{e.forceUpdate()}))}),16);function a(t){t===e&&i()}return o}),"withFilters")}var NE=ip((e=>e.prototype instanceof _.Component?class extends e{shouldComponentUpdate(e,t){return!(0,Ie.ZP)(e,this.props)||!(0,Ie.ZP)(t,this.state)}}:class extends _.Component{shouldComponentUpdate(e){return!(0,Ie.ZP)(e,this.props)}render(){return(0,_.createElement)(e,this.props)}}),"pure"),AE=e=>ip((t=>NE((n=>{const r=(0,cr.Z)(((t,r)=>e(t,n,r)));return(0,_.createElement)(t,(0,dr.Z)({},n,r))}))),"withSelect"),PE=n(78361),RE=e=>ip((t=>n=>{const r=((e,t)=>{const n=(0,cv.Z)(),r=(0,_.useRef)(e);return(0,PE.Z)((()=>{r.current=e})),(0,_.useMemo)((()=>{const e=r.current(n.dispatch,n);return(0,Ee.mapValues)(e,((e,t)=>("function"!=typeof e&&console.warn(`Property ${t} returned from dispatchMap in useDispatchWithMap must be a function.`),function(){return r.current(n.dispatch,n)[t](...arguments)})))}),[n,...t])})(((t,r)=>e(t,n,r)),[]);return(0,_.createElement)(t,(0,dr.Z)({},n,r))}),"withDispatch"),LE=Ee.flowRight,OE=e=>ip((t=>n=>e(n)?(0,_.createElement)(t,n):null),"ifCondition");const ME=(0,_.createContext)({});function DE(e){let{value:t,children:n}=e;const r=(0,_.useContext)(ME),o=(0,_.useMemo)((()=>({...r,...t})),[r,t]);return(0,_.createElement)(ME.Provider,{value:o,children:n})}var BE=ME;const FE={};var jE=TE("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=ml(n),o=(0,_.useContext)(BE),i=(0,_.useMemo)((()=>r&&r.usesContext?(0,Ee.pick)(o,r.usesContext):FE),[r,o]);if(!r)return null;const a=r.edit||r.save;if(r.apiVersion>1)return(0,_.createElement)(a,(0,dr.Z)({},e,{context:i}));const s=vl(r,"className",!0)?qc(n):null,l=Lr()(s,t.className);return(0,_.createElement)(a,(0,dr.Z)({},e,{context:i,className:l}))}));function zE(e){const{name:t,isSelected:n,clientId:r}=e,o={name:t,isSelected:n,clientId:r};return(0,_.createElement)(Fb,{value:(0,_.useMemo)((()=>o),Object.values(o))},(0,_.createElement)(jE,e))}var HE=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"}));const VE=new Set(["alert","status","log","marquee","timer"]);let WE=[],ZE=!1;let UE=0;function $E(e){let{bodyOpenClassName:t="modal-open",role:n="dialog",title:r=null,focusOnMount:o=!0,shouldCloseOnEsc:i=!0,shouldCloseOnClickOutside:a=!0,isDismissable:s,isDismissible:l=s||!0,aria:c={labelledby:null,describedby:null},onRequestClose:u,icon:d,closeButtonLabel:p,children:f,style:m,overlayClassName:h,className:g,contentLabel:v,onKeyDown:b,isFullScreen:y=!1}=e;const w=(0,_.useRef)(),k=zo($E),x=r?`components-modal-header-${k}`:c.labelledby,E=So(o),S=Co(),I=Io(),T=No(u);return(0,_.useEffect)((()=>(UE++,1===UE&&(function(e){if(ZE)return;const t=document.body.children;(0,Ee.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||VE.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),WE.push(t))})),ZE=!0}(w.current),document.body.classList.add(t)),()=>{UE--,0===UE&&(document.body.classList.remove(t),ZE&&((0,Ee.forEach)(WE,(e=>{e.removeAttribute("aria-hidden")})),WE=[],ZE=!1))})),[]),s&&He("isDismissable prop of the Modal component",{since:"5.4",alternative:"isDismissible prop (renamed) of the Modal component"}),(0,C.createPortal)((0,_.createElement)("div",{ref:w,className:Lr()("components-modal__screen-overlay",h),onKeyDown:function(e){i&&e.keyCode===Gr&&!e.defaultPrevented&&(e.preventDefault(),u&&u(e))}},(0,_.createElement)(hp,{document:document},(0,_.createElement)("div",(0,dr.Z)({className:Lr()("components-modal__frame",g,{"is-full-screen":y}),style:m,ref:Er([S,I,E]),role:n,"aria-label":v,"aria-labelledby":v?null:x,"aria-describedby":c.describedby,tabIndex:"-1"},a?T:{},{onKeyDown:b}),(0,_.createElement)("div",{className:"components-modal__content",role:"document"},(0,_.createElement)("div",{className:"components-modal__header"},(0,_.createElement)("div",{className:"components-modal__header-heading-container"},d&&(0,_.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},d),r&&(0,_.createElement)("h1",{id:x,className:"components-modal__header-heading"},r)),l&&(0,_.createElement)(ga,{onClick:u,icon:HE,label:p||U("Close dialog")})),f)))),document.body)}var GE=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),qE=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,_.createElement)("div",{className:Lr()(t,"block-editor-warning")},(0,_.createElement)("div",{className:"block-editor-warning__contents"},(0,_.createElement)("p",{className:"block-editor-warning__message"},r),(_.Children.count(n)>0||o)&&(0,_.createElement)("div",{className:"block-editor-warning__actions"},_.Children.count(n)>0&&_.Children.map(n,((e,t)=>(0,_.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,_.createElement)(Uf,{className:"block-editor-warning__secondary",icon:GE,label:U("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,_.createElement)(Gb,null,o.map(((e,t)=>(0,_.createElement)(qb,{onClick:e.onClick,key:t},e.title)))))))))},KE=n(36884);function YE(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:i,className:a}=e;return(0,_.createElement)("div",{className:a},(0,_.createElement)("div",{className:"block-editor-block-compare__content"},(0,_.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,_.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,_.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,_.createElement)(Sc,null,Qs(r)))),(0,_.createElement)("div",{className:"block-editor-block-compare__action"},(0,_.createElement)(ga,{variant:"secondary",tabIndex:"0",onClick:o},i)))}var XE=function(e){let{block:t,onKeep:n,onConvert:r,convertor:o,convertButtonText:i}=e;const a=(s=o(t),(0,Ee.castArray)(s).map((e=>Jc(e.name,e.attributes,e.innerBlocks))).join(""));var s;const l=(c=t.originalContent,u=a,(0,KE.Kx)(c,u).map(((e,t)=>{const n=Lr()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,_.createElement)("span",{key:t,className:n},e.value)})));var c,u;return(0,_.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,_.createElement)(YE,{title:U("Current"),className:"block-editor-block-compare__current",action:n,actionText:U("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,_.createElement)(YE,{title:U("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:i,rawContent:l,renderedContent:a}))};const JE=e=>Ad({HTML:e.originalContent});var QE=LE([AE(((e,t)=>{let{clientId:n}=t;return{block:e(Mb).getBlock(n)}})),RE(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(Mb);return{convertToClassic(){r(n.clientId,(e=>Tl("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>Tl("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,JE(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return Tl(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:o,block:i}=e;const a=!!ml("core/html"),[s,l]=(0,_.useState)(!1),c=(0,_.useCallback)((()=>l(!0)),[]),u=(0,_.useCallback)((()=>l(!1)),[]),d=(0,_.useMemo)((()=>[{title:$("Resolve","imperative verb"),onClick:c},a&&{title:U("Convert to HTML"),onClick:t},{title:U("Convert to Classic Block"),onClick:r}].filter(Boolean)),[c,t,r]);return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(qE,{actions:[(0,_.createElement)(ga,{key:"recover",onClick:o,variant:"primary"},U("Attempt Block Recovery"))],secondaryActions:d},U("This block contains unexpected or invalid content.")),s&&(0,_.createElement)($E,{title:U("Resolve Block"),onRequestClose:u,className:"block-editor-block-compare"},(0,_.createElement)(XE,{block:i,onKeep:t,onConvert:n,convertor:JE,convertButtonText:U("Convert to Blocks")})))}));const eC=(0,_.createElement)(qE,{className:"block-editor-block-list__block-crash-warning"},U("This block has encountered an error and cannot be previewed."));var tC=()=>eC;class nC extends _.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 rC=nC,oC=n(94773),iC=function(e){let{clientId:t}=e;const[n,r]=(0,_.useState)(""),o=(0,cr.Z)((e=>e(Mb).getBlock(t)),[t]),{updateBlock:i}=(0,ur.Z)(Mb);return(0,_.useEffect)((()=>{r(eu(o))}),[o]),(0,_.createElement)(oC.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=ml(o.name);if(!e)return;const a=Xu(e,n,o.attributes),s=n||Jc(e,a),l=!n||function(e,t,n){const r=Wl(e),o={name:r.name,attributes:t,innerBlocks:[],originalContent:n},[i]=Mu(o,r);return i}(e,a,s);i(t,{attributes:a,originalContent:s,isValid:l}),n||r({content:s})},onChange:e=>r(e.target.value)})};let aC=xC();const sC=e=>bC(e,aC);let lC=xC();sC.write=e=>bC(e,lC);let cC=xC();sC.onStart=e=>bC(e,cC);let uC=xC();sC.onFrame=e=>bC(e,uC);let dC=xC();sC.onFinish=e=>bC(e,dC);let pC=[];sC.setTimeout=(e,t)=>{let n=sC.now()+t,r=()=>{let e=pC.findIndex((e=>e.cancel==r));~e&&pC.splice(e,1),gC-=~e?1:0},o={time:n,handler:e,cancel:r};return pC.splice(fC(n),0,o),gC+=1,yC(),o};let fC=e=>~(~pC.findIndex((t=>t.time>e))||~pC.length);sC.cancel=e=>{cC.delete(e),uC.delete(e),aC.delete(e),lC.delete(e),dC.delete(e)},sC.sync=e=>{vC=!0,sC.batchedUpdates(e),vC=!1},sC.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,sC.onStart(n)}return r.handler=e,r.cancel=()=>{cC.delete(n),t=null},r};let mC="undefined"!=typeof window?window.requestAnimationFrame:()=>{};sC.use=e=>mC=e,sC.now="undefined"!=typeof performance?()=>performance.now():Date.now,sC.batchedUpdates=e=>e(),sC.catch=console.error,sC.frameLoop="always",sC.advance=()=>{"demand"!==sC.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):kC()};let hC=-1,gC=0,vC=!1;function bC(e,t){vC?(t.delete(e),e(0)):(t.add(e),yC())}function yC(){hC<0&&(hC=0,"demand"!==sC.frameLoop&&mC(wC))}function wC(){~hC&&(mC(wC),sC.batchedUpdates(kC))}function kC(){let e=hC;hC=sC.now();let t=fC(hC);t&&(_C(pC.splice(0,t),(e=>e.handler())),gC-=t),cC.flush(),aC.flush(e?Math.min(64,hC-e):16.667),uC.flush(),lC.flush(),dC.flush(),gC||(hC=-1)}function xC(){let e=new Set,t=e;return{add(n){gC+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(gC-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,gC-=t.size,_C(t,(t=>t(n)&&e.add(t))),gC+=e.size,t=e)}}}function _C(e,t){e.forEach((e=>{try{t(e)}catch(e){sC.catch(e)}}))}function EC(){}const CC={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 SC(e,t){if(CC.arr(e)){if(!CC.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}const IC=(e,t)=>e.forEach(t);function TC(e,t,n){if(CC.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)}const NC=e=>CC.und(e)?[]:CC.arr(e)?e:[e];function AC(e,t){if(e.size){const n=Array.from(e);e.clear(),IC(n,t)}}const PC=(e,...t)=>AC(e,(e=>e(...t)));let RC,LC,OC=null,MC=!1,DC=EC;var BC=Object.freeze({__proto__:null,get createStringInterpolator(){return RC},get to(){return LC},get colors(){return OC},get skipAnimation(){return MC},get willAdvance(){return DC},assign:e=>{e.to&&(LC=e.to),e.now&&(sC.now=e.now),void 0!==e.colors&&(OC=e.colors),null!=e.skipAnimation&&(MC=e.skipAnimation),e.createStringInterpolator&&(RC=e.createStringInterpolator),e.requestAnimationFrame&&sC.use(e.requestAnimationFrame),e.batchedUpdates&&(sC.batchedUpdates=e.batchedUpdates),e.willAdvance&&(DC=e.willAdvance),e.frameLoop&&(sC.frameLoop=e.frameLoop)}});const FC=new Set;let jC=[],zC=[],HC=0;const VC={get idle(){return!FC.size&&!jC.length},start(e){HC>e.priority?(FC.add(e),sC.onStart(WC)):(ZC(e),sC($C))},advance:$C,sort(e){if(HC)sC.onFrame((()=>VC.sort(e)));else{const t=jC.indexOf(e);~t&&(jC.splice(t,1),UC(e))}},clear(){jC=[],FC.clear()}};function WC(){FC.forEach(ZC),FC.clear(),sC($C)}function ZC(e){jC.includes(e)||UC(e)}function UC(e){jC.splice(function(t,n){const r=t.findIndex((t=>t.priority>e.priority));return r<0?t.length:r}(jC),0,e)}function $C(e){const t=zC;for(let n=0;n<jC.length;n++){const r=jC[n];HC=r.priority,r.idle||(DC(r),r.advance(e),r.idle||t.push(r))}return HC=0,zC=jC,zC.length=0,jC=t,jC.length>0}const GC="[-+]?\\d*\\.?\\d+",qC=GC+"%";function KC(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const YC=new RegExp("rgb"+KC(GC,GC,GC)),XC=new RegExp("rgba"+KC(GC,GC,GC,GC)),JC=new RegExp("hsl"+KC(GC,qC,qC)),QC=new RegExp("hsla"+KC(GC,qC,qC,GC)),eS=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,tS=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,nS=/^#([0-9a-fA-F]{6})$/,rS=/^#([0-9a-fA-F]{8})$/;function oS(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 iS(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=oS(o,r,e+1/3),a=oS(o,r,e),s=oS(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function aS(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function sS(e){return(parseFloat(e)%360+360)%360/360}function lS(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function cS(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function uS(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=nS.exec(e))?parseInt(t[1]+"ff",16)>>>0:OC&&void 0!==OC[e]?OC[e]:(t=YC.exec(e))?(aS(t[1])<<24|aS(t[2])<<16|aS(t[3])<<8|255)>>>0:(t=XC.exec(e))?(aS(t[1])<<24|aS(t[2])<<16|aS(t[3])<<8|lS(t[4]))>>>0:(t=eS.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=rS.exec(e))?parseInt(t[1],16)>>>0:(t=tS.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=JC.exec(e))?(255|iS(sS(t[1]),cS(t[2]),cS(t[3])))>>>0:(t=QC.exec(e))?(iS(sS(t[1]),cS(t[2]),cS(t[3]))|lS(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const dS=(e,t,n)=>{if(CC.fun(e))return e;if(CC.arr(e))return dS({range:e,output:t,extrapolate:n});if(CC.str(e.output[0]))return RC(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=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,a,s,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return r===o?r:t===n?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,c)}(e,i[t],i[t+1],o[t],o[t+1],l,a,s,r.map)}};function pS(){return(pS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const fS=Symbol.for("FluidValue.get"),mS=Symbol.for("FluidValue.observers"),hS=e=>Boolean(e&&e[fS]),gS=e=>e&&e[fS]?e[fS]():e,vS=e=>e[mS]||null;function bS(e,t){let n=e[mS];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class yS{constructor(e){if(this[fS]=void 0,this[mS]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");wS(this,e)}}const wS=(e,t)=>_S(e,fS,t);function kS(e,t){if(e[fS]){let n=e[mS];n||_S(e,mS,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function xS(e,t){let n=e[mS];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[mS]=null,e.observerRemoved&&e.observerRemoved(r,t)}}const _S=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ES=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,CS=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,SS=new RegExp(`(${ES.source})(%|[a-z]+)`,"i"),IS=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,TS=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,NS=e=>{const[t,n]=AS(e);if(!t)return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&TS.test(n)?NS(n):n||e},AS=e=>{const t=TS.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]};let PS;const RS=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,LS=e=>{PS||(PS=OC?new RegExp(`(${Object.keys(OC).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>gS(e).replace(TS,NS).replace(CS,uS).replace(PS,uS))),n=t.map((e=>e.match(ES).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]})))).map((t=>dS(pS({},e,{output:t}))));return e=>{var n;const o=!SS.test(t[0])&&(null==(n=t.find((e=>SS.test(e))))?void 0:n.replace(ES,""));let i=0;return t[0].replace(ES,(()=>`${r[i++](e)}${o||""}`)).replace(IS,RS)}},OS="react-spring: ",MS=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${OS}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},DS=MS(console.warn),BS=MS(console.warn);function FS(e){return CC.str(e)&&("#"==e[0]||/\d/.test(e)||TS.test(e)||e in(OC||{}))}const jS=e=>(0,_.useEffect)(e,zS),zS=[];function HS(){const e=(0,_.useState)()[1],t=(0,_.useState)(VS)[0];return jS(t.unmount),()=>{t.current&&e({})}}function VS(){const e={current:!0,unmount:()=>()=>{e.current=!1}};return e}function WS(e){const t=(0,_.useRef)();return(0,_.useEffect)((()=>{t.current=e})),t.current}const ZS="undefined"!=typeof window&&window.document&&window.document.createElement?_.useLayoutEffect:_.useEffect,US=Symbol.for("Animated:node"),$S=e=>e&&e[US],GS=(e,t)=>{return n=e,r=US,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},qS=e=>e&&e[US]&&e[US].getPayload();class KS{constructor(){this.payload=void 0,GS(this,this)}getPayload(){return this.payload||[]}}class YS extends KS{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,CC.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new YS(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return CC.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,CC.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class XS extends YS{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=dS({output:[e,e]})}static create(e){return new XS(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(CC.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=dS({output:[this.getValue(),e]})),this._value=0,super.reset()}}const JS={dependencies:null};class QS extends KS{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return TC(this.source,((n,r)=>{var o;(o=n)&&o[US]===o?t[r]=n.getValue(e):hS(n)?t[r]=gS(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&IC(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return TC(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){JS.dependencies&&hS(e)&&JS.dependencies.add(e);const t=qS(e);t&&IC(t,(e=>this.add(e)))}}class eI extends QS{constructor(e){super(e)}static create(e){return new eI(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(tI)),!0)}}function tI(e){return(FS(e)?XS:YS).create(e)}function nI(e){const t=$S(e);return t?t.constructor:CC.arr(e)?eI:FS(e)?XS:YS}function rI(){return(rI=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const oI=(e,t)=>{const n=!CC.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,_.forwardRef)(((r,o)=>{const i=(0,_.useRef)(null),a=n&&(0,_.useCallback)((e=>{i.current=function(e,t){return e&&(CC.fun(e)?e(t):e.current=t),t}(o,e)}),[o]),[s,l]=function(e,t){const n=new Set;return JS.dependencies=n,e.style&&(e=rI({},e,{style:t.createAnimatedStyle(e.style)})),e=new QS(e),JS.dependencies=null,[e,n]}(r,t),c=HS(),u=()=>{const e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},d=new iI(u,l),p=(0,_.useRef)();ZS((()=>{const e=p.current;p.current=d,IC(l,(e=>kS(e,d))),e&&(IC(e.deps,(t=>xS(t,e))),sC.cancel(e.update))})),(0,_.useEffect)(u,[]),jS((()=>()=>{const e=p.current;IC(e.deps,(t=>xS(t,e)))}));const f=t.getComponentProps(s.getValue());return _.createElement(e,rI({},f,{ref:a}))}))};class iI{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&sC.write(this.update)}}const aI=Symbol.for("AnimatedComponent"),sI=e=>CC.str(e)?e:e&&CC.str(e.displayName)?e.displayName:CC.fun(e)&&e.name||null;function lI(){return(lI=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function cI(e,...t){return CC.fun(e)?e(...t):e}const uI=(e,t)=>!0===e||!!(t&&e&&(CC.fun(e)?e(t):NC(e).includes(t))),dI=(e,t)=>CC.obj(e)?t&&e[t]:e,pI=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,fI=e=>e,mI=(e,t=fI)=>{let n=hI;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);CC.und(n)||(r[o]=n)}return r},hI=["config","onProps","onStart","onChange","onPause","onResume","onRest"],gI={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 vI(e){const t=function(e){const t={};let n=0;if(TC(e,((e,r)=>{gI[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return TC(e,((e,r)=>r in t||(n[r]=e))),n}return lI({},e)}function bI(e){return e=gS(e),CC.arr(e)?e.map(bI):FS(e)?BC.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function yI(e){for(const t in e)return!0;return!1}function wI(e){return CC.fun(e)||CC.arr(e)&&CC.obj(e[0])}function kI(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function xI(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}Math.PI,Math.PI;const _I=lI({},{tension:170,friction:26},{mass:1,damping:1,easing:e=>e,clamp:!1});class EI{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,_I)}}function CI(e,t){if(CC.und(t.decay)){const n=!CC.und(t.tension)||!CC.und(t.friction);!n&&CC.und(t.frequency)&&CC.und(t.damping)&&CC.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const SI=[];class II{constructor(){this.changed=!1,this.values=SI,this.toValues=null,this.fromValues=SI,this.to=void 0,this.from=void 0,this.config=new EI,this.immediate=!1}}function TI(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((a,s)=>{var l;let c,u,d=uI(null!=(l=n.cancel)?l:null==r?void 0:r.cancel,t);if(d)m();else{CC.und(n.pause)||(o.paused=uI(n.pause,t));let e=null==r?void 0:r.pause;!0!==e&&(e=o.paused||uI(e,t)),c=cI(n.delay||0,t),e?(o.resumeQueue.add(f),i.pause()):(i.resume(),f())}function p(){o.resumeQueue.add(f),o.timeouts.delete(u),u.cancel(),c=u.time-sC.now()}function f(){c>0&&!BC.skipAnimation?(o.delayed=!0,u=sC.setTimeout(m,c),o.pauseQueue.add(p),o.timeouts.add(u)):m()}function m(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(p),o.timeouts.delete(u),e<=(o.cancelId||0)&&(d=!0);try{i.start(lI({},n,{callId:e,cancel:d}),a)}catch(e){s(e)}}}))}const NI=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?RI(e.get()):t.every((e=>e.noop))?AI(e.get()):PI(e.get(),t.every((e=>e.finished))),AI=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),PI=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),RI=e=>({value:e,cancelled:!0,finished:!1});function LI(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:l}=n;return i||e!==s||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=mI(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),f=e=>{const t=o<=(n.cancelId||0)&&RI(r)||o!==n.asyncId&&PI(r,!1);if(t)throw e.result=t,d(e),e},m=(e,t)=>{const i=new MI,a=new DI;return(async()=>{if(BC.skipAnimation)throw OI(n),a.result=PI(r,!1),d(a),a;f(i);const s=CC.obj(e)?lI({},e):lI({},t,{to:e});s.parentId=o,TC(c,((e,t)=>{CC.und(s[t])&&(s[t]=e)}));const l=await r.start(s);return f(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};let h;if(BC.skipAnimation)return OI(n),PI(r,!1);try{let t;t=CC.arr(e)?(async e=>{for(const t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),p]),h=PI(r.get(),!0,!1)}catch(e){if(e instanceof MI)h=e.result;else{if(!(e instanceof DI))throw e;h=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?l:void 0)}return CC.fun(a)&&sC.batchedUpdates((()=>{a(h,r,r.item)})),h})():l}function OI(e,t){AC(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class MI 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."),this.result=void 0}}class DI extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const BI=e=>e instanceof jI;let FI=1;class jI extends yS{constructor(...e){super(...e),this.id=FI++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=$S(this);return e&&e.getValue()}to(...e){return BC.to(this,e)}interpolate(...e){return DS(`${OS}The "interpolate" function is deprecated in v9 (use "to" instead)`),BC.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){bS(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||VC.sort(this),bS(this,{type:"priority",parent:this,priority:e})}}const zI=Symbol.for("SpringPhase"),HI=e=>(1&e[zI])>0,VI=e=>(2&e[zI])>0,WI=e=>(4&e[zI])>0,ZI=(e,t)=>t?e[zI]|=3:e[zI]&=-3,UI=(e,t)=>t?e[zI]|=4:e[zI]&=-5;class $I extends jI{constructor(e,t){if(super(),this.key=void 0,this.animation=new II,this.queue=void 0,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,!CC.und(e)||!CC.und(t)){const n=CC.obj(e)?lI({},e):lI({},t,{from:e});CC.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(VI(this)||this._state.asyncTo)||WI(this)}get goal(){return gS(this.animation.to)}get velocity(){const e=$S(this);return e instanceof YS?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return HI(this)}get isAnimating(){return VI(this)}get isPaused(){return WI(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{config:o,toValues:i}=r;const a=qS(r.to);!a&&hS(r.to)&&(i=NC(gS(r.to))),r.values.forEach(((s,l)=>{if(s.done)return;const c=s.constructor==XS?1:a?a[l].lastPosition:i[l];let u=r.immediate,d=c;if(!u){if(d=s.lastPosition,o.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=r.fromValues[l],i=null!=s.v0?s.v0:s.v0=CC.arr(o.velocity)?o.velocity[l]:o.velocity;let a;if(CC.und(o.duration))if(o.decay){const e=!0===o.decay?.998:o.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<.1,a=i*r}else{a=null==s.lastVelocity?i:s.lastVelocity;const t=o.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n))),r=o.restVelocity||t/10,l=o.clamp?0:o.bounce,p=!CC.und(l),f=n==c?s.v0>0:n<c;let m,h=!1;const g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(m=Math.abs(a)>r,m||(u=Math.abs(c-d)<=t,!u));++e)p&&(h=d==c||d>c==f,h&&(a=-a*l,d=c)),a+=(1e-6*-o.tension*(d-c)+.001*-o.friction*a)/o.mass*g,d+=a*g}else{let r=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,s.durationProgress>0&&(s.elapsedTime=o.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(o.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+o.easing(r)*(c-n),a=(d-s.lastPosition)/e,u=1==r}s.lastVelocity=a,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,o.round)&&(n=!0)}));const s=$S(this),l=s.getValue();if(t){const e=gS(r.to);l===e&&!n||o.decay?n&&o.decay&&this._onChange(l):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return sC.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(VI(this)){const{to:e,config:t}=this.animation;sC.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 CC.und(e)?(n=this.queue||[],this.queue=[]):n=[CC.obj(e)?e:lI({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>NI(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),OI(this._state,e&&this._lastCallId),sC.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=CC.obj(n)?n[t]:n,(null==n||wI(n))&&(n=void 0),r=CC.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return HI(this)||(e.reverse&&([n,r]=[r,n]),r=gS(r),CC.und(r)?$S(this)||this._set(n):this._set(r)),o}_update(e,t){let n=lI({},e);const{key:r,defaultProps:o}=this;n.default&&Object.assign(o,mI(n,((e,t)=>/^on/.test(t)?dI(e,r):e))),QI(this,n,"onProps"),eT(this,"onProps",n,this);const i=this._prepareNode(n);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 a=this._state;return TI(++this._lastCallId,{key:r,props:n,defaultProps:o,state:a,actions:{pause:()=>{WI(this)||(UI(this,!0),PC(a.pauseQueue),eT(this,"onPause",PI(this,GI(this,this.animation.to)),this))},resume:()=>{WI(this)&&(UI(this,!1),VI(this)&&this._resume(),PC(a.resumeQueue),eT(this,"onResume",PI(this,GI(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=qI(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(RI(this));const r=!CC.und(e.to),o=!CC.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(RI(this));this._lastToId=t.callId}const{key:i,defaultProps:a,animation:s}=this,{to:l,from:c}=s;let{to:u=l,from:d=c}=e;!o||r||t.default&&!CC.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!SC(d,c);p&&(s.from=d),d=gS(d);const f=!SC(u,l);f&&this._focus(u);const m=wI(t.to),{config:h}=s,{decay:g,velocity:v}=h;(r||o)&&(h.velocity=0),t.config&&!m&&function(e,t,n){n&&(CI(n=lI({},n),t),t=lI({},n,t)),CI(e,t),Object.assign(e,t);for(const t in _I)null==e[t]&&(e[t]=_I[t]);let{mass:r,frequency:o,damping:i}=e;CC.und(o)||(o<.01&&(o=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/o,2)*r,e.friction=4*Math.PI*i*r/o)}(h,cI(t.config,i),t.config!==a.config?cI(a.config,i):void 0);let b=$S(this);if(!b||CC.und(u))return n(PI(this,!0));const y=CC.und(t.reset)?o&&!t.default:!CC.und(d)&&uI(t.reset,i),w=y?d:this.get(),k=bI(u),x=CC.num(k)||CC.arr(k)||FS(k),_=!m&&(!x||uI(a.immediate||t.immediate,i));if(f){const e=nI(u);if(e!==b.constructor){if(!_)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(k)}}const E=b.constructor;let C=hS(u),S=!1;if(!C){const e=y||!HI(this)&&p;(f||e)&&(S=SC(bI(w),k),C=!S),(SC(s.immediate,_)||_)&&SC(h.decay,g)&&SC(h.velocity,v)||(C=!0)}if(S&&VI(this)&&(s.changed&&!y?C=!0:C||this._stop(l)),!m&&((C||hS(l))&&(s.values=b.getPayload(),s.toValues=hS(u)?null:E==XS?[1]:NC(k)),s.immediate!=_&&(s.immediate=_,_||y||this._set(l)),C)){const{onRest:e}=s;IC(JI,(e=>QI(this,t,e)));const r=PI(this,GI(this,l));PC(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&sC.batchedUpdates((()=>{s.changed=!y,null==e||e(r,this),y?cI(a.onRest,r):null==s.onStart||s.onStart(r,this)}))}y&&this._set(w),m?n(LI(t.to,t,this._state,this)):C?this._start():VI(this)&&!f?this._pendingCalls.add(n):n(AI(w))}_focus(e){const t=this.animation;e!==t.to&&(vS(this)&&this._detach(),t.to=e,vS(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;hS(t)&&(kS(t,this),BI(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;hS(e)&&xS(e,this)}_set(e,t=!0){const n=gS(e);if(!CC.und(n)){const e=$S(this);if(!e||!SC(n,e.getValue())){const r=nI(n);e&&e.constructor==r?e.setValue(n):GS(this,r.create(n)),e&&sC.batchedUpdates((()=>{this._onChange(n,t)}))}}return $S(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,eT(this,"onStart",PI(this,GI(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),cI(this.animation.onChange,e,this)),cI(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;$S(this).reset(gS(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),VI(this)||(ZI(this,!0),WI(this)||this._resume())}_resume(){BC.skipAnimation?this.finish():VC.start(this)}_stop(e,t){if(VI(this)){ZI(this,!1);const n=this.animation;IC(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),bS(this,{type:"idle",parent:this});const r=t?RI(this.get()):PI(this.get(),GI(this,null!=e?e:n.to));PC(this._pendingCalls,r),n.changed&&(n.changed=!1,eT(this,"onRest",r,this))}}}function GI(e,t){const n=bI(t);return SC(bI(e.get()),n)}function qI(e,t=e.loop,n=e.to){let r=cI(t);if(r){const o=!0!==r&&vI(r),i=(o||e).reverse,a=!o||o.reset;return KI(lI({},e,{loop:t,default:!1,pause:void 0,to:!i||wI(n)?n:void 0,from:a?e.from:void 0,reset:a},o))}}function KI(e){const{to:t,from:n}=e=vI(e),r=new Set;return CC.obj(t)&&XI(t,r),CC.obj(n)&&XI(n,r),e.keys=r.size?Array.from(r):null,e}function YI(e){const t=KI(e);return CC.und(t.default)&&(t.default=mI(t)),t}function XI(e,t){TC(e,((e,n)=>null!=e&&t.add(n)))}const JI=["onStart","onRest","onChange","onPause","onResume"];function QI(e,t,n){e.animation[n]=t[n]!==pI(t,n)?dI(t[n],e.key):void 0}function eT(e,t,...n){var r,o,i,a;null==(r=(o=e.animation)[t])||r.call(o,...n),null==(i=(a=e.defaultProps)[t])||i.call(a,...n)}const tT=["onStart","onChange","onRest"];let nT=1;class rT{constructor(e,t){this.id=nT++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,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(lI({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];CC.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(KI(e)),this}start(e){let{queue:t}=this;return e?t=NC(e).map(KI):this.queue=[],this._flush?this._flush(this,t):(uT(this,t),oT(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;IC(NC(t),(t=>n[t].stop(!!e)))}else OI(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(CC.und(e))this.start({pause:!0});else{const t=this.springs;IC(NC(e),(e=>t[e].pause()))}return this}resume(e){if(CC.und(e))this.start({pause:!1});else{const t=this.springs;IC(NC(e),(e=>t[e].resume()))}return this}each(e){TC(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,AC(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&t.size&&AC(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),i&&(this._started=!1,AC(n,(([e,t])=>{t.value=a,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)}sC.onFrame(this._onFrame)}}function oT(e,t){return Promise.all(t.map((t=>iT(e,t)))).then((t=>NI(e,t)))}async function iT(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:l}=t,c=CC.obj(t.default)&&t.default;a&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=CC.arr(o)||CC.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):IC(tT,(n=>{const r=t[n];if(CC.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 d=e._state;t.pause===!d.paused?(d.paused=t.pause,PC(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),f=!0===t.cancel||!0===pI(t,"cancel");(u||f&&d.asyncId)&&p.push(TI(++e._lastAsyncId,{props:t,state:d,actions:{pause:EC,resume:EC,start(t,n){f?(OI(d,e._lastAsyncId),n(RI(e))):(t.onRest=s,n(LI(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const m=NI(e,await Promise.all(p));if(a&&m.finished&&(!n||!m.noop)){const n=qI(t,a,o);if(n)return uT(e,[n]),iT(e,n,!0)}return l&&sC.batchedUpdates((()=>l(m,e,e.item))),m}function aT(e,t){const n=lI({},e.springs);return t&&IC(NC(t),(e=>{CC.und(e.keys)&&(e=KI(e)),CC.obj(e.to)||(e=lI({},e,{to:void 0})),cT(n,e,(e=>lT(e)))})),sT(e,n),n}function sT(e,t){TC(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,kS(t,e))}))}function lT(e,t){const n=new $I;return n.key=e,t&&kS(n,t),n}function cT(e,t,n){t.keys&&IC(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function uT(e,t){IC(t,(t=>{cT(e.springs,t,(t=>lT(t,e)))}))}const dT=["children"],pT=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,dT);const r=(0,_.useContext)(fT),o=n.pause||!!r.pause,i=n.immediate||!!r.immediate;n=function(e,t){const[n]=(0,_.useState)((()=>({inputs:t,result:e()}))),r=(0,_.useRef)(),o=r.current;let i=o;return i?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))||(i={inputs:t,result:e()}):i=n,(0,_.useEffect)((()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:o,immediate:i})),[o,i]);const{Provider:a}=fT;return _.createElement(a,{value:n},t)},fT=(mT=pT,hT={},Object.assign(mT,_.createContext(hT)),mT.Provider._context=mT,mT.Consumer._context=mT,mT);var mT,hT;pT.Provider=fT.Provider,pT.Consumer=fT.Consumer;const gT=()=>{const e=[],t=function(t){BS(`${OS}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 IC(e,((e,o)=>{if(CC.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 IC(e,(e=>e.pause(...arguments))),this},t.resume=function(){return IC(e,(e=>e.resume(...arguments))),this},t.set=function(t){IC(e,(e=>e.set(t)))},t.start=function(t){const n=[];return IC(e,((e,r)=>{if(CC.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 IC(e,(e=>e.stop(...arguments))),this},t.update=function(t){return IC(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return CC.fun(e)?e(n,t):e};return t._getProps=n,t};function vT(e,t,n){const r=CC.fun(t)&&t;r&&!n&&(n=[]);const o=(0,_.useMemo)((()=>r||3==arguments.length?gT():void 0),[]),i=(0,_.useRef)(0),a=HS(),s=(0,_.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=aT(e,t);return i.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?oT(e,t):new Promise((r=>{sT(e,n),s.queue.push((()=>{r(oT(e,t))})),a()}))}})),[]),l=(0,_.useRef)([...s.ctrls]),c=[],u=WS(e)||0;function d(e,n){for(let o=e;o<n;o++){const e=l.current[o]||(l.current[o]=new rT(null,s.flush)),n=r?r(o,e):t[o];n&&(c[o]=YI(n))}}(0,_.useMemo)((()=>{IC(l.current.slice(e,u),(e=>{kI(e,o),e.stop(!0)})),l.current.length=e,d(u,e)}),[e]),(0,_.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=l.current.map(((e,t)=>aT(e,c[t]))),f=(0,_.useContext)(pT),m=WS(f),h=f!==m&&yI(f);ZS((()=>{i.current++,s.ctrls=l.current;const{queue:e}=s;e.length&&(s.queue=[],IC(e,(e=>e()))),IC(l.current,((e,t)=>{null==o||o.add(e),h&&e.start({default:f});const n=c[t];n&&(xI(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),jS((()=>()=>{IC(s.ctrls,(e=>e.stop(!0)))}));const g=p.map((e=>lI({},e)));return o?[g,o]:g}let bT;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(bT||(bT={}));class yT extends jI{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=dS(...t);const n=this._get(),r=nI(n);GS(this,r.create(n))}advance(e){const t=this._get();SC(t,this.get())||($S(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&kT(this._active)&&xT(this)}_get(){const e=CC.arr(this.source)?this.source.map(gS):NC(gS(this.source));return this.calc(...e)}_start(){this.idle&&!kT(this._active)&&(this.idle=!1,IC(qS(this),(e=>{e.done=!1})),BC.skipAnimation?(sC.batchedUpdates((()=>this.advance())),xT(this)):VC.start(this))}_attach(){let e=1;IC(NC(this.source),(t=>{hS(t)&&kS(t,this),BI(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){IC(NC(this.source),(e=>{hS(e)&&xS(e,this)})),this._active.clear(),xT(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=NC(this.source).reduce(((e,t)=>Math.max(e,(BI(t)?t.priority:0)+1)),0))}}function wT(e){return!1!==e.idle}function kT(e){return!e.size||Array.from(e).every(wT)}function xT(e){e.idle||(e.idle=!0,IC(qS(e),(e=>{e.done=!0})),bS(e,{type:"idle",parent:e}))}function _T(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}BC.assign({createStringInterpolator:LS,to:(e,t)=>new yT(e,t)}),VC.advance;const ET=["style","children","scrollTop","scrollLeft"],CT=/^--/;function ST(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||CT.test(e)||TT.hasOwnProperty(e)&&TT[e]?(""+t).trim():t+"px"}const IT={};let TT={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};const NT=["Webkit","Ms","Moz","O"];TT=Object.keys(TT).reduce(((e,t)=>(NT.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),TT);const AT=["x","y","z"],PT=/^(matrix|translate|scale|rotate|skew)/,RT=/^(translate)/,LT=/^(rotate|skew)/,OT=(e,t)=>CC.num(e)&&0!==e?e+t:e,MT=(e,t)=>CC.arr(e)?e.every((e=>MT(e,t))):CC.num(e)?e===t:parseFloat(e)===t;class DT extends QS{constructor(e){let{x:t,y:n,z:r}=e,o=_T(e,AT);const i=[],a=[];(t||n||r)&&(i.push([t||0,n||0,r||0]),a.push((e=>[`translate3d(${e.map((e=>OT(e,"px"))).join(",")})`,MT(e,0)]))),TC(o,((e,t)=>{if("transform"===t)i.push([e||""]),a.push((e=>[e,""===e]));else if(PT.test(t)){if(delete o[t],CC.und(e))return;const n=RT.test(t)?"px":LT.test(t)?"deg":"";i.push(NC(e)),a.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${OT(o,n)})`,MT(o,0)]:e=>[`${t}(${e.map((e=>OT(e,n))).join(",")})`,MT(e,t.startsWith("scale")?1:0)])}})),i.length&&(o.transform=new BT(i,a)),super(o)}}class BT extends yS{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return IC(this.inputs,((n,r)=>{const o=gS(n[0]),[i,a]=this.transforms[r](CC.arr(o)?o:n.map(gS));e+=" "+i,t=t&&a})),t?"none":e}observerAdded(e){1==e&&IC(this.inputs,(e=>IC(e,(e=>hS(e)&&kS(e,this)))))}observerRemoved(e){0==e&&IC(this.inputs,(e=>IC(e,(e=>hS(e)&&xS(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),bS(this,e)}}const FT=["scrollTop","scrollLeft"];function jT(e){return e.ownerDocument.defaultView,e.ownerDocument.defaultView.getComputedStyle(e)}function zT(e){if(e){if(e.scrollHeight>e.clientHeight){const{overflowY:t}=jT(e);if(/(auto|scroll)/.test(t))return e}return zT(e.parentNode)}}BC.assign({batchedUpdates:C.unstable_batchedUpdates,createStringInterpolator:LS,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}}),((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new QS(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=sI(e)||"Anonymous";return(e=CC.str(e)?i[e]||(i[e]=oI(e,o)):e[aI]||(e[aI]=oI(e,o))).displayName=`Animated(${t})`,e};return TC(e,((t,n)=>{CC.arr(e)&&(n=sI(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,r=t,{style:o,children:i,scrollTop:a,scrollLeft:s}=r,l=_T(r,ET),c=Object.values(l),u=Object.keys(l).map((t=>n||e.hasAttribute(t)?t:IT[t]||(IT[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){const n=ST(t,o[t]);CT.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s)},createAnimatedStyle:e=>new DT(e),getComponentProps:e=>_T(e,FT)}).animated;const HT=e=>e+1,VT=e=>({top:e.offsetTop,left:e.offsetLeft});var WT=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const i=(0,_.useRef)(),a=L_()||!r,[s,l]=(0,_.useReducer)(HT,0),[c,u]=(0,_.useReducer)(HT,0),[d,p]=(0,_.useState)({x:0,y:0}),f=(0,_.useMemo)((()=>i.current?VT(i.current):null),[o]),m=(0,_.useMemo)((()=>{if(!n||!i.current)return()=>{};const e=zT(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]);function h(e){let{value:n}=e,{x:r,y:o}=n;r=Math.round(r),o=Math.round(o),r===h.x&&o===h.y||(function(e){let{x:n,y:r}=e;if(!i.current)return;const o=0===n&&0===r;i.current.style.transformOrigin=o?"":"center",i.current.style.transform=o?"":`translate3d(${n}px,${r}px,0)`,i.current.style.zIndex=!t||o?"":"1",m()}({x:r,y:o}),h.x=r,h.y=o)}return(0,_.useLayoutEffect)((()=>{s&&u()}),[s]),(0,_.useLayoutEffect)((()=>{if(!f)return;if(a)return void m();i.current.style.transform="";const e=VT(i.current);l(),p({x:Math.round(f.left-e.left),y:Math.round(f.top-e.top)})}),[o]),h.x=0,h.y=0,function(e,t){const n=CC.fun(e),[[r],o]=vT(1,n?e:[e],n?t||[]:t)}({from:{x:d.x,y:d.y},to:{x:0,y:0},reset:s!==c,config:{mass:5,tension:2e3,friction:200},immediate:a,onChange:h}),i};function ZT(e){return function(e){return!!e&&"INPUT"===e.nodeName}(e)&&e.type&&!["button","checkbox","hidden","file","radio","image","range","reset","submit","number"].includes(e.type)||"TEXTAREA"===e.nodeName||"true"===e.contentEditable}function UT(e,t,n,r){const o=r.style.zIndex,i=r.style.position,{position:a="static"}=jT(r);"static"===a&&(r.style.position="relative"),r.style.zIndex="10000";const s=function(e,t,n){if(e.caretRangeFromPoint)return e.caretRangeFromPoint(t,n);if(!e.caretPositionFromPoint)return null;const r=e.caretPositionFromPoint(t,n);if(!r)return null;const o=e.createRange();return o.setStart(r.offsetNode,r.offset),o.collapse(!0),o}(e,t,n);return r.style.zIndex=o,r.style.position=i,s}function $T(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function GT(e){return"rtl"===jT(e).direction}function qT(e,t,n){const{ownerDocument:r}=e,o=GT(e)?!t:t,i=e.getBoundingClientRect();return void 0===n&&(n=t?i.right-1:i.left+1),UT(r,n,o?i.bottom-1:i.top+1,e)}function KT(e,t,n){if(!e)return;if(e.focus(),$T(e)){if("number"!=typeof e.selectionStart)return;return void(t?(e.selectionStart=e.value.length,e.selectionEnd=e.value.length):(e.selectionStart=0,e.selectionEnd=0))}if(!e.isContentEditable)return;let r=qT(e,t,n);if(!(r&&r.startContainer&&e.contains(r.startContainer)||(e.scrollIntoView(t),r=r=qT(e,t,n),r&&r.startContainer&&e.contains(r.startContainer))))return;const{ownerDocument:o}=e,{defaultView:i}=o,a=i.getSelection();a.removeAllRanges(),a.addRange(r)}function YT(e,t){return KT(e,t,void 0)}const XT=".block-editor-block-list__block",JT=".block-list-appender";function QT(e,t){return t.closest([XT,JT].join(","))===e}function eN(e){const t=(0,_.useRef)(),n=function(e){return(0,cr.Z)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:r,isNavigationMode:o,isBlockSelected:i}=t(Mb);if(i(e)&&!r()&&!o())return n()}),[e])}(e);return(0,_.useEffect)((()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const r=_o.tabbable.find(t.current).filter((e=>ZT(e))),o=-1===n,i=(o?Ee.last:Ee.first)(r)||t.current;QT(t.current,i)?YT(i,o):t.current.focus()}),[n]),t}function tN(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function nN(){const e=(0,cr.Z)((e=>{const{isNavigationMode:t,getSettings:n}=e(Mb);return t()||n().outlineMode}),[]);return Eo((t=>{if(e)return t.addEventListener("mouseout",tN),t.addEventListener("mouseover",tN),()=>{t.removeEventListener("mouseout",tN),t.removeEventListener("mouseover",tN),t.classList.remove("is-hovered")}}),[e])}function rN(e){return(0,cr.Z)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:o,isBlockMultiSelected:i,getBlockName:a,getSettings:s,hasSelectedInnerBlock:l,isTyping:c,__experimentalGetActiveBlockIdByBlockNames:u}=t(Mb),{__experimentalSpotlightEntityBlocks:d,outlineMode:p}=s(),f=n(e),m=o(e),h=a(e),g=l(e,!0),v=u(d);return Lr()({"is-selected":m,"is-highlighted":r(e),"is-multi-selected":i(e),"is-reusable":bl(ml(h)),"is-dragging":f,"has-child-selected":g,"has-active-entity":v,"is-active-entity":v===e,"remove-outline":m&&p&&c()})}),[e])}function oN(e){return(0,cr.Z)((t=>{const n=t(Mb).getBlockName(e),r=ml(n);if((null==r?void 0:r.apiVersion)>1)return qc(n)}),[e])}function iN(e){return(0,cr.Z)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(Mb),o=r(e);if(null==o||!o.className)return;const i=ml(n(e));return(null==i?void 0:i.apiVersion)>1?o.className:void 0}),[e])}function aN(e){return(0,cr.Z)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:a}=t(Mb);if(!a(e))return;const s=n();return s?Lr()("is-block-moving-mode",{"can-insert-moving-block":r(o(s),i(e))}):void 0}),[e])}function sN(e){const{isBlockSelected:t}=(0,cr.Z)(Mb),{selectBlock:n,selectionChange:r}=(0,ur.Z)(Mb);return Eo((o=>{function i(i){t(e)?i.target.isContentEditable||r(e):QT(o,i.target)&&n(e)}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}function lN(e){const t=(0,cr.Z)((t=>t(Mb).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,cr.Z)(Mb),{insertDefaultBlock:o,removeBlock:i}=(0,ur.Z)(Mb);return Eo((a=>{if(t)return a.addEventListener("keydown",s),a.addEventListener("dragstart",l),()=>{a.removeEventListener("keydown",s),a.removeEventListener("dragstart",l)};function s(t){const{keyCode:s,target:l}=t;s!==$r&&8!==s&&46!==s||l!==a||ZT(l)||(t.preventDefault(),s===$r?o({},n(e),r(e)+1):i(e))}function l(e){e.preventDefault()}}),[e,t,n,r,o,i])}function cN(e){const{isNavigationMode:t,isBlockSelected:n}=(0,cr.Z)(Mb),{setNavigationMode:r,selectBlock:o}=(0,ur.Z)(Mb);return Eo((i=>{function a(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",a),()=>{i.addEventListener("mousedown",a)}}),[e,t,n,r])}var uN=n(34979),dN=n.n(uN);function pN(e){const t=(0,_.useRef)(),n=(0,cr.Z)((t=>{const{isBlockSelected:n,getBlockSelectionEnd:r}=t(Mb);return n(e)||r()===e}),[e]);return(0,_.useEffect)((()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const r=zT(e)||e.ownerDocument.defaultView;r&&dN()(e,r,{onlyScrollIfNeeded:!0})}),[n]),t}const fN=(0,_.createContext)();function mN(e){let{children:t}=e;const n=(0,_.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,_.createElement)(fN.Provider,{value:n},t)}function hN(e){const{refs:t,callbacks:n}=(0,_.useContext)(fN),r=(0,_.useRef)();return(0,_.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),Eo((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function gN(e){const{refs:t}=(0,_.useContext)(fN),n=(0,_.useRef)();return n.current=e,(0,_.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function vN(e){const{callbacks:t}=(0,_.useContext)(fN),n=gN(e),[r,o]=(0,_.useState)(null);return(0,_.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}function bN(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach((e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}function yN(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:r,selectBlock:o}=(0,ur.Z)(Mb),{isSelectionEnabled:i,isBlockSelected:a,getBlockParents:s,getBlockSelectionStart:l,hasMultiSelection:c}=(0,cr.Z)(Mb);return Eo((u=>{const{ownerDocument:d}=u,{defaultView:p}=d;let f,m;function h(t){let{isSelectionEnd:n}=t;const i=p.getSelection();if(!i.rangeCount||i.isCollapsed)return void bN(u,!0);const a=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(XT);return t?t.id.slice("block-".length):void 0}(i.focusNode);if(e===a){if(o(e),n&&(bN(u,!0),i.rangeCount)){const{commonAncestorContainer:e}=i.getRangeAt(0);f.contains(e)&&f.focus()}}else{const t=[...s(e),e],n=[...s(a),a],o=Math.min(t.length,n.length)-1;r(t[o],n[o])}}function g(){d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),m=p.requestAnimationFrame((()=>{h({isSelectionEnd:!0}),n()}))}function v(n){let{buttons:r}=n;1===r&&i()&&a(e)&&(f=d.activeElement,t(),d.addEventListener("selectionchange",h),p.addEventListener("mouseup",g),bN(u,!1))}function b(t){if(i()&&0===t.button)if(t.shiftKey){const n=l(),o=s(n);if(n&&n!==e&&(null==o||!o.includes(e))){const i=[...o,n],a=[...s(e),e],l=Math.min(i.length,a.length)-1,c=i[l],d=a[l];c!==d&&(bN(u,!1),r(c,d),t.preventDefault())}}else c()&&o(e)}return u.addEventListener("mousedown",b),u.addEventListener("mouseleave",v),()=>{u.removeEventListener("mousedown",b),u.removeEventListener("mouseleave",v),d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),p.cancelAnimationFrame(m)}}),[e,t,n,r,o,i,a,s])}function wN(){const e=(0,_.useContext)(YH);return Eo((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}var kN=n(34155);function xN(){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:o={},isAligned:i}=(0,_.useContext)(_N),{index:a,mode:s,name:l,blockApiVersion:c,blockTitle:u,isPartOfSelection:d,adjustScrolling:p,enableAnimation:f}=(0,cr.Z)((e=>{const{getBlockIndex:t,getBlockMode:r,getBlockName:o,isTyping:i,getGlobalBlockCount:a,isBlockSelected:s,isBlockMultiSelected:l,isAncestorMultiSelected:c,isFirstMultiSelectedBlock:u}=e(Mb),d=s(n),p=l(n)||c(n),f=o(n),m=ml(f);return{index:t(n),mode:r(n),name:f,blockApiVersion:(null==m?void 0:m.apiVersion)||1,blockTitle:null==m?void 0:m.title,isPartOfSelection:d||p,adjustScrolling:d||u(n),enableAnimation:!i()&&a()<=200}}),[n]),m=R(U("Block: %s"),u),h="html"!==s||t?"":"-visual",g=Er([e.ref,eN(n),pN(n),hN(n),sN(n),yN(n),lN(n),cN(n),nN(),wN(),WT({isSelected:d,adjustScrolling:p,enableAnimation:f,triggerAnimationOnChange:a})]),v=jb();return c<2&&n===v.clientId&&void 0!==kN&&kN.env,{...o,...e,ref:g,id:`block-${n}${h}`,tabIndex:0,role:"document","aria-label":m,"data-block":n,"data-type":l,"data-title":u,className:Lr()(Lr()("block-editor-block-list__block",{"wp-block":!i}),r,e.className,o.className,rN(n),oN(n),iN(n),aN(n)),style:{...o.style,...e.style}}}xN.save=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{blockType:t,attributes:n}=Yc;return(0,V.O)("blocks.getSaveContent.extraProps",{...e},t,n)};const _N=(0,_.createContext)();function EN(e){let{children:t,isHtml:n,...r}=e;return(0,_.createElement)("div",xN(r,{__unstableIsHtml:n}),t)}const CN=AE(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:i,isSelectionEnabled:a,getTemplateLock:s,__unstableGetBlockWithoutInnerBlocks:l,canRemoveBlock:c,canMoveBlock:u}=e(Mb),d=l(n),p=o(n),f=s(r),m=c(n,r),h=u(n,r),{name:g,attributes:v,isValid:b}=d||{};return{mode:i(n),isSelectionEnabled:a(),isLocked:!!f,canRemove:m,canMove:h,block:d,name:g,attributes:v,isValid:b,isSelected:p}})),SN=RE(((e,t,n)=>{let{select:r}=n;const{updateBlockAttributes:o,insertBlocks:i,mergeBlocks:a,replaceBlocks:s,toggleSelection:l,__unstableMarkLastChangeAsPersistent:c}=e(Mb);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=r(Mb),i=n(),{clientId:a}=t,s=i.length?i:[a];o(s,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;i(e,n,r)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:o}=t,{getBlockIndex:a}=r(Mb),s=a(n);i(e,s+1,o)},onMerge(e){const{clientId:n}=t,{getPreviousBlockClientId:o,getNextBlockClientId:i}=r(Mb);if(e){const e=i(n);e&&a(n,e)}else{const e=o(n);e&&a(e,n)}},onReplace(e,n,r){e.length&&!Hl(e[e.length-1])&&c(),s([t.clientId],e,n,r)},toggleSelection(e){l(e)}}}));var IN=LE(NE,CN,SN,OE((e=>{let{block:t}=e;return!!t})),TE("editor.BlockListBlock"))((function(e){let{mode:t,isLocked:n,canRemove:r,clientId:o,isSelected:i,isSelectionEnabled:a,className:s,name:l,isValid:c,attributes:u,wrapperProps:d,setAttributes:p,onReplace:f,onInsertBlocksAfter:m,onMerge:h,toggleSelection:g}=e;const{removeBlock:v}=(0,ur.Z)(Mb),b=(0,_.useCallback)((()=>v(o)),[o]);let y=(0,_.createElement)(zE,{name:l,isSelected:i,attributes:u,setAttributes:p,insertBlocksAfter:n?void 0:m,onReplace:r?f:void 0,onRemove:r?b:void 0,mergeBlocks:r?h:void 0,clientId:o,isSelectionEnabled:a,toggleSelection:g});const w=ml(l);null!=w&&w.getEditWrapperProps&&(d=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=Lr()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(d,w.getEditWrapperProps(u)));const k=d&&!!d["data-align"];let x;if(k&&(y=(0,_.createElement)("div",{className:"wp-block","data-align":d["data-align"]},y)),c)x="html"===t?(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{style:{display:"none"}},y),(0,_.createElement)(EN,{isHtml:!0},(0,_.createElement)(iC,{clientId:o}))):(null==w?void 0:w.apiVersion)>1?y:(0,_.createElement)(EN,d,y);else{const e=Jc(w,u);x=(0,_.createElement)(EN,{className:"has-warning"},(0,_.createElement)(QE,{clientId:o}),(0,_.createElement)(Sc,null,Qs(e)))}const E={clientId:o,className:s,wrapperProps:(0,Ee.omit)(d,["data-align"]),isAligned:k},C=(0,_.useMemo)((()=>E),Object.values(E));return(0,_.createElement)(_N.Provider,{value:C},(0,_.createElement)(rC,{fallback:(0,_.createElement)(EN,{className:"has-warning"},(0,_.createElement)(tC,null))},x))})),TN=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),NN=(0,_.forwardRef)((function e(t,n){let{className:r,onChange:o,onKeyDown:i,value:a,label:s,placeholder:l=U("Search"),hideLabelFromVision:c=!0,help:u,onClose:d}=t;const p=zo(e),f=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=(0,_.useRef)(null);return(0,_.useEffect)((()=>{t.forEach((e=>{e&&("function"==typeof e?e(r.current):e.current=r.current)}))}),[t]),r}(n),m=`components-search-control-${p}`;return(0,_.createElement)(Ky,{label:s,id:m,hideLabelFromVision:c,help:u,className:Lr()(r,"components-search-control")},(0,_.createElement)("div",{className:"components-search-control__input-wrapper"},(0,_.createElement)("input",{ref:f,className:"components-search-control__input",id:m,type:"search",placeholder:l,onChange:e=>o(e.target.value),onKeyDown:i,autoComplete:"off",value:a||""}),(0,_.createElement)("div",{className:"components-search-control__icon"},d?(0,_.createElement)(ga,{icon:HE,label:U("Close search"),onClick:d}):a?(0,_.createElement)(ga,{icon:HE,label:U("Reset search"),onClick:()=>{o(""),f.current.focus()}}):(0,_.createElement)(c_,{icon:TN}))))}));let AN,PN,RN,LN;const ON=/<(\/)?(\w+)\s*(\/)?>/g;function MN(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}function DN(e){const t=function(){const e=ON.exec(AN);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,o,i]=e,a=n.length;return i?["self-closed",o,t,a]:r?["closer",o,t,a]:["opener",o,t,a]}(),[n,r,o,i]=t,a=LN.length,s=o>PN?PN:null;if(!e[r])return BN(),!1;switch(n){case"no-more-tokens":if(0!==a){const{leadingTextStart:e,tokenStart:t}=LN.pop();RN.push(AN.substr(e,t))}return BN(),!1;case"self-closed":return 0===a?(null!==s&&RN.push(AN.substr(s,o-s)),RN.push(e[r]),PN=o+i,!0):(FN(MN(e[r],o,i)),PN=o+i,!0);case"opener":return LN.push(MN(e[r],o,i,o+i,s)),PN=o+i,!0;case"closer":if(1===a)return function(e){const{element:t,leadingTextStart:n,prevOffset:r,tokenStart:o,children:i}=LN.pop(),a=e?AN.substr(r,e-r):AN.substr(r);a&&i.push(a),null!==n&&RN.push(AN.substr(n,o-n)),RN.push((0,_.cloneElement)(t,null,...i))}(o),PN=o+i,!0;const t=LN.pop(),n=AN.substr(t.prevOffset,o-t.prevOffset);t.children.push(n),t.prevOffset=o+i;const l=MN(t.element,t.tokenStart,t.tokenLength,o+i);return l.children=t.children,FN(l),PN=o+i,!0;default:return BN(),!1}}function BN(){const e=AN.length-PN;0!==e&&RN.push(AN.substr(PN,e))}function FN(e){const{element:t,tokenStart:n,tokenLength:r,prevOffset:o,children:i}=e,a=LN[LN.length-1],s=AN.substr(a.prevOffset,n-a.prevOffset);s&&a.children.push(s),a.children.push((0,_.cloneElement)(t,null,...i)),a.prevOffset=o||n+r}var jN=(e,t)=>{if(AN=e,PN=0,RN=[],LN=[],ON.lastIndex=0,!(e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every((e=>(0,_.isValidElement)(e)))})(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(DN(t));return(0,_.createElement)(_.Fragment,null,...RN)},zN=function(e){return(0,_.createElement)("div",{className:"components-tip"},(0,_.createElement)(Lo,{width:"24",height:"24",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"})),(0,_.createElement)("p",null,e.children))};const HN=[jN(U("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,_.createElement)("kbd",null)}),jN(U("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,_.createElement)("kbd",null)}),jN(U("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,_.createElement)("kbd",null)}),U("Drag files into the editor to automatically insert media blocks."),U("Change a block's type by pressing the block icon on the toolbar.")];var VN=function(){const[e]=(0,_.useState)(Math.floor(Math.random()*HN.length));return(0,_.createElement)(zN,null,HN[e])},WN=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),ZN=(0,_.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:WN});const i=(0,_.createElement)(Jo,{icon:n&&n.src?n.src:n}),a=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,_.createElement)("span",{style:a,className:Lr()("block-editor-block-icon",o,{"has-colors":r})},i)})),UN=function(e){let{title:t,icon:n,description:r,blockType:o}=e;return o&&(He("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o)),(0,_.createElement)("div",{className:"block-editor-block-card"},(0,_.createElement)(ZN,{icon:n,showColors:!0}),(0,_.createElement)("div",{className:"block-editor-block-card__content"},(0,_.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,_.createElement)("span",{className:"block-editor-block-card__description"},r)))},$N=n(65758),GN=ip((e=>t=>(0,_.createElement)($N.yE,null,(n=>(0,_.createElement)(e,(0,dr.Z)({},t,{registry:n}))))),"withRegistry"),qN=n(9278);function KN(e){let{clientId:t=null,value:n,selection:r,onChange:o=Ee.noop,onInput:i=Ee.noop}=e;const a=(0,cv.Z)(),{resetBlocks:s,resetSelection:l,replaceInnerBlocks:c,setHasControlledInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=a.dispatch(Mb),{getBlockName:p,getBlocks:f}=a.select(Mb),m=(0,cr.Z)((e=>!t||e(Mb).areInnerBlocksControlled(t)),[t]),h=(0,_.useRef)({incoming:null,outgoing:[]}),g=(0,_.useRef)(!1),v=()=>{n&&(d(),t?a.batch((()=>{u(t,!0);const e=n.map((e=>Pl(e)));g.current&&(h.current.incoming=e),d(),c(t,e)})):(g.current&&(h.current.incoming=n),s(n)))},b=(0,_.useRef)(i),y=(0,_.useRef)(o);(0,_.useEffect)((()=>{b.current=i,y.current=o}),[i,o]),(0,_.useEffect)((()=>{h.current.outgoing.includes(n)?(0,Ee.last)(h.current.outgoing)===n&&(h.current.outgoing=[]):f(t)!==n&&(h.current.outgoing=[],v(),r&&l(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,_.useEffect)((()=>{m||(h.current.outgoing=[],v())}),[m]),(0,_.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:i,areInnerBlocksControlled:s}=a.select(Mb);let l=f(t),c=o(),u=!1;g.current=!0;const d=a.subscribe((()=>{if(null!==t&&null===p(t))return;if(t&&!s(t))return;const a=o(),d=f(t),m=d!==l;if(l=d,m&&(h.current.incoming||i()))return h.current.incoming=null,void(c=a);(m||u&&!m&&a&&!c)&&(c=a,h.current.outgoing.push(l),(c?y.current:b.current)(l,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})),u=m}));return()=>d()}),[a,t])}var YN=ip((e=>GN((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,_.createElement)(e,(0,dr.Z)({registry:r},o));const[i,a]=(0,_.useState)(null);return(0,_.useEffect)((()=>{const e=(0,qN.p)({},r);e.registerStore(Lb,Ob),a(e)}),[r]),i?(0,_.createElement)($N.ZP,{value:i},(0,_.createElement)(e,(0,dr.Z)({registry:i},o))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:r}=(0,ur.Z)(Mb);return(0,_.useEffect)((()=>{r(n)}),[n]),KN(e),(0,_.createElement)(mN,null,t)}));const XN=da("div",{target:"e1ac3xxk0"})({name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"}),JN=(0,_.createContext)(!1),{Consumer:QN,Provider:eA}=JN,tA=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA"];function nA(e){let{className:t,children:n,isDisabled:r=!0,...o}=e;const i=(0,_.useRef)(null),a=()=>{i.current&&_o.focusable.find(i.current).forEach((e=>{(0,Ee.includes)(tA,e.nodeName)&&e.setAttribute("disabled",""),"A"===e.nodeName&&e.setAttribute("tabindex","-1");const t=e.getAttribute("tabindex");null!==t&&"-1"!==t&&e.removeAttribute("tabindex"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")}))},s=(0,_.useCallback)((0,Ee.debounce)(a,void 0,{leading:!0}),[]);return(0,_.useLayoutEffect)((()=>{if(!r)return;let e;return a(),i.current&&(e=new window.MutationObserver(s),e.observe(i.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),s.cancel()}}),[]),r?(0,_.createElement)(eA,{value:!0},(0,_.createElement)(XN,(0,dr.Z)({ref:i,className:Lr()(t,"components-disabled")},o),n)):(0,_.createElement)(eA,{value:!1},n)}nA.Context=JN,nA.Consumer=QN;var rA=nA;function oA(e){let{onClick:t}=e;return(0,_.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,_.createElement)(rA,null,(0,_.createElement)(JH,null)))}function iA(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,cr.Z)(Mb),{clearSelectedBlock:n}=(0,ur.Z)(Mb);return Eo((r=>{function o(o){(e()||t())&&o.target===r&&n()}return r.addEventListener("mousedown",o),()=>{r.removeEventListener("mousedown",o)}}),[e,t,n])}function aA(e){return(0,_.createElement)("div",(0,dr.Z)({ref:iA()},e))}function sA(e,t){const n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function lA(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o}=e(Mb);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o()}}function cA(){const{isMultiSelecting:e,multiSelectedBlockClientIds:t,hasMultiSelection:n,selectedBlockClientId:r}=(0,cr.Z)(lA,[]),o=gN(r),i=gN((0,Ee.first)(t)),a=gN((0,Ee.last)(t));return Eo((s=>{const{ownerDocument:l}=s,{defaultView:c}=l;if(!n||e){if(!r||e)return;const t=c.getSelection();if(t.rangeCount&&!t.isCollapsed){const e=o.current,{startContainer:n,endContainer:r}=t.getRangeAt(0);!e||e.contains(n)&&e.contains(r)||t.removeAllRanges()}return}const{length:u}=t;if(u<2)return;if(!i.current||!a.current)return;s.focus();const d=c.getSelection(),p=l.createRange(),f=sA(i.current,"start"),m=sA(a.current,"end");!function(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((e=>{e.removeAttribute("contenteditable")}))}(s),p.setStartBefore(f),p.setEndAfter(m),d.removeAllRanges(),d.addRange(p)}),[n,e,t,r])}function uA(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function dA(e){const t=Array.from(e.getClientRects());if(!t.length)return;const n=Math.min(...t.map((e=>{let{top:t}=e;return t})));return Math.max(...t.map((e=>{let{bottom:t}=e;return t})))-n}function pA(e){const{anchorNode:t,focusNode:n,anchorOffset:r,focusOffset:o}=e,i=t.compareDocumentPosition(n);return!(i&t.DOCUMENT_POSITION_PRECEDING)&&(!!(i&t.DOCUMENT_POSITION_FOLLOWING)||0!==i||r<=o)}function fA(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if($T(e)&&"number"==typeof e.selectionStart)return e.selectionStart===e.selectionEnd&&(t?0===e.selectionStart:e.value.length===e.selectionStart);if(!e.isContentEditable)return!0;const{ownerDocument:r}=e,{defaultView:o}=r,i=o.getSelection();if(!i||!i.rangeCount)return!1;const a=i.getRangeAt(0),s=a.cloneRange(),l=pA(i),c=i.isCollapsed;c||s.collapse(!l);const u=Or(s),d=Or(a);if(!u||!d)return!1;const p=dA(a);if(!c&&p&&p>u.height&&l===t)return!1;const f=GT(e)?!t:t,m=e.getBoundingClientRect(),h=f?m.left+1:m.right-1,g=t?m.top+1:m.bottom-1,v=UT(r,h,g,e);if(!v)return!1;const b=Or(v);if(!b)return!1;const y=t?"top":"bottom",w=f?"left":"right",k=b[y]-d[y],x=b[w]-u[w],_=Math.abs(k)<=1,E=Math.abs(x)<=1;return n?_:_&&E}function mA(e,t){return fA(e,t,!0)}function hA(e,t){return fA(e,t)}function gA(e,t,n,r){let o,i=_o.focusable.find(n);return t&&(i=(0,Ee.reverse)(i)),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),(0,Ee.find)(i,(function(e){if(!_o.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 vA(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:r,getNextBlockClientId:o,getFirstMultiSelectedBlockClientId:i,getLastMultiSelectedBlockClientId:a,getSettings:s,hasMultiSelection:l}=(0,cr.Z)(Mb),{multiSelect:c,selectBlock:u}=(0,ur.Z)(Mb);return Eo((d=>{let p;function f(){p=null}function m(i){const a=e(),s=t(),l=n(),d=r(l||a),p=o(l||a),f=i?d:p;f&&(s===f?u(f):c(s||a,f))}function h(e){const t=i(),n=a(),r=e?t:n;r&&u(r)}function g(t){const{keyCode:i,target:a}=t,c=i===Kr,u=i===qr,f=c||u,g=u||i===Yr,v=c||i===Xr,b=g||v,y=t.shiftKey,w=y||t.ctrlKey||t.altKey||t.metaKey,k=v?mA:hA,{ownerDocument:x}=d,{defaultView:_}=x;if(l())return void(b&&((y?m:h)(f),t.preventDefault()));if(v?p||(p=function(e){const t=e.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return n?Or(n):null}(_)):p=null,t.defaultPrevented)return;if(!b)return;if(!function(e,t,n){if((t===Kr||t===Xr)&&!n)return!0;const{tagName:r}=e;return"INPUT"!==r&&"TEXTAREA"!==r}(a,i,w))return;const E=GT(a)?!f:f,{keepCaretInsideBlock:C}=s(),S=e();if(y){const e=n(),i=r(e||S),s=o(e||S);(f&&i||!f&&s)&&function(e,t){const n=gA(e,t,d);return!n||!function(e,t){return e.closest(XT)===t.closest(XT)}(e,n)}(a,f)&&k(a,f)&&(m(f),t.preventDefault())}else if(v&&mA(a,f)&&!C){const e=gA(a,f,d,!0);e&&(function(e,t,n){KT(e,t,null==n?void 0:n.left)}(e,f,p),t.preventDefault())}else g&&_.getSelection().isCollapsed&&hA(a,E)&&!C&&(YT(gA(a,E,d),f),t.preventDefault())}return d.addEventListener("mousedown",f),d.addEventListener("keydown",g),()=>{d.removeEventListener("mousedown",f),d.removeEventListener("keydown",g)}}),[])}function bA(e,t,n){let r=t;do{if(e===r)return!0;r=r[n]}while(r);return!1}function yA(e){let{name:t,category:n,description:r,keyCombination:o,aliases:i}=e;return{type:"REGISTER_SHORTCUT",name:t,category:n,keyCombination:o,aliases:i,description:r}}function wA(e){return{type:"UNREGISTER_SHORTCUT",name:e}}const kA=[],xA={display:io,raw:ro,ariaLabel:ao};function _A(e,t){return e?e.modifier?xA[t][e.modifier](e.character):e.character:null}function EA(e,t){return e[t]?e[t].keyCombination:null}function CA(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"display";const r=EA(e,t);return _A(r,n)}function SA(e,t){return e[t]?e[t].description:null}function IA(e,t){return e[t]&&e[t].aliases?e[t].aliases:kA}const TA=jt(((e,t)=>(0,Ee.compact)([EA(e,t),...IA(e,t)])),((e,t)=>[e[t]])),NA=jt(((e,t)=>TA(e,t).map((e=>_A(e,"raw")))),((e,t)=>[e[t]])),AA=jt(((e,t)=>Object.entries(e).filter((e=>{let[,n]=e;return n.category===t})).map((e=>{let[t]=e;return t}))),(e=>[e])),PA=(0,_e.Z)("core/keyboard-shortcuts",{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":return(0,Ee.omit)(e,t.name)}return e},actions:h,selectors:g});function RA(){const{getAllShortcutKeyCombinations:e}=(0,cr.Z)(PA);return function(t,n){return e(t).some((e=>{let{modifier:t,character:r}=e;return lo[t](n,r)}))}}(0,xe.z2)(PA);const LA=(0,_.createContext)();function OA(e,t){let{isDisabled:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,_.useContext)(LA),o=RA(),i=(0,_.useRef)();i.current=t,(0,_.useEffect)((()=>{if(!n)return r.current.add(t),()=>{r.current.delete(t)};function t(t){o(e,t)&&i.current(t)}}),[e,n])}const{Provider:MA}=LA;function DA(e){const t=(0,_.useRef)(new Set);return(0,_.createElement)(MA,{value:t},(0,_.createElement)("div",(0,dr.Z)({},e,{onKeyDown:function(n){e.onKeyDown&&e.onKeyDown(n);for(const e of t.current)e(n)}})))}function BA(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,cr.Z)(Mb),{multiSelect:r}=(0,ur.Z)(Mb),o=RA();return Eo((i=>{function a(i){if(!o("core/block-editor/select-all",i))return;if(!function(e){if($T(e))return 0===e.selectionStart&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;const{ownerDocument:t}=e,{defaultView:n}=t,r=n.getSelection(),o=r.rangeCount?r.getRangeAt(0):null;if(!o)return!0;const{startContainer:i,endContainer:a,startOffset:s,endOffset:l}=o;if(i===e&&a===e&&0===s&&l===e.childNodes.length)return!0;e.lastChild;const c=a.nodeType===a.TEXT_NODE?a.data.length:a.childNodes.length;return bA(i,e,"firstChild")&&bA(a,e,"lastChild")&&0===s&&l===c}(i.target))return;const a=t(),[s]=a,l=n(s);let c=e(l);a.length===c.length&&(c=e(n(l)));const u=(0,Ee.first)(c),d=(0,Ee.last)(c);u!==d&&(r(u,d),i.preventDefault())}return i.addEventListener("keydown",a),()=>{i.removeEventListener("keydown",a)}}),[])}function FA(){const[e,t,n]=function(){const e=(0,_.useRef)(),t=(0,_.useRef)(),n=(0,_.useRef)(),r=(0,_.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i,getBlockCount:a}=(0,cr.Z)(Mb),{setNavigationMode:s}=(0,ur.Z)(Mb),l=(0,cr.Z)((e=>e(Mb).isNavigationMode()),[])?void 0:"0",c=(0,_.useRef)();function u(t){if(c.current)c.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";_o.tabbable[n](t.target).focus()}}const d=(0,_.createElement)("div",{ref:t,tabIndex:l,onFocus:u}),p=(0,_.createElement)("div",{ref:n,tabIndex:l,onFocus:u}),f=Eo((l=>{function u(e){if(e.defaultPrevented)return;if(e.keyCode===Gr&&!o())return e.preventDefault(),void s(!0);if(9!==e.keyCode)return;const r=e.shiftKey,a=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===l&&s(!0));if(uA(e.target)&&uA(_o.tabbable[a](e.target)))return;const u=r?t:n;c.current=!0,u.current.focus({preventScroll:!0})}function d(e){r.current=e.target;const{ownerDocument:t}=l;e.relatedTarget||t.activeElement!==t.body||0!==a()||l.focus()}function p(r){var o;if(9!==r.keyCode)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",a=_o.tabbable[i](r.target);a!==t.current&&a!==n.current||(r.preventDefault(),a.focus({preventScroll:!0}))}const{ownerDocument:f}=l,{defaultView:m}=f;return m.addEventListener("keydown",p),l.addEventListener("keydown",u),l.addEventListener("focusout",d),()=>{m.removeEventListener("keydown",p),l.removeEventListener("keydown",u),l.removeEventListener("focusout",d)}}),[]);return[d,Er([e,f]),p]}(),r=(0,cr.Z)((e=>e(Mb).hasMultiSelection()),[]);return[e,Er([t,cA(),BA(),vA(),Eo((e=>{if(e.tabIndex=-1,r)return e.setAttribute("aria-label",U("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[r])]),n]}var jA=(0,_.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,i,a]=FA();return(0,_.createElement)(_.Fragment,null,o,(0,_.createElement)("div",(0,dr.Z)({},r,{ref:Er([i,t]),className:Lr()(r.className,"block-editor-writing-flow")}),n),a)}));const zA="editor-styles-wrapper";function HA(e){return(0,_.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var VA=(0,_.forwardRef)((function(e,t){var n,r;let{contentRef:o,children:i,head:a,tabIndex:s=0,...l}=e;const[,c]=(0,_.useReducer)((()=>({}))),[u,d]=(0,_.useState)(),[p,f]=(0,_.useState)([]),m=HA(null===(n=window.__editorAssets)||void 0===n?void 0:n.styles),h=HA(null===(r=window.__editorAssets)||void 0===r?void 0:r.scripts),g=iA(),[v,b,y]=FA(),w=Eo((e=>{function t(){const{contentDocument:t,ownerDocument:n}=e,{readyState:r,documentElement:o}=t;return("interactive"===r||"complete"===r)&&(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 a=new o(e.type,i);!n.dispatchEvent(a)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(t),d(t),g(o),f(Array.from(n.body.classList).filter((e=>e.startsWith("admin-color-")||"wp-embed-responsive"===e))),t.dir=n.dir,o.removeChild(t.head),o.removeChild(t.body),!0)}t()||e.addEventListener("load",(()=>{t()}))}),[]),k=Eo((e=>{h.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((()=>{c()}))}),[]),x=Er([o,g,b]);return(0,_.useEffect)((()=>{u&&function(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&&Array.from(r).find((e=>{let{selectorText:t}=e;return t&&(t.includes(`.${zA}`)||t.includes(".wp-block"))}))&&!e.getElementById(n.id)){console.warn(`Stylesheet ${n.id} was not properly added.\nFor blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).\nFor themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`,n.outerHTML),e.head.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.head.appendChild(r.cloneNode(!0))}}))}(u)}),[u]),a=(0,_.createElement)(_.Fragment,null,(0,_.createElement)("style",null,"body{margin:0}"),m.map((e=>{let{tagName:t,href:n,id:r,rel:o,media:i,textContent:a}=e;const s=t.toLowerCase();return"style"===s?(0,_.createElement)(s,{id:r,key:r},a):(0,_.createElement)(s,{href:n,id:r,rel:o,media:i,key:r})})),a),(0,_.createElement)(_.Fragment,null,s>=0&&v,(0,_.createElement)("iframe",(0,dr.Z)({},l,{ref:Er([t,w]),tabIndex:s,title:U("Editor canvas")}),u&&(0,C.createPortal)((0,_.createElement)(_.Fragment,null,(0,_.createElement)("head",{ref:k},a),(0,_.createElement)("body",{ref:x,className:Lr()(zA,...p)},(0,_.createElement)(hp,{document:u},i))),u.documentElement)),s>=0&&y)})),WA=n(13692),ZA=n.n(WA);const UA=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function $A(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 a(e),f(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;const s=[];function l(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;s.push(i)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(f(),m(n);e.length&&"}"!==e.charAt(0)&&(t=E()||C());)!1!==t&&(n.push(t),m(n));return n}function p(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function f(){p(/^\s*/)}function m(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){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 l("End of comment missing");const a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}function g(){const e=p(/^([^{]+)/);if(e)return GA(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 v(){const e=i();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=GA(t[0]),!p(/^:\s*/))return l("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(UA,""),value:n?GA(n[0]).replace(UA,""):""});return p(/^[;\s]*/),r}function b(){const e=[];if(!c())return l("missing '{'");let t;for(m(e);t=v();)!1!==t&&(e.push(t),m(e));return u()?e:l("missing '}'")}function y(){let e;const t=[],n=i();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const w=_("import"),k=_("charset"),x=_("namespace");function _(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=p(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function E(){if("@"===e[0])return function(){const e=i();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return l("@keyframes missing name");const r=t[1];if(!c())return l("@keyframes missing '{'");let o,a=m();for(;o=y();)a.push(o),a=a.concat(m());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:a}):l("@keyframes missing '}'")}()||function(){const e=i(),t=p(/^@media *([^{]+)/);if(!t)return;const n=GA(t[1]);if(!c())return l("@media missing '{'");const r=m().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}()||function(){const e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:GA(t[1]),media:GA(t[2])})}()||function(){const e=i(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=GA(t[1]);if(!c())return l("@supports missing '{'");const r=m().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}()||w()||k()||x()||function(){const e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=GA(t[1]),r=GA(t[2]);if(!c())return l("@document missing '{'");const o=m().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}()||function(){const e=i();if(!p(/^@page */))return;const t=g()||[];if(!c())return l("@page missing '{'");let n,r=m();for(;n=v();)r.push(n),r=r.concat(m());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}()||function(){const e=i();if(!p(/^@host\s*/))return;if(!c())return l("@host missing '{'");const t=m().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}()||function(){const e=i();if(!p(/^@font-face\s*/))return;if(!c())return l("@font-face missing '{'");let t,n=m();for(;t=v();)n.push(t),n=n.concat(m());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}()}function C(){const e=i(),t=g();return t?(m(),e({type:"rule",selectors:t,declarations:b()})):l("selector missing")}return qA(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function GA(e){return e?e.replace(/^\s+|\s+$/g,""):""}function qA(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){qA(e,r)})):n&&"object"==typeof n&&qA(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var KA=n(35717),YA=n.n(KA),XA=JA;function JA(e){this.options=e||{}}JA.prototype.emit=function(e){return e},JA.prototype.visit=function(e){return this[e.type](e)},JA.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 QA=eP;function eP(e){XA.call(this,e)}YA()(eP,XA),eP.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},eP.prototype.comment=function(e){return this.emit("",e.position)},eP.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},eP.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},eP.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("}")},eP.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},eP.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},eP.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},eP.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},eP.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},eP.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("}")},eP.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},eP.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},eP.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},eP.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("}"):""},eP.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var tP=nP;function nP(e){e=e||{},XA.call(this,e),this.indentation=e.indent}YA()(nP,XA),nP.prototype.compile=function(e){return this.stylesheet(e)},nP.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},nP.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},nP.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},nP.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}")},nP.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}")},nP.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},nP.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},nP.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}")},nP.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)+"}")},nP.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")},nP.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}")},nP.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}")},nP.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}")},nP.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},nP.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()+"}"):""},nP.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},nP.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var rP=function(e,t){try{const n=$A(e);return function(e,t){return((t=t||{}).compress?new QA(t):new tP(t)).compile(e)}(ZA().map(n,(function(e){if(!e)return e;const n=t(e);return this.update(n)})))}catch(e){return console.warn("Error while traversing the CSS: "+e),null}};function oP(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 iP(e,t){return new URL(e,t).toString()}var aP=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]};oP(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+iP(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 sP=/^(body|html|:root).*$/;var lP=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(sP)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n},cP=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,Ee.map)(e,(e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(lP(t)),r&&o.push(aP(r)),o.length?rP(n,LE(o)):n}))};const uP=".editor-styles-wrapper";function dP(e){return(0,_.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(uP);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 a=Us(i);a.luminance()>.5||0===a.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function pP(e){let{styles:t}=e;const n=(0,_.useMemo)((()=>cP(t,uP)),[t]);return(0,_.createElement)(_.Fragment,null,(0,_.createElement)("style",{ref:dP(t)}),n.map(((e,t)=>(0,_.createElement)("style",{key:t},e))))}let fP;Gs([qs,Xs]);var mP=function(e){let{viewportWidth:t,__experimentalPadding:n}=e;const[r,{width:o}]=Zr(),[i,{height:a}]=Zr(),s=(0,cr.Z)((e=>e(Mb).getSettings().styles),[]);fP=fP||NE(JH);const l=o/t;return(0,_.createElement)("div",{className:"block-editor-block-preview__container"},r,(0,_.createElement)(rA,{className:"block-editor-block-preview__content",style:{transform:`scale(${l})`,height:a*l}},(0,_.createElement)(VA,{head:(0,_.createElement)(pP,{styles:s}),contentRef:Eo((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"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:a,pointerEvents:"none"}},i,(0,_.createElement)(fP,{renderAppender:!1}))))},hP=(0,_.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:r=1200,__experimentalLive:o=!1,__experimentalOnClick:i}=e;const a=(0,cr.Z)((e=>e(Mb).getSettings()),[]),s=(0,_.useMemo)((()=>{const e={...a};return e.__experimentalBlockPatterns=[],e}),[a]),l=(0,_.useMemo)((()=>(0,Ee.castArray)(t)),[t]);return t&&0!==t.length?(0,_.createElement)(YN,{value:l,settings:s},o?(0,_.createElement)(oA,{onClick:i}):(0,_.createElement)(mP,{viewportWidth:r,__experimentalPadding:n})):null})),gP=function(e){var t,n;let{item:r}=e;const{name:o,title:i,icon:a,description:s,initialAttributes:l}=r,c=ml(o),u=bl(r);return(0,_.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,_.createElement)("div",{className:"block-editor-inserter__preview"},u||null!=c&&c.example?(0,_.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,_.createElement)(hP,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=c.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:c.example?jl(r.name,{attributes:{...c.example.attributes,...l},innerBlocks:c.example.innerBlocks}):Tl(o,l)})):(0,_.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},U("No Preview Available."))),!u&&(0,_.createElement)(UN,{title:i,icon:a,description:s}))},vP=n(24565);function bP(e,t){const n=[];for(let r=0;r<e.length;r++){const o=e[r];if(!t.includes(o))break;n.push(o)}return n}var yP=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1};const{step:n=1}=t,[r,o]=(0,_.useState)([]);return(0,_.useEffect)((()=>{let t=bP(e,r);t.length<n&&(t=t.concat(e.slice(t.length,n))),o(t);let i=t.length;const a=(0,vP.j)(),s=()=>{e.length<=i||(o((t=>[...t,...e.slice(i,i+n)])),i+=n,a.add({},s))};return a.add({},s),()=>a.reset()}),[e]),r},wP=(0,_.createContext)(),kP=(0,_.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...i}=e;const a=(0,_.useContext)(wP);return(0,_.createElement)(Nf,(0,dr.Z)({ref:t,state:a,role:"option",focusable:!0},i),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,_.createElement)(r,t,o):"function"==typeof o?o(t):(0,_.createElement)(ga,t,o)}))}));const xP="is-dragging-components-draggable";function _P(e){let{children:t,onDragStart:n,onDragOver:r,onDragEnd:o,cloneClassname:i,elementId:a,transferData:s,__experimentalTransferDataType:l="text",__experimentalDragComponent:c}=e;const u=(0,_.useRef)(null),d=(0,_.useRef)((()=>{}));return(0,_.useEffect)((()=>()=>{d.current()}),[]),(0,_.createElement)(_.Fragment,null,t({onDraggableStart:function(e){const{ownerDocument:t}=e.target;e.dataTransfer.setData(l,JSON.stringify(s));const o=t.createElement("div");o.style.top=0,o.style.left=0;const c=t.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(c.classList.add("components-draggable__invisible-drag-image"),t.body.appendChild(c),e.dataTransfer.setDragImage(c,0,0)),o.classList.add("components-draggable__clone"),i&&o.classList.add(i);let p=0,f=0;if(u.current){p=e.clientX,f=e.clientY,o.style.transform=`translate( ${p}px, ${f}px )`;const n=t.createElement("div");n.innerHTML=u.current.innerHTML,o.appendChild(n),t.body.appendChild(o)}else{const e=t.getElementById(a),n=e.getBoundingClientRect(),r=e.parentNode,i=parseInt(n.top,10),s=parseInt(n.left,10);o.style.width=`${n.width+0}px`;const l=e.cloneNode(!0);l.id=`clone-${a}`,p=s-0,f=i-0,o.style.transform=`translate( ${p}px, ${f}px )`,Array.from(l.querySelectorAll("iframe")).forEach((e=>e.parentNode.removeChild(e))),o.appendChild(l),r.appendChild(o)}let m=e.clientX,h=e.clientY;const g=(0,Ee.throttle)((function(e){if(m===e.clientX&&h===e.clientY)return;const t=p+e.clientX-m,n=f+e.clientY-h;o.style.transform=`translate( ${t}px, ${n}px )`,m=e.clientX,h=e.clientY,p=t,f=n,r&&r(e)}),16);let v;t.addEventListener("dragover",g),t.body.classList.add(xP),e.persist(),n&&(v=setTimeout((()=>n(e)))),d.current=()=>{o&&o.parentNode&&o.parentNode.removeChild(o),c&&c.parentNode&&c.parentNode.removeChild(c),t.body.classList.remove(xP),t.removeEventListener("dragover",g),clearTimeout(v)}},onDraggableEnd:function(e){e.preventDefault(),d.current(),o&&o(e)}}),c&&(0,_.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:u},c))}var EP=(0,_.createElement)(Lo,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},(0,_.createElement)(Po,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function CP(e){let{count:t,icon:n}=e;return(0,_.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,_.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,_.createElement)(Sy,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,_.createElement)(Ty,null,n?(0,_.createElement)(ZN,{icon:n}):R(G("%d block","%d blocks",t),t)),(0,_.createElement)(Ty,null,(0,_.createElement)(ZN,{icon:EP})))))}var SP=e=>{let{isEnabled:t,blocks:n,icon:r,children:o}=e;const i={type:"inserter",blocks:n};return(0,_.createElement)(_P,{__experimentalTransferDataType:"wp-blocks",transferData:i,__experimentalDragComponent:(0,_.createElement)(CP,{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})}))};function IP(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var TP=(0,_.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:o,onHover:i,isDraggable:a,...s}=e;const l=(0,_.useRef)(!1),c=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},u=(0,_.useMemo)((()=>[Tl(r.name,r.initialAttributes,Nl(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]);return(0,_.createElement)(SP,{isEnabled:a&&!r.disabled,blocks:u,icon:r.icon},(e=>{let{draggable:a,onDragStart:u,onDragEnd:d}=e;return(0,_.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:a,onDragStart:e=>{l.current=!0,u&&(i(null),u(e))},onDragEnd:e=>{l.current=!1,d&&d(e)}},(0,_.createElement)(kP,(0,dr.Z)({isFirst:n,className:Lr()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),o(r,IP()?e.metaKey:e.ctrlKey),i(null)},onKeyDown:e=>{const{keyCode:t}=e;t===$r&&(e.preventDefault(),o(r,IP()?e.metaKey:e.ctrlKey),i(null))},onFocus:()=>{l.current||i(r)},onMouseEnter:()=>{l.current||i(r)},onMouseLeave:()=>i(null),onBlur:()=>i(null)},s),(0,_.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:c},(0,_.createElement)(ZN,{icon:r.icon,showColors:!0})),(0,_.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))})),NP=(0,_.forwardRef)((function(e,t){const[n,r]=(0,_.useState)(!1);return(0,_.useEffect)((()=>{n&&ag(U("Use left and right arrow keys to move through blocks"))}),[n]),(0,_.createElement)("div",(0,dr.Z)({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))}));function AP(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}var PP=Bp({name:"Group",compose:af,keys:[],useProps:function(e,t){return zp({role:"group"},t)}}),RP=(Mp({as:"div",useHook:PP}),Mp({as:"div",useHook:Bp({name:"CompositeGroup",compose:[PP,Ef],keys:gf,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return PP.unstable_propsAreEqual(e,t);var n=e.currentId,r=(e.unstable_moves,Hp(e,["currentId","unstable_moves"])),o=t.currentId,i=(t.unstable_moves,Hp(t,["currentId","unstable_moves"]));if(e.items&&t.items){var a=AP(e.items,n),s=AP(t.items,o),l=null==a?void 0:a.groupId,c=null==s?void 0:s.groupId;if(t.id===c||t.id===l)return!1}return PP.unstable_propsAreEqual(r,i)},useProps:function(e,t){var n=t.ref,r=Hp(t,["ref"]),o=(0,_.useRef)(null),i=e.id;return Kp((function(){var t;if(i)return null===(t=e.registerGroup)||void 0===t||t.call(e,{id:i,ref:o}),function(){var t;null===(t=e.unregisterGroup)||void 0===t||t.call(e,i)}}),[i,e.registerGroup,e.unregisterGroup]),zp({ref:Up(o,n)},r)}})})),LP=(0,_.forwardRef)((function(e,t){const n=(0,_.useContext)(wP);return(0,_.createElement)(RP,(0,dr.Z)({state:n,role:"presentation",ref:t},e))})),OP=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:o,label:i,isDraggable:a=!0}=e;return(0,_.createElement)(NP,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let t=0,r=e.length;t<r;t+=3)n.push(e.slice(t,t+3));return n}(t).map(((e,t)=>(0,_.createElement)(LP,{key:t},e.map(((e,o)=>(0,_.createElement)(TP,{key:e.id,item:e,className:Kc(e.id),onSelect:n,onHover:r,isDraggable:a,isFirst:0===t&&0===o})))))),o)},MP=function(e){let{title:t,icon:n,children:r}=e;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,_.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,_.createElement)(Jo,{icon:n})),(0,_.createElement)("div",{className:"block-editor-inserter__panel-content"},r))},DP=(e,t)=>{const{categories:n,collections:r,items:o}=(0,cr.Z)((t=>{const{getInserterItems:n}=t(Mb),{getCategories:r,getCollections:o}=t(pc);return{categories:r(),collections:o(),items:n(e)}}),[e]);return[o,n,r,(0,_.useCallback)(((e,n)=>{let{name:r,initialAttributes:o,innerBlocks:i}=e;const a=Tl(r,o,Nl(i));t(a,void 0,n)}),[t])]};function BP(e){return(0,_.useState)(e)[0]}function FP(e){for(var t,n=[[]],r=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},o=Wp(e);!(t=o()).done;)r();return n}function jP(e){for(var t,n=[],r=Wp(e);!(t=r()).done;){var o=t.value;n.push.apply(n,o)}return n}function zP(e){return e.slice().reverse()}function HP(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}function VP(e){void 0===e&&(e={});var t=BP(e).baseId,n=(0,_.useContext)(_f),r=(0,_.useRef)(0),o=(0,_.useState)((function(){return t||n()}));return{baseId:o[0],setBaseId:o[1],unstable_idCountRef:r}}function WP(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ZP(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&WP(t.ref.current,e.ref.current)}))}function UP(e){for(var t,n=0,r=Wp(e);!(t=r()).done;){var o=t.value.length;o>n&&(n=o)}return n}function $P(e){for(var t=FP(e),n=UP(t),r=[],o=0;o<n;o+=1)for(var i,a=Wp(t);!(i=a()).done;){var s=i.value;s[o]&&r.push(zp(zp({},s[o]),{},{groupId:s[o].groupId?""+o:void 0}))}return r}function GP(e,t,n){for(var r,o=UP(e),i=Wp(e);!(r=i()).done;)for(var a=r.value,s=0;s<o;s+=1){var l=a[s];if(!l||n&&l.disabled){var c=0===s&&n?ff(a):a[s-1];a[s]=c&&t!==(null==c?void 0:c.id)&&n?c:{id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:null==c?void 0:c.groupId}}}return e}var qP={id:null,ref:{current:null}};function KP(e,t){return e.filter((function(e){return e.groupId===t}))}var YP={horizontal:"vertical",vertical:"horizontal"};function XP(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function JP(e){var t=e.map((function(e,t){return[t,e]})),n=!1;return t.sort((function(e,t){var r=e[0],o=e[1],i=t[0],a=t[1],s=o.ref.current,l=a.ref.current;return s&&l?WP(s,l)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1):0})),n?t.map((function(e){return e[0],e[1]})):e}function QP(e,t){var n=JP(e);e!==n&&t(n)}function eR(e,t){"function"==typeof IntersectionObserver?function(e,t){var n=(0,_.useRef)([]);(0,_.useEffect)((function(){for(var r,o=function(e){for(var t,n=e[0],r=e.slice(1),o=null==n||null===(t=n.ref.current)||void 0===t?void 0:t.parentElement,i=function(){var e=o;if(r.every((function(t){return e.contains(t.ref.current)})))return{v:o};o=o.parentElement};o;){var a=i();if("object"==typeof a)return a.v}return $p(o).body}(e),i=new IntersectionObserver((function(){!!n.current.length&&QP(e,t),n.current=e}),{root:o}),a=Wp(e);!(r=a()).done;){var s=r.value;s.ref.current&&i.observe(s.ref.current)}return function(){i.disconnect()}}),[e])}(e,t):function(e,t){(0,_.useEffect)((function(){var n=setTimeout((function(){return QP(e,t)}),250);return function(){return clearTimeout(n)}}))}(e,t)}function tR(e,t){var n=e.unstable_virtual,r=e.rtl,o=e.orientation,i=e.items,a=e.groups,s=e.currentId,l=e.loop,c=e.wrap,u=e.pastIds,d=e.shift,p=e.unstable_moves,f=e.unstable_includesBaseElement,m=e.initialVirtual,h=e.initialRTL,g=e.initialOrientation,v=e.initialCurrentId,b=e.initialLoop,y=e.initialWrap,w=e.initialShift,k=e.hasSetCurrentId;switch(t.type){case"registerGroup":var x=t.group;if(0===a.length)return zp(zp({},e),{},{groups:[x]});var _=ZP(a,x);return zp(zp({},e),{},{groups:XP(a,x,_)});case"unregisterGroup":var E=t.id,C=a.filter((function(e){return e.id!==E}));return C.length===a.length?e:zp(zp({},e),{},{groups:C});case"registerItem":var S,I=t.item,T=a.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(I.ref.current)})),N=zp({groupId:null==T?void 0:T.id},I),A=ZP(i,N),P=zp(zp({},e),{},{items:XP(i,N,A)});return k||p||void 0!==v?P:zp(zp({},P),{},{currentId:null===(S=ff(P.items))||void 0===S?void 0:S.id});case"unregisterItem":var R=t.id,L=i.filter((function(e){return e.id!==R}));if(L.length===i.length)return e;var O=u.filter((function(e){return e!==R})),M=zp(zp({},e),{},{pastIds:O,items:L});if(s&&s===R){var D=f?null:mf(zp(zp({},M),{},{currentId:O[0]}));return zp(zp({},M),{},{currentId:D})}return M;case"move":var B=t.id;if(void 0===B)return e;var F=u.filter((function(e){return e!==s&&e!==B})),j=s?[s].concat(F):F,z=zp(zp({},e),{},{pastIds:j});if(null===B)return zp(zp({},z),{},{unstable_moves:p+1,currentId:mf(z,B)});var H=AP(i,B);return zp(zp({},z),{},{unstable_moves:H?p+1:p,currentId:mf(z,null==H?void 0:H.id)});case"next":if(null==s)return tR(e,zp(zp({},t),{},{type:"first"}));var V=r&&"vertical"!==o,W=V?zP(i):i,Z=W.find((function(e){return e.id===s}));if(!Z)return tR(e,zp(zp({},t),{},{type:"first"}));var U=!!Z.groupId,$=W.indexOf(Z),G=W.slice($+1),q=KP(G,Z.groupId);if(t.allTheWay){var K=ff(V?KP(W,Z.groupId):zP(q));return tR(e,zp(zp({},t),{},{type:"move",id:null==K?void 0:K.id}))}var Y=function(e){return e&&YP[e]}(U?o||"horizontal":o),X=l&&l!==Y,J=U&&c&&c!==Y,Q=t.hasNullItem||!U&&X&&f;if(X){var ee=ff(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[qP]:[],e.slice(0,r))}(J&&!Q?W:KP(W,Z.groupId),s,Q),s);return tR(e,zp(zp({},t),{},{type:"move",id:null==ee?void 0:ee.id}))}if(J){var te=ff(Q?q:G,s),ne=Q?(null==te?void 0:te.id)||null:null==te?void 0:te.id;return tR(e,zp(zp({},t),{},{type:"move",id:ne}))}var re=ff(q,s);return tR(e,zp(zp({},t),{},!re&&Q?{type:"move",id:null}:{type:"move",id:null==re?void 0:re.id}));case"previous":var oe=!a.length&&f,ie=tR(zp(zp({},e),{},{items:zP(i)}),zp(zp({},t),{},{type:"next",hasNullItem:oe}));return zp(zp({},ie),{},{items:i});case"down":var ae=d&&!t.allTheWay,se=$P(jP(GP(FP(i),s,ae))),le=l&&"horizontal"!==l&&f,ce=tR(zp(zp({},e),{},{orientation:"vertical",items:se}),zp(zp({},t),{},{type:"next",hasNullItem:le}));return zp(zp({},ce),{},{orientation:o,items:i});case"up":var ue=d&&!t.allTheWay,de=$P(zP(jP(GP(FP(i),s,ue)))),pe=f,fe=tR(zp(zp({},e),{},{orientation:"vertical",items:de}),zp(zp({},t),{},{type:"next",hasNullItem:pe}));return zp(zp({},fe),{},{orientation:o,items:i});case"first":var me=ff(i);return tR(e,zp(zp({},t),{},{type:"move",id:null==me?void 0:me.id}));case"last":var he=tR(zp(zp({},e),{},{items:zP(i)}),zp(zp({},t),{},{type:"first"}));return zp(zp({},he),{},{items:i});case"sort":return zp(zp({},e),{},{items:JP(i),groups:JP(a)});case"setVirtual":return zp(zp({},e),{},{unstable_virtual:HP(t.virtual,n)});case"setRTL":return zp(zp({},e),{},{rtl:HP(t.rtl,r)});case"setOrientation":return zp(zp({},e),{},{orientation:HP(t.orientation,o)});case"setCurrentId":var ge=mf(zp(zp({},e),{},{currentId:HP(t.currentId,s)}));return zp(zp({},e),{},{currentId:ge,hasSetCurrentId:!0});case"setLoop":return zp(zp({},e),{},{loop:HP(t.loop,l)});case"setWrap":return zp(zp({},e),{},{wrap:HP(t.wrap,c)});case"setShift":return zp(zp({},e),{},{shift:HP(t.shift,d)});case"setIncludesBaseElement":return zp(zp({},e),{},{unstable_includesBaseElement:HP(t.includesBaseElement,f)});case"reset":return zp(zp({},e),{},{unstable_virtual:m,rtl:h,orientation:g,currentId:mf(zp(zp({},e),{},{currentId:v})),loop:b,wrap:y,shift:w,unstable_moves:0,pastIds:[]});case"setItems":return zp(zp({},e),{},{items:t.items});default:throw new Error}}function nR(e){return(0,_.useCallback)(e,[])}function rR(e){void 0===e&&(e={});var t=BP(e),n=t.unstable_virtual,r=void 0!==n&&n,o=t.rtl,i=void 0!==o&&o,a=t.orientation,s=t.currentId,l=t.loop,c=void 0!==l&&l,u=t.wrap,d=void 0!==u&&u,p=t.shift,f=void 0!==p&&p,m=t.unstable_includesBaseElement,h=VP(Hp(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap","shift","unstable_includesBaseElement"])),g=(0,_.useReducer)(tR,{unstable_virtual:r,rtl:i,orientation:a,items:[],groups:[],currentId:s,loop:c,wrap:d,shift:f,unstable_moves:0,pastIds:[],unstable_includesBaseElement:null!=m?m:null===s,initialVirtual:r,initialRTL:i,initialOrientation:a,initialCurrentId:s,initialLoop:c,initialWrap:d,initialShift:f}),v=g[0],b=(v.pastIds,v.initialVirtual,v.initialRTL,v.initialOrientation,v.initialCurrentId,v.initialLoop,v.initialWrap,v.initialShift,v.hasSetCurrentId,Hp(v,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","initialShift","hasSetCurrentId"])),y=g[1],w=(0,_.useState)(!1),k=w[0],x=w[1],E=function(){var e=(0,_.useRef)(!1);return Kp((function(){return function(){e.current=!0}}),[]),e}(),C=(0,_.useCallback)((function(e){return y({type:"setItems",items:e})}),[]);return eR(b.items,C),zp(zp(zp({},h),b),{},{unstable_hasActiveWidget:k,unstable_setHasActiveWidget:x,registerItem:nR((function(e){E.current||y({type:"registerItem",item:e})})),unregisterItem:nR((function(e){E.current||y({type:"unregisterItem",id:e})})),registerGroup:nR((function(e){E.current||y({type:"registerGroup",group:e})})),unregisterGroup:nR((function(e){E.current||y({type:"unregisterGroup",id:e})})),move:nR((function(e){return y({type:"move",id:e})})),next:nR((function(e){return y({type:"next",allTheWay:e})})),previous:nR((function(e){return y({type:"previous",allTheWay:e})})),up:nR((function(e){return y({type:"up",allTheWay:e})})),down:nR((function(e){return y({type:"down",allTheWay:e})})),first:nR((function(){return y({type:"first"})})),last:nR((function(){return y({type:"last"})})),sort:nR((function(){return y({type:"sort"})})),unstable_setVirtual:nR((function(e){return y({type:"setVirtual",virtual:e})})),setRTL:nR((function(e){return y({type:"setRTL",rtl:e})})),setOrientation:nR((function(e){return y({type:"setOrientation",orientation:e})})),setCurrentId:nR((function(e){return y({type:"setCurrentId",currentId:e})})),setLoop:nR((function(e){return y({type:"setLoop",loop:e})})),setWrap:nR((function(e){return y({type:"setWrap",wrap:e})})),setShift:nR((function(e){return y({type:"setShift",shift:e})})),unstable_setIncludesBaseElement:nR((function(e){return y({type:"setIncludesBaseElement",includesBaseElement:e})})),reset:nR((function(){return y({type:"reset"})}))})}var oR=function(e){let{children:t}=e;const n=rR({shift:!0,wrap:"horizontal"});return(0,_.createElement)(wP.Provider,{value:n},t)};const iR=[];var aR=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[i,a,s,l]=DP(t,n),c=(0,_.useMemo)((()=>(0,Ee.orderBy)(i,["frecency"],["desc"]).slice(0,6)),[i]),u=(0,_.useMemo)((()=>i.filter((e=>!e.category))),[i]),d=(0,_.useMemo)((()=>(0,Ee.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,Ee.groupBy)(e,"category")))(i)),[i]),p=(0,_.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,_.useEffect)((()=>()=>r(null)),[]);const f=yP(a),m=a.length===f.length,h=(0,_.useMemo)((()=>Object.entries(s)),[s]),g=yP(m?h:iR);return(0,_.createElement)(oR,null,(0,_.createElement)("div",null,o&&!!c.length&&(0,_.createElement)(MP,{title:$("Most used","blocks")},(0,_.createElement)(OP,{items:c,onSelect:l,onHover:r,label:$("Most used","blocks")})),(0,Ee.map)(f,(e=>{const t=d[e.slug];return t&&t.length?(0,_.createElement)(MP,{key:e.slug,title:e.title,icon:e.icon},(0,_.createElement)(OP,{items:t,onSelect:l,onHover:r,label:e.title})):null})),m&&u.length>0&&(0,_.createElement)(MP,{className:"block-editor-inserter__uncategorized-blocks-panel",title:U("Uncategorized")},(0,_.createElement)(OP,{items:u,onSelect:l,onHover:r,label:U("Uncategorized")})),(0,Ee.map)(g,(e=>{let[t,n]=e;const o=p[t];return o&&o.length?(0,_.createElement)(MP,{key:t,title:n.title,icon:n.icon},(0,_.createElement)(OP,{items:o,onSelect:l,onHover:r,label:n.title})):null}))))};const sR=da("select",{target:"e1mv6sxx1"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Wy.black,";display:block;margin:0;width:100%;",(e=>{let{disabled:t}=e;return t?(0,sy.iv)({color:Wy.ui.textDisabled},"",""):""}),";",(e=>{let{selectSize:t}=e;const n={default:"13px",small:"11px"}[t];return n?(0,sy.iv)("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""}),";",(e=>{let{selectSize:t}=e;const n={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},r=n[t]||n.default;return(0,sy.iv)(r,"","")}),";",_y({paddingLeft:8,paddingRight:24}),";}"),lR=da("div",{target:"e1mv6sxx0"})("align-items:center;bottom:0;box-sizing:border-box;display:flex;padding:0 4px;pointer-events:none;position:absolute;top:0;",_y({right:0})," svg{display:block;}");var cR=(0,_.forwardRef)((function e(t,n){let{className:r,disabled:o=!1,help:i,hideLabelFromVision:a,id:s,label:l,multiple:c=!1,onBlur:u=Ee.noop,onChange:d=Ee.noop,onFocus:p=Ee.noop,options:f=[],size:m="default",value:h,labelPosition:g="top",children:v,prefix:b,suffix:y,...w}=t;const[k,x]=(0,_.useState)(!1),E=function(t){const n=zo(e);return t||`inspector-select-control-${n}`}(s),C=i?`${E}__help`:void 0;if((0,Ee.isEmpty)(f)&&!v)return null;const S=Lr()("components-select-control",r);return(0,_.createElement)(Ky,{help:i,id:E},(0,_.createElement)(Ak,{className:S,disabled:o,hideLabelFromVision:a,id:E,isFocused:k,label:l,size:m,suffix:y||(0,_.createElement)(lR,null,(0,_.createElement)(c_,{icon:M_,size:18})),prefix:b,labelPosition:g},(0,_.createElement)(sR,(0,dr.Z)({},w,{"aria-describedby":C,className:"components-select-control__input",disabled:o,id:E,multiple:c,onBlur:e=>{u(e),x(!1)},onChange:e=>{if(c){const t=Array.from(e.target.options).filter((e=>{let{selected:t}=e;return t})).map((e=>{let{value:t}=e;return t}));d(t)}else d(e.target.value,{event:e})},onFocus:e=>{p(e),x(!0)},ref:n,selectSize:m,value:h}),v||f.map(((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return(0,_.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)})))))})),uR=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,openPatternExplorer:o}=e;const i=Hr("medium","<"),a=Lr()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,_.createElement)(Sy,{justify:"space-between",align:"start",gap:"4",className:a},(0,_.createElement)(Ty,{isBlock:!0},(0,_.createElement)(cR,{className:"block-editor-inserter__panel-dropdown",label:U("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,_.createElement)(Ty,null,(0,_.createElement)(ga,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:U("Explore all patterns"),onClick:()=>o()},$("Explore","Label for showing all block patterns"))))},dR=(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=n.context;if(void 0===r)return t;const o=e(t[r],n);return o===t[r]?t:{...t,[r]:o}})((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CREATE_NOTICE":return[...(0,Ee.reject)(e,{id:t.notice.id}),t.notice];case"REMOVE_NOTICE":return(0,Ee.reject)(e,{id:t.id})}return e}));const pR="global",fR="info";function mR(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fR,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{speak:r=!0,isDismissible:o=!0,context:i=pR,id:a=(0,Ee.uniqueId)(i),actions:s=[],type:l="default",__unstableHTML:c,icon:u=null,explicitDismiss:d=!1,onDismiss:p}=n;return t=String(t),{type:"CREATE_NOTICE",context:i,notice:{id:a,status:e,content:t,spokenMessage:r?t:null,__unstableHTML:c,isDismissible:o,actions:s,type:l,icon:u,explicitDismiss:d,onDismiss:p}}}function hR(e,t){return mR("success",e,t)}function gR(e,t){return mR("info",e,t)}function vR(e,t){return mR("error",e,t)}function bR(e,t){return mR("warning",e,t)}function yR(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pR;return{type:"REMOVE_NOTICE",id:e,context:t}}const wR=[];function kR(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pR;return e[t]||wR}const xR=(0,_e.Z)("core/notices",{reducer:dR,actions:v,selectors:b});(0,xe.z2)(xR);var _R=(e,t)=>{const{patternCategories:n,patterns:r}=(0,cr.Z)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(Mb);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:o}=(0,ur.Z)(xR);return[r,n,(0,_.useCallback)(((t,n)=>{e((0,Ee.map)(n,(e=>Pl(e))),t.name),o(R(U('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function ER(e,t,n){return void 0===n&&(n={}),"function"==typeof FocusEvent?new FocusEvent(t,n):Cf(e,t,n)}function CR(e,t){var n=ER(e,"blur",t),r=e.dispatchEvent(n),o=Np(Np({},t),{},{bubbles:!0});return e.dispatchEvent(ER(e,"focusout",o)),r}var SR=qp&&"msCrypto"in window,IR=qp&&"msCrypto"in window;function TR(e,t,n){var r=Yp(n);return(0,_.useCallback)((function(n){var o,i,a,s;if(null===(o=r.current)||void 0===o||o.call(r,n),!n.defaultPrevented&&e&&function(e){return!!Xp(e)&&!e.metaKey&&"Tab"!==e.key}(n)){var l=null==t?void 0:t.ref.current;l&&(i=l,a=n.type,s=n,i.dispatchEvent(function(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var r=$p(e).createEvent("KeyboardEvent");return r.initKeyboardEvent(t,n.bubbles,n.cancelable,Gp(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),r}(i,a,s))||n.preventDefault(),n.currentTarget.contains(l)&&n.stopPropagation())}}),[e,t])}function NR(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var AR=Bp({name:"Composite",compose:[df],keys:hf,useOptions:function(e){return zp(zp({},e),{},{currentId:mf(e)})},useProps:function(e,t){var n=t.ref,r=t.onFocusCapture,o=t.onFocus,i=t.onBlurCapture,a=t.onKeyDown,s=t.onKeyDownCapture,l=t.onKeyUpCapture,c=Hp(t,["ref","onFocusCapture","onFocus","onBlurCapture","onKeyDown","onKeyDownCapture","onKeyUpCapture"]),u=(0,_.useRef)(null),d=AP(e.items,e.currentId),p=(0,_.useRef)(null),f=Yp(r),m=Yp(o),h=Yp(i),g=Yp(a),v=function(e){var t=Yp(e),n=(0,_.useReducer)((function(e){return e+1}),0),r=n[0],o=n[1];return(0,_.useEffect)((function(){var e,n=null===(e=t.current)||void 0===e?void 0:e.ref.current;r&&n&&bf(n)}),[r]),o}(d),b=IR?function(e){var t=(0,_.useRef)(null);return(0,_.useEffect)((function(){var n=$p(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(u):void 0;(0,_.useEffect)((function(){var t=u.current;e.unstable_moves&&!d&&(null==t||t.focus())}),[e.unstable_moves,d]);var y=TR(e.unstable_virtual,d,s),w=TR(e.unstable_virtual,d,l),k=(0,_.useCallback)((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==b?void 0:b.current)||t.relatedTarget,o=NR(e.items,r);Xp(t)&&o&&(t.stopPropagation(),p.current=r)}}),[e.unstable_virtual,e.items]),x=(0,_.useCallback)((function(t){var n;if(null===(n=m.current)||void 0===n||n.call(m,t),!t.defaultPrevented)if(e.unstable_virtual)Xp(t)&&v();else if(Xp(t)){var r;null===(r=e.setCurrentId)||void 0===r||r.call(e,null)}}),[e.unstable_virtual,e.setCurrentId]),E=(0,_.useCallback)((function(t){var n;if(null===(n=h.current)||void 0===n||n.call(h,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==d?void 0:d.ref.current)||null,o=function(e){return SR?Jp(e.currentTarget):e.relatedTarget}(t),i=NR(e.items,o);Xp(t)&&i?(o===r?p.current&&p.current!==o&&CR(p.current,t):r&&CR(r,t),t.stopPropagation()):!NR(e.items,t.target)&&r&&CR(r,t)}}),[e.unstable_virtual,e.items,d]),C=(0,_.useCallback)((function(t){var n,r;if(null===(n=g.current)||void 0===n||n.call(g,t),!t.defaultPrevented&&null===e.currentId&&Xp(t)){var o="horizontal"!==e.orientation,i="vertical"!==e.orientation,a=!(null===(r=e.groups)||void 0===r||!r.length),s={ArrowUp:(a||o)&&function(){if(a){var t,n=ff(jP(zP(FP(e.items))));null!=n&&n.id&&(null===(t=e.move)||void 0===t||t.call(e,n.id))}else{var r;null===(r=e.last)||void 0===r||r.call(e)}},ArrowRight:(a||i)&&e.first,ArrowDown:(a||o)&&e.first,ArrowLeft:(a||i)&&e.last,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}[t.key];s&&(t.preventDefault(),s())}}),[e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return zp({ref:Up(u,n),id:e.baseId,onFocus:x,onFocusCapture:k,onBlurCapture:E,onKeyDownCapture:y,onKeyDown:C,onKeyUpCapture:w,"aria-activedescendant":e.unstable_virtual&&(null==d?void 0:d.id)||void 0},c)},useComposeProps:function(e,t){t=af(e,t,!0);var n=df(e,t,!0);return e.unstable_virtual||null===e.currentId?zp({tabIndex:0},n):zp(zp({},t),{},{ref:n.ref})}}),PR=Mp({as:"div",useHook:AR,useCreateElement:function(e,t,n){return Sp(e,t,n)}});function RR(e){let{isDraggable:t,pattern:n,onClick:r,composite:o}=e;const{blocks:i,viewportWidth:a}=n,s=`block-editor-block-patterns-list__item-description-${zo(RR)}`;return(0,_.createElement)(SP,{isEnabled:t,blocks:i},(e=>{let{draggable:t,onDragStart:l,onDragEnd:c}=e;return(0,_.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?s:void 0,draggable:t,onDragStart:l,onDragEnd:c},(0,_.createElement)(Nf,(0,dr.Z)({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:()=>r(n,i)}),(0,_.createElement)(hP,{blocks:i,viewportWidth:a}),(0,_.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,_.createElement)(ma,{id:s},n.description)))}))}function LR(){return(0,_.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var OR=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onClickPattern:o,orientation:i,label:a=U("Block Patterns")}=e;const s=rR({orientation:i});return(0,_.createElement)(PR,(0,dr.Z)({},s,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>r.includes(e)?(0,_.createElement)(RR,{key:e.name,pattern:e,onClick:o,isDraggable:t,composite:s}):(0,_.createElement)(LR,{key:e.name}))))};function MR(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,_.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:i}=e;return(0,_.createElement)(ga,{key:n,label:i,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},i)})))}function DR(e){let{filterValue:t,setFilterValue:n}=e;return(0,_.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,_.createElement)(NN,{onChange:n,value:t,label:U("Search for patterns"),placeholder:U("Search")}))}var BR=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:i}=e;return(0,_.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,_.createElement)(DR,{filterValue:o,setFilterValue:i}),!o&&(0,_.createElement)(MR,{selectedCategory:t,patternCategories:n,onClickCategory:r}))},FR=function(){return(0,_.createElement)("div",{className:"block-editor-inserter__no-results"},(0,_.createElement)(c_,{className:"block-editor-inserter__no-results-icon",icon:WN}),(0,_.createElement)("p",null,U("No results found.")))},jR=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:o,onSelect:i,shouldFocusBlock:a=!0}=e;const{getSelectedBlock:s}=(0,cr.Z)(Mb),{destinationRootClientId:l,destinationIndex:c}=(0,cr.Z)((e=>{const{getSelectedBlockClientId:i,getBlockRootClientId:a,getBlockIndex:s,getBlockOrder:l}=e(Mb),c=i();let u,d=t;return void 0!==n?u=n:r?u=s(r):!o&&c?(d=a(c),u=s(c)+1):u=l(d).length,{destinationRootClientId:d,destinationIndex:u}}),[t,n,r,o]),{replaceBlocks:u,insertBlocks:d,showInsertionPoint:p,hideInsertionPoint:f}=(0,ur.Z)(Mb),m=(0,_.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=s();!o&&r&&Hl(r)?u(r.clientId,e,null,a||n?0:null,t):d(e,c,l,!0,a||n?0:null,t);const p=R(G("%d block added.","%d blocks added.",(0,Ee.castArray)(e).length),(0,Ee.castArray)(e).length);ag(p),i&&i()}),[o,s,u,d,l,c,i,a]),h=(0,_.useCallback)((e=>{e?p(l,c):f()}),[p,f,l,c]);return[l,m,h]};const zR=e=>e.name||"",HR=e=>e.title,VR=e=>e.description||"",WR=e=>e.keywords||[],ZR=e=>e.category,UR=()=>null;function $R(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(0,Ee.deburr)(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const GR=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,Ee.words)($R(e))},qR=(e,t)=>(0,Ee.differenceWith)(e,GR(t),((e,t)=>t.includes(e))),KR=(e,t,n,r)=>0===GR(r).length?e:YR(e,r,{getCategory:e=>{var n;return null===(n=(0,Ee.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}}),YR=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=GR(t);if(0===r.length)return e;const o=e.map((e=>[e,XR(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 XR(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=zR,getTitle:o=HR,getDescription:i=VR,getKeywords:a=WR,getCategory:s=ZR,getCollection:l=UR}=n,c=r(e),u=o(e),d=i(e),p=a(e),f=s(e),m=l(e),h=$R(t),g=$R(u);let v=0;if(h===g)v+=30;else if(g.startsWith(h))v+=20;else{const e=[c,u,d,...p,f,m].join(" "),t=(0,Ee.words)(h);0===qR(t,e).length&&(v+=10)}return 0!==v&&c.startsWith("core/")&&v++,v}function JR(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,_.createElement)(Q_,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},R(G('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var QR=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=Vo(ag,500),[i,a]=jR({shouldFocusBlock:!0}),[s,,l]=_R(a,i),c=(0,_.useMemo)((()=>r.map((e=>e.name))),[r]),u=(0,_.useMemo)((()=>t?YR(s,t):s.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!c.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,s]);(0,_.useEffect)((()=>{if(!t)return;const e=u.length,n=R(G("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const d=yP(u,{step:2}),p=!(null==u||!u.length);return(0,_.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},p&&(0,_.createElement)(JR,{filterValue:t,filteredBlockPatternsLength:u.length}),(0,_.createElement)(oR,null,!p&&(0,_.createElement)(FR,null),p&&(0,_.createElement)(OR,{shownPatterns:d,blockPatterns:u,onClickPattern:l,isDraggable:!1})))};function eL(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,_.useState)(""),[i,a]=(0,_.useState)(null==t?void 0:t.name);return(0,_.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,_.createElement)(BR,{selectedCategory:i,patternCategories:n,onClickCategory:a,filterValue:r,setFilterValue:o}),(0,_.createElement)(QR,{filterValue:r,selectedCategory:i,patternCategories:n}))}var tL=function(e){let{onModalClose:t,...n}=e;return(0,_.createElement)($E,{title:U("Patterns"),closeLabel:U("Close"),onRequestClose:t,isFullScreen:!0},(0,_.createElement)(eL,n))};function nL(e){let{rootClientId:t,onInsert:n,selectedCategory:r,populatedCategories:o}=e;const[i,,a]=_R(n,t),s=(0,_.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]),l=(0,_.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]),c=(0,_.useMemo)((()=>l.sort(((e,t)=>s(e)-s(t)))),[l,s]),u=yP(c);return l.length?(0,_.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,_.createElement)(OR,{shownPatterns:u,blockPatterns:l,onClickPattern:a,label:r.label,orientation:"vertical",isDraggable:!0})):null}var rL=function(e){let{rootClientId:t,onInsert:n,onClickCategory:r,selectedCategory:o}=e;const[i,a]=(0,_.useState)(!1),[s,l]=_R(),c=(0,_.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>l.some((t=>t.name===e))))),[l]),u=(0,_.useMemo)((()=>{const e=l.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=>!c(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:$("Uncategorized")}),e}),[s,l]),d=o||u[0];return(0,_.createElement)(_.Fragment,null,!i&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)(uR,{selectedCategory:d,patternCategories:u,onClickCategory:r,openPatternExplorer:()=>a(!0)}),(0,_.createElement)(nL,{rootClientId:t,onInsert:n,selectedCategory:d,populatedCategories:u})),i&&(0,_.createElement)(tL,{initialCategory:d,patternCategories:u,onModalClose:()=>a(!1)}))};function oL(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,i]=DP(r,n),a=(0,_.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===a.length?(0,_.createElement)(FR,null):(0,_.createElement)(MP,{title:U("Reusable blocks")},(0,_.createElement)(OP,{items:a,onSelect:i,onHover:t,label:U("Reusable blocks")}))}var iL=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(oL,{onHover:r,onInsert:n,rootClientId:t}),(0,_.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,_.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:te("edit.php",{post_type:"wp_block"})},U("Manage Reusable blocks"))))};const{Fill:aL,Slot:sL}=Pr("__unstableInserterMenuExtension");aL.Slot=sL;var lL=aL;const cL=[];var uL=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:i,isAppender:a,__experimentalInsertionIndex:s,maxBlockPatterns:l,maxBlockTypes:c,showBlockDirectory:u=!1,isDraggable:d=!0,shouldFocusBlock:p=!0}=e;const f=Vo(ag,500),[m,h]=jR({onSelect:n,rootClientId:o,clientId:i,isAppender:a,insertionIndex:s,shouldFocusBlock:p}),[g,v,b,y]=DP(m,h),[w,,k]=_R(h,m),x=(0,_.useMemo)((()=>{const e=KR((0,Ee.orderBy)(g,["frecency"],["desc"]),v,b,t);return void 0!==c?e.slice(0,c):e}),[t,g,v,b,c]),E=(0,_.useMemo)((()=>{const e=YR(w,t);return void 0!==l?e.slice(0,l):e}),[t,w,l]);(0,_.useEffect)((()=>{if(!t)return;const e=x.length+E.length,n=R(G("%d result found.","%d results found.",e),e);f(n)}),[t,f]);const C=yP(x,{step:9}),S=yP(C.length===x.length?E:cL),I=!(0,Ee.isEmpty)(x)||!(0,Ee.isEmpty)(E);return(0,_.createElement)(oR,null,!u&&!I&&(0,_.createElement)(FR,null),!!x.length&&(0,_.createElement)(MP,{title:(0,_.createElement)(ma,null,U("Blocks"))},(0,_.createElement)(OP,{items:C,onSelect:y,onHover:r,label:U("Blocks"),isDraggable:d})),!!x.length&&!!E.length&&(0,_.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!E.length&&(0,_.createElement)(MP,{title:(0,_.createElement)(ma,null,U("Block Patterns"))},(0,_.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,_.createElement)(OR,{shownPatterns:S,blockPatterns:E,onClickPattern:k,isDraggable:d}))),u&&(0,_.createElement)(lL.Slot,{fillProps:{onSelect:y,onHover:r,filterValue:t,hasItems:I,rootClientId:m}},(e=>e.length?e:I?null:(0,_.createElement)(FR,null))))};const dL=e=>{let{tabId:t,onClick:n,children:r,selected:o,...i}=e;return(0,_.createElement)(ga,(0,dr.Z)({role:"tab",tabIndex:o?null:-1,"aria-selected":o,id:t,onClick:n},i),r)};function pL(e){var t;let{className:n,children:r,tabs:o,initialTabName:i,orientation:a="horizontal",activeClass:s="is-active",onSelect:l=Ee.noop}=e;const c=zo(pL,"tab-panel"),[u,d]=(0,_.useState)(null),p=e=>{d(e),l(e)},f=(0,Ee.find)(o,{name:u}),m=`${c}-${null!==(t=null==f?void 0:f.name)&&void 0!==t?t:"none"}`;return(0,_.useEffect)((()=>{(0,Ee.find)(o,{name:u})||d(i||(o.length>0?o[0].name:null))}),[o]),(0,_.createElement)("div",{className:n},(0,_.createElement)(Wf,{role:"tablist",orientation:a,onNavigate:(e,t)=>{t.click()},className:"components-tab-panel__tabs"},o.map((e=>(0,_.createElement)(dL,{className:Lr()("components-tab-panel__tabs-item",e.className,{[s]:e.name===u}),tabId:`${c}-${e.name}`,"aria-controls":`${c}-${e.name}-view`,selected:e.name===u,key:e.name,onClick:(0,Ee.partial)(p,e.name)},e.title)))),f&&(0,_.createElement)("div",{key:m,"aria-labelledby":m,role:"tabpanel",id:`${m}-view`,className:"components-tab-panel__tab-content"},r(f)))}const fL={name:"blocks",title:U("Blocks")},mL={name:"patterns",title:U("Patterns")},hL={name:"reusable",title:U("Reusable")};var gL=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,onSelect:o}=e;const i=(0,_.useMemo)((()=>{const e=[fL];return n&&e.push(mL),r&&e.push(hL),e}),[fL,n,mL,r,hL]);return(0,_.createElement)(pL,{className:"block-editor-inserter__tabs",tabs:i,onSelect:o},t)},vL=function(e){let{rootClientId:t,clientId:n,isAppender:r,__experimentalInsertionIndex:o,onSelect:i,showInserterHelpPanel:a,showMostUsedBlocks:s,__experimentalFilterValue:l="",shouldFocusBlock:c=!0}=e;const[u,d]=(0,_.useState)(l),[p,f]=(0,_.useState)(null),[m,h]=(0,_.useState)(null),[g,v,b]=jR({rootClientId:t,clientId:n,isAppender:r,insertionIndex:o,shouldFocusBlock:c}),{showPatterns:y,hasReusableBlocks:w}=(0,cr.Z)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(Mb);return{showPatterns:!!n(g).length,hasReusableBlocks:!(null===(t=r().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[g]),k=(0,_.useCallback)(((e,t,n)=>{v(e,t,n),i()}),[v,i]),x=(0,_.useCallback)(((e,t)=>{v(e,{patternName:t}),i()}),[v,i]),E=(0,_.useCallback)((e=>{b(!!e),f(e)}),[b,f]),C=(0,_.useCallback)((e=>{h(e)}),[h]),S=(0,_.useMemo)((()=>(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{className:"block-editor-inserter__block-list"},(0,_.createElement)(aR,{rootClientId:g,onInsert:k,onHover:E,showMostUsedBlocks:s})),a&&(0,_.createElement)("div",{className:"block-editor-inserter__tips"},(0,_.createElement)(ma,{as:"h2"},U("A tip for using the block editor")),(0,_.createElement)(VN,null)))),[g,k,E,u,s,a]),I=(0,_.useMemo)((()=>(0,_.createElement)(rL,{rootClientId:g,onInsert:x,onClickCategory:C,selectedCategory:m})),[g,x,C,m]),T=(0,_.useMemo)((()=>(0,_.createElement)(iL,{rootClientId:g,onInsert:k,onHover:E})),[g,k,E]),N=(0,_.useCallback)((e=>"blocks"===e.name?S:"patterns"===e.name?I:T),[S,I,T]);return(0,_.createElement)("div",{className:"block-editor-inserter__menu"},(0,_.createElement)("div",{className:"block-editor-inserter__main-area"},(0,_.createElement)("div",{className:"block-editor-inserter__content"},(0,_.createElement)(NN,{className:"block-editor-inserter__search",onChange:e=>{p&&f(null),d(e)},value:u,label:U("Search for blocks and patterns"),placeholder:U("Search")}),!!u&&(0,_.createElement)(uL,{filterValue:u,onSelect:i,onHover:E,rootClientId:t,clientId:n,isAppender:r,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:c}),!u&&(y||w)&&(0,_.createElement)(gL,{showPatterns:y,showReusableBlocks:w},N),!u&&!y&&!w&&S)),a&&p&&(0,_.createElement)(gP,{item:p}))};function bL(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o}=e;const[i,a]=(0,_.useState)(""),[s,l]=jR({onSelect:t,rootClientId:n,clientId:r,isAppender:o}),[c]=DP(s,l),[u]=_R(l,s),d=u.length&&!!i,p=d&&u.length>6||c.length>6,{setInserterIsOpened:f,insertionIndex:m}=(0,cr.Z)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(Mb),i=n(r);return{setInserterIsOpened:t().__experimentalSetIsInserterOpened,insertionIndex:-1===i?o():i}}),[r,n]);return(0,_.useEffect)((()=>{f&&f(!1)}),[f]),(0,_.createElement)("div",{className:Lr()("block-editor-inserter__quick-inserter",{"has-search":p,"has-expand":f})},p&&(0,_.createElement)(NN,{className:"block-editor-inserter__search",value:i,onChange:e=>{a(e)},label:U("Search for blocks and patterns"),placeholder:U("Search")}),(0,_.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,_.createElement)(uL,{filterValue:i,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:d?2:0,maxBlockTypes:6,isDraggable:!1})),f&&(0,_.createElement)(ga,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{f({rootClientId:n,insertionIndex:m,filterValue:i})},"aria-label":U("Browse all. This will open the main inserter panel in the editor toolbar.")},U("Browse all")))}const yL=e=>{let t,{onToggle:n,disabled:r,isOpen:o,blockTitle:i,hasSingleBlockType:a,toggleProps:s={}}=e;t=a?R($("Add %s","directly add the only allowed block"),i):$("Add block","Generic label for block inserter button");const{onClick:l,...c}=s;return(0,_.createElement)(ga,(0,dr.Z)({icon:G_,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),l&&l(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&o,disabled:r},c))};class wL extends _.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:a,toggleProps:s,hasItems:l,renderToggle:c=yL}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!l,blockTitle:o,hasSingleBlockType:i,directInsertBlock:a,toggleProps:s})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,__experimentalIsQuick:a}=this.props;return a?(0,_.createElement)(bL,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o}):(0,_.createElement)(vL,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:i}=this.props;return t||null!=n&&n.length?this.renderToggle({onToggle:r}):(0,_.createElement)(Ff,{className:"block-editor-inserter",contentClassName:Lr()("block-editor-inserter__popover",{"is-quick":o}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:U("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}var kL=LE([AE(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{getBlockRootClientId:o,hasInserterItems:i,__experimentalGetAllowedBlocks:a,__experimentalGetDirectInsertBlock:s}=e(Mb),{getBlockVariations:l}=e(pc);r=r||o(n)||void 0;const c=a(r),u=s(r),d=1===(0,Ee.size)(c)&&0===(0,Ee.size)(l(c[0].name,"inserter"));let p=!1;return d&&(p=c[0]),{hasItems:i(r),hasSingleBlockType:d,blockTitle:p?p.title:"",allowedBlockType:p,directInsertBlock:u,rootClientId:r}})),RE(((e,t,n)=>{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:o,isAppender:i,hasSingleBlockType:a,allowedBlockType:s,directInsertBlock:l,onSelectOrClose:c}=t;if(!(a||null!=l&&l.length))return;const{insertBlock:u}=e(Mb);u(null!=l&&l.length?Tl(...l):Tl(s.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:a,getBlockRootClientId:s}=r(Mb);if(o)return e(o);const l=t();return!i&&l&&s(l)===n?e(l)+1:a(n).length}(),n),c&&c(),ag(R(U("%s block added"),s.title))}}})),OE((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(wL),xL=LE(AE(((e,t)=>{const{getBlockCount:n,getBlockName:r,isBlockValid:o,getSettings:i,getTemplateLock:a}=e(Mb),s=!n(t.rootClientId),l=r(t.lastBlockClientId)===fl(),c=o(t.lastBlockClientId),{bodyPlaceholder:u}=i();return{isVisible:s||!l||!c,showPrompt:s,isLocked:!!a(t.rootClientId),placeholder:u}})),RE(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(Mb);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,isVisible:n,onAppend:r,showPrompt:o,placeholder:i,rootClientId:a}=e;if(t||!n)return null;const s=du(i)||U("Type / to choose a block");return(0,_.createElement)("div",{"data-root-client-id":a||"",className:Lr()("block-editor-default-block-appender",{"has-visible-prompt":o})},(0,_.createElement)("p",{tabIndex:"0",contentEditable:!0,suppressContentEditableWarning:!0,role:"button","aria-label":U("Add block"),className:"block-editor-default-block-appender__content",onFocus:r},o?s:"\ufeff"),(0,_.createElement)(kL,{rootClientId:a,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function _L(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:i}=e;return(0,_.createElement)(kL,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:a,disabled:s,isOpen:l,blockTitle:c,hasSingleBlockType:u}=e;n=u?R($("Add %s","directly add the only allowed block"),c):$("Add block","Generic label for block inserter button");const d=!u;let p=(0,_.createElement)(ga,{ref:t,onFocus:o,tabIndex:i,className:Lr()(r,"block-editor-button-block-appender"),onClick:a,"aria-haspopup":d?"true":void 0,"aria-expanded":d?l:void 0,disabled:s,label:n},!u&&(0,_.createElement)(ma,{as:"span"},n),(0,_.createElement)(c_,{icon:G_}));return(d||u)&&(p=(0,_.createElement)(Yo,{text:n},p)),p},isAppender:!0})}(0,_.forwardRef)(((e,t)=>(He("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender"}),_L(e,t))));var EL=(0,_.forwardRef)(_L),CL=AE(((e,t)=>{let{rootClientId:n}=t;const{getBlockOrder:r,canInsertBlockType:o,getTemplateLock:i,getSelectedBlockClientId:a}=e(Mb);return{isLocked:!!i(n),blockClientIds:r(n),canInsertDefaultBlock:o(fl(),n),selectedBlockClientId:a()}}))((function(e){let t,{blockClientIds:n,rootClientId:r,canInsertDefaultBlock:o,isLocked:i,renderAppender:a,className:s,selectedBlockClientId:l,tagName:c="div"}=e;if(i||!1===a)return null;if(a)t=(0,_.createElement)(a,null);else{const e=!r,i=l===r,a=l&&!n.includes(l);if(!e&&!i&&(!l||a))return null;t=o?(0,_.createElement)(xL,{rootClientId:r,lastBlockClientId:(0,Ee.last)(n)}):(0,_.createElement)(EL,{rootClientId:r,className:"block-list-appender__toggle"})}return(0,_.createElement)(c,{tabIndex:-1,className:Lr()("block-list-appender wp-block",s),"data-block":!0},t)})),SL=function(e,t){return(SL=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])})(e,t)};function IL(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}SL(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var TL=function(){return(TL=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}).apply(this,arguments)};function NL(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&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function AL(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function PL(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create;var RL=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},LL={measureLayout:RL(["layout","layoutId","drag","_layoutResetTransform"]),animation:RL(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:RL(["exit"]),drag:RL(["drag","dragControls"]),focus:RL(["whileFocus"]),hover:RL(["whileHover","onHoverStart","onHoverEnd"]),tap:RL(["whileTap","onTap","onTapStart","onTapCancel"]),pan:RL(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:RL(["layout","layoutId"])},OL=(0,_.createContext)({strict:!1}),ML=Object.keys(LL),DL=ML.length,BL=(0,_.createContext)({transformPagePoint:function(e){return e},isStatic:!1}),FL=(0,_.createContext)({}),jL=(0,_.createContext)(null);function zL(e){var t=(0,_.useRef)(null);return null===t.current&&(t.current=e()),t.current}function HL(){var e=(0,_.useContext)(jL);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,o=ZL();return(0,_.useEffect)((function(){return r(o)}),[]),!t&&n?[!1,function(){return null==n?void 0:n(o)}]:[!0]}var VL=0,WL=function(){return VL++},ZL=function(){return zL(WL)},UL=(0,_.createContext)(null),$L="undefined"!=typeof window,GL=$L?_.useLayoutEffect:_.useEffect;function qL(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function KL(e){return Array.isArray(e)}function YL(e){return"string"==typeof e||KL(e)}function XL(e,t,n,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"string"==typeof t&&(t=null===(i=e.variants)||void 0===i?void 0:i[t]),"function"==typeof t?t(null!=n?n:e.custom,r,o):t}function JL(e,t,n){var r=e.getProps();return XL(r,t,null!=n?n:r.custom,function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.getVelocity()})),t}(e))}function QL(e){var t;return"function"==typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||YL(e.initial)||YL(e.animate)||YL(e.whileHover)||YL(e.whileDrag)||YL(e.whileTap)||YL(e.whileFocus)||YL(e.exit)}function eO(e){return Boolean(QL(e)||e.variants)}function tO(e){return Array.isArray(e)?e.join(" "):e}function nO(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.useRender,o=e.useVisualState,i=e.Component;return t&&function(e){for(var t in e){var n=e[t];null!==n&&(LL[t].Component=n)}}(t),(0,_.forwardRef)((function(e,t){var a=(0,_.useContext)(BL).isStatic,s=null,l=function(e,t){var n=function(e,t){if(QL(e)){var n=e.initial,r=e.animate;return{initial:!1===n||YL(n)?n:void 0,animate:YL(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,_.useContext)(FL)),r=n.initial,o=n.animate;return(0,_.useMemo)((function(){return{initial:r,animate:o}}),t?[tO(r),tO(o)]:[])}(e,a),c=o(e,a);return!a&&$L&&(l.visualElement=function(e,t,n,r){var o=(0,_.useContext)(BL),i=(0,_.useContext)(OL),a=(0,_.useContext)(FL).visualElement,s=(0,_.useContext)(jL),l=function(e){var t=e.layoutId,n=(0,_.useContext)(UL);return n&&void 0!==t?n+"-"+t:t}(n),c=(0,_.useRef)(void 0);r||(r=i.renderer),!c.current&&r&&(c.current=r(e,{visualState:t,parent:a,props:TL(TL({},n),{layoutId:l}),presenceId:null==s?void 0:s.id,blockInitialAnimation:!1===(null==s?void 0:s.initial)}));var u=c.current;return GL((function(){u&&(u.setProps(TL(TL(TL({},o),n),{layoutId:l})),u.isPresent=function(e){return null===e||e.isPresent}(s),u.isPresenceRoot=!a||a.presenceId!==(null==s?void 0:s.id),u.syncRender())})),(0,_.useEffect)((function(){var e;u&&(null===(e=u.animationState)||void 0===e||e.animateChanges())})),GL((function(){return function(){return null==u?void 0:u.notifyUnmount()}}),[]),u}(i,c,e,n),s=function(e,t,n){var r=[];if((0,_.useContext)(OL),!t)return null;for(var o=0;o<DL;o++){var i=ML[o],a=LL[i],s=a.isEnabled,l=a.Component;s(e)&&l&&r.push(_.createElement(l,TL({key:i},e,{visualElement:t})))}return r}(e,l.visualElement)),_.createElement(_.Fragment,null,_.createElement(FL.Provider,{value:l},r(i,e,function(e,t,n){return(0,_.useCallback)((function(r){var o;r&&(null===(o=e.mount)||void 0===o||o.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):qL(n)&&(n.current=r))}),[t])}(c,l.visualElement,t),c,a)),s)}))}function rO(e){function t(t,n){return void 0===n&&(n={}),nO(e(t,n))}var n=new Map;return new Proxy(t,{get:function(e,r){return n.has(r)||n.set(r,t(r)),n.get(r)}})}var oO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function iO(e){return"string"==typeof e&&!e.includes("-")&&!!(oO.indexOf(e)>-1||/[A-Z]/.test(e))}var aO={},sO=["","X","Y","Z"],lO=["transformPerspective","x","y","z"];function cO(e,t){return lO.indexOf(e)-lO.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return sO.forEach((function(t){return lO.push(e+t)}))}));var uO=new Set(lO);function dO(e){return uO.has(e)}var pO=new Set(["originX","originY","originZ"]);function fO(e){return pO.has(e)}function mO(e,t){var n=t.layout,r=t.layoutId;return dO(e)||fO(e)||(n||void 0!==r)&&(!!aO[e]||"opacity"===e)}var hO=function(e){return null!==e&&"object"==typeof e&&e.getVelocity},gO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function vO(e){return e.startsWith("--")}var bO=function(e,t){return t&&"number"==typeof e?t.transform(e):e},yO=function(){return(yO=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}).apply(this,arguments)};Object.create,Object.create;var wO=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},kO=function(e){return e%1?Number(e.toFixed(5)):e},xO=/(-)?([\d]*\.?[\d])+/g,_O=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,EO=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function CO(e){return"string"==typeof e}var SO=function(e){return{test:function(t){return CO(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},IO=SO("deg"),TO=SO("%"),NO=SO("px"),AO=SO("vh"),PO=SO("vw"),RO=yO(yO({},TO),{parse:function(e){return TO.parse(e)/100},transform:function(e){return TO.transform(100*e)}}),LO={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},OO=yO(yO({},LO),{transform:wO(0,1)}),MO=yO(yO({},LO),{default:1}),DO=TL(TL({},LO),{transform:Math.round}),BO={borderWidth:NO,borderTopWidth:NO,borderRightWidth:NO,borderBottomWidth:NO,borderLeftWidth:NO,borderRadius:NO,radius:NO,borderTopLeftRadius:NO,borderTopRightRadius:NO,borderBottomRightRadius:NO,borderBottomLeftRadius:NO,width:NO,maxWidth:NO,height:NO,maxHeight:NO,size:NO,top:NO,right:NO,bottom:NO,left:NO,padding:NO,paddingTop:NO,paddingRight:NO,paddingBottom:NO,paddingLeft:NO,margin:NO,marginTop:NO,marginRight:NO,marginBottom:NO,marginLeft:NO,rotate:IO,rotateX:IO,rotateY:IO,rotateZ:IO,scale:MO,scaleX:MO,scaleY:MO,scaleZ:MO,skew:IO,skewX:IO,skewY:IO,distance:NO,translateX:NO,translateY:NO,translateZ:NO,x:NO,y:NO,z:NO,perspective:NO,transformPerspective:NO,opacity:OO,originX:RO,originY:RO,originZ:NO,zIndex:DO,fillOpacity:OO,strokeOpacity:OO,numOctaves:DO};function FO(e,t,n,r,o,i,a,s){var l,c=e.style,u=e.vars,d=e.transform,p=e.transformKeys,f=e.transformOrigin;p.length=0;var m=!1,h=!1,g=!0;for(var v in t){var b=t[v];if(vO(v))u[v]=b;else{var y=BO[v],w=bO(b,y);if(dO(v)){if(m=!0,d[v]=w,p.push(v),!g)continue;b!==(null!==(l=y.default)&&void 0!==l?l:0)&&(g=!1)}else if(fO(v))f[v]=w,h=!0;else if((null==n?void 0:n.isHydrated)&&(null==r?void 0:r.isHydrated)&&aO[v]){var k=aO[v].process(b,r,n),x=aO[v].applyTo;if(x)for(var _=x.length,E=0;E<_;E++)c[x[E]]=k;else c[v]=k}else c[v]=w}}r&&n&&a&&s?(c.transform=a(r.deltaFinal,r.treeScale,m?d:void 0),i&&(c.transform=i(d,c.transform)),c.transformOrigin=s(r)):(m&&(c.transform=function(e,t,n,r){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=void 0===a||a,l=t.allowTransformNone,c=void 0===l||l,u="";i.sort(cO);for(var d=!1,p=i.length,f=0;f<p;f++){var m=i[f];u+=(gO[m]||m)+"("+o[m]+") ","z"===m&&(d=!0)}return!d&&s?u+="translateZ(0)":u=u.trim(),r?u=r(o,n?"":u):c&&n&&(u="none"),u}(e,o,g,i)),h&&(c.transformOrigin=function(e){var t=e.originX,n=void 0===t?"50%":t,r=e.originY,o=void 0===r?"50%":r,i=e.originZ;return n+" "+o+" "+(void 0===i?0:i)}(f)))}function jO(e,t,n){for(var r in t)hO(t[r])||mO(r,n)||(e[r]=t[r])}function zO(e,t,n){var r={},o=function(e,t,n){var r={};return jO(r,e.style||{},e),Object.assign(r,function(e,t,n){var r=e.transformTemplate;return(0,_.useMemo)((function(){var e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};FO(e,t,void 0,void 0,{enableHardwareAcceleration:!n},r);var o=e.style;return TL(TL({},e.vars),o)}),[t])}(e,t,n)),e.transformValues&&(r=e.transformValues(r)),r}(e,t,n);return Boolean(e.drag)&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),r.style=o,r}var HO=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function VO(e){return HO.has(e)}var WO=function(e){return!VO(e)};try{var ZO=n(83804).Z;WO=function(e){return e.startsWith("on")?!VO(e):ZO(e)}}catch(e){}function UO(e,t,n){return"string"==typeof e?e:NO.transform(t+n*e)}var $O=function(e,t){return NO.transform(e*t)},GO={offset:"stroke-dashoffset",array:"stroke-dasharray"},qO={offset:"strokeDashoffset",array:"strokeDasharray"};function KO(e,t,n,r,o,i,a,s){var l=t.attrX,c=t.attrY,u=t.originX,d=t.originY,p=t.pathLength,f=t.pathSpacing,m=void 0===f?1:f,h=t.pathOffset,g=void 0===h?0:h;FO(e,NL(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r,o,i,a,s),e.attrs=e.style,e.style={};var v=e.attrs,b=e.style,y=e.dimensions,w=e.totalPathLength;v.transform&&(y&&(b.transform=v.transform),delete v.transform),y&&(void 0!==u||void 0!==d||b.transform)&&(b.transformOrigin=function(e,t,n){return UO(t,e.x,e.width)+" "+UO(n,e.y,e.height)}(y,void 0!==u?u:.5,void 0!==d?d:.5)),void 0!==l&&(v.x=l),void 0!==c&&(v.y=c),void 0!==w&&void 0!==p&&function(e,t,n,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?GO:qO;e[a.offset]=$O(-o,t);var s=$O(n,t),l=$O(r,t);e[a.array]=s+" "+l}(v,w,p,m,g,!1)}var YO=function(){return TL(TL({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function XO(e,t){var n=(0,_.useMemo)((function(){var n=YO();return KO(n,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),TL(TL({},n.attrs),{style:TL({},n.style)})}),[t]);if(e.style){var r={};jO(r,e.style,e),n.style=TL(TL({},r),n.style)}return n}function JO(e){return void 0===e&&(e=!1),function(t,n,r,o,i){var a=o.latestValues,s=(iO(t)?XO:zO)(n,a,i),l=function(e,t,n){var r={};for(var o in e)(WO(o)||!0===n&&VO(o)||!t&&!VO(o))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c=TL(TL(TL({},l),s),{ref:r});return(0,_.createElement)(t,c)}}var QO=/([a-z])([A-Z])/g,eM=function(e){return e.replace(QO,"$1-$2").toLowerCase()};function tM(e,t){var n=t.style,r=t.vars;for(var o in Object.assign(e.style,n),r)e.style.setProperty(o,r[o])}var nM=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function rM(e,t){for(var n in tM(e,t),t.attrs)e.setAttribute(nM.has(n)?n:eM(n),t.attrs[n])}function oM(e){var t=e.style,n={};for(var r in t)(hO(t[r])||mO(r,e))&&(n[r]=t[r]);return n}function iM(e){var t=oM(e);for(var n in e)hO(e[n])&&(t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]);return t}function aM(e){return"object"==typeof e&&"function"==typeof e.start}var sM=function(e){return Array.isArray(e)},lM=function(e){return sM(e)?e[e.length-1]||0:e};function cM(e,t,n,r){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,a=e.onMount,s={latestValues:dM(t,n,r,o),renderState:i()};return a&&(s.mount=function(e){return a(t,e,s)}),s}var uM=function(e){return function(t,n){var r=(0,_.useContext)(FL),o=(0,_.useContext)(jL);return n?cM(e,t,r,o):zL((function(){return cM(e,t,r,o)}))}};function dM(e,t,n,r){var o,i,a={},s=!1===(null==n?void 0:n.initial),l=r(e);for(var c in l)a[c]=(o=l[c],i=void 0,function(e){return Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)}(i=hO(o)?o.get():o)?i.toValue():i);var u=e.initial,d=e.animate,p=QL(e),f=eO(e);t&&f&&!p&&!1!==e.inherit&&(null!=u||(u=t.initial),null!=d||(d=t.animate));var m=s||!1===u?d:u;return m&&"boolean"!=typeof m&&!aM(m)&&(Array.isArray(m)?m:[m]).forEach((function(t){var n=XL(e,t);if(n){var r=n.transitionEnd;n.transition;var o=NL(n,["transitionEnd","transition"]);for(var i in o)a[i]=o[i];for(var i in r)a[i]=r[i]}})),a}var pM,fM={useVisualState:uM({scrapeMotionValuesFromProps:iM,createRenderState:YO,onMount:function(e,t,n){var r=n.renderState,o=n.latestValues;try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}"path"===t.tagName&&(r.totalPathLength=t.getTotalLength()),KO(r,o,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),rM(t,r)}})},mM={useVisualState:uM({scrapeMotionValuesFromProps:oM,createRenderState:function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}}})};function hM(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function gM(e,t,n,r){(0,_.useEffect)((function(){var o=e.current;if(n&&o)return hM(o,t,n,r)}),[e,t,n,r])}function vM(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function bM(e){return!!e.touches}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.Exit="exit"}(pM||(pM={}));var yM={pageX:0,pageY:0};function wM(e,t){void 0===t&&(t="page");var n=e.touches[0]||e.changedTouches[0]||yM;return{x:n[t+"X"],y:n[t+"Y"]}}function kM(e,t){return void 0===t&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function xM(e,t){return void 0===t&&(t="page"),{point:bM(e)?wM(e,t):kM(e,t)}}var _M=function(e,t){void 0===t&&(t=!1);var n,r=function(t){return e(t,xM(t))};return t?(n=r,function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&n(e)}):r},EM={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},CM={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function SM(e){return $L&&null===window.onpointerdown?e:$L&&null===window.ontouchstart?CM[e]:$L&&null===window.onmousedown?EM[e]:e}function IM(e,t,n,r){return hM(e,SM(t),_M(n,"pointerdown"===t),r)}function TM(e,t,n,r){return gM(e,SM(t),n&&_M(n,"pointerdown"===t),r)}function NM(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var AM=NM("dragHorizontal"),PM=NM("dragVertical");function RM(e){var t=!1;if("y"===e)t=PM();else if("x"===e)t=AM();else{var n=AM(),r=PM();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function LM(){var e=RM(!0);return!e||(e(),!1)}function OM(e,t,n){return function(r,o){var i;vM(r)&&!LM()&&(null==n||n(r,o),null===(i=e.animationState)||void 0===i||i.setActive(pM.Hover,t))}}var MM=function(e,t){return!!t&&(e===t||MM(e,t.parentElement))};function DM(e){return(0,_.useEffect)((function(){return function(){return e()}}),[])}var BM=function(e,t){return function(n){return t(e(n))}},FM=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(BM)},jM=function(e){return function(t){return e(t),null}},zM={tap:jM((function(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||n||r||o,s=(0,_.useRef)(!1),l=(0,_.useRef)(null);function c(){var e;null===(e=l.current)||void 0===e||e.call(l),l.current=null}function u(){var e;return c(),s.current=!1,null===(e=i.animationState)||void 0===e||e.setActive(pM.Tap,!1),!LM()}function d(e,n){u()&&(MM(i.getInstance(),e.target)?null==t||t(e,n):null==r||r(e,n))}function p(e,t){u()&&(null==r||r(e,t))}TM(i,"pointerdown",a?function(e,t){var r;c(),s.current||(s.current=!0,l.current=FM(IM(window,"pointerup",d),IM(window,"pointercancel",p)),null==n||n(e,t),null===(r=i.animationState)||void 0===r||r.setActive(pM.Tap,!0))}:void 0),DM(c)})),focus:jM((function(e){var t=e.whileFocus,n=e.visualElement;gM(n,"focus",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(pM.Focus,!0)}:void 0),gM(n,"blur",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(pM.Focus,!1)}:void 0)})),hover:jM((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;TM(o,"pointerenter",t||r?OM(o,!0,t):void 0),TM(o,"pointerleave",n||r?OM(o,!1,n):void 0)}))};function HM(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var VM=function(){return(VM=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}).apply(this,arguments)};function WM(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&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create,Object.create;var ZM=function(e,t,n){return Math.min(Math.max(n,e),t)};function UM(e,t){return e*Math.sqrt(1-t*t)}var $M=["duration","bounce"],GM=["stiffness","damping","mass"];function qM(e,t){return t.some((function(t){return void 0!==e[t]}))}function KM(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,i=e.restSpeed,a=void 0===i?2:i,s=e.restDelta,l=WM(e,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},u=function(e){var t=VM({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!qM(e,GM)&&qM(e,$M)){var n=function(e){var t,n,r=e.duration,o=void 0===r?800:r,i=e.bounce,a=void 0===i?.25:i,s=e.velocity,l=void 0===s?0:s,c=e.mass,u=void 0===c?1:c,d=1-a;d=ZM(.05,1,d),o=ZM(.01,10,o/1e3),d<1?(t=function(e){var t=e*d,n=t*o;return.001-(t-l)/UM(e,d)*Math.exp(-n)},n=function(e){var n=e*d*o,r=n*l+l,i=Math.pow(d,2)*Math.pow(e,2)*o,a=Math.exp(-n),s=UM(Math.pow(e,2),d);return(.001-t(e)>0?-1:1)*((r-i)*a)/s}):(t=function(e){return Math.exp(-e*o)*((e-l)*o+1)-.001},n=function(e){return Math.exp(-e*o)*(o*o*(l-e))});var p=function(e,t,n){for(var r=n,o=1;o<12;o++)r-=e(r)/t(r);return r}(t,n,5/o);if(o*=1e3,isNaN(p))return{stiffness:100,damping:10,duration:o};var f=Math.pow(p,2)*u;return{stiffness:f,damping:2*d*Math.sqrt(u*f),duration:o}}(e);(t=VM(VM(VM({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(l),d=u.stiffness,p=u.damping,f=u.mass,m=u.velocity,h=u.duration,g=u.isResolvedFromDuration,v=YM,b=YM;function y(){var e=m?-m/1e3:0,t=o-n,r=p/(2*Math.sqrt(d*f)),i=Math.sqrt(d/f)/1e3;if(null!=s||(s=Math.abs(o-n)<=1?.01:.4),r<1){var a=UM(i,r);v=function(n){var s=Math.exp(-r*i*n);return o-s*((e+r*i*t)/a*Math.sin(a*n)+t*Math.cos(a*n))},b=function(n){var o=Math.exp(-r*i*n);return r*i*o*(Math.sin(a*n)*(e+r*i*t)/a+t*Math.cos(a*n))-o*(Math.cos(a*n)*(e+r*i*t)-a*t*Math.sin(a*n))}}else if(1===r)v=function(n){return o-Math.exp(-i*n)*(t+(e+i*t)*n)};else{var l=i*Math.sqrt(r*r-1);v=function(n){var a=Math.exp(-r*i*n),s=Math.min(l*n,300);return o-a*((e+r*i*t)*Math.sinh(s)+l*t*Math.cosh(s))/l}}}return y(),{next:function(e){var t=v(e);if(g)c.done=e>=h;else{var n=1e3*b(e),r=Math.abs(n)<=a,i=Math.abs(o-t)<=s;c.done=r&&i}return c.value=c.done?o:t,c},flipTarget:function(){var e;m=-m,n=(e=[o,n])[0],o=e[1],y()}}}KM.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var YM=function(e){return 0},XM=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},JM=function(e,t,n){return-n*e+n*t+e},QM=function(e,t){return function(n){return Boolean(CO(n)&&EO.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},eD=function(e,t,n){return function(r){var o;if(!CO(r))return r;var i=r.match(xO),a=i[0],s=i[1],l=i[2],c=i[3];return(o={})[e]=parseFloat(a),o[t]=parseFloat(s),o[n]=parseFloat(l),o.alpha=void 0!==c?parseFloat(c):1,o}},tD=wO(0,255),nD=yO(yO({},LO),{transform:function(e){return Math.round(tD(e))}}),rD={test:QM("rgb","red"),parse:eD("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,i=void 0===o?1:o;return"rgba("+nD.transform(t)+", "+nD.transform(n)+", "+nD.transform(r)+", "+kO(OO.transform(i))+")"}},oD={test:QM("#"),parse:function(e){var t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:rD.transform},iD={test:QM("hsl","hue"),parse:eD("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,i=void 0===o?1:o;return"hsla("+Math.round(t)+", "+TO.transform(kO(n))+", "+TO.transform(kO(r))+", "+kO(OO.transform(i))+")"}},aD=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},sD=[oD,rD,iD],lD=function(e){return sD.find((function(t){return t.test(e)}))},cD=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},uD=function(e,t){var n=lD(e),r=lD(t);cD(e),cD(t),n.transform,r.transform;var o=n.parse(e),i=r.parse(t),a=VM({},o),s=n===iD?JM:aD;return function(e){for(var t in a)"alpha"!==t&&(a[t]=s(o[t],i[t],e));return a.alpha=JM(o.alpha,i.alpha,e),n.transform(a)}},dD={test:function(e){return rD.test(e)||oD.test(e)||iD.test(e)},parse:function(e){return rD.test(e)?rD.parse(e):iD.test(e)?iD.parse(e):oD.parse(e)},transform:function(e){return CO(e)?e:e.hasOwnProperty("red")?rD.transform(e):iD.transform(e)}},pD="${c}",fD="${n}";function mD(e){var t=[],n=0,r=e.match(_O);r&&(n=r.length,e=e.replace(_O,pD),t.push.apply(t,r.map(dD.parse)));var o=e.match(xO);return o&&(e=e.replace(xO,fD),t.push.apply(t,o.map(LO.parse))),{values:t,numColors:n,tokenised:e}}function hD(e){return mD(e).values}function gD(e){var t=mD(e),n=t.values,r=t.numColors,o=t.tokenised,i=n.length;return function(e){for(var t=o,n=0;n<i;n++)t=t.replace(n<r?pD:fD,n<r?dD.transform(e[n]):kO(e[n]));return t}}var vD=function(e){return"number"==typeof e?0:e},bD={test:function(e){var t,n,r,o;return isNaN(e)&&CO(e)&&(null!==(n=null===(t=e.match(xO))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.match(_O))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:hD,createTransformer:gD,getAnimatableNone:function(e){var t=hD(e);return gD(e)(t.map(vD))}},yD=function(e){return"number"==typeof e};function wD(e,t){return yD(e)?function(n){return JM(e,t,n)}:dD.test(e)?uD(e,t):ED(e,t)}var kD=function(e,t){var n=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],e),r=n.length,o=e.map((function(e,n){return wD(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}},xD=function(e,t){var n=VM(VM({},e),t),r={};for(var o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=wD(e[o],t[o]));return function(e){for(var t in r)n[t]=r[t](e);return n}};function _D(e){for(var t=bD.parse(e),n=t.length,r=0,o=0,i=0,a=0;a<n;a++)r||"number"==typeof t[a]?r++:void 0!==t[a].hue?i++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:i}}var ED=function(e,t){var n=bD.createTransformer(t),r=_D(e),o=_D(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&(r.numNumbers,o.numNumbers),FM(kD(r.parsed,o.parsed),n)},CD=function(e,t){return function(n){return JM(e,t,n)}};function SD(e,t,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,a=r.ease,s=r.mixer,l=e.length;t.length,!a||!Array.isArray(a)||a.length,e[0]>e[l-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var c=function(e,t,n){for(var r=[],o=n||function(e){return"number"==typeof e?CD:"string"==typeof e?dD.test(e)?uD:ED:Array.isArray(e)?kD:"object"==typeof e?xD:void 0}(e[0]),i=e.length-1,a=0;a<i;a++){var s=o(e[a],e[a+1]);if(t){var l=Array.isArray(t)?t[a]:t;s=FM(l,s)}r.push(s)}return r}(t,a,s),u=2===l?function(e,t){var n=e[0],r=e[1],o=t[0];return function(e){return o(XM(n,r,e))}}(e,c):function(e,t){var n=e.length,r=n-1;return function(o){var i=0,a=!1;if(o<=e[0]?a=!0:o>=e[r]&&(i=r-1,a=!0),!a){for(var s=1;s<n&&!(e[s]>o||s===r);s++);i=s-1}var l=XM(e[i],e[i+1],o);return t[i](l)}}(e,c);return i?function(t){return u(ZM(e[0],e[l-1],t))}:u}var ID,TD=function(e){return function(t){return 1-e(1-t)}},ND=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},AD=function(e){return function(t){return t*t*((e+1)*t-e)}},PD=function(e){return e},RD=(2,function(e){return Math.pow(e,2)}),LD=TD(RD),OD=ND(RD),MD=function(e){return 1-Math.sin(Math.acos(e))},DD=TD(MD),BD=ND(DD),FD=AD(1.525),jD=TD(FD),zD=ND(FD),HD=(ID=AD(1.525),function(e){return(e*=2)<1?.5*ID(e):.5*(2-Math.pow(2,-10*(e-1)))}),VD=function(e){if(1===e||0===e)return e;var t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},WD=TD(VD);function ZD(e,t){return e.map((function(){return t||OD})).splice(0,e.length-1)}function UD(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,i=e.ease,a=e.offset,s=e.duration,l=void 0===s?300:s,c={done:!1,value:n},u=Array.isArray(o)?o:[n,o],d=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===u.length?a:function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(u),l);function p(){return SD(d,u,{ease:Array.isArray(i)?i:ZD(u,i)})}var f=p();return{next:function(e){return c.value=f(e),c.done=e>=l,c},flipTarget:function(){u.reverse(),f=p()}}}var $D={keyframes:UD,spring:KM,decay:function(e){var t=e.velocity,n=void 0===t?0:t,r=e.from,o=void 0===r?0:r,i=e.power,a=void 0===i?.8:i,s=e.timeConstant,l=void 0===s?350:s,c=e.restDelta,u=void 0===c?.5:c,d=e.modifyTarget,p={done:!1,value:o},f=a*n,m=o+f,h=void 0===d?m:d(m);return h!==m&&(f=h-o),{next:function(e){var t=-f*Math.exp(-e/l);return p.done=!(t>u||t<-u),p.value=p.done?h:h+t,p},flipTarget:function(){}}}},GD=1/60*1e3,qD="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},KD="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(qD())}),GD)},YD=!0,XD=!1,JD=!1,QD={delta:0,timestamp:0},eB=["read","update","preRender","render","postRender"],tB=eB.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,i=new WeakSet,a={schedule:function(e,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=s&&o,c=l?t:n;return a&&i.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),i.delete(e)},process:function(s){var l;if(o=!0,t=(l=[n,t])[0],(n=l[1]).length=0,r=t.length)for(var c=0;c<r;c++){var u=t[c];u(s),i.has(u)&&(a.schedule(u),e())}o=!1}};return a}((function(){return XD=!0})),e}),{}),nB=eB.reduce((function(e,t){var n=tB[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),XD||sB(),n.schedule(e,t,r)},e}),{}),rB=eB.reduce((function(e,t){return e[t]=tB[t].cancel,e}),{}),oB=eB.reduce((function(e,t){return e[t]=function(){return tB[t].process(QD)},e}),{}),iB=function(e){return tB[e].process(QD)},aB=function(e){XD=!1,QD.delta=YD?GD:Math.max(Math.min(e-QD.timestamp,40),1),QD.timestamp=e,JD=!0,eB.forEach(iB),JD=!1,XD&&(YD=!1,KD(aB))},sB=function(){XD=!0,YD=!0,JD||KD(aB)},lB=function(){return QD},cB=nB;function uB(e,t,n){return void 0===n&&(n=0),e-t-n}var dB=function(e){var t=function(t){var n=t.delta;return e(n)};return{start:function(){return cB.update(t,!0)},stop:function(){return rB.update(t)}}};function pB(e){var t,n,r,o,i,a=e.from,s=e.autoplay,l=void 0===s||s,c=e.driver,u=void 0===c?dB:c,d=e.elapsed,p=void 0===d?0:d,f=e.repeat,m=void 0===f?0:f,h=e.repeatType,g=void 0===h?"loop":h,v=e.repeatDelay,b=void 0===v?0:v,y=e.onPlay,w=e.onStop,k=e.onComplete,x=e.onRepeat,_=e.onUpdate,E=WM(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),C=E.to,S=0,I=E.duration,T=!1,N=!0,A=function(e){if(Array.isArray(e.to))return UD;if($D[e.type])return $D[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?UD:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?KM:UD}(E);(null===(n=(t=A).needsInterpolation)||void 0===n?void 0:n.call(t,a,C))&&(i=SD([0,100],[a,C],{clamp:!1}),a=0,C=100);var P=A(VM(VM({},E),{from:a,to:C}));return l&&(null==y||y(),(r=u((function(e){if(N||(e=-e),p+=e,!T){var t=P.next(Math.max(0,p));o=t.value,i&&(o=i(o)),T=N?t.done:p<=0}null==_||_(o),T&&(0===S&&(null!=I||(I=p)),S<m?function(e,t,n,r){return r?e>=t+n:e<=-n}(p,I,b,N)&&(S++,"reverse"===g?p=function(e,t,n,r){return void 0===n&&(n=0),void 0===r&&(r=!0),r?uB(t+-e,t,n):t-(e-t)+n}(p,I,b,N=S%2==0):(p=uB(p,I,b),"mirror"===g&&P.flipTarget()),T=!1,x&&x()):(r.stop(),k&&k()))}))).start()),{stop:function(){null==w||w(),r.stop()}}}function fB(e,t){return t?e*(1e3/t):0}var mB=function(e){return 1e3*e},hB=function(e,t){return 1-3*t+3*e},gB=function(e,t){return 3*t-6*e},vB=function(e){return 3*e},bB=function(e,t,n){return((hB(t,n)*e+gB(t,n))*e+vB(t))*e},yB=function(e,t,n){return 3*hB(t,n)*e*e+2*gB(t,n)*e+vB(t)},wB=.1;function kB(e,t,n,r){if(e===t&&n===r)return PD;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=bB(i*wB,e,n);return function(i){return 0===i||1===i?i:bB(function(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=wB;--i;var a=r+(t-o[i])/(o[i+1]-o[i])*wB,s=yB(a,e,n);return s>=.001?function(e,t,n,r){for(var o=0;o<8;++o){var i=yB(t,n,r);if(0===i)return t;t-=(bB(t,n,r)-e)/i}return t}(t,a,e,n):0===s?a:function(e,t,n,r,o){var i,a,s=0;do{(i=bB(a=t+(n-t)/2,r,o)-e)>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+wB,e,n)}(i),t,r)}}var xB={linear:PD,easeIn:RD,easeInOut:OD,easeOut:LD,circIn:MD,circInOut:BD,circOut:DD,backIn:FD,backInOut:zD,backOut:jD,anticipate:HD,bounceIn:WD,bounceInOut:function(e){return e<.5?.5*(1-VD(1-2*e)):.5*VD(2*e-1)+.5},bounceOut:VD},_B=function(e){if(Array.isArray(e)){e.length;var t=AL(e,4);return kB(t[0],t[1],t[2],t[3])}return"string"==typeof e?xB[e]:e},EB=function(e,t){return!("zIndex"===e||"number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!bD.test(t)||t.startsWith("url(")))},CB=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},SB=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},IB=function(){return{type:"keyframes",ease:"linear",duration:.3}},TB=function(e){return{type:"keyframes",duration:.8,values:e}},NB={x:CB,y:CB,z:CB,rotate:CB,rotateX:CB,rotateY:CB,rotateZ:CB,scaleX:SB,scaleY:SB,scale:SB,opacity:IB,backgroundColor:IB,color:IB,default:SB},AB=new Set(["brightness","contrast","saturate","opacity"]);function PB(e){var t=e.slice(0,-1).split("("),n=t[0],r=t[1];if("drop-shadow"===n)return e;var o=(r.match(xO)||[])[0];if(!o)return e;var i=r.replace(o,""),a=AB.has(n)?1:0;return o!==r&&(a*=100),n+"("+a+i+")"}var RB=/([a-z-]*)\(.*?\)/g,LB=yO(yO({},bD),{getAnimatableNone:function(e){var t=e.match(RB);return t?t.map(PB).join(" "):e}}),OB=TL(TL({},BO),{color:dD,backgroundColor:dD,outlineColor:dD,fill:dD,stroke:dD,borderColor:dD,borderTopColor:dD,borderRightColor:dD,borderBottomColor:dD,borderLeftColor:dD,filter:LB,WebkitFilter:LB}),MB=function(e){return OB[e]};function DB(e,t){var n,r=MB(e);return r!==LB&&(r=bD),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}function BB(e,t,n){var r;return Array.isArray(t.to)&&(null!==(r=e.duration)&&void 0!==r||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=PL([],AL(e.to)),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=NL(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=TL(TL({},e),function(e,t){var n;return n=sM(t)?TB:NB[e]||NB.default,TL({to:t},n(t))}(n,t.to))),TL(TL({},t),function(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,i=e.loop,a=NL(e,["ease","times","yoyo","flip","loop"]),s=TL({},a);return n&&(s.offset=n),a.duration&&(s.duration=mB(a.duration)),a.repeatDelay&&(s.repeatDelay=mB(a.repeatDelay)),t&&(s.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(_B):_B(t)),"tween"===a.type&&(s.type="keyframes"),(r||i||o)&&(r?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||r||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}(e))}function FB(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function jB(e){return"number"==typeof e?0:DB("",e)}function zB(e,t){return e[t]||e.default||e}function HB(e,t,n,r){return void 0===r&&(r={}),t.start((function(o){var i,a,s=function(e,t,n,r,o){var i,a=zB(r,e),s=null!==(i=a.from)&&void 0!==i?i:t.get(),l=EB(e,n);return"none"===s&&l&&"string"==typeof n?s=DB(e,n):FB(s)&&"string"==typeof n?s=jB(n):!Array.isArray(n)&&FB(n)&&"string"==typeof s&&(n=jB(s)),EB(e,s)&&l&&!1!==a.type?function(){var r={from:s,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function(e){var t,n=e.from,r=void 0===n?0:n,o=e.velocity,i=void 0===o?0:o,a=e.min,s=e.max,l=e.power,c=void 0===l?.8:l,u=e.timeConstant,d=void 0===u?750:u,p=e.bounceStiffness,f=void 0===p?500:p,m=e.bounceDamping,h=void 0===m?10:m,g=e.restDelta,v=void 0===g?1:g,b=e.modifyTarget,y=e.driver,w=e.onUpdate,k=e.onComplete;function x(e){return void 0!==a&&e<a||void 0!==s&&e>s}function _(e){return void 0===a?s:void 0===s||Math.abs(a-e)<Math.abs(s-e)?a:s}function E(e){null==t||t.stop(),t=pB(VM(VM({},e),{driver:y,onUpdate:function(t){var n;null==w||w(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:k}))}function C(e){E(VM({type:"spring",stiffness:f,damping:h,restDelta:v},e))}if(x(r))C({from:r,velocity:i,to:_(r)});else{var S=c*i+r;void 0!==b&&(S=b(S));var I,T,N=_(S),A=N===a?-1:1;E({type:"decay",from:r,velocity:i,timeConstant:d,power:c,restDelta:v,modifyTarget:b,onUpdate:x(S)?function(e){I=T,T=e,i=fB(e-I,lB().delta),(1===A&&e>N||-1===A&&e<N)&&C({from:e,to:N,velocity:i})}:void 0})}return{stop:function(){return null==t?void 0:t.stop()}}}(TL(TL({},r),a)):pB(TL(TL({},BB(a,r,e)),{onUpdate:function(e){var t;r.onUpdate(e),null===(t=a.onUpdate)||void 0===t||t.call(a,e)},onComplete:function(){var e;r.onComplete(),null===(e=a.onComplete)||void 0===e||e.call(a)}}))}:function(){var e;return t.set(n),o(),null===(e=null==a?void 0:a.onComplete)||void 0===e||e.call(a),{stop:function(){}}}}(e,t,n,r,o),l=function(e,t){var n;return null!==(n=(zB(e,t)||{}).delay)&&void 0!==n?n:0}(r,e),c=function(){return a=s()};return l?i=setTimeout(c,mB(l)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}var VB=function(e){return/^\-?\d*\.?\d+$/.test(e)};function WB(e,t){-1===e.indexOf(t)&&e.push(t)}function ZB(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var UB=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return WB(this.subscriptions,e),function(){return ZB(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(e,t,n)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),$B=function(){function e(e){var t,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new UB,this.velocityUpdateSubscribers=new UB,this.renderSubscribers=new UB,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),n.prev=n.current,n.current=e;var r=lB(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,cB.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),t&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return cB.postRender(n.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t)))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?fB(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function GB(e){return new $B(e)}var qB=function(e){return function(t){return t.test(e)}},KB=[LO,NO,TO,IO,PO,AO,{test:function(e){return"auto"===e},parse:function(e){return e}}],YB=function(e){return KB.find(qB(e))},XB=PL(PL([],AL(KB)),[dD,bD]),JB=function(e){return XB.find(qB(e))};function QB(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,GB(n))}function eF(e,t){if(t)return(t[e]||t.default||t).from}function tF(e,t,n){var r;void 0===n&&(n={});var o=JL(e,t,n.custom),i=(o||{}).transition,a=void 0===i?e.getDefaultTransition()||{}:i;n.transitionOverride&&(a=n.transitionOverride);var s=o?function(){return nF(e,o,n)}:function(){return Promise.resolve()},l=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var o=a.delayChildren,i=void 0===o?0:o,s=a.staggerChildren,l=a.staggerDirection;return function(e,t,n,r,o,i){void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=1);var a=[],s=(e.variantChildren.size-1)*r,l=1===o?function(e){return void 0===e&&(e=0),e*r}:function(e){return void 0===e&&(e=0),s-e*r};return Array.from(e.variantChildren).sort(rF).forEach((function(e,r){a.push(tF(e,t,TL(TL({},i),{delay:n+l(r)})).then((function(){return e.notifyAnimationComplete(t)})))})),Promise.all(a)}(e,t,i+r,s,l,n)}:function(){return Promise.resolve()},c=a.when;if(c){var u=AL("beforeChildren"===c?[s,l]:[l,s],2),d=u[0],p=u[1];return d().then(p)}return Promise.all([s(),l(n.delay)])}function nF(e,t,n){var r,o=void 0===n?{}:n,i=o.delay,a=void 0===i?0:i,s=o.transitionOverride,l=o.type,c=e.makeTargetAnimatable(t),u=c.transition,d=void 0===u?e.getDefaultTransition():u,p=c.transitionEnd,f=NL(c,["transition","transitionEnd"]);s&&(d=s);var m=[],h=l&&(null===(r=e.animationState)||void 0===r?void 0:r.getState()[l]);for(var g in f){var v=e.getValue(g),b=f[g];if(!(!v||void 0===b||h&&oF(h,g))){var y=HB(g,v,b,TL({delay:a},d));m.push(y)}}return Promise.all(m).then((function(){p&&function(e,t){var n=JL(e,t),r=n?e.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,i=void 0===o?{}:o;r.transition;var a=NL(r,["transitionEnd","transition"]);for(var s in a=TL(TL({},a),i))QB(e,s,lM(a[s]))}(e,p)}))}function rF(e,t){return e.sortNodePosition(t)}function oF(e,t){var n=e.protectedKeys,r=e.needsAnimating,o=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,o}var iF=[pM.Animate,pM.Hover,pM.Tap,pM.Drag,pM.Focus,pM.Exit],aF=PL([],AL(iF)).reverse(),sF=iF.length;function lF(e){var t,n=function(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return function(e,t,n){var r;if(void 0===n&&(n={}),e.notifyAnimationStart(),Array.isArray(t)){var o=t.map((function(t){return tF(e,t,n)}));r=Promise.all(o)}else if("string"==typeof t)r=tF(e,t,n);else{var i="function"==typeof t?JL(e,t,n.custom):t;r=nF(e,i,n)}return r.then((function(){return e.notifyAnimationComplete(t)}))}(e,n,r)})))}}(e),r=((t={})[pM.Animate]=cF(!0),t[pM.Hover]=cF(),t[pM.Tap]=cF(),t[pM.Drag]=cF(),t[pM.Focus]=cF(),t[pM.Exit]=cF(),t),o={},i=!0,a=function(t,n){var r=JL(e,n);if(r){r.transition;var o=r.transitionEnd,i=NL(r,["transition","transitionEnd"]);t=TL(TL(TL({},t),i),o)}return t};function s(t,s){for(var l,c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],p=new Set,f={},m=1/0,h=function(n){var o=aF[n],h=r[o],g=null!==(l=c[o])&&void 0!==l?l:u[o],v=YL(g),b=o===s?h.isActive:null;!1===b&&(m=n);var y=g===u[o]&&g!==c[o]&&v;if(y&&i&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys=TL({},f),!h.isActive&&null===b||!g&&!h.prevProp||aM(g)||"boolean"==typeof g)return"continue";var w=function(e,t){return"string"==typeof t?t!==e:!!KL(t)&&!HM(t,e)}(h.prevProp,g)||o===s&&h.isActive&&!y&&v||n>m&&v,k=Array.isArray(g)?g:[g],x=k.reduce(a,{});!1===b&&(x={});var _=h.prevResolvedValues,E=void 0===_?{}:_,C=TL(TL({},E),x),S=function(e){w=!0,p.delete(e),h.needsAnimating[e]=!0};for(var I in C){var T=x[I],N=E[I];f.hasOwnProperty(I)||(T!==N?sM(T)&&sM(N)?HM(T,N)?h.protectedKeys[I]=!0:S(I):void 0!==T?S(I):p.add(I):void 0!==T&&p.has(I)?S(I):h.protectedKeys[I]=!0)}h.prevProp=g,h.prevResolvedValues=x,h.isActive&&(f=TL(TL({},f),x)),i&&e.blockInitialAnimation&&(w=!1),w&&!y&&d.push.apply(d,PL([],AL(k.map((function(e){return{animation:e,options:TL({type:o},t)}})))))},g=0;g<sF;g++)h(g);if(o=TL({},f),p.size){var v={};p.forEach((function(t){var n=e.getBaseTarget(t);void 0!==n&&(v[t]=n)})),d.push({animation:v})}var b=Boolean(d.length);return i&&!1===c.initial&&!e.manuallyAnimateOnMount&&(b=!1),i=!1,b?n(d):Promise.resolve()}return{isAnimated:function(e){return void 0!==o[e]},animateChanges:s,setActive:function(t,n,o){var i;return r[t].isActive===n?Promise.resolve():(null===(i=e.variantChildren)||void 0===i||i.forEach((function(e){var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)})),r[t].isActive=n,s(o,t))},setAnimateFunction:function(t){n=t(e)},getState:function(){return r}}}function cF(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var uF={animation:jM((function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=lF(t)),aM(n)&&(0,_.useEffect)((function(){return n.subscribe(t)}),[n])})),exit:jM((function(e){var t=e.custom,n=e.visualElement,r=AL(HL(),2),o=r[0],i=r[1],a=(0,_.useContext)(jL);(0,_.useEffect)((function(){var e,r,s=null===(e=n.animationState)||void 0===e?void 0:e.setActive(pM.Exit,!o,{custom:null!==(r=null==a?void 0:a.custom)&&void 0!==r?r:t});!o&&(null==s||s.then(i))}),[o])}))},dF=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},pF=function(e){return dF(e)&&e.hasOwnProperty("z")},fF=function(e,t){return Math.abs(e-t)};function mF(e,t){if(yD(e)&&yD(t))return fF(e,t);if(dF(e)&&dF(t)){var n=fF(e.x,t.x),r=fF(e.y,t.y),o=pF(e)&&pF(t)?fF(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var hF=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=bF(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=mF(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,i=lB().timestamp;r.history.push(TL(TL({},o),{timestamp:i}));var a=r.handlers,s=a.onStart,l=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=gF(t,r.transformPagePoint),vM(e)&&0===e.buttons?r.handlePointerUp(e,t):cB.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=bF(gF(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,a),i&&i(e,a)},!(bM(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var i=gF(xM(e),this.transformPagePoint),a=i.point,s=lB().timestamp;this.history=[TL(TL({},a),{timestamp:s})];var l=t.onSessionStart;l&&l(e,bF(i,this.history)),this.removeListeners=FM(IM(window,"pointermove",this.handlePointerMove),IM(window,"pointerup",this.handlePointerUp),IM(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),rB.update(this.updatePoint)},e}();function gF(e,t){return t?{point:t(e.point)}:e}function vF(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bF(e,t){var n=e.point;return{point:n,delta:vF(n,wF(t)),offset:vF(n,yF(t)),velocity:kF(t,.1)}}function yF(e){return e[0]}function wF(e){return e[e.length-1]}function kF(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=wF(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mB(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function xF(e){return e}function _F(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var EF={translate:0,scale:1,origin:0,originPoint:0};function CF(){return{x:TL({},EF),y:TL({},EF)}}function SF(e){return[e("x"),e("y")]}function IF(e,t,n){var r=t.min,o=t.max;return void 0!==r&&e<r?e=n?JM(r,e,n.min):Math.max(e,r):void 0!==o&&e>o&&(e=n?JM(o,e,n.max):Math.min(e,o)),e}function TF(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function NF(e,t){var n,r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&(r=(n=AL([o,r],2))[0],o=n[1]),{min:e.min+r,max:e.min+o}}function AF(e,t,n){return{min:PF(e,t),max:PF(e,n)}}function PF(e,t){var n;return"number"==typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}function RF(e,t){return _F(function(e,t){var n=e.top,r=e.left,o=e.bottom,i=e.right;void 0===t&&(t=xF);var a=t({x:r,y:n}),s=t({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(e.getBoundingClientRect(),t))}function LF(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),mF(e,t)<n}function OF(e){return e.max-e.min}function MF(e,t,n,r){void 0===r&&(r=.5),e.origin=r,e.originPoint=JM(t.min,t.max,e.origin),e.scale=OF(n)/OF(t),LF(e.scale,1,1e-4)&&(e.scale=1),e.translate=JM(n.min,n.max,e.origin)-e.originPoint,LF(e.translate)&&(e.translate=0)}function DF(e,t,n,r){MF(e.x,t.x,n.x,BF(r.originX)),MF(e.y,t.y,n.y,BF(r.originY))}function BF(e){return"number"==typeof e?e:.5}function FF(e,t,n){e.min=n.min+t.min,e.max=e.min+OF(t)}var jF=function(e,t){return e.depth-t.depth};function zF(e){return e.projection.isEnabled||e.shouldResetTransform()}function HF(e,t){void 0===t&&(t=[]);var n=e.parent;return n&&HF(n,t),zF(e)&&t.push(e),t}function VF(e){if(!e.shouldResetTransform()){var t,n=e.getLayoutState();e.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=e.measureViewportBox(),n.layoutCorrected=(t=n.layout,{x:TL({},t.x),y:TL({},t.y)}),e.notifyLayoutMeasure(n.layout,e.prevViewportBox||n.layout),cB.update((function(){return e.rebaseProjectionTarget()}))}}function WF(e,t){return{min:t.min-e.min,max:t.max-e.min}}function ZF(e,t){return{x:WF(e.x,t.x),y:WF(e.y,t.y)}}function UF(e,t){var n=e.getLayoutId(),r=t.getLayoutId();return n!==r||void 0===r&&e!==t}function $F(e){var t=e.getProps(),n=t.drag,r=t._dragX;return n&&!r}function GF(e,t){e.min=t.min,e.max=t.max}function qF(e,t,n){return n+t*(e-n)}function KF(e,t,n,r,o){return void 0!==o&&(e=qF(e,o,r)),qF(e,n,r)+t}function YF(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),e.min=KF(e.min,t,n,r,o),e.max=KF(e.max,t,n,r,o)}function XF(e,t){var n=t.x,r=t.y;YF(e.x,n.translate,n.scale,n.originPoint),YF(e.y,r.translate,r.scale,r.originPoint)}function JF(e,t,n,r){var o=AL(r,3),i=o[0],a=o[1],s=o[2];e.min=t.min,e.max=t.max;var l=void 0!==n[s]?n[s]:.5,c=JM(t.min,t.max,l);YF(e,n[i],n[a],c,n.scale)}var QF=["x","scaleX","originX"],ej=["y","scaleY","originY"];function tj(e,t,n){JF(e.x,t.x,n,QF),JF(e.y,t.y,n,ej)}function nj(e,t,n,r,o){return e=qF(e-=t,1/n,r),void 0!==o&&(e=qF(e,1/o,r)),e}function rj(e,t,n){var r=AL(n,3),o=r[0],i=r[1],a=r[2];!function(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5);var i=JM(e.min,e.max,r)-t;e.min=nj(e.min,t,n,i,o),e.max=nj(e.max,t,n,i,o)}(e,t[o],t[i],t[a],t.scale)}function oj(e,t){rj(e.x,t,QF),rj(e.y,t,ej)}var ij=new Set;function aj(e,t,n){e[n]||(e[n]=[]),e[n].push(t)}function sj(e){return ij.add(e),function(){return ij.delete(e)}}function lj(){if(ij.size){var e=0,t=[[]],n=[],r=function(n){return aj(t,n,e)},o=function(t){aj(n,t,e),e++};ij.forEach((function(t){t(r,o),e=0})),ij.clear();for(var i=n.length,a=0;a<=i;a++)t[a]&&t[a].forEach(uj),n[a]&&n[a].forEach(uj)}}var cj,uj=function(e){return e()},dj=new WeakMap,pj=function(){function e(e){var t=e.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=t,this.visualElement.enableLayoutProjection(),dj.set(t,this)}return e.prototype.start=function(e,t){var n=this,r=void 0===t?{}:t,o=r.snapToCursor,i=void 0!==o&&o,a=r.cursorProgress,s=this.props.transformPagePoint;this.panSession=new hF(e,{onSessionStart:function(e){var t;n.stopMotion();var r=function(e){return xM(e,"client")}(e).point;null===(t=n.cancelLayout)||void 0===t||t.call(n),n.cancelLayout=sj((function(e,t){var o=HF(n.visualElement),s=function(e){var t=[],n=function(e){zF(e)&&t.push(e),e.children.forEach(n)};return e.children.forEach(n),t.sort(jF)}(n.visualElement),l=PL(PL([],AL(o)),AL(s)),c=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),t((function(){l.forEach((function(e){return e.resetTransform()}))})),e((function(){VF(n.visualElement),s.forEach(VF)})),t((function(){l.forEach((function(e){return e.restoreTransform()})),i&&(c=n.snapToCursor(r))})),e((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var e=n.visualElement.projection;SF((function(t){if(!c){var o=e.target[t],i=o.min,s=o.max;n.cursorProgress[t]=a?a[t]:XM(i,s,r[t])}var l=n.getAxisMotionValue(t);l&&(n.originPoint[t]=l.get())}))})),t((function(){oB.update(),oB.preRender(),oB.render(),oB.postRender()})),e((function(){return n.resolveDragConstraints()}))}))},onStart:function(e,t){var r,o,i,a=n.props,s=a.drag,l=a.dragPropagation;(!s||l||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=RM(s),n.openGlobalLock))&&(lj(),n.isDragging=!0,n.currentDirection=null,null===(o=(r=n.props).onDragStart)||void 0===o||o.call(r,e,t),null===(i=n.visualElement.animationState)||void 0===i||i.setActive(pM.Drag,!0))},onMove:function(e,t){var r,o,i,a,s=n.props,l=s.dragPropagation,c=s.dragDirectionLock;if(l||n.openGlobalLock){var u=t.offset;if(c&&null===n.currentDirection)return n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(u),void(null!==n.currentDirection&&(null===(o=(r=n.props).onDirectionLock)||void 0===o||o.call(r,n.currentDirection)));n.updateAxis("x",t.point,u),n.updateAxis("y",t.point,u),null===(a=(i=n.props).onDrag)||void 0===a||a.call(i,e,t),cj=e}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:s})},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(qL(n)?this.resolveRefConstraints(o,n):function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:TF(e.x,r,i),y:TF(e.y,n,o)}}(o,n)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:AF(e,"left","right"),y:AF(e,"top","bottom")}}(r),this.constraints&&!this.hasMutatedConstraints&&SF((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(e,t){var n=this.props,r=n.onMeasureDragConstraints,o=n.transformPagePoint,i=t.current;this.constraintsBox=RF(i,o);var a=function(e,t){return{x:NF(e.x,t.x),y:NF(e.y,t.y)}}(e,this.constraintsBox);if(r){var s=r(function(e){var t=e.x,n=e.y;return{top:n.min,bottom:n.max,left:t.min,right:t.max}}(a));this.hasMutatedConstraints=!!s,s&&(a=_F(s))}return a},e.prototype.cancelDrag=function(){var e,t;this.visualElement.unlockProjectionTarget(),null===(e=this.cancelLayout)||void 0===e||e.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(pM.Drag,!1)},e.prototype.stop=function(e,t){var n,r,o;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var i=this.isDragging;if(this.cancelDrag(),i){var a=t.velocity;this.animateDragEnd(a),null===(o=(r=this.props).onDragEnd)||void 0===o||o.call(r,e,t)}},e.prototype.snapToCursor=function(e){var t=this;return SF((function(n){if(fj(n,t.props.drag,t.currentDirection)){var r=t.getAxisMotionValue(n);if(!r)return t.cursorProgress[n]=.5,!0;var o=t.visualElement.getLayoutState().layout,i=o[n].max-o[n].min,a=o[n].min+i/2,s=e[n]-a;t.originPoint[n]=e[n],r.set(s)}})).includes(!0)},e.prototype.updateAxis=function(e,t,n){if(fj(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,n):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var n=this.getAxisMotionValue(e);if(t&&n){var r=this.originPoint[e]+t[e],o=this.constraints?IF(r,this.constraints[e],this.elastic[e]):r;n.set(o)}},e.prototype.updateVisualElementAxis=function(e,t){var n,r=this.visualElement.getLayoutState().layout[e],o=r.max-r.min,i=this.cursorProgress[e],a=function(e,t,n,r,o){var i=e-t*n;return r?IF(i,r,o):i}(t[e],o,i,null===(n=this.constraints)||void 0===n?void 0:n[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,a,a+o)},e.prototype.setProps=function(e){var t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,i=e.dragPropagation,a=void 0!==i&&i,s=e.dragConstraints,l=void 0!==s&&s,c=e.dragElastic,u=void 0===c?.35:c,d=e.dragMomentum,p=void 0===d||d,f=NL(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=TL({drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:u,dragMomentum:p},f)},e.prototype.getAxisMotionValue=function(e){var t=this.props,n=t.layout,r=t.layoutId,o="_drag"+e.toUpperCase();return this.props[o]?this.props[o]:n||void 0!==r?void 0:this.visualElement.getValue(e,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var e=this.props,t=e._dragX,n=e._dragY;return t||n},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,s=function(e,t){void 0===t&&(t=!0);var n,r=e.getProjectionParent();return!!r&&(t?oj(n=ZF(r.projection.target,e.projection.target),r.getLatestValues()):n=ZF(r.getLayoutState().layout,e.getLayoutState().layout),SF((function(t){return e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),l=this.constraints||{};if(s&&Object.keys(l).length&&this.isLayoutDrag()){var c=this.visualElement.getProjectionParent();if(c){var u=ZF(c.projection.targetFinal,l);SF((function(e){var t=u[e],n=t.min,r=t.max;l[e]={min:isNaN(n)?void 0:n,max:isNaN(r)?void 0:r}}))}}var d=SF((function(n){var c;if(fj(n,r,t.currentDirection)){var u=null!==(c=null==l?void 0:l[n])&&void 0!==c?c:{},d=i?200:1e6,p=i?40:1e7,f=TL(TL({type:"inertia",velocity:o?e[n]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10},a),u);return t.getAxisMotionValue(n)?t.startAxisValueAnimation(n,f):t.visualElement.startLayoutAnimation(n,f,s)}}));return Promise.all(d).then((function(){var e,n;null===(n=(e=t.props).onDragTransitionEnd)||void 0===n||n.call(e)}))},e.prototype.stopMotion=function(){var e=this;SF((function(t){var n=e.getAxisMotionValue(t);n?n.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var n=this.getAxisMotionValue(e);if(n){var r=n.get();return n.set(r),n.set(r),HB(e,n,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.drag;if(qL(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};SF((function(t){r[t]=function(e,t){var n=.5,r=OF(e),o=OF(t);return o>r?n=XM(t.min,t.max-r,e.min):r>o&&(n=XM(e.min,e.max-o,t.min)),function(e){return ZM(0,1,e)}(n)}(e.visualElement.projection.target[t],e.constraintsBox[t])})),this.updateConstraints((function(){SF((function(t){if(fj(t,n,null)){var o=function(e,t,n){var r=e.max-e.min,o=JM(t.min,t.max-r,n);return{min:o,max:o+r}}(e.visualElement.projection.target[t],e.constraintsBox[t],r[t]),i=o.min,a=o.max;e.visualElement.setProjectionTargetAxis(t,i,a)}}))})),setTimeout(lj,1)}},e.prototype.updateConstraints=function(e){var t=this;this.cancelLayout=sj((function(n,r){var o=HF(t.visualElement);r((function(){return o.forEach((function(e){return e.resetTransform()}))})),n((function(){return VF(t.visualElement)})),r((function(){return o.forEach((function(e){return e.restoreTransform()}))})),n((function(){t.resolveDragConstraints()})),e&&r(e)}))},e.prototype.mount=function(e){var t=this,n=IM(e.getInstance(),"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=hM(window,"resize",(function(){t.scalePoint()})),o=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),i=e.prevDragCursor;return i&&this.start(cj,{cursorProgress:i}),function(){null==n||n(),null==r||r(),null==o||o(),t.cancelDrag()}},e}();function fj(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var mj,hj,gj={pan:jM((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||n||r||o,s=(0,_.useRef)(null),l=(0,_.useContext)(BL).transformPagePoint,c={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){s.current=null,r&&r(e,t)}};(0,_.useEffect)((function(){null!==s.current&&s.current.updateHandlers(c)})),TM(i,"pointerdown",a&&function(e){s.current=new hF(e,c,{transformPagePoint:l})}),DM((function(){return s.current&&s.current.end()}))})),drag:jM((function(e){var t=e.dragControls,n=e.visualElement,r=(0,_.useContext)(BL).transformPagePoint,o=zL((function(){return new pj({visualElement:n})}));o.setProps(TL(TL({},e),{transformPagePoint:r})),(0,_.useEffect)((function(){return t&&t.subscribe(o)}),[o]),(0,_.useEffect)((function(){return o.mount(n)}),[])}))};function vj(e){return"string"==typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(mj||(mj={})),function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"}(hj||(hj={}));var bj=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function yj(e,t,n){void 0===n&&(n=1);var r=AL(function(e){var t=bj.exec(e);if(!t)return[,];var n=AL(t,3);return[n[1],n[2]]}(e),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(t).getPropertyValue(o);return a?a.trim():vj(i)?yj(i,t,n+1):i}}function wj(e,t){return e/(t.max-t.min)*100}var kj="_$css",xj={process:function(e,t,n){var r=n.target;if("string"==typeof e){if(!NO.test(e))return e;e=parseFloat(e)}return wj(e,r.x)+"% "+wj(e,r.y)+"%"}},_j={borderRadius:TL(TL({},xj),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:xj,borderTopRightRadius:xj,borderBottomLeftRadius:xj,borderBottomRightRadius:xj,boxShadow:{process:function(e,t){var n=t.delta,r=t.treeScale,o=e,i=e.includes("var("),a=[];i&&(e=e.replace(bj,(function(e){return a.push(e),kj})));var s=bD.parse(e);if(s.length>5)return o;var l=bD.createTransformer(e),c="number"!=typeof s[0]?1:0,u=n.x.scale*r.x,d=n.y.scale*r.y;s[0+c]/=u,s[1+c]/=d;var p=JM(u,d,.5);"number"==typeof s[2+c]&&(s[2+c]/=p),"number"==typeof s[3+c]&&(s[3+c]/=p);var f=l(s);if(i){var m=0;f=f.replace(kj,(function(){var e=a[m];return m++,e}))}return f}}},Ej=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},t.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},t.isAnimating={x:!1,y:!1},t.stopAxisAnimation={x:void 0,y:void 0},t.isAnimatingTree=!1,t.animate=function(e,n,r){void 0===r&&(r={});var o=r.originBox,i=r.targetBox,a=r.visibilityAction,s=r.shouldStackAnimate,l=r.onComplete,c=r.prevParent,u=NL(r,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),d=t.props,p=d.visualElement,f=d.layout;if(!1===s)return t.isAnimatingTree=!1,t.safeToRemove();if(!t.isAnimatingTree||!0===s){s&&(t.isAnimatingTree=!0),n=o||n,e=i||e;var m=!1,h=p.getProjectionParent();if(h){var g=h.prevViewportBox,v=h.getLayoutState().layout;c&&(i&&(v=c.getLayoutState().layout),o&&!UF(c,h)&&c.prevViewportBox&&(g=c.prevViewportBox)),g&&Aj(c,o,i)&&(m=!0,n=ZF(g,n),e=ZF(v,e))}var b=Cj(n,e),y=SF((function(r){var o,i;if("position"===f){var s=e[r].max-e[r].min;n[r].max=n[r].min+s}if(!p.projection.isTargetLocked)return void 0===a?b?t.animateAxis(r,e[r],n[r],TL(TL({},u),{isRelative:m})):(null===(i=(o=t.stopAxisAnimation)[r])||void 0===i||i.call(o),p.setProjectionTargetAxis(r,e[r].min,e[r].max,m)):void p.setVisibility(a===hj.Show)}));return p.syncRender(),Promise.all(y).then((function(){t.isAnimatingTree=!1,l&&l(),p.notifyLayoutAnimationComplete()}))}},t}return IL(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=HB,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},function(e){for(var t in e)aO[t]=e[t]}(_j)},t.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),SF((function(t){var n,r;return null===(r=(n=e.stopAxisAnimation)[t])||void 0===r?void 0:r.call(n)}))},t.prototype.animateAxis=function(e,t,n,r){var o,i,a=this,s=void 0===r?{}:r,l=s.transition,c=s.isRelative;if(!this.isAnimating[e]||!Tj(t,this.currentAnimationTarget[e])){null===(i=(o=this.stopAxisAnimation)[e])||void 0===i||i.call(o),this.isAnimating[e]=!0;var u=this.props.visualElement,d=this.frameTarget[e],p=u.getProjectionAnimationProgress()[e];p.clearListeners(),p.set(0),p.set(0);var f=function(){var r=p.get()/1e3;!function(e,t,n,r){e.min=JM(t.min,n.min,r),e.max=JM(t.max,n.max,r)}(d,n,t,r),u.setProjectionTargetAxis(e,d.min,d.max,c)};f();var m=p.onChange(f);this.stopAxisAnimation[e]=function(){a.isAnimating[e]=!1,p.stop(),m()},this.currentAnimationTarget[e]=t;var h=l||u.getDefaultTransition()||Nj;return HB("x"===e?"layoutX":"layoutY",p,1e3,h&&zB(h,"layout")).then(this.stopAxisAnimation[e])}},t.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},t.prototype.render=function(){return null},t}(_.Component);function Cj(e,t){return!(Ij(e)||Ij(t)||Tj(e.x,t.x)&&Tj(e.y,t.y))}var Sj={min:0,max:0};function Ij(e){return Tj(e.x,Sj)&&Tj(e.y,Sj)}function Tj(e,t){return e.min===t.min&&e.max===t.max}var Nj={duration:.45,ease:[.4,0,.1,1]};function Aj(e,t,n){return e||!e&&!(t||n)}var Pj={layoutReady:function(e){return e.notifyLayoutReady()}};function Rj(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var n=void 0===t?Pj:t,r=n.layoutReady,o=n.parent;sj((function(t,n){var i=Array.from(e).sort(jF),a=o?HF(o):[];n((function(){PL(PL([],AL(a)),AL(i)).forEach((function(e){return e.resetTransform()}))})),t((function(){i.forEach(VF)})),n((function(){a.forEach((function(e){return e.restoreTransform()})),i.forEach(r)})),t((function(){i.forEach((function(e){e.isPresent&&(e.presence=mj.Present)}))})),n((function(){oB.preRender(),oB.render()})),t((function(){cB.postRender((function(){return i.forEach(Lj)})),e.clear()}))})),lj()}}}function Lj(e){e.prevViewportBox=e.projection.target}var Oj=(0,_.createContext)(Rj()),Mj=(0,_.createContext)(Rj());function Dj(e){return!!e.forceUpdate}var Bj=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return IL(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,n=e.framerSyncLayout,r=e.visualElement;Dj(t)&&t.register(r),Dj(n)&&n.register(r),r.onUnmount((function(){Dj(t)&&t.remove(r),Dj(n)&&n.remove(r)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,n=e.visualElement;return Dj(t)?t.syncUpdate():(function(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}(n),t.add(n)),null},t.prototype.componentDidUpdate=function(){var e=this.props.syncLayout;Dj(e)||e.flush()},t.prototype.render=function(){return null},t}(E().Component),Fj={measureLayout:function(e){var t=(0,_.useContext)(Oj),n=(0,_.useContext)(Mj);return E().createElement(Bj,TL({},e,{syncLayout:t,framerSyncLayout:n}))},layoutAnimation:function(e){var t=AL(HL(),2)[1];return _.createElement(Ej,TL({},e,{safeToRemove:t}))}};function jj(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:CF(),deltaFinal:CF(),deltaTransform:""}}var zj=jj();function Hj(e,t,n){var r=e.x,o=e.y,i="translate3d("+r.translate/t.x+"px, "+o.translate/t.y+"px, 0) ";if(n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(i+="rotate("+a+") "),s&&(i+="rotateX("+s+") "),l&&(i+="rotateY("+l+") ")}return i+="scale("+r.scale+", "+o.scale+")",n||i!==Wj?i:""}function Vj(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var Wj=Hj(zj.delta,zj.treeScale,{x:1,y:1}),Zj=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var Uj=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){WB(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){ZB(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(jF),this.isDirty=!1,this.children.forEach(e)},e}(),$j=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,o=e.getBaseTarget,i=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,c=e.resetTransform,u=e.restoreTransform,d=e.removeValueFromRenderState,p=e.sortNodePosition,f=e.scrapeMotionValuesFromProps;return function(e,t){var m=e.parent,h=e.props,g=e.presenceId,v=e.blockInitialAnimation,b=e.visualState;void 0===t&&(t={});var y,w,k,x,_,E,C=b.latestValues,S=b.renderState,I=function(){var e=Zj.map((function(){return new UB})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){return Zj.forEach((function(r){var o;null===(o=t[r])||void 0===o||o.call(t);var i="on"+r,a=e[i];a&&(t[r]=n[i](a))}))}};return e.forEach((function(e,t){n["on"+Zj[t]]=function(t){return e.add(t)},n["notify"+Zj[t]]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.notify.apply(e,PL([],AL(t)))}})),n}(),T={isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},N=T,A=C,P=jj(),R=!1,L=new Map,O=new Map,M={},D=TL({},C);function B(){y&&($.isProjectionReady()&&(tj(N.targetFinal,N.target,A),DF(P.deltaFinal,P.layoutCorrected,N.targetFinal,C)),F(),s(y,S))}function F(){var e=C;if(x&&x.isActive()){var n=x.getCrossfadeState($);n&&(e=n)}r($,S,e,N,P,t,h)}function j(){I.notifyUpdate(C)}function z(){$.layoutTree.forEach(qj)}var H=f(h);for(var V in H){var W=H[V];void 0!==C[V]&&hO(W)&&W.set(C[V],!1)}var Z=QL(h),U=eO(h),$=TL(TL({treeType:n,current:null,depth:m?m.depth+1:0,parent:m,children:new Set,path:m?PL(PL([],AL(m.path)),[m]):[],layoutTree:m?m.layoutTree:new Uj,presenceId:g,projection:T,variantChildren:U?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==m?void 0:m.isMounted()),blockInitialAnimation:v,isMounted:function(){return Boolean(y)},mount:function(e){y=$.current=e,$.pointTo($),U&&m&&!Z&&(E=null==m?void 0:m.addVariantChild($)),null==m||m.children.add($)},unmount:function(){rB.update(j),rB.render(B),rB.preRender($.updateLayoutProjection),O.forEach((function(e){return e()})),$.stopLayoutAnimation(),$.layoutTree.remove($),null==E||E(),null==m||m.children.delete($),null==k||k(),I.clearAllListeners()},addVariantChild:function(e){var t,n=$.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),function(){return n.variantChildren.delete(e)}},sortNodePosition:function(e){return p&&n===e.treeType?p($.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return U?$:null==m?void 0:m.getClosestVariantNode()},scheduleUpdateLayoutProjection:m?m.scheduleUpdateLayoutProjection:function(){return cB.preRender($.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return h.layoutId},getInstance:function(){return y},getStaticValue:function(e){return C[e]},setStaticValue:function(e,t){return C[e]=t},getLatestValues:function(){return C},setVisibility:function(e){$.isVisible!==e&&($.isVisible=e,$.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),i($,e,h,t)},addValue:function(e,t){$.hasValue(e)&&$.removeValue(e),L.set(e,t),C[e]=t.get(),function(e,t){var n=t.onChange((function(t){C[e]=t,h.onUpdate&&cB.update(j,!1,!0)})),r=t.onRenderRequest($.scheduleRender);O.set(e,(function(){n(),r()}))}(e,t)},removeValue:function(e){var t;L.delete(e),null===(t=O.get(e))||void 0===t||t(),O.delete(e),delete C[e],d(e,S)},hasValue:function(e){return L.has(e)},getValue:function(e,t){var n=L.get(e);return void 0===n&&void 0!==t&&(n=GB(t),$.addValue(e,n)),n},forEachValue:function(e){return L.forEach(e)},readValue:function(e){var n;return null!==(n=C[e])&&void 0!==n?n:l(y,e,t)},setBaseTarget:function(e,t){D[e]=t},getBaseTarget:function(e){if(o){var t=o(h,e);if(void 0!==t&&!hO(t))return t}return D[e]}},I),{build:function(){return F(),S},scheduleRender:function(){cB.render(B,!1,!0)},syncRender:B,setProps:function(e){h=e,I.updatePropListeners(e),M=function(e,t,n){var r;for(var o in t){var i=t[o],a=n[o];if(hO(i))e.addValue(o,i);else if(hO(a))e.addValue(o,GB(i));else if(a!==i)if(e.hasValue(o)){var s=e.getValue(o);!s.hasAnimated&&s.set(i)}else e.addValue(o,GB(null!==(r=e.getStaticValue(o))&&void 0!==r?r:i))}for(var o in n)void 0===t[o]&&e.removeValue(o);return t}($,f(h),M)},getProps:function(){return h},getVariant:function(e){var t;return null===(t=h.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return h.transition},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null==m?void 0:m.getVariantContext();if(!Z){var t=(null==m?void 0:m.getVariantContext())||{};return void 0!==h.initial&&(t.initial=h.initial),t}for(var n={},r=0;r<Xj;r++){var o=Yj[r],i=h[o];(YL(i)||!1===i)&&(n[o]=i)}return n},enableLayoutProjection:function(){T.isEnabled=!0,$.layoutTree.add($)},lockProjectionTarget:function(){T.isTargetLocked=!0},unlockProjectionTarget:function(){$.stopLayoutAnimation(),T.isTargetLocked=!1},getLayoutState:function(){return P},setCrossfader:function(e){x=e},isProjectionReady:function(){return T.isEnabled&&T.isHydrated&&P.isHydrated},startLayoutAnimation:function(e,t,n){void 0===n&&(n=!1);var r=$.getProjectionAnimationProgress()[e],o=n?T.relativeTarget[e]:T.target[e],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(t){$.setProjectionTargetAxis(e,t,t+a,n)})),$.animateMotionValue(e,r,0,t)},stopLayoutAnimation:function(){SF((function(e){return $.getProjectionAnimationProgress()[e].stop()}))},measureViewportBox:function(e){void 0===e&&(e=!0);var n=a(y,t);return e||oj(n,C),n},getProjectionAnimationProgress:function(){return _||(_={x:GB(0),y:GB(0)}),_},setProjectionTargetAxis:function(e,t,n,r){var o;void 0===r&&(r=!1),r?(T.relativeTarget||(T.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),o=T.relativeTarget[e]):(T.relativeTarget=void 0,o=T.target[e]),T.isHydrated=!0,o.min=t,o.max=n,R=!0,I.notifySetAxisTarget()},rebaseProjectionTarget:function(e,t){void 0===t&&(t=P.layout);var n=$.getProjectionAnimationProgress(),r=n.x,o=n.y,i=!(T.relativeTarget||T.isTargetLocked||r.isAnimating()||o.isAnimating());(e||i)&&SF((function(e){var n=t[e],r=n.min,o=n.max;$.setProjectionTargetAxis(e,r,o)}))},notifyLayoutReady:function(e){!function(e){var t=e.getProjectionParent();if(t){var n=ZF(t.getLayoutState().layout,e.getLayoutState().layout);SF((function(t){e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)}))}else e.rebaseProjectionTarget()}($),$.notifyLayoutUpdate(P.layout,$.prevViewportBox||P.layout,e)},resetTransform:function(){return c($,y,h)},restoreTransform:function(){return u(y,S)},updateLayoutProjection:function(){if($.isProjectionReady()){var e=P.delta,t=P.treeScale,n=t.x,r=t.y,o=P.deltaTransform;(function(e,t,n,r){var o,i,a=e.delta,s=e.layout,l=e.layoutCorrected,c=e.treeScale,u=t.target;i=s,GF((o=l).x,i.x),GF(o.y,i.y),function(e,t,n){var r=n.length;if(r){var o,i;t.x=t.y=1;for(var a=0;a<r;a++)i=(o=n[a]).getLayoutState().delta,t.x*=i.x.scale,t.y*=i.y.scale,XF(e,i),$F(o)&&tj(e,e,o.getLatestValues())}}(l,c,n),DF(a,l,u,r)})(P,N,$.path,C),R&&$.notifyViewportBoxUpdate(N.target,e),R=!1;var i=Hj(e,t);i===o&&n===t.x&&r===t.y||$.scheduleRender(),P.deltaTransform=i}},updateTreeLayoutProjection:function(){$.layoutTree.forEach(Gj),cB.preRender(z,!1,!0)},getProjectionParent:function(){if(void 0===w){for(var e=!1,t=$.path.length-1;t>=0;t--){var n=$.path[t];if(n.projection.isEnabled){e=n;break}}w=e}return w},resolveRelativeTargetBox:function(){var e=$.getProjectionParent();if(T.relativeTarget&&e&&(function(e,t){FF(e.target.x,e.relativeTarget.x,t.target.x),FF(e.target.y,e.relativeTarget.y,t.target.y)}(T,e.projection),$F(e))){var t=T.target;tj(t,t,e.getLatestValues())}},shouldResetTransform:function(){return Boolean(h._layoutResetTransform)},pointTo:function(e){N=e.projection,A=e.getLatestValues(),null==k||k(),k=FM(e.onSetAxisTarget($.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;$.isPresent?$.presence=mj.Present:null===(e=$.layoutSafeToRemove)||void 0===e||e.call($)})))},isPresent:!0,presence:mj.Entering});return $}};function Gj(e){e.resolveRelativeTargetBox()}function qj(e){e.updateLayoutProjection()}var Kj,Yj=PL(["initial"],AL(iF)),Xj=Yj.length,Jj=new Set(["width","height","top","left","right","bottom","x","y"]),Qj=function(e){return Jj.has(e)},ez=function(e,t){e.set(t,!1),e.set(t)},tz=function(e){return e===LO||e===NO};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Kj||(Kj={}));var nz=function(e,t){return parseFloat(e.split(", ")[t])},rz=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return nz(i[1],t);var a=o.match(/^matrix\((.+)\)$/);return a?nz(a[1],e):0}},oz=new Set(["x","y","z"]),iz=lO.filter((function(e){return!oz.has(e)})),az={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:rz(4,13),y:rz(5,14)};function sz(e,t,n,r){return function(e){return Object.keys(e).some(Qj)}(t)?function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r={}),t=TL({},t),r=TL({},r);var o=Object.keys(t).filter(Qj),i=[],a=!1,s=[];if(o.forEach((function(o){var l=e.getValue(o);if(e.hasValue(o)){var c,u=n[o],d=t[o],p=YB(u);if(sM(d))for(var f=d.length,m=null===d[0]?1:0;m<f;m++)c?YB(d[m]):(c=YB(d[m]))===p||tz(p)&&tz(c);else c=YB(d);if(p!==c)if(tz(p)&&tz(c)){var h=l.get();"string"==typeof h&&l.set(parseFloat(h)),"string"==typeof d?t[o]=parseFloat(d):Array.isArray(d)&&c===NO&&(t[o]=d.map(parseFloat))}else(null==p?void 0:p.transform)&&(null==c?void 0:c.transform)&&(0===u||0===d)?0===u?l.set(c.transform(u)):t[o]=p.transform(d):(a||(i=function(e){var t=[];return iz.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.syncRender(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],ez(l,d))}})),s.length){var l=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),i=getComputedStyle(o),a=i.display,s={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===a&&t.setStaticValue("display",e.display||"block"),t.syncRender();var l=t.measureViewportBox();return n.forEach((function(n){var o=t.getValue(n);ez(o,az[n](r,s)),e[n]=az[n](l,i)})),e}(t,e,s);return i.length&&i.forEach((function(t){var n=AL(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.syncRender(),{target:l,transitionEnd:r}}return{target:t,transitionEnd:r}}(e,t,n,r):{target:t,transitionEnd:r}}var lz={treeType:"dom",readValueFromInstance:function(e,t){if(dO(t)){var n=MB(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r));return(vO(t)?o.getPropertyValue(t):o[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return RF(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var o=n.transformValues;void 0===r&&(r=!0);var i=t.transition,a=t.transitionEnd,s=NL(t,["transition","transitionEnd"]),l=function(e,t,n){var r,o,i={};for(var a in e)i[a]=null!==(r=eF(a,t))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(s,i||{},e);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),r){!function(e,t,n){var r,o,i,a,s=Object.keys(t).filter((function(t){return!e.hasValue(t)})),l=s.length;if(l)for(var c=0;c<l;c++){var u=s[c],d=t[u],p=null;Array.isArray(d)&&(p=d[0]),null===p&&(p=null!==(o=null!==(r=n[u])&&void 0!==r?r:e.readValue(u))&&void 0!==o?o:t[u]),null!=p&&("string"==typeof p&&VB(p)?p=parseFloat(p):!JB(p)&&bD.test(d)&&(p=DB(u,d)),e.addValue(u,GB(p)),null!==(i=(a=n)[u])&&void 0!==i||(a[u]=p),e.setBaseTarget(u,p))}}(e,s,l);var c=function(e,t,n,r){var o=function(e,t,n){var r,o=NL(t,[]),i=e.getInstance();if(!(i instanceof HTMLElement))return{target:o,transitionEnd:n};for(var a in n&&(n=TL({},n)),e.forEachValue((function(e){var t=e.get();if(vj(t)){var n=yj(t,i);n&&e.set(n)}})),o){var s=o[a];if(vj(s)){var l=yj(s,i);l&&(o[a]=l,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:o,transitionEnd:n}}(e,t,r);return sz(e,t=o.target,n,r=o.transitionEnd)}(e,s,l,a);a=c.transitionEnd,s=c.target}return TL({transition:i,transitionEnd:a},s)},scrapeMotionValuesFromProps:oM,build:function(e,t,n,r,o,i,a){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden");var s=r.isEnabled&&o.isHydrated;FO(t,n,r,o,i,a.transformTemplate,s?Hj:void 0,s?Vj:void 0)},render:tM},cz=$j(lz),uz=$j(TL(TL({},lz),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return dO(t)?(null===(n=MB(t))||void 0===n?void 0:n.default)||0:(t=nM.has(t)?t:eM(t),e.getAttribute(t))},scrapeMotionValuesFromProps:iM,build:function(e,t,n,r,o,i,a){var s=r.isEnabled&&o.isHydrated;KO(t,n,r,o,i,a.transformTemplate,s?Hj:void 0,s?Vj:void 0)},render:rM})),dz=function(e,t){return iO(e)?uz(t,{enableHardwareAcceleration:!1}):cz(t,{enableHardwareAcceleration:!0})},pz=TL(TL(TL(TL({},uF),zM),gj),Fj),fz=rO((function(e,t){return function(e,t,n,r){var o=t.forwardMotionProps,i=void 0!==o&&o,a=iO(e)?fM:mM;return TL(TL({},a),{preloadedFeatures:n,useRender:JO(i),createVisualElement:r,Component:e})}(e,t,pz,dz)}));function mz(e){return Eo((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 hz=(0,_.createContext)();function gz(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r}=(0,ur.Z)(Mb),o=(0,_.useContext)(hz),i=(0,_.useRef)(),{orientation:a,previousClientId:s,nextClientId:l,rootClientId:c,isInserterShown:u}=(0,cr.Z)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:a,getNextBlockClientId:s}=e(Mb),l=o(),c=n(l.rootClientId);if(!c.length)return{};let u=c[l.index-1],d=c[l.index];for(;i(u);)u=a(u);for(;i(d);)d=s(d);return{previousClientId:u,nextClientId:d,orientation:(null===(t=r(l.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:l.rootClientId,isInserterShown:null==l?void 0:l.__unstableWithInserter}}),[]),d=vN(s),p=vN(l),f="vertical"===a,m=(0,_.useMemo)((()=>{if(!d&&!p)return{};const e=d?d.getBoundingClientRect():null,t=p?p.getBoundingClientRect():null;if(f)return{width:d?d.offsetWidth:p.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=q()?e.left-t.right:t.left-e.right),{width:n,height:d?d.offsetHeight:p.offsetHeight}}),[d,p]),h=(0,_.useCallback)((()=>{if(!d&&!p)return{};const{ownerDocument:e}=d||p,t=d?d.getBoundingClientRect():null,n=p?p.getBoundingClientRect():null;return f?q()?{top:t?t.bottom:n.top,left:t?t.right:n.right,right:t?t.left:n.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t?t.bottom:n.top,left:t?t.left:n.left,right:t?t.right:n.right,bottom:n?n.top:t.bottom,ownerDocument:e}:q()?{top:t?t.top:n.top,left:t?t.left:n.right,right:n?n.right:t.left,bottom:t?t.bottom:n.bottom,ownerDocument:e}:{top:t?t.top:n.top,left:t?t.right:n.left,right:n?n.left:t.right,bottom:t?t.bottom:n.bottom,ownerDocument:e}}),[d,p]),g=mz(n),v=L_(),b=Lr()("block-editor-block-list__insertion-point","is-"+a),y=d&&p&&u,w={start:{...f?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{...f?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:y?.4:0}},hover:{...f?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},k={start:{scale:v?1:0},rest:{scale:1,transition:{delay:.2}}};return(0,_.createElement)(Na,{ref:g,noArrow:!0,animate:!1,getAnchorRect:h,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:t||null,key:l+"--"+c},(0,_.createElement)(fz.div,{layout:!v,initial:v?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:i,tabIndex:-1,onClick:function(e){e.target===i.current&&l&&r(l,-1)},onFocus:function(e){e.target!==i.current&&(o.current=!0)},className:Lr()(b,{"is-with-inserter":y}),style:m},(0,_.createElement)(fz.div,{variants:w,className:"block-editor-block-list__insertion-point-indicator"}),y&&(0,_.createElement)(fz.div,{variants:k,className:Lr()("block-editor-block-list__insertion-point-inserter")},(0,_.createElement)(kL,{position:"bottom center",clientId:l,rootClientId:c,__experimentalIsQuick:!0,onToggle:e=>{o.current=e},onSelectOrClose:()=>{o.current=!1}}))))}function vz(e){let{children:t,__unstablePopoverSlot:n,__unstableContentRef:r}=e;const o=(0,cr.Z)((e=>e(Mb).isBlockInsertionPointVisible()),[]);return(0,_.createElement)(hz.Provider,{value:(0,_.useRef)(!1)},o&&(0,_.createElement)(gz,{__unstablePopoverSlot:n,__unstableContentRef:r}),t)}function bz(){const e=(0,_.useContext)(hz),t=(0,cr.Z)((e=>e(Mb).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:a,getSelectedBlockClientIds:s,getTemplateLock:l}=(0,cr.Z)(Mb),{showInsertionPoint:c,hideInsertionPoint:u}=(0,ur.Z)(Mb);return Eo((r=>{if(!t)return r.addEventListener("mousemove",d),()=>{r.removeEventListener("mousemove",d)};function d(t){var r,d;if(e.current)return;if(a())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(i()&&u());let p;if(t.target.classList.contains("is-root-container")||(p=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),l(p))return;const f=(null===(r=n(p))||void 0===r?void 0:r.orientation)||"vertical",m=t.target.getBoundingClientRect(),h=t.clientY-m.top,g=t.clientX-m.left;let v=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===f&&e.offsetTop>h||e.classList.contains("wp-block")&&"horizontal"===f&&e.offsetLeft>g));if(!v)return;if(!v.id&&(v=v.firstElementChild,!v))return;if(null===(d=v.parentElement)||void 0===d?void 0:d.closest(".block-editor-block-content-overlay.overlay-active"))return;const b=v.id.slice("block-".length);if(!b)return;if(s().includes(b))return;const y=v.getBoundingClientRect();if("horizontal"===f&&(t.clientY>y.bottom||t.clientY<y.top)||"vertical"===f&&(t.clientX>y.right||t.clientX<y.left))return void(i()&&u());const w=o(b);0!==w?c(p,w,{__unstableWithInserter:!0}):i()&&u()}}),[e,n,r,o,i,a,c,u,s])}const yz="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,wz="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function kz(e){return(0,cr.Z)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(Mb),{getBlockType:o,getActiveBlockVariation:i}=t(pc),a=n(e),s=o(a);if(!s)return null;const l=r(e),c=i(a,l),u={title:s.title,icon:s.icon,description:s.description,anchor:null==l?void 0:l.anchor};return c?{title:c.title||s.title,icon:c.icon||s.icon,description:c.description||s.description}:u}),[e])}function xz(e){let{clientId:t}=e;const{attributes:n,name:r,reusableBlockTitle:o}=(0,cr.Z)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:o}=e(Mb),i=n(t);if(!i)return{};const a=bl(ml(i));return{attributes:r(t),name:i,reusableBlockTitle:a&&o(r(t).ref)}}),[t]),i=kz(t);if(!r||!i)return null;const a=ml(r),s=a?Zl(a,n):null,l=o||s;return l&&l!==a.title?(0,Ee.truncate)(l,{length:35}):i.title}var _z=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:o,onDragEnd:i}=e;const{srcRootClientId:a,isDraggable:s,icon:l}=(0,cr.Z)((e=>{var t;const{getBlockRootClientId:r,getTemplateLock:o,getBlockName:i}=e(Mb),a=r(n[0]);return{srcRootClientId:a,isDraggable:"all"!==(a?o(a):null),icon:null===(t=ml(i(n[0])))||void 0===t?void 0:t.icon}}),[n]),c=(0,_.useRef)(!1),[u,d,p]=function(){const e=(0,_.useRef)(null),t=(0,_.useRef)(null),n=(0,_.useRef)(null),r=(0,_.useRef)(null);return(0,_.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,_.useCallback)((o=>{e.current=o.clientY,n.current=zT(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,_.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,a=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(a-i-50,0)/e;t.current=25*n}else if(r.clientY<i){const e=Math.max(i-50,0),n=Math.max(i-a-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:f,stopDraggingBlocks:m}=(0,ur.Z)(Mb);if((0,_.useEffect)((()=>()=>{c.current&&m()}),[]),!s)return t({isDraggable:!1});const h={type:"block",srcClientIds:n,srcRootClientId:a};return(0,_.createElement)(_P,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:h,onDragStart:e=>{f(n),c.current=!0,u(e),o&&o()},onDragOver:d,onDragEnd:()=>{m(),c.current=!1,p(),i&&i()},__experimentalDragComponent:(0,_.createElement)(CP,{count:n.length,icon:l})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))},Ez=function(e){let{clientId:t,rootClientId:n,blockElement:r}=e;const o=kz(t),i=(0,cr.Z)((e=>{var r;const{getBlock:o,getBlockIndex:i,hasBlockMovingClientId:a,getBlockListSettings:s}=e(Mb),l=i(t),{name:c,attributes:u}=o(t);return{index:l,name:c,attributes:u,blockMovingMode:a(),orientation:null===(r=s(n))||void 0===r?void 0:r.orientation}}),[t,n]),{index:a,name:s,attributes:l,blockMovingMode:c,orientation:u}=i,{setNavigationMode:d,removeBlock:p}=(0,ur.Z)(Mb),f=(0,_.useRef)(),m=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vertical";const o=null==e?void 0:e.title,i=e?Zl(e,t,"accessibility"):"",a=void 0!==n,s=i&&i!==o;return a&&"vertical"===r?s?R(U("%1$s Block. Row %2$d. %3$s"),o,n,i):R(U("%1$s Block. Row %2$d"),o,n):a&&"horizontal"===r?s?R(U("%1$s Block. Column %2$d. %3$s"),o,n,i):R(U("%1$s Block. Column %2$d"),o,n):s?R(U("%1$s Block. %2$s"),o,i):R(U("%s Block"),o)}(ml(s),l,a+1,u);(0,_.useEffect)((()=>{f.current.focus(),ag(m)}),[m]);const{hasBlockMovingClientId:h,getBlockIndex:g,getBlockRootClientId:v,getClientIdsOfDescendants:b,getSelectedBlockClientId:y,getMultiSelectedBlocksEndClientId:w,getPreviousBlockClientId:k,getNextBlockClientId:x,isNavigationMode:E}=(0,cr.Z)(Mb),{selectBlock:C,clearSelectedBlock:S,setBlockMovingClientId:I,moveBlockToPosition:T}=(0,ur.Z)(Mb),N=Lr()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!c}),A=U("Drag");return(0,_.createElement)("div",{className:N},(0,_.createElement)(Sy,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,_.createElement)(Ty,null,(0,_.createElement)(ZN,{icon:null==o?void 0:o.icon,showColors:!0})),(0,_.createElement)(Ty,null,(0,_.createElement)(_z,{clientIds:[t]},(e=>(0,_.createElement)(ga,(0,dr.Z)({icon:EP,className:"block-selection-button_drag-handle","aria-hidden":"true",label:A,tabIndex:"-1"},e))))),(0,_.createElement)(Ty,null,(0,_.createElement)(ga,{ref:f,onClick:()=>d(!1),onKeyDown:function(e){const{keyCode:n}=e,o=n===Kr,i=n===Xr,a=n===qr,s=n===Yr,l=9===n,c=n===Gr,u=n===$r,d=32===n,f=e.shiftKey;if(8===n||46===n)return p(t),void e.preventDefault();const m=y(),_=w(),N=k(_||m),A=x(_||m),P=l&&f||o,R=l&&!f||i,L=a,O=s;let M;if(P)M=N;else if(R)M=A;else if(L){var D;M=null!==(D=v(m))&&void 0!==D?D:m}else if(O){var B;M=null!==(B=b([m])[0])&&void 0!==B?B:m}const F=h();if(c&&E()&&(S(),e.preventDefault()),c&&F&&!e.defaultPrevented&&(I(null),e.preventDefault()),(u||d)&&F){const e=v(F),t=v(m),n=g(F);let r=g(m);n<r&&e===t&&(r-=1),T(F,e,t,r),C(F),I(null)}if(R||P||L||O)if(M)e.preventDefault(),C(M);else if(l&&m){let t;R?(t=_o.tabbable.findNext(r),t||(t=r.ownerDocument.defaultView.frameElement,t=_o.tabbable.findNext(t))):t=_o.tabbable.findPrevious(r),t&&(e.preventDefault(),t.focus(),S())}},label:m,className:"block-selection-button_select-button"},(0,_.createElement)(xz,{clientId:t})))))},Cz=Mp({as:"div",useHook:Bp({name:"Toolbar",compose:AR,keys:Af,useProps:function(e,t){return zp({role:"toolbar","aria-orientation":e.orientation},t)}}),useCreateElement:function(e,t,n){return Sp(e,t,n)}}),Sz=(0,_.forwardRef)((function(e,t){let{label:n,...r}=e;const o=function(e){void 0===e&&(e={});var t=BP(e),n=t.orientation;return rR(zp({orientation:void 0===n?"horizontal":n},Hp(t,["orientation"])))}({loop:!0,baseId:r.id,rtl:q()});return(0,_.createElement)(gp.Provider,{value:o},(0,_.createElement)(Cz,(0,dr.Z)({ref:t,"aria-label":n},o,r)))})),Iz=(0,_.forwardRef)((function(e,t){let{className:n,label:r,...o}=e;if(!r)return He("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"}),(0,_.createElement)(Gf,(0,dr.Z)({},o,{className:n}));const i=Lr()("components-accessible-toolbar",n);return(0,_.createElement)(Sz,(0,dr.Z)({className:i,label:r,ref:t},o))}));function Tz(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var Nz=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:r,__experimentalOnIndexChange:o,...i}=e;const a=(0,_.useRef)(),s=function(e){const[t,n]=(0,_.useState)(!0),r=(0,_.useCallback)((()=>{const t=!_o.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||He("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,_.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(a);return function(e,t,n,r,o){const[i]=(0,_.useState)(t),[a]=(0,_.useState)(r),s=(0,_.useCallback)((()=>{!function(e){const[t]=_o.tabbable.find(e);t&&t.focus()}(e.current)}),[]);OA("core/block-editor/focus-toolbar",s),(0,_.useEffect)((()=>{i&&s()}),[n,i,s]),(0,_.useEffect)((()=>{let t=0;return a&&!i&&(t=window.requestAnimationFrame((()=>{const t=Tz(e.current),n=a||0;t[n]&&function(e){return e.contains(e.ownerDocument.activeElement)}(e.current)&&t[n].focus()}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=Tz(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[a,i])}(a,n,s,r,o),s?(0,_.createElement)(Iz,(0,dr.Z)({label:i["aria-label"],ref:a},i),t):(0,_.createElement)(Wf,(0,dr.Z)({orientation:"horizontal",role:"toolbar",ref:a},i),t)},Az=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),Pz=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));const Rz=(e,t)=>"up"===e?"horizontal"===t?q()?Az:Pz:O_:"down"===e?"horizontal"===t?q()?Pz:Az:M_:null,Lz=(e,t)=>"up"===e?"horizontal"===t?q()?U("Move right"):U("Move left"):U("Move up"):"down"===e?"horizontal"===t?q()?U("Move left"):U("Move right"):U("Move down"):null,Oz=(0,_.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:o,...i}=e;const a=zo(Oz),s=(0,Ee.castArray)(n).length,{blockType:l,isDisabled:c,rootClientId:u,isFirst:d,isLast:p,firstIndex:f,orientation:m="vertical"}=(0,cr.Z)((e=>{const{getBlockIndex:t,getBlockRootClientId:i,getBlockOrder:a,getBlock:s,getBlockListSettings:l}=e(Mb),c=(0,Ee.castArray)(n),u=(0,Ee.first)(c),d=i(u),p=t(u),f=t((0,Ee.last)(c)),m=a(d),h=s(u),g=0===p,v=f===m.length-1,{orientation:b}=l(d)||{};return{blockType:h?ml(h.name):null,isDisabled:"up"===r?g:v,rootClientId:d,firstIndex:p,isFirst:g,isLast:v,orientation:o||b}}),[n,r]),{moveBlocksDown:h,moveBlocksUp:g}=(0,ur.Z)(Mb),v="up"===r?g:h,b=`block-editor-block-mover-button__description-${a}`;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ga,(0,dr.Z)({ref:t,className:Lr()("block-editor-block-mover-button",`is-${r}-button`),icon:Rz(r,m),label:Lz(r,m),"aria-describedby":b},i,{onClick:c?null:e=>{v(n,u),i.onClick&&i.onClick(e)},"aria-disabled":c})),(0,_.createElement)("span",{id:b,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,i,a){const s=n+1,l=e=>"up"===e?"horizontal"===a?q()?"right":"left":"up":"down"===e?"horizontal"===a?q()?"left":"right":"down":null;if(e>1)return function(e,t,n,r,o){const i=t+1;return o<0&&n?U("Blocks cannot be moved up as they are already at the top"):o>0&&r?U("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?R(G("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,i):o>0&&!r?R(G("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,i):void 0}(e,n,r,o,i);if(r&&o)return R(U("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=l("down");if("down"===e)return R(U("Move %1$s block from position %2$d down to position %3$d"),t,s,s+1);if("left"===e)return R(U("Move %1$s block from position %2$d left to position %3$d"),t,s,s+1);if("right"===e)return R(U("Move %1$s block from position %2$d right to position %3$d"),t,s,s+1)}if(i>0&&o){const e=l("down");if("down"===e)return R(U("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return R(U("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return R(U("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=l("up");if("up"===e)return R(U("Move %1$s block from position %2$d up to position %3$d"),t,s,s-1);if("left"===e)return R(U("Move %1$s block from position %2$d left to position %3$d"),t,s,s-1);if("right"===e)return R(U("Move %1$s block from position %2$d right to position %3$d"),t,s,s-1)}if(i<0&&r){const e=l("up");if("up"===e)return R(U("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return R(U("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return R(U("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(s,l&&l.title,f,d,p,"up"===r?-1:1,m)))})),Mz=(0,_.forwardRef)(((e,t)=>(0,_.createElement)(Oz,(0,dr.Z)({direction:"up",ref:t},e)))),Dz=(0,_.forwardRef)(((e,t)=>(0,_.createElement)(Oz,(0,dr.Z)({direction:"down",ref:t},e))));var Bz=AE(((e,t)=>{var n;let{clientIds:r}=t;const{getBlock:o,getBlockIndex:i,getBlockListSettings:a,canMoveBlocks:s,getBlockOrder:l,getBlockRootClientId:c}=e(Mb),u=(0,Ee.castArray)(r),d=(0,Ee.first)(u),p=o(d),f=c((0,Ee.first)(u)),m=i(d),h=0===m,g=i((0,Ee.last)(u))===l(f).length-1;return{blockType:p?ml(p.name):null,canMove:s(r,f),rootClientId:f,firstIndex:m,isFirst:h,isLast:g,orientation:null===(n=a(f))||void 0===n?void 0:n.orientation}}))((function(e){let{isFirst:t,isLast:n,clientIds:r,canMove:o,isHidden:i,rootClientId:a,orientation:s,hideDragHandle:l}=e;const[c,u]=(0,_.useState)(!1),d=()=>u(!0),p=()=>u(!1);if(!o||t&&n&&!a)return null;const f=U("Drag");return(0,_.createElement)("div",{className:Lr()("block-editor-block-mover",{"is-visible":c||!i,"is-horizontal":"horizontal"===s})},!l&&(0,_.createElement)(_z,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(e=>(0,_.createElement)(ga,(0,dr.Z)({icon:EP,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:f,tabIndex:"-1"},e)))),(0,_.createElement)(Gf,{className:"block-editor-block-mover__move-button-container"},(0,_.createElement)(Lf,{onFocus:d,onBlur:p},(e=>(0,_.createElement)(Mz,(0,dr.Z)({clientIds:r},e)))),(0,_.createElement)(Lf,{onFocus:d,onBlur:p},(e=>(0,_.createElement)(Dz,(0,dr.Z)({clientIds:r},e))))))}));const{clearTimeout:Fz,setTimeout:jz}=window,zz=200;function Hz(e){let{ref:t,isFocused:n,debounceTimeout:r=zz,onChange:o=Ee.noop}=e;const[i,a]=(0,_.useState)(!1),s=(0,_.useRef)(),l=e=>{null!=t&&t.current&&a(e),o(e)},c=()=>{const e=s.current;e&&Fz&&Fz(e)};return(0,_.useEffect)((()=>()=>c()),[]),{showMovers:i,debouncedShowMovers:e=>{e&&e.stopPropagation(),c(),i||l(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),c(),s.current=jz((()=>{(()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e})()&&l(!1)}),r)}}}function Vz(e){let{ref:t,debounceTimeout:n=zz,onChange:r=Ee.noop}=e;const[o,i]=(0,_.useState)(!1),{showMovers:a,debouncedShowMovers:s,debouncedHideMovers:l}=Hz({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),c=(0,_.useRef)(!1),u=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,_.useEffect)((()=>{const e=t.current,n=()=>{u()&&(i(!0),s())},r=()=>{u()||(i(!1),l())};return e&&!c.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),c.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,c,i,s,l]),{showMovers:a,gestures:{onMouseMove:s,onMouseLeave:l}}}function Wz(){const{selectBlock:e,toggleBlockHighlight:t}=(0,ur.Z)(Mb),{firstParentClientId:n,shouldHide:r,hasReducedUI:o}=(0,cr.Z)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:o}=e(Mb),{hasBlockSupport:i}=e(pc),a=n(r()),s=a[a.length-1],l=ml(t(s)),c=o();return{firstParentClientId:s,shouldHide:!i(l,"__experimentalParentSelector",!0),hasReducedUI:c.hasReducedUI}}),[]),i=kz(n),a=(0,_.useRef)(),{gestures:s}=Vz({ref:a,onChange(e){e&&o||t(n,e)}});return r||void 0===n?null:(0,_.createElement)("div",(0,dr.Z)({className:"block-editor-block-parent-selector",key:n,ref:a},s),(0,_.createElement)(Mf,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:R(U("Select %s"),i.title),showTooltip:!0,icon:(0,_.createElement)(ZN,{icon:i.icon})}))}var Zz=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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 Uz(e){let{blocks:t}=e;return(0,_.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,_.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,_.createElement)(Na,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,_.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,_.createElement)("div",{className:"block-editor-block-switcher__preview-title"},U("Preview")),(0,_.createElement)(hP,{viewportWidth:500,blocks:t})))))}var $z=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:o}=e;const[i,a]=(0,_.useState)();return(0,_.createElement)(Gb,{label:U("Transform to"),className:t},i&&(0,_.createElement)(Uz,{blocks:Fl(o,i)}),n.map((e=>{const{name:t,icon:n,title:o,isDisabled:i}=e;return(0,_.createElement)(qb,{key:t,className:Kc(t),onClick:e=>{e.preventDefault(),r(t)},disabled:i,onMouseLeave:()=>a(null),onMouseEnter:()=>a(t)},(0,_.createElement)(ZN,{icon:n,showColors:!0}),o)})))};class Gz{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.value=e,this._currentValue,this._valueAsArray}entries(){return this._valueAsArray.entries(...arguments)}forEach(){return this._valueAsArray.forEach(...arguments)}keys(){return this._valueAsArray.keys(...arguments)}values(){return this._valueAsArray.values(...arguments)}get value(){return this._currentValue}set value(e){e=String(e),this._valueAsArray=(0,Ee.uniq)((0,Ee.compact)(e.split(/\s+/g))),this._currentValue=this._valueAsArray.join(" ")}get length(){return this._valueAsArray.length}toString(){return this.value}*[Symbol.iterator](){return yield*this._valueAsArray}item(e){return this._valueAsArray[e]}contains(e){return-1!==this._valueAsArray.indexOf(e)}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.value+=" "+t.join(" ")}remove(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.value=(0,Ee.without)(this._valueAsArray,...t).join(" ")}toggle(e,t){return void 0===t&&(t=!this.contains(e)),t?this.add(e):this.remove(e),t}replace(e,t){return!!this.contains(e)&&(this.remove(e),this.add(t),!0)}supports(){return!0}}const qz={};function Kz(e){let{genericPreviewBlock:t,viewportWidth:n,style:r,isActive:o,onBlur:i,onHover:a,onSelect:s,styleClassName:l,itemRole:c}=e;const u=(0,_.useMemo)((()=>({...t,attributes:{...t.attributes,className:l}})),[t,l]);return(0,_.createElement)("div",{key:r.name,className:Lr()("block-editor-block-styles__item",{"is-active":o}),onClick:()=>s(),onKeyDown:e=>{$r!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),s())},onMouseEnter:a,onMouseLeave:i,role:c||"button",tabIndex:"0","aria-label":r.label||r.name},(0,_.createElement)("div",{className:"block-editor-block-styles__item-preview"},(0,_.createElement)(hP,{viewportWidth:n,blocks:u})),(0,_.createElement)("div",{className:"block-editor-block-styles__item-label"},r.label||r.name))}var Yz=function(e){let{clientId:t,onSwitch:n=Ee.noop,onHoverClassName:r=Ee.noop,itemRole:o}=e;const{styles:i,block:a,type:s,className:l}=(0,cr.Z)((e=>{const{getBlock:n}=e(Mb),r=n(t);if(!r)return qz;const o=ml(r.name),{getBlockStyles:i}=e(pc);return{block:r,type:o,styles:i(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:c}=(0,ur.Z)(Mb),u=function(e,t){return(0,_.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?jl(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?Pl(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(a,s);if(!i||0===i.length)return null;const d=(0,Ee.find)(i,"isDefault")?i:[{name:"default",label:$("Default","block style"),isDefault:!0},...i],p=function(e,t){for(const n of new Gz(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,Ee.find)(e,{name:t});if(r)return r}return(0,Ee.find)(e,"isDefault")}(d,l);return(0,_.createElement)("div",{className:"block-editor-block-styles"},d.map((e=>{var i,a;const d=function(e,t,n){const r=new Gz(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(l,p,e);return(0,_.createElement)(Kz,{genericPreviewBlock:u,viewportWidth:null!==(i=null===(a=s.example)||void 0===a?void 0:a.viewportWidth)&&void 0!==i?i:500,className:l,isActive:p===e,key:e.name,onSelect:()=>{c(t,{className:d}),r(null),n()},onBlur:()=>r(null),onHover:()=>r(d),style:e,styleClassName:d,itemRole:o})})))};function Xz(e){let{hoveredBlock:t,onSwitch:n}=e;const{name:r,clientId:o}=t,[i,a]=(0,_.useState)(),s=(0,cr.Z)((e=>e(pc).getBlockType(r)),[r]);return(0,_.createElement)(Gb,{label:U("Styles"),className:"block-editor-block-switcher__styles__menugroup"},i&&(0,_.createElement)(Uz,{blocks:s&&s.example?jl(s.name,{attributes:{...s.example.attributes,className:i},innerBlocks:s.example.innerBlocks}):Pl(t,{className:i})}),(0,_.createElement)(Yz,{clientId:o,onSwitch:n,onHoverClassName:a,itemRole:"menuitem"}))}const Jz=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=Jz(e,t,n);if(r)return r}}},Qz=(e,t)=>{const n=((e,t)=>{const n=function(e,t){var n;const r=null===(n=ml(e))||void 0===n?void 0:n.attributes;if(!r)return[];return Object.keys(r).filter((e=>{var n;return(null===(n=r[e])||void 0===n?void 0:n.__experimentalRole)===t}))}(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};function eH(e){let{patterns:t,onSelect:n}=e;return(0,_.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,_.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,_.createElement)(Na,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,_.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,_.createElement)("div",{className:"block-editor-block-switcher__preview-title"},U("Preview")),(0,_.createElement)(tH,{patterns:t,onSelect:n})))))}function tH(e){let{patterns:t,onSelect:n}=e;const r=rR();return(0,_.createElement)(PR,(0,dr.Z)({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":U("Patterns list")}),t.map((e=>(0,_.createElement)(nH,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function nH(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",i=zo(nH,`${o}-list__item-description`);return(0,_.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?i:void 0},(0,_.createElement)(Nf,(0,dr.Z)({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,_.createElement)(hP,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,_.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,_.createElement)(ma,{id:i},t.description))}var rH=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,_.useState)(!1),a=((e,t)=>(0,_.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>Pl(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=Jz(o,t.name,r);if(n){e=!0,r.add(n.clientId),Qz(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]))(n,t);return a.length?(0,_.createElement)(Gb,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,_.createElement)(eH,{patterns:a,onSelect:r}),(0,_.createElement)(qb,{onClick:e=>{e.preventDefault(),i(!o)},icon:Az},U("Patterns"))):null};const oH=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r}=(0,ur.Z)(Mb),o=kz(n[0].clientId),{possibleBlockTransformations:i,canRemove:a,hasBlockStyles:s,icon:l,blockTitle:c,patterns:u}=(0,cr.Z)((e=>{var r;const{getBlockRootClientId:i,getBlockTransformItems:a,__experimentalGetPatternTransformItems:s}=e(Mb),{getBlockStyles:l,getBlockType:c}=e(pc),{canRemoveBlocks:u}=e(Mb),d=i((0,Ee.castArray)(t)[0]),[{name:p}]=n,f=1===n.length,m=f&&l(p);let h;var g;f?h=null==o?void 0:o.icon:h=1===(0,Ee.uniq)(n.map((e=>{let{name:t}=e;return t}))).length?null===(g=c(p))||void 0===g?void 0:g.icon:Zz;return{possibleBlockTransformations:a(n,d),canRemove:u(t,d),hasBlockStyles:!(null==m||!m.length),icon:h,blockTitle:null===(r=c(p))||void 0===r?void 0:r.title,patterns:s(n,d)}}),[t,n,null==o?void 0:o.icon]),d=1===n.length&&bl(n[0]),p=1===n.length&&"core/template-part"===n[0].name,f=!!i.length&&a,m=!(null==u||!u.length)&&a;if(!s&&!f)return(0,_.createElement)(Gf,null,(0,_.createElement)(Mf,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:c,icon:(0,_.createElement)(ZN,{icon:l,showColors:!0})}));const h=c,g=1===n.length?R(U("%s: Change block type or style"),c):R(G("Change type of %d block","Change type of %d blocks",n.length),n.length),v=s||f||m;return(0,_.createElement)(Gf,null,(0,_.createElement)(Lf,null,(e=>(0,_.createElement)(Uf,{className:"block-editor-block-switcher",label:h,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ZN,{icon:l,className:"block-editor-block-switcher__toggle",showColors:!0}),(d||p)&&(0,_.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,_.createElement)(xz,{clientId:t}))),toggleProps:{describedBy:g,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:o}=e;return v&&(0,_.createElement)("div",{className:"block-editor-block-switcher__container"},m&&(0,_.createElement)(rH,{blocks:n,patterns:u,onSelect:e=>{(e=>{r(t,e)})(e),o()}}),f&&(0,_.createElement)($z,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:e=>{(e=>{r(t,Fl(n,e))})(e),o()}}),s&&(0,_.createElement)(Xz,{hoveredBlock:n[0],onSwitch:o}))})))))};var iH=e=>{let{clientIds:t}=e;const n=(0,cr.Z)((e=>e(Mb).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,_.createElement)(oH,{clientIds:t,blocks:n})},aH=n(42152),sH=n.n(aH);function lH(e){const t=(0,_.useRef)(e);return t.current=e,t}function cH(e,t){const n=lH(e),r=lH(t);return Eo((e=>{const t=new(sH())(e,{text:()=>"function"==typeof n.current?n.current():n.current||""});return t.on("success",(t=>{let{clearSelection:n}=t;n(),e.focus(),r.current&&r.current()})),()=>{t.destroy()}}),[])}function uH(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:o,getBlockRootClientId:i,getBlocksByClientId:a,canMoveBlocks:s,canRemoveBlocks:l}=(0,cr.Z)(Mb),{getDefaultBlockName:c,getGroupingBlockName:u}=(0,cr.Z)(pc),d=a(t),p=i(t[0]),f=(0,Ee.every)(d,(e=>!!e&&vl(e.name,"multiple",!0)&&o(e.name,p))),m=o(c(),p),h=s(t,p),g=l(t,p),{removeBlocks:v,replaceBlocks:b,duplicateBlocks:y,insertAfterBlock:w,insertBeforeBlock:k,flashBlock:x,setBlockMovingClientId:E,setNavigationMode:C,selectBlock:S}=(0,ur.Z)(Mb),I=function(){const{getBlockName:e}=(0,cr.Z)(Mb),{getBlockType:t}=(0,cr.Z)(pc),{createSuccessNotice:n}=(0,ur.Z)(xR);return(0,_.useCallback)(((r,o)=>{let i="";if(1===o.length){var a;const n=o[0],s=null===(a=t(e(n)))||void 0===a?void 0:a.title;i=R(U("copy"===r?'Copied "%s" to clipboard.':'Moved "%s" to clipboard.'),s)}else i=R("copy"===r?G("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length):G("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}();return n({canDuplicate:f,canInsertDefaultBlock:m,canMove:h,canRemove:g,rootClientId:p,blocks:d,onDuplicate:()=>y(t,r),onRemove:()=>v(t,r),onInsertBefore(){k((0,Ee.first)((0,Ee.castArray)(t)))},onInsertAfter(){w((0,Ee.last)((0,Ee.castArray)(t)))},onMoveTo(){C(!0),S(t[0]),E(t[0])},onGroup(){if(!d.length)return;const e=u(),n=Fl(d,e);n&&b(t,n)},onUngroup(){if(!d.length)return;const e=d[0].innerBlocks;e.length&&b(t,e)},onCopy(){const e=d.map((e=>{let{clientId:t}=e;return t}));1===d.length&&x(e[0]),I("copy",e)}})}var dH=LE([AE(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:o,getSettings:i}=e(Mb),a=r(n),s=i().codeEditingEnabled;return{mode:o(n),blockType:a?ml(a.name):null,isCodeEditingEnabled:s}})),RE(((e,t)=>{let{onToggle:n=Ee.noop,clientId:r}=t;return{onToggleMode(){e(Mb).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:o=!1,isCodeEditingEnabled:i=!0}=e;if(!vl(t,"html",!0)||!i)return null;const a=U("visual"===n?"Edit as HTML":"Edit visually");return(0,_.createElement)(qb,{onClick:r},!o&&a)})),pH=LE(AE(((e,t)=>{let{clientId:n}=t;const r=e(Mb).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),RE(((e,t)=>{let{block:n}=t;return{onClick:()=>e(Mb).replaceBlocks(n.clientId,Ad({HTML:eu(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=U("Convert to Blocks");return(0,_.createElement)(qb,{onClick:n},!r&&o)}));const{Fill:fH,Slot:mH}=Pr("__unstableBlockSettingsMenuFirstItem");fH.Slot=mH;var hH=fH;function gH(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:o,groupingBlockName:i,onClose:a=(()=>{})}=e;const{replaceBlocks:s}=(0,ur.Z)(Mb);return n||r?(0,_.createElement)(_.Fragment,null,n&&(0,_.createElement)(qb,{onClick:()=>{(()=>{const e=Fl(o,i);e&&s(t,e)})(),a()}},$("Group","verb")),r&&(0,_.createElement)(qb,{onClick:()=>{(()=>{const e=o[0].innerBlocks;e.length&&s(t,e)})(),a()}},$("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:vH,Slot:bH}=Pr("BlockSettingsMenuControls");function yH(e){let{...t}=e;return(0,_.createElement)(hp,{document:document},(0,_.createElement)(vH,t))}yH.Slot=e=>{let{fillProps:t,clientIds:n=null}=e;const{selectedBlocks:r,selectedClientIds:o}=(0,cr.Z)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:r}=e(Mb),o=null!==n?n:r();return{selectedBlocks:(0,Ee.map)((0,Ee.compact)(t(o)),(e=>e.name)),selectedClientIds:o}}),[n]),i=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}=(0,cr.Z)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:o,getSelectedBlockClientIds:i}=e(Mb),{getGroupingBlockName:a}=e(pc),s=i(),l=a(),c=o(l,null!=s&&s.length?n(s[0]):void 0),u=r(s),d=1===u.length&&(null===(t=u[0])||void 0===t?void 0:t.name)===l;return{clientIds:s,isGroupable:c&&u.length&&!d,isUngroupable:d&&!!u[0].innerBlocks.length,blocksSelection:u,groupingBlockName:l}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}}(),{isGroupable:a,isUngroupable:s}=i,l=a||s;return(0,_.createElement)(bH,{fillProps:{...t,selectedBlocks:r,selectedClientIds:o}},(e=>{if((null==e?void 0:e.length)>0||l)return(0,_.createElement)(Gb,null,e,(0,_.createElement)(gH,(0,dr.Z)({},i,{onClose:null==t?void 0:t.onClose})))}))};var wH=yH;const kH={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function xH(e){let{blocks:t,onCopy:n}=e;const r=cH((()=>nu(t)),n);return(0,_.createElement)(qb,{ref:r},U("Copy"))}var _H=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,...o}=e;const i=(0,Ee.castArray)(t),a=i.length,s=i[0],{onlyBlock:l,title:c}=(0,cr.Z)((e=>{var t;const{getBlockCount:n,getBlockName:r}=e(Mb),{getBlockType:o}=e(pc);return{onlyBlock:1===n(),title:null===(t=o(r(s)))||void 0===t?void 0:t.title}}),[s]),u=(0,cr.Z)((e=>{const{getShortcutRepresentation:t}=e(PA);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),d=(0,_.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:Ee.noop,[n]),p=R(U("Remove %s"),c),f=1===a?p:U("Remove blocks");return(0,_.createElement)(uH,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:i,canMove:c,canRemove:p,onDuplicate:m,onInsertAfter:h,onInsertBefore:g,onRemove:v,onCopy:b,onMoveTo:y,blocks:w}=e;return(0,_.createElement)(Uf,(0,dr.Z)({icon:q_,label:U("Options"),className:"block-editor-block-settings-menu",popoverProps:kH,noIcons:!0},o),(e=>{let{onClose:o}=e;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Gb,null,(0,_.createElement)(hH.Slot,{fillProps:{onClose:o}}),1===a&&(0,_.createElement)(pH,{clientId:s}),(0,_.createElement)(xH,{blocks:w,onCopy:b}),n&&(0,_.createElement)(qb,{onClick:(0,Ee.flow)(o,m,d),shortcut:u.duplicate},U("Duplicate")),i&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)(qb,{onClick:(0,Ee.flow)(o,g),shortcut:u.insertBefore},U("Insert before")),(0,_.createElement)(qb,{onClick:(0,Ee.flow)(o,h),shortcut:u.insertAfter},U("Insert after"))),c&&!l&&(0,_.createElement)(qb,{onClick:(0,Ee.flow)(o,y)},U("Move to")),1===a&&(0,_.createElement)(dH,{clientId:s,onToggle:o})),(0,_.createElement)(wH.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):_.Children.map((e=>(0,_.cloneElement)(e,{onClose:o}))),p&&(0,_.createElement)(Gb,null,(0,_.createElement)(qb,{onClick:(0,Ee.flow)(o,v,d),shortcut:u.remove},f)))}))}))},EH=function(e){let{clientIds:t,...n}=e;return(0,_.createElement)(Gf,null,(0,_.createElement)(Lf,null,(e=>(0,_.createElement)(_H,(0,dr.Z)({clientIds:t,toggleProps:e},n)))))};function CH(e){let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:o,hasFixedToolbar:i,hasReducedUI:a,isValid:s,isVisual:l}=(0,cr.Z)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:o,getBlockRootClientId:i,getSettings:a}=e(Mb),s=r(),l=s[0],c=i(l),u=a();return{blockClientIds:s,blockClientId:l,blockType:l&&ml(t(l)),hasFixedToolbar:u.hasFixedToolbar,hasReducedUI:u.hasReducedUI,rootClientId:c,isValid:s.every((e=>o(e))),isVisual:s.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:c}=(0,ur.Z)(Mb),u=(0,_.useRef)(),{showMovers:d,gestures:p}=Vz({ref:u,onChange(e){e&&a||c(r,e)}}),f=Hr("medium","<")||i;if(o&&!vl(o,"__experimentalToolbar",!0))return null;const m=f||d;if(0===n.length)return null;const h=s&&l,g=n.length>1,v=Lr()("block-editor-block-toolbar",m&&"is-showing-movers");return(0,_.createElement)("div",{className:v},!g&&!f&&(0,_.createElement)(Wz,{clientIds:n}),(0,_.createElement)("div",(0,dr.Z)({ref:u},p),(h||g)&&(0,_.createElement)(Gf,{className:"block-editor-block-toolbar__block-controls"},(0,_.createElement)(iH,{clientIds:n}),(0,_.createElement)(Bz,{clientIds:n,hideDragHandle:t||a}))),h&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ub.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,_.createElement)(Ub.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,_.createElement)(Ub.Slot,{className:"block-editor-block-toolbar__slot"}),(0,_.createElement)(Ub.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,_.createElement)(Ub.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),(0,_.createElement)(EH,{clientIds:n}))}var SH=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:o,hasParents:i,showParentSelector:a}=(0,cr.Z)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r}=e(Mb),{getBlockType:o}=e(pc),i=r(),a=i[0],s=n(a),l=o(t(s[s.length-1]));return{blockType:a&&o(t(a)),hasParents:s.length,showParentSelector:vl(l,"__experimentalParentSelector",!0)&&i.length<=1}}),[]);if(o&&!vl(o,"__experimentalToolbar",!0))return null;const s=Lr()("block-editor-block-contextual-toolbar",{"has-parent":i&&a,"is-fixed":n});return(0,_.createElement)(Nz,(0,dr.Z)({focusOnMount:t,className:s,"aria-label":U("Block tools")},r),(0,_.createElement)(CH,{hideDragHandle:n}))};function IH(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,isCaretWithinFormattedText:i,getSettings:a,getLastMultiSelectedBlockClientId:s}=e(Mb);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:o(),isCaretWithinFormattedText:i(),hasMultiSelection:r(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:s()}}function TH(e){let{clientId:t,rootClientId:n,isValid:r,isEmptyDefaultBlock:o,capturingClientId:i,__unstablePopoverSlot:a,__unstableContentRef:s}=e;const{isNavigationMode:l,isMultiSelecting:c,isTyping:u,isCaretWithinFormattedText:d,hasMultiSelection:p,hasFixedToolbar:f,lastClientId:m}=(0,cr.Z)(IH,[]),h=(0,cr.Z)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(Mb);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===t}),[t]),g=Hr("medium"),[v,b]=(0,_.useState)(!1),[y,w]=(0,_.useState)(!1),{stopTyping:k}=(0,ur.Z)(Mb),x=!u&&!l&&o&&r,E=l,C=!l&&!f&&g&&!x&&!c&&(!u||d);OA("core/block-editor/focus-toolbar",(()=>{b(!0),k(!0)}),{isDisabled:!!(l||C||f||o)}),(0,_.useEffect)((()=>{C||b(!1)}),[C]);const S=(0,_.useRef)(),I=vN(t),T=vN(m),N=vN(i),A=mz(s);if(!(E||C||v||x))return null;let P=I;if(!P)return null;i&&(P=N);let R=P;if(p){if(!T)return null;R={top:P,bottom:T}}const L=x?"top left right":"top right left",{ownerDocument:O}=P,M=x?void 0:O.defaultView.frameElement||zT(P)||O.body;return(0,_.createElement)(Na,{ref:A,noArrow:!0,animate:!1,position:L,focusOnMount:!1,anchorRef:R,className:Lr()("block-editor-block-list__block-popover",{"is-insertion-point-visible":h}),__unstableStickyBoundaryElement:M,__unstableSlotName:a||null,__unstableBoundaryParent:!0,__unstableObserveElement:P,shouldAnchorIncludePadding:!0,__unstableEditorCanvasWrapper:null==s?void 0:s.current},(C||v)&&(0,_.createElement)("div",{onFocus:function(){w(!0)},onBlur:function(){w(!1)},tabIndex:-1,className:Lr()("block-editor-block-list__block-popover-inserter",{"is-visible":y})},(0,_.createElement)(kL,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(C||v)&&(0,_.createElement)(SH,{focusOnMount:v,__experimentalInitialIndex:S.current,__experimentalOnIndexChange:e=>{S.current=e},key:t}),E&&(0,_.createElement)(Ez,{clientId:t,rootClientId:n,blockElement:P}),x&&(0,_.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,_.createElement)(kL,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function NH(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:o,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:a}=e(Mb),s=t()||n();if(!s)return;const{name:l,attributes:c={},isValid:u}=o(s)||{},d=i(s),p=a(d),f=(0,Ee.find)(d,(e=>{var t;return null===(t=p[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:s,rootClientId:r(s),name:l,isValid:u,isEmptyDefaultBlock:l&&Hl({name:l,attributes:c}),capturingClientId:f}}function AH(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,cr.Z)(NH,[]);if(!r)return null;const{clientId:o,rootClientId:i,name:a,isValid:s,isEmptyDefaultBlock:l,capturingClientId:c}=r;return a?(0,_.createElement)(TH,{clientId:o,rootClientId:i,isValid:s,isEmptyDefaultBlock:l,capturingClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function PH(e){let{children:t}=e;const n=(0,_.useContext)(hz),r=(0,_.useContext)(rA.Context);return n||r?t:(He('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools"}),(0,_.createElement)(vz,{__unstablePopoverSlot:"block-toolbar"},(0,_.createElement)(AH,{__unstablePopoverSlot:"block-toolbar"}),t))}var RH=ip((e=>t=>{const{clientId:n}=jb();return(0,_.createElement)(e,(0,dr.Z)({},t,{clientId:n}))}),"withClientId"),LH=RH((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:i}=e;return(0,_.createElement)(EL,{className:Lr()({"block-list-appender__toggle":i}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),OH=LE([RH,AE(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(Mb),o=r(n);return{lastBlockClientId:(0,Ee.last)(o)}}))])((e=>{let{clientId:t,lastBlockClientId:n}=e;return(0,_.createElement)(xL,{rootClientId:t,lastBlockClientId:n})}));const MH=new WeakMap;function DH(e,t,n){const r=(0,Ho.Pr)((()=>(0,Ee.throttle)(e,t,n)),[e,t,n]);return(0,_.useEffect)((()=>()=>r.cancel()),[r]),r}function BH(e){const t=(0,_.useRef)();return t.current=e,t}function FH(e){let{isDisabled:t,onDrop:n,onDragStart:r,onDragEnter:o,onDragLeave:i,onDragEnd:a,onDragOver:s}=e;const l=BH(n),c=BH(r),u=BH(o),d=BH(i),p=BH(a),f=BH(s);return Eo((e=>{if(t)return;let n=!1;const{ownerDocument:r}=e;function o(e){n||(n=!0,r.removeEventListener("dragenter",o),r.addEventListener("dragend",h),r.addEventListener("mousemove",h),c.current&&c.current(e))}function i(t){t.preventDefault(),e.contains(t.relatedTarget)||u.current&&u.current(t)}function a(e){!e.defaultPrevented&&f.current&&f.current(e),e.preventDefault()}function s(t){(function(t){const{defaultView:n}=r;if(!(t&&n&&t instanceof n.HTMLElement&&e.contains(t)))return!1;let o=t;do{if(o.dataset.isDropZone)return o===e}while(o=o.parentElement);return!1})(t.relatedTarget)||d.current&&d.current(t)}function m(e){e.defaultPrevented||(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files.length,l.current&&l.current(e),h(e))}function h(e){n&&(n=!1,r.addEventListener("dragenter",o),r.removeEventListener("dragend",h),r.removeEventListener("mousemove",h),p.current&&p.current(e))}return e.dataset.isDropZone="true",e.addEventListener("drop",m),e.addEventListener("dragenter",i),e.addEventListener("dragover",a),e.addEventListener("dragleave",s),r.addEventListener("dragenter",o),()=>{delete e.dataset.isDropZone,e.removeEventListener("drop",m),e.removeEventListener("dragenter",i),e.removeEventListener("dragover",a),e.removeEventListener("dragleave",s),r.removeEventListener("dragend",h),r.removeEventListener("mousemove",h),r.addEventListener("dragenter",o)}}),[t])}function jH(e){const t=Array.from(e.files);return Array.from(e.items).forEach((e=>{const n=e.getAsFile();n&&!t.find((e=>{let{name:t,type:r,size:o}=e;return t===n.name&&r===n.type&&o===n.size}))&&t.push(n)})),t}function zH(e,t){const n=(0,cr.Z)((e=>e(Mb).getSettings().mediaUpload),[]),{canInsertBlockType:r,getBlockIndex:o,getClientIdsOfDescendants:i}=(0,cr.Z)(Mb),{insertBlocks:a,moveBlocksToPosition:s,updateBlockAttributes:l,clearSelectedBlock:c}=(0,ur.Z)(Mb),u=function(e,t,n,r,o,i,a){return s=>{const{srcRootClientId:l,srcClientIds:c,type:u,blocks:d}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(s);if("inserter"===u){a();const n=d.map((e=>Pl(e)));i(n,t,e,!0,null)}if("block"===u){const i=n(c[0]);if(l===e&&i===t)return;if(c.includes(e)||r(c).some((t=>t===e)))return;const a=l===e,s=c.length;o(c,l,e,a&&i<t?t-s:t)}}}(e,t,o,i,s,a,c),d=function(e,t,n,r,o,i){return a=>{if(!n)return;const s=Dl(Bl("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(a)));if(s){const n=s.transform(a,r);i(n,t,e)}}}(e,t,n,l,r,a),p=function(e,t,n){return r=>{const o=tp({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}(e,t,a);return e=>{const t=jH(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?d(t):n?p(n):u(e)}}function HH(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,a=r?o:i,s=r?i:o,l=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let d;return d=a>=l&&a<=c?a:a<c?l:c,Math.sqrt((a-d)**2+(s-u)**2)}function VH(e,t,n){const r="horizontal"===n?["left","right"]:["top","bottom"],o=q();let i,a;return e.forEach(((e,n)=>{const s=e.getBoundingClientRect(),[l,c]=function(e,t){let n,r;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"]).forEach((o=>{const i=HH(e,t,o);(void 0===n||i<n)&&(n=i,r=o)})),[n,r]}(t,s,r);(void 0===a||l<a)&&(a=l,i=n+("bottom"===c||!o&&"right"===c||o&&"left"===c?1:0))})),i}function WH(){let{rootClientId:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,_.useState)(null),r=(0,cr.Z)((t=>{const{getTemplateLock:n}=t(Mb);return"all"===n(e)}),[e]),{getBlockListSettings:o}=(0,cr.Z)(Mb),{showInsertionPoint:i,hideInsertionPoint:a}=(0,ur.Z)(Mb),s=zH(e,t),l=DH((0,_.useCallback)(((t,r)=>{var a;const s=VH(Array.from(r.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(a=o(e))||void 0===a?void 0:a.orientation);n(void 0===s?0:s),null!==s&&i(e,s)}),[]),200);return FH({isDisabled:r,onDrop:s,onDragOver(e){l(e,e.currentTarget)},onDragLeave(){l.cancel(),a(),n(null)},onDragEnd(){l.cancel(),a(),n(null)}})}function ZH(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:o,template:i,templateLock:a,wrapperRef:s,templateInsertUpdatesSelection:l,__experimentalCaptureToolbars:c,__experimentalAppenderTagName:u,renderAppender:d,orientation:p,placeholder:f,__experimentalLayout:m}=e;!function(e,t,n,r,o,i,a,s){const{updateBlockListSettings:l}=(0,ur.Z)(Mb),{blockListSettings:c,parentLock:u}=(0,cr.Z)((t=>{const n=t(Mb).getBlockRootClientId(e);return{blockListSettings:t(Mb).getBlockListSettings(e),parentLock:t(Mb).getTemplateLock(n)}}),[e]),d=(0,_.useMemo)((()=>t),t);(0,_.useLayoutEffect)((()=>{const t={allowedBlocks:d,templateLock:void 0===o?u:o};if(void 0!==i&&(t.__experimentalCaptureToolbars=i),void 0!==a)t.orientation=a;else{const e=d_(null==s?void 0:s.type);t.orientation=e.getOrientation(s)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),(0,Ie.ZP)(c,t)||l(e,t)}),[e,c,d,n,r,o,u,i,a,l,s])}(t,n,r,o,a,c,p,m),function(e,t,n,r){const{getSelectedBlocksInitialCaretPosition:o}=(0,cr.Z)(Mb),{replaceInnerBlocks:i}=(0,ur.Z)(Mb),a=(0,cr.Z)((t=>t(Mb).getBlocks(e)),[e]),s=(0,_.useRef)(null);(0,_.useLayoutEffect)((()=>{if((0===a.length||"all"===n)&&!(0,Ee.isEqual)(t,s.current)){s.current=t;const n=rp(a,t);(0,Ee.isEqual)(n,a)||i(e,n,0===a.length&&r&&0!==n.length,o())}}),[a,t,n,e])}(t,i,a,l);const h=(0,cr.Z)((e=>{const n=e(Mb).getBlock(t),r=ml(n.name);if(r&&r.providesContext)return function(e,t){MH.has(t)||MH.set(t,new WeakMap);const n=MH.get(t);if(!n.has(e)){const r=(0,Ee.mapValues)(t.providesContext,(t=>e[t]));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return(0,_.createElement)(DE,{value:h},(0,_.createElement)(eV,{rootClientId:t,renderAppender:d,__experimentalAppenderTagName:u,__experimentalLayout:m,wrapperRef:s,placeholder:f}))}function UH(e){return KN(e),(0,_.createElement)(ZH,e)}const $H=(0,_.forwardRef)(((e,t)=>{const n=GH({ref:t},e);return(0,_.createElement)("div",{className:"block-editor-inner-blocks"},(0,_.createElement)("div",n))}));function GH(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n}=jb(),r=Hr("medium","<"),{__experimentalCaptureToolbars:o,hasOverlay:i}=(0,cr.Z)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:o,hasSelectedInnerBlock:i,isNavigationMode:a}=e(Mb),s=t(n),l=a()||r;return{__experimentalCaptureToolbars:e(pc).hasBlockSupport(s,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==s&&!o(n)&&!i(n,!0)&&l}}),[n,r]),a=Er([e.ref,WH({rootClientId:n})]),s={__experimentalCaptureToolbars:o,...t},l=s.value&&s.onChange?UH:ZH;return{...e,ref:a,className:Lr()(e.className,"block-editor-block-list__layout",{"has-overlay":i}),children:n?(0,_.createElement)(l,(0,dr.Z)({},s,{clientId:n})):(0,_.createElement)(eV,t)}}GH.save=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{innerBlocks:t}=Xc,n=nu(t,{isInnerBlocks:!0}),r=(0,_.createElement)(Sc,null,n);return{...e,children:r}},$H.DefaultBlockAppender=OH,$H.ButtonBlockAppender=LH,$H.Content=()=>GH.save().children;var qH=$H;const KH=(0,_.createContext)(),YH=(0,_.createContext)();function XH(e){let{className:t,...n}=e;const[r,o]=(0,_.useState)(),i=Hr("medium"),{isOutlineMode:a,isFocusMode:s,isNavigationMode:l}=(0,cr.Z)((e=>{const{getSettings:t,isNavigationMode:n}=e(Mb),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,isNavigationMode:n()}}),[]),c=GH({ref:Er([iA(),bz(),o]),className:Lr()("is-root-container",t,{"is-outline-mode":a,"is-focus-mode":s&&i,"is-navigate-mode":l})},n);return(0,_.createElement)(KH.Provider,{value:r},(0,_.createElement)("div",c))}function JH(e){return function(){const e=(0,cr.Z)((e=>e(Mb).getSettings().__experimentalBlockPatterns),[]);(0,_.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const r=()=>{n++,n>=e.length||((0,xe.Ys)(Mb).__experimentalGetParsedPattern(e[n].name),t=yz(r))};return t=yz(r),()=>wz(t)}),[e])}(),(0,_.createElement)(PH,null,(0,_.createElement)(Fb,{value:Db},(0,_.createElement)(XH,e)))}function QH(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:i=p_}=e;const[a,s]=(0,_.useState)(new Set),l=(0,_.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{s((t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n}))}))}),[s]),{order:c,selectedBlocks:u}=(0,cr.Z)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r}=e(Mb);return{order:t(n),selectedBlocks:r()}}),[n]);return(0,_.createElement)(m_,{value:i},(0,_.createElement)(YH.Provider,{value:l},c.map((e=>(0,_.createElement)(IE.ZP,{key:e,value:!a.has(e)&&!u.includes(e)},(0,_.createElement)(IN,{rootClientId:n,clientId:e}))))),c.length<1&&t,(0,_.createElement)(CL,{tagName:o,rootClientId:n,renderAppender:r}))}function eV(e){return(0,_.createElement)(IE.ZP,{value:!1},(0,_.createElement)(QH,e))}JH.__unstableElementContext=KH;var tV=Vi((function(e,t){const n=function(e){const{expanded:t=!1,...n}=zi(e,"VStack");return X_({direction:"column",expanded:t,...n})}(e);return(0,_.createElement)(fa,(0,dr.Z)({},n,{ref:t}))}),"VStack"),nV=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","state","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","setState"],rV=[].concat(nV,["value","checked","unstable_checkOnFocus"]),oV=Mp({as:"div",useHook:Bp({name:"RadioGroup",compose:AR,keys:nV,useProps:function(e,t){return zp({role:"radiogroup"},t)}}),useCreateElement:function(e,t,n){return Sp(e,t,n)}});function iV(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition";switch(t){case"transition":e="transition-duration: 0ms;";break;case"animation":e="animation-duration: 1ms;";break;default:e="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${e};\n\t\t}\n\t`}const aV=(0,sy.iv)("background:",Wy.ui.background,";border:1px solid;border-color:",Wy.ui.border,";border-radius:",Gw.controlBorderRadius,";display:inline-flex;min-height:",Gw.controlHeight,";min-width:0;padding:2px;position:relative;transition:transform ",Gw.transitionDurationFastest," linear;",iV("transition")," &:hover{border-color:",Wy.ui.borderHover,";}&:focus-within{border-color:",Wy.ui.borderFocus,";box-shadow:",Gw.controlBoxShadowFocus,";outline:none;z-index:1;}",""),sV={name:"7whenc",styles:"display:flex;width:100%"},lV=da("div",{target:"eakva830"})("background:",Wy.gray[900],";border-radius:",Gw.controlBorderRadius,";box-shadow:",Gw.toggleGroupControlBackdropBoxShadow,";left:0;position:absolute;top:2px;bottom:2px;transition:transform ",Gw.transitionDurationFast," ease;",iV("transition")," z-index:1;");var cV=(0,_.memo)((function(e){let{containerRef:t,containerWidth:n,isAdaptiveWidth:r,state:o}=e;const[i,a]=(0,_.useState)(0),[s,l]=(0,_.useState)(0),[c,u]=(0,_.useState)(!1),[d,p]=(0,_.useState)(!1);return(0,_.useEffect)((()=>{const e=null==t?void 0:t.current;if(!e)return;const n=e.querySelector(`[data-value="${o}"]`);if(p(!!n),!n)return;const{x:r}=e.getBoundingClientRect(),{width:i,x:s}=n.getBoundingClientRect();let d;return a(s-r-1),l(i),c||(d=window.requestAnimationFrame((()=>{u(!0)}))),()=>window.cancelAnimationFrame(d)}),[c,t,n,o,r]),d?(0,_.createElement)(lV,{role:"presentation",style:{transform:`translateX(${i}px)`,transition:c?void 0:"none",width:s}}):null}));const uV=(0,_.createContext)({});var dV=uV;const pV=()=>{};var fV=Vi((function e(t,n){const{className:r,isAdaptiveWidth:o=!1,isBlock:i=!1,label:a,hideLabelFromVision:s=!1,help:l,onChange:c=pV,value:u,children:d,...p}=zi(t,"ToggleGroupControl"),f=Fi(),m=(0,_.useRef)(),[h,g]=Wr()(),v=function(e){void 0===e&&(e={});var t=BP(e),n=t.state,r=t.loop,o=void 0===r||r,i=Hp(t,["state","loop"]),a=(0,_.useState)(n),s=a[0],l=a[1],c=rR(zp(zp({},i),{},{loop:o}));return zp(zp({},c),{},{state:s,setState:l})}({baseId:zo(e,"toggle-group-control").toString(),state:u});zx((()=>{c(v.state)}),[v.state]),zx((()=>{u!==v.state&&v.setState(u)}),[u]);const b=(0,_.useMemo)((()=>f(aV,i&&sV,"medium",r)),[r,i]);return(0,_.createElement)(Ky,{help:l},(0,_.createElement)(dV.Provider,{value:{...v,isBlock:!o}},!s&&(0,_.createElement)("div",null,(0,_.createElement)(Ky.VisualLabel,null,a)),(0,_.createElement)(oV,(0,dr.Z)({},v,{"aria-label":a,as:fa,className:b},p,{ref:Er([m,n])}),h,(0,_.createElement)(cV,(0,dr.Z)({},v,{containerRef:m,containerWidth:g.width,isAdaptiveWidth:o})),d)))}),"ToggleGroupControl");function mV(e){return void 0!==e.checked?e.checked:void 0!==e.value&&e.state===e.value}function hV(e,t){var n=Cf(e,"change");Object.defineProperties(n,{type:{value:"change"},target:{value:e},currentTarget:{value:e}}),null==t||t(n)}var gV=Mp({as:"input",memo:!0,useHook:Bp({name:"Radio",compose:Tf,keys:rV,useOptions:function(e,t){var n,r=t.value,o=t.checked,i=e.unstable_clickOnEnter,a=void 0!==i&&i,s=e.unstable_checkOnFocus,l=void 0===s||s,c=Hp(e,["unstable_clickOnEnter","unstable_checkOnFocus"]);return zp(zp({checked:o,unstable_clickOnEnter:a,unstable_checkOnFocus:l},c),{},{value:null!=(n=c.value)?n:r})},useProps:function(e,t){var n=t.ref,r=t.onChange,o=t.onClick,i=Hp(t,["ref","onChange","onClick"]),a=(0,_.useRef)(null),s=(0,_.useState)(!0),l=s[0],c=s[1],u=mV(e),d=Yp(e.currentId===e.id),p=Yp(r),f=Yp(o);!function(e){var t=(0,_.useState)((function(){return mV(e)}))[0],n=(0,_.useState)(e.currentId)[0],r=e.id,o=e.setCurrentId;(0,_.useEffect)((function(){t&&r&&n!==r&&(null==o||o(r))}),[t,r,o,n])}(e),(0,_.useEffect)((function(){var e=a.current;e&&("INPUT"===e.tagName&&"radio"===e.type||c(!1))}),[]);var m=(0,_.useCallback)((function(t){var n,r;null===(n=p.current)||void 0===n||n.call(p,t),t.defaultPrevented||e.disabled||null===(r=e.setState)||void 0===r||r.call(e,e.value)}),[e.disabled,e.setState,e.value]),h=(0,_.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),e.defaultPrevented||l||hV(e.currentTarget,m)}),[m,l]);return(0,_.useEffect)((function(){var t=a.current;t&&e.unstable_moves&&d.current&&e.unstable_checkOnFocus&&hV(t,m)}),[e.unstable_moves,e.unstable_checkOnFocus,m]),zp({ref:Up(a,n),role:l?void 0:"radio",type:l?"radio":void 0,value:l?e.value:void 0,name:l?e.baseId:void 0,"aria-checked":u,checked:u,onChange:m,onClick:h},i)}})});const vV=da("div",{target:"eu1cvm72"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),bV={name:"82a6rk",styles:"flex:1"},yV=(0,sy.iv)("align-items:center;appearance:none;background:transparent;border:none;border-radius:",Gw.controlBorderRadius,";color:",Wy.gray[700],";cursor:pointer;display:flex;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ",Gw.transitionDurationFast," linear,color ",Gw.transitionDurationFast," linear,font-weight 60ms linear;",iV("transition")," user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:",Gw.toggleGroupControlBackgroundColor,";}",""),wV=(0,sy.iv)("color:",Wy.white,";&:active{background:transparent;}",""),kV=da("div",{target:"eu1cvm71"})("font-size:",Gw.fontSize,";line-height:1;position:absolute;top:50%;left:50%;transform:translate( -50%, -50% );"),xV={name:"1qsuvl4",styles:"background:transparent"},_V=da("div",{target:"eu1cvm70"})("font-size:",Gw.fontSize,";font-weight:bold;height:0;overflow:hidden;visibility:hidden;"),EV=(0,sy.iv)("min-height:",Gw.controlHeight,";",""),{ButtonContentView:CV,LabelPlaceholderView:SV,LabelView:IV}=y,TV=e=>{let{showTooltip:t,text:n,children:r}=e;return t&&n?(0,_.createElement)(Yo,{text:n,position:"top center"},r):(0,_.createElement)(_.Fragment,null,r)};var NV=Vi((function e(t,n){const r=(0,_.useContext)(uV),o=zi({...t,id:zo(e,r.baseId||"toggle-group-control-option")},"ToggleGroupControlOption"),{className:i,isBlock:a=!1,label:s,value:l,showTooltip:c=!1,...u}={...r,...o},d=u.state===l,p=Fi(),f=p(a&&bV),m=p(yV,i,d&&wV),h=u["aria-label"]?u["aria-label"]:s;return(0,_.createElement)(IV,{className:f,"data-active":d},(0,_.createElement)(TV,{showTooltip:c,text:h},(0,_.createElement)(gV,(0,dr.Z)({},u,{as:"button","aria-label":h,className:m,"data-value":l,ref:n,value:l}),(0,_.createElement)(CV,null,s),(0,_.createElement)(SV,{"aria-hidden":!0},s))))}),"ToggleGroupControlOption"),AV=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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 PV=e=>null!=e;var RV=Vi((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:a,marginX:s,marginY:l,padding:c,paddingBottom:u,paddingLeft:d,paddingRight:p,paddingTop:f,paddingX:m,paddingY:h,...g}=zi(e,"Spacer");return{...g,className:Fi()(PV(n)&&(0,sy.iv)("margin:",dy(n),";",""),PV(l)&&(0,sy.iv)("margin-bottom:",dy(l),";margin-top:",dy(l),";",""),PV(s)&&(0,sy.iv)("margin-left:",dy(s),";margin-right:",dy(s),";",""),PV(a)&&(0,sy.iv)("margin-top:",dy(a),";",""),PV(r)&&(0,sy.iv)("margin-bottom:",dy(r),";",""),PV(o)&&(0,sy.iv)("margin-left:",dy(o),";",""),PV(i)&&(0,sy.iv)("margin-right:",dy(i),";",""),PV(c)&&(0,sy.iv)("padding:",dy(c),";",""),PV(h)&&(0,sy.iv)("padding-bottom:",dy(h),";padding-top:",dy(h),";",""),PV(m)&&(0,sy.iv)("padding-left:",dy(m),";padding-right:",dy(m),";",""),PV(f)&&(0,sy.iv)("padding-top:",dy(f),";",""),PV(u)&&(0,sy.iv)("padding-bottom:",dy(u),";",""),PV(d)&&(0,sy.iv)("padding-left:",dy(d),";",""),PV(p)&&(0,sy.iv)("padding-right:",dy(p),";",""),t)}}(e);return(0,_.createElement)(fa,(0,dr.Z)({},n,{ref:t}))}),"Spacer");function LV(e,t,n){return"number"!=typeof e?null:parseFloat((0,Ee.clamp)(e,t,n))}const OV=()=>(0,sy.iv)({height:30,minHeight:30},"",""),MV=da("div",{target:"exqw8y214"})({name:"17z6zai",styles:"-webkit-tap-highlight-color:transparent;box-sizing:border-box;align-items:flex-start;display:inline-flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%"}),DV=da("div",{target:"exqw8y213"})("box-sizing:border-box;color:",Wy.blue.medium.focus,";display:block;flex:1;position:relative;width:100%;",(e=>{let{color:t=Wy.ui.borderFocus}=e;return(0,sy.iv)({color:t},"","")}),";",OV,";",(e=>{let{marks:t}=e;return(0,sy.iv)({marginBottom:t?16:null},"","")}),";"),BV=da("span",{target:"exqw8y212"})("margin-top:",4,"px;",_y({marginRight:6}),";"),FV=da("span",{target:"exqw8y211"})("margin-top:",4,"px;",_y({marginLeft:16}),";"),jV=da("span",{target:"exqw8y210"})("background-color:",Wy.lightGray[600],";box-sizing:border-box;left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",4,"px;",(e=>{let{disabled:t,railColor:n}=e,r=n||null;return t&&(r=Wy.lightGray[400]),(0,sy.iv)({background:r},"","")}),";"),zV=da("span",{target:"exqw8y29"})("background-color:currentColor;border-radius:",4,"px;box-sizing:border-box;height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",(e=>{let{disabled:t,trackColor:n}=e,r=n||"currentColor";return t&&(r=Wy.lightGray[800]),(0,sy.iv)({background:r},"","")}),";"),HV=da("span",{target:"exqw8y28"})({name:"1xuuvmv",styles:"box-sizing:border-box;display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),VV=da("span",{target:"exqw8y27"})("box-sizing:border-box;height:",12,"px;left:0;position:absolute;top:-4px;width:1px;",(e=>{let{disabled:t,isFilled:n}=e,r=n?"currentColor":Wy.lightGray[600];return t&&(r=Wy.lightGray[800]),(0,sy.iv)({backgroundColor:r},"","")}),";"),WV=da("span",{target:"exqw8y26"})("box-sizing:border-box;color:",Wy.lightGray[600],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(e=>{let{isFilled:t}=e;return(0,sy.iv)({color:t?Wy.darkGray[300]:Wy.lightGray[600]},"","")}),";");var ZV={name:"1sb75b3",styles:"background-color:var( --wp-admin-theme-color )"};const UV=e=>{let{disabled:t}=e;return t?(0,sy.iv)("background-color:",Wy.lightGray[800],";",""):ZV},$V=da("span",{target:"exqw8y25"})("align-items:center;box-sizing:border-box;display:flex;height:",12,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",12,"px;border-radius:50%;",UV,";",_y({marginLeft:-10}),";",_y({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),GV=da("span",{target:"exqw8y24"})("align-items:center;border-radius:50%;box-sizing:border-box;height:100%;outline:0;position:absolute;user-select:none;width:100%;",UV,";",(e=>{let{isFocused:t}=e;return t?(0,sy.iv)("&::before{content:' ';position:absolute;background-color:var( --wp-admin-theme-color );opacity:0.4;border-radius:50%;height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):""}),";"),qV=da("input",{target:"exqw8y23"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",12,"px );");var KV={name:"1cypxip",styles:"top:-80%"},YV={name:"1lr98c4",styles:"bottom:-80%"};const XV=da("span",{target:"exqw8y22"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-sizing:border-box;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(e=>{let{show:t}=e;return(0,sy.iv)({opacity:t?1:0},"","")}),";",(e=>{let{position:t}=e;return"bottom"===t?YV:KV}),";",iV("transition"),";",_y({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),JV=da(Yx,{target:"exqw8y21"})("box-sizing:border-box;display:inline-block;font-size:13px;margin-top:0;width:",dy(16),"!important;input[type='number']&{",OV,";}",_y({marginLeft:`${dy(4)} !important`}),";"),QV=da("span",{target:"exqw8y20"})("box-sizing:border-box;display:block;margin-top:0;button,button.is-small{margin-left:0;",OV,";}",_y({marginLeft:8}),";");var eW=(0,_.forwardRef)((function(e,t){let{describedBy:n,label:r,onHideTooltip:o=Ee.noop,onMouseLeave:i=Ee.noop,onMouseMove:a=Ee.noop,onShowTooltip:s=Ee.noop,value:l,...c}=e;const u=function(e){let{onHide:t=Ee.noop,onMouseLeave:n=Ee.noop,onMouseMove:r=Ee.noop,onShow:o=Ee.noop,timeout:i=300}=e;const[a,s]=(0,_.useState)(!1),l=(0,_.useRef)(),c=(0,_.useCallback)((e=>{window.clearTimeout(l.current),l.current=setTimeout(e,i)}),[i]),u=(0,_.useCallback)((e=>{r(e),c((()=>{a||(s(!0),o())}))}),[]),d=(0,_.useCallback)((e=>{n(e),c((()=>{s(!1),t()}))}),[]);return(0,_.useEffect)((()=>()=>{window.clearTimeout(l.current)})),{onMouseMove:u,onMouseLeave:d}}({onHide:o,onMouseLeave:i,onMouseMove:a,onShow:s});return(0,_.createElement)(qV,(0,dr.Z)({},c,u,{"aria-describedby":n,"aria-label":r,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:l}))}));function tW(e){let{className:t,isFilled:n=!1,label:r,style:o={},...i}=e;const a=Lr()("components-range-control__mark",n&&"is-filled",t),s=Lr()("components-range-control__mark-label",n&&"is-filled");return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(VV,(0,dr.Z)({},i,{"aria-hidden":"true",className:a,isFilled:n,style:o})),r&&(0,_.createElement)(WV,{"aria-hidden":"true",className:s,isFilled:n,style:o},r))}function nW(e){let{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:a=0,...s}=e;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(jV,(0,dr.Z)({disabled:t},s)),n&&(0,_.createElement)(rW,{disabled:t,marks:n,min:r,max:o,step:i,value:a}))}function rW(e){let{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:a=0}=e;"any"===i&&(i=1);const s=function(e){let{marks:t,min:n=0,max:r=100,step:o=1,value:i=0}=e;if(!t)return[];const a=r-n;if(!Array.isArray(t)){t=[];const e=1+Math.round(a/o);for(;e>t.push({value:o*t.length+n}););}const s=[];return t.forEach(((e,t)=>{if(e.value<n||e.value>r)return;const o=`mark-${t}`,l=e.value<=i,c=(e.value-n)/a*100+"%",u={[q()?"right":"left"]:c};s.push({...e,isFilled:l,key:o,style:u})})),s}({marks:n,min:r,max:o,step:i,value:a});return(0,_.createElement)(HV,{"aria-hidden":"true",className:"components-range-control__marks"},s.map((e=>(0,_.createElement)(tW,(0,dr.Z)({},e,{key:e.key,"aria-hidden":"true",disabled:t})))))}function oW(e){let{className:t,inputRef:n,tooltipPosition:r,show:o=!1,style:i={},value:a=0,renderTooltipContent:s=(e=>e),zIndex:l=100,...c}=e;const u=function(e){let{inputRef:t,tooltipPosition:n}=e;const[r,o]=(0,_.useState)(),i=(0,_.useCallback)((()=>{t&&t.current&&o(n)}),[n]);return(0,_.useEffect)((()=>{i()}),[i]),(0,_.useEffect)((()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}))),r}({inputRef:n,tooltipPosition:r}),d=Lr()("components-simple-tooltip",t),p={...i,zIndex:l};return(0,_.createElement)(XV,(0,dr.Z)({},c,{"aria-hidden":o,className:d,position:u,show:o,role:"tooltip",style:p}),s(a))}var iW=(0,_.forwardRef)((function e(t,n){var r;let{afterIcon:o,allowReset:i=!1,beforeIcon:a,className:s,currentInput:l,color:c=Wy.ui.theme,disabled:u=!1,help:d,initialPosition:p,isShiftStepEnabled:f=!0,label:m,hideLabelFromVision:h=!1,marks:g=!1,max:v=100,min:b=0,onBlur:y=Ee.noop,onChange:w=Ee.noop,onFocus:k=Ee.noop,onMouseMove:x=Ee.noop,onMouseLeave:E=Ee.noop,railColor:C,resetFallbackValue:S,renderTooltipContent:I=(e=>e),showTooltip:T,shiftStep:N=10,step:A=1,trackColor:P,value:R,withInputField:L=!0,...O}=t;const[M,D]=function(e){let{min:t,max:n,value:r,initial:o}=e;const[i,a]=s_(LV(r,t,n),{initial:o,fallback:null});return[i,(0,_.useCallback)((e=>{a(null===e?null:LV(e,t,n))}),[t,n])]}({min:b,max:v,value:R,initial:p}),B=(0,_.useRef)(!1);"any"===A&&(T=!1,L=!1);const[F,j]=(0,_.useState)(T),[z,H]=(0,_.useState)(!1),V=(0,_.useRef)(),W=null===(r=V.current)||void 0===r?void 0:r.matches(":focus"),Z=!u&&z,$=null===M,G=$?"":void 0!==M?M:l,K=$?(v-b)/2+b:M,Y=$?50:(M-b)/(v-b)*100,X=`${(0,Ee.clamp)(Y,0,100)}%`,J=Lr()("components-range-control",s),Q=Lr()("components-range-control__wrapper",!!g&&"is-marked"),ee=zo(e,"inspector-range-control"),te=d?`${ee}__help`:void 0,ne=!1!==T&&(0,Ee.isFinite)(M),re=()=>{let e=parseFloat(S),t=e;isNaN(e)&&(e=null,t=void 0),D(e),w(t)},oe={[q()?"right":"left"]:X};return(0,_.createElement)(Ky,{className:J,label:m,hideLabelFromVision:h,id:ee,help:d},(0,_.createElement)(MV,{className:"components-range-control__root"},a&&(0,_.createElement)(BV,null,(0,_.createElement)(Jo,{icon:a})),(0,_.createElement)(DV,{className:Q,color:c,marks:!!g},(0,_.createElement)(eW,(0,dr.Z)({},O,{className:"components-range-control__slider",describedBy:te,disabled:u,id:ee,label:m,max:v,min:b,onBlur:e=>{y(e),H(!1),j(!1)},onChange:e=>{const t=parseFloat(e.target.value);D(t),w(t)},onFocus:e=>{k(e),H(!0),j(!0)},onMouseMove:x,onMouseLeave:E,ref:e=>{V.current=e,n&&n(e)},step:A,value:G})),(0,_.createElement)(nW,{"aria-hidden":!0,disabled:u,marks:g,max:v,min:b,railColor:C,step:A,value:K}),(0,_.createElement)(zV,{"aria-hidden":!0,className:"components-range-control__track",disabled:u,style:{width:X},trackColor:P}),(0,_.createElement)($V,{style:oe,disabled:u},(0,_.createElement)(GV,{"aria-hidden":!0,isFocused:Z,disabled:u})),ne&&(0,_.createElement)(oW,{className:"components-range-control__tooltip",inputRef:V,tooltipPosition:"bottom",renderTooltipContent:I,show:W||F,style:oe,value:M})),o&&(0,_.createElement)(FV,null,(0,_.createElement)(Jo,{icon:o})),L&&(0,_.createElement)(JV,{"aria-label":m,className:"components-range-control__number",disabled:u,inputMode:"decimal",isShiftStepEnabled:f,max:v,min:b,onBlur:()=>{B.current&&(re(),B.current=!1)},onChange:e=>{e=parseFloat(e),D(e),isNaN(e)?i&&(B.current=!0):((e<b||e>v)&&(e=LV(e,b,v)),w(e),B.current=!1)},shiftStep:N,step:A,value:G}),i&&(0,_.createElement)(QV,null,(0,_.createElement)(ga,{className:"components-range-control__reset",disabled:u||void 0===M,variant:"secondary",isSmall:!0,onClick:re},U("Reset")))))}));const aW=da(Yx,{target:"ez9hsf46"})(yk,"{width:",dy(24),";}"),sW=da(cR,{target:"ez9hsf45"})("margin-left:",dy(-2),";width:5em;",Ck,"{display:none;}"),lW=da(iW,{target:"ez9hsf44"})("flex:1;",Uy,"{margin-bottom:0;}"),cW=`\n&&& ${wk} {\n\theight: 40px;\n}`,uW=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${dy(2)} );\n\tmargin-left: ${dy(1)};\n}`,dW=da("div",{target:"ez9hsf43"})("padding:",dy(2)," ",dy(4),";"),pW=da("div",{target:"ez9hsf42"})("width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",dy(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",dy(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",Gw.borderWidthFocus," #fff;}",uW," ",Uy,"{margin-bottom:0;}",cW,";"),fW=da(ga,{target:"ez9hsf41"})("&&&&&{min-width:",dy(6),";padding:0;}"),mW=da(Vx,{target:"ez9hsf40"})({name:"1287a6j",styles:"width:8em"});var hW=n(17211);var gW=of("Mac")&&!of("Chrome")&&of("Safari");function vW(e){return function(t){return e&&!Lp(t,e)?e:t}}function bW(e){void 0===e&&(e={});var t=BP(e),n=t.gutter,r=void 0===n?12:n,o=t.placement,i=void 0===o?"bottom":o,a=t.unstable_flip,s=void 0===a||a,l=t.unstable_offset,c=t.unstable_preventOverflow,u=void 0===c||c,d=t.unstable_fixed,p=void 0!==d&&d,f=t.modal,m=void 0!==f&&f,h=Hp(t,["gutter","placement","unstable_flip","unstable_offset","unstable_preventOverflow","unstable_fixed","modal"]),g=(0,_.useRef)(null),v=(0,_.useRef)(null),b=(0,_.useRef)(null),y=(0,_.useRef)(null),w=(0,_.useState)(i),k=w[0],x=w[1],E=(0,_.useState)(i),C=E[0],S=E[1],I=(0,_.useState)(l||[0,r])[0],T=(0,_.useState)({position:"fixed",left:"100%",top:"100%"}),N=T[0],A=T[1],P=(0,_.useState)({}),R=P[0],L=P[1],O=function(e){void 0===e&&(e={});var t=BP(e),n=t.modal,r=void 0===n||n,o=function(e){void 0===e&&(e={});var t,n,r=BP(e),o=r.visible,i=void 0!==o&&o,a=r.animated,s=void 0!==a&&a,l=VP(Hp(r,["visible","animated"])),c=(0,_.useState)(i),u=c[0],d=c[1],p=(0,_.useState)(s),f=p[0],m=p[1],h=(0,_.useState)(!1),g=h[0],v=h[1],b=(t=u,n=(0,_.useRef)(null),Kp((function(){n.current=t}),[t]),n),y=null!=b.current&&b.current!==u;f&&!g&&y&&v(!0),(0,_.useEffect)((function(){if("number"==typeof f&&g){var e=setTimeout((function(){return v(!1)}),f);return function(){clearTimeout(e)}}return function(){}}),[f,g]);var w=(0,_.useCallback)((function(){return d(!0)}),[]),k=(0,_.useCallback)((function(){return d(!1)}),[]),x=(0,_.useCallback)((function(){return d((function(e){return!e}))}),[]),E=(0,_.useCallback)((function(){return v(!1)}),[]);return zp(zp({},l),{},{visible:u,animated:f,animating:g,show:w,hide:k,toggle:x,setVisible:d,setAnimated:m,stopAnimation:E})}(Hp(t,["modal"])),i=(0,_.useState)(r),a=i[0],s=i[1],l=(0,_.useRef)(null);return zp(zp({},o),{},{modal:a,setModal:s,unstable_disclosureRef:l})}(zp({modal:m},h)),M=(0,_.useCallback)((function(){return!!g.current&&(g.current.forceUpdate(),!0)}),[]),D=(0,_.useCallback)((function(e){e.placement&&S(e.placement),e.styles&&(A(vW(e.styles.popper)),y.current&&L(vW(e.styles.arrow)))}),[]);return Kp((function(){return v.current&&b.current&&(g.current=(0,hW.fi)(v.current,b.current,{placement:k,strategy:p?"fixed":"absolute",onFirstUpdate:gW?D:void 0,modifiers:[{name:"eventListeners",enabled:O.visible},{name:"applyStyles",enabled:!1},{name:"flip",enabled:s,options:{padding:8}},{name:"offset",options:{offset:I}},{name:"preventOverflow",enabled:u,options:{tetherOffset:function(){var e;return(null===(e=y.current)||void 0===e?void 0:e.clientWidth)||0}}},{name:"arrow",enabled:!!y.current,options:{element:y.current}},{name:"updateState",phase:"write",requires:["computeStyles"],enabled:O.visible&&!0,fn:function(e){var t=e.state;return D(t)}}]})),function(){g.current&&(g.current.destroy(),g.current=null)}}),[k,p,O.visible,s,I,u]),(0,_.useEffect)((function(){if(O.visible){var e=window.requestAnimationFrame((function(){var e;null===(e=g.current)||void 0===e||e.forceUpdate()}));return function(){window.cancelAnimationFrame(e)}}}),[O.visible]),zp(zp({},O),{},{unstable_referenceRef:v,unstable_popoverRef:b,unstable_arrowRef:y,unstable_popoverStyles:N,unstable_arrowStyles:R,unstable_update:M,unstable_originalPlacement:k,placement:C,place:x})}var yW={currentTooltipId:null,listeners:new Set,subscribe:function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},show:function(e){this.currentTooltipId=e,this.listeners.forEach((function(t){return t(e)}))},hide:function(e){this.currentTooltipId===e&&(this.currentTooltipId=null,this.listeners.forEach((function(e){return e(null)})))}},wW=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","unstable_disclosureRef","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place","unstable_timeout","unstable_setTimeout"],kW=[].concat(wW,["unstable_portal"]),xW=Mp({as:"div",useHook:Bp({name:"TooltipReference",compose:af,keys:wW,useProps:function(e,t){var n=t.ref,r=t.onFocus,o=t.onBlur,i=t.onMouseEnter,a=t.onMouseLeave,s=Hp(t,["ref","onFocus","onBlur","onMouseEnter","onMouseLeave"]),l=Yp(r),c=Yp(o),u=Yp(i),d=Yp(a),p=(0,_.useCallback)((function(t){var n,r;null===(n=l.current)||void 0===n||n.call(l,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),f=(0,_.useCallback)((function(t){var n,r;null===(n=c.current)||void 0===n||n.call(c,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]),m=(0,_.useCallback)((function(t){var n,r;null===(n=u.current)||void 0===n||n.call(u,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),h=(0,_.useCallback)((function(t){var n,r;null===(n=d.current)||void 0===n||n.call(d,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]);return zp({ref:Up(e.unstable_referenceRef,n),tabIndex:0,onFocus:p,onBlur:f,onMouseEnter:m,onMouseLeave:h,"aria-describedby":e.baseId},s)}})});const _W=(0,_.createContext)({});var EW=Bp({name:"DisclosureContent",compose:af,keys:["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],useProps:function(e,t){var n=t.onTransitionEnd,r=t.onAnimationEnd,o=t.style,i=Hp(t,["onTransitionEnd","onAnimationEnd","style"]),a=e.animated&&e.animating,s=(0,_.useState)(null),l=s[0],c=s[1],u=!e.visible&&!a,d=u?zp({display:"none"},o):o,p=Yp(n),f=Yp(r),m=(0,_.useRef)(0);(0,_.useEffect)((function(){if(e.animated)return m.current=window.requestAnimationFrame((function(){m.current=window.requestAnimationFrame((function(){e.visible?c("enter"):c(a?"leave":null)}))})),function(){return window.cancelAnimationFrame(m.current)}}),[e.animated,e.visible,a]);var h=(0,_.useCallback)((function(t){var n;Xp(t)&&a&&!0===e.animated&&(null===(n=e.stopAnimation)||void 0===n||n.call(e))}),[e.animated,a,e.stopAnimation]),g=(0,_.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),h(e)}),[h]),v=(0,_.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),h(e)}),[h]);return zp({id:e.baseId,"data-enter":"enter"===l?"":void 0,"data-leave":"leave"===l?"":void 0,onTransitionEnd:g,onAnimationEnd:v,hidden:u,style:d},i)}});function CW(){return qp?document.body:null}Mp({as:"div",useHook:EW});var SW=(0,_.createContext)(CW());function IW(e){var t=e.children,n=(0,_.useContext)(SW)||CW(),r=(0,_.useState)((function(){if(qp){var e=document.createElement("div");return e.className=IW.__className,e}return null}))[0];return Kp((function(){if(r&&n)return n.appendChild(r),function(){n.removeChild(r)}}),[r,n]),r?(0,C.createPortal)((0,_.createElement)(SW.Provider,{value:r},t),r):null}function TW(e){e.defaultPrevented||"Escape"===e.key&&yW.show(null)}IW.__className="__reakit-portal",IW.__selector="."+IW.__className;var NW=Mp({as:"div",memo:!0,useHook:Bp({name:"Tooltip",compose:EW,keys:kW,useOptions:function(e){var t=e.unstable_portal;return zp({unstable_portal:void 0===t||t},Hp(e,["unstable_portal"]))},useProps:function(e,t){var n=t.ref,r=t.style,o=t.wrapElement,i=Hp(t,["ref","style","wrapElement"]);(0,_.useEffect)((function(){var t;$p(null===(t=e.unstable_popoverRef)||void 0===t?void 0:t.current).addEventListener("keydown",TW)}),[]);var a=(0,_.useCallback)((function(t){return e.unstable_portal&&(t=(0,_.createElement)(IW,null,t)),o?o(t):t}),[e.unstable_portal,o]);return zp({ref:Up(e.unstable_popoverRef,n),role:"tooltip",style:zp(zp({},e.unstable_popoverStyles),{},{pointerEvents:"none"},r),wrapElement:a},i)}})}),AW=Vi((function(e,t){const{as:n="span",shortcut:r,className:o,...i}=zi(e,"Shortcut");if(!r)return null;let a,s;return"string"==typeof r?a=r:(a=r.display,s=r.ariaLabel),(0,_.createElement)(fa,(0,dr.Z)({as:n,className:o,"aria-label":s,ref:t},i),a)}),"Shortcut");const PW=(0,sy.iv)("z-index:",1000002,";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ",Gw.transitionDurationFastest," ease;&[data-enter]{opacity:1;}",""),RW=da("div",{target:"e7tfjmw1"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:",Wy.white,";padding:4px 8px;"),LW={name:"12mkfdx",styles:"outline:none"},OW=da(AW,{target:"e7tfjmw0"})("display:inline-block;margin-left:",dy(1),";"),{TooltipPopoverView:MW}=w;var DW=Vi((function(e,t){const{children:n,className:r,...o}=zi(e,"TooltipContent"),{tooltip:i}=(0,_.useContext)(_W),a=Fi()(PW,r);return(0,_.createElement)(NW,(0,dr.Z)({as:fa},o,i,{className:a,ref:t}),(0,_.createElement)(MW,null,n))}),"TooltipContent"),BW=Vi((function(e,t){const{animated:n=!0,animationDuration:r=160,baseId:o,children:i,content:a,focusable:s=!0,gutter:l=4,id:c,modal:u=!0,placement:d,visible:p=!1,shortcut:f,...m}=zi(e,"Tooltip"),h=function(e){void 0===e&&(e={});var t=BP(e),n=t.placement,r=void 0===n?"top":n,o=t.unstable_timeout,i=void 0===o?0:o,a=Hp(t,["placement","unstable_timeout"]),s=(0,_.useState)(i),l=s[0],c=s[1],u=(0,_.useRef)(null),d=(0,_.useRef)(null),p=bW(zp(zp({},a),{},{placement:r})),f=(p.modal,p.setModal,Hp(p,["modal","setModal"])),m=(0,_.useCallback)((function(){null!==u.current&&window.clearTimeout(u.current),null!==d.current&&window.clearTimeout(d.current)}),[]),h=(0,_.useCallback)((function(){m(),f.hide(),d.current=window.setTimeout((function(){yW.hide(f.baseId)}),l)}),[m,f.hide,l,f.baseId]),g=(0,_.useCallback)((function(){m(),!l||yW.currentTooltipId?(yW.show(f.baseId),f.show()):(yW.show(null),u.current=window.setTimeout((function(){yW.show(f.baseId),f.show()}),l))}),[m,l,f.show,f.baseId]);return(0,_.useEffect)((function(){return yW.subscribe((function(e){e!==f.baseId&&(m(),f.visible&&f.hide())}))}),[f.baseId,m,f.visible,f.hide]),(0,_.useEffect)((function(){return function(){m(),yW.hide(f.baseId)}}),[m,f.baseId]),zp(zp({},f),{},{hide:h,show:g,unstable_timeout:l,unstable_setTimeout:c})}({animated:n?r:void 0,baseId:o||c,gutter:l,placement:d,visible:p,...m}),g=(0,_.useMemo)((()=>({tooltip:h})),[h]);return(0,_.createElement)(_W.Provider,{value:g},a&&(0,_.createElement)(DW,{unstable_portal:u,ref:t},a,f&&(0,_.createElement)(OW,{shortcut:f})),i&&(0,_.createElement)(xW,(0,dr.Z)({},h,i.props,{ref:null==i?void 0:i.ref}),(e=>(s||(e.tabIndex=void 0),(0,_.cloneElement)(i,e)))))}),"Tooltip");const FW=e=>{let{values:t}=e;return(0,_.createElement)(_.Fragment,null,t.map((e=>{let[t,n]=e;return(0,_.createElement)(Ty,{key:n,isBlock:!0,display:"flex"},(0,_.createElement)(ck,{color:"blue"},n),(0,_.createElement)(ck,null,t))})))},jW=e=>{let{color:t,enableAlpha:n}=e;const{h:r,s:o,l:i,a:a}=t.toHsl(),s=[[Math.floor(r),"H"],[Math.round(100*o),"S"],[Math.round(100*i),"L"]];return n&&s.push([Math.round(100*a),"A"]),(0,_.createElement)(FW,{values:s})},zW=e=>{let{color:t,enableAlpha:n}=e;const{r:r,g:o,b:i,a:a}=t.toRgb(),s=[[r,"R"],[o,"G"],[i,"B"]];return n&&s.push([Math.round(100*a),"A"]),(0,_.createElement)(FW,{values:s})},HW=e=>{let{color:t}=e;const n=t.toHex().slice(1).toUpperCase();return(0,_.createElement)(Ty,null,(0,_.createElement)(ck,{color:"blue"},"#"),(0,_.createElement)(ck,null,n))},VW=e=>{let{color:t,colorType:n,enableAlpha:r}=e;const[o,i]=(0,_.useState)(null),a=(0,_.useRef)(),s={color:t,enableAlpha:r},l=(e=>{switch(e){case"hsl":return jW;case"rgb":return zW;default:case"hex":return HW}})(n),c=cH((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:case"hex":return t.toHex()}}),(()=>{a.current&&clearTimeout(a.current),i(t.toHex()),a.current=setTimeout((()=>{i(null),a.current=void 0}),3e3)}));return(0,_.useEffect)((()=>()=>{a.current&&clearTimeout(a.current)}),[]),(0,_.createElement)(BW,{content:(0,_.createElement)(ck,{color:"white"},o===t.toHex()?U("Copied!"):U("Copy"))},(0,_.createElement)(Sy,{justify:"flex-start",gap:dy(1),ref:c,style:{height:30}},(0,_.createElement)(l,s)))},WW=e=>{let{min:t,max:n,label:r,abbreviation:o,onChange:i,value:a}=e;return(0,_.createElement)(RV,{as:J_,spacing:4},(0,_.createElement)(aW,{min:t,max:n,label:r,hideLabelFromVision:!0,value:a,onChange:i,prefix:(0,_.createElement)(RV,{as:ck,paddingLeft:dy(3.5),color:"blue",lineHeight:1},o),hideHTMLArrows:!0}),(0,_.createElement)(lW,{label:r,hideLabelFromVision:!0,min:t,max:n,value:a,onChange:i,withInputField:!1}))},ZW=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{r:o,g:i,b:a,a:s}=t.toRgb();return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(WW,{min:0,max:255,label:"Red",abbreviation:"R",value:o,onChange:e=>n(Us({r:e,g:i,b:a,a:s}))}),(0,_.createElement)(WW,{min:0,max:255,label:"Green",abbreviation:"G",value:i,onChange:e=>n(Us({r:o,g:e,b:a,a:s}))}),(0,_.createElement)(WW,{min:0,max:255,label:"Blue",abbreviation:"B",value:a,onChange:e=>n(Us({r:o,g:i,b:e,a:s}))}),r&&(0,_.createElement)(WW,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*s),onChange:e=>n(Us({r:o,g:i,b:a,a:e/100}))}))},UW=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{h:o,s:i,l:a,a:s}=t.toHsl();return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(WW,{min:0,max:359,label:"Hue",abbreviation:"H",value:o,onChange:e=>{n(Us({h:e,s:i,l:a,a:s}))}}),(0,_.createElement)(WW,{min:0,max:100,label:"Saturation",abbreviation:"S",value:i,onChange:e=>{n(Us({h:o,s:e,l:a,a:s}))}}),(0,_.createElement)(WW,{min:0,max:100,label:"Lightness",abbreviation:"L",value:a,onChange:e=>{n(Us({h:o,s:i,l:e,a:s}))}}),r&&(0,_.createElement)(WW,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*s),onChange:e=>{n(Us({h:o,s:i,l:a,a:e/100}))}}))},$W=e=>{let{color:t,onChange:n,enableAlpha:r}=e;return(0,_.createElement)(mW,{prefix:(0,_.createElement)(RV,{as:ck,marginLeft:dy(3.5),color:"blue",lineHeight:1},"#"),value:t.toHex().slice(1).toUpperCase(),onChange:e=>{n(Us("#"+e))},onValidate:e=>{if(!Us("#"+e).isValid())throw new Error("Invalid hex color input")},maxLength:r?8:6,label:U("Hex color"),hideLabelFromVision:!0})},GW=e=>{let{colorType:t,color:n,onChange:r,enableAlpha:o}=e;const i={color:n,onChange:r,enableAlpha:o};switch(t){case"hsl":return(0,_.createElement)(UW,i);case"rgb":return(0,_.createElement)(ZW,i);default:case"hex":return(0,_.createElement)($W,i)}};function qW(){return(qW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function KW(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function YW(e){var t=(0,_.useRef)(e),n=(0,_.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var XW=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},JW=function(e){return"touches"in e},QW=function(e){return e&&e.ownerDocument.defaultView||self},eZ=function(e,t,n){var r=e.getBoundingClientRect(),o=JW(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:XW((o.pageX-(r.left+QW(e).pageXOffset))/r.width),top:XW((o.pageY-(r.top+QW(e).pageYOffset))/r.height)}},tZ=function(e){!JW(e)&&e.preventDefault()},nZ=E().memo((function(e){var t=e.onMove,n=e.onKey,r=KW(e,["onMove","onKey"]),o=(0,_.useRef)(null),i=YW(t),a=YW(n),s=(0,_.useRef)(null),l=(0,_.useRef)(!1),c=(0,_.useMemo)((function(){var e=function(e){tZ(e),(JW(e)?e.touches.length>0:e.buttons>0)&&o.current?i(eZ(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=QW(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(tZ(t),!function(e,t){return t&&!JW(e)}(t,l.current)&&r)){if(JW(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(eZ(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),u=c[0],d=c[1],p=c[2];return(0,_.useEffect)((function(){return p}),[p]),E().createElement("div",qW({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),rZ=function(e){return e.filter(Boolean).join(" ")},oZ=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=rZ(["react-colorful__pointer",e.className]);return E().createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},E().createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},iZ=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},aZ=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:iZ(e.h),s:iZ(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:iZ(o/2),a:iZ(r,2)}}),sZ=function(e){var t=aZ(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},lZ=function(e){var t=aZ(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},cZ=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),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:iZ(255*[r,s,a,a,l,r][c]),g:iZ(255*[l,r,r,s,a,a][c]),b:iZ(255*[a,a,l,r,r,s][c]),a:iZ(o,2)}},uZ=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?pZ({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)}):{h:0,s:0,v:0,a:1}},dZ=uZ,pZ=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:iZ(60*(s<0?s+6:s)),s:iZ(i?a/i*100:0),v:iZ(i/255*100),a:o}},fZ=E().memo((function(e){var t=e.hue,n=e.onChange,r=rZ(["react-colorful__hue",e.className]);return E().createElement("div",{className:r},E().createElement(nZ,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:XW(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuetext":iZ(t)},E().createElement(oZ,{className:"react-colorful__hue-pointer",left:t/360,color:sZ({h:t,s:100,v:100,a:1})})))})),mZ=E().memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:sZ({h:t.h,s:100,v:100,a:1})};return E().createElement("div",{className:"react-colorful__saturation",style:r},E().createElement(nZ,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:XW(t.s+100*e.left,0,100),v:XW(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+iZ(t.s)+"%, Brightness "+iZ(t.v)+"%"},E().createElement(oZ,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:sZ(t)})))})),hZ=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function gZ(e,t,n){var r=YW(n),o=(0,_.useState)((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=(0,_.useRef)({color:t,hsva:i});(0,_.useEffect)((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),(0,_.useEffect)((function(){var t;(function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0})(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,_.useCallback)((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var vZ="undefined"!=typeof window?_.useLayoutEffect:_.useEffect,bZ=new Map,yZ=function(e){vZ((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!bZ.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',bZ.set(t,r);var o=n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},wZ=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=KW(e,["className","colorModel","color","onChange"]),s=(0,_.useRef)(null);yZ(s);var l=gZ(n,o,i),c=l[0],u=l[1],d=rZ(["react-colorful",t]);return E().createElement("div",qW({},a,{ref:s,className:d}),E().createElement(mZ,{hsva:c,onChange:u}),E().createElement(fZ,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},kZ=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+lZ(Object.assign({},n,{a:0}))+", "+lZ(Object.assign({},n,{a:1}))+")"},i=rZ(["react-colorful__alpha",t]);return E().createElement("div",{className:i},E().createElement("div",{className:"react-colorful__alpha-gradient",style:o}),E().createElement(nZ,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:XW(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":iZ(100*n.a)+"%"},E().createElement(oZ,{className:"react-colorful__alpha-pointer",left:n.a,color:lZ(n)})))},xZ=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=KW(e,["className","colorModel","color","onChange"]),s=(0,_.useRef)(null);yZ(s);var l=gZ(n,o,i),c=l[0],u=l[1],d=rZ(["react-colorful",t]);return E().createElement("div",qW({},a,{ref:s,className:d}),E().createElement(mZ,{hsva:c,onChange:u}),E().createElement(fZ,{hue:c.h,onChange:u}),E().createElement(kZ,{hsva:c,onChange:u,className:"react-colorful__last-control"}))},_Z={defaultColor:"rgba(0, 0, 0, 1)",toHsva:uZ,fromHsva:function(e){var t=cZ(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:hZ},EZ=function(e){return E().createElement(xZ,qW({},e,{colorModel:_Z}))},CZ={defaultColor:"rgb(0, 0, 0)",toHsva:dZ,fromHsva:function(e){var t=cZ(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:hZ},SZ=function(e){return E().createElement(wZ,qW({},e,{colorModel:CZ}))};const IZ=e=>{let{color:t,enableAlpha:n,onChange:r}=e;const o=n?EZ:SZ,i=(0,_.useMemo)((()=>t.toRgbString()),[t]);return(0,_.createElement)(o,{color:i,onChange:e=>{r(Us(e))}})};Gs([qs]);const TZ=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}];var NZ=Vi(((e,t)=>{const{enableAlpha:n=!1,color:r,onChange:o,defaultValue:i="#fff",copyFormat:a,...s}=zi(e,"ColorPicker"),[l,c]=function(e){let{defaultValue:t,onChange:n,value:r}=e;const o=void 0!==r,i=o?r:t,[a,s]=(0,_.useState)(i);let l;return l=o&&"function"==typeof n?n:o||"function"!=typeof n?s:e=>{n(e),s(e)},[o?r:a,l]}({onChange:o,value:r,defaultValue:i}),u=(0,_.useMemo)((()=>Us(l)),[l]),d=Vo(c),p=(0,_.useCallback)((e=>{d(e.toHex())}),[d]),[f,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(a||"hex");return(0,_.createElement)(pW,(0,dr.Z)({ref:t},s),(0,_.createElement)(IZ,{onChange:p,color:u,enableAlpha:n}),(0,_.createElement)(dW,null,(0,_.createElement)(J_,{justify:"space-between"},f?(0,_.createElement)(sW,{options:TZ,value:h,onChange:e=>g(e),label:U("Color format"),hideLabelFromVision:!0}):(0,_.createElement)(VW,{color:u,colorType:a||h,enableAlpha:n}),(0,_.createElement)(fW,{isSmall:!0,onClick:()=>m(!f),icon:AV,isPressed:f,label:U(f?"Hide detailed inputs":"Show detailed inputs")})),(0,_.createElement)(RV,{margin:4}),f&&(0,_.createElement)(GW,{colorType:h,color:u,onChange:p,enableAlpha:n})))}),"ColorPicker");function AZ(e){var t;return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof(null===(t=e.color)||void 0===t?void 0:t.hex)}const PZ=T()((e=>{const t=Us(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}})),RZ=e=>(0,_.createElement)(NZ,function(e){const t=(0,_.useCallback)((t=>{var n;return AZ(e)?e.onChangeComplete(PZ(t)):null===(n=e.onChange)||void 0===n?void 0:n.call(e,t)}),[e.onChangeComplete,e.onChange]),n=(0,_.useMemo)((()=>AZ(e)?function(e){if(void 0!==(null==e?void 0:e.color))return"string"==typeof e.color?e.color:e.color.hex?e.color.hex:void 0}(e):e.color),[e.color]),r=(0,_.useMemo)((()=>AZ(e)?!e.disableAlpha:e.enableAlpha),[e.disableAlpha,e.enableAlpha]);return{...AZ(e)?{}:e,onChange:t,color:n,enableAlpha:r}}(e));function LZ(e){let{actions:t,className:n,options:r,children:o}=e;return(0,_.createElement)("div",{className:Lr()("components-circular-option-picker",n)},(0,_.createElement)("div",{className:"components-circular-option-picker__swatches"},r),o,t&&(0,_.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},t))}LZ.Option=function(e){let{className:t,isSelected:n,selectedIconProps:r,tooltipText:o,...i}=e;const a=(0,_.createElement)(ga,(0,dr.Z)({isPressed:n,className:"components-circular-option-picker__option"},i));return(0,_.createElement)("div",{className:Lr()(t,"components-circular-option-picker__option-wrapper")},o?(0,_.createElement)(Yo,{text:o},a):a,n&&(0,_.createElement)(c_,(0,dr.Z)({icon:$_},r||{})))},LZ.ButtonAction=function(e){let{className:t,children:n,...r}=e;return(0,_.createElement)(ga,(0,dr.Z)({className:Lr()("components-circular-option-picker__clear",t),isSmall:!0,variant:"secondary"},r),n)},LZ.DropdownLinkAction=function(e){let{buttonProps:t,className:n,dropdownProps:r,linkText:o}=e;return(0,_.createElement)(Ff,(0,dr.Z)({className:Lr()("components-circular-option-picker__dropdown-link-action",n),renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,_.createElement)(ga,(0,dr.Z)({"aria-expanded":n,"aria-haspopup":"true",onClick:r,variant:"link"},t),o)}},r))};const OZ=da(Q_,{target:"e1uu5br00"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"});function MZ(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;const s=(0,_.useMemo)((()=>(0,Ee.map)(r,(e=>{let{color:t,name:r}=e;const a=Us(t);return(0,_.createElement)(LZ.Option,{key:t,isSelected:i===t,selectedIconProps:i===t?{fill:a.contrast()>a.contrast("#000")?"#fff":"#000"}:{},tooltipText:r||R(U("Color code: %s"),t),style:{backgroundColor:t,color:t},onClick:i===t?n:()=>o(t),"aria-label":r?R(U("Color: %s"),r):R(U("Color code: %s"),t)})}))),[r,i,o,n]);return(0,_.createElement)(LZ,{className:t,options:s,actions:a})}function DZ(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;return(0,_.createElement)(tV,{spacing:3,className:t},r.map(((e,t)=>{let{name:s,colors:l}=e;return(0,_.createElement)(tV,{spacing:2,key:t},(0,_.createElement)(OZ,null,s),(0,_.createElement)(MZ,{clearColor:n,colors:l,onChange:o,value:i,actions:r.length===t+1?a:null}))})))}function BZ(e){let{isRenderedInSidebar:t,...n}=e;return(0,_.createElement)(Ff,(0,dr.Z)({contentClassName:Lr()("components-color-palette__custom-color-dropdown-content",{"is-rendered-in-sidebar":t})},n))}function FZ(e){let{clearable:t=!0,className:n,colors:r,disableCustomColors:o=!1,enableAlpha:i,onChange:a,value:s,__experimentalHasMultipleOrigins:l=!1,__experimentalIsRenderedInSidebar:c=!1}=e;const u=(0,_.useCallback)((()=>a(void 0)),[a]),d=l?DZ:MZ,p=Us(s);return(0,_.createElement)(tV,{spacing:3,className:n},!o&&(0,_.createElement)(BZ,{isRenderedInSidebar:c,renderContent:()=>(0,_.createElement)(RZ,{color:s,onChange:e=>a(e),enableAlpha:i}),renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,_.createElement)("button",{className:"components-color-palette__custom-color","aria-expanded":t,"aria-haspopup":"true",onClick:n,"aria-label":U("Custom color picker"),style:{background:s,color:p.contrast()>p.contrast("#000")?"#fff":"#000"}},s)}}),(0,_.createElement)(d,{clearable:t,clearColor:u,colors:r,onChange:a,value:s,actions:!!t&&(0,_.createElement)(LZ.ButtonAction,{onClick:u},U("Clear"))}))}Gs([qs,Xs]);var jZ=Vi((function(e,t){const n=function(e){return Iy({isBlock:!0,...zi(e,"FlexBlock")})}(e);return(0,_.createElement)(fa,(0,dr.Z)({},n,{ref:t}))}),"FlexBlock");const zZ=da(Sy,{target:"e65ony43"})("margin-bottom:",dy(2),";"),HZ=da("div",{target:"e65ony42"})("border-radius:50%;border:",Gw.borderWidth," solid ",Wy.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;"),VZ=da("div",{target:"e65ony41"})({name:"1bhd2sw",styles:"box-sizing:border-box;position:relative;width:100%;height:100%"}),WZ=da("div",{target:"e65ony40"})("background:",Wy.admin.theme,";border-radius:50%;border:",3,"px solid ",Wy.admin.theme,";bottom:0;box-sizing:border-box;display:block;height:0px;left:0;margin:auto;position:absolute;right:0;top:-",16,"px;width:0px;");var ZZ=function(e){let{value:t,onChange:n,...r}=e;const o=(0,_.useRef)(),i=(0,_.useRef)(),a=(0,_.useRef)(),s=e=>{const{x:t,y:r}=i.current,{ownerDocument:a}=o.current;e.preventDefault(),a.activeElement.blur(),n(function(e,t,n,r){const o=r-t,i=n-e,a=Math.atan2(o,i),s=Math.round(a*(180/Math.PI))+90;return s<0?360+s:s}(t,r,e.clientX,e.clientY))},{startDrag:l,isDragging:c}=function(e){let{onDragStart:t,onDragMove:n,onDragEnd:r}=e;const[o,i]=(0,_.useState)(!1),a=(0,_.useRef)({onDragStart:t,onDragMove:n,onDragEnd:r});(0,PE.Z)((()=>{a.current.onDragStart=t,a.current.onDragMove=n,a.current.onDragEnd=r}),[t,n,r]);const s=(0,_.useCallback)((e=>a.current.onDragMove&&a.current.onDragMove(e)),[]),l=(0,_.useCallback)((e=>{a.current.onDragEnd&&a.current.onDragEnd(e),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",l),i(!1)}),[]),c=(0,_.useCallback)((e=>{a.current.onDragStart&&a.current.onDragStart(e),document.addEventListener("mousemove",s),document.addEventListener("mouseup",l),i(!0)}),[]);return(0,_.useEffect)((()=>()=>{o&&(document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",l))}),[o]),{startDrag:c,endDrag:l,isDragging:o}}({onDragStart:e=>{(()=>{const e=o.current.getBoundingClientRect();i.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),s(e)},onDragMove:s,onDragEnd:s});return(0,_.useEffect)((()=>{c?(void 0===a.current&&(a.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=a.current||null,a.current=void 0)}),[c]),(0,_.createElement)(HZ,(0,dr.Z)({ref:o,onMouseDown:l,className:"components-angle-picker-control__angle-circle",style:c?{cursor:"grabbing"}:void 0},r),(0,_.createElement)(VZ,{style:t?{transform:`rotate(${t}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper"},(0,_.createElement)(WZ,{className:"components-angle-picker-control__angle-circle-indicator"})))};function UZ(e){let{className:t,label:n=U("Angle"),onChange:r,value:o}=e;const i=Lr()("components-angle-picker-control",t);return(0,_.createElement)(zZ,{className:i},(0,_.createElement)(jZ,null,(0,_.createElement)(Vx,{label:n,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{const t=""!==e?parseInt(e,10):0;r(t)},step:"1",value:o,hideHTMLArrows:!0,suffix:(0,_.createElement)(RV,{as:ck,marginRight:dy(3),style:{color:"var( --wp-admin-theme-color )"}},"°")})),(0,_.createElement)(Ty,{style:{marginLeft:dy(4),marginBottom:dy(1),marginTop:"auto"}},(0,_.createElement)(ZZ,{"aria-hidden":"true",value:o,onChange:r})))}function $Z(e){return Math.max(0,Math.min(100,e))}function GZ(e,t,n){const r=e.slice();return r[t]=n,r}function qZ(e,t,n){return function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const o=e[t].position,i=Math.min(o,n),a=Math.max(o,n);return e.some(((e,o)=>{let{position:s}=e;return o!==t&&(Math.abs(s-n)<r||i<s&&s<a)}))}(e,t,n)?e:GZ(e,t,{...e[t],position:n})}function KZ(e,t,n){return GZ(e,t,{...e[t],color:n})}function YZ(e,t,n){if(!t)return;const{x:r,width:o}=t.getBoundingClientRect(),i=e-r-5-n/2,a=o-5-16;return Math.round($Z(100*i/a))}function XZ(e){let{isOpen:t,position:n,color:r,...o}=e;const i=`components-custom-gradient-picker__control-point-button-description-${zo(XZ)}`;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ga,(0,dr.Z)({"aria-label":R(U("Gradient control point at position %1$s%% with color code %2$s."),n,r),"aria-describedby":i,"aria-haspopup":"true","aria-expanded":t,className:Lr()("components-custom-gradient-picker__control-point-button",{"is-active":t}),style:{left:`${n}%`}},o)),(0,_.createElement)(ma,{id:i},U("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")))}function JZ(e){let{isRenderedInSidebar:t,gradientPickerDomRef:n,...r}=e;const o=(0,_.useMemo)((()=>{const e={className:"components-custom-gradient-picker__color-picker-popover",position:"top"};return t&&(e.anchorRef=n.current,e.position=q()?"bottom right":"bottom left",e.__unstableForcePosition=!0),e}),[n.current,t]);return(0,_.createElement)(BZ,(0,dr.Z)({isRenderedInSidebar:t,popoverProps:o},r))}function QZ(e){let{disableRemove:t,disableAlpha:n,gradientPickerDomRef:r,ignoreMarkerPosition:o,value:i,onChange:a,onStartControlPointChange:s,onStopControlPointChange:l,__experimentalIsRenderedInSidebar:c}=e;const u=(0,_.useRef)(),d=e=>{const t=YZ(e.clientX,r.current,16),{initialPosition:n,index:o,significantMoveHappened:s}=u.current;!s&&Math.abs(n-t)>=5&&(u.current.significantMoveHappened=!0),a(qZ(i,o,t))},p=()=>{window&&window.removeEventListener&&u.current&&u.current.listenersActivated&&(window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p),l(),u.current.listenersActivated=!1)};return(0,_.useEffect)((()=>()=>{p()}),[]),i.map(((e,f)=>{const m=null==e?void 0:e.position;return o!==m&&(0,_.createElement)(JZ,{gradientPickerDomRef:r,isRenderedInSidebar:c,key:f,onClose:l,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,_.createElement)(XZ,{key:f,onClick:()=>{u.current&&u.current.significantMoveHappened||(n?l():s(),r())},onMouseDown:()=>{window&&window.addEventListener&&(u.current={initialPosition:m,index:f,significantMoveHappened:!1,listenersActivated:!0},s(),window.addEventListener("mousemove",d),window.addEventListener("mouseup",p))},onKeyDown:t=>{t.keyCode===qr?(t.stopPropagation(),a(qZ(i,f,$Z(e.position-10)))):t.keyCode===Yr&&(t.stopPropagation(),a(qZ(i,f,$Z(e.position+10))))},isOpen:n,position:e.position,color:e.color})},renderContent:r=>{let{onClose:o}=r;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(RZ,{enableAlpha:!n,color:e.color,onChange:e=>{a(KZ(i,f,Us(e).toRgbString()))}}),!t&&i.length>2&&(0,_.createElement)(ga,{className:"components-custom-gradient-picker__remove-control-point",onClick:()=>{a(function(e,t){return e.filter(((e,n)=>n!==t))}(i,f)),o()},variant:"link"},U("Remove Control Point")))}})}))}QZ.InsertPoint=function(e){let{value:t,onChange:n,onOpenInserter:r,onCloseInserter:o,insertPosition:i,disableAlpha:a,__experimentalIsRenderedInSidebar:s,gradientPickerDomRef:l}=e;const[c,u]=(0,_.useState)(!1);return(0,_.createElement)(JZ,{gradientPickerDomRef:l,isRenderedInSidebar:s,className:"components-custom-gradient-picker__inserter",onClose:()=>{o()},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,_.createElement)(ga,{"aria-expanded":t,"aria-haspopup":"true",onClick:()=>{t?o():(u(!1),r()),n()},className:"components-custom-gradient-picker__insert-point",icon:G_,style:{left:null!==i?`${i}%`:void 0}})},renderContent:()=>(0,_.createElement)(RZ,{enableAlpha:!a,onChange:e=>{c?n(function(e,t,n){const r=e.findIndex((e=>e.position===t));return KZ(e,r,n)}(t,i,Us(e).toRgbString())):(n(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(t,i,Us(e).toRgbString())),u(!0))}})})};var eU=QZ;function tU(e,t){switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e}const nU={id:"IDLE"};function rU(e){let{background:t,hasGradient:n,value:r,onChange:o,disableInserter:i=!1,disableAlpha:a=!1,__experimentalIsRenderedInSidebar:s}=e;const l=(0,_.useRef)(),[c,u]=(0,_.useReducer)(tU,nU),d=e=>{const t=YZ(e.clientX,l.current,16);(0,Ee.some)(r,(e=>{let{position:n}=e;return Math.abs(t-n)<10}))?"MOVING_INSERTER"===c.id&&u({type:"STOP_INSERTER_MOVE"}):u({type:"MOVE_INSERTER",insertPosition:t})},p="MOVING_INSERTER"===c.id,f="INSERTING_CONTROL_POINT"===c.id;return(0,_.createElement)("div",{ref:l,className:Lr()("components-custom-gradient-picker__gradient-bar",{"has-gradient":n}),onMouseEnter:d,onMouseMove:d,style:{background:t},onMouseLeave:()=>{u({type:"STOP_INSERTER_MOVE"})}},(0,_.createElement)("div",{className:"components-custom-gradient-picker__markers-container"},!i&&(p||f)&&(0,_.createElement)(eU.InsertPoint,{__experimentalIsRenderedInSidebar:s,gradientPickerDomRef:l,disableAlpha:a,insertPosition:c.insertPosition,value:r,onChange:o,onOpenInserter:()=>{u({type:"OPEN_INSERTER"})},onCloseInserter:()=>{u({type:"CLOSE_INSERTER"})}}),(0,_.createElement)(eU,{__experimentalIsRenderedInSidebar:s,disableAlpha:a,disableRemove:i,gradientPickerDomRef:l,ignoreMarkerPosition:f?c.insertPosition:void 0,value:r,onChange:o,onStartControlPointChange:()=>{u({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{u({type:"STOP_CONTROL_CHANGE"})}})))}var oU=n(49948);const iU="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",aU={type:"angular",value:90},sU=[{value:"linear-gradient",label:U("Linear")},{value:"radial-gradient",label:U("Radial")}],lU={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function cU(e){let{type:t,value:n,length:r}=e;return`${function(e){let{type:t,value:n}=e;return"literal"===t?n:"hex"===t?`#${n}`:`${t}(${n.join(",")})`}({type:t,value:n})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(r)}`}function uU(e){let{type:t,orientation:n,colorStops:r}=e;const o=function(e){if(e&&"angular"===e.type)return`${e.value}deg`}(n),i=r.sort(((e,t)=>(0,Ee.get)(e,["length","value"],0)-(0,Ee.get)(t,["length","value"],0))).map(cU);return`${t}(${(0,Ee.compact)([o,...i]).join(",")})`}function dU(e){return void 0===e.length||"%"!==e.length.type}function pU(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}Gs([qs]);const fU=da(jZ,{target:"e99xvul1"})({name:"1gvx10y",styles:"flex-grow:5"}),mU=da(jZ,{target:"e99xvul0"})({name:"1gvx10y",styles:"flex-grow:5"}),hU=e=>{let{gradientAST:t,hasGradient:n,onChange:r}=e;const o=(0,Ee.get)(t,["orientation","value"],180);return(0,_.createElement)(UZ,{onChange:e=>{r(uU({...t,orientation:{type:"angular",value:e}}))},labelPosition:"top",value:n?o:""})},gU=e=>{let{gradientAST:t,hasGradient:n,onChange:r}=e;const{type:o}=t;return(0,_.createElement)(cR,{className:"components-custom-gradient-picker__type-picker",label:U("Type"),labelPosition:"top",onChange:e=>{"linear-gradient"===e&&r(uU({...t,...t.orientation?{}:{orientation:aU},type:"linear-gradient"})),"radial-gradient"===e&&r(uU({...(0,Ee.omit)(t,["orientation"]),type:"radial-gradient"}))},options:sU,value:n&&o})};function vU(e){let{value:t,onChange:n,__experimentalIsRenderedInSidebar:r}=e;const o=function(e){var t;let n;try{n=oU.parse(e)[0],n.value=e}catch(e){n=oU.parse(iU)[0],n.value=iU}if("directional"===(null===(t=n.orientation)||void 0===t?void 0:t.type)&&(n.orientation.type="angular",n.orientation.value=lU[n.orientation.value].toString()),n.colorStops.some(dU)){const{colorStops:e}=n,t=100/(e.length-1);e.forEach(((e,n)=>{e.length={value:t*n,type:"%"}})),n.value=uU(n)}return n}(t),i=function(e){return uU({type:"linear-gradient",orientation:aU,colorStops:e.colorStops})}(o),a=o.value!==iU,s=o.colorStops.map((e=>({color:pU(e),position:parseInt(e.length.value)})));return(0,_.createElement)("div",{className:"components-custom-gradient-picker"},(0,_.createElement)(rU,{__experimentalIsRenderedInSidebar:r,background:i,hasGradient:a,value:s,onChange:e=>{n(uU(function(e,t){return{...e,colorStops:t.map((e=>{let{position:t,color:n}=e;const{r:r,g:o,b:i,a:a}=Us(n).toRgb();return{length:{type:"%",value:t.toString()},type:a<1?"rgba":"rgb",value:a<1?[r,o,i,a]:[r,o,i]}}))}}(o,e)))}}),(0,_.createElement)(Sy,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,_.createElement)(fU,null,(0,_.createElement)(gU,{gradientAST:o,hasGradient:a,onChange:n})),(0,_.createElement)(mU,null,"linear-gradient"===o.type&&(0,_.createElement)(hU,{gradientAST:o,hasGradient:a,onChange:n}))))}function bU(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:a,content:s}=e;const l=(0,_.useMemo)((()=>(0,Ee.map)(r,(e=>{let{gradient:t,name:r}=e;return(0,_.createElement)(LZ.Option,{key:t,value:t,isSelected:i===t,tooltipText:r||R(U("Gradient code: %s"),t),style:{color:"rgba( 0,0,0,0 )",background:t},onClick:i===t?n:()=>o(t),"aria-label":r?R(U("Gradient: %s"),r):R(U("Gradient code: %s"),t)})}))),[r,i,o,n]);return(0,_.createElement)(LZ,{className:t,options:l,actions:a},s)}function yU(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:a,content:s}=e;return(0,_.createElement)(tV,{spacing:3,className:t},r.map(((e,t)=>{let{name:l,gradients:c}=e;return(0,_.createElement)(tV,{spacing:2,key:t},(0,_.createElement)(OZ,null,l),(0,_.createElement)(bU,(0,dr.Z)({clearGradient:n,gradients:c,onChange:o,value:i},r.length===t+1?{actions:a,content:s}:{})))})))}function wU(e){let{className:t,gradients:n,onChange:r,value:o,clearable:i=!0,disableCustomGradients:a=!1,__experimentalHasMultipleOrigins:s,__experimentalIsRenderedInSidebar:l}=e;const c=(0,_.useCallback)((()=>r(void 0)),[r]),u=s&&null!=n&&n.length?yU:bU;return(0,_.createElement)(u,{className:t,clearable:i,clearGradient:c,gradients:n,onChange:r,value:o,actions:i&&((null==n?void 0:n.length)||!a)&&(0,_.createElement)(LZ.ButtonAction,{onClick:c},U("Clear")),content:!a&&(0,_.createElement)(vU,{__experimentalIsRenderedInSidebar:l,value:o,onChange:r})})}const kU=["colors","disableCustomColors","gradients","disableCustomGradients"];function xU(e){let{colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:a,className:s,label:l,onColorChange:c,onGradientChange:u,colorValue:d,gradientValue:p,clearable:f,showTitle:m=!0,enableAlpha:h}=e;const g=c&&(!(0,Ee.isEmpty)(t)||!r),v=u&&(!(0,Ee.isEmpty)(n)||!o),[b,y]=(0,_.useState)(p?"gradient":!!g&&"color");return g||v?(0,_.createElement)(Ky,{className:Lr()("block-editor-color-gradient-control",s)},(0,_.createElement)("fieldset",null,(0,_.createElement)(tV,{spacing:1},m&&(0,_.createElement)("legend",null,(0,_.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,_.createElement)(Ky.VisualLabel,null,l))),g&&v&&(0,_.createElement)(fV,{value:b,onChange:y,label:U("Select color type"),hideLabelFromVision:!0,isBlock:!0},(0,_.createElement)(NV,{value:"color",label:U("Solid")}),(0,_.createElement)(NV,{value:"gradient",label:U("Gradient")})),("color"===b||!v)&&(0,_.createElement)(FZ,{value:d,onChange:v?e=>{c(e),u()}:c,colors:t,disableCustomColors:r,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:a,clearable:f,enableAlpha:h}),("gradient"===b||!g)&&(0,_.createElement)(wU,{value:p,onChange:g?e=>{u(e),c()}:u,gradients:n,disableCustomGradients:o,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:a,clearable:f})))):null}function _U(e){const t={};return t.colors=tw("color.palette"),t.gradients=tw("color.gradients"),t.disableCustomColors=!tw("color.custom"),t.disableCustomGradients=!tw("color.customGradient"),(0,_.createElement)(xU,(0,dr.Z)({},t,e))}var EU=function(e){return(0,Ee.every)(kU,(t=>e.hasOwnProperty(t)))?(0,_.createElement)(xU,e):(0,_.createElement)(_U,e)};function CU(){return{disableCustomColors:!tw("color.custom"),disableCustomGradients:!tw("color.customGradient")}}function SU(){const e=CU(),t=tw("color.palette.custom"),n=tw("color.palette.theme"),r=tw("color.palette.default"),o=tw("color.defaultPalette");e.colors=(0,_.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:$("Theme","Indicates this palette comes from the theme."),colors:n}),o&&r&&r.length&&e.push({name:$("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&e.push({name:$("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[r,n,t]);const i=tw("color.gradients.custom"),a=tw("color.gradients.theme"),s=tw("color.gradients.default"),l=tw("color.defaultGradients");return e.gradients=(0,_.useMemo)((()=>{const e=[];return a&&a.length&&e.push({name:$("Theme","Indicates this palette comes from the theme."),gradients:a}),l&&s&&s.length&&e.push({name:$("Default","Indicates this palette comes from WordPress."),gradients:s}),i&&i.length&&e.push({name:$("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,a,s]),e}Gs([qs,Xs]);const IU=(e,t,n)=>{if(t){const n=(0,Ee.find)(e,{slug:t});if(n)return n}return{color:n}},TU=(e,t)=>(0,Ee.find)(e,{color:t});function NU(e,t){if(e&&t)return`has-${(0,Ee.kebabCase)(t)}-${e}`}const AU=[];function PU(e){const{attributes:{borderColor:t,style:n},setAttributes:r}=e,o=SU(),i=o.colors.reduce(((e,t)=>e.concat(t.colors)),[]),[a,s]=(0,_.useState)((()=>{var e,r;return null===(e=IU(i,t,null==n||null===(r=n.border)||void 0===r?void 0:r.color))||void 0===e?void 0:e.color}));return(0,_.createElement)(EU,(0,dr.Z)({label:U("Color"),colorValue:a,onColorChange:e=>{s(e);const t=TU(i,e),o={...n,border:{...null==n?void 0:n.border,color:null!=t&&t.slug?void 0:e}},a=null!=t&&t.slug?t.slug:void 0;r({style:gE(o),borderColor:a})},clearable:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},o))}function RU(e,t,n){var r;if(!r$(t,"color")||o$(t))return e;const{borderColor:o,style:i}=n,a=NU("border-color",o),s=Lr()(e.className,{"has-border-color":o||(null==i||null===(r=i.border)||void 0===r?void 0:r.color),[a]:!!a});return e.className=s||void 0,e}const LU=ip((e=>t=>{var n,r;const{name:o,attributes:i}=t,{borderColor:a}=i,s=tw("color.palette")||AU;if(!r$(o,"color")||o$(o))return(0,_.createElement)(e,t);const l={borderColor:a?null===(n=IU(s,a))||void 0===n?void 0:n.color:void 0};let c=t.wrapperProps;return c={...t.wrapperProps,style:{...l,...null===(r=t.wrapperProps)||void 0===r?void 0:r.style}},(0,_.createElement)(e,(0,dr.Z)({},t,{wrapperProps:c}))}));function OU(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function MU(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>yw(e))),n=t.map((e=>e[0])),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",i=OU(r),a=0===o||o?`${o}${i}`:null;return a}function DU(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=MU(e),n=isNaN(parseFloat(t));return n}function BU(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function FU(e){let{onChange:t,values:n,...r}=e;const o=MU(n),i=BU(n)&&DU(n),a=i?U("Mixed"):null;return(0,_.createElement)(l_,(0,dr.Z)({},r,{"aria-label":U("Border radius"),disableUnits:i,isOnly:!0,value:o,onChange:t,placeholder:a}))}(0,V.KJ)("blocks.registerBlockType","core/border/addAttributes",(function(e){return r$(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,V.KJ)("blocks.getSaveContent.extraProps","core/border/addSaveProps",RU),(0,V.KJ)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!r$(e,"color")||o$(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),RU(r,e,n)},e})),(0,V.KJ)("editor.BlockListBlock","core/border/with-border-color-palette-styles",LU);const jU={topLeft:U("Top left"),topRight:U("Top right"),bottomLeft:U("Bottom left"),bottomRight:U("Bottom right")};function zU(e){let{onChange:t,values:n,...r}=e;const o="string"!=typeof n?n:{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n};return(0,_.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(jU).map((e=>{let[n,i]=e;return(0,_.createElement)(l_,(0,dr.Z)({},r,{key:n,"aria-label":i,value:o[n],onChange:(a=n,e=>{t&&t({...o,[a]:e||void 0})})}));var a})))}var HU=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),VU=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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 WU(e){let{isLinked:t,...n}=e;const r=U(t?"Unlink Radii":"Link Radii");return(0,_.createElement)(Yo,{text:r},(0,_.createElement)(ga,(0,dr.Z)({},n,{className:"component-border-radius-control__linked-button",isPrimary:t,isSecondary:!t,isSmall:!0,icon:t?HU:VU,iconSize:16,"aria-label":r})))}const ZU={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},UU={px:100,em:20,rem:20};function $U(e){let{onChange:t,values:n}=e;const[r,o]=(0,_.useState)(!BU(n)||!DU(n)),i=kw({availableUnits:tw("spacing.units")||["px","em","rem"]}),a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e){const[,t]=yw(e);return t||"px"}return OU(Object.values(e).map((e=>{const[,t]=yw(e);return t})))||"px"}(n),s=i&&i.find((e=>e.value===a)),l=(null==s?void 0:s.step)||1,[c]=yw(MU(n));return(0,_.createElement)("fieldset",{className:"components-border-radius-control"},(0,_.createElement)("legend",null,U("Radius")),(0,_.createElement)("div",{className:"components-border-radius-control__wrapper"},r?(0,_.createElement)(_.Fragment,null,(0,_.createElement)(FU,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,unit:a,units:i}),(0,_.createElement)(iW,{className:"components-border-radius-control__range-control",value:c,min:0,max:UU[a],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${a}`:void 0)},step:l})):(0,_.createElement)(zU,{min:0,onChange:t,values:n||ZU,units:i}),(0,_.createElement)(WU,{onClick:()=>o(!r),isLinked:r})))}function GU(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,_.createElement)($U,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0!==e&&""!==e||(t=gE(t)),r({style:t})}})}var qU=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,_.createElement)(Po,{d:"M5 11.25h14v1.5H5z"})),KU=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,_.createElement)(Po,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),YU=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,_.createElement)(Po,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const XU=[{label:U("Solid"),icon:qU,value:"solid"},{label:U("Dashed"),icon:KU,value:"dashed"},{label:U("Dotted"),icon:YU,value:"dotted"}];function JU(e){let{onChange:t,value:n}=e;return(0,_.createElement)("fieldset",{className:"components-border-style-control"},(0,_.createElement)("legend",null,U("Style")),(0,_.createElement)("div",{className:"components-border-style-control__buttons"},XU.map((e=>(0,_.createElement)(ga,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===n,onClick:()=>t(e.value===n?void 0:e.value),"aria-label":e.label})))))}const QU=e=>{var t;const{attributes:{style:n},setAttributes:r}=e;return(0,_.createElement)(JU,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.style,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,style:e}};r({style:gE(t)})}})},e$=e=>{const{attributes:{borderColor:t,style:n},setAttributes:r}=e,{width:o,color:i,style:a}=(null==n?void 0:n.border)||{},[s,l]=(0,_.useState)(),[c,u]=(0,_.useState)();(0,_.useEffect)((()=>{"none"!==a&&l(a)}),[a]),(0,_.useEffect)((()=>{(t||i)&&u({name:t||void 0,color:i||void 0})}),[t,i]);const d=kw({availableUnits:tw("spacing.units")||["px","em","rem"]});return(0,_.createElement)(l_,{value:o,label:U("Width"),min:0,onChange:e=>{let o={...n,border:{...null==n?void 0:n.border,width:e}},i=t;const l=0===parseFloat(e);l&&(i=void 0,o.border.color=void 0,o.border.style="none"),l||"none"!==a||(o.border.style=s),l||void 0!==t||(i=null==c?void 0:c.name,o.border.color=null==c?void 0:c.color),void 0!==e&&""!==e||(o=gE(o)),r({borderColor:i,style:o})},units:d})},t$="__experimentalBorder";function n$(e){const t=i$(e),n=r$(e.name),r=tw("border.color")&&r$(e.name,"color"),o=tw("border.radius")&&r$(e.name,"radius"),i=tw("border.style")&&r$(e.name,"style"),a=tw("border.width")&&r$(e.name,"width");return t||!n?null:(0,_.createElement)(_E,null,(0,_.createElement)(F_,{className:"block-editor-hooks__border-controls",title:U("Border"),initialOpen:!1},(a||i)&&(0,_.createElement)("div",{className:"block-editor-hooks__border-controls-row"},a&&(0,_.createElement)(e$,e),i&&(0,_.createElement)(QU,e)),r&&(0,_.createElement)(PU,e),o&&(0,_.createElement)(GU,e)))}function r$(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==um.OS)return!1;const n=gl(e,t$);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 o$(e){const t=gl(e,t$);return null==t?void 0:t.__experimentalSkipSerialization}const i$=()=>[!tw("border.color"),!tw("border.radius"),!tw("border.style"),!tw("border.width")].every(Boolean);function a$(e,t){return(0,Ee.find)(e,["gradient",t])}var s$=e=>{let{className:t,colorValue:n,...r}=e;return(0,_.createElement)("span",(0,dr.Z)({className:Lr()("component-color-indicator",t),style:{background:n}},r))};const l$=U("(%s: color %s)"),c$=U("(%s: gradient %s)"),u$=["colors","disableCustomColors","gradients","disableCustomGradients"],d$=e=>{let{colors:t,gradients:n,settings:r}=e;return r.map(((e,r)=>{let o,{colorValue:i,gradientValue:a,label:s,colors:l,gradients:c}=e;if(!i&&!a)return null;if(i){const e=TU(l||t,i);o=R(l$,s.toLowerCase(),e&&e.name||i)}else{const e=a$(c||n,i);o=R(c$,s.toLowerCase(),e&&e.name||a)}return(0,_.createElement)(s$,{key:r,colorValue:i||a,"aria-label":o})}))},p$=e=>{let{className:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,children:a,settings:s,title:l,showTitle:c=!0,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:d,enableAlpha:p,...f}=e;if((0,Ee.isEmpty)(n)&&(0,Ee.isEmpty)(r)&&o&&i&&(0,Ee.every)(s,(e=>(0,Ee.isEmpty)(e.colors)&&(0,Ee.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients))))return null;const m=(0,_.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},l,(0,_.createElement)(d$,{colors:n,gradients:r,settings:s}));return(0,_.createElement)(F_,(0,dr.Z)({className:Lr()("block-editor-panel-color-gradient-settings",t),title:c?m:void 0},f),s.map(((e,t)=>(0,_.createElement)(EU,(0,dr.Z)({showTitle:c,key:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalHasMultipleOrigins:u,__experimentalIsRenderedInSidebar:d,enableAlpha:p},e)))),a)},f$=e=>{const t=CU();return t.colors=tw("color.palette"),t.gradients=tw("color.gradients"),(0,_.createElement)(p$,(0,dr.Z)({},t,e))},m$=e=>{const t=SU();return(0,_.createElement)(p$,(0,dr.Z)({},t,e))};var h$=e=>(0,Ee.every)(u$,(t=>e.hasOwnProperty(t)))?(0,_.createElement)(p$,e):e.__experimentalHasMultipleOrigins?(0,_.createElement)(m$,e):(0,_.createElement)(f$,e);function g$(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}var v$=function(e){let{className:t,status:n="info",children:r,spokenMessage:o=r,onRemove:i=Ee.noop,isDismissible:a=!0,actions:s=[],politeness:l=g$(n),__unstableHTML:c,onDismiss:u=Ee.noop}=e;!function(e,t){const n="string"==typeof e?e:Gc(e);(0,_.useEffect)((()=>{n&&ag(n,t)}),[n,t])}(o,l);const d=Lr()(t,"components-notice","is-"+n,{"is-dismissible":a});return c&&(r=(0,_.createElement)(Sc,null,r)),(0,_.createElement)("div",{className:d},(0,_.createElement)("div",{className:"components-notice__content"},r,(0,_.createElement)("div",{className:"components-notice__actions"},s.map(((e,t)=>{let{className:n,label:r,isPrimary:o,variant:i,noDefaultClasses:a=!1,onClick:s,url:l}=e,c=i;return"primary"===i||a||(c=l?"link":"secondary"),void 0===c&&o&&(c="primary"),(0,_.createElement)(ga,{key:t,href:l,variant:c,onClick:l?void 0:s,className:Lr()("components-notice__action",n)},r)})))),a&&(0,_.createElement)(ga,{className:"components-notice__dismiss",icon:Oo,label:U("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),u(),i()},showTooltip:!1}))};function b$(e){let{colordBackgroundColor:t,colordTextColor:n,backgroundColor:r,textColor:o}=e;const i=t.brightness()<n.brightness()?U("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):U("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return(0,_.useEffect)((()=>{ag(U("This color combination may be hard for people to read."))}),[r,o]),(0,_.createElement)("div",{className:"block-editor-contrast-checker"},(0,_.createElement)(v$,{spokenMessage:null,status:"warning",isDismissible:!1},i))}Gs([qs,Xs]);var y$=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:r,fontSize:o,isLargeText:i,textColor:a}=e;if(!t&&!n||!a&&!r)return null;const s=Us(t||n),l=Us(a||r);return 1!==s.alpha()||1!==l.alpha()||l.isReadable(s,{level:"AA",size:i||!1!==i&&o>=24?"large":"small"})?null:(0,_.createElement)(b$,{backgroundColor:t,textColor:a,colordBackgroundColor:s,colordTextColor:l})};function w$(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function k$(e){let{settings:t,clientId:n,enableContrastChecking:r=!0,showTitle:o=!0}=e;const[i,a]=(0,_.useState)(),[s,l]=(0,_.useState)(),c=gN(n);return(0,_.useEffect)((()=>{if(!r)return;if(!c.current)return;l(w$(c.current).color);let e=c.current,t=w$(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=w$(e).backgroundColor;a(t)})),(0,_.createElement)(_E,null,(0,_.createElement)(h$,{title:U("Color"),initialOpen:!1,settings:t,showTitle:o,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},r&&(0,_.createElement)(y$,{backgroundColor:i,textColor:s})))}const x$="color",_$=e=>{const t=gl(e,x$);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},E$=e=>{const t=gl(e,x$);return null==t?void 0:t.__experimentalSkipSerialization},C$=e=>{const t=gl(e,x$);return(0,Ee.isObject)(t)&&!!t.gradients};function S$(e,t,n){var r,o,i,a,s,l;if(!_$(t)||E$(t))return e;const c=C$(t),{backgroundColor:u,textColor:d,gradient:p,style:f}=n,m=NU("background-color",u),h=function(e){if(e)return`has-${e}-gradient-background`}(p),g=NU("color",d),v=Lr()(e.className,g,h,{[m]:!(c&&null!=f&&null!==(r=f.color)&&void 0!==r&&r.gradient||!m),"has-text-color":d||(null==f||null===(o=f.color)||void 0===o?void 0:o.text),"has-background":u||(null==f||null===(i=f.color)||void 0===i?void 0:i.background)||c&&(p||(null==f||null===(a=f.color)||void 0===a?void 0:a.gradient)),"has-link-color":null==f||null===(s=f.elements)||void 0===s||null===(l=s.link)||void 0===l?void 0:l.color});return e.className=v||void 0,e}const I$=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?IU(e,n[1]).color:t};function T$(e){var t,n,r,o,i,a,s,l,c;const{name:u,attributes:d}=e,p=tw("color.palette.custom"),f=tw("color.palette.theme"),m=tw("color.palette.default"),h=(0,_.useMemo)((()=>[...p||[],...f||[],...m||[]]),[p,f,m]),g=tw("color.gradients.custom"),v=tw("color.gradients.theme"),b=tw("color.gradients.default"),y=(0,_.useMemo)((()=>[...g||[],...v||[],...b||[]]),[g,v,b]),w=tw("color.custom"),k=tw("color.customGradient"),x=tw("color.background"),E=tw("color.link"),C=tw("color.text"),S=w||!f||(null==f?void 0:f.length)>0,I=k||!v||(null==v?void 0:v.length)>0,T=(0,_.useRef)(d);if((0,_.useEffect)((()=>{T.current=d}),[d]),!_$(u))return null;const N=(e=>{if("web"!==um.OS)return!1;const t=gl(e,x$);return(0,Ee.isObject)(t)&&!!t.link})(u)&&E&&S,A=(e=>{const t=gl(e,x$);return t&&!1!==t.text})(u)&&C&&S,P=(e=>{const t=gl(e,x$);return t&&!1!==t.background})(u)&&x&&S,R=C$(u)&&I;if(!(N||A||P||R))return null;const{style:L,textColor:O,backgroundColor:M,gradient:D}=d;let B;if(R&&D)B=function(e,t){const n=(0,Ee.find)(e,["slug",t]);return n&&n.gradient}(y,D);else if(R){var F;B=null==L||null===(F=L.color)||void 0===F?void 0:F.gradient}const j=t=>n=>{var r,o;const i=TU(h,n),a=t+"Color",s={...T.current.style,color:{...null===(r=T.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,[t]:null!=i&&i.slug?void 0:n}},l=null!=i&&i.slug?i.slug:void 0,c={style:gE(s),[a]:l};e.setAttributes(c),T.current={...T.current,...c}};return(0,_.createElement)(k$,{enableContrastChecking:!("web"!==um.OS||D||null!=L&&null!==(t=L.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[...A?[{label:U("Text color"),onColorChange:j("text"),colorValue:IU(h,O,null==L||null===(n=L.color)||void 0===n?void 0:n.text).color}]:[],...P||R?[{label:U("Background color"),onColorChange:P?j("background"):void 0,colorValue:IU(h,M,null==L||null===(r=L.color)||void 0===r?void 0:r.background).color,gradientValue:B,onGradientChange:R?t=>{const n=function(e,t){const n=a$(e,t);return n&&n.slug}(y,t);let r;if(n){var o,i,a;const e={...null===(o=T.current)||void 0===o?void 0:o.style,color:{...null===(i=T.current)||void 0===i||null===(a=i.style)||void 0===a?void 0:a.color,gradient:void 0}};r={style:gE(e),gradient:n}}else{var s,l,c;const e={...null===(s=T.current)||void 0===s?void 0:s.style,color:{...null===(l=T.current)||void 0===l||null===(c=l.style)||void 0===c?void 0:c.color,gradient:t}};r={style:gE(e),gradient:void 0}}e.setAttributes(r),T.current={...T.current,...r}}:void 0}]:[],...N?[{label:U("Link Color"),onColorChange:t=>{const n=TU(h,t),r=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,o=gE(function(e,t,n){return(0,Ee.setWith)(e?(0,Ee.clone)(e):{},["elements","link","color","text"],n,Ee.clone)}(L,0,r));e.setAttributes({style:o})},colorValue:I$(h,null==L||null===(o=L.elements)||void 0===o||null===(i=o.link)||void 0===i||null===(a=i.color)||void 0===a?void 0:a.text),clearable:!(null==L||null===(s=L.elements)||void 0===s||null===(l=s.link)||void 0===l||null===(c=l.color)||void 0===c||!c.text)}]:[]]})}const N$=ip((e=>t=>{var n;const{name:r,attributes:o}=t,{backgroundColor:i,textColor:a}=o,s=tw("color.palette.custom")||[],l=tw("color.palette.theme")||[],c=tw("color.palette.default")||[],u=(0,_.useMemo)((()=>[...s||[],...l||[],...c||[]]),[s,l,c]);if(!_$(r)||E$(r))return(0,_.createElement)(e,t);const d={};var p,f;a&&(d.color=null===(p=IU(u,a))||void 0===p?void 0:p.color),i&&(d.backgroundColor=null===(f=IU(u,i))||void 0===f?void 0:f.color);let m=t.wrapperProps;return m={...t.wrapperProps,style:{...d,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,_.createElement)(e,(0,dr.Z)({},t,{wrapperProps:m}))}));function A$(e){const t=(0,_.useRef)();return(0,_.useEffect)((()=>{t.current=e}),[e]),t.current}(0,V.KJ)("blocks.registerBlockType","core/color/addAttribute",(function(e){return _$(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),C$(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,V.KJ)("blocks.getSaveContent.extraProps","core/color/addSaveProps",S$),(0,V.KJ)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!_$(e)||E$(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),S$(r,e,n)},e})),(0,V.KJ)("editor.BlockListBlock","core/color/with-color-palette-styles",N$);var P$=Vi(((e,t)=>{const{children:n,isShown:r,shouldRenderPlaceholder:o,...i}=function(e){var t,n;const{className:r,hasValue:o,isShownByDefault:i,label:a,panelId:s,resetAllFilter:l,onDeselect:c,onSelect:u,...d}=zi(e,"ToolsPanelItem"),{panelId:p,menuItems:f,registerPanelItem:m,deregisterPanelItem:h,flagItemCustomization:g,isResetting:v,shouldRenderPlaceholderItems:b}=H_(),y=(0,_.useCallback)(o,[s]),w=(0,_.useCallback)(l,[s]),k=A$(p),x=p===s||null===p;(0,_.useEffect)((()=>(x&&null!==k&&m({hasValue:y,isShownByDefault:i,label:a,resetAllFilter:w,panelId:s}),()=>{(null===k&&p||p===s)&&h(a)})),[p,x,i,a,y,s,k,w]);const E=o(),C=A$(E);(0,_.useEffect)((()=>{i&&E&&!C&&g(a)}),[E,C,i,a]);const S=i?"default":"optional",I=null==f||null===(t=f[S])||void 0===t?void 0:t[a],T=A$(I);(0,_.useEffect)((()=>{!v&&x&&(!I||E||T||null==u||u(),!I&&T&&(null==c||c()))}),[x,I,v,E,T]);const N=i?void 0!==(null==f||null===(n=f[S])||void 0===n?void 0:n[a]):I,A=Fi(),P=(0,_.useMemo)((()=>A(iE,b&&!N&&aE,r)),[N,b,r]);return{...d,isShown:N,shouldRenderPlaceholder:b,className:P}}(e);return r?(0,_.createElement)(fa,(0,dr.Z)({},i,{ref:t}),n):o?(0,_.createElement)(fa,(0,dr.Z)({},i,{ref:t})):null}),"ToolsPanelItem"),R$=n(63366),L$=n(45697),O$=n.n(L$);function M$(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function D$(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function B$(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return D$(n.overflowY,t)||D$(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function F$(e,t,n,r,o,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0}n(21726);var j$=0;function z$(){}function H$(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function V$(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function W$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function Z$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function U$(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=function(e,t){return void 0!==e[t]}(t,r)?t[r]:e[r],n}),{})}function $$(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function G$(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var s=q$(e,a,n,r,o);return-1===s?t>=n?-1:t:s}function q$(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var s=t-1;s>=0;s--)if(!r(s).hasAttribute("disabled"))return s;return o?e>0?q$(1,0,n,r,!1):q$(-1,n-1,n,r,!1):-1}function K$(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(H$(t,e,n)||r&&H$(t,n.document.activeElement,n))}))}var Y$=V$((function(e){X$(e).textContent=""}),500);function X$(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var J$={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};var Q$=V$((function(e,t){var n,r,o;n=e(),o=X$(r=t),n&&(o.textContent=n,Y$(r))}),200),eG="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_.useLayoutEffect:_.useEffect;function tG(e){var t=e.id,n=void 0===t?"downshift-"+String(j$++):t,r=e.labelId,o=e.menuId,i=e.getItemId,a=e.toggleButtonId,s=e.inputId;return(0,_.useRef)({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(e){return n+"-item-"+e},toggleButtonId:a||n+"-toggle-button",inputId:s||n+"-input"}).current}function nG(e){return/^\S{1}$/.test(e)}function rG(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function oG(e){var t=(0,_.useRef)(e);return t.current=e,t}function iG(e,t,n){var r=(0,_.useRef)(),o=(0,_.useRef)(),i=(0,_.useCallback)((function(t,n){o.current=n,t=U$(t,n.props);var r=e(t,n);return n.props.stateReducer(t,(0,dr.Z)({},n,{changes:r}))}),[e]),a=(0,_.useReducer)(i,t),s=a[0],l=a[1],c=oG(n),u=(0,_.useCallback)((function(e){return l((0,dr.Z)({props:c.current},e))}),[c]),d=o.current;return(0,_.useEffect)((function(){d&&r.current&&r.current!==s&&function(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach((function(r){!function(e,t,n,r){var o=t.props,i=t.type,a="on"+rG(e)+"Change";o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a]((0,dr.Z)({type:i},r))}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])})),r.onStateChange&&Object.keys(i).length&&r.onStateChange((0,dr.Z)({type:o},i))}(d,U$(r.current,d.props),s),r.current=s}),[s,n,d]),[s,u]}var aG={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:function(e,t){e&&function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!M$(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,u=[],d=e;M$(d)&&l(d);){if((d=d.parentElement)===c){u.push(d);break}null!=d&&d===document.body&&B$(d)&&!B$(document.documentElement)||null!=d&&B$(d,s)&&u.push(d)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,f=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),v=g.height,b=g.width,y=g.top,w=g.right,k=g.bottom,x=g.left,_="start"===o||"nearest"===o?y:"end"===o?k:y+v/2,E="center"===i?x+b/2:"end"===i?w:x,C=[],S=0;S<u.length;S++){var I=u[S],T=I.getBoundingClientRect(),N=T.height,A=T.width,P=T.top,R=T.right,L=T.bottom,O=T.left;if("if-needed"===r&&y>=0&&x>=0&&k<=f&&w<=p&&y>=P&&k<=L&&x>=O&&w<=R)return C;var M=getComputedStyle(I),D=parseInt(M.borderLeftWidth,10),B=parseInt(M.borderTopWidth,10),F=parseInt(M.borderRightWidth,10),j=parseInt(M.borderBottomWidth,10),z=0,H=0,V="offsetWidth"in I?I.offsetWidth-I.clientWidth-D-F:0,W="offsetHeight"in I?I.offsetHeight-I.clientHeight-B-j:0;if(c===I)z="start"===o?_:"end"===o?_-f:"nearest"===o?F$(h,h+f,f,B,j,h+_,h+_+v,v):_-f/2,H="start"===i?E:"center"===i?E-p/2:"end"===i?E-p:F$(m,m+p,p,D,F,m+E,m+E+b,b),z=Math.max(0,z+h),H=Math.max(0,H+m);else{z="start"===o?_-P-B:"end"===o?_-L+j+W:"nearest"===o?F$(P,L,N,B,j+W,_,_+v,v):_-(P+N/2)+W/2,H="start"===i?E-O-D:"center"===i?E-(O+A/2)+V/2:"end"===i?E-R+F+V:F$(O,R,A,D,F+V,E,E+b,b);var Z=I.scrollLeft,U=I.scrollTop;_+=U-(z=Math.max(0,Math.min(U+z,I.scrollHeight-N+W))),E+=Z-(H=Math.max(0,Math.min(Z+H,I.scrollWidth-A+V)))}C.push({el:I,top:z,left:H})}return C}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))},circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function sG(e,t,n){void 0===n&&(n=J$);var r="default"+rG(t);return r in e?e[r]:n[t]}function lG(e,t,n){if(void 0===n&&(n=J$),t in e)return e[t];var r="initial"+rG(t);return r in e?e[r]:sG(e,t,n)}function cG(e,t,n,r){var o=e.items,i=e.initialHighlightedIndex,a=e.defaultHighlightedIndex,s=t.selectedItem,l=t.highlightedIndex;return 0===o.length?-1:void 0!==i&&l===i?i:void 0!==a?a:s?0===n?o.indexOf(s):G$(n,o.indexOf(s),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function uG(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=(0,R$.Z)(n,["isInitialMount","highlightedIndex","items","environment"]);(0,_.useEffect)((function(){r||Q$((function(){return e((0,dr.Z)({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))}),a.document)}),t)}var dG=z$;function pG(e,t,n,r,o){for(var i=e.toLowerCase(),a=0;a<n.length;a++){var s=(a+t+1)%n.length;if(r(n[s]).toLowerCase().startsWith(i)){var l=o(s);if(!l||!l.hasAttribute("disabled"))return s}}return t}O$().array.isRequired,O$().func,O$().func,O$().func,O$().bool,O$().number,O$().number,O$().number,O$().bool,O$().bool,O$().bool,O$().any,O$().any,O$().any,O$().string,O$().string,O$().string,O$().func,O$().string,O$().func,O$().func,O$().func,O$().func,O$().func,O$().shape({addEventListener:O$().func,removeEventListener:O$().func,document:O$().shape({getElementById:O$().func,activeElement:O$().any,body:O$().any})});var fG=(0,dr.Z)({},aG,{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}}),mG=z$,hG=Object.freeze({__proto__:null,MenuKeyDownArrowDown:0,MenuKeyDownArrowUp:1,MenuKeyDownEscape:2,MenuKeyDownHome:3,MenuKeyDownEnd:4,MenuKeyDownEnter:5,MenuKeyDownSpaceButton:6,MenuKeyDownCharacter:7,MenuBlur:8,MenuMouseLeave:9,ItemMouseMove:10,ItemClick:11,ToggleButtonClick:12,ToggleButtonKeyDownArrowDown:13,ToggleButtonKeyDownArrowUp:14,ToggleButtonKeyDownCharacter:15,FunctionToggleMenu:16,FunctionOpenMenu:17,FunctionCloseMenu:18,FunctionSetHighlightedIndex:19,FunctionSelectItem:20,FunctionSetInputValue:21,FunctionReset:22});function gG(e,t){var n,r=t.type,o=t.props,i=t.shiftKey;switch(r){case 11:n={isOpen:sG(o,"isOpen"),highlightedIndex:sG(o,"highlightedIndex"),selectedItem:o.items[t.index]};break;case 15:var a=t.key,s=""+e.inputValue+a,l=pG(s,e.selectedItem?o.items.indexOf(e.selectedItem):-1,o.items,o.itemToString,t.getItemNodeFromIndex);n=(0,dr.Z)({inputValue:s},l>=0&&{selectedItem:o.items[l]});break;case 13:n={highlightedIndex:cG(o,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:n={highlightedIndex:cG(o,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:n=(0,dr.Z)({isOpen:sG(o,"isOpen"),highlightedIndex:sG(o,"highlightedIndex")},e.highlightedIndex>=0&&{selectedItem:o.items[e.highlightedIndex]});break;case 3:n={highlightedIndex:q$(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case 4:n={highlightedIndex:q$(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:n={isOpen:!1,highlightedIndex:-1};break;case 7:var c=t.key,u=""+e.inputValue+c,d=pG(u,e.highlightedIndex,o.items,o.itemToString,t.getItemNodeFromIndex);n=(0,dr.Z)({inputValue:u},d>=0&&{highlightedIndex:d});break;case 0:n={highlightedIndex:G$(i?5:1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,o.circularNavigation)};break;case 1:n={highlightedIndex:G$(i?-5:-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,o.circularNavigation)};break;case 20:n={selectedItem:t.selectedItem};break;default:return function(e,t,n){var r,o=t.type,i=t.props;switch(o){case n.ItemMouseMove:r={highlightedIndex:t.index};break;case n.MenuMouseLeave:r={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:r={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:cG(i,e,0)};break;case n.FunctionOpenMenu:r={isOpen:!0,highlightedIndex:cG(i,e,0)};break;case n.FunctionCloseMenu:r={isOpen:!1};break;case n.FunctionSetHighlightedIndex:r={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:r={inputValue:t.inputValue};break;case n.FunctionReset:r={highlightedIndex:sG(i,"highlightedIndex"),isOpen:sG(i,"isOpen"),selectedItem:sG(i,"selectedItem"),inputValue:sG(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return(0,dr.Z)({},e,r)}(e,t,hG)}return(0,dr.Z)({},e,n)}function vG(e){void 0===e&&(e={}),mG(e,vG);var t=(0,dr.Z)({},fG,e),n=t.items,r=t.scrollIntoView,o=t.environment,i=t.initialIsOpen,a=t.defaultIsOpen,s=t.itemToString,l=t.getA11ySelectionMessage,c=t.getA11yStatusMessage,u=function(e,t,n){var r=iG(e,t,n),o=r[0],i=r[1];return[U$(o,n),i]}(gG,function(e){var t=lG(e,"selectedItem"),n=lG(e,"isOpen"),r=lG(e,"highlightedIndex"),o=lG(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}(t),t),d=u[0],p=u[1],f=d.isOpen,m=d.highlightedIndex,h=d.selectedItem,g=d.inputValue,v=(0,_.useRef)(null),b=(0,_.useRef)(null),y=(0,_.useRef)({}),w=(0,_.useRef)(!0),k=(0,_.useRef)(null),x=tG(t),E=(0,_.useRef)(),C=(0,_.useRef)(!0),S=oG({state:d,props:t}),I=(0,_.useCallback)((function(e){return y.current[x.getItemId(e)]}),[x]);uG(c,[f,m,g,n],(0,dr.Z)({isInitialMount:C.current,previousResultCount:E.current,items:n,environment:o,itemToString:s},d)),uG(l,[h],(0,dr.Z)({isInitialMount:C.current,previousResultCount:E.current,items:n,environment:o,itemToString:s},d));var T=function(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,s=(0,_.useRef)(!0);return eG((function(){t<0||!n||!Object.keys(r.current).length||(!1===s.current?s.current=!0:a(o(t),i))}),[t]),s}({menuElement:b.current,highlightedIndex:m,isOpen:f,itemRefs:y,scrollIntoView:r,getItemNodeFromIndex:I});(0,_.useEffect)((function(){return k.current=V$((function(e){e({type:21,inputValue:""})}),500),function(){k.current.cancel()}}),[]),(0,_.useEffect)((function(){g&&k.current(p)}),[p,g]),dG({isInitialMount:C.current,props:t,state:d}),(0,_.useEffect)((function(){C.current?(i||a||f)&&b.current&&b.current.focus():f?b.current&&b.current.focus():o.document.activeElement===b.current&&v.current&&(w.current=!1,v.current.focus())}),[f]),(0,_.useEffect)((function(){C.current||(E.current=n.length)}));var N=function(e,t,n,r){var o=(0,_.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,_.useEffect)((function(){var i=function(){o.current.isMouseDown=!0},a=function(i){o.current.isMouseDown=!1,e&&!K$(i.target,t.map((function(e){return e.current})),n)&&r()},s=function(){o.current.isTouchMove=!1},l=function(){o.current.isTouchMove=!0},c=function(i){!e||o.current.isTouchMove||K$(i.target,t.map((function(e){return e.current})),n,!1)||r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",l),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",c)}}),[e,n]),o}(f,[b,v],o,(function(){p({type:8})})),A=z$;(0,_.useEffect)((function(){C.current=!1}),[]),(0,_.useEffect)((function(){f||(y.current={})}),[f]);var P=(0,_.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),p({type:13,getItemNodeFromIndex:I,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),p({type:14,getItemNodeFromIndex:I,shiftKey:e.shiftKey})}}}),[p,I]),R=(0,_.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),p({type:0,getItemNodeFromIndex:I,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),p({type:1,getItemNodeFromIndex:I,shiftKey:e.shiftKey})},Home:function(e){e.preventDefault(),p({type:3,getItemNodeFromIndex:I})},End:function(e){e.preventDefault(),p({type:4,getItemNodeFromIndex:I})},Escape:function(){p({type:2})},Enter:function(e){e.preventDefault(),p({type:5})}," ":function(e){e.preventDefault(),p({type:6})}}}),[p,I]),L=(0,_.useCallback)((function(){p({type:16})}),[p]),O=(0,_.useCallback)((function(){p({type:18})}),[p]),M=(0,_.useCallback)((function(){p({type:17})}),[p]),D=(0,_.useCallback)((function(e){p({type:19,highlightedIndex:e})}),[p]),B=(0,_.useCallback)((function(e){p({type:20,selectedItem:e})}),[p]),F=(0,_.useCallback)((function(){p({type:22})}),[p]),j=(0,_.useCallback)((function(e){p({type:21,inputValue:e})}),[p]),z=(0,_.useCallback)((function(e){return(0,dr.Z)({id:x.labelId,htmlFor:x.toggleButtonId},e)}),[x]),H=(0,_.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onMouseLeave,i=r.refKey,a=void 0===i?"ref":i,s=r.onKeyDown,l=r.onBlur,c=r.ref,u=(0,R$.Z)(r,["onMouseLeave","refKey","onKeyDown","onBlur","ref"]),d=(void 0===t?{}:t).suppressRefError,f=void 0!==d&&d,m=S.current.state;return A("getMenuProps",f,a,b),(0,dr.Z)(((n={})[a]=Z$(c,(function(e){b.current=e})),n.id=x.menuId,n.role="listbox",n["aria-labelledby"]=x.labelId,n.tabIndex=-1,n),m.isOpen&&m.highlightedIndex>-1&&{"aria-activedescendant":x.getItemId(m.highlightedIndex)},{onMouseLeave:W$(o,(function(){p({type:9})})),onKeyDown:W$(s,(function(e){var t=$$(e);t&&R[t]?R[t](e):nG(t)&&p({type:7,key:t,getItemNodeFromIndex:I})})),onBlur:W$(l,(function(){!1!==w.current?!N.current.isMouseDown&&p({type:8}):w.current=!0}))},u)}),[p,S,R,N,A,x,I]);return{getToggleButtonProps:(0,_.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onClick,i=r.onKeyDown,a=r.refKey,s=void 0===a?"ref":a,l=r.ref,c=(0,R$.Z)(r,["onClick","onKeyDown","refKey","ref"]),u=(void 0===t?{}:t).suppressRefError,d=void 0!==u&&u,f=(0,dr.Z)(((n={})[s]=Z$(l,(function(e){v.current=e})),n.id=x.toggleButtonId,n["aria-haspopup"]="listbox",n["aria-expanded"]=S.current.state.isOpen,n["aria-labelledby"]=x.labelId+" "+x.toggleButtonId,n),c);return c.disabled||(f.onClick=W$(o,(function(){p({type:12})})),f.onKeyDown=W$(i,(function(e){var t=$$(e);t&&P[t]?P[t](e):nG(t)&&p({type:15,key:t,getItemNodeFromIndex:I})}))),A("getToggleButtonProps",d,s,v),f}),[p,S,P,A,x,I]),getLabelProps:z,getMenuProps:H,getItemProps:(0,_.useCallback)((function(e){var t,n=void 0===e?{}:e,r=n.item,o=n.index,i=n.onMouseMove,a=n.onClick,s=n.refKey,l=void 0===s?"ref":s,c=n.ref,u=(0,R$.Z)(n,["item","index","onMouseMove","onClick","refKey","ref"]),d=S.current,f=d.state,m=d.props,h=function(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}(o,r,m.items);if(h<0)throw new Error("Pass either item or item index in getItemProps!");var g=(0,dr.Z)(((t={role:"option","aria-selected":""+(h===f.highlightedIndex),id:x.getItemId(h)})[l]=Z$(c,(function(e){e&&(y.current[x.getItemId(h)]=e)})),t),u);return u.disabled||(g.onMouseMove=W$(i,(function(){o!==f.highlightedIndex&&(T.current=!1,p({type:10,index:o}))})),g.onClick=W$(a,(function(){p({type:11,index:o})}))),g}),[p,S,T,x]),toggleMenu:L,openMenu:M,closeMenu:O,setHighlightedIndex:D,selectItem:B,reset:F,setInputValue:j,highlightedIndex:m,isOpen:f,selectedItem:h,inputValue:g}}vG.stateChangeTypes=hG,O$().array.isRequired,O$().func,O$().func,O$().func,O$().bool,O$().number,O$().number,O$().number,O$().bool,O$().bool,O$().bool,O$().any,O$().any,O$().any,O$().string,O$().string,O$().string,O$().string,O$().string,O$().string,O$().func,O$().string,O$().string,O$().func,O$().func,O$().func,O$().func,O$().func,O$().func,O$().shape({addEventListener:O$().func,removeEventListener:O$().func,document:O$().shape({getElementById:O$().func,activeElement:O$().any,body:O$().any})}),(0,dr.Z)({},aG,{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""},circularNavigation:!0}),O$().array,O$().array,O$().array,O$().func,O$().func,O$().func,O$().number,O$().number,O$().number,O$().func,O$().func,O$().string,O$().string,O$().shape({addEventListener:O$().func,removeEventListener:O$().func,document:O$().shape({getElementById:O$().func,activeElement:O$().any,body:O$().any})});const bG=e=>null==e?void 0:e.name,yG=(e,t)=>{let{selectedItem:n}=e,{type:r,changes:o,props:{items:i}}=t;switch(r){case vG.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:i[n?Math.min(i.indexOf(n)+1,i.length-1):0]};case vG.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:i[n?Math.max(i.indexOf(n)-1,0):i.length-1]};default:return o}};function wG(e){var t;let{className:n,hideLabelFromVision:r,label:o,describedBy:i,options:a,onChange:s,value:l}=e;const{getLabelProps:c,getToggleButtonProps:u,getMenuProps:d,getItemProps:p,isOpen:f,highlightedIndex:m,selectedItem:h}=vG({initialSelectedItem:a[0],items:a,itemToString:bG,onSelectedItemChange:s,...null!=l?{selectedItem:l}:void 0,stateReducer:yG}),g=d({className:"components-custom-select-control__menu","aria-hidden":!f});return null!==(t=g["aria-activedescendant"])&&void 0!==t&&t.startsWith("downshift-null")&&delete g["aria-activedescendant"],(0,_.createElement)("div",{className:Lr()("components-custom-select-control",n)},r?(0,_.createElement)(ma,(0,dr.Z)({as:"label"},c()),o):(0,_.createElement)("label",c({className:"components-custom-select-control__label"}),o),(0,_.createElement)(ga,u({"aria-label":o,"aria-labelledby":void 0,className:"components-custom-select-control__button",isSmall:!0,describedBy:i||(h?R(U("Currently selected: %s"),h.name):U("No selection"))}),bG(h),(0,_.createElement)(c_,{icon:M_,className:"components-custom-select-control__button-icon"})),(0,_.createElement)("ul",g,f&&a.map(((e,t)=>(0,_.createElement)("li",p({item:e,index:t,key:e.key,className:Lr()(e.className,"components-custom-select-control__item",{"is-highlighted":t===m,"has-hint":!!e.__experimentalHint}),style:e.style}),e.name,e.__experimentalHint&&(0,_.createElement)("span",{className:"components-custom-select-control__item-hint"},e.__experimentalHint),e===h&&(0,_.createElement)(c_,{icon:$_,className:"components-custom-select-control__item-icon"}))))))}const kG=[{name:U("Regular"),value:"normal"},{name:U("Italic"),value:"italic"}],xG=[{name:U("Thin"),value:"100"},{name:U("Extra Light"),value:"200"},{name:U("Light"),value:"300"},{name:U("Regular"),value:"400"},{name:U("Medium"),value:"500"},{name:U("Semi Bold"),value:"600"},{name:U("Bold"),value:"700"},{name:U("Extra Bold"),value:"800"},{name:U("Black"),value:"900"}],_G=(e,t)=>U(e?t?"Appearance":"Font style":"Font weight");function EG(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:i}}=e,a=n||r,s=_G(n,r),l={key:"default",name:U("Default"),style:{fontStyle:void 0,fontWeight:void 0}},c=(0,_.useMemo)((()=>n&&r?(()=>{const e=[l];return kG.forEach((t=>{let{name:n,value:r}=t;xG.forEach((t=>{let{name:o,value:i}=t;const a="normal"===r?o:R(U("%1$s %2$s"),o,n);e.push({key:`${r}-${i}`,name:a,style:{fontStyle:r,fontWeight:i}})}))})),e})():n?(()=>{const e=[l];return kG.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e})():(()=>{const e=[l];return xG.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e})()),[e.options]),u=c.find((e=>e.style.fontStyle===o&&e.style.fontWeight===i))||c[0];return a&&(0,_.createElement)(wG,{className:"components-font-appearance-control",label:s,describedBy:u?R(U(n?r?"Currently selected font appearance: %s":"Currently selected font style: %s":"Currently selected font weight: %s"),u.name):U("No selected font appearance"),options:c,value:u,onChange:e=>{let{selectedItem:n}=e;return t(n.style)}})}function CG(e){let{value:t,onChange:n}=e;const r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return(0,_.createElement)("div",{className:"block-editor-line-height-control"},(0,_.createElement)(N_,{autoComplete:"off",onKeyDown:e=>{const{keyCode:t}=e;48!==t||r||(e.preventDefault(),n("0"))},onChange:e=>{if(r)return void n(e);let t=e;switch(e){case"0.1":t=1.6;break;case"0":t=1.4}n(t)},label:U("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}const SG="typography.lineHeight";function IG(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,_.createElement)(CG,{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:gE(t)})}})}function TG(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!tw("typography.lineHeight");return!vl(e,SG)||t}const NG="typography.__experimentalFontStyle",AG="typography.__experimentalFontWeight";function PG(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,i=!RG(e),a=!LG(e),s=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,l=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return(0,_.createElement)(EG,{onChange:e=>{o({style:gE({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:a,value:{fontStyle:s,fontWeight:l}})}function RG(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=vl(e,NG),n=tw("typography.fontStyle");return!t||!n}function LG(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=vl(e,AG),n=tw("typography.fontWeight");return!t||!n}function OG(e){const t=RG(e),n=LG(e);return t&&n}function MG(e){let{value:t="",onChange:n,fontFamilies:r,...o}=e;const i=tw("typography.fontFamilies");if(r||(r=i),(0,Ee.isEmpty)(r))return null;const a=[{value:"",label:U("Default")},...r.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,_.createElement)(cR,(0,dr.Z)({label:U("Font family"),options:a,value:t,onChange:n,labelPosition:"top"},o))}const DG="typography.__experimentalFontFamily";function BG(e,t,n){if(!vl(t,DG))return e;if(vl(t,"typography.__experimentalSkipSerialization"))return e;if(null==n||!n.fontFamily)return e;const r=new Gz(e.className);r.add(`has-${(0,Ee.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const o=r.value;return e.className=o||void 0,e}function FG(e){var t;let{setAttributes:n,attributes:{fontFamily:r}}=e;const o=tw("typography.fontFamilies"),i=null===(t=(0,Ee.find)(o,(e=>{let{slug:t}=e;return r===t})))||void 0===t?void 0:t.fontFamily;return(0,_.createElement)(MG,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:i,onChange:function(e){const t=(0,Ee.find)(o,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})}})}function jG(e){let{name:t}=e;const n=tw("typography.fontFamilies");return!n||0===n.length||!vl(t,DG)}(0,V.KJ)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return vl(e,DG)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,V.KJ)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",BG),(0,V.KJ)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!vl(e,DG))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),BG(r,e,n)},e}));const zG=(e,t,n)=>{if(t){const n=(0,Ee.find)(e,{slug:t});if(n)return n}return{size:n}};function HG(e){if(e)return`has-${(0,Ee.kebabCase)(e)}-font-size`}const VG={slug:"default",name:U("Default")},WG="custom",ZG={slug:WG,name:U("Custom")},UG=["1","2","3","4","5"];function $G(e){const[t,n]=`${e}`.match(/[\d\.]+|\D+/g);return!isNaN(parseFloat(t))&&isFinite(t)?[t,n]:[]}function GG(e){return/^[\d\.]+(px|em|rem|vw|vh|%)?$/i.test(e)}var qG=(0,_.forwardRef)((function(e,t){var n,r;let{fallbackFontSize:o,fontSizes:i=[],disableCustomFontSizes:a=!1,onChange:s,value:l,withSlider:c=!1,withReset:u=!0}=e;const d=[typeof l,typeof(null==i||null===(n=i[0])||void 0===n?void 0:n.size)].includes("string"),p=d?parseInt(l):l,f="number"==typeof l||(null==l||null===(r=l.endsWith)||void 0===r?void 0:r.call(l,"px")),m=kw({availableUnits:["px","em","rem"]}),h=i.some((e=>{let{size:t}=e;return!GG(t)})),g=i.length>5,v=(0,_.useMemo)((()=>function(e,t,n,r){return n&&!t.length?null:e?function(e,t){return[VG,...e,...t?[]:[ZG]].map((e=>{let{slug:t,name:n,size:r}=e;return{key:t,name:n,size:r,__experimentalHint:r&&GG(r)&&parseFloat(r)}}))}(t,n):function(e,t){return e.map(((e,n)=>{let{slug:r,size:o,name:i}=e,a=t?UG[n]:o;if(!t&&"string"==typeof o){const[e]=$G(o);a=e}return{key:r,value:o,label:a,name:i}}))}(t,r)}(g,i,a,h)),[g,i,a,h]),b=function(e,t){return t?e.find((e=>e.size===t))||ZG:VG}(i,l),y=b.slug===WG,[w,k]=(0,_.useState)(!a&&y),x=(0,_.useMemo)((()=>{if(w)return`(${U("Custom")})`;if(y)return GG(l)&&`(${l})`;if(g)return GG(null==b?void 0:b.size)&&`(${null==b?void 0:b.size})`;let e=b.name;if(!h&&"string"==typeof b.size){const[,t]=$G(b.size);e+=`(${t})`}return e}),[w,null==b?void 0:b.slug,l,y,h]);if(!v)return null;const E=R(U("Currently selected font size: %s"),b.name),C="components-font-size-picker";return(0,_.createElement)("fieldset",(0,dr.Z)({className:C},t?{}:{ref:t}),(0,_.createElement)(ma,{as:"legend"},U("Font size")),(0,_.createElement)(Sy,{justify:"space-between",className:`${C}__header`},(0,_.createElement)(Ty,null,U("Size"),x&&(0,_.createElement)("span",{className:`${C}__header__hint`},x)),!a&&(0,_.createElement)(Ty,null,(0,_.createElement)(ga,{label:U(w?"Use size preset":"Set custom size"),showTooltip:!1,icon:AV,onClick:()=>{k(!w)},isPressed:w,isSmall:!0}))),(0,_.createElement)("div",{className:`${C}__controls`},!!i.length&&g&&!w&&(0,_.createElement)(wG,{className:`${C}__select`,label:U("Font size"),hideLabelFromVision:!0,describedBy:E,options:v,value:v.find((e=>e.key===b.slug)),onChange:e=>{let{selectedItem:t}=e;s(d?t.size:Number(t.size)),t.key===WG&&k(!0)}}),!g&&!w&&(0,_.createElement)(fV,{label:U("Font size"),hideLabelFromVision:!0,value:l,onChange:e=>{s(d?e:Number(e))},isBlock:!0},v.map((e=>(0,_.createElement)(NV,{key:e.key,value:e.value,label:e.label,"aria-label":e.name,showTooltip:!0})))),!c&&!a&&w&&(0,_.createElement)(Sy,{justify:"space-between",className:`${C}__custom-size-control`},(0,_.createElement)(Ty,{isBlock:!0},(0,_.createElement)(l_,{label:U("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:l,onChange:e=>{0!==parseFloat(e)&&e?s(d?e:parseInt(e,10)):s(void 0)},units:!!d&&m})),u&&(0,_.createElement)(Ty,{isBlock:!0},(0,_.createElement)(ga,{className:"components-color-palette__clear",disabled:void 0===l,onClick:()=>{s(void 0)},isSmall:!0,variant:"secondary"},U("Reset"))))),c&&(0,_.createElement)(iW,{className:`${C}__custom-input`,label:U("Custom Size"),value:f&&p||"",initialPosition:o,onChange:e=>{s(d?e+"px":e)},min:12,max:100}))})),KG=function(e){const t=tw("typography.fontSizes"),n=!tw("typography.customFontSize");return(0,_.createElement)(qG,(0,dr.Z)({},e,{fontSizes:t,disableCustomFontSizes:n}))};const YG="typography.fontSize";function XG(e,t,n){if(!vl(t,YG))return e;if(vl(t,"typography.__experimentalSkipSerialization"))return e;const r=new Gz(e.className);r.add(HG(n.fontSize));const o=r.value;return e.className=o||void 0,e}function JG(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:i}=e,a=tw("typography.fontSizes"),s=zG(a,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),l=(null==s?void 0:s.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,_.createElement)(KG,{onChange:e=>{const t=function(e,t){return(0,Ee.find)(e,{size:t})||{size:t}}(a,e).slug;i({style:gE({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:l,withReset:!1})}function QG(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=tw("typography.fontSizes"),n=!(null==t||!t.length);return!vl(e,YG)||!n}const eq=ip((e=>t=>{var n,r;const o=tw("typography.fontSizes"),{name:i,attributes:{fontSize:a,style:s},wrapperProps:l}=t;if(!vl(i,YG)||vl(i,"typography.__experimentalSkipSerialization")||!a||null!=s&&null!==(n=s.typography)&&void 0!==n&&n.fontSize)return(0,_.createElement)(e,t);const c=zG(o,a,null==s||null===(r=s.typography)||void 0===r?void 0:r.fontSize).size,u={...t,wrapperProps:{...l,style:{fontSize:c,...null==l?void 0:l.style}}};return(0,_.createElement)(e,u)}),"withFontSizeInlineStyles");(0,V.KJ)("blocks.registerBlockType","core/font/addAttribute",(function(e){return vl(e,YG)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,V.KJ)("blocks.getSaveContent.extraProps","core/font/addSaveProps",XG),(0,V.KJ)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!vl(e,YG))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),XG(r,e,n)},e})),(0,V.KJ)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",eq);var tq=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),nq=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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 rq=[{name:U("Underline"),value:"underline",icon:tq},{name:U("Strikethrough"),value:"line-through",icon:nq}];function oq(e){let{value:t,onChange:n}=e;return(0,_.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,_.createElement)("legend",null,U("Decoration")),(0,_.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},rq.map((e=>(0,_.createElement)(ga,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:()=>n(e.value===t?void 0:e.value),"aria-label":e.name})))))}const iq="typography.__experimentalTextDecoration";function aq(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,_.createElement)(oq,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:gE({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function sq(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!vl(e,iq),n=tw("typography.textDecoration");return t||!n}var lq=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),cq=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),uq=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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 dq=[{name:U("Uppercase"),value:"uppercase",icon:lq},{name:U("Lowercase"),value:"lowercase",icon:cq},{name:U("Capitalize"),value:"capitalize",icon:uq}];function pq(e){let{value:t,onChange:n}=e;return(0,_.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,_.createElement)("legend",null,U("Letter case")),(0,_.createElement)("div",{className:"block-editor-text-transform-control__buttons"},dq.map((e=>(0,_.createElement)(ga,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:()=>n(t===e.value?void 0:e.value)})))))}const fq="typography.__experimentalTextTransform";function mq(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,_.createElement)(pq,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:gE({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function hq(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!vl(e,fq),n=tw("typography.textTransform");return t||!n}function gq(e){let{value:t,onChange:n,__unstableInputWidth:r="60px"}=e;const o=kw({availableUnits:tw("spacing.units")||["px","em","rem"],defaultValues:{px:"2",em:".2",rem:".2"}});return(0,_.createElement)(l_,{label:U("Letter-spacing"),value:t,__unstableInputWidth:r,units:o,onChange:n})}const vq="typography.__experimentalLetterSpacing";function bq(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,_.createElement)(gq,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:gE({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:!1})}function yq(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!vl(e,vq),n=tw("typography.letterSpacing");return t||!n}const wq="typography",kq=[SG,YG,NG,AG,DG,iq,fq,vq];function xq(e){const{clientId:t}=e,n=jG(e),r=QG(e),o=OG(e),i=TG(e),a=sq(e),s=hq(e),l=yq(e),c=!RG(e),u=!LG(e),d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[OG(e),QG(e),TG(e),jG(e),sq(e),hq(e),yq(e)];return t.filter(Boolean).length===t.length}(e),p=_q(e.name);if(d||!p)return null;const f=gl(e.name,[wq,"__experimentalDefaultControls"]),m=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,_.createElement)(_E,{__experimentalGroup:"typography"},!n&&(0,_.createElement)(P$,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:U("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==f?void 0:f.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,_.createElement)(FG,e)),!r&&(0,_.createElement)(P$,{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:U("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({fontSize:void 0,style:gE({...r,typography:{...null==r?void 0:r.typography,fontSize:void 0}})})}(e),isShownByDefault:null==f?void 0:f.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,_.createElement)(JG,e)),!o&&(0,_.createElement)(P$,{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:_G(c,u),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:gE({...r,typography:{...null==r?void 0:r.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==f?void 0:f.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,_.createElement)(PG,e)),!i&&(0,_.createElement)(P$,{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:U("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:gE({...r,typography:{...null==r?void 0:r.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==f?void 0:f.lineHeight,resetAllFilter:m("lineHeight"),panelId:t},(0,_.createElement)(IG,e)),!a&&(0,_.createElement)(P$,{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:U("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:gE({...r,typography:{...null==r?void 0:r.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==f?void 0:f.textDecoration,resetAllFilter:m("textDecoration"),panelId:t},(0,_.createElement)(aq,e)),!s&&(0,_.createElement)(P$,{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.textTransform)}(e),label:U("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:gE({...r,typography:{...null==r?void 0:r.typography,textTransform:void 0}})})}(e),isShownByDefault:null==f?void 0:f.textTransform,resetAllFilter:m("textTransform"),panelId:t},(0,_.createElement)(mq,e)),!l&&(0,_.createElement)(P$,{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:U("Letter-spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:gE({...r,typography:{...null==r?void 0:r.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==f?void 0:f.letterSpacing,resetAllFilter:m("letterSpacing"),panelId:t},(0,_.createElement)(bq,e)))}const _q=e=>kq.some((t=>vl(e,t)));function Eq(e){const t=gl(e,RK);return!!(!0===t||null!=t&&t.blockGap)}function Cq(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!tw("spacing.blockGap");return!Eq(e)||t}function Sq(e){var t;const{clientId:n,attributes:{style:r},setAttributes:o}=e,i=kw({availableUnits:tw("spacing.units")||["%","px","em","rem","vw"]}),a=gN(n);return Cq(e)?null:um.select({web:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(l_,{label:U("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:e=>{var t;const n={...r,spacing:{...null==r?void 0:r.spacing,blockGap:e}};o({style:gE(n)});const i=(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 s;a.current&&i&&(null===(s=a.current.parentNode)||void 0===s||s.replaceChild(a.current,a.current))},units:i,value:null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap})),native:null})}const Iq=da("div",{target:"e7pk0lh6"})({name:"14bvcyk",styles:"box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%"}),Tq=da(Sy,{target:"e7pk0lh5"})("color:",Wy.ui.label,";padding-bottom:8px;"),Nq=da(Sy,{target:"e7pk0lh4"})({name:"aujtid",styles:"min-height:30px;gap:0"}),Aq=da("div",{target:"e7pk0lh3"})({name:"112jwab",styles:"box-sizing:border-box;max-width:80px"}),Pq=da(Sy,{target:"e7pk0lh2"})({name:"xy18ro",styles:"justify-content:center;padding-top:8px"}),Rq=da(Sy,{target:"e7pk0lh1"})({name:"3tw5wk",styles:"position:relative;height:100%;width:100%;justify-content:flex-start"});var Lq={name:"1ch9yvl",styles:"border-radius:0"},Oq={name:"tg3mx0",styles:"border-radius:2px"};const Mq=e=>{let{isFirst:t,isLast:n,isOnly:r}=e;return t?_y({borderTopRightRadius:0,borderBottomRightRadius:0})():n?_y({borderTopLeftRadius:0,borderBottomLeftRadius:0})():r?Oq:Lq},Dq=e=>{let{isFirst:t,isOnly:n}=e;return _y({marginLeft:t||n?0:-1})()},Bq=da(l_,{target:"e7pk0lh0"})("max-width:60px;",Mq,";",Dq,";");function Fq(e){let{isFirst:t,isLast:n,isOnly:r,onHoverOn:o=Ee.noop,onHoverOff:i=Ee.noop,label:a,value:s,...l}=e;const c=function(e,t){void 0===t&&(t={}),ux.set("hover",Dx);var n=(0,_.useRef)();return n.current||(n.current=Lx(ax,Mx)),Tx({hover:e=>{let{event:t,...n}=e;n.hovering?o(t,n):i(t,n)}},n.current(t))}();return(0,_.createElement)(Aq,c(),(0,_.createElement)(jq,{text:a},(0,_.createElement)(Bq,(0,dr.Z)({"aria-label":a,className:"component-box-control__unit-control",hideHTMLArrows:!0,isFirst:t,isLast:n,isOnly:r,isPressEnterToChange:!0,isResetValueOnUnitChange:!1,value:s},l))))}function jq(e){let{children:t,text:n}=e;return n?(0,_.createElement)(Yo,{text:n,position:"top"},(0,_.createElement)("div",null,t)):t}const zq={all:U("All"),top:U("Top"),bottom:U("Bottom"),left:U("Left"),right:U("Right"),mixed:U("Mixed"),vertical:U("Vertical"),horizontal:U("Horizontal")},Hq={top:null,right:null,bottom:null,left:null},Vq={top:!1,right:!1,bottom:!1,left:!1},Wq=["top","right","bottom","left"];function Zq(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function Uq(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wq;const n=Kq(t),r=n.map((t=>yw(e[t]))),o=r.map((e=>e[0])),i=r.map((e=>e[1])),a=o.every((e=>e===o[0]))?o[0]:"",s=Zq(i),l=(0,Ee.isNumber)(a)?`${a}${s}`:null;return l}function $q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wq;const n=Uq(e,t),r=isNaN(parseFloat(n));return r}function Gq(e){return void 0!==e&&!(0,Ee.isEmpty)(Object.values(e).filter((e=>!!e&&/\d/.test(e))))}function qq(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function Kq(e){const t=[];if(null==e||!e.length)return Wq;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=Wq.filter((t=>e.includes(t)));t.push(...n)}return t}function Yq(e){let{onChange:t=Ee.noop,onFocus:n=Ee.noop,onHoverOn:r=Ee.noop,onHoverOff:o=Ee.noop,values:i,sides:a,selectedUnits:s,setSelectedUnits:l,...c}=e;const u=Uq(i,a),d=Gq(i)&&$q(i,a),p=d?zq.mixed:null,f=u?void 0:function(e){if(e&&"object"==typeof e)return Zq(Object.values(e).filter(Boolean))}(s),m=(e,t)=>{const n={...e};return null!=a&&a.length?a.forEach((e=>{"vertical"===e?(n.top=t,n.bottom=t):"horizontal"===e?(n.left=t,n.right=t):n[e]=t})):Wq.forEach((e=>n[e]=t)),n};return(0,_.createElement)(Fq,(0,dr.Z)({},c,{disableUnits:d,isOnly:!0,value:u,unit:f,onChange:e=>{const n=!isNaN(parseFloat(e)),r=m(i,n?e:void 0);t(r)},onUnitChange:e=>{const t=m(s,e);l(t)},onFocus:e=>{n(e,{side:"all"})},onHoverOn:()=>{r({top:!0,bottom:!0,left:!0,right:!0})},onHoverOff:()=>{o({top:!1,bottom:!1,left:!1,right:!1})},placeholder:p}))}function Xq(e){let{onChange:t=Ee.noop,onFocus:n=Ee.noop,onHoverOn:r=Ee.noop,onHoverOff:o=Ee.noop,values:i,selectedUnits:a,setSelectedUnits:s,sides:l,...c}=e;const u=e=>t=>{n(t,{side:e})},d=e=>()=>{r({[e]:!0})},p=e=>()=>{o({[e]:!1})},f=e=>(n,r)=>{let{event:o}=r;const{altKey:a}=o,s={...i},l=isNaN(parseFloat(n))?void 0:n;if(s[e]=l,a)switch(e){case"top":s.bottom=l;break;case"bottom":s.top=l;break;case"left":s.right=l;break;case"right":s.left=l}(e=>{t(e)})(s)},m=e=>t=>{const n={...a};n[e]=t,s(n)},h=null!=l&&l.length?Wq.filter((e=>l.includes(e))):Wq,g=h[0],v=h[h.length-1],b=g===v&&g;return(0,_.createElement)(Pq,{className:"component-box-control__input-controls-wrapper"},(0,_.createElement)(Rq,{gap:0,align:"top",className:"component-box-control__input-controls"},h.map((e=>(0,_.createElement)(Fq,(0,dr.Z)({},c,{isFirst:g===e,isLast:v===e,isOnly:b===e,value:i[e],unit:i[e]?void 0:a[e],onChange:f(e),onUnitChange:m(e),onFocus:u(e),onHoverOn:d(e),onHoverOff:p(e),label:zq[e],key:`box-control-${e}`}))))))}const Jq=["vertical","horizontal"];function Qq(e){let{onChange:t,onFocus:n,onHoverOn:r,onHoverOff:o,values:i,selectedUnits:a,setSelectedUnits:s,sides:l,...c}=e;const u=e=>t=>{n&&n(t,{side:e})},d=e=>()=>{r&&("vertical"===e&&r({top:!0,bottom:!0}),"horizontal"===e&&r({left:!0,right:!0}))},p=e=>()=>{o&&("vertical"===e&&o({top:!1,bottom:!1}),"horizontal"===e&&o({left:!1,right:!1}))},f=e=>n=>{if(!t)return;const r={...i},o=isNaN(parseFloat(n))?void 0:n;"vertical"===e&&(r.top=o,r.bottom=o),"horizontal"===e&&(r.left=o,r.right=o),t(r)},m=e=>t=>{const n={...a};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),s(n)},h=null!=l&&l.length?Jq.filter((e=>l.includes(e))):Jq,g=h[0],v=h[h.length-1],b=g===v;return(0,_.createElement)(Rq,{gap:0,align:"top",className:"component-box-control__vertical-horizontal-input-controls"},h.map((e=>(0,_.createElement)(Fq,(0,dr.Z)({},c,{isFirst:g===e,isLast:v===e,isOnly:b===e,value:"vertical"===e?i.top:i.left,unit:"vertical"===e?a.top:a.left,onChange:f(e),onUnitChange:m(e),onFocus:u(e),onHoverOn:d(e),onHoverOff:p(e),label:zq[e],key:e})))))}const eK=da("span",{target:"eaw9yqk8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),tK=da("span",{target:"eaw9yqk7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),nK=da("span",{target:"eaw9yqk6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(e=>{let{isFocused:t}=e;return(0,sy.iv)({backgroundColor:"currentColor",opacity:t?1:.3},"","")}),";"),rK=da(nK,{target:"eaw9yqk5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),oK=da(nK,{target:"eaw9yqk4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),iK=da(oK,{target:"eaw9yqk3"})({name:"abcix4",styles:"top:0"}),aK=da(rK,{target:"eaw9yqk2"})({name:"1wf8jf",styles:"right:0"}),sK=da(oK,{target:"eaw9yqk1"})({name:"8tapst",styles:"bottom:0"}),lK=da(rK,{target:"eaw9yqk0"})({name:"1ode3cm",styles:"left:0"});function cK(e){let{size:t=24,side:n="all",sides:r,...o}=e;const i=e=>!(e=>(null==r?void 0:r.length)&&!r.includes(e))(e)&&("all"===n||n===e),a=i("top")||i("vertical"),s=i("right")||i("horizontal"),l=i("bottom")||i("vertical"),c=i("left")||i("horizontal"),u=t/24;return(0,_.createElement)(eK,(0,dr.Z)({style:{transform:`scale(${u})`}},o),(0,_.createElement)(tK,null,(0,_.createElement)(iK,{isFocused:a}),(0,_.createElement)(aK,{isFocused:s}),(0,_.createElement)(sK,{isFocused:l}),(0,_.createElement)(lK,{isFocused:c})))}function uK(e){let{isLinked:t,...n}=e;const r=U(t?"Unlink Sides":"Link Sides");return(0,_.createElement)(Yo,{text:r},(0,_.createElement)("span",null,(0,_.createElement)(ga,(0,dr.Z)({},n,{className:"component-box-control__linked-button",variant:t?"primary":"secondary",isSmall:!0,icon:t?HU:VU,iconSize:16,"aria-label":r}))))}var dK={name:"11f5o9n",styles:"bottom:0;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1"};const pK=da("div",{target:"e1df9b4q5"})("box-sizing:border-box;position:relative;",(e=>{let{isPositionAbsolute:t}=e;return t?dK:""}),";"),fK=da("div",{target:"e1df9b4q4"})("box-sizing:border-box;background:",Wy.blue.wordpress[700],";background:",Wy.ui.theme,";filter:brightness( 1 );opacity:0;position:absolute;pointer-events:none;transition:opacity 120ms linear;z-index:1;",(e=>{let{isActive:t}=e;return t&&"\n\t\topacity: 0.3;\n\t"}),";"),mK=da(fK,{target:"e1df9b4q3"})({name:"5i97ct",styles:"top:0;left:0;right:0"}),hK=da(fK,{target:"e1df9b4q2"})("top:0;bottom:0;",_y({right:0}),";"),gK=da(fK,{target:"e1df9b4q1"})({name:"8cxke2",styles:"bottom:0;left:0;right:0"}),vK=da(fK,{target:"e1df9b4q0"})("top:0;bottom:0;",_y({left:0}),";");function bK(e){let{showValues:t=Vq,values:n}=e;const{top:r,right:o,bottom:i,left:a}=n;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(yK,{isVisible:t.top,value:r}),(0,_.createElement)(wK,{isVisible:t.right,value:o}),(0,_.createElement)(kK,{isVisible:t.bottom,value:i}),(0,_.createElement)(xK,{isVisible:t.left,value:a}))}function yK(e){let{isVisible:t=!1,value:n}=e;const r=n,o=_K(r).isActive||t;return(0,_.createElement)(mK,{isActive:o,style:{height:r}})}function wK(e){let{isVisible:t=!1,value:n}=e;const r=n,o=_K(r).isActive||t;return(0,_.createElement)(hK,{isActive:o,style:{width:r}})}function kK(e){let{isVisible:t=!1,value:n}=e;const r=n,o=_K(r).isActive||t;return(0,_.createElement)(gK,{isActive:o,style:{height:r}})}function xK(e){let{isVisible:t=!1,value:n}=e;const r=n,o=_K(r).isActive||t;return(0,_.createElement)(vK,{isActive:o,style:{width:r}})}function _K(e){const[t,n]=(0,_.useState)(!1),r=(0,_.useRef)(e),o=(0,_.useRef)(),i=()=>{o.current&&window.clearTimeout(o.current)};return(0,_.useEffect)((()=>(e!==r.current&&(n(!0),r.current=e,i(),o.current=setTimeout((()=>{n(!1)}),400)),()=>i())),[e]),{isActive:t}}const EK={min:0};function CK(e){let{id:t,inputProps:n=EK,onChange:r=Ee.noop,onChangeShowVisualizer:o=Ee.noop,label:i=U("Box Control"),values:a,units:s,sides:l,splitOnAxis:c=!1,allowReset:u=!0,resetValues:d=Hq}=e;const[p,f]=s_(a,{fallback:Hq}),m=p||Hq,h=Gq(a),g=1===(null==l?void 0:l.length),[v,b]=(0,_.useState)(h),[y,w]=(0,_.useState)(!h||!$q(m)||g),[k,x]=(0,_.useState)(qq(y,c)),[E,C]=(0,_.useState)({top:yw(null==a?void 0:a.top)[1],right:yw(null==a?void 0:a.right)[1],bottom:yw(null==a?void 0:a.bottom)[1],left:yw(null==a?void 0:a.left)[1]}),S=function(e){const t=zo(CK,"inspector-box-control");return e||t}(t),I=`${S}-heading`,T={...n,onChange:e=>{r(e),f(e),b(!0)},onFocus:(e,t)=>{let{side:n}=t;x(n)},onHoverOn:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o({...Vq,...e})},onHoverOff:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o({...Vq,...e})},isLinked:y,units:s,selectedUnits:E,setSelectedUnits:C,sides:l,values:m};return(0,_.createElement)(Iq,{id:S,role:"region","aria-labelledby":I},(0,_.createElement)(Tq,{className:"component-box-control__header"},(0,_.createElement)(Ty,null,(0,_.createElement)(ck,{id:I,className:"component-box-control__label"},i)),u&&(0,_.createElement)(Ty,null,(0,_.createElement)(ga,{className:"component-box-control__reset-button",isSecondary:!0,isSmall:!0,onClick:()=>{r(d),f(d),C(d),b(!1)},disabled:!v},U("Reset")))),(0,_.createElement)(Nq,{className:"component-box-control__header-control-wrapper"},(0,_.createElement)(Ty,null,(0,_.createElement)(cK,{side:k,sides:l})),y&&(0,_.createElement)(jZ,null,(0,_.createElement)(Yq,(0,dr.Z)({"aria-label":i},T))),!y&&c&&(0,_.createElement)(jZ,null,(0,_.createElement)(Qq,T)),!g&&(0,_.createElement)(Ty,null,(0,_.createElement)(uK,{onClick:()=>{w(!y),x(qq(!y,c))},isLinked:y}))),!y&&!c&&(0,_.createElement)(Xq,T))}function SK(e){const t=gl(e,RK);return!!(!0===t||null!=t&&t.margin)}function IK(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!tw("spacing.margin"),n=!FK(e,"margin");return!SK(e)||t||n}function TK(e){var t;const{name:n,attributes:{style:r},setAttributes:o}=e,i=kw({availableUnits:tw("spacing.units")||["%","px","em","rem","vw"]}),a=BK(n,"margin"),s=a&&a.some((e=>OK.includes(e)));return IK(e)?null:um.select({web:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(CK,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,margin:e}};o({style:gE(t)})},onChangeShowVisualizer:e=>{const t={...r,visualizers:{margin:e}};o({style:gE(t)})},label:U("Margin"),sides:a,units:i,allowReset:!1,splitOnAxis:s})),native:null})}function NK(e){const t=gl(e,RK);return!!(!0===t||null!=t&&t.padding)}function AK(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!tw("spacing.padding"),n=!FK(e,"padding");return!NK(e)||t||n}function PK(e){var t;const{name:n,attributes:{style:r},setAttributes:o}=e,i=kw({availableUnits:tw("spacing.units")||["%","px","em","rem","vw"]}),a=BK(n,"padding"),s=a&&a.some((e=>OK.includes(e)));return AK(e)?null:um.select({web:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(CK,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,padding:e}};o({style:gE(t)})},onChangeShowVisualizer:e=>{const t={...r,visualizers:{padding:e}};o({style:gE(t)})},label:U("Padding"),sides:a,units:i,allowReset:!1,splitOnAxis:s})),native:null})}CK.__Visualizer=function(e){let{children:t,showValues:n=Vq,values:r=Hq,...o}=e;const i=!t;return(0,_.createElement)(pK,(0,dr.Z)({},o,{isPositionAbsolute:i,"aria-hidden":"true"}),(0,_.createElement)(bK,{showValues:n,values:r}),t)};const RK="spacing",LK=["top","right","bottom","left"],OK=["vertical","horizontal"];function MK(e){const t=Cq(e),n=AK(e),r=IK(e),o=DK(e),i=(a=e.name,"web"===um.OS&&(Eq(a)||NK(a)||SK(a)));var a;if(o||!i)return null;const s=gl(e.name,[RK,"__experimentalDefaultControls"]),l=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}};return(0,_.createElement)(_E,{__experimentalGroup:"dimensions"},!n&&(0,_.createElement)(P$,{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:U("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:gE({...r,spacing:{...null==r?void 0:r.spacing,padding:void 0}})})}(e),resetAllFilter:l("padding"),isShownByDefault:null==s?void 0:s.padding,panelId:e.clientId},(0,_.createElement)(PK,e)),!r&&(0,_.createElement)(P$,{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:U("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:gE({...r,spacing:{...null==r?void 0:r.spacing,margin:void 0}})})}(e),resetAllFilter:l("margin"),isShownByDefault:null==s?void 0:s.margin,panelId:e.clientId},(0,_.createElement)(TK,e)),!t&&(0,_.createElement)(P$,{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:U("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:l("blockGap"),isShownByDefault:null==s?void 0:s.blockGap,panelId:e.clientId},(0,_.createElement)(Sq,e)))}const DK=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Cq(e),n=AK(e),r=IK(e);return t&&n&&r};function BK(e,t){const n=gl(e,RK);if(n&&"boolean"!=typeof n[t])return n[t]}function FK(e,t){const n=BK(e,t);return!(n&&n.some((e=>LK.includes(e)))&&n.some((e=>OK.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}const jK=[...kq,t$,x$,RK],zK=e=>jK.some((t=>vl(e,t))),HK="var:";function VK(e){return(0,Ee.startsWith)(e,HK)?`var(--wp--${e.slice(HK.length).split("|").join("--")})`:e}function WK(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["spacing.blockGap"],n={};return Object.keys(rl).forEach((r=>{const o=rl[r].value,i=rl[r].properties;if((0,Ee.has)(e,o)&&"elements"!==(0,Ee.first)(o)){const a=(0,Ee.get)(e,o);i&&!(0,Ee.isString)(a)?Object.entries(i).forEach((e=>{const[t,r]=e,o=(0,Ee.get)(a,[r]);o&&(n[t]=VK(o))})):t.includes(o.join("."))||(n[r]=VK((0,Ee.get)(e,o)))}})),n}const ZK={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[x$],"typography.__experimentalSkipSerialization":[wq],[`${RK}.__experimentalSkipSerialization`]:["spacing"]},UK={...ZK,[`${RK}`]:["spacing.blockGap"]};function $K(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:UK;if(!zK(t))return e;let{style:o}=n;return(0,Ee.forEach)(r,((e,n)=>{gl(t,n)&&(o=(0,Ee.omit)(o,e))})),e.style={...WK(o),...e.style},e}const GK=ip((e=>t=>{const n=zb();return(0,_.createElement)(_.Fragment,null,n&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)(T$,t),(0,_.createElement)(xq,t),(0,_.createElement)(n$,t),(0,_.createElement)(MK,t)),(0,_.createElement)(e,t))}),"withToolbarControls"),qK=ip((e=>t=>{var n,r;const o=null===(n=t.attributes.style)||void 0===n?void 0:n.elements,i=`wp-elements-${zo(e)}`,a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,Ee.map)(t,((t,n)=>{const r=WK(t);return(0,Ee.isEmpty)(r)?"":[`.${e} ${ol[n]}{`,...(0,Ee.map)(r,((e,t)=>`\t${(0,Ee.kebabCase)(t)}: ${e};`)),"}"].join("\n")})).join("\n")}(i,null===(r=t.attributes.style)||void 0===r?void 0:r.elements),s=(0,_.useContext)(JH.__unstableElementContext);return(0,_.createElement)(_.Fragment,null,o&&s&&(0,C.createPortal)((0,_.createElement)("style",{dangerouslySetInnerHTML:{__html:a}}),s),(0,_.createElement)(e,(0,dr.Z)({},t,{className:o?Lr()(t.className,i):t.className})))}));(0,V.KJ)("blocks.registerBlockType","core/style/addAttribute",(function(e){return zK(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,V.KJ)("blocks.getSaveContent.extraProps","core/style/addSaveProps",$K),(0,V.KJ)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!zK(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),$K(r,e,n,ZK)},e})),(0,V.KJ)("editor.BlockEdit","core/style/with-block-controls",GK),(0,V.KJ)("editor.BlockListBlock","core/editor/with-elements-styles",qK);var KK=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"})),YK=function(e){let{fill:t}=e;return t?(0,_.createElement)("span",{className:"components-swatch",style:{background:t}}):(0,_.createElement)(Jo,{icon:KK})};function XK(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"90deg";const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}Gs([qs]);var JK=function(e){let{values:t}=e;return(0,_.createElement)(YK,{fill:t&&XK(t,"135deg")})};function QK(e){let{label:t,value:n,colors:r,disableCustomColors:o,enableAlpha:i,onChange:a}=e;const[s,l]=(0,_.useState)(!1);return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ga,{className:"components-color-list-picker__swatch-button",icon:(0,_.createElement)(YK,{fill:n}),onClick:()=>l((e=>!e))},t),s&&(0,_.createElement)(FZ,{className:"components-color-list-picker__color-picker",colors:r,value:n,clearable:!1,onChange:a,disableCustomColors:o,enableAlpha:i}))}var eY=function(e){let{colors:t,labels:n,value:r=[],disableCustomColors:o,enableAlpha:i,onChange:a}=e;return(0,_.createElement)("div",{className:"components-color-list-picker"},n.map(((e,n)=>(0,_.createElement)(QK,{key:n,label:e,value:r[n],colors:t,disableCustomColors:o,enableAlpha:i,onChange:e=>{const t=r.slice();t[n]=e,a(t)}}))))};const tY=["#333","#CCC"];function nY(e){let{value:t,onChange:n}=e;const r=!!t,o=r?t:tY,i=XK(o),a=(s=o).map(((e,t)=>({position:100*t/(s.length-1),color:e})));var s;return(0,_.createElement)(rU,{disableInserter:!0,background:i,hasGradient:r,value:a,onChange:e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>{let{color:t}=e;return t}))}(e);n(t)}})}var rY=function(e){let{clearable:t=!0,colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:a,onChange:s}=e;const[l,c]=(0,_.useMemo)((()=>{return!(e=n)||e.length<2?["#000","#fff"]:e.map((e=>{let{color:t}=e;return{color:t,brightness:Us(t).brightness()}})).reduce(((e,t)=>{let[n,r]=e;return[t.brightness<=n.brightness?t:n,t.brightness>=r.brightness?t:r]}),[{brightness:1},{brightness:0}]).map((e=>{let{color:t}=e;return t}));var e}),[n]);return(0,_.createElement)(LZ,{options:r.map((e=>{let{colors:t,slug:n,name:r}=e;const o={background:XK(t,"135deg"),color:"transparent"},i=null!=r?r:R(U("Duotone code: %s"),n),l=r?R(U("Duotone: %s"),r):i,c=(0,Ee.isEqual)(t,a);return(0,_.createElement)(LZ.Option,{key:n,value:t,isSelected:c,"aria-label":l,tooltipText:i,style:o,onClick:()=>{s(c?void 0:t)}})})),actions:!!t&&(0,_.createElement)(LZ.ButtonAction,{onClick:()=>s(void 0)},U("Clear"))},!o&&!i&&(0,_.createElement)(nY,{value:a,onChange:s}),!i&&(0,_.createElement)(eY,{labels:[U("Shadows"),U("Highlights")],colors:n,value:a,disableCustomColors:o,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=l),e[1]||(e[1]=c);const t=e.length>=2?e:void 0;s(t)}}))},oY=function(e){let{colorPalette:t,duotonePalette:n,disableCustomColors:r,disableCustomDuotone:o,value:i,onChange:a}=e;return(0,_.createElement)(Ff,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:U("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,_.createElement)(Mf,{showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,onKeyDown:e=>{t||e.keyCode!==Xr||(e.preventDefault(),n())},label:U("Apply duotone filter"),icon:(0,_.createElement)(JK,{values:i})})},renderContent:()=>(0,_.createElement)(Gb,{label:U("Duotone")},(0,_.createElement)("div",{className:"block-editor-duotone-control__description"},U("Create a two-tone color effect without losing your original image.")),(0,_.createElement)(rY,{colorPalette:t,duotonePalette:n,disableCustomColors:r,disableCustomDuotone:o,value:i,onChange:a}))})};const iY=[];function aY(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Us(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 sY(e){let{selector:t,id:n,values:r}=e;const o=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Lo,{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,_.createElement)("defs",null,(0,_.createElement)("filter",{id:n},(0,_.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,_.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,_.createElement)("feFuncR",{type:"table",tableValues:r.r.join(" ")}),(0,_.createElement)("feFuncG",{type:"table",tableValues:r.g.join(" ")}),(0,_.createElement)("feFuncB",{type:"table",tableValues:r.b.join(" ")}),(0,_.createElement)("feFuncA",{type:"table",tableValues:r.a.join(" ")})),(0,_.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"})))),(0,_.createElement)("style",{dangerouslySetInnerHTML:{__html:o}}))}function lY(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,a=tw("color.duotone")||iY,s=tw("color.palette")||iY,l=!tw("color.custom"),c=!tw("color.customDuotone")||0===(null==s?void 0:s.length)&&l;return 0===(null==a?void 0:a.length)&&c?null:(0,_.createElement)(Ub,{group:"block",__experimentalShareWithChildBlocks:!0},(0,_.createElement)(oY,{duotonePalette:a,colorPalette:s,disableCustomDuotone:c,disableCustomColors:l,value:i,onChange:e=>{const t={...o,color:{...null==o?void 0:o.color,duotone:e}};r({style:t})}}))}Gs([qs]);const cY=ip((e=>t=>{const n=vl(t.name,"color.__experimentalDuotone");return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(e,t),n&&(0,_.createElement)(lY,t))}),"withDuotoneControls"),uY=ip((e=>t=>{var n,r,o;const i=gl(t.name,"color.__experimentalDuotone"),a=null==t||null===(n=t.attributes)||void 0===n||null===(r=n.style)||void 0===r||null===(o=r.color)||void 0===o?void 0:o.duotone;if(!i||!a)return(0,_.createElement)(e,t);const s=`wp-duotone-${zo(e)}`,l=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 .${s}`,i),c=Lr()(null==t?void 0:t.className,s),u=(0,_.useContext)(JH.__unstableElementContext);return(0,_.createElement)(_.Fragment,null,u&&(0,C.createPortal)((0,_.createElement)(sY,{selector:l,id:s,values:aY(a)}),u),(0,_.createElement)(e,(0,dr.Z)({},t,{className:c})))}),"withDuotoneStyles");(0,V.KJ)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return vl(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,V.KJ)("editor.BlockEdit","core/editor/duotone/with-editor-controls",cY),(0,V.KJ)("editor.BlockListBlock","core/editor/duotone/with-styles",uY);var dY=(0,_.forwardRef)((function(e,t){let{className:n,...r}=e;const o=Lr()("components-button-group",n);return(0,_.createElement)("div",(0,dr.Z)({ref:t,role:"group",className:o},r))}));const pY="__experimentalLayout";function fY(e){let{setAttributes:t,attributes:n,name:r}=e;const{layout:o}=n,i=tw("layout"),a=(0,cr.Z)((e=>{const{getSettings:t}=e(Mb);return t().supportsLayout}),[]),s=gl(r,pY,{}),{allowSwitching:l,allowEditing:c=!0,allowInheriting:u=!0,default:d}=s;if(!c)return null;const p=o||d||{},{inherit:f=!1,type:m="default"}=p;if("default"===m&&!a)return null;const h=d_(m),g=e=>t({layout:e});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(_E,null,(0,_.createElement)(F_,{title:U("Layout")},u&&!!i&&(0,_.createElement)(Yy,{label:U("Inherit default layout"),checked:!!f,onChange:()=>t({layout:{inherit:!f}})}),!f&&l&&(0,_.createElement)(mY,{type:m,onChange:e=>t({layout:{type:e}})}),!f&&h&&(0,_.createElement)(h.inspectorControls,{layout:p,onChange:g,layoutBlockSupport:s}))),!f&&h&&(0,_.createElement)(h.toolBarControls,{layout:p,onChange:g,layoutBlockSupport:s}))}function mY(e){let{type:t,onChange:n}=e;return(0,_.createElement)(dY,null,u_.map((e=>{let{name:r,label:o}=e;return(0,_.createElement)(ga,{key:r,isPressed:t===r,onClick:()=>n(r)},o)})))}const hY=ip((e=>t=>{const{name:n}=t;return[vl(n,pY)&&(0,_.createElement)(fY,(0,dr.Z)({key:"layout"},t)),(0,_.createElement)(e,(0,dr.Z)({key:"edit"},t))]}),"withInspectorControls"),gY=ip((e=>t=>{const{name:n,attributes:r}=t,o=vl(n,pY),i=zo(e),a=tw("layout")||{},s=(0,_.useContext)(JH.__unstableElementContext),{layout:l}=r,{default:c}=gl(n,pY)||{},u=null!=l&&l.inherit?a:l||c||{},d=Lr()(null==t?void 0:t.className,{[`wp-container-${i}`]:o});return(0,_.createElement)(_.Fragment,null,o&&s&&(0,C.createPortal)((0,_.createElement)(g_,{selector:`.wp-container-${i}`,layout:u,style:null==r?void 0:r.style}),s),(0,_.createElement)(e,(0,dr.Z)({},t,{className:d})))}));(0,V.KJ)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,Ee.has)(e.attributes,["layout","type"])||vl(e,pY)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,V.KJ)("editor.BlockListBlock","core/editor/layout/with-layout-styles",gY),(0,V.KJ)("editor.BlockEdit","core/editor/layout/with-inspector-controls",hY);var vY=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"})),bY=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"})),yY=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const wY=[{icon:vY,title:U("Align text left"),align:"left"},{icon:bY,title:U("Align text center"),align:"center"},{icon:yY,title:U("Align text right"),align:"right"}],kY={position:"bottom right",isAlternate:!0};var xY=function(e){let{value:t,onChange:n,alignmentControls:r=wY,label:o=U("Align"),describedBy:i=U("Change text alignment"),isCollapsed:a=!0,isToolbar:s}=e;function l(e){return()=>n(t===e?void 0:e)}const c=(0,Ee.find)(r,(e=>e.align===t)),u=s?Gf:$b,d=s?{isCollapsed:a}:{};return(0,_.createElement)(u,(0,dr.Z)({icon:c?c.icon:q()?yY:vY,label:o,toggleProps:{describedBy:i},popoverProps:kY,controls:r.map((e=>{const{align:n}=e,r=t===n;return{...e,isActive:r,role:a?"menuitemradio":void 0,onClick:l(n)}}))},d))};function _Y(e){return(0,_.createElement)(xY,(0,dr.Z)({},e,{isToolbar:!1}))}var EY=function(e){let{icon:t,children:n,label:r,instructions:o,className:i,notices:a,preview:s,isColumnLayout:l,...c}=e;const[u,{width:d}]=Zr();let p;"number"==typeof d&&(p={"is-large":d>=480,"is-medium":d>=160&&d<480,"is-small":d<160});const f=Lr()("components-placeholder",i,p),m=Lr()("components-placeholder__fieldset",{"is-column-layout":l});return(0,_.createElement)("div",(0,dr.Z)({},c,{className:f}),u,a,s&&(0,_.createElement)("div",{className:"components-placeholder__preview"},s),(0,_.createElement)("div",{className:"components-placeholder__label"},(0,_.createElement)(Jo,{icon:t}),r),!!o&&(0,_.createElement)("div",{className:"components-placeholder__instructions"},o),(0,_.createElement)("div",{className:m},n))},CY=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),SY=function(e){let{icon:t=CY,label:n=U("Choose variation"),instructions:r=U("Select a variation to start with."),variations:o,onSelect:i,allowSkip:a}=e;const s=Lr()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,_.createElement)(EY,{icon:t,label:n,instructions:r,className:s},(0,_.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":U("Block variations")},o.map((e=>(0,_.createElement)("li",{key:e.name},(0,_.createElement)(ga,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>i(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,_.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),a&&(0,_.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,_.createElement)(ga,{variant:"link",onClick:()=>i()},U("Skip"))))};const IY=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),TY=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),NY={top:{icon:(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:$("Align top","Block vertical alignment setting")},center:{icon:TY,title:$("Align middle","Block vertical alignment setting")},bottom:{icon:IY,title:$("Align bottom","Block vertical alignment setting")}},AY=["top","center","bottom"],PY={isAlternate:!0};var RY=function(e){let{value:t,onChange:n,controls:r=AY,isCollapsed:o=!0,isToolbar:i}=e;const a=NY[t],s=NY.top,l=i?Gf:$b,c=i?{isCollapsed:o}:{};return(0,_.createElement)(l,(0,dr.Z)({popoverProps:PY,icon:a?a.icon:s.icon,label:$("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...NY[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},c))};function LY(e){return(0,_.createElement)(RY,(0,dr.Z)({},e,{isToolbar:!0}))}var OY=ip((e=>t=>{const n=tw("color.palette"),r=!tw("color.custom"),o=void 0===t.colors?n:t.colors,i=void 0===t.disableCustomColors?r:t.disableCustomColors,a=!(0,Ee.isEmpty)(o)||!i;return(0,_.createElement)(e,(0,dr.Z)({},t,{colors:o,disableCustomColors:i,hasColorsToChoose:a}))}),"withColorContext")(FZ),MY=function(e,t){return(MY=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])})(e,t)},DY=function(){return(DY=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}).apply(this,arguments)};Object.create,Object.create;var BY=n(52796),FY=n.n(BY);function jY(e,t,n,r,o,i){void 0===i&&(i=0);var a=YY(e,t,i),s=a.width,l=a.height,c=Math.min(s,n),u=Math.min(l,r);return c>u*o?{width:u*o,height:u}:{width:c,height:c/o}}function zY(e,t,n,r,o){void 0===o&&(o=0);var i=YY(t.width,t.height,o),a=i.width,s=i.height;return{x:HY(e.x,a,n.width,r),y:HY(e.y,s,n.height,r)}}function HY(e,t,n,r){var o=t*r/2-n/2;return Math.min(o,Math.max(e,-o))}function VY(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function WY(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function ZY(e,t,n,r,o,i,a){void 0===i&&(i=0),void 0===a&&(a=!0);var s=a&&0===i?UY:$Y,l={x:s(100,((t.width-n.width/o)/2-e.x/o)/t.width*100),y:s(100,((t.height-n.height/o)/2-e.y/o)/t.height*100),width:s(100,n.width/t.width*100/o),height:s(100,n.height/t.height*100/o)},c=Math.round(s(t.naturalWidth,l.width*t.naturalWidth/100)),u=Math.round(s(t.naturalHeight,l.height*t.naturalHeight/100)),d=t.naturalWidth>=t.naturalHeight*r?{width:Math.round(u*r),height:u}:{width:c,height:Math.round(c/r)};return{croppedAreaPercentages:l,croppedAreaPixels:DY(DY({},d),{x:Math.round(s(t.naturalWidth-d.width,l.x*t.naturalWidth/100)),y:Math.round(s(t.naturalHeight-d.height,l.y*t.naturalHeight/100))})}}function UY(e,t){return Math.min(e,Math.max(0,t))}function $Y(e,t){return t}function GY(e,t,n){var r=t.width/t.naturalWidth,o=function(e,t,n){var r=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/r/e.height:n.width/r/e.width;var o=e.width/e.height;return t.naturalWidth>=t.naturalHeight*o?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),i=r*o;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*i,y:((t.naturalHeight-e.height)/2-e.y)*i},zoom:o}}function qY(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function KY(e,t,n,r,o){var i=Math.cos,a=Math.sin,s=o*Math.PI/180;return[(e-n)*i(s)-(t-r)*a(s)+n,(e-n)*a(s)+(t-r)*i(s)+r]}function YY(e,t,n){var r=e/2,o=t/2,i=[KY(0,0,r,o,n),KY(e,0,r,o,n),KY(e,t,r,o,n),KY(0,t,r,o,n)],a=Math.min.apply(Math,i.map((function(e){return e[0]}))),s=Math.max.apply(Math,i.map((function(e){return e[0]}))),l=Math.min.apply(Math,i.map((function(e){return e[1]})));return{width:s-a,height:Math.max.apply(Math,i.map((function(e){return e[1]})))-l}}function XY(){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 JY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,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.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,r=e.cropSize;if(t){var o=GY(t,n.mediaSize,r),i=o.crop,a=o.zoom;n.props.onCropChange(i),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var e,t,r,o,i,a,s=n.imageRef||n.videoRef;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.mediaSize={width:s.offsetWidth,height:s.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(r=n.imageRef)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef)||void 0===o?void 0:o.videoHeight)||0};var l=n.props.cropSize?n.props.cropSize:jY(s.offsetWidth,s.offsetHeight,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===l.height&&(null===(a=n.state.cropSize)||void 0===a?void 0:a.width)===l.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(l),n.setState({cropSize:l},n.recomputeCropPosition)}},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.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.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=DY({},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.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.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},a=n.props.restrictPosition?zY(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(a)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var r=t.getMousePoint(e),o=FY()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r),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=window.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,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var r=n.getPointOnContainer(t),o=n.getPointOnMedia(r),i=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),a={x:o.x*i-r.x,y:o.y*i-r.y},s=n.props.restrictPosition?zY(a,n.mediaSize,n.state.cropSize,i,n.props.rotation):a;n.props.onCropChange(s),n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?ZY(n.props.restrictPosition?zY(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?zY(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}MY(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),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",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){var e;window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,a,s,l,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===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(l=this.props.crop)||void 0===l?void 0:l.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)||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=VY(n,r),this.lastPinchRotation=WY(n,r),this.onDragStart(qY(n,r))},t.prototype.onPinchMove=function(e){var n=this,r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=qY(r,o);this.onDrag(i),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=VY(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i),n.lastPinchDistance=e;var a=WY(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,r=t.video,o=t.mediaProps,i=t.transform,a=t.crop,s=a.x,l=a.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,f=t.style,m=f.containerStyle,h=f.cropAreaStyle,g=f.mediaStyle,v=t.classes,b=v.containerClassName,y=v.cropAreaClassName,w=v.mediaClassName,k=t.objectFit;return E().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:m,className:XY("reactEasyCrop_Container",b)},n?E().createElement("img",DY({alt:"",className:XY("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",w)},o,{src:n,ref:function(t){return e.imageRef=t},style:DY(DY({},g),{transform:i||"translate("+s+"px, "+l+"px) rotate("+c+"deg) scale("+u+")"}),onLoad:this.onMediaLoad})):r&&E().createElement("video",DY({autoPlay:!0,loop:!0,muted:!0,className:XY("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",w)},o,{ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:DY(DY({},g),{transform:i||"translate("+s+"px, "+l+"px) rotate("+c+"deg) scale("+u+")"}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map((function(e){return E().createElement("source",DY({key:e.src},e))}))),this.state.cropSize&&E().createElement("div",{style:DY(DY({},h),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:XY("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",y)}))},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}(E().Component);const QY=sy.F4` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,eX=`calc( ( ${Gw.spinnerSize} - ${Gw.spinnerSize} * ( 2 / 3 ) ) / 2 )`,tX=da("span",{target:"e1s472tg0"})("display:inline-block;background-color:",Wy.gray[600],";width:",Gw.spinnerSize,";height:",Gw.spinnerSize,";opacity:0.7;margin:5px 11px 0;border-radius:100%;position:relative;&::before{content:'';position:absolute;background-color:",Wy.white,";top:",eX,";left:",eX,";width:calc( ",Gw.spinnerSize," / 4.5 );height:calc( ",Gw.spinnerSize," / 4.5 );border-radius:100%;transform-origin:calc( ",Gw.spinnerSize," / 3 ) calc( ",Gw.spinnerSize," / 3 );animation:",QY," 1s infinite linear;}");function nX(){return(0,_.createElement)(tX,{className:"components-spinner"})}const rX={position:"bottom right",isAlternate:!0};const oX=(0,_.createContext)({}),iX=()=>(0,_.useContext)(oX);function aX(e){let{id:t,url:n,naturalWidth:r,naturalHeight:o,isEditing:i,onFinishEditing:a,onSaveImage:s,children:l}=e;const c=function(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:r}=e;const[o,i]=(0,_.useState)(),[a,s]=(0,_.useState)(),[l,c]=(0,_.useState)({x:0,y:0}),[u,d]=(0,_.useState)(),[p,f]=(0,_.useState)(),[m,h]=(0,_.useState)(),[g,v]=(0,_.useState)(),b=(0,_.useCallback)((()=>{c({x:0,y:0}),d(100),f(0),h(n/r),v(n/r)}),[n,r,c,d,f,h,v]),y=(0,_.useCallback)((()=>{const e=(p+90)%360;let o=n/r;if(p%180==90&&(o=r/n),0===e)return i(),f(e),h(1/m),void c({x:-l.y*o,y:l.x*o});const a=new window.Image;a.src=t,a.onload=function(t){const n=document.createElement("canvas");let r=0,a=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||(a=n.height);const s=n.getContext("2d");s.translate(r,a),s.rotate(e*Math.PI/180),s.drawImage(t.target,0,0),n.toBlob((t=>{i(URL.createObjectURL(t)),f(e),h(1/m),c({x:-l.y*o,y:l.x*o})}))};const s=(0,V.O)("media.crossOrigin",void 0,t);"string"==typeof s&&(a.crossOrigin=s)}),[p,n,r,i,f,h,c]);return(0,_.useMemo)((()=>({editedUrl:o,setEditedUrl:i,crop:a,setCrop:s,position:l,setPosition:c,zoom:u,setZoom:d,rotation:p,setRotation:f,rotateClockwise:y,aspect:m,setAspect:h,defaultAspect:g,initializeTransformValues:b})),[o,i,a,s,l,c,u,d,p,f,y,m,h,g,b])}(e),{initializeTransformValues:r}=n;return(0,_.useEffect)((()=>{t&&r()}),[t,r]),n}({url:n,naturalWidth:r,naturalHeight:o},i),u=function(e){let{crop:t,rotation:n,height:r,width:o,aspect:i,url:a,id:s,onSaveImage:l,onFinishEditing:c}=e;const{createErrorNotice:u}=(0,ur.Z)(xR),[d,p]=(0,_.useState)(!1),f=(0,_.useCallback)((()=>{p(!1),c()}),[p,c]),m=(0,_.useCallback)((()=>{p(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=a,ye({path:`/wp/v2/media/${s}/edit`,method:"POST",data:e}).then((e=>{l({id:e.id,url:e.source_url,height:r&&o?o/i:void 0})})).catch((e=>{u(R(U("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{p(!1),c()}))}),[p,t,n,r,o,i,a,l,u,p,c]);return(0,_.useMemo)((()=>({isInProgress:d,apply:m,cancel:f})),[d,m,f])}({id:t,url:n,onSaveImage:s,onFinishEditing:a,...c}),d=(0,_.useMemo)((()=>({...c,...u})),[c,u]);return(0,_.createElement)(oX.Provider,{value:d},l)}function sX(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:a}=e;const{isInProgress:s,editedUrl:l,position:c,zoom:u,aspect:d,setPosition:p,setCrop:f,setZoom:m,rotation:h}=iX();let g=r||o*i/a;return h%180==90&&(g=o*a/i),(0,_.createElement)("div",{className:Lr()("wp-block-image__crop-area",{"is-applying":s}),style:{width:n||o,height:g}},(0,_.createElement)(JY,{image:l||t,disabled:s,minZoom:1,maxZoom:3,crop:c,zoom:u/100,aspect:d,onCropChange:p,onCropComplete:e=>{f(e)},onZoomChange:e=>{m(100*e)}}),s&&(0,_.createElement)(nX,null))}function lX(){const{isInProgress:e,zoom:t,setZoom:n}=iX();return(0,_.createElement)(Ff,{contentClassName:"wp-block-image__zoom",popoverProps:rX,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,_.createElement)(Mf,{icon:TN,label:U("Zoom"),onClick:r,"aria-expanded":n,disabled:e})},renderContent:()=>(0,_.createElement)(iW,{label:U("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var cX=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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 uX(e){let{aspectRatios:t,isDisabled:n,label:r,onClick:o,value:i}=e;return(0,_.createElement)(Gb,{label:r},t.map((e=>{let{title:t,aspect:r}=e;return(0,_.createElement)(qb,{key:r,disabled:n,onClick:()=>{o(r)},role:"menuitemradio",isSelected:r===i,icon:r===i?$_:void 0},t)})))}function dX(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:r,setAspect:o,defaultAspect:i}=iX();return(0,_.createElement)(Uf,{icon:cX,label:U("Aspect Ratio"),popoverProps:rX,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(uX,{isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:U("Original"),aspect:i},{title:U("Square"),aspect:1}]}),(0,_.createElement)(uX,{label:U("Landscape"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:U("16:10"),aspect:1.6},{title:U("16:9"),aspect:16/9},{title:U("4:3"),aspect:4/3},{title:U("3:2"),aspect:1.5}]}),(0,_.createElement)(uX,{label:U("Portrait"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:U("10:16"),aspect:.625},{title:U("9:16"),aspect:9/16},{title:U("3:4"),aspect:3/4},{title:U("2:3"),aspect:2/3}]}))}))}var pX=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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 fX(){const{isInProgress:e,rotateClockwise:t}=iX();return(0,_.createElement)(Mf,{icon:pX,label:U("Rotate"),onClick:t,disabled:e})}function mX(){const{isInProgress:e,apply:t,cancel:n}=iX();return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Mf,{onClick:t,disabled:e},U("Apply")),(0,_.createElement)(Mf,{onClick:n},U("Cancel")))}function hX(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:a}=e;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(sX,{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:a}),(0,_.createElement)(Ub,null,(0,_.createElement)(Gf,null,(0,_.createElement)(lX,null),(0,_.createElement)(Lf,null,(e=>(0,_.createElement)(dX,{toggleProps:e}))),(0,_.createElement)(fX,null)),(0,_.createElement)(Gf,null,(0,_.createElement)(mX,null))))}const gX=[25,50,75,100];function vX(e){let{imageWidth:t,imageHeight:n,imageSizeOptions:r=[],isResizable:o=!0,slug:i,width:a,height:s,onChange:l,onChangeImage:c=Ee.noop}=e;const{currentHeight:u,currentWidth:d,updateDimension:p,updateDimensions:f}=function(e,t,n,r,o){var i,a;const[s,l]=(0,_.useState)(null!==(i=null!=t?t:r)&&void 0!==i?i:""),[c,u]=(0,_.useState)(null!==(a=null!=e?e:n)&&void 0!==a?a:"");return(0,_.useEffect)((()=>{void 0===t&&void 0!==r&&l(r),void 0===e&&void 0!==n&&u(n)}),[r,n]),(0,_.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&l(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(c)&&u(e)}),[t,e]),{currentHeight:c,currentWidth:s,updateDimension:(e,t)=>{"width"===e?l(t):u(t),o({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{u(null!=e?e:n),l(null!=t?t:r),o({height:e,width:t})}}}(s,a,n,t,l);return(0,_.createElement)(_.Fragment,null,!(0,Ee.isEmpty)(r)&&(0,_.createElement)(cR,{label:U("Image size"),value:i,options:r,onChange:c}),o&&(0,_.createElement)("div",{className:"block-editor-image-size-control"},(0,_.createElement)("p",{className:"block-editor-image-size-control__row"},U("Image dimensions")),(0,_.createElement)("div",{className:"block-editor-image-size-control__row"},(0,_.createElement)(N_,{type:"number",className:"block-editor-image-size-control__width",label:U("Width"),value:d,min:1,onChange:e=>p("width",e)}),(0,_.createElement)(N_,{type:"number",className:"block-editor-image-size-control__height",label:U("Height"),value:u,min:1,onChange:e=>p("height",e)})),(0,_.createElement)("div",{className:"block-editor-image-size-control__row"},(0,_.createElement)(dY,{"aria-label":U("Image size presets")},gX.map((e=>{const r=Math.round(t*(e/100)),o=Math.round(n*(e/100)),i=d===r&&u===o;return(0,_.createElement)(ga,{key:e,isSmall:!0,variant:i?"primary":void 0,isPressed:i,onClick:()=>f(o,r)},e,"%")}))),(0,_.createElement)(ga,{isSmall:!0,onClick:()=>f()},U("Reset")))))}var bX=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,_.createElement)(Po,{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"})),yX=e=>{let{value:t,onChange:n=Ee.noop,settings:r}=e;if(!r||!r.length)return null;const o=e=>r=>{n({...t,[e.id]:r})},i=r.map((e=>(0,_.createElement)(Yy,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:o(e),checked:!!t&&!!t[e.id]})));return(0,_.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,_.createElement)(ma,{as:"legend"},U("Currently selected link settings")),i)},wX=ip((e=>t=>(0,_.createElement)(e,(0,dr.Z)({},t,{speak:ag,debouncedSpeak:Vo(ag,500)}))),"withSpokenMessages"),kX=ip((e=>class extends _.Component{constructor(e){super(e),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(e,t){const n=setTimeout((()=>{e(),this.clearTimeout(n)}),t);return this.timeouts.push(n),n}clearTimeout(e){clearTimeout(e),this.timeouts=(0,Ee.without)(this.timeouts,e)}render(){const t={...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout};return(0,_.createElement)(e,t)}}),"withSafeTimeout"),xX=ip((e=>t=>{const n=zo(e);return(0,_.createElement)(e,(0,dr.Z)({},t,{instanceId:n}))}),"withInstanceId");function _X(e){try{return new URL(e),!0}catch{return!1}}class EX extends _.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,_.createRef)(),this.inputRef=(0,_.createRef)(),this.updateSuggestions=(0,Ee.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,dN()(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&&_X(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(R(G("%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(U("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 Kr:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Xr:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case $r:this.props.onSubmit&&this.props.onSubmit(null,e)}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Kr:{e.preventDefault();const t=n?n-1:r.length-1;this.setState({selectedSuggestion:t});break}case Xr:{e.preventDefault();const t=null===n||n===r.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case 9:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(U("Link selected.")));break;case $r: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:a}=t,s=a;const l=n&&n.length;return i||l||(s=!1),!0===o&&(s=!1),{showSuggestions:s,suggestionsListboxId:`block-editor-url-input-suggestions-${r}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${r}`}}render(){return(0,_.createElement)(_.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:r,placeholder:o=U("Paste URL or type to search"),__experimentalRenderControl:i,value:a=""}=this.props,{loading:s,showSuggestions:l,selectedSuggestion:c,suggestionsListboxId:u,suggestionOptionIdPrefix:d}=this.state,p={id:`url-input-control-${r}`,label:e,className:Lr()("block-editor-url-input",t,{"is-full-width":n})},f={value:a,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":U("URL"),"aria-expanded":l,"aria-autocomplete":"list","aria-owns":u,"aria-activedescendant":null!==c?`${d}-${c}`:void 0,ref:this.inputRef};return i?i(p,f,s):(0,_.createElement)(Ky,p,(0,_.createElement)("input",f),s&&(0,_.createElement)(nX,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:r=!1}=this.props,{showSuggestions:o,suggestions:i,selectedSuggestion:a,suggestionsListboxId:s,suggestionOptionIdPrefix:l,loading:c}=this.state,u={id:s,ref:this.autocompleteRef,role:"listbox"},d=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a});return(0,Ee.isFunction)(t)&&o&&i.length?t({suggestions:i,selectedSuggestion:a,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:r&&!(n&&n.length)}):!(0,Ee.isFunction)(t)&&o&&i.length?(0,_.createElement)(Na,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,_.createElement)("div",(0,dr.Z)({},u,{className:Lr()("block-editor-url-input__suggestions",`${e}__suggestions`)}),i.map(((e,t)=>(0,_.createElement)(ga,(0,dr.Z)({},d(0,t),{key:e.id,className:Lr()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var CX=LE(kX,wX,xX,AE(((e,t)=>{if((0,Ee.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Mb);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(EX),SX=e=>{let t,{searchTerm:n,onClick:r,itemProps:o,isSelected:i,buttonText:a}=e;return n?(t=a?(0,Ee.isFunction)(a)?a(n):a:jN(R(U("Create: <mark>%s</mark>"),n),{mark:(0,_.createElement)("mark",null)}),(0,_.createElement)(ga,(0,dr.Z)({},o,{className:Lr()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":i}),onClick:r}),(0,_.createElement)(c_,{className:"block-editor-link-control__search-item-icon",icon:G_}),(0,_.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,_.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};function IX(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.replace(/^(?:https?:)\/\/(?:www\.)?/,"");n.match(/^[^\/]+\/$/)&&(n=n.replace("/",""));const r=/([\w|:])*\.(?:jpg|jpeg|gif|png|svg)/;if(!t||n.length<=t||!n.match(r))return n;n=n.split("?")[0];const o=n.split("/"),i=o[o.length-1];if(i.length<=t)return"…"+n.slice(-t);const a=i.lastIndexOf("."),[s,l]=[i.slice(0,a),i.slice(a+1)],c=s.slice(-3)+"."+l;return i.slice(0,t-c.length-1)+"…"+c}function TX(e){try{return decodeURI(e)}catch(t){return e}}var NX=e=>{let{text:t="",highlight:n=""}=e;const r=n.trim();if(!r)return t;const o=new RegExp(`(${(0,Ee.escapeRegExp)(r)})`,"gi");return jN(t.replace(o,"<mark>$&</mark>"),{mark:(0,_.createElement)("mark",null)})},AX=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),PX=e=>{let{itemProps:t,suggestion:n,isSelected:r=!1,onClick:o,isURL:i=!1,searchTerm:a="",shouldShowType:s=!1}=e;return(0,_.createElement)(ga,(0,dr.Z)({},t,{onClick:o,className:Lr()("block-editor-link-control__search-item",{"is-selected":r,"is-url":i,"is-entity":!i})}),i&&(0,_.createElement)(c_,{className:"block-editor-link-control__search-item-icon",icon:AX}),(0,_.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,_.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,_.createElement)(NX,{text:n.title,highlight:a})),(0,_.createElement)("span",{"aria-hidden":!i,className:"block-editor-link-control__search-item-info"},!i&&(IX(TX(n.url))||""),i&&U("Press ENTER to add this link"))),s&&n.type&&(0,_.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};const RX="__CREATE__",LX=[{id:"opensInNewTab",title:U("Open in new tab")}];function OX(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:r,handleSuggestionClick:o,suggestionsListProps:i,buildSuggestionItemProps:a,suggestions:s,selectedSuggestion:l,isLoading:c,isInitialSuggestions:u,createSuggestionButtonText:d,suggestionsQuery:p}=e;const f=Lr()("block-editor-link-control__search-results",{"is-loading":c}),m=["url","mailto","tel","internal"],h=1===s.length&&m.includes(s[0].type.toLowerCase()),g=n&&!h&&!u,v=!(null!=p&&p.type),b=`block-editor-link-control-search-results-label-${t}`,y=u?U("Recently updated"):R(U('Search results for "%s"'),r),w=(0,_.createElement)(u?_.Fragment:ma,{},(0,_.createElement)("span",{className:"block-editor-link-control__search-results-label",id:b},y));return(0,_.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,(0,_.createElement)("div",(0,dr.Z)({},i,{className:f,"aria-labelledby":b}),s.map(((e,t)=>g&&RX===e.type?(0,_.createElement)(SX,{searchTerm:r,buttonText:d,onClick:()=>o(e),key:e.type,itemProps:a(e,t),isSelected:t===l}):RX===e.type?null:(0,_.createElement)(PX,{key:`${e.id}-${e.type}`,itemProps:a(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===l,isURL:m.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:v})))))}function MX(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}const DX=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function BX(e){return DX.test(e)}const FX=/^(?:[a-z]+:|#|\?|\.|\/)/i;function jX(e){return e?(e=e.trim(),FX.test(e)||BX(e)?e:"http://"+e):e}function zX(e){const t=(0,Ee.startsWith)(e,"#");return _X(e)||e&&e.includes("www.")||t}const HX=()=>Promise.resolve([]),VX=e=>{let t="URL";const n=MX(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,Ee.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?jX(e):e,type:t}])};const WX=()=>Promise.resolve([]),ZX=(0,_.forwardRef)(((e,t)=>{let{value:n,children:r,currentLink:o={},className:i=null,placeholder:a=null,withCreateSuggestion:s=!1,onCreateSuggestion:l=Ee.noop,onChange:c=Ee.noop,onSelect:u=Ee.noop,showSuggestions:d=!0,renderSuggestions:p=(e=>(0,_.createElement)(OX,e)),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:h=!1,suggestionsQuery:g={},withURLSuggestion:v=!0,createSuggestionButtonText:b,useLabel:y=!1}=e;const w=function(e,t,n,r){const{fetchSearchSuggestions:o}=(0,cr.Z)((e=>{const{getSettings:t}=e(Mb);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?VX:HX;return(0,_.useCallback)(((t,a)=>{let{isInitialSuggestions:s}=a;return zX(t)?i(t,{isInitialSuggestions:s}):(async(e,t,n,r,o,i)=>{const{isInitialSuggestions:a}=t;let s=await Promise.all([n(e,t),r(e)]);return s=e.includes(" ")||!i||a?s[0]:s[0].concat(s[1]),a||zX(e)||!o?s:s.concat({title:e,url:e,type:RX})})(t,{...e,isInitialSuggestions:s},o,i,n,r)}),[i,o,n])}(g,m,s,v),k=d?f||w:WX,x=zo(ZX),[E,C]=(0,_.useState)(),S=async e=>{let t=e;if(RX!==e.type)(m||t&&Object.keys(t).length>=1)&&u({...(0,Ee.omit)(o,"id","url"),...t},t);else try{var n;t=await l(e.title),null!==(n=t)&&void 0!==n&&n.url&&u(t)}catch(e){}},I=Lr()(i,{"has-no-label":!y});return(0,_.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,_.createElement)(CX,{label:y?"URL":void 0,className:I,value:n,onChange:(e,t)=>{c(e),C(t)},placeholder:null!=a?a:U("Search or type url"),__experimentalRenderSuggestions:d?e=>p({...e,instanceId:x,withCreateSuggestion:s,currentInputValue:n,createSuggestionButtonText:b,suggestionsQuery:g,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),S(t)}}):null,__experimentalFetchLinkSuggestions:k,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,onSubmit:(e,t)=>{var r;const o=e||E;o||null!=n&&null!==(r=n.trim())&&void 0!==r&&r.length?S(o||{url:n}):t.preventDefault()},ref:t}),r)}));var UX=ZX,$X=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),GX=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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:qX,Fill:KX}=Pr("BlockEditorLinkControlViewer");function YX(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}`)}}function XX(e){let{value:t,onEditClick:n,hasRichPreviews:r=!1,hasUnlinkControl:o=!1,onRemove:i}=e;const a=r?null==t?void 0:t.url:null,{richData:s,isFetching:l}=function(e){const[t,n]=(0,_.useReducer)(YX,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,cr.Z)((e=>{const{getSettings:t}=e(Mb);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,_.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}(a),c=s&&Object.keys(s).length,u=t&&IX(TX(t.url),16)||"",d=(null==s?void 0:s.title)||(null==t?void 0:t.title)||u,p=!t.url.length;let f;return f=null!=s&&s.icon?(0,_.createElement)("img",{src:null==s?void 0:s.icon,alt:""}):p?(0,_.createElement)(c_,{icon:$X,size:32}):(0,_.createElement)(c_,{icon:AX}),(0,_.createElement)("div",{"aria-label":U("Currently selected"),"aria-selected":"true",className:Lr()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":c,"is-fetching":!!l,"is-preview":!0,"is-error":p})},(0,_.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,_.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,_.createElement)("span",{className:Lr()("block-editor-link-control__search-item-icon",{"is-image":null==s?void 0:s.icon})},f),(0,_.createElement)("span",{className:"block-editor-link-control__search-item-details"},p?(0,_.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},"Link is empty"):(0,_.createElement)(_.Fragment,null,(0,_.createElement)(R_,{className:"block-editor-link-control__search-item-title",href:t.url},el(d)),(null==t?void 0:t.url)&&(0,_.createElement)("span",{className:"block-editor-link-control__search-item-info"},u)))),(0,_.createElement)(ga,{icon:GX,label:U("Edit"),className:"block-editor-link-control__search-item-action",onClick:n,iconSize:24}),o&&(0,_.createElement)(ga,{icon:VU,label:U("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:i,iconSize:24}),(0,_.createElement)(qX,{fillProps:t})),(c&&((null==s?void 0:s.image)||(null==s?void 0:s.description))||l)&&(0,_.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==s?void 0:s.image)||l)&&(0,_.createElement)("div",{"aria-hidden":!(null!=s&&s.image),className:Lr()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=s&&s.image)})},(null==s?void 0:s.image)&&(0,_.createElement)("img",{src:null==s?void 0:s.image,alt:""})),((null==s?void 0:s.description)||l)&&(0,_.createElement)("div",{"aria-hidden":!(null!=s&&s.description),className:Lr()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=s&&s.description)})},(null==s?void 0:s.description)&&(0,_.createElement)(ck,{truncate:!0,numberOfLines:"2"},s.description))))}function JX(e){var t,n,r;let{searchInputPlaceholder:o,value:i,settings:a=LX,onChange:s=Ee.noop,onRemove:l,noDirectEntry:c=!1,showSuggestions:u=!0,showInitialSuggestions:d,forceIsEditingLink:p,createSuggestion:f,withCreateSuggestion:m,inputValue:h="",suggestionsQuery:g={},noURLSuggestion:v=!1,createSuggestionButtonText:b,hasRichPreviews:y=!1,hasTextControl:w=!1,renderControlBottom:k=null}=e;void 0===m&&f&&(m=!0);const x=(0,_.useRef)(!0),E=(0,_.useRef)(),C=(0,_.useRef)(),[S,I]=(0,_.useState)((null==i?void 0:i.url)||""),[T,N]=(0,_.useState)((null==i?void 0:i.title)||""),A=h||S,[P,R]=(0,_.useState)(void 0!==p?p:!i||!i.url),L=(0,_.useRef)(!1),O=!(null!=A&&null!==(t=A.trim())&&void 0!==t&&t.length);function M(){var e;L.current=!(null===(e=E.current)||void 0===e||!e.contains(E.current.ownerDocument.activeElement)),R(!1)}(0,_.useEffect)((()=>{void 0!==p&&p!==P&&R(p)}),[p]),(0,_.useEffect)((()=>{if(x.current)return void(x.current=!1);const e=null!=C&&C.current?1:0;(_o.focusable.find(E.current)[e]||E.current).focus(),L.current=!1}),[P]),(0,_.useEffect)((()=>{null!=i&&i.title&&i.title!==T&&N(i.title),null!=i&&i.url&&I(i.url)}),[i]);const{createPage:D,isCreatingPage:B,errorMessage:F}=function(e){const t=(0,_.useRef)(),[n,r]=(0,_.useState)(!1),[o,i]=(0,_.useState)(null);return(0,_.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){r(!0),i(null);try{return t.current=(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}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||U("An unknown error occurred during creation. Please try again.")),e}finally{r(!1)}},isCreatingPage:n,errorMessage:o}}(f),j=()=>{A===(null==i?void 0:i.url)&&T===(null==i?void 0:i.title)||s({url:A,title:T}),M()},z=l&&i&&!P&&!B,H=!(null==a||!a.length),V=(null==i||null===(n=i.url)||void 0===n||null===(r=n.trim())||void 0===r?void 0:r.length)>0&&w;return(0,_.createElement)("div",{tabIndex:-1,ref:E,className:"block-editor-link-control"},B&&(0,_.createElement)("div",{className:"block-editor-link-control__loading"},(0,_.createElement)(nX,null)," ",U("Creating"),"…"),(P||!i)&&!B&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)("div",{className:Lr()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":V})},V&&(0,_.createElement)(N_,{ref:C,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:T,onChange:N,onKeyDown:e=>{const{keyCode:t}=e;t!==$r||O||(e.preventDefault(),j())}}),(0,_.createElement)(UX,{currentLink:i,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:o,value:A,withCreateSuggestion:m,onCreateSuggestion:D,onChange:I,onSelect:e=>{s({...e,title:T||(null==e?void 0:e.title)}),M()},showInitialSuggestions:d,allowDirectEntry:!c,showSuggestions:u,suggestionsQuery:g,withURLSuggestion:!v,createSuggestionButtonText:b,useLabel:V},(0,_.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,_.createElement)(ga,{onClick:j,label:U("Submit"),icon:bX,className:"block-editor-link-control__search-submit",disabled:O})))),F&&(0,_.createElement)(v$,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},F)),i&&!P&&!B&&(0,_.createElement)(XX,{key:null==i?void 0:i.url,value:i,onEditClick:()=>R(!0),hasRichPreviews:y,hasUnlinkControl:z,onRemove:l}),H&&(0,_.createElement)("div",{className:"block-editor-link-control__tools"},(0,_.createElement)(yX,{value:i,settings:a,onChange:s})),k&&k())}JX.ViewerFill=KX;var QX=JX,eJ=function(e){let{accept:t,children:n,multiple:r=!1,onChange:o,render:i,...a}=e;const s=(0,_.useRef)(),l=()=>{s.current.click()},c=i?i({openFileDialog:l}):(0,_.createElement)(ga,(0,dr.Z)({onClick:l},a),n);return(0,_.createElement)("div",{className:"components-form-file-upload"},c,(0,_.createElement)("input",{type:"file",ref:s,multiple:r,style:{display:"none"},accept:t,onChange:o}))},tJ=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),nJ=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{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"})),rJ=TE("editor.MediaUpload")((()=>null)),oJ=function(e){let{fallback:t=null,children:n}=e;return(0,cr.Z)((e=>{const{getSettings:t}=e(Mb);return!!t().mediaUpload}),[])?n:t},iJ=LE([RE((e=>{const{createNotice:t,removeNotice:n}=e(xR);return{createNotice:t,removeNotice:n}})),TE("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,allowedTypes:r,accept:o,onSelect:i,onSelectURL:a,onFilesUpload:s=Ee.noop,name:l=U("Replace"),createNotice:c,removeNotice:u,children:d}=e;const[p,f]=(0,_.useState)(t),m=(0,cr.Z)((e=>e(Mb).getSettings().mediaUpload),[]),h=(0,_.createRef)(),g=(0,Ee.uniqueId)("block-editor/media-replace-flow/error-notice/"),v=e=>{const t=document.createElement("div");t.innerHTML=Gc(e);const n=t.textContent||t.innerText||"";setTimeout((()=>{c("error",n,{speak:!0,id:g,isDismissible:!0})}),1e3)},b=e=>{f(e.url),i(e),ag(U("The media file has been replaced")),u(g)},y=e=>{e.keyCode===Xr&&(e.preventDefault(),e.target.click())};return(0,_.createElement)(Ff,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,_.createElement)(Mf,{ref:h,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:y},l)},renderContent:e=>{let{onClose:t}=e;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Wf,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,_.createElement)(rJ,{value:n,onSelect:e=>b(e),allowedTypes:r,render:e=>{let{open:t}=e;return(0,_.createElement)(qb,{icon:tJ,onClick:t},U("Open Media Library"))}}),(0,_.createElement)(oJ,null,(0,_.createElement)(eJ,{onChange:e=>{(e=>{const t=e.target.files;s(t),m({allowedTypes:r,filesList:t,onFileChange:e=>{let[t]=e;b(t)},onError:v})})(e)},accept:o,render:e=>{let{openFileDialog:t}=e;return(0,_.createElement)(qb,{icon:nJ,onClick:()=>{t()}},U("Upload"))}})),d),a&&(0,_.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,_.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},U("Current media URL:")),(0,_.createElement)(QX,{value:{url:p},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;f(t),a(t),h.current.focus()}})))}})})),aJ=0;function sJ(){var e=aJ;return aJ++,e}var lJ=function(e){var t=e.children,n=e.initial,r=e.isPresent,o=e.onExitComplete,i=e.custom,a=e.presenceAffectsLayout,s=zL(cJ),l=zL(sJ),c=(0,_.useMemo)((function(){return{id:l,initial:n,isPresent:r,custom:i,onExitComplete:function(e){s.set(e,!0);var t=!0;s.forEach((function(e){e||(t=!1)})),t&&(null==o||o())},register:function(e){return s.set(e,!1),function(){return s.delete(e)}}}}),a?void 0:[r]);return(0,_.useMemo)((function(){s.forEach((function(e,t){return s.set(t,!1)}))}),[r]),_.useEffect((function(){!r&&!s.size&&(null==o||o())}),[r]),_.createElement(jL.Provider,{value:c},t)};function cJ(){return new Map}function uJ(e){return e.key||""}var dJ=function(e){var t=e.children,n=e.custom,r=e.initial,o=void 0===r||r,i=e.onExitComplete,a=e.exitBeforeEnter,s=e.presenceAffectsLayout,l=void 0===s||s,c=function(){var e=(0,_.useRef)(!1),t=AL((0,_.useState)(0),2),n=t[0],r=t[1];return DM((function(){return e.current=!0})),(0,_.useCallback)((function(){!e.current&&r(n+1)}),[n])}(),u=(0,_.useContext)(Oj);Dj(u)&&(c=u.forceUpdate);var d=(0,_.useRef)(!0),p=function(e){var t=[];return _.Children.forEach(e,(function(e){(0,_.isValidElement)(e)&&t.push(e)})),t}(t),f=(0,_.useRef)(p),m=(0,_.useRef)(new Map).current,h=(0,_.useRef)(new Set).current;if(function(e,t){e.forEach((function(e){var n=uJ(e);t.set(n,e)}))}(p,m),d.current)return d.current=!1,_.createElement(_.Fragment,null,p.map((function(e){return _.createElement(lJ,{key:uJ(e),isPresent:!0,initial:!!o&&void 0,presenceAffectsLayout:l},e)})));for(var g=PL([],AL(p)),v=f.current.map(uJ),b=p.map(uJ),y=v.length,w=0;w<y;w++){var k=v[w];-1===b.indexOf(k)?h.add(k):h.delete(k)}return a&&h.size&&(g=[]),h.forEach((function(e){if(-1===b.indexOf(e)){var t=m.get(e);if(t){var r=v.indexOf(e);g.splice(r,0,_.createElement(lJ,{key:uJ(t),isPresent:!1,onExitComplete:function(){m.delete(e),h.delete(e);var t=f.current.findIndex((function(t){return t.key===e}));f.current.splice(t,1),h.size||(f.current=p,c(),i&&i())},custom:n,presenceAffectsLayout:l},t))}}})),g=g.map((function(e){var t=e.key;return h.has(t)?e:_.createElement(lJ,{key:uJ(e),isPresent:!0,presenceAffectsLayout:l},e)})),f.current=g,_.createElement(_.Fragment,null,h.size?g:g.map((function(e){return(0,_.cloneElement)(e)})))};function pJ(e){let{className:t,label:n,onFilesDrop:r,onHTMLDrop:o,onDrop:i}=e;const[a,s]=(0,_.useState)(),[l,c]=(0,_.useState)(),[u,d]=(0,_.useState)(),p=FH({onDrop(e){const t=jH(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length&&r?r(t):n&&o?o(n):i&&i(e)},onDragStart(e){s(!0);let t="default";(0,Ee.includes)(e.dataTransfer.types,"Files")||jH(e.dataTransfer).length>0?t="file":(0,Ee.includes)(e.dataTransfer.types,"text/html")&&(t="html"),d(t)},onDragEnd(){s(!1),d()},onDragEnter(){c(!0)},onDragLeave(){c(!1)}}),f=L_();let m;l&&(m=(0,_.createElement)(fz.div,{variants:{hidden:{scaleY:0,opacity:0},show:{scaleY:1,opacity:1,transition:{type:"tween",duration:.2,delay:.1,delayChildren:.2}},exit:{scaleY:1,opacity:0,transition:{duration:.3,delayChildren:0}}},initial:f?"show":"hidden",animate:"show",exit:f?"show":"exit",className:"components-drop-zone__content"},(0,_.createElement)(fz.div,{variants:{hidden:{opacity:0,scale:.75},show:{opacity:1,scale:1},exit:{opacity:0,scale:.9}}},(0,_.createElement)(c_,{icon:nJ,className:"components-drop-zone__content-icon"}),(0,_.createElement)("span",{className:"components-drop-zone__content-text"},n||U("Drop files to upload")))));const h=Lr()("components-drop-zone",t,{"is-active":(a||l)&&("file"===u&&r||"html"===u&&o||"default"===u&&i),"is-dragging-over-document":a,"is-dragging-over-element":l,[`is-dragging-${u}`]:!!u});return(0,_.createElement)("div",{ref:p,className:h},f?m:(0,_.createElement)(dJ,null,m))}function fJ(e){let{url:t,urlLabel:n,className:r}=e;const o=Lr()(r,"block-editor-url-popover__link-viewer-url");return t?(0,_.createElement)(R_,{className:o,href:t},n||IX(TX(t))):(0,_.createElement)("span",{className:o})}function mJ(e){let{additionalControls:t,children:n,renderSettings:r,position:o="bottom center",focusOnMount:i="firstElement",...a}=e;const[s,l]=(0,_.useState)(!1),c=!!r&&s;return(0,_.createElement)(Na,(0,dr.Z)({className:"block-editor-url-popover",focusOnMount:i,position:o},a),(0,_.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,_.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&(0,_.createElement)(ga,{className:"block-editor-url-popover__settings-toggle",icon:M_,label:U("Link settings"),onClick:()=>{l(!s)},"aria-expanded":s})),c&&(0,_.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!c&&(0,_.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}mJ.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:r,value:o,...i}=e;return(0,_.createElement)("form",(0,dr.Z)({className:Lr()("block-editor-url-popover__link-editor",n)},i),(0,_.createElement)(CX,{value:o,onChange:r,autocompleteRef:t}),(0,_.createElement)(ga,{icon:bX,label:U("Apply"),type:"submit"}))},mJ.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:r,url:o,urlLabel:i,...a}=e;return(0,_.createElement)("div",(0,dr.Z)({className:Lr()("block-editor-url-popover__link-viewer",t)},a),(0,_.createElement)(fJ,{url:o,urlLabel:i,className:n}),r&&(0,_.createElement)(ga,{icon:GX,label:U("Edit"),onClick:r}))};var hJ=mJ;const gJ=e=>{let{src:t,onChange:n,onSubmit:r,onClose:o}=e;return(0,_.createElement)(hJ,{onClose:o},(0,_.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},(0,_.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":U("URL"),placeholder:U("Paste or type URL"),onChange:n,value:t}),(0,_.createElement)(ga,{className:"block-editor-media-placeholder__url-input-submit-button",icon:bX,label:U("Apply"),type:"submit"})))};var vJ=TE("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:r,icon:o,labels:i={},mediaPreview:a,notices:s,isAppender:l,accept:c,addToGallery:u,multiple:d=!1,handleUpload:p=!0,dropZoneUIOnly:f,disableDropZone:m,disableMediaButtons:h,onError:g,onSelect:v,onCancel:b,onSelectURL:y,onDoubleClick:w,onFilesPreUpload:k=Ee.noop,onHTMLDrop:x=Ee.noop,children:E,mediaLibraryButton:C,placeholder:S,style:I}=e;const T=(0,cr.Z)((e=>{const{getSettings:t}=e(Mb);return t().mediaUpload}),[]),[N,A]=(0,_.useState)(""),[P,R]=(0,_.useState)(!1);(0,_.useEffect)((()=>{var e;A(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const L=e=>{A(e.target.value)},O=()=>{R(!0)},M=()=>{R(!1)},D=e=>{e.preventDefault(),N&&y&&(y(N),M())},B=e=>{if(!p)return v(e);let r;if(k(e),d)if(u){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)}))));v(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=v;else r=e=>{let[t]=e;return v(t)};T({allowedTypes:n,filesList:e,onFileChange:r,onError:g})},F=e=>{B(e.target.files)},j=null!=S?S:e=>{let{instructions:t,title:c}=i;if(T||y||(t=U("To edit this block, you need permission to upload media.")),void 0===t||void 0===c){const e=null!=n?n:[],[r]=e,o=1===e.length,i=o&&"audio"===r,a=o&&"image"===r,s=o&&"video"===r;void 0===t&&T&&(t=U("Upload a media file or pick one from your media library."),i?t=U("Upload an audio file, pick one from your media library, or add one with a URL."):a?t=U("Upload an image file, pick one from your media library, or add one with a URL."):s&&(t=U("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===c&&(c=U("Media"),i?c=U("Audio"):a?c=U("Image"):s&&(c=U("Video")))}const u=Lr()("block-editor-media-placeholder",r,{"is-appender":l});return(0,_.createElement)(EY,{icon:o,label:c,instructions:t,className:u,notices:s,onDoubleClick:w,preview:a,style:I},e,E)},z=()=>m?null:(0,_.createElement)(pJ,{onFilesDrop:B,onHTMLDrop:x}),H=()=>b&&(0,_.createElement)(ga,{className:"block-editor-media-placeholder__cancel-button",title:U("Cancel"),variant:"link",onClick:b},U("Cancel")),V=()=>y&&(0,_.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,_.createElement)(ga,{className:"block-editor-media-placeholder__button",onClick:O,isPressed:P,variant:"tertiary"},U("Insert from URL")),P&&(0,_.createElement)(gJ,{src:N,onChange:L,onSubmit:D,onClose:M}));return f||h?(f&&He("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),(0,_.createElement)(oJ,null,z())):(0,_.createElement)(oJ,{fallback:j(V())},(()=>{const e=null!=C?C:e=>{let{open:t}=e;return(0,_.createElement)(ga,{variant:"tertiary",onClick:()=>{t()}},U("Media Library"))},r=(0,_.createElement)(rJ,{addToGallery:u,gallery:d&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:d,onSelect:v,allowedTypes:n,value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(T&&l)return(0,_.createElement)(_.Fragment,null,z(),(0,_.createElement)(eJ,{onChange:F,accept:c,multiple:d,render:e=>{let{openFileDialog:t}=e;const n=(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ga,{variant:"primary",className:Lr()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},U("Upload")),r,V(),H());return j(n)}}));if(T){const e=(0,_.createElement)(_.Fragment,null,z(),(0,_.createElement)(eJ,{variant:"primary",className:Lr()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:F,accept:c,multiple:d},U("Upload")),r,V(),H());return j(e)}return j(r)})())}));function bJ(e){let{record:t,onChange:n,onReplace:r,completers:o,contentRef:i}=e;const a=Vo(ag,500),s=zo(bJ),[l,c]=(0,_.useState)(0),[u,d]=(0,_.useState)([]),[p,f]=(0,_.useState)(""),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(null),[b,y]=(0,_.useState)(!1);function w(e){const{getOptionCompletion:o}=m||{};if(!e.isDisabled){if(o){const i=o(e.value,p),{action:a,value:s}=void 0===i.action||void 0===i.value?{action:"insert-at-caret",value:i}:i;if("replace"===a)return void r([s]);"insert-at-caret"===a&&function(e){const r=t.start,o=r-m.triggerPrefix.length-p.length,i=Eg({html:Gc(e)});n(Hg(t,i,o,r))}(s)}k()}}function k(){c(0),d([]),f(""),h(null),v(null)}let x;Mg(t)&&(x=Og(Zg(t,0))),(0,_.useEffect)((()=>{if(!x)return void k();const e=(0,Ee.deburr)(x),n=Og(Zg(t,void 0,Og(t).length)),r=(0,Ee.find)(o,(t=>{let{triggerPrefix:r,allowContext:o}=t;const i=e.lastIndexOf(r);if(-1===i)return!1;const a=e.slice(i+r.length);if(a.length>50)return!1;const s=0===u.length,l=1===a.split(/\s/).length,c=b&&a.split(/\s/).length<=3;return!(s&&!c&&!l)&&!(o&&!o(e.slice(0,i),n))&&!/^\s/.test(a)&&!/\s\s+$/.test(a)&&/[\u0000-\uFFFF]*$/.test(a)}));if(!r)return void k();const i=(0,Ee.escapeRegExp)(r.triggerPrefix),a=e.slice(e.lastIndexOf(r.triggerPrefix)).match(new RegExp(`${i}([\0-]*)$`)),s=a&&a[1];h(r),v((()=>r!==m?function(e){const t=e.useItems?e.useItems:function(e){return t=>{const[n,r]=(0,_.useState)([]);return(0,_.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,Ee.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),a=new RegExp("(?:\\b|\\s|^)"+(0,Ee.escapeRegExp)(t),"i");r(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=[];for(let o=0;o<t.length;o++){const i=t[o];let{keywords:a=[]}=i;if("string"==typeof i.label&&(a=[...a,i.label]),a.some((t=>e.test((0,Ee.deburr)(t))))&&(r.push(i),r.length===n))break}return r}(a,i))}));return o}),o?250:0),a=i();return()=>{i.cancel(),a&&(a.canceled=!0)}}),[t]),[n]}}(e);return function(e){let{filterValue:n,instanceId:r,listBoxId:o,className:i,selectedIndex:a,onChangeOptions:s,onSelect:l,onReset:c,value:u,contentRef:d}=e;const[p]=t(n),f=lv({ref:d,value:u});return(0,_.useLayoutEffect)((()=>{s(p)}),[p]),!p.length>0?null:(0,_.createElement)(Na,{focusOnMount:!1,onClose:c,position:"top right",className:"components-autocomplete__popover",anchorRef:f},(0,_.createElement)("div",{id:o,role:"listbox",className:"components-autocomplete__results"},(0,Ee.map)(p,((e,t)=>(0,_.createElement)(ga,{key:e.key,id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":t===a,disabled:e.isDisabled,className:Lr()("components-autocomplete__result",i,{"is-selected":t===a}),onClick:()=>l(e)},e.label)))))}}(r):g)),f(s)}),[x]);const{key:E=""}=u[l]||{},{className:C}=m||{},S=!!m&&u.length>0,I=S?`components-autocomplete-listbox-${s}`:null;return{listBoxId:I,activeId:S?`components-autocomplete-item-${s}-${E}`:null,onKeyDown:function(e){if(y(8===e.keyCode),m&&0!==u.length&&!e.defaultPrevented){switch(e.keyCode){case Kr:c((0===l?u.length:l)-1);break;case Xr:c((l+1)%u.length);break;case Gr:h(null),v(null),e.preventDefault();break;case $r:w(u[l]);break;case qr:case Yr:return void k();default:return}e.preventDefault()}},popover:void 0!==t.start&&g&&(0,_.createElement)(g,{className:C,filterValue:p,instanceId:s,listBoxId:I,selectedIndex:l,onChangeOptions:function(e){c(e.length===u.length?l:0),d(e),function(e){a&&(e.length?a(R(G("%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"):a(U("No results."),"assertive"))}(e)},onSelect:w,value:t,contentRef:i,reset:k})}}var yJ={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,cr.Z)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(Mb),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,i]=DP(t,Ee.noop),a=(0,_.useMemo)((()=>(e.trim()?KR(r,o,i,e):(0,Ee.orderBy)(r,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,i]);return[(0,_.useMemo)((()=>a.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ZN,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[a])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:Tl(t,n,Nl(r))}}};const wJ=[];function kJ(e){let{completers:t=wJ}=e;const{name:n}=jb();return(0,_.useMemo)((()=>{let e=t;return(n===fl()||gl(n,"__experimentalSlashInserter",!1))&&(e=e.concat([yJ])),(0,V.H7)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(Ee.clone)),e=(0,V.O)("editor.Autocomplete.completers",e,n)),e}),[t,n])}const xJ={position:"bottom right",isAlternate:!0};var _J=()=>(0,_.createElement)(_.Fragment,null,["bold","italic","link"].map((e=>(0,_.createElement)(Nr,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,_.createElement)(Nr,{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,_.createElement)(Lf,null,(n=>(0,_.createElement)(Uf,{icon:M_,label:U("More"),toggleProps:{...n,className:Lr()(n.className,{"is-pressed":t}),describedBy:U("Displays more block tools")},controls:(0,Ee.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:xJ})))}))),EJ=e=>{let{inline:t,anchorRef:n}=e;return t?(0,_.createElement)(Na,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,_.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,_.createElement)(Gf,null,(0,_.createElement)(_J,null)))):(0,_.createElement)(Ub,{group:"inline"},(0,_.createElement)(_J,null))};function CJ(){const{didAutomaticChange:e,getSettings:t}=(0,cr.Z)(Mb);return Eo((n=>{function r(n){const{keyCode:r}=n;n.defaultPrevented||46!==r&&8!==r&&r!==Gr||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}),[])}function SJ(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((e=>`<img src="${Ha(e)}">`)).join("")}function IJ(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function TJ(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function NJ(e){let{allowedFormats:t,formattingControls:n,disableFormats:r}=e;return r?NJ.EMPTY_ARRAY:t||n?t||(He("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),n.map((e=>`core/${e}`))):void 0}function AJ(e){let{value:t,pastedBlocks:n=[],onReplace:r,onSplit:o,onSplitMiddle:i,multilineTag:a}=e;if(!r||!o)return;const s=[],[l,c]=function(e,t){let{formats:n,replacements:r,text:o,start:i,end:a}=e;if("string"!=typeof t)return Ug(...arguments);let s=0;return o.split(t).map((e=>{const o=s,l={formats:n.slice(o,o+e.length),replacements:r.slice(o,o+e.length),text:e};return s+=t.length+e.length,void 0!==i&&void 0!==a&&(i>=o&&i<s?l.start=i-o:i<o&&a>o&&(l.start=0),a>=o&&a<s?l.end=a-o:i<s&&a>s&&(l.end=e.length)),l}))}(t),u=n.length>0;let d=-1;const p=Dg(l)&&!Dg(c);u&&Dg(l)||(s.push(o(Yg({value:l,multilineTag:a}),!p)),d+=1),u?(s.push(...n),d+=n.length):i&&s.push(i()),(u||i)&&Dg(c)||s.push(o(Yg({value:c,multilineTag:a}),p)),r(s,u?d:1,u?-1:0)}function PJ(e,t){return t?Wg(e,/\n+/g,kg):Wg(e,new RegExp(kg,"g"),"\n")}function RJ(e){const t=(0,_.useRef)(e);return t.current=e,Eo((e=>{function n(e){const{isSelected:n,disableFormats:r,onChange:o,value:i,formatTypes:a,tagName:s,onReplace:l,onSplit:c,onSplitMiddle:u,__unstableEmbedURLOnPaste:d,multilineTag:p,preserveWhiteSpace:f,pastePlainText:m}=t.current;if(!n)return void e.preventDefault();const{clipboardData:h}=e;let g="",v="";try{g=h.getData("text/plain"),v=h.getData("text/html")}catch(e){try{v=h.getData("Text")}catch(e){return}}if(v=function(e){return e.replace(/.*<!--StartFragment-->/s,"").replace(/<!--EndFragment-->.*/s,"")}(v),v=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}(v),e.preventDefault(),window.console.log("Received HTML:\n\n",v),window.console.log("Received plain text:\n\n",g),r)return void o(Hg(i,g));const b=a.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:v,plainText:g})),e}),i);if(b!==i)return void o(b);const y=[...jH(h)];if("true"===h.getData("rich-text")){const e=h.getData("rich-text-multi-line-tag")||void 0;let t=Eg({html:v,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:f});return t=PJ(t,!!p),IJ(t,i.activeFormats),void o(Hg(i,t))}if(m)return void o(Hg(i,Eg({text:g})));if(y&&y.length&&!v){const e=tp({HTML:SJ(y),mode:"BLOCKS",tagName:s,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",y),void(l&&Dg(i)?l(e):AJ({value:i,pastedBlocks:e,onReplace:l,onSplit:c,onSplitMiddle:u,multilineTag:p}))}let w=l&&c?"AUTO":"INLINE";var k;"AUTO"===w&&Dg(i)&&(k=g,kd(".*").test(k))&&(w="BLOCKS"),d&&Dg(i)&&_X(g.trim())&&(w="BLOCKS");const x=tp({HTML:v,plainText:g,mode:w,tagName:s,preserveWhiteSpace:f});if("string"==typeof x){let e=Eg({html:x});e=PJ(e,!!p),IJ(e,i.activeFormats),o(Hg(i,e))}else x.length>0&&(l&&Dg(i)?l(x,x.length-1,-1):AJ({value:i,pastedBlocks:x,onReplace:l,onSplit:c,onSplitMiddle:u,multilineTag:p}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function LJ(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,ur.Z)(Mb),r=(0,_.useRef)(e);return r.current=e,Eo((e=>{function o(){const{value:e,onReplace:t}=r.current;if(!t)return;const{start:o,text:i}=e;if(" "!==i.slice(o-1,o))return;const a=i.slice(0,o).trim(),s=Dl(Bl("from").filter((e=>{let{type:t}=e;return"prefix"===t})),(e=>{let{prefix:t}=e;return a===t}));if(!s)return;const l=Yg({value:Zg(e,o,i.length)});t([s.transform(l)]),n()}function i(e){const{inputType:i,type:a}=e,{value:s,onChange:l,__unstableAllowPrefixTransformations:c,formatTypes:u}=r.current;if("insertText"!==i&&"compositionend"!==a)return;c&&o&&o();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),s);d!==s&&(t(),l({...d,activeFormats:s.activeFormats}),n())}return e.addEventListener("input",i),e.addEventListener("compositionend",i),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function OJ(e){const{__unstableMarkAutomaticChange:t}=(0,ur.Z)(Mb),n=(0,_.useRef)(e);return n.current=e,Eo((e=>{function r(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:r,value:o,onReplace:i,onSplit:a,onSplitMiddle:s,multilineTag:l,onChange:c,disableLineBreaks:u,onSplitAtEnd:d}=n.current;if(e.keyCode!==$r)return;e.preventDefault();const p={...o};p.formats=r(o);const f=i&&a;if(i){const e=Dl(Bl("from").filter((e=>{let{type:t}=e;return"enter"===t})),(e=>e.regExp.test(p.text)));e&&(i([e.transform({content:p.text})]),t())}if(l)e.shiftKey?u||c(Hg(p,"\n")):f&&Bg(p)?AJ({value:p,onReplace:i,onSplit:a,onSplitMiddle:s,multilineTag:l}):c(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end;const r=e.text.slice(0,t).lastIndexOf(kg),o=e.replacements[r];let i=[,];return o&&(i=[o]),Hg(e,{formats:[,],replacements:i,text:kg},t,n)}(p));else{const{text:t,start:n,end:r}=p,o=d&&n===r&&r===t.length;e.shiftKey||!f&&!o?u||c(Hg(p,"\n")):!f&&o?d():f&&AJ({value:p,onReplace:i,onSplit:a,onSplitMiddle:s,multilineTag:l})}}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function MJ(e){return e(mg).getFormatTypes()}NJ.EMPTY_ARRAY=[];const DJ=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function BJ(e){return Eo((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function FJ(e){return Eo((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function jJ(e){let{formatTypes:t,onChange:n,onFocus:r,value:o,forwardedRef:i}=e;return t.map((e=>{const{name:t,edit:a}=e;if(!a)return null;const s=Lg(o,t);let l=void 0!==s;const c=function(e){let{start:t,end:n,replacements:r,text:o}=e;if(t+1===n&&o[t]===xg)return r[t]}(o),u=void 0!==c&&c.type===t;if("core/link"===t&&!Mg(o)){const e=o.formats,t=(0,Ee.find)(e[o.start],{type:"core/link"}),n=(0,Ee.find)(e[o.end-1],{type:"core/link"});t&&n&&t===n||(l=!1)}return(0,_.createElement)(a,{key:t,isActive:l,activeAttributes:l&&s.attributes||{},isObjectActive:u,activeObjectAttributes:u&&c.attributes||{},value:o,onChange:n,onFocus:r,contentRef:i})}))}const zJ=(0,_.createContext)(),HJ=(0,_.createContext)(),VJ=(0,_.forwardRef)((function e(t,n){let{children:r,tagName:o="div",value:i="",onChange:a,isSelected:s,multiline:l,inlineToolbar:c,wrapperClassName:u,autocompleters:d,onReplace:p,placeholder:f,allowedFormats:m,formattingControls:h,withoutInteractiveFormatting:g,onRemove:v,onMerge:b,onSplit:y,__unstableOnSplitAtEnd:w,__unstableOnSplitMiddle:k,identifier:x,preserveWhiteSpace:E,__unstablePastePlainText:C,__unstableEmbedURLOnPaste:S,__unstableDisableFormats:I,disableLineBreaks:T,unstableOnFocus:N,__unstableAllowPrefixTransformations:A,...P}=t;const R=zo(e);x=x||R,P=function(e){return(0,Ee.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(P);const L=(0,_.useRef)(),{clientId:O}=jb(),{selectionStart:M,selectionEnd:D,isSelected:B,disabled:F}=(0,cr.Z)((e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:r,hasMultiSelection:o}=e(Mb),i=t(),a=n();let l;return void 0===s?l=i.clientId===O&&i.attributeKey===x:s&&(l=i.clientId===O),{selectionStart:l?i.offset:void 0,selectionEnd:l?a.offset:void 0,isSelected:l,disabled:r()||o()}})),{selectionChange:j}=(0,ur.Z)(Mb),z=TJ(l),H=NJ({allowedFormats:m,formattingControls:h,disableFormats:I}),V=!H||H.length>0;let W=i,Z=a;Array.isArray(i)&&(W=Gu.toHTML(i),Z=e=>a(Gu.fromDOM(yg(document,e).childNodes)));const U=(0,_.useCallback)(((e,t)=>{j(O,x,e,t)}),[O,x]),{formatTypes:$,prepareHandlers:G,valueHandlers:q,changeHandlers:K,dependencies:Y}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:r,allowedFormats:o}=e;const i=(0,cr.Z)(MJ,[]),a=(0,_.useMemo)((()=>i.filter((e=>{let{name:t,tagName:n}=e;return!(o&&!o.includes(t)||r&&DJ.has(n))}))),[i,o,DJ]),s=(0,cr.Z)((e=>a.reduce(((r,o)=>(o.__experimentalGetPropsForEditableTreePreparation&&(r[o.name]=o.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t})),r)),{})),[a,t,n]),l=(0,ur.Z)(),c=[],u=[],d=[],p=[];return a.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const r=s[e.name],o=e.__experimentalCreatePrepareEditableTree(r,{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?u.push(o):c.push(o);for(const e in r)p.push(r[e])}if(e.__experimentalCreateOnChangeEditableValue){let r={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(r=e.__experimentalGetPropsForEditableTreeChangeHandler(l,{richTextIdentifier:n,blockClientId:t})),d.push(e.__experimentalCreateOnChangeEditableValue({...s[e.name]||{},...r},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:a,prepareHandlers:c,valueHandlers:u,changeHandlers:d,dependencies:p}}({clientId:O,identifier:x,withoutInteractiveFormatting:g,allowedFormats:H});function X(e){return $.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=jg(e,t.name,0,e.text.length))})),e.formats}const{value:J,onChange:Q,ref:ee}=function(e){let{value:t="",selectionStart:n,selectionEnd:r,placeholder:o,preserveWhiteSpace:i,onSelectionChange:a,onChange:s,__unstableMultilineTag:l,__unstableDisableFormats:c,__unstableIsSelected:u,__unstableDependencies:d=[],__unstableAfterParse:p,__unstableBeforeSerialize:f,__unstableAddInvisibleFormats:m}=e;const h=(0,cv.Z)(),[,g]=(0,_.useReducer)((()=>({}))),v=(0,_.useRef)();function b(){const{ownerDocument:{defaultView:e}}=v.current,t=e.getSelection(),n=t.rangeCount>0?t.getRangeAt(0):null;return Eg({element:v.current,range:n,multilineTag:l,multilineWrapperTags:"li"===l?["ul","ol"]:void 0,__unstableIsEditableTree:!0,preserveWhiteSpace:i})}function y(e){let{domOnly:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};yv({value:e,current:v.current,multilineTag:l,multilineWrapperTags:"li"===l?["ul","ol"]:void 0,prepareEditableTree:m,__unstableDomOnly:t,placeholder:o})}const w=(0,_.useRef)(t),k=(0,_.useRef)();function x(){w.current=t,k.current=Eg({html:t,multilineTag:l,multilineWrapperTags:"li"===l?["ul","ol"]:void 0,preserveWhiteSpace:i}),c&&(k.current.formats=Array(t.length),k.current.replacements=Array(t.length)),p&&(k.current.formats=p(k.current)),k.current.start=n,k.current.end=r}const E=(0,_.useRef)(!1);var C,S,I;k.current?n===k.current.start&&r===k.current.end||(E.current=u,k.current={...k.current,start:n,end:r}):(x(),"core/text-color"===(null===(C=k.current)||void 0===C||null===(S=C.formats[0])||void 0===S||null===(I=S[0])||void 0===I?void 0:I.type)&&function(e){k.current=e,w.current=Yg({value:f?{...e,formats:f(e)}:e,multilineTag:l,preserveWhiteSpace:i});const{formats:t,text:n}=e;h.batch((()=>{s(w.current,{__unstableFormats:t,__unstableText:n})})),g()}(k.current));function T(e){k.current=e,y(e),w.current=c?e.text:Yg({value:f?{...e,formats:f(e)}:e,multilineTag:l,preserveWhiteSpace:i});const{start:t,end:n,formats:r,text:o}=e;h.batch((()=>{a(t,n),s(w.current,{__unstableFormats:r,__unstableText:o})})),g()}function N(){x(),y(k.current)}const A=(0,_.useRef)(!1);(0,_.useLayoutEffect)((()=>{A.current&&t!==w.current&&N()}),[t]),(0,_.useLayoutEffect)((()=>{E.current&&(N(),E.current=!1)}),[E.current]);const P=Er([v,(0,_.useCallback)((e=>{e&&(e.style.whiteSpace="pre-wrap",e.style.minWidth="1px")}),[]),kv({record:k}),xv({record:k,multilineTag:l,preserveWhiteSpace:i}),Eo((e=>{function t(t){const{target:n}=t;if(n===e||n.textContent)return;const{ownerDocument:r}=n,{defaultView:o}=r,i=r.createRange(),a=o.getSelection();i.selectNode(n),a.removeAllRanges(),a.addRange(i)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[]),Ev({record:k,applyRecord:y}),Pv({createRecord:b,handleChange:T,multilineTag:l}),Sv({multilineTag:l,createRecord:b,handleChange:T}),Nv({record:k,applyRecord:y,createRecord:b,handleChange:T,isSelected:u,onSelectionChange:a}),Eo((e=>{function t(e){if(e.defaultPrevented)return;const{keyCode:t,altKey:n,metaKey:r,ctrlKey:o}=e;32!==t||n||r||o||(e.target.ownerDocument.execCommand("insertText",!1," "),e.preventDefault())}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[]),Eo((()=>{N(),A.current=!0}),[o,...d])]);return{value:k.current,onChange:T,ref:P}}({value:W,onChange(e,t){let{__unstableFormats:n,__unstableText:r}=t;Z(e),Object.values(K).forEach((e=>{e(n,r)}))},selectionStart:M,selectionEnd:D,onSelectionChange:U,placeholder:f,__unstableIsSelected:B,__unstableMultilineTag:z,__unstableDisableFormats:I,preserveWhiteSpace:E,__unstableDependencies:[...Y,o],__unstableAfterParse:function(e){return q.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:X,__unstableAddInvisibleFormats:function(e){return G.reduce(((t,n)=>n(t,e.text)),e.formats)}}),te=function(e){return function(e){const t=(0,_.useRef)(),n=(0,_.useRef)(),{popover:r,listBoxId:o,activeId:i,onKeyDown:a}=bJ({...e,contentRef:t});return n.current=a,{ref:Er([t,Eo((e=>{function t(e){n.current(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]),children:r,"aria-autocomplete":o?"list":void 0,"aria-owns":o,"aria-activedescendant":i}}({...e,completers:kJ(e)})}({onReplace:p,completers:d,record:J,onChange:Q});!function(e){let{value:t}=e;const n=t.activeFormats&&!!t.activeFormats.length,{isCaretWithinFormattedText:r}=(0,cr.Z)(Mb),{enterFormattedText:o,exitFormattedText:i}=(0,ur.Z)(Mb);(0,_.useEffect)((()=>{n?r()||o():r()&&i()}),[n])}({value:J}),function(e){let{html:t,value:n}=e;const r=(0,_.useRef)(),o=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:i}=(0,ur.Z)(Mb);(0,_.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:W,value:J});const ne=(0,_.useRef)(new Set),re=(0,_.useRef)(new Set);function oe(){L.current.focus()}const ie=o,ae=(0,_.createElement)(_.Fragment,null,B&&(0,_.createElement)(zJ.Provider,{value:ne},(0,_.createElement)(HJ.Provider,{value:re},(0,_.createElement)(Na.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},r&&r({value:J,onChange:Q,onFocus:oe}),(0,_.createElement)(jJ,{value:J,onChange:Q,onFocus:oe,formatTypes:$,forwardedRef:L})))),B&&V&&(0,_.createElement)(EJ,{inline:c,anchorRef:L.current}),(0,_.createElement)(ie,(0,dr.Z)({role:"textbox","aria-multiline":!0,"aria-label":f},P,te,{ref:Er([te.ref,P.ref,ee,LJ({value:J,onChange:Q,__unstableAllowPrefixTransformations:A,formatTypes:$,onReplace:p}),Eo((e=>{function t(e){(lo.primary(e,"z")||lo.primary(e,"y")||lo.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),BJ(ne),FJ(re),CJ(),RJ({isSelected:B,disableFormats:I,onChange:Q,value:J,formatTypes:$,tagName:o,onReplace:p,onSplit:y,onSplitMiddle:k,__unstableEmbedURLOnPaste:S,multilineTag:z,preserveWhiteSpace:E,pastePlainText:C}),OJ({removeEditorOnlyFormats:X,value:J,onReplace:p,onSplit:y,onSplitMiddle:k,multilineTag:z,onChange:Q,disableLineBreaks:T,onSplitAtEnd:w}),L,n]),contentEditable:!F||void 0,suppressContentEditableWarning:!F,className:Lr()("block-editor-rich-text__editable",P.className,"rich-text"),onFocus:N,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(46===t||8===t)){const{start:n,end:r,text:o}=J,i=8===t,a=J.activeFormats&&!!J.activeFormats.length;if(!Mg(J)||a||i&&0!==n||!i&&r!==o.length)return;b&&b(!i),v&&Dg(J)&&i&&v(!i),e.preventDefault()}}})));if(!u)return ae;He("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const se=Lr()("block-editor-rich-text",u);return(0,_.createElement)("div",{className:se},ae)}));VJ.Content=e=>{let{value:t,tagName:n,multiline:r,...o}=e;Array.isArray(t)&&(t=Gu.toHTML(t));const i=TJ(r);!t&&i&&(t=`<${i}></${i}>`);const a=(0,_.createElement)(Sc,null,t);return n?(0,_.createElement)(n,(0,Ee.omit)(o,["format"]),a):a},VJ.isEmpty=e=>!e||0===e.length;var WJ=VJ;function ZJ(e){let{character:t,type:n,onUse:r}=e;const o=(0,_.useContext)(zJ),i=(0,_.useRef)();return i.current=r,(0,_.useEffect)((()=>{function e(e){lo[n](e,t)&&(i.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t,n]),null}function UJ(e){let t,{name:n,shortcutType:r,shortcutCharacter:o,...i}=e,a="RichText.ToolbarControls";return n&&(a+=`.${n}`),r&&o&&(t=io[r](o)),(0,_.createElement)(Tr,{name:a},(0,_.createElement)(Mf,(0,dr.Z)({},i,{shortcut:t})))}function $J(e){let{inputType:t,onInput:n}=e;const r=(0,_.useContext)(HJ),o=(0,_.useRef)();return o.current=n,(0,_.useEffect)((()=>{function e(e){e.inputType===t&&(o.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t]),null}const GJ="none",qJ="custom",KJ="media",YJ="attachment",XJ=["noreferrer","noopener"],JJ=(0,_.createElement)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,_.createElement)(Po,{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,_.createElement)(Po,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),QJ=e=>{let{linkDestination:t,onChangeUrl:n,url:r,mediaType:o="image",mediaUrl:i,mediaLink:a,linkTarget:s,linkClass:l,rel:c}=e;const[u,d]=(0,_.useState)(!1),p=(0,_.useCallback)((()=>{d(!0)})),[f,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null),v=(0,_.useRef)(null),b=(0,_.useCallback)((()=>{t!==KJ&&t!==YJ||g(""),m(!0)})),y=(0,_.useCallback)((()=>{m(!1)})),w=(0,_.useCallback)((()=>{g(null),y(),d(!1)})),k=e=>{let t=e;return void 0===e||(0,Ee.isEmpty)(t)||(0,Ee.isEmpty)(t)||((0,Ee.each)(XJ,(e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,Ee.isEmpty)(t)&&(t=void 0)),t},x=(0,_.useCallback)((()=>e=>{const t=v.current;t&&t.contains(e.target)||(d(!1),g(null),y())})),E=(0,_.useCallback)((()=>e=>{if(h){var t;const e=(null===(t=S().find((e=>e.url===h)))||void 0===t?void 0:t.linkDestination)||qJ;n({href:h,linkDestination:e})}y(),g(null),e.preventDefault()})),C=(0,_.useCallback)((()=>{n({linkDestination:GJ,href:""})})),S=()=>{const e=[{linkDestination:KJ,title:U("Media File"),url:"image"===o?i:void 0,icon:JJ}];return"image"===o&&a&&e.push({linkDestination:YJ,title:U("Attachment Page"),url:"image"===o?a:void 0,icon:(0,_.createElement)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,_.createElement)(Po,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},I=(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Yy,{label:U("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;return n=t||c?k(c):void 0,{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===s}),(0,_.createElement)(N_,{label:U("Link Rel"),value:k(c)||"",onChange:e=>{n({rel:e})}}),(0,_.createElement)(N_,{label:U("Link CSS Class"),value:l||"",onChange:e=>{n({linkClass:e})}})),T=null!==h?h:r,N=((0,Ee.find)(S(),["linkDestination",t])||{}).title;return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Mf,{icon:HU,className:"components-toolbar__control",label:U(r?"Edit link":"Insert link"),"aria-expanded":u,onClick:p}),u&&(0,_.createElement)(hJ,{onFocusOutside:x(),onClose:w,renderSettings:()=>I,additionalControls:!T&&(0,_.createElement)(Wf,null,(0,Ee.map)(S(),(e=>(0,_.createElement)(qb,{key:e.linkDestination,icon:e.icon,onClick:()=>{g(null),(e=>{const t=S();let r;r=e?((0,Ee.find)(t,(t=>t.url===e))||{linkDestination:qJ}).linkDestination:GJ,n({linkDestination:r,href:e})})(e.url),y()}},e.title))))},(!r||f)&&(0,_.createElement)(hJ.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:T,onChangeInputValue:g,onSubmit:E(),autocompleteRef:v}),r&&!f&&(0,_.createElement)(_.Fragment,null,(0,_.createElement)(hJ.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:b,urlLabel:N}),(0,_.createElement)(ga,{icon:Oo,label:U("Remove link"),onClick:C}))))};var eQ=AE((e=>({selectedBlockClientId:e(Mb).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=gN(t);return t?(0,_.createElement)(ga,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},U("Skip to the selected block")):null}));const tQ={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","-¿×÷"," -⯿","⸀-","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function nQ(e,t){return t.replace(e.HTMLRegExp,"\n")}function rQ(e,t){return t.replace(e.astralRegExp,"a")}function oQ(e,t){return t.replace(e.HTMLEntityRegExp,"")}function iQ(e,t){return t.replace(e.connectorRegExp," ")}function aQ(e,t){return t.replace(e.removeRegExp,"")}function sQ(e,t){return t.replace(e.HTMLcommentRegExp,"")}function lQ(e,t){return e.shortcodesRegExp?t.replace(e.shortcodesRegExp,"\n"):t}function cQ(e,t){return t.replace(e.spaceRegExp," ")}function uQ(e,t){return t.replace(e.HTMLEntityRegExp,"a")}function dQ(e,t,n){var r,o;return e=(0,Ee.flow)(nQ.bind(null,n),sQ.bind(null,n),lQ.bind(null,n),rQ.bind(null,n),cQ.bind(null,n),uQ.bind(null,n))(e),null!==(r=null===(o=(e+="\n").match(t))||void 0===o?void 0:o.length)&&void 0!==r?r:0}var pQ=AE((e=>{const{getMultiSelectedBlocks:t}=e(Mb);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=function(e,t,n){const r=function(e,t){var n,r;const o=(0,Ee.extend)({},tQ,t);return o.shortcodes=null!==(n=null===(r=o.l10n)||void 0===r?void 0:r.shortcodes)&&void 0!==n?n:[],o.shortcodes&&o.shortcodes.length&&(o.shortcodesRegExp=new RegExp("\\[\\/?(?:"+o.shortcodes.join("|")+")[^\\]]*?\\]","g")),o.type=e,"characters_excluding_spaces"!==o.type&&"characters_including_spaces"!==o.type&&(o.type="words"),o}(t,n);let o;switch(r.type){case"words":return o=r.wordsRegExp,function(e,t,n){var r,o;return e=(0,Ee.flow)(nQ.bind(null,n),sQ.bind(null,n),lQ.bind(null,n),cQ.bind(null,n),oQ.bind(null,n),iQ.bind(null,n),aQ.bind(null,n))(e),null!==(r=null===(o=(e+="\n").match(t))||void 0===o?void 0:o.length)&&void 0!==r?r:0}(e,o,r);case"characters_including_spaces":return o=r.characters_including_spacesRegExp,dQ(e,o,r);case"characters_excluding_spaces":return o=r.characters_excluding_spacesRegExp,dQ(e,o,r);default:return 0}}(nu(t),"words");return(0,_.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,_.createElement)(ZN,{icon:Zz,showColors:!0}),(0,_.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,_.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},R(G("%d block","%d blocks",t.length),t.length)),(0,_.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},R(G("%d word","%d words",n),n))))}));function fQ(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:r,styles:o}=(0,cr.Z)((e=>{var n,r;const o=e(Mb).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(pc).getBlockStyles(t)}}),[t]),i=(0,_.useMemo)((()=>[{label:U("Not set"),value:""},...o.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[o]),a=(0,_.useCallback)((e=>{r(t,e)}),[t,r]);return r&&(0,_.createElement)(cR,{options:i,value:n||"",label:U("Default Style"),onChange:a})}function mQ(e){let{choices:t=[],onHover:n=Ee.noop,onSelect:r,value:o}=e;return t.map((e=>{const t=o===e.value;return(0,_.createElement)(qb,{key:e.value,role:"menuitemradio",icon:t&&$_,info:e.info,isSelected:t,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{t||r(e.value)},onMouseEnter:()=>n(e.value),onMouseLeave:()=>n(null),"aria-label":e["aria-label"]},e.label)}))}var hQ=function(e){let{blockClientId:t}=e;const[n,r]=(0,_.useState)(),{updateBlockAttributes:o}=(0,ur.Z)(Mb),{variations:i,blockAttributes:a}=(0,cr.Z)((e=>{const{getBlockVariations:n}=e(pc),{getBlockName:r,getBlockAttributes:o}=e(Mb),i=t&&r(t);return{variations:i&&n(i,"transform"),blockAttributes:o(t)}}),[t]);if((0,_.useEffect)((()=>{var e;r(null===(e=((e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&(0,Ee.isMatch)(e,n)}));return 1===n.length?n[0]:void 0})(a,i))||void 0===e?void 0:e.name)}),[a,i]),null==i||!i.length)return null;const s=i.map((e=>{let{name:t,title:n,description:r}=e;return{value:t,label:n,info:r}})),l=e=>{o(t,{...i.find((t=>{let{name:n}=t;return n===e})).attributes})},c="block-editor-block-variation-transforms";return(0,_.createElement)(Uf,{className:c,label:U("Transform to variation"),text:U("Transform to variation"),popoverProps:{position:"bottom center",className:`${c}__popover`},icon:M_,toggleProps:{iconPosition:"right"}},(()=>(0,_.createElement)("div",{className:`${c}__container`},(0,_.createElement)(Gb,null,(0,_.createElement)(mQ,{choices:s,value:n,onSelect:l})))))};const gQ=e=>{let{clientId:t,blockName:n,hasBlockStyles:r,bubblesVirtually:o}=e;const i=kz(t);return(0,_.createElement)("div",{className:"block-editor-block-inspector"},(0,_.createElement)(UN,i),(0,_.createElement)(hQ,{blockClientId:t}),r&&(0,_.createElement)("div",null,(0,_.createElement)(F_,{title:U("Styles")},(0,_.createElement)(Yz,{clientId:t}),vl(n,"defaultStylePicker",!0)&&(0,_.createElement)(fQ,{blockName:n}))),(0,_.createElement)(_E.Slot,{bubblesVirtually:o}),(0,_.createElement)(_E.Slot,{__experimentalGroup:"typography",bubblesVirtually:o,label:U("Typography")}),(0,_.createElement)(_E.Slot,{__experimentalGroup:"dimensions",bubblesVirtually:o,label:U("Dimensions")}),(0,_.createElement)(_E.Slot,{__experimentalGroup:"border",label:U("Border")}),(0,_.createElement)("div",null,(0,_.createElement)(vQ,{bubblesVirtually:o})),(0,_.createElement)(eQ,{key:"back"}))},vQ=e=>{let{bubblesVirtually:t}=e;const n=wr(xE.slotName);return Boolean(n.fills&&n.fills.length)?(0,_.createElement)(F_,{className:"block-editor-block-inspector__advanced",title:U("Advanced"),initialOpen:!1},(0,_.createElement)(_E.Slot,{__experimentalGroup:"advanced",bubblesVirtually:t})):null};var bQ=e=>{let{showNoBlockSelectedMessage:t=!0,bubblesVirtually:n=!0}=e;const{count:r,hasBlockStyles:o,selectedBlockName:i,selectedBlockClientId:a,blockType:s}=(0,cr.Z)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:r}=e(Mb),{getBlockStyles:o}=e(pc),i=t(),a=i&&r(i),s=a&&ml(a),l=a&&o(a);return{count:n(),selectedBlockClientId:i,selectedBlockName:a,blockType:s,hasBlockStyles:l&&l.length>0}}),[]);if(r>1)return(0,_.createElement)("div",{className:"block-editor-block-inspector"},(0,_.createElement)(pQ,null),(0,_.createElement)(_E.Slot,null),(0,_.createElement)(_E.Slot,{__experimentalGroup:"typography",label:U("Typography")}),(0,_.createElement)(_E.Slot,{__experimentalGroup:"dimensions",label:U("Dimensions")}),(0,_.createElement)(_E.Slot,{__experimentalGroup:"border",label:U("Border")}));const l=i===pl();return s&&a&&!l?(0,_.createElement)(gQ,{clientId:a,blockName:s.name,hasBlockStyles:o,bubblesVirtually:n}):t?(0,_.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},U("No block selected.")):null};function yQ(e){let{children:t,__unstableContentRef:n,...r}=e;const o=Hr("medium"),i=(0,cr.Z)((e=>e(Mb).getSettings().hasFixedToolbar),[]),a=RA(),{getSelectedBlockClientIds:s,getBlockRootClientId:l}=(0,cr.Z)(Mb),{duplicateBlocks:c,removeBlocks:u,insertAfterBlock:d,insertBeforeBlock:p,clearSelectedBlock:f,moveBlocksUp:m,moveBlocksDown:h}=(0,ur.Z)(Mb);return(0,_.createElement)("div",(0,dr.Z)({},r,{onKeyDown:function(e){if(a("core/block-editor/move-up",e)){const t=s();if(t.length){e.preventDefault();const n=l((0,Ee.first)(t));m(t,n)}}else if(a("core/block-editor/move-down",e)){const t=s();if(t.length){e.preventDefault();const n=l((0,Ee.first)(t));h(t,n)}}else if(a("core/block-editor/duplicate",e)){const t=s();t.length&&(e.preventDefault(),c(t))}else if(a("core/block-editor/remove",e)){const t=s();t.length&&(e.preventDefault(),u(t))}else if(a("core/block-editor/insert-after",e)){const t=s();t.length&&(e.preventDefault(),d((0,Ee.last)(t)))}else if(a("core/block-editor/insert-before",e)){const t=s();t.length&&(e.preventDefault(),p((0,Ee.first)(t)))}else if(a("core/block-editor/delete-multi-selection",e)){if(["INPUT","TEXTAREA"].includes(e.target.nodeName)||e.defaultPrevented)return;const t=s();t.length>1&&(e.preventDefault(),u(t))}else a("core/block-editor/unselect",e)&&s().length>1&&(e.preventDefault(),f(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}),(0,_.createElement)(vz,{__unstableContentRef:n},(i||!o)&&(0,_.createElement)(SH,{isFixed:!0}),(0,_.createElement)(AH,{__unstableContentRef:n}),(0,_.createElement)(Na.Slot,{name:"block-toolbar",ref:mz(n)}),t,(0,_.createElement)(Na.Slot,{name:"__unstable-block-tools-after",ref:mz(n)})))}var wQ=function(e){let{rootClientId:t,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i=!1,__experimentalInsertionIndex:a,__experimentalFilterValue:s,onSelect:l=Ee.noop,shouldFocusBlock:c=!1}=e;const u=(0,cr.Z)((e=>{const{getBlockRootClientId:r}=e(Mb);return t||r(n)||void 0}),[n,t]);return(0,_.createElement)(vL,{onSelect:l,rootClientId:u,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalInsertionIndex:a,__experimentalFilterValue:s,shouldFocusBlock:c})};function kQ(){return null}kQ.Register=function(){const{registerShortcut:e}=(0,ur.Z)(PA);return(0,_.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:U("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:U("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:U("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:U("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:U("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:U("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:U("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:U("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:U("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:U("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var xQ=kQ;const _Q=new Set([Kr,Yr,Xr,qr,$r,8]);function EQ(){const e=(0,cr.Z)((e=>e(Mb).isTyping())),{startTyping:t,stopTyping:n}=(0,ur.Z)(Mb);return Er([function(){const e=(0,cr.Z)((e=>e(Mb).isTyping()),[]),{stopTyping:t}=(0,ur.Z)(Mb);return Eo((n=>{if(!e)return;const{ownerDocument:r}=n;let o,i;function a(e){const{clientX:n,clientY:r}=e;o&&i&&(o!==n||i!==r)&&t(),o=n,i=r}return r.addEventListener("mousemove",a),()=>{r.removeEventListener("mousemove",a)}}),[e,t])}(),Eo((r=>{const{ownerDocument:o}=r,{defaultView:i}=o;if(e){let e;function t(t){const{target:r}=t;e=i.setTimeout((()=>{ZT(r)||n()}))}function a(e){const{keyCode:t}=e;t!==Gr&&9!==t||n()}function s(){const e=i.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return r.addEventListener("focus",t),r.addEventListener("keydown",a),o.addEventListener("selectionchange",s),()=>{i.clearTimeout(e),r.removeEventListener("focus",t),r.removeEventListener("keydown",a),o.removeEventListener("selectionchange",s)}}function a(e){const{type:n,target:o}=e;ZT(o)&&r.contains(o)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&_Q.has(t)}(e))&&t()}return r.addEventListener("keypress",a),r.addEventListener("keydown",a),()=>{r.removeEventListener("keypress",a),r.removeEventListener("keydown",a)}}),[e,t,n])])}var CQ=function(e){let{children:t}=e;return(0,_.createElement)("div",{ref:EQ()},t)},SQ=n(62948),IQ=async function(e){let{perPage:t=20}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await ye({path:te("/wp/v2/search",{search:e,per_page:t,type:"post"})});return Array.isArray(n)?n.map((e=>({id:e.id,url:e.url,title:du(e.title)||`(${SQ.Z.I18n.t("noName")})`,type:e.subtype||e.type}))):[]},TQ=n(15451),NQ=function(e){let{isActive:t,label:n,info:r,onToggle:o}=e;return(0,TQ.jsx)(qb,{icon:t&&$_,isSelected:t,onClick:o,role:"menuitemcheckbox",info:r,children:n})},AQ=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})),PQ=function(e){const t=(0,cr.Z)((e=>e("mailpoet-form-editor").hasEditorUndo()),[]),{historyUndo:n}=(0,ur.Z)("mailpoet-form-editor"),{registerShortcut:r}=(0,ur.Z)("core/keyboard-shortcuts");return OA("mailpoet-form-editor/undo",(e=>{n(),e.preventDefault()})),(0,_.useEffect)((()=>{r({name:"mailpoet-form-editor/undo",category:"block",description:U("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}})}),[r]),(0,TQ.jsx)(ga,{...e,icon:AQ,label:U("Undo"),shortcut:io.primary("z"),"aria-disabled":!t,onClick:t?()=>{n()}:void 0,className:"editor-history__undo"})},RQ=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})),LQ=function(e){const t=(0,cr.Z)((e=>e("mailpoet-form-editor").hasEditorRedo()),[]),{historyRedo:n}=(0,ur.Z)("mailpoet-form-editor"),{registerShortcut:r}=(0,ur.Z)("core/keyboard-shortcuts"),o=()=>{n()};return OA("mailpoet-form-editor/redo",(e=>{o(),e.preventDefault()})),(0,_.useEffect)((()=>{r({name:"mailpoet-form-editor/redo",category:"block",description:U("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[r]),(0,TQ.jsx)(ga,{...e,icon:RQ,label:U("Redo"),shortcut:io.primaryShift("z"),"aria-disabled":!t,onClick:t?o:void 0,className:"editor-history__redo"})};function OQ(e){let{isInserterOpened:t,setIsInserterOpened:n}=e;const r=(0,cr.Z)((e=>e("mailpoet-form-editor").getSidebarOpened()),[]),o=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsFormSaving()),[]),i=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsPreviewShown()),[]),a=(0,cr.Z)((e=>e("mailpoet-form-editor").isFullscreenEnabled()),[]),{toggleSidebar:s,saveForm:l,showPreview:c,toggleFullscreen:u}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsxs)("div",{className:"edit-post-header",children:[(0,TQ.jsxs)("div",{className:"edit-post-header__settings",children:[(0,TQ.jsx)(ga,{isSecondary:!0,onClick:c,isPressed:i,className:"mailpoet-preview-button","data-automation-id":"form_preview_button",children:U("Preview")}),(0,TQ.jsx)(ga,{isPrimary:!0,className:"editor-post-publish-button","data-automation-id":"form_save_button",isBusy:o,onClick:l,children:o?`${U("Saving")}`:U("Save")}),(0,TQ.jsx)(ga,{icon:"admin-generic",label:SQ.Z.I18n.t("formSettings"),tooltipPosition:"down",onClick:()=>s(!r),isPressed:r,className:"mailpoet-editor-header-button"}),(0,TQ.jsx)(Uf,{icon:q_,label:U("More tools & options"),className:"edit-post-more-menu",popoverProps:{className:"edit-post-more-menu__content"},children:()=>(0,TQ.jsx)(Gb,{label:$("View","noun"),className:"mailpoet-dropdown-menu-group",children:(0,TQ.jsx)(NQ,{shortcut:"Ctrl+Shift+Alt+F",label:U("Fullscreen mode"),info:U("Work without distraction"),isActive:a,onToggle:()=>u(!a)})})})]}),(0,TQ.jsx)("div",{className:"edit-post-header__toolbar",children:(0,TQ.jsxs)("div",{className:"toolbar edit-post-header-toolbar edit-post-header-toolbar__left",children:[(0,TQ.jsx)(ga,{isSecondary:!0,href:"?page=mailpoet-forms#/",className:"mailpoet-editor-header-button",children:SQ.Z.I18n.t("back")}),(0,TQ.jsx)(Lf,{as:ga,"data-automation-id":"form_inserter_open",className:"edit-post-header-toolbar__inserter-toggle",isPrimary:!0,isPressed:t,onClick:()=>n(!t),icon:G_,label:$("Add block","Generic label for block inserter button")}),(0,TQ.jsx)(PQ,{"data-automation-id":"form_undo_button"}),(0,TQ.jsx)(LQ,{"data-automation-id":"form_redo_button"})]})})]})}OQ.propTypes={isInserterOpened:O$().bool.isRequired,setIsInserterOpened:O$().func.isRequired};var MQ=OQ,DQ=n(57040),BQ=n(22529);function FQ(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getTutorialUrl()),[]),t=(0,cr.Z)((e=>e("mailpoet-form-editor").getTutorialSeen()),[]),{tutorialDismissed:n}=(0,ur.Z)("mailpoet-form-editor"),r=(0,_.useCallback)((()=>{n()}),[n]);return t?null:(0,TQ.jsx)(DQ.Z,{isDismissible:!0,onRequestClose:r,children:(0,TQ.jsxs)("div",{className:"mailpoet_drag_and_drop_tutorial","data-automation-id":"form-editor-tutorial",children:[(0,TQ.jsx)(BQ.Z,{level:2,children:SQ.Z.I18n.t("tutorialHeading")}),(0,TQ.jsx)("video",{style:{height:"640px"},src:e,controls:!0,autoPlay:!0})]})})}var jQ=function(e){let{label:t,children:n}=e;return(0,_.createElement)("div",{className:"components-panel__header"},t&&(0,_.createElement)("h2",null,t),n)},zQ=(0,_.forwardRef)((function(e,t){let{header:n,className:r,children:o}=e;const i=Lr()(r,"components-panel");return(0,_.createElement)("div",{className:i,ref:t},n&&(0,_.createElement)(jQ,{label:n}),o)}));function HQ(e){let{label:t,className:n,selected:r,help:o,onChange:i,hideLabelFromVision:a,options:s=[],...l}=e;const c=`inspector-radio-control-${zo(HQ)}`,u=e=>i(e.target.value);return!(0,Ee.isEmpty)(s)&&(0,_.createElement)(Ky,{label:t,id:c,hideLabelFromVision:a,help:o,className:Lr()(n,"components-radio-control")},s.map(((e,t)=>(0,_.createElement)("div",{key:`${c}-${t}`,className:"components-radio-control__option"},(0,_.createElement)("input",(0,dr.Z)({id:`${c}-${t}`,className:"components-radio-control__input",type:"radio",name:c,value:e.value,onChange:u,checked:e.value===r,"aria-describedby":o?`${c}__help`:void 0},l)),(0,_.createElement)("label",{htmlFor:`${c}-${t}`},e.label)))))}const VQ=(0,sy.iv)("box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:",Gw.radiusBlockUi,";border:",Gw.borderWidth," solid ",Wy.ui.border,";",""),WQ=(0,sy.iv)("border-color:var( --wp-admin-theme-color );box-shadow:0 0 0 calc( ",Gw.borderWidthFocus," - ",Gw.borderWidth," ) var( --wp-admin-theme-color );outline:2px solid transparent;","");const ZQ=(0,sy.iv)("font-family:",Py("default.fontFamily"),";padding:6px 8px;",VQ,";font-size:",Py("mobileTextMinFontSize"),";line-height:normal;","@media (min-width: 600px)","{font-size:",Py("default.fontSize"),";line-height:normal;}&:focus{",WQ,";}&::-webkit-input-placeholder{color:",Wy.darkGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",Wy.darkGray.placeholder,";}&:-ms-input-placeholder{color:",Wy.darkGray.placeholder,";}.is-dark-theme &{&::-webkit-input-placeholder{color:",Wy.lightGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",Wy.lightGray.placeholder,";}&:-ms-input-placeholder{color:",Wy.lightGray.placeholder,";}}",""),UQ=da("textarea",{target:"ebk7yr50"})("width:100%;",ZQ,";");function $Q(e){let{label:t,hideLabelFromVision:n,value:r,help:o,onChange:i,rows:a=4,className:s,...l}=e;const c=`inspector-textarea-control-${zo($Q)}`;return(0,_.createElement)(Ky,{label:t,hideLabelFromVision:n,id:c,help:o,className:s},(0,_.createElement)(UQ,(0,dr.Z)({className:"components-textarea-control__input",id:c,rows:a,onChange:e=>i(e.target.value),"aria-describedby":o?c+"__help":void 0,value:r},l)))}var GQ=n(44845),qQ=n(65311),KQ=n.n(qQ),YQ=n(59050);n(40686);class XQ extends _.Component{constructor(e){super(e),(0,GQ.Z)(this,"getFieldId",(e=>{const t=e||this.props;return t.field.id||t.field.name})),(0,GQ.Z)(this,"getSelectedValues",(()=>{if(void 0!==this.props.field.selected)return this.props.field.selected(this.props.item);if(void 0!==this.props.item&&void 0!==this.props.field.name){if(!this.allowMultipleValues())return this.props.item[this.props.field.name];if(YQ.ZP.isArray(this.props.item[this.props.field.name]))return this.props.item[this.props.field.name].map((e=>e.id))}return null})),(0,GQ.Z)(this,"getItems",(()=>{let e;return void 0!==window[`mailpoet_${this.props.field.endpoint}`]?e=window[`mailpoet_${this.props.field.endpoint}`]:void 0!==this.props.field.values&&(e=this.props.field.values),YQ.ZP.isArray(e)&&void 0!==this.props.field.filter&&(e=e.filter(this.props.field.filter)),e})),(0,GQ.Z)(this,"getLabel",(e=>void 0!==this.props.field.getLabel?this.props.field.getLabel(e,this.props.item):e.name)),(0,GQ.Z)(this,"getSearchLabel",(e=>void 0!==this.props.field.getSearchLabel?this.props.field.getSearchLabel(e,this.props.item):null)),(0,GQ.Z)(this,"getValue",(e=>void 0!==this.props.field.getValue?this.props.field.getValue(e,this.props.item):e.id)),(0,GQ.Z)(this,"setupSelect2",(()=>{if(this.isSelect2Initialized())return;let e={disabled:this.props.disabled||!1,width:this.props.width||"",placeholder:{id:"",text:this.props.field.placeholder},templateResult:function(e){return e.element&&e.element.selected?null:e.title?e.title:e.text}};this.props.dropDownParent&&(e.dropdownParent=KQ()(this.props.dropDownParent));const t=this.props.field.remoteQuery||null;t&&(e=Object.assign(e,{ajax:{url:window.ajaxurl,type:"POST",dataType:"json",data:function(e){return{action:"mailpoet",api_version:window.mailpoet_api_version,token:window.mailpoet_token,endpoint:t.endpoint,method:t.method,data:Object.assign(t.data,{query:e.term})}},processResults:function(e){let t;return t=YQ.ZP.has(e,"data")?e.data.map((e=>({id:e.id||e.value,text:e.name||e.text}))):[],{results:t}}},minimumInputLength:t.minimumInputLength||2})),void 0!==this.props.field.extendSelect2Options&&(e=Object.assign(e,this.props.field.extendSelect2Options));const n=KQ()(`#${this.selectRef.current.id}`).select2(e);let r=!1;n.on("select2:unselecting",(()=>{r=!0})),n.on("select2:opening",(e=>{!0===r&&(r=!1,e.preventDefault())})),n.on("change",this.handleChange)})),(0,GQ.Z)(this,"resetSelect2",(()=>{this.destroySelect2(),this.setupSelect2()})),(0,GQ.Z)(this,"destroySelect2",(()=>{this.isSelect2Initialized()&&(KQ()(`#${this.selectRef.current.id}`).select2("destroy"),this.cleanupAfterSelect2())})),(0,GQ.Z)(this,"cleanupAfterSelect2",(()=>{KQ()(`#${this.selectRef.current.id}`).find("option:not(.default)").remove(),KQ()(`#${this.selectRef.current.id}`).off("select2:unselecting").off("select2:opening")})),(0,GQ.Z)(this,"allowMultipleValues",(()=>!0===this.props.field.multiple)),(0,GQ.Z)(this,"isSelect2Initialized",(()=>!0===KQ()(`#${this.selectRef.current.id}`).hasClass("select2-hidden-accessible"))),(0,GQ.Z)(this,"isSelect2Component",(()=>this.allowMultipleValues()||this.props.field.forceSelect2)),(0,GQ.Z)(this,"handleChange",(e=>{if(void 0===this.props.onValueChange)return;const t=KQ()(`#${this.selectRef.current.id}`).children(":selected").map((function(){return{id:KQ()(this).val(),text:KQ()(this).text()}})),n=this.props.field.multiple?YQ.ZP.pluck(t,"id"):YQ.ZP.pluck(t,"id").toString(),r=this.transformChangedValue(n,t);this.props.onValueChange({target:{value:r,name:this.props.field.name,id:e.target.id}})})),(0,GQ.Z)(this,"transformChangedValue",((e,t)=>"function"==typeof this.props.field.transformChangedValue?this.props.field.transformChangedValue.call(this,e,t):e)),(0,GQ.Z)(this,"insertEmptyOption",(()=>{if(!this.allowMultipleValues())return this.props.field.placeholder?(0,TQ.jsx)("option",{className:"default"}):void 0})),this.selectRef=(0,_.createRef)()}componentDidMount(){this.isSelect2Component()&&this.setupSelect2()}componentDidUpdate(e){void 0!==this.props.item&&void 0!==e.item&&this.props.item.id!==e.item.id&&KQ()(`#${this.selectRef.current.id}`).val(this.getSelectedValues()).trigger("change"),void 0!==this.props.item&&void 0!==e.item&&this.allowMultipleValues()&&YQ.ZP.isArray(this.props.item[this.props.field.name])&&!YQ.ZP.isEqual(this.props.item[this.props.field.name],e.item[this.props.field.name])&&KQ()(`#${this.selectRef.current.id}`).val(this.getSelectedValues()).trigger("change"),this.isSelect2Initialized()&&this.getFieldId(this.props)!==this.getFieldId(e)&&void 0!==this.props.field.resetSelect2OnUpdate&&this.resetSelect2()}componentWillUnmount(){this.isSelect2Component()&&this.destroySelect2()}render(){const e=this.getItems(this.props.field),t=this.getSelectedValues(),n=e.map((e=>{const t=this.getLabel(e),n=this.getSearchLabel(e),r=this.getValue(e);return(0,TQ.jsx)("option",{className:"default",value:r,title:n,children:t},`option-${e.id}`)}));return(0,TQ.jsxs)("select",{id:this.getFieldId(),ref:this.selectRef,disabled:this.props.field.disabled,"data-placeholder":this.props.field.placeholder,multiple:this.props.field.multiple,defaultValue:t,...this.props.field.validation,children:[this.insertEmptyOption(),n]})}}XQ.propTypes={onValueChange:O$().func,field:O$().shape({name:O$().string.isRequired,values:O$().oneOfType([O$().object,O$().array]),getLabel:O$().func,resetSelect2OnUpdate:O$().bool,selected:O$().func,endpoint:O$().string,filter:O$().func,getSearchLabel:O$().func,getValue:O$().func,placeholder:O$().string,remoteQuery:O$().object,extendSelect2Options:O$().object,multiple:O$().bool,forceSelect2:O$().bool,transformChangedValue:O$().func,disabled:O$().bool,validation:O$().shape({"data-parsley-required":O$().bool,"data-parsley-required-message":O$().string,"data-parsley-type":O$().string,"data-parsley-errors-container":O$().string,maxLength:O$().number})}).isRequired,item:O$().object,disabled:O$().bool,width:O$().string,dropDownParent:O$().string},XQ.defaultProps={onValueChange:function(){},disabled:!1,width:"",item:void 0,dropDownParent:void 0};var JQ=XQ;function QQ(){const[e,t]=(0,_.useState)(!1),n=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormName()),[]),r=Lr()({"is-selected":e}),{changeFormName:o}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsxs)("div",{className:r,children:[(0,TQ.jsx)("label",{htmlFor:"post-title",className:"screen-reader-text",children:SQ.Z.I18n.t("addFormName")}),(0,TQ.jsx)("input",{id:"form-title",className:"form-editor-title",placeholder:SQ.Z.I18n.t("addFormName"),"data-automation-id":"form_title_input",type:"text",onKeyPress:()=>t(!1),onBlur:()=>t(!1),onChange:e=>o(e.target.value),value:n})]})}function e0(e){let{onToggle:t,isOpened:n}=e;const r=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),o=(0,cr.Z)((e=>e("mailpoet-form-editor").getAllAvailableSegments()),[]),i=(0,cr.Z)((e=>e("mailpoet-form-editor").getAllAvailablePages()),[]),a=(0,cr.Z)((e=>e("mailpoet-form-editor").getNotice("missing-lists")),[]),s=(0,cr.Z)((e=>e("mailpoet-form-editor").isFormEnabled()),[]),{changeFormSettings:l,toggleForm:c}=(0,ur.Z)("mailpoet-form-editor"),u=r.segments?o.filter((e=>r.segments.includes(e.id.toString()))):[],d=a&&!u.length;return(0,TQ.jsx)(zQ,{children:(0,TQ.jsxs)(F_,{title:SQ.Z.I18n.t("formSettings"),opened:n,onToggle:t,children:[(0,TQ.jsx)(QQ,{}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("displayForm"),checked:s,onChange:c}),(0,TQ.jsxs)(Ky,{label:SQ.Z.I18n.t("settingsListLabel"),className:Lr()({"mailpoet-form-missing-lists":d}),children:[d?(0,TQ.jsx)("span",{className:"mailpoet-form-lists-error",children:SQ.Z.I18n.t("settingsPleaseSelectList")}):null,(0,TQ.jsx)(JQ,{item:{segments:u},onValueChange:e=>{(0,Ee.isEqual)(r.segments,e.target.value)||l({...r,segments:e.target.value})},field:{id:"segments",name:"segments",values:o,multiple:!0,placeholder:SQ.Z.I18n.t("settingsPleaseSelectList"),getLabel:e=>`${e.name} (${parseInt(e.subscribers,10).toLocaleString()})`,filter:e=>!(e.deleted_at||"default"!==e.type)}})]}),(0,TQ.jsx)(HQ,{className:"mailpoet-form-success-types__control",onChange:e=>{l({...r,on_success:e})},selected:r.on_success||"message",label:SQ.Z.I18n.t("settingsAfterSubmit"),options:[{label:SQ.Z.I18n.t("settingsShowMessage"),value:"message"},{label:SQ.Z.I18n.t("settingsGoToPage"),value:"page"}]}),"page"===r.on_success?(0,TQ.jsx)(cR,{value:r.success_page,options:i.map((e=>({value:e.id.toString(),label:e.title}))),onChange:e=>{l({...r,success_page:e})}}):(0,TQ.jsx)($Q,{value:r.success_message,onChange:e=>{l({...r,success_message:e})},rows:3})]})})}e0.propTypes={onToggle:O$().func.isRequired,isOpened:O$().bool.isRequired};var t0,n0=e0;!function(e){e.Left="left",e.Center="center",e.Right="right"}(t0||(t0={}));var r0=t0,o0=function(e){let{name:t,value:n,onChange:r}=e;const o=tw("color.palette");return(0,TQ.jsxs)("div",{children:[(0,TQ.jsx)(Ky.VisualLabel,{children:t}),(0,TQ.jsx)(FZ,{label:t,value:n,onChange:r,colors:o,className:"block-editor-panel-color-gradient-settings"})]})},i0=function(e){let{name:t,colorValue:n,gradientValue:r,onColorChange:o,onGradientChange:i}=e;const a=tw("color.palette"),s=tw("color.gradients");return(0,TQ.jsx)("div",{children:(0,TQ.jsx)(EU,{colorValue:n,gradientValue:r,onColorChange:o,onGradientChange:i,colors:a,gradients:s,label:t,className:"mailpoet-color-gradient-picker block-editor-panel-color-gradient-settings"})})},a0=function(e){let{value:t,onChange:n}=e;const r=tw("typography.fontSizes");return(0,TQ.jsx)(qG,{value:t,onChange:n,fontSizes:r})},s0=function(e){let{name:t,imageUrl:n,onImageUrlChange:r,imageDisplay:o,onImageDisplayChange:i}=e;return(0,TQ.jsxs)("div",{className:"mailpoet-styles-settings-image-url",children:[(0,TQ.jsx)(Ky.VisualLabel,{children:t}),(0,TQ.jsxs)("div",{className:"mailpoet-styles-settings-image-url-body",children:[(0,TQ.jsx)("input",{type:"text",value:null!=n?n:"",onChange:e=>r(e.target.value)}),(0,TQ.jsx)(rJ,{value:n,onSelect:e=>r(e.url),allowedTypes:["image"],render:e=>{let{open:t}=e;return(0,TQ.jsx)(ga,{isSecondary:!0,isSmall:!0,onClick:t,children:SQ.Z.I18n.t("formSettingsStylesSelectImage")})}})]}),(0,TQ.jsx)("div",{className:"mailpoet-styles-settings-image-url-display",children:(0,TQ.jsx)(cR,{value:o,options:[{label:SQ.Z.I18n.t("imagePlacementScale"),value:"scale"},{label:SQ.Z.I18n.t("imagePlacementFit"),value:"fit"},{label:SQ.Z.I18n.t("imagePlacementTile"),value:"tile"}],onChange:i})})]})},l0=(0,TQ.jsx)(Lo,{width:"14px",height:"14px",viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:(0,TQ.jsx)(Ao,{id:"Symbols",stroke:"none",strokeWidth:"1",children:(0,TQ.jsx)(Ao,{id:"icons/ic_settings",children:(0,TQ.jsx)(Po,{d:"M8.05,0 L8.05101528,2.11065231 C8.65254335,2.23933489 9.2139617,2.47621094 9.71391655,2.7999267 L11.2072853,1.30779041 L12.6922096,2.79271465 L11.199432,4.28509331 C11.5234762,4.78529701 11.7605802,5.34705952 11.8893477,5.94898472 L14,5.95 L14,8.05 L11.8895604,8.05002048 C11.7608414,8.65232154 11.5236547,9.21442744 11.199432,9.71490669 L12.6922096,11.2072853 L11.2072853,12.6922096 L9.71391655,11.2000733 C9.2139617,11.5237891 8.65254335,11.7606651 8.05101528,11.8893477 L8.05,14 L5.95,14 L5.94898472,11.8893477 C5.34705952,11.7605802 4.78529701,11.5234762 4.28509331,11.199432 L2.79271465,12.6922096 L1.30779041,11.2072853 L2.7999267,9.71391655 C2.4760325,9.21368611 2.23907376,8.65192438 2.11043961,8.05002048 L8.8817842e-16,8.05 L1.01676633e-15,5.95 L2.11065231,5.94898472 C2.23933489,5.34745665 2.47621094,4.7860383 2.7999267,4.28608345 L1.30779041,2.79271465 L2.79271465,1.30779041 L4.28509331,2.80056797 C4.78529701,2.47652376 5.34705952,2.23941984 5.94898472,2.11065231 L5.95,0 L8.05,0 Z M7,4 C5.34314575,4 4,5.34314575 4,7 C4,8.65685425 5.34314575,10 7,10 C8.65685425,10 10,8.65685425 10,7 C10,5.34314575 8.65685425,4 7,4 Z",id:"ic_settings"})})})}),c0=(0,TQ.jsx)(Lo,{width:"13",height:"13",viewBox:"4 4 16 16",xmlns:"http://www.w3.org/2000/svg",children:(0,TQ.jsx)(Ao,{id:"icons/checkbox-on-small",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,TQ.jsx)(Po,{d:"M12,4 C16.418278,4 20,7.581722 20,12 C20,16.418278 16.418278,20 12,20 C7.581722,20 4,16.418278 4,12 C4,7.581722 7.581722,4 12,4 Z M15.5939818,8.20494484 C15.1497095,7.86124495 14.5235958,7.95992422 14.1955177,8.42535116 L14.1955177,8.42535116 L11.2218999,12.6438652 L9.73479332,10.9561217 C9.36019283,10.530981 8.72753928,10.5044698 8.32172209,10.8969074 C7.91590488,11.289345 7.89059874,11.9521231 8.26519924,12.3772638 L8.26519924,12.3772638 L10.5728715,14.9962817 C10.9986562,15.4795122 11.7391892,15.4370557 12.1120948,14.9080343 L12.1120948,14.9080343 L15.8043703,9.66999857 C16.1324484,9.20457165 16.0382543,8.54864475 15.5939818,8.20494484 Z",id:"Combined-Shape",fill:"#ff5301",fillRule:"nonzero"})})});function u0(e){let{label:t,active:n,canBeActive:r,onClick:o,children:i,className:a,automationId:s,displaySettingsIcon:l}=e;const[c,u]=(0,_.useState)(!1);return(0,TQ.jsxs)("div",{"data-automation-id":s,className:Lr()(a,"selection-item",{"selection-item-active":n&&r}),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onClick:o,onKeyDown:e=>{["keydown","keypress"].includes(e.type)&&["Enter"," "].includes(e.key)&&(e.preventDefault(),o())},role:"button",tabIndex:0,children:[(0,TQ.jsxs)("div",{className:"selection-item-body",children:[(0,TQ.jsxs)("div",{className:"selection-item-settings",children:[l?(0,TQ.jsx)("div",{className:Lr()("selection-item-icon",{"selection-item-icon-hover":c}),children:l0}):(0,TQ.jsx)("div",{}),c&&!n&&r&&(0,TQ.jsx)("div",{className:"selection-item-settings-oval"}),n&&r&&(0,TQ.jsx)("div",{className:"selection-item-check",children:c0})]}),i]}),c&&(0,TQ.jsx)("div",{className:"selection-item-overlay"})]},t)}u0.defaultProps={canBeActive:!0,displaySettingsIcon:!0,className:void 0,automationId:void 0};var d0=u0;function p0(e){let{label:t,active:n,onClick:r,iconUrl:o}=e;return(0,TQ.jsx)(d0,{label:t,onClick:r,active:n,canBeActive:!0,displaySettingsIcon:!1,className:"close-button-selection-item",children:(0,TQ.jsx)("img",{src:o,alt:t.replace("_"," "),className:"close-button-selection-item-icon"})})}function f0(e){let{name:t,value:n,onChange:r}=e;const o=(0,cr.Z)((e=>e("mailpoet-form-editor").getCloseIconsUrl()),[]);return(0,TQ.jsxs)("div",{children:[(0,TQ.jsx)(Ky.VisualLabel,{children:t}),(0,TQ.jsxs)("div",{className:"close-button-selection-item-list",children:[(0,TQ.jsx)(p0,{label:"round_white",active:"round_white"===n,iconUrl:o.replace("img/form_close_icon","img/form_close_icon/round_white.svg"),onClick:()=>r("round_white")}),(0,TQ.jsx)(p0,{label:"round_black",active:"round_black"===n,iconUrl:o.replace("img/form_close_icon","img/form_close_icon/round_black.svg"),onClick:()=>r("round_black")}),(0,TQ.jsx)(p0,{label:"square_white",active:"square_white"===n,iconUrl:o.replace("img/form_close_icon","img/form_close_icon/square_white.svg"),onClick:()=>r("square_white")}),(0,TQ.jsx)(p0,{label:"square_black",active:"square_black"===n,iconUrl:o.replace("img/form_close_icon","img/form_close_icon/square_black.svg"),onClick:()=>r("square_black")}),(0,TQ.jsx)(p0,{label:"classic",active:"classic"===n,iconUrl:o.replace("img/form_close_icon","img/form_close_icon/classic.svg"),onClick:()=>r("classic")}),(0,TQ.jsx)(p0,{label:"classic_white",active:"classic_white"===n,iconUrl:o.replace("img/form_close_icon","img/form_close_icon/classic_white.svg"),onClick:()=>r("classic_white")})]})]})}const m0={width:{unit:"percent",value:100}},h0={formDelay:15,formCookieExpiration:7},g0={styles:{width:{unit:"pixel",value:560}},...h0,animation:"slideup"},v0={styles:{width:{unit:"percent",value:100}},position:"top",...h0,animation:"slideup"},b0={width:{unit:"percent",value:100}},y0={styles:{width:{unit:"pixel",value:560}},position:"right",...h0,animation:"slideup"},w0={formPadding:20,inputPadding:5,borderSize:0,borderRadius:0,alignment:"left",closeButton:"round_white"},k0=["Arial","Comic Sans MS","Courier New","Georgia","Lucida","Tahoma","Times New Roman","Trebuchet MS","Verdana"];var x0=function(e){let{onChange:t,value:n,name:r,hideLabelFromVision:o=!1}=e;const i=(0,cr.Z)((e=>e("mailpoet-form-editor").getAllCustomFonts()),[]),a={color:"lightgray",backgroundColor:"white",cursor:"default"},s=e=>({fontFamily:e,cursor:"default",marginLeft:16}),l=[{key:SQ.Z.I18n.t("formFontsDefaultTheme"),name:SQ.Z.I18n.t("formFontsDefaultTheme"),selectable:!0,value:""},{key:SQ.Z.I18n.t("formFontsStandard"),name:SQ.Z.I18n.t("formFontsStandard"),selectable:!1,style:a},...k0.map((e=>({key:e,name:e,selectable:!0,style:s(e),value:e})))];SQ.Z.libs3rdPartyEnabled&&(l.push({key:SQ.Z.I18n.t("formFontsCustom"),name:SQ.Z.I18n.t("formFontsCustom"),selectable:!1,style:a}),i.forEach((e=>{l.push({key:e,name:e,selectable:!0,style:s(e),value:e})})));let c=void 0!==n&&l.find((e=>e.value===n));return c||(c=l[0]),(0,TQ.jsx)(wG,{options:l,onChange:e=>{e.selectedItem.selectable&&t(e.selectedItem.value)},value:c,label:r,className:"mailpoet-font-family-select",hideLabelFromVision:o})};function _0(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getAllCustomFonts()),[]);if(!SQ.Z.libs3rdPartyEnabled)return null;const t=e.map((e=>e.replace(" ","+"))).map((e=>e.concat(":400,400i,700,700i"))).join("|");return(0,TQ.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css?family=${t}`})}function E0(e){let{onToggle:t,isOpened:n}=e;const{changeFormSettings:r}=(0,ur.Z)("mailpoet-form-editor"),o=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),i=(0,_.useRef)(o);(0,_.useEffect)((()=>{i.current=o}),[o]);const a=(e,t)=>{var n;const o={...i.current};o[e]=null!=t?t:null!==(n=w0[e])&&void 0!==n?n:void 0,r(o),i.current=o};return(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("formSettingsStyles"),opened:n,onToggle:t,children:(0,TQ.jsxs)("div",{className:"mailpoet-styles-settings",children:[(0,TQ.jsx)(i0,{name:SQ.Z.I18n.t("formSettingsStylesBackgroundColor"),colorValue:o.backgroundColor,gradientValue:o.gradient,onColorChange:(0,Ee.partial)(a,"backgroundColor"),onGradientChange:(0,Ee.partial)(a,"gradient")}),(0,TQ.jsx)(s0,{name:SQ.Z.I18n.t("formSettingsStylesBackgroundImage"),imageUrl:o.backgroundImageUrl,onImageUrlChange:(0,Ee.partial)(a,"backgroundImageUrl"),imageDisplay:o.backgroundImageDisplay,onImageDisplayChange:(0,Ee.partial)(a,"backgroundImageDisplay")}),(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("formSettingsStylesFontColor"),value:o.fontColor,onChange:(0,Ee.partial)(a,"fontColor")}),(0,TQ.jsx)(a0,{value:o.fontSize,onChange:(0,Ee.partial)(a,"fontSize")}),(0,TQ.jsx)(x0,{name:SQ.Z.I18n.t("formSettingsStylesFontFamily"),value:o.fontFamily,onChange:(0,Ee.partial)(a,"fontFamily")}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("formSettingsInputPadding"),value:o.inputPadding,min:0,max:30,allowReset:!0,onChange:(0,Ee.partial)(a,"inputPadding")}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("formSettingsBorderSize"),value:void 0!==o.borderSize?o.borderSize:0,min:0,max:10,allowReset:!0,onChange:(0,Ee.partial)(a,"borderSize"),className:"mailpoet-automation-styles-border-size"}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("formSettingsBorderRadius"),value:void 0!==o.borderRadius?o.borderRadius:0,min:0,max:40,allowReset:!0,onChange:(0,Ee.partial)(a,"borderRadius")}),(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("formSettingsBorderColor"),value:o.borderColor,onChange:(0,Ee.partial)(a,"borderColor")}),(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("formSettingsAlignment"),onChange:(0,Ee.partial)(a,"alignment"),options:[{value:r0.Left,label:SQ.Z.I18n.t("formSettingsAlignmentLeft")},{value:r0.Center,label:SQ.Z.I18n.t("formSettingsAlignmentCenter")},{value:r0.Right,label:SQ.Z.I18n.t("formSettingsAlignmentRight")}],value:o.alignment}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("formSettingsFormPadding"),value:o.formPadding,min:0,max:40,allowReset:!0,onChange:(0,Ee.partial)(a,"formPadding")}),(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("successValidationColorTitle"),value:o.successValidationColor,onChange:(0,Ee.partial)(a,"successValidationColor")}),(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("errorValidationColorTitle"),value:o.errorValidationColor,onChange:(0,Ee.partial)(a,"errorValidationColor")}),(0,TQ.jsx)(f0,{name:SQ.Z.I18n.t("closeButtonHeading"),value:o.closeButton,onChange:(0,Ee.partial)(a,"closeButton")})]})})})}E0.propTypes={onToggle:O$().func.isRequired,isOpened:O$().bool.isRequired};var C0=E0,S0=(0,TQ.jsxs)(Lo,{width:"144",height:"120",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 144 120",children:[(0,TQ.jsxs)("defs",{children:[(0,TQ.jsx)(Ro,{id:"a",x:"8",y:"8",width:"128",height:"68",rx:"1"}),(0,TQ.jsx)(Ro,{id:"b",x:"8",y:"100",width:"128",height:"12",rx:"1"})]}),(0,TQ.jsxs)(Ao,{fill:"none",fillRule:"evenodd",children:[(0,TQ.jsx)(Po,{d:"M4 0h136a4 4 0 0 1 4 4v112a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#FFF",fillRule:"nonzero"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#a"}),(0,TQ.jsx)("use",{fillOpacity:".4",fill:"#E5E9F8",xlinkHref:"#a"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#b"}),(0,TQ.jsx)("use",{fillOpacity:".4",fill:"#E5E9F8",xlinkHref:"#b"}),(0,TQ.jsx)(Ro,{fill:"#FF5301",fillRule:"nonzero",x:"98",y:"84",width:"38",height:"8",rx:"1"}),(0,TQ.jsx)(Ro,{fill:"#FFE0D0",fillRule:"nonzero",x:"53",y:"84",width:"38",height:"8",rx:"1"}),(0,TQ.jsx)(Ro,{fill:"#FFE0D0",fillRule:"nonzero",x:"8",y:"84",width:"38",height:"8",rx:"1"})]})]});function I0(e){let{label:t,icon:n,active:r,canBeActive:o,onClick:i}=e;return(0,TQ.jsxs)(d0,{label:t,onClick:i,active:r,canBeActive:o,className:"form-placement-option",automationId:`form-placement-option-${t}`,children:[(0,TQ.jsx)("div",{className:"form-placement-option-icon",children:n}),(0,TQ.jsx)("div",{className:"form-placement-option-label",children:(0,TQ.jsx)("p",{children:t})})]})}I0.defaultProps={canBeActive:!0};var T0=I0,N0=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{showPlacementSettings:t}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsx)(T0,{active:e.formPlacement.belowPosts.enabled,label:SQ.Z.I18n.t("placeFormBellowPages"),icon:S0,onClick:()=>t("below_post"),canBeActive:!0})},A0=(0,TQ.jsxs)(Lo,{width:"144",height:"120",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 144 120",children:[(0,TQ.jsxs)("defs",{children:[(0,TQ.jsx)(Ro,{id:"popup_icon_a",x:"8",y:"8",width:"128",height:"104",rx:"1"}),(0,TQ.jsx)(Po,{d:"M49 34h46a4 4 0 0 1 4 4v40a4 4 0 0 1-4 4H49a4 4 0 0 1-4-4V38a4 4 0 0 1 4-4z",id:"popup_icon_c"}),(0,TQ.jsxs)("filter",{x:"-61.1%",y:"-56.2%",width:"222.2%",height:"237.5%",filterUnits:"objectBoundingBox",id:"popup_icon_b",children:[(0,TQ.jsx)("feOffset",{dy:"6",in:"SourceAlpha",result:"shadowOffsetOuter1"}),(0,TQ.jsx)("feGaussianBlur",{stdDeviation:"10",in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),(0,TQ.jsx)("feColorMatrix",{values:"0 0 0 0 0.265158067 0 0 0 0 0.293073922 0 0 0 0 0.400749362 0 0 0 0.145352129 0",in:"shadowBlurOuter1"})]})]}),(0,TQ.jsxs)(Ao,{fill:"none",fillRule:"evenodd",children:[(0,TQ.jsx)(Po,{d:"M4 0h136a4 4 0 0 1 4 4v112a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#FFF",fillRule:"nonzero"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#popup_icon_a"}),(0,TQ.jsx)("use",{fillOpacity:".4",fill:"#E5E9F8",xlinkHref:"#popup_icon_a"}),(0,TQ.jsxs)(Ao,{fillRule:"nonzero",children:[(0,TQ.jsx)("use",{fill:"#000",filter:"url(#popup_icon_b)",xlinkHref:"#popup_icon_c"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#popup_icon_c"})]}),(0,TQ.jsx)(Ro,{fill:"#FF5301",fillRule:"nonzero",x:"53",y:"66",width:"38",height:"8",rx:"1"}),(0,TQ.jsx)(Ro,{fill:"#FFE0D0",fillRule:"nonzero",x:"53",y:"54",width:"38",height:"8",rx:"1"}),(0,TQ.jsx)(Ro,{fill:"#FFE0D0",fillRule:"nonzero",x:"53",y:"42",width:"38",height:"8",rx:"1"})]})]}),P0=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{showPlacementSettings:t}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsx)(T0,{active:e.formPlacement.popup.enabled,label:SQ.Z.I18n.t("placePopupFormOnPages"),icon:A0,onClick:()=>t("popup"),canBeActive:!0})},R0=(0,TQ.jsxs)(Lo,{width:"144",height:"120",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 144 120",children:[(0,TQ.jsx)("defs",{children:(0,TQ.jsx)(Ro,{id:"fixed_bar_a",x:"8",y:"24",width:"128",height:"88",rx:"1"})}),(0,TQ.jsxs)(Ao,{fill:"none",fillRule:"evenodd",children:[(0,TQ.jsx)(Po,{d:"M4 0h136a4 4 0 0 1 4 4v112a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#FFF",fillRule:"nonzero"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#a"}),(0,TQ.jsx)("use",{fillOpacity:".4",fill:"#E5E9F8",xlinkHref:"#fixed_bar_a"}),(0,TQ.jsx)(Ro,{fill:"#FF5301",fillRule:"nonzero",x:"98",y:"8",width:"38",height:"8",rx:"1"}),(0,TQ.jsx)(Ro,{fill:"#FFE0D0",fillRule:"nonzero",x:"53",y:"8",width:"38",height:"8",rx:"1"}),(0,TQ.jsx)(Ro,{fill:"#FFE0D0",fillRule:"nonzero",x:"8",y:"8",width:"38",height:"8",rx:"1"})]})]}),L0=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{showPlacementSettings:t}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsx)(T0,{active:e.formPlacement.fixedBar.enabled,label:SQ.Z.I18n.t("placeFixedBarFormOnPages"),icon:R0,onClick:()=>t("fixed_bar"),canBeActive:!0})},O0=(0,TQ.jsxs)(Lo,{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"76",height:"63",viewBox:"0 0 76 63",children:[(0,TQ.jsxs)("defs",{children:[(0,TQ.jsxs)("filter",{id:"slide_in_prefix__a",width:"216.9%",height:"245.3%",x:"-55.8%",y:"-67.2%",filterUnits:"objectBoundingBox",children:[(0,TQ.jsx)("feOffset",{dy:"4",in:"SourceAlpha",result:"shadowOffsetOuter1"}),(0,TQ.jsx)("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"9"}),(0,TQ.jsx)("feColorMatrix",{in:"shadowBlurOuter1",result:"shadowMatrixOuter1",values:"0 0 0 0 0.265158067 0 0 0 0 0.293073922 0 0 0 0 0.400749362 0 0 0 0.145352129 0"}),(0,TQ.jsxs)("feMerge",{children:[(0,TQ.jsx)("feMergeNode",{in:"shadowMatrixOuter1"}),(0,TQ.jsx)("feMergeNode",{in:"SourceGraphic"})]})]}),(0,TQ.jsxs)("filter",{id:"slide_in_prefix__c",width:"226.3%",height:"255.8%",x:"-73.7%",y:"-77.9%",filterUnits:"objectBoundingBox",children:[(0,TQ.jsx)("feOffset",{dx:"-3",in:"SourceAlpha",result:"shadowOffsetOuter1"}),(0,TQ.jsx)("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"5.5"}),(0,TQ.jsx)("feColorMatrix",{in:"shadowBlurOuter1",values:"0 0 0 0 0.265158067 0 0 0 0 0.293073922 0 0 0 0 0.400749362 0 0 0 0.145352129 0"})]}),(0,TQ.jsx)(Ro,{id:"slide_in_prefix__b",width:"67.556",height:"54.6",x:"4.222",y:"4.2",rx:".525"}),(0,TQ.jsx)(Po,{id:"slide_in_prefix__d",d:"M.525 0h27.45c.29 0 .525.235.525.525v22.05c0 .29-.235.525-.525.525H.525c-.29 0-.525-.235-.525-.525V.525C0 .235.235 0 .525 0z"})]}),(0,TQ.jsxs)(Ao,{fill:"none",fillRule:"evenodd",filter:"url(#slide_in_prefix__a)",children:[(0,TQ.jsx)(Po,{fill:"#FFF",fillRule:"nonzero",d:"M2.1 0h71.8c1.16 0 2.1.94 2.1 2.1v58.8c0 1.16-.94 2.1-2.1 2.1H2.1C.94 63 0 62.06 0 60.9V2.1C0 .94.94 0 2.1 0z"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#slide_in_prefix__b"}),(0,TQ.jsx)("use",{fill:"#E5E9F8",fillOpacity:".4",xlinkHref:"#slide_in_prefix__b"}),(0,TQ.jsxs)(Ao,{fillRule:"nonzero",transform:"translate(43.278 35.7)",children:[(0,TQ.jsx)("use",{fill:"#000",filter:"url(#slide_in_prefix__c)",xlinkHref:"#slide_in_prefix__d"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#slide_in_prefix__d"}),(0,TQ.jsx)(Ro,{width:"15.833",height:"4.2",x:"6.333",y:"14.7",fill:"#FF5301",rx:".525"}),(0,TQ.jsx)(Ro,{width:"15.833",height:"4.2",x:"6.333",y:"9.45",fill:"#FFE0D0",rx:".525"}),(0,TQ.jsx)(Ro,{width:"15.833",height:"4.2",x:"6.333",y:"4.2",fill:"#FFE0D0",rx:".525"})]})]})]}),M0=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{showPlacementSettings:t}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsx)(T0,{active:e.formPlacement.slideIn.enabled,label:SQ.Z.I18n.t("placeSlideInFormOnPages"),icon:O0,onClick:()=>t("slide_in"),canBeActive:!0})},D0=(0,TQ.jsxs)(Lo,{xmlns:"http://www.w3.org/2000/svg",width:"144",height:"120",viewBox:"0 0 144 120",children:[(0,TQ.jsxs)("defs",{children:[(0,TQ.jsx)(Ro,{id:"sidebar_icon_prefix__b",width:"82",height:"104",x:"8",y:"8",rx:"1"}),(0,TQ.jsx)(Ro,{id:"sidebar_icon_prefix__c",width:"38",height:"30",x:"98",y:"8",rx:"1"}),(0,TQ.jsx)(Ro,{id:"sidebar_icon_prefix__d",width:"38",height:"30",x:"98",y:"82",rx:"1"}),(0,TQ.jsxs)("filter",{id:"sidebar_icon_prefix__a",width:"212.5%",height:"235%",x:"-56.2%",y:"-67.5%",filterUnits:"objectBoundingBox",children:[(0,TQ.jsx)("feOffset",{dy:"7",in:"SourceAlpha",result:"shadowOffsetOuter1"}),(0,TQ.jsx)("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"17.5"}),(0,TQ.jsx)("feColorMatrix",{in:"shadowBlurOuter1",result:"shadowMatrixOuter1",values:"0 0 0 0 0.265158067 0 0 0 0 0.293073922 0 0 0 0 0.400749362 0 0 0 0.145352129 0"}),(0,TQ.jsxs)("feMerge",{children:[(0,TQ.jsx)("feMergeNode",{in:"shadowMatrixOuter1"}),(0,TQ.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})]}),(0,TQ.jsxs)(Ao,{fill:"none",fillRule:"evenodd",filter:"url(#sidebar_icon_prefix__a)",children:[(0,TQ.jsx)(Po,{fill:"#FFF",fillRule:"nonzero",d:"M4 0h136c2.21 0 4 1.79 4 4v112c0 2.21-1.79 4-4 4H4c-2.21 0-4-1.79-4-4V4c0-2.21 1.79-4 4-4z"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#sidebar_icon_prefix__b"}),(0,TQ.jsx)("use",{fill:"#E5E9F8",fillOpacity:".4",xlinkHref:"#sidebar_icon_prefix__b"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#sidebar_icon_prefix__c"}),(0,TQ.jsx)("use",{fill:"#E5E9F8",fillOpacity:".4",xlinkHref:"#sidebar_icon_prefix__c"}),(0,TQ.jsx)("use",{fill:"#FFF",xlinkHref:"#sidebar_icon_prefix__d"}),(0,TQ.jsx)("use",{fill:"#E5E9F8",fillOpacity:".4",xlinkHref:"#sidebar_icon_prefix__d"}),(0,TQ.jsx)(Ro,{width:"38",height:"8",x:"98",y:"66",fill:"#FF5301",fillRule:"nonzero",rx:"1"}),(0,TQ.jsx)(Ro,{width:"38",height:"8",x:"98",y:"56",fill:"#FFE0D0",fillRule:"nonzero",rx:"1"}),(0,TQ.jsx)(Ro,{width:"38",height:"8",x:"98",y:"46",fill:"#FFE0D0",fillRule:"nonzero",rx:"1"})]})]}),B0=function(){const{showPlacementSettings:e}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsx)(T0,{active:!1,label:SQ.Z.I18n.t("formPlacementOtherLabel"),icon:D0,onClick:()=>e("others"),canBeActive:!1})};function F0(e){let{onToggle:t,isOpened:n}=e;return(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("formPlacement"),opened:n,onToggle:t,className:"form-sidebar-form-placement-panel",children:(0,TQ.jsxs)("div",{className:"form-placement-option-list",children:[(0,TQ.jsx)(N0,{}),(0,TQ.jsx)(L0,{}),(0,TQ.jsx)(P0,{}),(0,TQ.jsx)(M0,{}),(0,TQ.jsx)(B0,{})]})})})}F0.propTypes={onToggle:O$().func.isRequired,isOpened:O$().bool.isRequired};var j0=F0,z0=n(4631),H0=n.n(z0);function V0(e){let{options:t,value:n,onChange:r}=e;const o=(0,_.useRef)(null),i=(0,_.useRef)(null),a=(0,_.useCallback)((e=>{r(e.getValue())}),[r]);return(0,_.useEffect)((()=>(i.current=H0().fromTextArea(o.current,t),i.current.on("change",a),()=>{i.current&&i.current.toTextArea()})),[t,a]),(0,_.useEffect)((()=>{i.current.getValue()!==n&&(i.current.off("change",a),i.current.setValue(n),i.current.on("change",a))}),[n,a]),(0,TQ.jsx)("div",{children:(0,TQ.jsx)("textarea",{ref:o,name:"name",defaultValue:n,autoComplete:"off"})})}n(36629),V0.propTypes={value:O$().string.isRequired,onChange:O$().func.isRequired,options:O$().shape({lineNumbers:O$().bool,tabMode:O$().string,matchBrackets:O$().bool,theme:O$().string,mode:O$().string})},V0.defaultProps={options:{lineNumbers:!0,tabMode:"indent",matchBrackets:!0,theme:"neo",mode:"css"}};var W0=V0;function Z0(e){let{onToggle:t,isOpened:n}=e;const r=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormStyles()),[]),{changeFormStyles:o}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("customCss"),opened:n,onToggle:t,children:(0,TQ.jsx)(W0,{value:r,onChange:o})})})}Z0.propTypes={onToggle:O$().func.isRequired,isOpened:O$().bool.isRequired};var U0=Z0;function $0(){const e=(0,ur.Z)("mailpoet-form-editor").toggleSidebarPanel,t=(0,cr.Z)((e=>e("mailpoet-form-editor").getSidebarOpenedPanels()),[]);return(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(n0,{isOpened:t.includes("basic-settings"),onToggle:(0,Ee.partial)(e,"basic-settings")}),(0,TQ.jsx)(C0,{isOpened:t.includes("styles-settings"),onToggle:(0,Ee.partial)(e,"styles-settings")}),(0,TQ.jsx)(j0,{isOpened:t.includes("form-placement"),onToggle:(0,Ee.partial)(e,"form-placement")}),(0,TQ.jsx)(U0,{isOpened:t.includes("custom-css"),onToggle:(0,Ee.partial)(e,"custom-css")})]})}function G0(){return(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(bQ,{})})}var q0=function(e){let{children:t,closeSidebar:n}=e;return(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsxs)("div",{className:"components-panel__header interface-complementary-area-header__small",children:[(0,TQ.jsx)("span",{className:"interface-complementary-area-header__small-title",children:SQ.Z.I18n.t("formSettings")}),(0,TQ.jsx)(ga,{onClick:n,icon:"no-alt"})]}),(0,TQ.jsxs)("div",{className:"components-panel__header interface-complementary-area-header edit-post-sidebar__panel-tabs",children:[t,(0,TQ.jsx)(ga,{onClick:n,icon:"no-alt"})]})]})};function K0(e){let{onClose:t}=e;const n=(0,cr.Z)((e=>e("mailpoet-form-editor").getDefaultSidebarActiveTab()),[]),r=(0,cr.Z)((e=>e("core/block-editor").getSelectedBlockClientId()),[]),{switchDefaultSidebarTab:o}=(0,ur.Z)("mailpoet-form-editor");return(0,_.useEffect)((()=>{o(r?"block":"form")}),[r,o]),(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(q0,{closeSidebar:t,children:(0,TQ.jsxs)("ul",{children:[(0,TQ.jsx)("li",{children:(0,TQ.jsx)("button",{onClick:()=>o("form"),className:Lr()("components-button edit-post-sidebar__panel-tab",{"is-active":"form"===n}),"data-automation-id":"mailpoet_form_settings_tab",type:"button",children:SQ.Z.I18n.t("form")})}),(0,TQ.jsx)("li",{children:(0,TQ.jsx)("button",{onClick:()=>o("block"),className:Lr()("components-button edit-post-sidebar__panel-tab",{"is-active":"block"===n}),"data-automation-id":"mailpoet_block_settings_tab",type:"button",children:U("Block")})})]})}),"form"===n?(0,TQ.jsx)($0,{}):(0,TQ.jsx)(G0,{})]})}var Y0=n(78230);function X0(e){var t;let{label:n,minPercents:r=0,maxPercents:o=100,minPixels:i=10,maxPixels:a=1e3,value:s,defaultPercentValue:l=50,defaultPixelValue:c=200,onChange:u}=e;const[d,p]=(0,_.useState)(null!=s?s:{unit:"pixel",value:void 0});return(0,_.useEffect)((()=>{p(s)}),[s]),(0,TQ.jsxs)("div",{className:"mailpoet-size-settings-control",children:[(0,TQ.jsx)(Ky.VisualLabel,{children:n}),(0,TQ.jsx)(HQ,{selected:d.unit||"pixel",options:[{label:"px",value:"pixel"},{label:"%",value:"percent"}],onChange:e=>{const t={value:"pixel"===e?c:l,unit:e};p(t),u(t)}}),(0,TQ.jsx)(iW,{value:null!==(t=d.value)&&void 0!==t?t:"pixel"===d.unit?c:l,min:"pixel"===d.unit?i:r,max:"pixel"===d.unit?a:o,onChange:e=>{const t={unit:"pixel"===d.unit?"pixel":"percent",value:e};p(t),u(t)}})]})}var J0=function(e){let{settingsPlacementKey:t}=e;const n=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),r=(0,cr.Z)((e=>(0,Y0.sortBy)("name",e("mailpoet-form-editor").getAllWPTags().concat(e("mailpoet-form-editor").getAllWooCommerceTags()))),[]),o=(0,cr.Z)((e=>(0,Y0.sortBy)("name",e("mailpoet-form-editor").getAllWPCategories().concat(e("mailpoet-form-editor").getAllWooCommerceCategories()))),[]),i=(0,cr.Z)((e=>e("mailpoet-form-editor").getAllWPPages()),[]),a=(0,cr.Z)((e=>(0,Y0.sortBy)("name",e("mailpoet-form-editor").getAllWPPosts().concat(e("mailpoet-form-editor").getAllWooCommerceProducts()))),[]),s=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsPreviewShown()),[]),{changeFormSettings:l}=(0,ur.Z)("mailpoet-form-editor");let c="no-preview";return s&&(c="preview"),(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("placeFormOnAllPages"),checked:n.formPlacement[t].pages.all,onChange:e=>{(0,Y0.compose)([l,(0,Y0.assocPath)(`formPlacement.${t}.pages.all`,e),(0,Y0.cond)([[()=>e,(0,Y0.compose)([(0,Y0.assocPath)(`formPlacement.${t}.pages.selected`,[]),(0,Y0.assocPath)(`formPlacement.${t}.categories`,[]),(0,Y0.assocPath)(`formPlacement.${t}.tags`,[])])],[()=>!e,Y0.identity]])])(n)}}),(0,TQ.jsx)("div",{"data-automation-id":"form-placement-select-page",children:(0,TQ.jsx)("div",{className:"form-editor-placement-selection",children:(0,TQ.jsx)(JQ,{dropDownParent:s?".mailpoet-modal-content":void 0,item:{id:`${c}${n.formPlacement[t].pages.selected.join()}`},onValueChange:e=>{const r=n.formPlacement[t].pages.selected;(0,Y0.isEqual)(r,e.target.value)||(0,Y0.compose)([l,(0,Y0.assocPath)(`formPlacement.${t}.pages.selected`,e.target.value),(0,Y0.cond)([[()=>!!e.target.value.length,(0,Y0.assocPath)(`formPlacement.${t}.pages.all`,!1)],[()=>!e.target.value.length,Y0.identity]])])(n)},field:{id:`${c}pages`,name:"pages",values:i,multiple:!0,placeholder:SQ.Z.I18n.t("selectPage"),getLabel:e=>e.name,selected:()=>n.formPlacement[t].pages.selected}})})}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("placeFormOnAllPosts"),checked:n.formPlacement[t].posts.all,onChange:e=>{(0,Y0.compose)([l,(0,Y0.assocPath)(`formPlacement.${t}.posts.all`,e),(0,Y0.cond)([[()=>e,(0,Y0.compose)([(0,Y0.assocPath)(`formPlacement.${t}.posts.selected`,[]),(0,Y0.assocPath)(`formPlacement.${t}.categories`,[]),(0,Y0.assocPath)(`formPlacement.${t}.tags`,[])])],[()=>!e,Y0.identity]])])(n)}}),(0,TQ.jsx)("div",{className:"form-editor-placement-selection",children:(0,TQ.jsx)(JQ,{dropDownParent:s?".mailpoet-modal-content":void 0,item:{id:`${c}${n.formPlacement[t].posts.selected.join()}`},onValueChange:e=>{const r=n.formPlacement[t].posts.selected;(0,Y0.isEqual)(r,e.target.value)||(0,Y0.compose)([l,(0,Y0.assocPath)(`formPlacement.${t}.posts.selected`,e.target.value),(0,Y0.cond)([[()=>!!e.target.value.length,(0,Y0.assocPath)(`formPlacement.${t}.posts.all`,!1)],[()=>!e.target.value.length,Y0.identity]])])(n)},field:{id:`${c}posts`,name:"posts",values:a,multiple:!0,placeholder:SQ.Z.I18n.t("selectPage"),getLabel:e=>e.name,selected:()=>n.formPlacement[t].posts.selected}})}),(0,TQ.jsxs)("div",{children:[(0,TQ.jsx)("h3",{className:"form-editor-sidebar-heading",children:SQ.Z.I18n.t("displayOnCategories")}),(0,TQ.jsx)("div",{className:"form-editor-placement-selection",children:(0,TQ.jsx)(JQ,{dropDownParent:s?".mailpoet-modal-content":void 0,item:{id:`${c}${n.formPlacement[t].categories.join()}`},onValueChange:e=>{const r=n.formPlacement[t].categories;(0,Y0.isEqual)(r,e.target.value)||(0,Y0.compose)([l,(0,Y0.assocPath)(`formPlacement.${t}.categories`,e.target.value),(0,Y0.cond)([[()=>!!e.target.value.length,(0,Y0.compose)([(0,Y0.assocPath)(`formPlacement.${t}.pages.all`,!1),(0,Y0.assocPath)(`formPlacement.${t}.posts.all`,!1)])],[()=>!e.target.value.length,Y0.identity]])])(n)},field:{id:`${c}categories`,name:"categories",values:o,multiple:!0,placeholder:SQ.Z.I18n.t("selectPage"),getLabel:e=>e.name,selected:()=>n.formPlacement[t].categories}})})]}),(0,TQ.jsxs)("div",{children:[(0,TQ.jsx)("h3",{className:"form-editor-sidebar-heading",children:SQ.Z.I18n.t("displayOnTags")}),(0,TQ.jsx)("div",{className:"form-editor-placement-selection",children:(0,TQ.jsx)(JQ,{dropDownParent:s?".mailpoet-modal-content":void 0,item:{id:`${c}${n.formPlacement[t].tags.join()}`},onValueChange:e=>{const r=n.formPlacement[t].tags;(0,Y0.isEqual)(r,e.target.value)||(0,Y0.compose)([l,(0,Y0.assocPath)(`formPlacement.${t}.tags`,e.target.value),(0,Y0.cond)([[()=>!!e.target.value.length,(0,Y0.compose)([(0,Y0.assocPath)(`formPlacement.${t}.pages.all`,!1),(0,Y0.assocPath)(`formPlacement.${t}.posts.all`,!1)])],[()=>!e.target.value.length,Y0.identity]])])(n)},field:{id:`${c}tags`,name:"tags",values:r,multiple:!0,placeholder:SQ.Z.I18n.t("selectPage"),getLabel:e=>e.name,selected:()=>n.formPlacement[t].tags}})})]})]})},Q0=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:t}=(0,ur.Z)("mailpoet-form-editor"),n=e.formPlacement.belowPosts.enabled;return(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("p",{children:SQ.Z.I18n.t("placeFormBellowPagesDescription")}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("enable"),checked:n,onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.belowPosts.enabled",Y0.__,e)])}),n&&(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(X0,{label:SQ.Z.I18n.t("formSettingsWidth"),value:e.formPlacement.belowPosts.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:560,defaultPercentValue:100,onChange:n=>t((0,Y0.assocPath)("formPlacement.belowPosts.styles.width",n,e))}),(0,TQ.jsx)(J0,{settingsPlacementKey:"belowPosts"})]})]})},e1=function(e){let{settingsPlacementKey:t}=e;const n=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:r}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("animationHeader"),value:n.formPlacement[t].animation,options:[{label:SQ.Z.I18n.t("animationNone"),value:"none"},{label:"Fade In",value:"fadein"},{label:"Slide Right",value:"slideright"},{label:"Slide Left",value:"slideleft"},{label:"Slide Up",value:"slideup"},{label:"Slide Down",value:"slidedown"},{label:"Zoom Out",value:"zoomout"},{label:"Zoom In",value:"zoomin"},{label:"Flip",value:"flip"}],onChange:(0,Y0.compose)([r,(0,Y0.assocPath)(`formPlacement.${t}.animation`,Y0.__,n)])})},t1=function(e){let{settingsPlacementKey:t}=e;const n=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:r}=(0,ur.Z)("mailpoet-form-editor");return(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("formPlacementCookieExpiration"),value:n.formPlacement[t].cookieExpiration,options:[{value:0,label:SQ.Z.I18n.t("formPlacementCookieExpirationAlways")},{value:1,label:SQ.Z.I18n.t("formPlacementCookieExpirationDay")},...[3,7,14,30,60,90].map((e=>({value:e,label:SQ.Z.I18n.t("formPlacementCookieExpirationDays").replace("%1s",e.toString())})))],onChange:(0,Y0.compose)([r,(0,Y0.assocPath)(`formPlacement.${t}.cookieExpiration`,Y0.__,n)])})};const n1=[0,2,5,10,15,30,45,60,120,180,240];var r1=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:t}=(0,ur.Z)("mailpoet-form-editor"),n=e.formPlacement.popup.enabled;return(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("p",{children:SQ.Z.I18n.t("placePopupFormOnPagesDescription")}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("enable"),checked:n,onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.popup.enabled",Y0.__,e)])}),n&&(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("hr",{}),(0,TQ.jsx)(X0,{label:SQ.Z.I18n.t("formSettingsWidth"),value:e.formPlacement.popup.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:560,defaultPercentValue:100,onChange:n=>t((0,Y0.assocPath)("formPlacement.popup.styles.width",n,e))}),(0,TQ.jsx)(J0,{settingsPlacementKey:"popup"}),(0,TQ.jsx)(e1,{settingsPlacementKey:"popup"}),(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("formPlacementDelay"),value:e.formPlacement.popup.delay,onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.popup.delay",Y0.__,e)]),options:n1.map((e=>({value:e,label:SQ.Z.I18n.t("formPlacementDelaySeconds").replace("%1s",`${e}`)})))}),(0,TQ.jsx)(t1,{settingsPlacementKey:"popup"}),(0,TQ.jsxs)("div",{children:[(0,TQ.jsx)("p",{children:(0,TQ.jsx)("b",{children:SQ.Z.I18n.t("exitIntentTitle")})}),(0,TQ.jsx)("p",{children:SQ.Z.I18n.t("exitIntentDescription")}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("exitIntentSwitch"),checked:e.formPlacement.popup.exitIntentEnabled,onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.popup.exitIntentEnabled",Y0.__,e)])})]})]})]})},o1=n(27273),i1=n.n(o1),a1=function(){const[e,t]=(0,_.useState)(null),n=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormExports()),[]),r=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),o=(0,cr.Z)((e=>e("mailpoet-form-editor").isFormSaved()),[]),{changeFormSettings:i}=(0,ur.Z)("mailpoet-form-editor"),a=i1()(SQ.Z.I18n.t("addFormWidgetHint"),/\[link](.*?)\[\/link]/g,(e=>(0,TQ.jsx)("a",{href:"widgets.php",target:"_blank",children:e},"addFormWidgetHintLink"))),s=i1()(SQ.Z.I18n.t("addFormShortcodeHint"),/\[shortcode]/g,(e=>(0,TQ.jsx)("code",{children:n.shortcode},e))),l=(0,Ee.curry)(((e,r)=>(r.preventDefault(),SQ.Z.trackEvent("Forms > Embed",{"Embed type":e}),t("php"===e?n.php:n.iframe)))),c=i1()(SQ.Z.I18n.t("addFormPhpIframeHint"),/\[link](.*?)\[\/link]/g,(e=>"PHP"===e?(0,TQ.jsx)("a",{href:"#",onClick:l("php"),children:e},"exportPHP"):(0,TQ.jsx)("a",{href:"#",onClick:l("iframe"),children:e},"exportIframe")));return o?(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("p",{children:a}),(0,TQ.jsx)("p",{children:s}),(0,TQ.jsx)("p",{children:c}),e?(0,TQ.jsx)($Q,{readOnly:!0,onClick:e=>e.target.select(),rows:8,value:e},"copyTextArea"):null,(0,TQ.jsx)("hr",{}),(0,TQ.jsx)(X0,{label:SQ.Z.I18n.t("formSettingsWidth"),value:r.formPlacement.others.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:200,defaultPercentValue:100,onChange:e=>i((0,Y0.assocPath)("formPlacement.others.styles.width",e,r))})]}):(0,TQ.jsx)("p",{children:SQ.Z.I18n.t("saveFormFirst")})};const s1=[0,2,5,10,15,30,45,60,120,180,240];var l1=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:t}=(0,ur.Z)("mailpoet-form-editor"),n=e.formPlacement.fixedBar.enabled;return(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("p",{children:SQ.Z.I18n.t("placeFixedBarFormOnPagesDescription")}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("enable"),checked:n,onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.fixedBar.enabled",Y0.__,e)])}),n&&(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("hr",{}),(0,TQ.jsx)(HQ,{label:SQ.Z.I18n.t("formPlacementPlacementPosition"),selected:e.formPlacement.fixedBar.position,options:[{label:SQ.Z.I18n.t("formPlacementPlacementPositionTop"),value:"top"},{label:SQ.Z.I18n.t("formPlacementPlacementPositionBottom"),value:"bottom"}],onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.fixedBar.position",Y0.__,e)])}),(0,TQ.jsx)(X0,{label:SQ.Z.I18n.t("formSettingsWidth"),value:e.formPlacement.fixedBar.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:560,defaultPercentValue:100,onChange:n=>t((0,Y0.assocPath)("formPlacement.fixedBar.styles.width",n,e))}),(0,TQ.jsx)(J0,{settingsPlacementKey:"fixedBar"}),(0,TQ.jsx)(e1,{settingsPlacementKey:"fixedBar"}),(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("formPlacementDelay"),value:e.formPlacement.fixedBar.delay,onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.fixedBar.delay",Y0.__,e)]),options:s1.map((e=>({value:e,label:SQ.Z.I18n.t("formPlacementDelaySeconds").replace("%1s",`${e}`)})))}),(0,TQ.jsx)(t1,{settingsPlacementKey:"fixedBar"})]})]})};const c1=[0,2,5,10,15,30,45,60,120,180,240];var u1=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),{changeFormSettings:t}=(0,ur.Z)("mailpoet-form-editor"),n=e.formPlacement.slideIn.enabled;return(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("p",{children:SQ.Z.I18n.t("placeSlideInFormOnPagesDescription")}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("enable"),checked:n,onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.slideIn.enabled",Y0.__,e)])}),n&&(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("hr",{}),(0,TQ.jsx)(HQ,{label:SQ.Z.I18n.t("formPlacementPlacementPosition"),selected:e.formPlacement.slideIn.position,options:[{label:SQ.Z.I18n.t("formPlacementPlacementPositionLeft"),value:"left"},{label:SQ.Z.I18n.t("formPlacementPlacementPositionRight"),value:"right"}],onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.slideIn.position",Y0.__,e)])}),(0,TQ.jsx)(X0,{label:SQ.Z.I18n.t("formSettingsWidth"),value:e.formPlacement.slideIn.styles.width,minPixels:200,maxPixels:1200,minPercents:10,maxPercents:100,defaultPixelValue:560,defaultPercentValue:100,onChange:n=>t((0,Y0.assocPath)("formPlacement.slideIn.styles.width",n,e))}),(0,TQ.jsx)(J0,{settingsPlacementKey:"slideIn"}),(0,TQ.jsx)(e1,{settingsPlacementKey:"slideIn"}),(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("formPlacementDelay"),value:e.formPlacement.slideIn.delay,onChange:(0,Y0.compose)([t,(0,Y0.assocPath)("formPlacement.slideIn.delay",Y0.__,e)]),options:c1.map((e=>({value:e,label:SQ.Z.I18n.t("formPlacementDelaySeconds").replace("%1s",`${e}`)})))}),(0,TQ.jsx)(t1,{settingsPlacementKey:"slideIn"})]})]})},d1=function(e){let{activePanel:t}=e;return(0,TQ.jsxs)("div",{className:"mailpoet-styles-settings",children:["others"===t&&(0,TQ.jsx)(a1,{}),"below_post"===t&&(0,TQ.jsx)(Q0,{}),"fixed_bar"===t&&(0,TQ.jsx)(l1,{}),"popup"===t&&(0,TQ.jsx)(r1,{}),"slide_in"===t&&(0,TQ.jsx)(u1,{})]})};function p1(e){let{onClose:t}=e;const n=(0,cr.Z)((e=>e("mailpoet-form-editor").getPreviewSettings()),[]);return(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(q0,{closeSidebar:t,children:(0,TQ.jsxs)("h3",{className:"mailpoet-sidebar-header-heading",children:["others"===n.formType&&SQ.Z.I18n.t("placeFormOthers"),"below_post"===n.formType&&SQ.Z.I18n.t("placeFormBellowPages"),"fixed_bar"===n.formType&&SQ.Z.I18n.t("placeFixedBarFormOnPages"),"popup"===n.formType&&SQ.Z.I18n.t("placePopupFormOnPages"),"slide_in"===n.formType&&SQ.Z.I18n.t("placeSlideInFormOnPages")]})}),(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{children:(0,TQ.jsx)(d1,{activePanel:n.formType})})})]})}function f1(){const{toggleSidebar:e,changeActiveSidebar:t}=(0,ur.Z)("mailpoet-form-editor"),n=(0,cr.Z)((e=>e("mailpoet-form-editor").getActiveSidebar()),[]),r=(0,cr.Z)((e=>e("core/block-editor").getSelectedBlockClientId()),[]);return(0,_.useEffect)((()=>{r&&t("default")}),[r,t]),(0,TQ.jsxs)("div",{className:"edit-post-sidebar interface-complementary-area mailpoet_form_editor_sidebar",children:["default"===n&&(0,TQ.jsx)(K0,{onClose:()=>e(!1)}),"placement_settings"===n&&(0,TQ.jsx)(p1,{onClose:()=>{t("default")}})]})}var m1=function(e){var t,n;let{setIsInserterOpened:r}=e;const o=(0,cr.Z)((e=>e("mailpoet-form-editor").getInserterPanelInsertPoint()),[]);return(0,TQ.jsxs)("div",{className:"edit-post-editor__inserter-panel",children:[(0,TQ.jsx)("div",{className:"edit-post-editor__inserter-panel-header",children:(0,TQ.jsx)(ga,{icon:Oo,onClick:()=>r(!1)})}),(0,TQ.jsx)("div",{className:"edit-post-editor__inserter-panel-content",children:(0,TQ.jsx)(wQ,{showMostUsedBlocks:!0,showInserterHelpPanel:!1,rootClientId:null!==(t=o.rootClientId)&&void 0!==t?t:void 0,__experimentalInsertionIndex:null!==(n=o.insertionIndex)&&void 0!==n?n:void 0})})]})},h1=function(e){let{notices:t,onRemove:n=Ee.noop,className:r,children:o}=e;const i=e=>()=>n(e);return r=Lr()("components-notice-list",r),(0,_.createElement)("div",{className:r},o,[...t].reverse().map((e=>(0,_.createElement)(v$,(0,dr.Z)({},(0,Ee.omit)(e,["content"]),{key:e.id,onRemove:i(e.id)}),e.content))))};function g1(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getDismissibleNotices()),[]),t=(0,cr.Z)((e=>e("mailpoet-form-editor").getNonDismissibleNotices()),[]),{removeNotice:n}=(0,ur.Z)("mailpoet-form-editor"),r=(0,Ee.memoize)((e=>{setTimeout((()=>n(e)),5e3)}));return e.forEach((e=>r(e.id))),(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(h1,{notices:t,className:"components-editor-notices__pinned"}),(0,TQ.jsx)(h1,{notices:e,className:"components-editor-notices__dismissible automation-dismissible-notices",onRemove:n})]})}var v1=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").hasUnsavedChanges()),[]);function t(t){return e?(t.returnValue=SQ.Z.I18n.t("changesNotSaved"),t.returnValue):""}return(0,_.useEffect)((()=>(window.addEventListener("beforeunload",t),()=>window.removeEventListener("beforeunload",t)))),null},b1=n(70057),y1=()=>{const e=document.getElementById("mailpoet-form-editor-form-styles"),t=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormStyles()),[]);try{b1.parse(t)}catch(t){return S().createPortal(null,e)}const n=cP([{css:t}],".editor-styles-wrapper");return S().createPortal(n[0],e)};function w1(){return(0,TQ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"16px",height:"24px",viewBox:"0 0 16 24",version:"1.1",children:(0,TQ.jsx)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,TQ.jsx)("g",{className:"mailpoet_preview_icon_fill",transform:"translate(-760.000000, -64.000000)",fillRule:"nonzero",children:(0,TQ.jsx)("g",{transform:"translate(712.000000, 64.000000)",children:(0,TQ.jsx)("g",{transform:"translate(48.000000, 0.000000)",children:(0,TQ.jsx)("path",{d:"M16,3 C16,1.34314575 14.6568542,0 13,0 L3,0 C1.34314575,0 0,1.34314575 0,3 L0,21 C0,22.6568542 1.34314575,24 3,24 L13,24 C14.6568542,24 16,22.6568542 16,21 L16,3 Z M14,5.5 L14,17.5 C14,18.0522847 13.5522847,18.5 13,18.5 L3,18.5 C2.44771525,18.5 2,18.0522847 2,17.5 L2,5.5 C2,4.94771525 2.44771525,4.5 3,4.5 L13,4.5 C13.5522847,4.5 14,4.94771525 14,5.5 Z M7,21 C7,20.4477153 7.44771525,20 8,20 C8.55228475,20 9,20.4477153 9,21 C9,21.5522847 8.55228475,22 8,22 C7.44771525,22 7,21.5522847 7,21 Z",id:"Shape"})})})})})})}function k1(){return(0,TQ.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1",children:(0,TQ.jsx)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,TQ.jsx)("g",{className:"mailpoet_preview_icon_fill",transform:"translate(-712.000000, -64.000000)",fillRule:"nonzero",children:(0,TQ.jsx)("g",{transform:"translate(712.000000, 64.000000)",children:(0,TQ.jsx)("g",{children:(0,TQ.jsx)("path",{d:"M13.965,20.5 C14.1138804,20.5 14.2550143,20.5663566 14.35,20.681 L14.35,20.681 L16.449,23.213 C16.5561084,23.3657981 16.5692196,23.5655248 16.4830056,23.7310137 C16.3967915,23.8965027 16.2255996,24.0002137 16.039,24 L16.039,24 L7.96,24 C7.7734004,24.0002137 7.60220849,23.8965027 7.51599443,23.7310137 C7.42978036,23.5655248 7.44289164,23.3657981 7.55,23.213 L7.55,23.213 L9.65,20.681 C9.74498572,20.5663566 9.88611956,20.5 10.035,20.5 L10.035,20.5 Z M22.5,-4.08562073e-14 C23.3284271,-4.08562073e-14 24,0.671572875 24,1.5 L24,1.5 L24,17.5 C24,18.3284271 23.3284271,19 22.5,19 L22.5,19 L1.5,19 C0.671572875,19 0,18.3284271 0,17.5 L0,17.5 L0,1.5 C0,0.671572875 0.671572875,-4.08562073e-14 1.5,-4.08562073e-14 L1.5,-4.08562073e-14 Z M21.5,2 L2.5,2 C2.22385763,2 2,2.22385763 2,2.5 L2,2.5 L2,14.5 C2,14.7761424 2.22385763,15 2.5,15 L2.5,15 L21.5,15 C21.7761424,15 22,14.7761424 22,14.5 L22,14.5 L22,2.5 C22,2.22385763 21.7761424,2 21.5,2 L21.5,2 Z"})})})})})})}function x1(e){let{children:t,onDisplayTypeChange:n,selectedDisplayType:r}=e;const[o,i]=(0,_.useState)(r),a=e=>{i(e),n(e)};return(0,TQ.jsxs)("div",{className:"mailpoet_browser_preview",children:[(0,TQ.jsxs)("div",{className:"mailpoet_browser_preview_toggle",children:[(0,TQ.jsx)("a",{className:Lr()("mailpoet_browser_preview_icon",{mailpoet_active:"desktop"===o}),onClick:e=>{e.preventDefault(),a("desktop")},title:SQ.Z.I18n.t("formPreviewDesktop"),href:"#","data-automation-id":"preview_type_desktop",children:(0,TQ.jsx)(k1,{})}),(0,TQ.jsx)("a",{className:Lr()("mailpoet_browser_preview_icon",{mailpoet_active:"mobile"===o}),onClick:e=>{e.preventDefault(),a("mobile")},title:SQ.Z.I18n.t("formPreviewMobile"),href:"#","data-automation-id":"preview_type_mobile",children:(0,TQ.jsx)(w1,{})})]}),(0,TQ.jsx)("div",{className:Lr()("mailpoet_browser_preview_container",{mailpoet_browser_preview_container_mobile:"desktop"!==o},{mailpoet_browser_preview_container_desktop:"desktop"===o}),children:(0,TQ.jsx)("div",{className:"mailpoet_browser_preview_border",children:t})}),"desktop"!==o&&(0,TQ.jsx)("p",{className:"mailpoet_form_preview_disclaimer",children:SQ.Z.I18n.t("formPreviewMobileDisclaimer")})]})}x1.propTypes={children:O$().node.isRequired,onDisplayTypeChange:O$().func,selectedDisplayType:O$().string},x1.defaultProps={onDisplayTypeChange:()=>{},selectedDisplayType:"desktop"};var _1=x1,E1=function(){const e=(0,_.useRef)(null),[t,n]=(0,_.useState)(!1),{hidePreview:r,changePreviewSettings:o}=(0,ur.Z)("mailpoet-form-editor"),i=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsPreviewShown()),[]),a=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsPreviewReady()),[]),s=(0,cr.Z)((e=>e("mailpoet-form-editor").getPreviewSettings()),[]),l=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),c=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormData().id),[]),u=(0,cr.Z)((e=>e("mailpoet-form-editor").getEditorUrl()),[]),d=(0,cr.Z)((e=>e("mailpoet-form-editor").getPreviewPageUrl()),[]);(0,_.useEffect)((()=>{n(!1);const e=document.getElementById("beacon-container");i&&e&&(e.style.display="none")}),[i]),(0,_.useEffect)((()=>{if(!e.current||!t)return;const n={formType:s.formType,formSettings:l};e.current.contentWindow.postMessage(n,d)}),[l,e,s,t,d]);const p=(0,_.useCallback)((()=>{const e=document.getElementById("beacon-container");e&&(e.style.display="block"),r()}),[r]),f=(0,_.useCallback)((e=>{n(!1),o({...s,formType:e})}),[o,s]),m=(0,_.useCallback)((e=>{o({...s,displayType:e})}),[o,s]);if(!i)return null;const h={id:c,form_type:s.formType,editor_url:u};let g=`${d}&data=${btoa(JSON.stringify(h))}`;return["below_post"].includes(s.formType)&&(g+=`#mailpoet_form_preview_${c}`),(0,TQ.jsxs)(DQ.Z,{onRequestClose:p,fullScreen:!0,contentClassName:"mailpoet_form_preview_modal",overlayClassName:"mailpoet_form_preview_modal_overlay",children:[!a&&(0,TQ.jsx)("div",{className:"mailpoet_spinner_wrapper",children:(0,TQ.jsx)(nX,{})}),a&&(0,TQ.jsxs)("div",{className:"mailpoet_preview_content_wrapper",children:[(0,TQ.jsxs)("div",{className:"mailpoet_preview_sidebar",children:[(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("formPlacementLabel"),value:s.formType,onChange:f,className:"mailpoet_preview_form_type_selection","data-automation-id":"form_type_selection",options:[{value:"others",label:SQ.Z.I18n.t("placeFormOthers")},{value:"below_post",label:SQ.Z.I18n.t("placeFormBellowPages")},{value:"fixed_bar",label:SQ.Z.I18n.t("placeFixedBarFormOnPages")},{value:"popup",label:SQ.Z.I18n.t("placePopupFormOnPages")},{value:"slide_in",label:SQ.Z.I18n.t("placeSlideInFormOnPages")}]}),(0,TQ.jsx)(d1,{activePanel:s.formType})]}),(0,TQ.jsxs)(_1,{onDisplayTypeChange:m,selectedDisplayType:s.displayType,children:[!t&&(0,TQ.jsx)("div",{className:"mailpoet_spinner_wrapper",children:(0,TQ.jsx)(nX,{})}),(0,TQ.jsx)("iframe",{ref:e,className:"mailpoet_form_preview_iframe",src:g,title:SQ.Z.I18n.t("formPreview"),onLoad:()=>n(!0),"data-automation-id":"form_preview_iframe",scrolling:"others"===s.formType?"no":"yes"}),"others"===s.formType&&"desktop"===s.displayType&&(0,TQ.jsx)("div",{className:"mailpoet_form_preview_disclaimer",children:SQ.Z.I18n.t("formPreviewOthersDisclaimer")})]})]})]})};function C1(e){let{children:t}=e;const{fontColor:n,backgroundColor:r,gradient:o,fontSize:i,borderRadius:a,borderSize:s,borderColor:l,alignment:c,formPadding:u,backgroundImageUrl:d,backgroundImageDisplay:p,fontFamily:f}=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),m=(0,cr.Z)((e=>e("mailpoet-form-editor").getPreviewSettings()),[]),h=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormWidth(m.formType)),[m.formType]);let g;s&&l&&(g="solid");let v,b,y,w="";i&&(w=Number(i)),a&&(v=Number(a)),u&&(b=Number(u)),c&&(y=c);const k=[],x={color:n,fontSize:w,fontFamily:f,lineHeight:1.2,borderRadius:v,borderWidth:s,borderColor:l,borderStyle:g,textAlign:y,padding:b,width:"pixel"===h.unit?h.value:`${h.value}%`,margin:"0 auto",maxWidth:"100%"};if(["others","below_post"].includes(m.formType)&&"percent"===h.unit&&(x.maxWidth=600),void 0!==d&&d){let e="center",t="no-repeat",n="cover";"fit"===p&&(n="auto",e="center top"),"tile"===p&&(t="repeat",n="auto"),k.push(`url(${d}) ${e}/${n} ${t}`)}if(o&&k.push(o),r&&k.push(r),k.length&&(x.background=k.join(", ")),"fixed_bar"===m.formType){const e={width:x.width,margin:"0 auto"};return x.width="max-content",x.minWidth="100%",x.maxWidth="auto",(0,TQ.jsx)("div",{className:"mailpoet-form-background",style:x,children:(0,TQ.jsx)("div",{style:e,children:t})})}return(0,TQ.jsx)("div",{className:"mailpoet-form-background",style:x,children:t})}C1.propTypes={children:O$().node.isRequired};var S1=C1,I1=function(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").isFullscreenEnabled()),[]);return(0,_.useEffect)((()=>{e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}),[e]),null};function T1(){const e=(0,cr.Z)((e=>e("mailpoet-form-editor").getSidebarOpened()),[]),t=(0,cr.Z)((e=>e("mailpoet-form-editor").isInserterOpened()),[]),n=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormBlocks()),[]),r=(0,cr.Z)((e=>e("core").canUser("create","media")),[]),o=(0,cr.Z)((e=>e("core/block-editor").getSelectedBlock()),[]),i=Lr()("edit-post-layout interface-interface-skeleton",o?o.name.replace("/","-"):null,{"is-sidebar-opened":e}),{blocksChangedInBlockEditor:a,toggleInserter:s}=(0,ur.Z)("mailpoet-form-editor"),l={mediaUpload:r?Za:null,maxWidth:580,enableCustomSpacing:!0,enableCustomLineHeight:!0,disableCustomFontSizes:!1,enableCustomUnits:!0,__experimentalFetchLinkSuggestions:IQ,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSetIsInserterOpened:s,__experimentalFeatures:{color:{custom:!0,text:!0,background:!0,customGradient:!0,defaultPalette:!0,palette:{default:Yf.colors},gradients:{default:Yf.gradients}}}};return(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(_0,{}),(0,TQ.jsx)(DA,{children:(0,TQ.jsx)(Ar,{children:(0,TQ.jsxs)("div",{className:i,children:[(0,TQ.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,TQ.jsx)("div",{className:"interface-interface-skeleton__header",children:(0,TQ.jsx)(MQ,{isInserterOpened:t,setIsInserterOpened:s})}),(0,TQ.jsx)("div",{className:"interface-interface-skeleton__body",children:(0,TQ.jsxs)(YN,{value:n,onInput:a,onChange:a,settings:l,useSubRegistry:!1,children:[t&&(0,TQ.jsx)("div",{className:"interface-interface-skeleton__secondary-sidebar",children:(0,TQ.jsx)(m1,{setIsInserterOpened:s})}),(0,TQ.jsxs)("div",{className:"interface-interface-skeleton__content",children:[(0,TQ.jsx)(yQ,{}),(0,TQ.jsx)(g1,{}),(0,TQ.jsx)(v1,{}),(0,TQ.jsxs)(aA,{className:"edit-post-visual-editor editor-styles-wrapper",children:[(0,TQ.jsx)(xQ,{}),(0,TQ.jsx)(xQ.Register,{}),(0,TQ.jsx)("div",{className:"mailpoet_form",children:(0,TQ.jsx)(jA,{children:(0,TQ.jsx)(CQ,{children:(0,TQ.jsx)(S1,{children:(0,TQ.jsx)(JH,{})})})})})]})]}),e&&(0,TQ.jsx)("div",{className:"interface-interface-skeleton__sidebar",children:(0,TQ.jsx)(f1,{})})]})}),(0,TQ.jsx)(y1,{}),(0,TQ.jsx)(I1,{})]}),(0,TQ.jsx)(Na.Slot,{})]})})}),(0,TQ.jsx)(E1,{}),(0,TQ.jsx)(FQ,{})]})}const N1=e=>{const t={full_width:e.fullWidth?"1":"0"};return e.inheritFromTheme||(t.bold=e.bold?"1":"0",(0,Ee.has)(e,"backgroundColor")&&e.backgroundColor&&(t.background_color=e.backgroundColor),(0,Ee.has)(e,"gradient")&&e.gradient&&(t.gradient=e.gradient),(0,Ee.has)(e,"fontSize")&&void 0!==e.fontSize&&(t.font_size=e.fontSize),(0,Ee.has)(e,"fontColor")&&e.fontColor&&(t.font_color=e.fontColor),(0,Ee.has)(e,"borderSize")&&void 0!==e.borderSize&&(t.border_size=e.borderSize),(0,Ee.has)(e,"borderRadius")&&void 0!==e.borderRadius&&(t.border_radius=e.borderRadius),(0,Ee.has)(e,"borderColor")&&e.borderColor&&(t.border_color=e.borderColor),(0,Ee.has)(e,"padding")&&void 0!==e.padding&&(t.padding=e.padding),(0,Ee.has)(e,"fontFamily")&&e.fontFamily&&(t.font_family=e.fontFamily)),t},A1=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=e.find((e=>e.slug===t));return r?r.color:n},P1=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=e.find((e=>e.slug===t));return r?r.gradient:n},R1=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=e.find((e=>e.slug===t));return r?r.size:n};var L1=(e,t,n,r)=>{if(!Array.isArray(r))throw new Error("Mapper expects customFields to be an array.");const o=i=>{if(!Array.isArray(i))throw new Error("Mapper expects blocks to be an array.");return i.map((i=>{const a={type:"text",params:{label:i.attributes.label,class_name:i.attributes.className||null}};switch(i.attributes.mandatory&&(a.params.required="1"),i.attributes.labelWithinInput&&(a.params.label_within="1"),i.name){case"core/heading":return{type:"heading",id:"heading",params:{content:i.attributes.content,level:i.attributes.level,align:i.attributes.textAlign||"left",font_size:R1(e,i.attributes.fontSize,i.attributes.style?.typography?.fontSize),text_color:A1(t,i.attributes.textColor,i.attributes.style?.color?.text),line_height:i.attributes.style?.typography?.lineHeight,background_color:A1(t,i.attributes.backgroundColor,i.attributes.style?.color?.background),anchor:i.attributes.anchor||null,class_name:i.attributes.className||null}};case"core/paragraph":return{type:"paragraph",id:"paragraph",params:{content:i.attributes.content,drop_cap:i.attributes.dropCap?"1":"0",align:i.attributes.align||"left",font_size:R1(e,i.attributes.fontSize,i.attributes.style?.typography?.fontSize),line_height:i.attributes.style?.typography?.lineHeight,text_color:A1(t,i.attributes.textColor,i.attributes.style?.color?.text),background_color:A1(t,i.attributes.backgroundColor,i.attributes.style?.color?.background),class_name:i.attributes.className||null}};case"core/image":return{type:"image",id:"image",params:{class_name:i.attributes.className||null,align:i.attributes.align||null,url:i.attributes.url||null,alt:i.attributes.alt||null,title:i.attributes.title||null,caption:i.attributes.caption||null,link_destination:i.attributes.linkDestination||null,link:i.attributes.link||null,href:i.attributes.href||null,link_class:i.attributes.linkClass||null,rel:i.attributes.rel||null,link_target:i.attributes.linkTarget||null,id:i.attributes.id||null,size_slug:i.attributes.sizeSlug||null,width:i.attributes.width||null,height:i.attributes.height||null}};case"core/column":return{type:"column",body:o(i.innerBlocks),params:{class_name:i.attributes.className||null,vertical_alignment:i.attributes.verticalAlignment||null,width:i.attributes.width||null,padding:i.attributes.style?.spacing?.padding||null,text_color:A1(t,i.attributes.textColor,i.attributes.style?.color?.text),background_color:A1(t,i.attributes.backgroundColor,i.attributes.style?.color?.background),gradient:P1(n,i.attributes.gradient,i.attributes.style?.color?.gradient)}};case"core/columns":return{type:"columns",body:o(i.innerBlocks),params:{vertical_alignment:i.attributes.verticalAlignment||null,is_stacked_on_mobile:i.attributes.isStackedOnMobile||void 0===i.attributes.isStackedOnMobile?"1":"0",class_name:i.attributes.className||null,padding:i.attributes.style?.spacing?.padding||null,text_color:A1(t,i.attributes.textColor,i.attributes.style?.color?.text),background_color:A1(t,i.attributes.backgroundColor,i.attributes.style?.color?.background),gradient:P1(n,i.attributes.gradient,i.attributes.style?.color?.gradient)}};case"mailpoet-form/email-input":return{...a,id:"email",name:"Email",params:{...a.params,required:"1"},styles:N1(i.attributes.styles)};case"mailpoet-form/first-name-input":return{...a,id:"first_name",name:"First name",styles:N1(i.attributes.styles)};case"mailpoet-form/last-name-input":return{...a,id:"last_name",name:"Last name",styles:N1(i.attributes.styles)};case"mailpoet-form/segment-select":return{...a,id:"segments",type:"segment",name:"List selection",params:{...a.params,values:i.attributes.values.map((e=>({id:e.id,is_checked:e.isChecked?"1":void 0})))}};case"mailpoet-form/submit-button":return{...a,id:"submit",type:"submit",name:"Submit",styles:N1(i.attributes.styles)};case"mailpoet-form/divider":return{...a,id:"divider",type:"divider",name:"Divider",params:{class_name:i.attributes.className||null,height:i.attributes.height,type:i.attributes.type,style:i.attributes.style,divider_height:i.attributes.dividerHeight,divider_width:i.attributes.dividerWidth,color:i.attributes.color}};case"mailpoet-form/html":return{...a,id:"html",type:"html",name:"Custom text or HTML",params:{text:i.attributes&&i.attributes.content?i.attributes.content:"",nl2br:i.attributes&&i.attributes.nl2br?"1":"0",class_name:i.attributes.className||null}};default:return i.name.startsWith("mailpoet-form/custom-")?((e,t,n)=>{const r=t.find((t=>t.id===e.attributes.customFieldId));if(!r)return null;const o={...n,id:e.attributes.customFieldId.toString(),name:r.name};return e.name.startsWith("mailpoet-form/custom-date")&&(o.type="date"),e.name.startsWith("mailpoet-form/custom-text")&&(o.type="text",o.styles=N1(e.attributes.styles)),e.name.startsWith("mailpoet-form/custom-textarea")&&(o.type="textarea",o.styles=N1(e.attributes.styles)),e.name.startsWith("mailpoet-form/custom-radio")&&(o.type="radio"),e.name.startsWith("mailpoet-form/custom-checkbox")&&(o.type="checkbox"),e.name.startsWith("mailpoet-form/custom-select")&&(o.type="select"),(0,Ee.has)(e.attributes,"validate")&&(o.params.validate=e.attributes.validate),(0,Ee.has)(e.attributes,"hideLabel")&&e.attributes.hideLabel&&(o.params.hide_label="1"),(0,Ee.has)(e.attributes,"defaultToday")&&e.attributes.defaultToday&&(o.params.is_default_today="1"),(0,Ee.has)(e.attributes,"dateType")&&(o.params.date_type=e.attributes.dateType),(0,Ee.has)(e.attributes,"lines")&&(o.params.lines=e.attributes.lines),(0,Ee.has)(e.attributes,"dateFormat")&&(o.params.date_format=e.attributes.dateFormat),(0,Ee.has)(e.attributes,"values")&&(o.params.values=e.attributes.values.map((e=>{const t={value:e.name};return(0,Ee.has)(e,"isChecked")&&e.isChecked&&(t.is_checked="1"),t}))),o})(i,r,a):null}})).filter(Boolean)};return o};function O1(e){var t,n,r,o,i,a,s,l;const c={...e,settings:{...e.settings,form_placement:{popup:{enabled:!0===e.settings.formPlacement?.popup?.enabled?"1":"",exit_intent_enabled:e.settings.formPlacement?.popup?.exitIntentEnabled?"1":"",delay:e.settings.formPlacement?.popup?.delay,cookieExpiration:e.settings.formPlacement?.popup?.cookieExpiration,styles:e.settings.formPlacement?.popup?.styles,animation:e.settings.formPlacement?.popup?.animation,categories:null!==(t=e.settings.formPlacement?.popup?.categories)&&void 0!==t?t:[],tags:null!==(n=e.settings.formPlacement?.popup?.tags)&&void 0!==n?n:[],posts:{all:!0===e.settings.formPlacement?.popup?.posts?.all?"1":"",selected:e.settings.formPlacement?.popup?.posts?.selected},pages:{all:!0===e.settings.formPlacement?.popup?.pages?.all?"1":"",selected:e.settings.formPlacement?.popup?.pages?.selected}},fixed_bar:{enabled:!0===e.settings.formPlacement?.fixedBar?.enabled?"1":"",delay:e.settings.formPlacement?.fixedBar?.delay,cookieExpiration:e.settings.formPlacement?.fixedBar?.cookieExpiration,styles:e.settings.formPlacement?.fixedBar?.styles,position:e.settings.formPlacement?.fixedBar?.position,animation:e.settings.formPlacement?.fixedBar?.animation,categories:null!==(r=e.settings.formPlacement?.fixedBar?.categories)&&void 0!==r?r:[],tags:null!==(o=e.settings.formPlacement?.fixedBar?.tags)&&void 0!==o?o:[],posts:{all:!0===e.settings.formPlacement?.fixedBar?.posts?.all?"1":"",selected:e.settings.formPlacement?.fixedBar?.posts?.selected},pages:{all:!0===e.settings.formPlacement?.fixedBar?.pages?.all?"1":"",selected:e.settings.formPlacement?.fixedBar?.pages?.selected}},below_posts:{enabled:!0===e.settings.formPlacement?.belowPosts?.enabled?"1":"",styles:e.settings.formPlacement?.belowPosts?.styles,categories:null!==(i=e.settings.formPlacement?.belowPosts?.categories)&&void 0!==i?i:[],tags:null!==(a=e.settings.formPlacement?.belowPosts?.tags)&&void 0!==a?a:[],posts:{all:!0===e.settings.formPlacement?.belowPosts?.posts?.all?"1":"",selected:e.settings.formPlacement?.belowPosts?.posts?.selected},pages:{all:!0===e.settings.formPlacement?.belowPosts?.pages?.all?"1":"",selected:e.settings.formPlacement?.belowPosts?.pages?.selected}},slide_in:{enabled:!0===e.settings.formPlacement?.slideIn?.enabled?"1":"",delay:e.settings.formPlacement?.slideIn?.delay,cookieExpiration:e.settings.formPlacement?.slideIn?.cookieExpiration,position:e.settings.formPlacement?.slideIn?.position,animation:e.settings.formPlacement?.slideIn?.animation,styles:e.settings.formPlacement?.slideIn?.styles,categories:null!==(s=e.settings.formPlacement?.slideIn?.categories)&&void 0!==s?s:[],tags:null!==(l=e.settings.formPlacement?.slideIn?.tags)&&void 0!==l?l:[],posts:{all:!0===e.settings.formPlacement?.slideIn?.posts?.all?"1":"",selected:e.settings.formPlacement?.slideIn?.posts?.selected},pages:{all:!0===e.settings.formPlacement?.slideIn?.pages?.all?"1":"",selected:e.settings.formPlacement?.slideIn?.pages?.selected}},others:{styles:e.settings.formPlacement?.others?.styles}},border_radius:e.settings.borderRadius,border_size:e.settings.borderSize,form_padding:e.settings.formPadding,input_padding:e.settings.inputPadding,border_color:e.settings.borderColor,font_family:e.settings.fontFamily,success_validation_color:e.settings.successValidationColor,error_validation_color:e.settings.errorValidationColor,background_image_url:e.settings.backgroundImageUrl,background_image_display:e.settings.backgroundImageDisplay,close_button:e.settings.closeButton}};return""===c.settings.font_family&&delete c.settings.font_family,delete c.settings.formPlacement,delete c.settings.successValidationColor,delete c.settings.errorValidationColor,delete c.settings.borderRadius,delete c.settings.borderSize,delete c.settings.formPadding,delete c.settings.inputPadding,delete c.settings.borderColor,delete c.settings.backgroundImageUrl,delete c.settings.backgroundImageDisplay,delete c.settings.fontFamily,delete c.settings.closeButton,c}function M1(e){return{type:"TOGGLE_SIDEBAR",toggleTo:e}}function D1(e){return{type:"TOGGLE_INSERTER_SIDEBAR",value:e}}function B1(e){return e?{type:"ENABLE_FORM"}:{type:"DISABLE_FORM"}}function*F1(e){yield{type:"STORE_LOCALLY",key:"mailpoet_form_view_options",value:e},yield{type:"TOGGLE_FULLSCREEN",toggleTo:e}}function j1(e){return{type:"CHANGE_FORM_BLOCKS",blocks:e}}function z1(e){return{type:"CHANGE_FORM_NAME",name:e}}function H1(){return{type:"DELETE_CUSTOM_FIELD_STARTED"}}function V1(e,t){return{type:"DELETE_CUSTOM_FIELD_DONE",customFieldId:e,clientId:t}}function W1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return{type:"DELETE_CUSTOM_FIELD_FAILED",message:e}}function Z1(e){return{type:"CHANGE_FORM_STYLES",styles:e}}function U1(){return{type:"CUSTOM_FIELD_EDITED"}}function $1(e,t){return{type:"SAVE_CUSTOM_FIELD_DONE",customFieldId:e,response:t}}function G1(){return{type:"SAVE_CUSTOM_FIELD_STARTED"}}function q1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return{type:"SAVE_CUSTOM_FIELD_FAILED",message:e}}function K1(e){return{type:"CREATE_CUSTOM_FIELD_DONE",response:e}}function Y1(e){return{type:"CREATE_CUSTOM_FIELD_STARTED",customField:e}}function X1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return{type:"CREATE_CUSTOM_FIELD_FAILED",message:e}}function J1(e){return{type:"CHANGE_FORM_SETTINGS",settings:e}}function*Q1(e){yield{type:"SAVE_FORM_DONE",formId:e},yield{type:"ENSURE_BROWSER_URL",formId:e}}function e2(){return{type:"SAVE_FORM_STARTED"}}function t2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return{type:"SAVE_FORM_FAILED",message:e}}function n2(e){return"placement_settings"===e&&(0,xe.WI)("core/block-editor").clearSelectedBlock(),{type:"CHANGE_ACTIVE_SIDEBAR",sidebar:e}}function*r2(e){const t=(0,xe.Ys)("mailpoet-form-editor").getFormData();null!==t.id&&(yield{type:"STORE_LOCALLY",key:`mailpoet_form_preview_settings${t.id}`,value:e}),yield{type:"CHANGE_PREVIEW_SETTINGS",settings:e}}function*o2(e){const t={...(0,xe.Ys)("mailpoet-form-editor").getPreviewSettings(),formType:e};return yield*r2(t),n2("placement_settings")}function*i2(){yield{type:"SHOW_PREVIEW"},yield n2("default");const e=(0,xe.Ys)("mailpoet-form-editor").getAllAvailableCustomFields(),t=(0,xe.Ys)("mailpoet-form-editor").getFormData(),n=(0,xe.Ys)("mailpoet-form-editor").getFormBlocks(),r=L1(Yf.fontSizes,Yf.colors,Yf.gradients,e),{success:o,error:i}=yield{type:"CALL_API",endpoint:"forms",action:"previewEditor",data:{...O1(t),body:r(n)}};return o?{type:"PREVIEW_DATA_SAVED"}:{type:"PREVIEW_DATA_NOT_SAVED",error:i}}function a2(){return{type:"HIDE_PREVIEW"}}function s2(e){return{type:"REMOVE_NOTICE",id:e}}function l2(e){return{type:"SWITCH_DEFAULT_SIDEBAR_TAB",id:e}}function c2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{type:"TOGGLE_SIDEBAR_PANEL",id:e,toggleTo:t}}function*u2(){yield{type:"SAVE_FORM"}}function*d2(e){yield{type:"SAVE_CUSTOM_FIELD",...e}}function*p2(e,t){yield{type:"CREATE_CUSTOM_FIELD",clientId:t,data:e}}function*f2(e,t){yield{type:"DELETE_CUSTOM_FIELD",customFieldId:e,clientId:t}}function*m2(e){yield{type:"BLOCKS_CHANGED_IN_BLOCK_EDITOR",blocks:e}}function*h2(e){yield{type:"APPLY_STYLES_TO_ALL_TEXT_INPUTS",styles:e}}function g2(){return{type:"HISTORY_UNDO"}}function v2(){return{type:"HISTORY_REDO"}}function*b2(){yield{type:"TUTORIAL_DISMISS"},yield{type:"TUTORIAL_DISMISSED"}}const y2=(e,t)=>e.reduce(((e,n)=>e||(n.name===t?n:Array.isArray(n.innerBlocks)&&n.innerBlocks.length?y2(n.innerBlocks,t):null)),null);var w2=y2,k2=(e,t)=>{if(!e||!e.settings||!Array.isArray(e.settings.segments))throw new Error("formData.settings.segments are expected to be an array.");if(!Array.isArray(t))throw new Error("formBlocks are expected to be an array.");const n=w2(t,"mailpoet-form/segment-select"),r=[];n&&0!==n.attributes.values.length||e.settings.segments&&0!==e.settings.segments.length||r.push("missing-lists"),n&&0===n.attributes.values.length&&r.push("missing-lists-in-custom-segments-block");const o=w2(t,"mailpoet-form/email-input"),i=w2(t,"mailpoet-form/submit-button");return o||r.push("missing-email-input"),i||r.push("missing-submit"),r};const x2=e=>{let t=e.editorHistory,n=e.editorHistoryOffset;const r=((e,t)=>{const n=e[e.length-1],r=Date.now();if(void 0!==n&&r-n.time<1e3&&e.length>1)return e.pop(),{blocks:t.formBlocks,data:t.formData,time:n.time};const o={blocks:t.formBlocks,data:t.formData,time:r};return void 0!==n&&(0,Ee.isEqual)(n.data,o.data)&&(0,Ee.isEqual)(n.blocks,o.blocks)?null:o})(t,e);if(null===r)return e;if(0!==e.editorHistoryOffset){const r=e.editorHistory.length-(e.editorHistoryOffset+1);n=0,t=t.slice(0,r)}return t.length>=100&&t.shift(),t.push(r),{...e,editorHistory:t,editorHistoryOffset:n}},_2=(e,t)=>{let n=e.editorHistoryOffset;0===n&&x2(e),n+=t;const r=e.editorHistory.length-(n+1);let o,i;if(void 0===e.editorHistory[r])return e;{const t=e.editorHistory[r];o=t.blocks,i=t.data}return{...e,editorHistoryOffset:n,formBlocks:o,formData:i}},E2=(C2=SQ.Z,(e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id)),r=(0,Ee.trim)(t.customField.name),o=e.customFields.find((e=>e.name===r));return o&&n.push({id:"custom-field",content:C2.I18n.t("customFieldWithNameExists").replace("[name]",r),isDismissible:!0,status:"error"}),{...e,isCustomFieldCreating:!o,notices:n}});var C2;const S2=(e=>t=>{const n=t.notices.filter((e=>!["missing-lists-in-custom-segments-block","save-form","missing-lists","missing-block"].includes(e.id))),r=t.formErrors.includes("missing-lists")||t.formErrors.includes("missing-lists-in-custom-segments-block"),o=[...t.sidebar.openedPanels];r&&(n.push({id:"missing-lists",content:e.I18n.t("settingsPleaseSelectList"),isDismissible:!0,status:"error"}),o.includes("basic-settings")||o.push("basic-settings"));const i=t.formErrors.includes("missing-email-input"),a=t.formErrors.includes("missing-submit");return(i||a)&&n.push({id:"missing-block",content:e.I18n.t("missingObligatoryBlock"),isDismissible:!0,status:"error"}),{...t,isFormSaving:!r,sidebar:{...t.sidebar,activeTab:r?"form":t.sidebar.activeTab,openedPanels:o},notices:n}})(SQ.Z),I2=(e,t)=>{switch(t.type){case"ENABLE_FORM":return(e=>({...e,formData:{...e.formData,hasUnsavedChanges:!0,status:"enabled"}}))(e);case"DISABLE_FORM":return(e=>({...e,formData:{...e.formData,hasUnsavedChanges:!0,status:"disabled"}}))(e);case"TOGGLE_FULLSCREEN":return((e,t)=>({...e,fullscreenStatus:t.toggleTo}))(e,t);case"CREATE_CUSTOM_FIELD_DONE":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));n.push({id:"custom-field",content:SQ.Z.I18n.t("customFieldSaved"),isDismissible:!0,status:"success"});const r=[...e.customFields];return r.push(t.response),{...e,isCustomFieldCreating:!1,notices:n,customFields:r}})(e,t);case"CREATE_CUSTOM_FIELD_FAILED":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));return n.push({id:"custom-field",content:t.message,isDismissible:!0,status:"error"}),{...e,isCustomFieldCreating:!1,notices:n}})(e,t);case"CREATE_CUSTOM_FIELD_STARTED":return E2(e,t);case"CHANGE_FORM_BLOCKS":return((e,t)=>{const n={...e,formBlocks:t.blocks};return{...n,hasUnsavedChanges:!0,formErrors:k2(n.formData,n.formBlocks)}})(e,t);case"CHANGE_FORM_NAME":return((e,t)=>({...e,formData:{...e.formData,hasUnsavedChanges:!0,name:t.name}}))(e,t);case"CHANGE_FORM_SETTINGS":return((e,t)=>{const n={...e,formData:{...e.formData,settings:t.settings}};return{...n,hasUnsavedChanges:!0,formErrors:k2(n.formData,n.formBlocks)}})(e,t);case"CHANGE_FORM_STYLES":return((e,t)=>({...e,formData:{...e.formData,styles:t.styles,hasUnsavedChanges:!0}}))(e,t);case"CHANGE_PREVIEW_SETTINGS":return((e,t)=>{let{settings:n}=t;return{...e,previewSettings:n}})(e,t);case"CUSTOM_FIELD_EDITED":return(e=>({...e,hasUnsavedChanges:!0}))(e);case"REMOVE_NOTICE":return((e,t)=>({...e,notices:[...e.notices].filter((e=>e.id!==t.id))}))(e,t);case"SHOW_PREVIEW":return(e=>({...e,isPreviewShown:!0}))(e);case"HIDE_PREVIEW":return(e=>({...e,isPreviewShown:!1,isPreviewReady:!1}))(e);case"PREVIEW_DATA_NOT_SAVED":return(e=>({...e,isPreviewReady:!1}))(e);case"PREVIEW_DATA_SAVED":return(e=>({...e,isPreviewReady:!0}))(e);case"SAVE_FORM_DONE":return((e,t)=>{const n=e.notices.filter((e=>"save-form"!==e.id));return n.push({id:"save-form",content:`${SQ.Z.I18n.t("formSaved")} ${SQ.Z.I18n.t("formSavedAppendix")}`,isDismissible:!0,status:"success"}),{...e,formData:{...e.formData,id:parseInt(t.formId,10)},isFormSaving:!1,hasUnsavedChanges:!1,notices:n}})(e,t);case"SAVE_FORM_FAILED":return((e,t)=>{const n=e.notices.filter((e=>"save-form"!==e.id));return n.push({id:"save-form",content:t.message,isDismissible:!0,status:"error"}),{...e,isFormSaving:!1,notices:n}})(e,t);case"SAVE_FORM_STARTED":return S2(e);case"SAVE_CUSTOM_FIELD_DONE":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));n.push({id:"custom-field",content:SQ.Z.I18n.t("customFieldSaved"),isDismissible:!0,status:"success"});const r=e.customFields.map((e=>e.id===t.customFieldId?t.response:e));return{...e,isCustomFieldSaving:!1,notices:n,customFields:r}})(e,t);case"SAVE_CUSTOM_FIELD_FAILED":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));return n.push({id:"custom-field",content:t.message,isDismissible:!0,status:"error"}),{...e,isCustomFieldSaving:!1,notices:n}})(e,t);case"SAVE_CUSTOM_FIELD_STARTED":return(e=>{const t=e.notices.filter((e=>"custom-field"!==e.id));return{...e,isCustomFieldSaving:!0,notices:t}})(e);case"SWITCH_DEFAULT_SIDEBAR_TAB":return((e,t)=>({...e,sidebar:{...e.sidebar,activeTab:t.id}}))(e,t);case"TOGGLE_SIDEBAR":return((e,t)=>({...e,sidebarOpened:t.toggleTo}))(e,t);case"TOGGLE_INSERTER_SIDEBAR":return((e,t)=>{let n;return n=t.value?!0===t.value?{rootClientId:void 0,insertionIndex:void 0}:t.value:null,{...e,inserterPanel:n}})(e,t);case"TOGGLE_SIDEBAR_PANEL":return((e,t)=>{let n;!0===t.toggleTo&&(n="opened"),!1===t.toggleTo&&(n="closed");const r=[...e.sidebar.openedPanels],o=((e,t,n)=>{const r=e.includes(t);let o=n;return void 0===o&&(o=r?"closed":"opened"),r&&"closed"===o?"close":r||"opened"!==o?null:"open"})(r,t.id,n);return"open"===o?r.push(t.id):"close"===o&&(0,Ee.remove)(r,(e=>e===t.id)),{...e,sidebar:{...e.sidebar,openedPanels:r}}})(e,t);case"DELETE_CUSTOM_FIELD_STARTED":return(e=>{const t=e.notices.filter((e=>"custom-field"!==e.id));return{...e,...t,isCustomFieldDeleting:!0}})(e);case"DELETE_CUSTOM_FIELD_DONE":return((e,t)=>{const n=e.customFields.filter((e=>e.id!==t.customFieldId)),r=e.formBlocks.filter((e=>e.clientId!==t.clientId));return{...e,formBlocks:r,isCustomFieldDeleting:!1,customFields:n}})(e,t);case"DELETE_CUSTOM_FIELD_FAILED":return((e,t)=>{const n=e.notices.filter((e=>"custom-field"!==e.id));return n.push({id:"custom-field",content:t.message,isDismissible:!0,status:"error"}),{...e,isCustomFieldSaving:!1,notices:n}})(e,t);case"CHANGE_ACTIVE_SIDEBAR":return((e,t)=>({...e,sidebar:{...e.sidebar,activeSidebar:t.sidebar}}))(e,t);case"HISTORY_UNDO":return(e=>_2(e,1))(e);case"HISTORY_REDO":return(e=>_2(e,-1))(e);case"TUTORIAL_DISMISSED":return(e=>({...e,tutorialSeen:!0}))(e);default:return e}},T2=(e,t)=>"CHANGE_FORM_BLOCKS"===t.type||"CHANGE_FORM_NAME"===t.type||"CHANGE_FORM_SETTINGS"===t.type||"CHANGE_FORM_STYLES"===t.type?x2(e):e;var N2=e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=arguments.length>1?arguments[1]:void 0;const r=T2(t,n);return I2(r,n)};const A2=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e.reduce(((e,r)=>e.length?e:Array.isArray(r.innerBlocks)&&r.innerBlocks.length?(n.push(r),r.innerBlocks.find((e=>e.clientId===t))?n:A2(r.innerBlocks,t,n)):[]),[])};var P2={isFormSaved:e=>"number"==typeof e.formData.id,isFormEnabled:e=>"enabled"===e.formData.status,isFullscreenEnabled:e=>e.fullscreenStatus,isInserterOpened:e=>!!e.inserterPanel,getInserterPanelInsertPoint:e=>e.inserterPanel,getSidebarOpened:e=>e.sidebarOpened,getFormName:e=>e.formData.name,getFormData:e=>e.formData,getFormStyles:e=>e.formData.styles,getFormExports:e=>Object.fromEntries(Object.entries(e.formExports).map((t=>{let[n,r]=t;return[n,r.replace(":form_id:",e.formData.id)]}))),getFormSettings:e=>e.formData.settings,getAllAvailableSegments:e=>e.segments,getAllAvailableCustomFields:e=>e.customFields,getAllAvailablePages:e=>e.allWpPages.map((e=>({id:e.id,title:e.name}))),getIsFormSaving:e=>e.isFormSaving,getIsPreviewShown:e=>e.isPreviewShown,getIsPreviewReady:e=>e.isPreviewReady,getPreviewSettings(e){if(e.previewSettings)return e.previewSettings;const t={displayType:"desktop",formType:"others"},n=e.formData.settings;return n.formPlacement.belowPosts.enabled&&(t.formType="below_post"),n.formPlacement.popup.enabled&&(t.formType="popup"),n.formPlacement.fixedBar.enabled&&(t.formType="fixed_bar"),n.formPlacement.slideIn.enabled&&(t.formType="slide_in"),t},getFormWidth(e,t){const n=e.formData.settings;switch(t){case"below_post":return n.formPlacement.belowPosts.styles.width;case"popup":return n.formPlacement.popup.styles.width;case"slide_in":return n.formPlacement.slideIn.styles.width;case"fixed_bar":return n.formPlacement.fixedBar.styles.width;case"others":return n.formPlacement.others.styles.width;default:throw Error(`Invalid form display type ${t}`)}},getIsCustomFieldSaving:e=>e.isCustomFieldSaving,getIsCustomFieldDeleting:e=>e.isCustomFieldDeleting,getDismissibleNotices:e=>e.notices.filter((e=>!0===e.isDismissible)),getNonDismissibleNotices:e=>e.notices.filter((e=>!1===e.isDismissible)),getNotice:(e,t)=>e.notices.find((e=>e.id===t)),getFormErrors:e=>e.formErrors,getDefaultSidebarActiveTab:e=>e.sidebar.activeTab,getSidebarOpenedPanels:e=>e.sidebar.openedPanels,getFormBlocks:e=>e.formBlocks,getDateSettingsData:e=>e.dateSettingData,getIsCustomFieldCreating:e=>e.isCustomFieldCreating,hasUnsavedChanges:e=>e.hasUnsavedChanges,getEditorUrl:e=>e.editorUrl,getPreviewPageUrl:e=>e.previewPageUrl,getCloseIconsUrl:e=>e.closeIconsUrl,getAllCustomFonts:e=>e.customFonts,getActiveSidebar:e=>e.sidebar.activeSidebar,getAllWPPosts:e=>e.allWpPosts,getAllWPPages:e=>e.allWpPages,getAllWPCategories:e=>e.allWpCategories,getAllWPTags:e=>e.allWpTags,getAllWooCommerceProducts:e=>e.allWooCommerceProducts,getAllWooCommerceCategories:e=>e.allWooCommerceCategories,getAllWooCommerceTags:e=>e.allWooCommerceTags,getTutorialSeen:e=>e.tutorialSeen,getFormEditorUrl:e=>e.formEditorUrl,getTutorialUrl:e=>e.tutorialUrl,getClosestParentAttribute:(e,t,n)=>A2(e.formBlocks,t).reduce(((e,t)=>t.attributes&&void 0!==t.attributes[n]?t.attributes[n]:e),null),hasEditorUndo(e){let t=e.editorHistory.length;return e.editorHistory.length>1&&(t-=1),t>0&&t>e.editorHistoryOffset},hasEditorRedo:e=>e.editorHistoryOffset>0,isUserAdministrator:e=>e.user.isAdministrator},R2=n(36808),L2=n.n(R2),O2=n(25643),M2=n(31304),D2=n.n(M2),B2=function(e,t){return`${e}-${D2()(t.name,{lower:!0}).replace(/[^a-z0-9]+/g,"").replace(/-$/,"")}`},F2=(0,TQ.jsxs)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,TQ.jsx)(Po,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,TQ.jsx)(Po,{d:"M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"}),(0,TQ.jsx)(Ro,{x:"6",y:"10",width:"2",height:"2"}),(0,TQ.jsx)(Ro,{x:"6",y:"14",width:"8",height:"2"}),(0,TQ.jsx)(Ro,{x:"16",y:"14",width:"2",height:"2"}),(0,TQ.jsx)(Ro,{x:"10",y:"10",width:"8",height:"2"})]}),j2=n(30381),z2=n.n(j2);function H2(e){let{children:t,className:n}=e;return(0,TQ.jsx)("div",{className:Lr()("mailpoet_paragraph",n),children:t})}H2.propTypes={children:O$().node.isRequired,className:O$().string},H2.defaultProps={className:""};var V2=H2;function W2(e){let{isBusy:t,onDelete:n}=e;const r=(0,_.useCallback)((()=>{window.confirm(SQ.Z.I18n.t("customFieldDeleteConfirm"))&&n()}),[n]);return(0,TQ.jsx)(ga,{isDestructive:!0,isLink:!0,isBusy:t,onClick:r,className:"button-on-top",children:SQ.Z.I18n.t("customFieldDeleteCTA")})}W2.propTypes={isBusy:O$().bool,onDelete:O$().func},W2.defaultProps={isBusy:!1,onDelete:()=>{}};var Z2=W2;function U2(e){let{label:t,mandatory:n,dateType:r,dateFormat:o,defaultToday:i,dateSettings:a,isSaving:s,onSave:l,isDeleting:c,onCustomFieldDelete:u,onChange:d}=e;const[p,f]=(0,_.useState)(t),[m,h]=(0,_.useState)(n),[g,v]=(0,_.useState)(i),[b,y]=(0,_.useState)(r),[w,k]=(0,_.useState)(o),x=(0,_.useMemo)((()=>({label:p,mandatory:m,dateType:b,dateFormat:w,defaultToday:g})),[p,m,b,w,g]),E=m!==n||g!==i||b!==r||w!==o||p!==t;return(0,_.useEffect)((()=>{d&&d(x,E)}),[x,d,E]),(0,TQ.jsxs)("div",{className:"custom-field-settings",children:[(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("label"),value:p,"data-automation-id":"settings_custom_date_label_input",onChange:f}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("blockMandatory"),checked:m,onChange:h}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("customFieldDefaultToday"),checked:g,onChange:v}),(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("customFieldDateType"),"data-automation-id":"settings_custom_date_type",value:b,onChange:e=>{y(e);const t=a.dateFormats[e];k(t[0])},options:a.dateTypes}),(()=>{const e=a.dateFormats[b];return Array.isArray(e)&&1===e.length?null:(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("customFieldDateFormat"),"data-automation-id":"settings_custom_date_format",value:w,onChange:e=>k(e),options:e.map((e=>({value:e,label:e})))})})(),l?(0,TQ.jsx)(ga,{isPrimary:!0,onClick:()=>l({mandatory:m,dateType:b,dateFormat:w,defaultToday:g,label:p}),isBusy:s,disabled:s||!E,className:"button-on-top","data-automation-id":"custom_field_save",children:SQ.Z.I18n.t("customFieldSaveCTA")}):null,u?(0,TQ.jsx)(Z2,{isBusy:s||c,onDelete:u}):null]})}U2.propTypes={mandatory:O$().bool,label:O$().string,dateType:O$().string,dateFormat:O$().string,defaultToday:O$().bool,onSave:O$().func,isSaving:O$().bool,dateSettings:O$().shape({dateTypes:O$().arrayOf(O$().shape({label:O$().string,value:O$().string})),dateFormats:O$().objectOf(O$().arrayOf(O$().string)),months:O$().arrayOf(O$().string)}).isRequired,isDeleting:O$().bool,onCustomFieldDelete:O$().func,onChange:O$().func},U2.defaultProps={label:"",mandatory:!1,isSaving:!1,dateType:null,dateFormat:null,defaultToday:!1,isDeleting:!1,onCustomFieldDelete:null,onSave:null,onChange:null};var $2=U2;function G2(e){const t=[];void 0!==e.placeholder&&t.push((0,TQ.jsx)("option",{value:"",children:e.placeholder},0));const n=z2()().year();for(let e=n;e>=n-100;e-=1)t.push((0,TQ.jsx)("option",{value:e,children:e},e));return(0,TQ.jsx)("select",{name:`${e.name}[year]`,value:e.year,onChange:e.onValueChange,className:Lr()({mailpoet_date_year:e.addDefaultClasses}),children:t})}function q2(e){const t=[];void 0!==e.placeholder&&t.push((0,TQ.jsx)("option",{value:"",children:e.placeholder},0));for(let n=1;n<=12;n+=1)t.push((0,TQ.jsx)("option",{value:n,children:e.monthNames[n-1]},n));return(0,TQ.jsx)("select",{name:`${e.name}[month]`,value:e.month,onChange:e.onValueChange,className:Lr()({mailpoet_date_month:e.addDefaultClasses}),children:t})}function K2(e){const t=[];void 0!==e.placeholder&&t.push((0,TQ.jsx)("option",{value:"",children:e.placeholder},0));for(let e=1;e<=31;e+=1)t.push((0,TQ.jsx)("option",{value:e,children:e},e));return(0,TQ.jsx)("select",{name:`${e.name}[day]`,value:e.day,onChange:e.onValueChange,className:Lr()({mailpoet_date_day:e.addDefaultClasses}),children:t})}G2.propTypes={name:O$().string.isRequired,placeholder:O$().string.isRequired,onValueChange:O$().func.isRequired,year:O$().oneOfType([O$().string,O$().number]).isRequired,addDefaultClasses:O$().bool.isRequired},q2.propTypes={name:O$().string.isRequired,placeholder:O$().string.isRequired,onValueChange:O$().func.isRequired,month:O$().oneOfType([O$().string,O$().number]).isRequired,monthNames:O$().arrayOf(O$().string).isRequired,addDefaultClasses:O$().bool.isRequired},K2.propTypes={name:O$().string.isRequired,placeholder:O$().string.isRequired,onValueChange:O$().func.isRequired,day:O$().oneOfType([O$().string,O$().number]).isRequired,addDefaultClasses:O$().bool.isRequired};class Y2 extends _.Component{constructor(e){super(e),this.state={year:"",month:"",day:""},this.onValueChange=this.onValueChange.bind(this)}componentDidMount(){this.extractDateParts()}componentDidUpdate(e){void 0!==this.props.item&&void 0!==e.item&&this.props.item.id!==e.item.id&&this.extractDateParts()}onValueChange(e){const t=e.target.name.match(/(.*?)\[(.*?)\]/);let n=null,r=null;if(null!==t&&3===t.length){[,n,r]=t;const o=Number(e.target.value);this.setState({[`${r}`]:o},(()=>{this.props.onValueChange({target:{name:n,value:this.formatValue()}})}))}}formatValue(){let e;switch(this.props.field.params.date_type){case"year_month_day":e={year:this.state.year,month:this.state.month,day:this.state.day};break;case"year_month":e={year:this.state.year,month:this.state.month};break;case"month":e={month:this.state.month};break;case"year":e={year:this.state.year};break;default:e={value:"invalid type"}}return e}extractDateParts(){const e=void 0!==this.props.item[this.props.field.name]?this.props.item[this.props.field.name].trim():"";if(""===e)return;const t=z2()(e);this.setState({year:t.format("YYYY"),month:t.format("M"),day:t.format("D")})}render(){const e=window.mailpoet_month_names||[];let t=(window.mailpoet_date_formats||{})[this.props.field.params.date_type][0];this.props.field.params.date_format&&(t=this.props.field.params.date_format);const n=t.split("/").map((t=>{switch(t){case"YYYY":return(0,TQ.jsx)(G2,{onValueChange:this.onValueChange,name:this.props.field.name,addDefaultClasses:this.props.addDefaultClasses,year:this.state.year,placeholder:this.props.field.year_placeholder},"year");case"MM":return(0,TQ.jsx)(q2,{onValueChange:this.onValueChange,name:this.props.field.name,addDefaultClasses:this.props.addDefaultClasses,month:this.state.month,monthNames:e,placeholder:this.props.field.month_placeholder},"month");case"DD":return(0,TQ.jsx)(K2,{onValueChange:this.onValueChange,name:this.props.field.name,addDefaultClasses:this.props.addDefaultClasses,day:this.state.day,placeholder:this.props.field.day_placeholder},"day");default:return(0,TQ.jsx)("div",{children:"Invalid date type"})}}));return(0,TQ.jsx)("div",{children:n})}}Y2.propTypes={item:O$().object.isRequired,field:O$().shape({name:O$().string,day_placeholder:O$().string,month_placeholder:O$().string,year_placeholder:O$().string,params:O$().object}).isRequired,onValueChange:O$().func.isRequired,addDefaultClasses:O$().bool},Y2.defaultProps={addDefaultClasses:!1};var X2=Y2,J2=e=>{const t=e.label?e.label:"";return e.mandatory?`${t} *`:t},Q2=function(e,t){switch(e){case"checkbox":return{label:t.label,required:t.mandatory?"1":"",values:[{is_checked:t.isChecked?"1":"",value:t.checkboxLabel}]};case"date":return{label:t.label,required:t.mandatory?"1":"",date_type:t.dateType,date_format:t.dateFormat,is_default_today:t.defaultToday?"1":""};case"radio":case"select":return{required:t.mandatory?"1":"",label:t.label,values:t.values.map((e=>{const t={value:e.name};return e.isChecked?t.is_checked="1":t.is_checked="",t}))};case"text":return{required:t.mandatory?"1":"",validate:t.validate,label:t.label};case"textarea":return{required:t.mandatory?"1":"",validate:t.validate,lines:t.lines?t.lines:"1",label:t.label};default:throw new Error(`Invalid custom field type ${e}!`)}};function e5(e){let{attributes:t,setAttributes:n,clientId:r}=e;const o=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),i=(0,cr.Z)((e=>e("mailpoet-form-editor").getDateSettingsData()),[]),a=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:s,deleteCustomField:l,customFieldEdited:c}=(0,ur.Z)("mailpoet-form-editor"),u=(0,TQ.jsx)(_E,{children:(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("customFieldSettings"),initialOpen:!0,children:(0,TQ.jsx)($2,{label:t.label,mandatory:t.mandatory,dateSettings:i,defaultToday:t.defaultToday,dateFormat:t.dateFormat,dateType:t.dateType,isSaving:o,onSave:e=>s({customFieldId:t.customFieldId,data:{params:Q2("date",e)},onFinish:()=>n({mandatory:e.mandatory,dateType:e.dateType,dateFormat:e.dateFormat,defaultToday:e.defaultToday,label:e.label})}),onCustomFieldDelete:()=>l(t.customFieldId,r),isDeleting:a,onChange:(e,t)=>t&&c()})})})});return(0,TQ.jsx)(V2,{className:t.className,children:(0,TQ.jsxs)("div",{className:"mailpoet_custom_date",children:[u,(0,TQ.jsx)("label",{className:"mailpoet_date_label","data-automation-id":"editor_custom_date_label",htmlFor:r,children:J2(t)}),(0,TQ.jsx)(X2,{field:{name:r,day_placeholder:SQ.Z.I18n.t("customFieldDay"),month_placeholder:SQ.Z.I18n.t("customFieldMonth"),year_placeholder:SQ.Z.I18n.t("customFieldYear"),params:{date_type:t.dateType,date_format:t.dateFormat}},item:{[r]:t.defaultToday?z2()().format("YYYY-MM-DD"):""},addDefaultClasses:!0,onValueChange:()=>{}})]})})}e5.propTypes={attributes:O$().shape({label:O$().string.isRequired,dateFormat:O$().string.isRequired,dateType:O$().string.isRequired,defaultToday:O$().bool,mandatory:O$().bool.isRequired,customFieldId:O$().number.isRequired,className:O$().string}).isRequired,clientId:O$().string.isRequired,setAttributes:O$().func.isRequired};var t5=e5;function n5(e){return{title:e.name,description:"",icon:F2,category:"custom-fields",attributes:{label:{type:"string",default:e.name},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},defaultToday:{type:"boolean",default:!1},dateType:{type:"string",default:e.params.date_type},dateFormat:{type:"string",default:e.params.date_format},customFieldId:{type:"string",default:e.id}},supports:{html:!1,multiple:!1},edit:t5,save:()=>null}}var r5=function(e){const t=parseInt(e,10);if(!Number.isNaN(t))return t};const o5={fullWidth:!0,inheritFromTheme:!0},i5={fullWidth:!1,inheritFromTheme:!0},a5=e=>{if(!e)return i5;const t={fullWidth:"1"===e.full_width||!0===e.full_width,inheritFromTheme:!(0,Ee.has)(e,"bold")};return t.inheritFromTheme||(t.bold="1"===e.bold||!0===e.bold,(0,Ee.has)(e,"background_color")&&e.background_color&&(t.backgroundColor=e.background_color),(0,Ee.has)(e,"gradient")&&e.gradient&&(t.gradient=e.gradient),(0,Ee.has)(e,"border_size")&&void 0!==e.border_size&&(t.borderSize=Number(e.border_size)),(0,Ee.has)(e,"font_size")&&void 0!==e.font_size&&(t.fontSize=Number(e.font_size)),(0,Ee.has)(e,"font_color")&&e.font_color&&(t.fontColor=e.font_color),(0,Ee.has)(e,"border_radius")&&void 0!==e.border_radius&&(t.borderRadius=Number(e.border_radius)),(0,Ee.has)(e,"border_color")&&e.border_color&&(t.borderColor=e.border_color),(0,Ee.has)(e,"padding")&&void 0!==e.padding&&(t.padding=Number(e.padding)),(0,Ee.has)(e,"font_family")&&e.font_family&&(t.fontFamily=e.font_family)),t},s5=(e,t)=>{const n=e.find((e=>e.color===t));return n?n.slug:void 0},l5=(e,t)=>{const n=e.find((e=>e.gradient===t));return n?n.slug:void 0},c5=(e,t)=>{let n=0;t&&(n=r5(t),void 0===n&&(n=2));const r=e.find((e=>e.size===n));return r?r.slug:void 0};function u5(e){let{label:t,mandatory:n,validate:r,isSaving:o,onSave:i,isDeleting:a,onCustomFieldDelete:s,onChange:l,fieldType:c}=e;const[u,d]=(0,_.useState)(t),[p,f]=(0,_.useState)(n),[m,h]=(0,_.useState)(r),g=(0,_.useMemo)((()=>({label:u,mandatory:p,validate:m})),[u,p,m]),v=p!==n||m!==r||u!==t;return(0,_.useEffect)((()=>{l&&l(g,v)}),[g,l,v,c]),(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("label"),value:u,"data-automation-id":"settings_custom_text_label_input",onChange:d}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("blockMandatory"),checked:p,onChange:f}),(0,TQ.jsx)(cR,{label:`${SQ.Z.I18n.t("customFieldValidateFor")}:`,"data-automation-id":"settings_custom_text_input_validation_type",options:[{label:SQ.Z.I18n.t("customFieldValidateNothing"),value:""},{label:SQ.Z.I18n.t("customFieldValidateNumbersOnly"),value:"number"},{label:SQ.Z.I18n.t("customFieldValidateAlphanumerical"),value:"alphanum"},{label:SQ.Z.I18n.t("customFieldValidatePhoneNumber"),value:"phone"}],value:m,onChange:h}),i?(0,TQ.jsx)(ga,{isPrimary:!0,onClick:()=>i(g),isBusy:o,disabled:o||a||!v,className:"button-on-top","data-automation-id":"custom_field_save",children:SQ.Z.I18n.t("customFieldSaveCTA")}):null,s?(0,TQ.jsx)(Z2,{isBusy:o||a,onDelete:s}):null]})}u5.propTypes={label:O$().string,mandatory:O$().bool,validate:O$().string,onSave:O$().func,isSaving:O$().bool,isDeleting:O$().bool,onCustomFieldDelete:O$().func,onChange:O$().func,fieldType:O$().string},u5.defaultProps={label:"",mandatory:!1,fieldType:"",isSaving:!1,validate:"",isDeleting:!1,onCustomFieldDelete:null,onSave:null,onChange:null};var d5=u5;function p5(e){let{styles:t,onChange:n}=e;const r=(0,_.useRef)(t),o=r.current,{applyStylesToAllTextInputs:i}=(0,ur.Z)("mailpoet-form-editor"),a=(e,t)=>{const o={...r.current};o[e]=t,n(o),r.current=o};return(0,TQ.jsx)(zQ,{className:"mailpoet-automation-input-styles-panel",children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("formSettingsStyles"),initialOpen:!1,children:(0,TQ.jsxs)("div",{className:"mailpoet-styles-settings","data-automation-id":"input_styles_settings",children:[(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("formSettingsDisplayFullWidth"),checked:o.fullWidth,onChange:(0,Ee.partial)(a,"fullWidth")}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("formSettingsInheritStyleFromTheme"),checked:o.inheritFromTheme,onChange:e=>{if(e)return void a("inheritFromTheme",e);const t={...r.current};t.backgroundColor="#ffffff",t.bold=!1,t.borderRadius=0,t.borderSize=1,t.borderColor="#313131",t.inheritFromTheme=e,n(t),r.current=t},className:"mailpoet-automation-inherit-theme-toggle"}),o.inheritFromTheme?null:(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("formSettingsStylesFontColor"),value:o.fontColor,onChange:(0,Ee.partial)(a,"fontColor")}),(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("formSettingsStylesBackgroundColor"),value:o.backgroundColor,onChange:(0,Ee.partial)(a,"backgroundColor")}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("formSettingsBold"),checked:o.bold||!1,onChange:(0,Ee.partial)(a,"bold"),className:"mailpoet-automation-styles-bold-toggle"}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("formSettingsBorderSize"),value:void 0===o.borderSize?1:o.borderSize,min:0,max:10,allowReset:!0,onChange:(0,Ee.partial)(a,"borderSize"),className:"mailpoet-automation-styles-border-size"}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("formSettingsBorderRadius"),value:void 0===o.borderRadius?1:o.borderRadius,min:0,max:40,allowReset:!0,onChange:(0,Ee.partial)(a,"borderRadius")}),(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("formSettingsBorderColor"),value:o.borderColor,onChange:(0,Ee.partial)(a,"borderColor")})]}),(0,TQ.jsx)("div",{children:(0,TQ.jsx)(ga,{isPrimary:!0,onClick:()=>i(o),"data-automation-id":"styles_apply_to_all",children:SQ.Z.I18n.t("formSettingsApplyToAll")})})]})})})}const f5=O$().shape({fullWidth:O$().bool.isRequired,inheritFromTheme:O$().bool.isRequired,bold:O$().bool,backgroundColor:O$().string,borderSize:O$().number,borderRadius:O$().number,borderColor:O$().string});p5.propTypes={styles:f5.isRequired,onChange:O$().func.isRequired};var m5=function(e){return e===r0.Right?"0 0 0 auto":e===r0.Center?"0 auto":"auto 0"};function h5(e){let{label:t,labelWithinInput:n,name:r,mandatory:o,styles:i,className:a}=e;const s=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),l=(0,_.useRef)(null),c=`${r}_${Math.random().toString(36).substring(2,15)}`,[u,d]=(0,_.useState)(""),p=i.inheritFromTheme?{}:{fontWeight:i.bold?"bold":"inherit"},f=i.inheritFromTheme?{}:{borderRadius:i.borderRadius?`${i.borderRadius}px`:0,borderWidth:void 0!==i.borderSize?`${i.borderSize}px`:"1px",borderColor:i.borderColor||"initial",borderStyle:"solid"};void 0!==s.inputPadding&&(f.padding=s.inputPadding),void 0!==s.inputPadding&&(f.padding=s.inputPadding),void 0!==s.alignment&&(f.textAlign=s.alignment,f.margin=m5(f.textAlign)),i.fullWidth&&(f.width="100%"),i.backgroundColor&&!i.inheritFromTheme&&(f.backgroundColor=i.backgroundColor);const m={};return i.fontColor&&!i.inheritFromTheme&&(f.color=i.fontColor,n&&(m.color=i.fontColor)),(0,TQ.jsxs)(V2,{className:a,children:[n?null:(0,TQ.jsx)("label",{className:"mailpoet_text_label","data-automation-id":`editor_${r}_label`,htmlFor:c,style:p,children:J2({label:t,mandatory:o})}),(e=>{let t=`#${c}::placeholder {`;return void 0!==m.color&&(t+=`color: ${m.color};`),s.fontFamily&&(t+=`font-family: ${s.fontFamily};`),t+="}",(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("style",{children:t}),(0,TQ.jsx)("input",{id:c,ref:l,className:"mailpoet_text",type:"text",name:r,value:u,onChange:()=>d(""),placeholder:e,"data-automation-id":`editor_${r}_input`,style:f,autoComplete:"off"})]})})(n?J2({label:t,mandatory:o}):"")]})}h5.propTypes={label:O$().string.isRequired,labelWithinInput:O$().bool.isRequired,name:O$().string.isRequired,mandatory:O$().bool.isRequired,className:O$().string,styles:f5.isRequired},h5.defaultProps={className:""};var g5=h5;function v5(e){let{attributes:t,setAttributes:n,clientId:r}=e;const o=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),i=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:a,deleteCustomField:s,customFieldEdited:l}=(0,ur.Z)("mailpoet-form-editor"),c=(0,TQ.jsxs)(_E,{children:[(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("customFieldSettings"),initialOpen:!0,children:(0,TQ.jsx)(d5,{updateAttributes:e=>n(e),customFieldId:t.customFieldId,label:t.label,mandatory:t.mandatory,validate:t.validate,isSaving:o,onSave:e=>{a({customFieldId:t.customFieldId,data:{params:Q2("text",e)},onFinish:()=>n({mandatory:e.mandatory,validate:e.validate,label:e.label})})},onCustomFieldDelete:()=>s(t.customFieldId,r),isDeleting:i,onChange:(e,t)=>t&&l()})})}),(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("customFieldsFormSettings"),initialOpen:!0,children:(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("displayLabelWithinInput"),checked:t.labelWithinInput,onChange:e=>n({labelWithinInput:e})})})}),(0,TQ.jsx)(p5,{styles:t.styles,onChange:e=>n({styles:e})})]});return(0,TQ.jsxs)(TQ.Fragment,{children:[c,(0,TQ.jsx)(g5,{className:t.className,name:"custom_text",mandatory:t.mandatory,labelWithinInput:t.labelWithinInput,label:t.label,styles:t.styles})]})}v5.propTypes={attributes:O$().shape({label:O$().string.isRequired,validate:O$().string,labelWithinInput:O$().bool.isRequired,mandatory:O$().bool.isRequired,customFieldId:O$().number.isRequired,styles:f5.isRequired,className:O$().string}).isRequired,setAttributes:O$().func.isRequired,clientId:O$().string.isRequired};var b5=v5;function y5(e){return{title:e.name,description:"",icon:F2,category:"custom-fields",attributes:{label:{type:"string",default:e.name},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},validate:{type:"string",default:e.params.validate?e.params.validate:""},customFieldId:{type:"string",default:e.id},styles:{type:"object",default:o5}},supports:{html:!1,multiple:!1},edit:b5,save:()=>null}}function w5(e){let{name:t,attributes:n,setAttributes:r,clientId:o}=e;const i=`${t.replace(/[^a-zA-Z]/g,"")}_${Math.random().toString(36).substring(2,15)}`,a=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),s=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),l=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),[c,u]=(0,_.useState)(""),{saveCustomField:d,deleteCustomField:p,customFieldEdited:f}=(0,ur.Z)("mailpoet-form-editor"),m=(0,TQ.jsxs)(_E,{children:[(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("customFieldSettings"),initialOpen:!0,children:(0,TQ.jsx)(d5,{label:n.label,mandatory:n.mandatory,validate:n.validate,isSaving:s,onSave:e=>d({customFieldId:n.customFieldId,data:{params:Q2("textarea",e)},onFinish:()=>r({mandatory:e.mandatory,validate:e.validate,lines:e.lines,label:e.label})}),onCustomFieldDelete:()=>p(n.customFieldId,o),isDeleting:l,onChange:(e,t)=>t&&f()})})}),(0,TQ.jsx)(zQ,{children:(0,TQ.jsxs)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:[(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("displayLabelWithinInput"),checked:n.labelWithinInput,onChange:e=>r({labelWithinInput:e})}),(0,TQ.jsx)(cR,{label:`${SQ.Z.I18n.t("customFieldNumberOfLines")}:`,"data-automation-id":"settings_custom_text_area_number_of_lines",value:n.lines,options:[{label:SQ.Z.I18n.t("customField1Line"),value:"1"},{label:SQ.Z.I18n.t("customField2Lines"),value:"2"},{label:SQ.Z.I18n.t("customField3Lines"),value:"3"},{label:SQ.Z.I18n.t("customField4Lines"),value:"4"},{label:SQ.Z.I18n.t("customField5Lines"),value:"5"}],onChange:e=>r({lines:e})})]})}),(0,TQ.jsx)(p5,{styles:n.styles,onChange:e=>r({styles:e})})]}),h=n.styles.inheritFromTheme?{}:{fontWeight:n.styles.bold?"bold":"inherit"},g=n.styles.inheritFromTheme?{}:{borderRadius:n.styles.borderRadius?`${n.styles.borderRadius}px`:0,borderWidth:void 0!==n.styles.borderSize?`${n.styles.borderSize}px`:"1px",borderColor:n.styles.borderColor||"initial",borderStyle:"solid"};n.styles.fullWidth&&(g.width="100%"),n.styles.backgroundColor&&!n.styles.inheritFromTheme&&(g.backgroundColor=n.styles.backgroundColor),void 0!==a.inputPadding&&(g.padding=a.inputPadding),void 0!==a.alignment&&(g.textAlign=a.alignment,g.margin=m5(g.textAlign)),g.resize="none";const v={};n.styles.fontColor&&!n.styles.inheritFromTheme&&(g.color=n.styles.fontColor,n.labelWithinInput&&(v.color=n.styles.fontColor));const b=(0,_.useRef)(null),y=e=>{let t=`#${i}::placeholder {`;return void 0!==v.color&&(t+=`color: ${v.color};`),a.fontFamily&&(t+=`font-family: ${a.fontFamily};`),t+="}",(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("style",{children:t}),(0,TQ.jsx)("textarea",{id:i,ref:b,className:"mailpoet_textarea",name:"custom_text","data-automation-id":"editor_custom_textarea_input",rows:n.lines,style:g,onChange:()=>u(""),placeholder:e,value:c})]})};return(0,TQ.jsxs)(V2,{className:n.className,children:[m,n.labelWithinInput?y(J2(n)):(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("label",{className:"mailpoet_textarea_label","data-automation-id":"editor_custom_text_label",htmlFor:i,style:h,children:J2(n)}),y("")]})]})}w5.propTypes={attributes:O$().shape({label:O$().string.isRequired,customFieldId:O$().number.isRequired,validate:O$().string,labelWithinInput:O$().bool.isRequired,mandatory:O$().bool.isRequired,lines:O$().string,styles:f5.isRequired,className:O$().string}).isRequired,setAttributes:O$().func.isRequired,clientId:O$().string.isRequired,name:O$().string.isRequired};var k5=w5;function x5(e){return{title:e.name,description:"",icon:F2,category:"custom-fields",attributes:{label:{type:"string",default:e.name},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},validate:{type:"string",default:e.params.validate?e.params.validate:""},lines:{type:"string",default:"1"},customFieldId:{type:"string",default:e.id},styles:{type:"object",default:o5}},supports:{html:!1,multiple:!1},edit:k5,save:()=>null}}var _5=n(94578),E5=n(97779),C5=E().createContext(null),S5=function(e){e()},I5=function(){return S5},T5={notify:function(){}},N5=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=T5,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=I5(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=T5)},e}(),A5=function(e){var t=e.store,n=e.context,r=e.children,o=(0,_.useMemo)((function(){var e=new N5(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),i=(0,_.useMemo)((function(){return t.getState()}),[t]);(0,_.useEffect)((function(){var e=o.subscription;return e.trySubscribe(),i!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,i]);var a=n||C5;return E().createElement(a.Provider,{value:o},r)},P5=n(8679),R5=n.n(P5),L5=n(59864),O5="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_.useLayoutEffect:_.useEffect,M5=[],D5=[null,null];function B5(e,t){var n=e[1];return[t.payload,n+1]}function F5(e,t,n){O5((function(){return e.apply(void 0,t)}),n)}function j5(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function z5(e,t,n,r,o,i,a,s,l,c){if(e){var u=!1,d=null,p=function(){if(!u){var e,n,p=t.getState();try{e=r(p,o.current)}catch(e){n=e,d=e}n||(d=null),e===i.current?a.current||l():(i.current=e,s.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=p,n.trySubscribe(),p(),function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var H5=function(){return[null,0]};function V5(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,i=n.methodName,a=void 0===i?"connectAdvanced":i,s=n.renderCountProp,l=void 0===s?void 0:s,c=n.shouldHandleStateChanges,u=void 0===c||c,d=n.storeKey,p=void 0===d?"store":d,f=(n.withRef,n.forwardRef),m=void 0!==f&&f,h=n.context,g=void 0===h?C5:h,v=(0,R$.Z)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),b=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),i=(0,dr.Z)({},v,{getDisplayName:o,methodName:a,renderCountProp:l,shouldHandleStateChanges:u,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure,c=s?_.useMemo:function(e){return e()};function d(n){var r=(0,_.useMemo)((function(){var e=n.forwardedRef,t=(0,R$.Z)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),o=r[0],a=r[1],s=r[2],l=(0,_.useMemo)((function(){return o&&o.Consumer&&(0,L5.isContextConsumer)(E().createElement(o.Consumer,null))?o:b}),[o,b]),d=(0,_.useContext)(l),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(d)&&Boolean(d.store);var f=p?n.store:d.store,m=(0,_.useMemo)((function(){return function(t){return e(t.dispatch,i)}(f)}),[f]),h=(0,_.useMemo)((function(){if(!u)return D5;var e=new N5(f,p?null:d.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[f,p,d]),g=h[0],v=h[1],y=(0,_.useMemo)((function(){return p?d:(0,dr.Z)({},d,{subscription:g})}),[p,d,g]),w=(0,_.useReducer)(B5,M5,H5),k=w[0][0],x=w[1];if(k&&k.error)throw k.error;var C=(0,_.useRef)(),S=(0,_.useRef)(s),I=(0,_.useRef)(),T=(0,_.useRef)(!1),N=c((function(){return I.current&&s===S.current?I.current:m(f.getState(),s)}),[f,k,s]);F5(j5,[S,C,T,s,N,I,v]),F5(z5,[u,f,g,m,S,C,T,I,v,x],[f,g,m]);var A=(0,_.useMemo)((function(){return E().createElement(t,(0,dr.Z)({},N,{ref:a}))}),[a,t,N]);return(0,_.useMemo)((function(){return u?E().createElement(l.Provider,{value:y},A):A}),[l,A,y])}var f=s?E().memo(d):d;if(f.WrappedComponent=t,f.displayName=r,m){var h=E().forwardRef((function(e,t){return E().createElement(f,(0,dr.Z)({},e,{forwardedRef:t}))}));return h.displayName=r,h.WrappedComponent=t,R5()(h,t)}return R5()(f,t)}}function W5(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Z5(e,t){if(W5(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!W5(e[n[o]],t[n[o]]))return!1;return!0}function U5(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function $5(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function G5(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=$5(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=$5(o),o=r(t,n)),o},r}}var q5=[function(e){return"function"==typeof e?G5(e):void 0},function(e){return e?void 0:U5((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?U5((function(t){return(0,E5.DE)(e,t)})):void 0}],K5=[function(e){return"function"==typeof e?G5(e):void 0},function(e){return e?void 0:U5((function(){return{}}))}];function Y5(e,t,n){return(0,dr.Z)({},n,{},e,{},t)}var X5=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,i=n.areMergedPropsEqual,a=!1;return function(t,n,s){var l=e(t,n,s);return a?o&&i(l,r)||(r=l):(a=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return Y5}}];function J5(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function Q5(e,t,n,r,o){var i,a,s,l,c,u=o.areStatesEqual,d=o.areOwnPropsEqual,p=o.areStatePropsEqual,f=!1;return function(o,m){return f?function(o,f){var m,h,g=!d(f,a),v=!u(o,i);return i=o,a=f,g&&v?(s=e(i,a),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):g?(e.dependsOnOwnProps&&(s=e(i,a)),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):v?(m=e(i,a),h=!p(m,s),s=m,h&&(c=n(s,l,a)),c):c}(o,m):(s=e(i=o,a=m),l=t(r,a),c=n(s,l,a),f=!0,c)}}function e3(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=(0,R$.Z)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(e,i),s=r(e,i),l=o(e,i);return(i.pure?Q5:J5)(a,s,l,e,i)}function t3(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function n3(e,t){return e===t}function r3(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?V5:n,o=t.mapStateToPropsFactories,i=void 0===o?K5:o,a=t.mapDispatchToPropsFactories,s=void 0===a?q5:a,l=t.mergePropsFactories,c=void 0===l?X5:l,u=t.selectorFactory,d=void 0===u?e3:u;return function(e,t,n,o){void 0===o&&(o={});var a=o,l=a.pure,u=void 0===l||l,p=a.areStatesEqual,f=void 0===p?n3:p,m=a.areOwnPropsEqual,h=void 0===m?Z5:m,g=a.areStatePropsEqual,v=void 0===g?Z5:g,b=a.areMergedPropsEqual,y=void 0===b?Z5:b,w=(0,R$.Z)(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),k=t3(e,i,"mapStateToProps"),x=t3(t,s,"mapDispatchToProps"),_=t3(n,c,"mergeProps");return r(d,(0,dr.Z)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:x,initMergeProps:_,pure:u,areStatesEqual:f,areOwnPropsEqual:h,areStatePropsEqual:v,areMergedPropsEqual:y},w))}}var o3,i3=r3();o3=C.unstable_batchedUpdates,S5=o3;var a3=n(2177),s3=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},l3=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},c3=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},u3={top:0,right:0,bottom:0,left:0},d3=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?u3:n,o=e.border,i=void 0===o?u3:o,a=e.padding,s=void 0===a?u3:a,l=s3(l3(t,r)),c=s3(c3(t,i)),u=s3(c3(c,s));return{marginBox:l,borderBox:s3(t),paddingBox:c,contentBox:u,margin:r,border:i,padding:s}},p3=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&(0,a3.default)(!1),n},f3=function(e,t){var n=e.borderBox,r=e.border,o=e.margin,i=e.padding,a=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}}(n,t);return d3({borderBox:a,border:r,margin:o,padding:i})},m3=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),f3(e,t)},h3=function(e,t){var n={top:p3(t.marginTop),right:p3(t.marginRight),bottom:p3(t.marginBottom),left:p3(t.marginLeft)},r={top:p3(t.paddingTop),right:p3(t.paddingRight),bottom:p3(t.paddingBottom),left:p3(t.paddingLeft)},o={top:p3(t.borderTopWidth),right:p3(t.borderRightWidth),bottom:p3(t.borderBottomWidth),left:p3(t.borderLeftWidth)};return d3({borderBox:e,margin:n,padding:r,border:o})},g3=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return h3(t,n)},v3=n(30845),b3=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function y3(e,t){}function w3(){}function k3(e,t,n){var r=t.map((function(t){var r,o,i=(r=n,o=t.options,(0,dr.Z)({},r,{},o));return e.addEventListener(t.eventName,t.fn,i),function(){e.removeEventListener(t.eventName,t.fn,i)}}));return function(){r.forEach((function(e){e()}))}}y3.bind(null,"warn"),y3.bind(null,"error");function x3(e){this.message=e}function _3(e,t){if(!e)throw new x3("Invariant failed")}x3.prototype.toString=function(){return this.message};var E3=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=w3,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof x3&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}(0,_5.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=k3(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof x3))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(E().Component),C3=function(e){return e+1},S3=function(e,t){var n=e.droppableId===t.droppableId,r=C3(e.index),o=C3(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+o+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+o+"\n "},I3=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},T3=function(e){return"\n The item has returned to its starting position\n of "+C3(e.index)+"\n"},N3=function(e){return"\n You have lifted an item in position "+C3(e.source.index)+"\n"},A3=function(e){var t=e.destination;if(t)return S3(e.source,t);var n=e.combine;return n?I3(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},P3=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+T3(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+S3(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+I3(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+T3(e.source)+"\n "},R3={x:0,y:0},L3=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},O3=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},M3=function(e,t){return e.x===t.x&&e.y===t.y},D3=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},B3=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},F3=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},j3=function(e,t){return Math.min.apply(Math,t.map((function(t){return F3(e,t)})))},z3=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},H3=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},V3=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},W3=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=s3({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):s3(e)},Z3=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,o=e.frame,i=function(e,t,n){var r;return n&&n.increasedBy?(0,dr.Z)({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(function(e,t){return t?H3(e,t.scroll.diff.displacement):e}(t.marginBox,o),r,n);return{page:t,withPlaceholder:n,active:W3(i,o)}},U3=function(e,t){e.frame||_3(!1);var n=e.frame,r=O3(t,n.scroll.initial),o=D3(r),i=(0,dr.Z)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}}),a=Z3({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return(0,dr.Z)({},e,{frame:i,subject:a})};function $3(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function G3(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function q3(e,t){if(e.find)return e.find(t);var n=G3(e,t);return-1!==n?e[n]:void 0}function K3(e){return Array.prototype.slice.call(e)}var Y3=(0,v3.Z)((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),X3=(0,v3.Z)((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),J3=(0,v3.Z)((function(e){return $3(e)})),Q3=(0,v3.Z)((function(e){return $3(e)})),e4=(0,v3.Z)((function(e,t){return Q3(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}))}));function t4(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function n4(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var r4=(0,v3.Z)((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),o4=function(e,t){return e.descriptor.droppableId===t.descriptor.id},i4={point:R3,value:0},a4={invisible:{},visible:{},all:[]},s4={displaced:a4,displacedBy:i4,at:null},l4=function(e,t){return function(n){return e<=n&&n<=t}},c4=function(e){var t=l4(e.top,e.bottom),n=l4(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;var a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return!(!a||!s)||a&&i||s&&o}},u4=function(e){var t=l4(e.top,e.bottom),n=l4(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},d4={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},p4={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},f4=function(e){var t=e.target,n=e.destination,r=e.viewport,o=e.withDroppableDisplacement,i=e.isVisibleThroughFrameFn,a=o?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:R3;return H3(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,i)&&function(e,t,n){return n(t)(e)}(a,r,i)},m4=function(e){return f4((0,dr.Z)({},e,{isVisibleThroughFrameFn:u4}))};function h4(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce((function(e,t){var s,l=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return s3(l3(n,r))}(t,r),c=t.descriptor.id;if(e.all.push(c),s={target:l,destination:n,viewport:o,withDroppableDisplacement:!0},!f4((0,dr.Z)({},s,{isVisibleThroughFrameFn:c4})))return e.invisible[t.descriptor.id]=!0,e;var u={draggableId:c,shouldAnimate:function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,o=t.visible;if(r[e])return!1;var i=o[e];return!i||i.shouldAnimate}(c,a,i)};return e.visible[c]=u,e}),{all:[],visible:{},invisible:{}})}function g4(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,o=e.destination,i=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:a4,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function v4(e){var t=e.draggable,n=e.insideDestination,r=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,s=e.index,l=e.forceShouldAnimate,c=o4(t,r);if(null==s)return g4({insideDestination:n,inHomeList:c,displacedBy:i,destination:r});var u=q3(n,(function(e){return e.descriptor.index===s}));if(!u)return g4({insideDestination:n,inHomeList:c,displacedBy:i,destination:r});var d=r4(t,n),p=n.indexOf(u);return{displaced:h4({afterDragging:d.slice(p),destination:r,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:l}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function b4(e,t){return Boolean(t.effected[e])}var y4=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},w4=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},k4=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return B3(t.line,n.marginBox[t.end]+y4(t,r),w4(t,n.marginBox,r))},x4=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return B3(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),w4(t,n.marginBox,r))},_4=function(e,t){var n=e.frame;return n?L3(t,n.scroll.diff.displacement):t},E4=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.afterCritical,a=n.page.borderBox.center,s=t.at;return r&&s?"REORDER"===s.type?function(e){var t=e.impact,n=e.draggable,r=e.draggables,o=e.droppable,i=e.afterCritical,a=e4(o.descriptor.id,r),s=n.page,l=o.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return B3(t.line,n.contentBox[t.start]+y4(t,r),w4(t,n.contentBox,r))}({axis:l,moveInto:o.page,isMoving:s});var c=t.displaced,u=t.displacedBy,d=c.all[0];if(d){var p=r[d];if(b4(d,i))return x4({axis:l,moveRelativeTo:p.page,isMoving:s});var f=f3(p.page,u.point);return x4({axis:l,moveRelativeTo:f,isMoving:s})}var m=a[a.length-1];if(m.descriptor.id===n.descriptor.id)return s.borderBox.center;if(b4(m.descriptor.id,i)){var h=f3(m.page,D3(i.displacedBy.point));return k4({axis:l,moveRelativeTo:h,isMoving:s})}return k4({axis:l,moveRelativeTo:m.page,isMoving:s})}({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:i}):function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,o=n4(n);o||_3(!1);var i=o.draggableId,a=r[i].page.borderBox.center,s=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,o=e.displacedBy,i=Boolean(t.visible[r]||t.invisible[r]);return b4(r,n)?i?R3:D3(o.point):i?o.point:R3}({displaced:n.displaced,afterCritical:t,combineWith:i,displacedBy:n.displacedBy});return L3(a,s)}({impact:t,draggables:o,afterCritical:i}):a}(e),n=e.droppable;return n?_4(n,t):t},C4=function(e,t){var n=O3(t,e.scroll.initial),r=D3(n);return{frame:s3({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function S4(e,t){return e.map((function(e){return t[e]}))}var I4=function(e){var t,n,r=e.pageBorderBoxCenter,o=e.draggable,i=(t=e.viewport,n=r,L3(t.scroll.diff.displacement,n)),a=O3(i,o.page.borderBox.center);return L3(o.client.borderBox.center,a)},T4=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,i=e.withDroppableDisplacement,a=e.onlyOnMainAxis,s=void 0!==a&&a,l=O3(r,t.page.borderBox.center),c={target:H3(t.page.borderBox,l),destination:n,withDroppableDisplacement:i,viewport:o};return s?function(e){return f4((0,dr.Z)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=l4(e.top,e.bottom),r=l4(e.left,e.right);return function(e){return t===d4?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(c):m4(c)},N4=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.draggables,i=e.previousImpact,a=e.viewport,s=e.previousPageBorderBoxCenter,l=e.previousClientSelection,c=e.afterCritical;if(!r.isEnabled)return null;var u=e4(r.descriptor.id,o),d=o4(n,r),p=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.previousImpact;if(!r.isCombineEnabled)return null;if(!t4(i))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return(0,dr.Z)({},i,{at:t})}var s=i.displaced.all,l=s.length?s[0]:null;if(t)return l?a(l):null;var c=r4(n,o);if(!l)return c.length?a(c[c.length-1].descriptor.id):null;var u=G3(c,(function(e){return e.descriptor.id===l}));-1===u&&_3(!1);var d=u-1;return d<0?null:a(c[d].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:u,previousImpact:i})||function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,u=s.at;if(u||_3(!1),"REORDER"===u.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,o=e.location;if(!r.length)return null;var i=o.index,a=t?i+1:i-1,s=r[0].descriptor.index,l=r[r.length-1].descriptor.index;return a<s||a>(n?l:l+1)?null:a}({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:a});return null==d?null:v4({draggable:r,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:d})}var p=function(e){var t=e.isMovingForward,n=e.draggables,r=e.combine,o=e.afterCritical;if(!e.destination.isCombineEnabled)return null;var i=r.draggableId,a=n[i].descriptor.index;return b4(i,o)?t?a:a-1:t?a+1:a}({isMovingForward:t,destination:i,displaced:s.displaced,draggables:o,combine:u.combine,afterCritical:c});return null==p?null:v4({draggable:r,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:p})}({isMovingForward:t,isInHomeList:d,draggable:n,draggables:o,destination:r,insideDestination:u,previousImpact:i,viewport:a,afterCritical:c});if(!p)return null;var f=E4({impact:p,draggable:n,droppable:r,draggables:o,afterCritical:c});if(T4({draggable:n,destination:r,newPageBorderBoxCenter:f,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:I4({pageBorderBoxCenter:f,draggable:n,viewport:a}),impact:p,scrollJumpRequest:null};var m=O3(f,s);return{clientSelection:l,impact:function(e){var t=e.impact,n=e.viewport,r=e.destination,o=e.draggables,i=e.maxScrollChange,a=C4(n,L3(n.scroll.current,i)),s=r.frame?U3(r,L3(r.frame.scroll.current,i)):r,l=t.displaced,c=h4({afterDragging:S4(l.all,o),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:l,forceShouldAnimate:!1}),u=h4({afterDragging:S4(l.all,o),destination:s,displacedBy:t.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),d={},p={},f=[l,c,u];return l.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,f);t?p[e]=t:d[e]=!0})),(0,dr.Z)({},t,{displaced:{all:l.all,invisible:d,visible:p}})}({impact:p,viewport:a,destination:r,draggables:o,maxScrollChange:m}),scrollJumpRequest:m}},A4=function(e){var t=e.subject.active;return t||_3(!1),t},P4=function(e,t){var n=e.page.borderBox.center;return b4(e.descriptor.id,t)?O3(n,t.displacedBy.point):n},R4=function(e,t){var n=e.page.borderBox;return b4(e.descriptor.id,t)?H3(n,D3(t.displacedBy.point)):n},L4=(0,v3.Z)((function(e,t){var n=t[e.line];return{value:n,point:B3(e.line,n)}})),O4=function(e,t){return(0,dr.Z)({},e,{scroll:(0,dr.Z)({},e.scroll,{max:t})})},M4=function(e,t,n){var r=e.frame;o4(t,e)&&_3(!1),e.subject.withPlaceholder&&_3(!1);var o=L4(e.axis,t.displaceBy).point,i=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return B3(r.line,t[r.line]);var o=e.subject.page.contentBox[r.size],i=e4(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[r.size]}),0)+t[r.line]-o;return i<=0?null:B3(r.line,i)}(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){var s=Z3({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return(0,dr.Z)({},e,{subject:s})}var l=i?L3(r.scroll.max,i):r.scroll.max,c=O4(r,l),u=Z3({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:c});return(0,dr.Z)({},e,{subject:u,frame:c})},D4=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},B4=function(e){var t=e.state,n=e.type,r=function(e,t){var n=D4(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),o=Boolean(r),i=t.dimensions.droppables[t.critical.droppable.id],a=r||i,s=a.axis.direction,l="vertical"===s&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===s&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(l&&!o)return null;var c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,p=t.dimensions,f=p.draggables,m=p.droppables;return l?N4({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:a,draggables:f,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,o=e.isOver,i=e.draggables,a=e.droppables,s=e.viewport,l=e.afterCritical,c=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,o=e.droppables,i=e.viewport,a=r.subject.active;if(!a)return null;var s=r.axis,l=l4(a[s.start],a[s.end]),c=J3(o).filter((function(e){return e!==r})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return c4(i.frame)(A4(e))})).filter((function(e){var n=A4(e);return t?a[s.crossAxisEnd]<n[s.crossAxisEnd]:n[s.crossAxisStart]<a[s.crossAxisStart]})).filter((function(e){var t=A4(e),n=l4(t[s.start],t[s.end]);return l(t[s.start])||l(t[s.end])||n(a[s.start])||n(a[s.end])})).sort((function(e,n){var r=A4(e)[s.crossAxisStart],o=A4(n)[s.crossAxisStart];return t?r-o:o-r})).filter((function(e,t,n){return A4(e)[s.crossAxisStart]===A4(n[0])[s.crossAxisStart]}));if(!c.length)return null;if(1===c.length)return c[0];var u=c.filter((function(e){return l4(A4(e)[s.start],A4(e)[s.end])(n[s.line])}));return 1===u.length?u[0]:u.length>1?u.sort((function(e,t){return A4(e)[s.start]-A4(t)[s.start]}))[0]:c.sort((function(e,t){var r=j3(n,V3(A4(e))),o=j3(n,V3(A4(t)));return r!==o?r-o:A4(e)[s.start]-A4(t)[s.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:a,viewport:s});if(!c)return null;var u=e4(c.descriptor.id,i),d=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,o=e.draggable,i=e.draggables,a=e.destination,s=e.viewport,l=e.afterCritical;if(!n){if(r.length)return null;var c={displaced:a4,displacedBy:i4,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},u=E4({impact:c,draggable:o,droppable:a,draggables:i,afterCritical:l}),d=o4(o,a)?a:M4(a,o,i);return T4({draggable:o,destination:d,newPageBorderBoxCenter:u,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var p,f=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),m=(p=n.descriptor.index,n.descriptor.id===o.descriptor.id||f?p:p+1);return v4({draggable:o,insideDestination:r,destination:a,viewport:s,displacedBy:L4(a.axis,o.displaceBy),last:a4,index:m})}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:i,moveRelativeTo:function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,o=e.afterCritical;return e.insideDestination.filter((function(e){return m4({target:R4(e,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var i=F3(t,_4(r,P4(e,o))),a=F3(t,_4(r,P4(n,o)));return i<a?-1:a<i?1:e.descriptor.index-n.descriptor.index}))[0]||null}({pageBorderBoxCenter:n,viewport:s,destination:c,insideDestination:u,afterCritical:l}),insideDestination:u,viewport:s,afterCritical:l});if(!d)return null;var p=E4({impact:d,draggable:r,droppable:c,draggables:i,afterCritical:l});return{clientSelection:I4({pageBorderBoxCenter:p,draggable:r,viewport:s}),impact:d,scrollJumpRequest:null}}({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:a,draggables:f,droppables:m,viewport:t.viewport,afterCritical:t.afterCritical})};function F4(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function j4(e){var t=l4(e.top,e.bottom),n=l4(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}var z4=function(e,t){return s3(H3(e,t))};function H4(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var V4=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,o=e.droppables,i=e.previousImpact,a=e.viewport,s=e.afterCritical,l=z4(n.page.borderBox,t),c=function(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,o=J3(r).filter((function(e){if(!e.isEnabled)return!1;var n,r,o=e.subject.active;if(!o)return!1;if(r=o,!((n=t).left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top))return!1;if(j4(o)(t.center))return!0;var i=e.axis,a=o.center[i.crossAxisLine],s=t[i.crossAxisStart],l=t[i.crossAxisEnd],c=l4(o[i.crossAxisStart],o[i.crossAxisEnd]),u=c(s),d=c(l);return!u&&!d||(u?s<a:l>a)}));return o.length?1===o.length?o[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.candidates,r=e.draggable.page.borderBox.center,o=n.map((function(e){var n=e.axis,o=B3(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:F3(r,o)}})).sort((function(e,t){return t.distance-e.distance}));return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:o}):null}({pageBorderBox:l,draggable:n,droppables:o});if(!c)return s4;var u=o[c],d=e4(u.descriptor.id,r),p=function(e,t){var n=e.frame;return n?z4(t,n.scroll.diff.value):t}(u,l);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,o=e.destination,i=e.insideDestination,a=e.afterCritical;if(!o.isCombineEnabled)return null;var s=o.axis,l=L4(o.axis,t.displaceBy),c=l.value,u=n[s.start],d=n[s.end],p=q3(r4(t,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox,o=n[s.size]/4,i=b4(t,a),l=H4({displaced:r.displaced,id:t});return i?l?d>n[s.start]+o&&d<n[s.end]-o:u>n[s.start]-c+o&&u<n[s.end]-c-o:l?d>n[s.start]+c+o&&d<n[s.end]+c-o:u>n[s.start]+o&&u<n[s.end]-o}));return p?{displacedBy:l,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:o.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:i,destination:u,insideDestination:d,afterCritical:s})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,o=e.insideDestination,i=e.last,a=e.viewport,s=e.afterCritical,l=r.axis,c=L4(r.axis,n.displaceBy),u=c.value,d=t[l.start],p=t[l.end],f=function(e){var t=e.draggable,n=e.closest;return n?e.inHomeList&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:q3(r4(n,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[l.line],r=b4(t,s),o=H4({displaced:i,id:t});return r?o?p<=n:d<n-u:o?p<=n+u:d<n})),inHomeList:o4(n,r)});return v4({draggable:n,insideDestination:o,destination:r,viewport:a,last:i,displacedBy:c,index:f})}({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:u,insideDestination:d,last:i.displaced,viewport:a,afterCritical:s})},W4=function(e,t){var n;return(0,dr.Z)({},e,((n={})[t.descriptor.id]=t,n))},Z4=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,o=e.viewport,i=e.impact,a=e.scrollJumpRequest,s=o||t.viewport,l=r||t.dimensions,c=n||t.current.client.selection,u=O3(c,t.initial.client.selection),d={offset:u,selection:c,borderBoxCenter:L3(t.initial.client.borderBoxCenter,u)},p={selection:L3(d.selection,s.scroll.current),borderBoxCenter:L3(d.borderBoxCenter,s.scroll.current),offset:L3(d.offset,s.scroll.diff.value)},f={client:d,page:p};if("COLLECTING"===t.phase)return(0,dr.Z)({phase:"COLLECTING"},t,{dimensions:l,viewport:s,current:f});var m=l.draggables[t.critical.draggable.id],h=i||V4({pageOffset:p.offset,draggable:m,draggables:l.draggables,droppables:l.droppables,previousImpact:t.impact,viewport:s,afterCritical:t.afterCritical}),g=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,o=e.impact,i=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,o=D4(t),i=D4(n);if(!o)return r;if(o===i)return r;var a=r[o];if(!a.subject.withPlaceholder)return r;var s=function(e){var t=e.subject.withPlaceholder;t||_3(!1);var n=e.frame;if(!n){var r=Z3({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return(0,dr.Z)({},e,{subject:r})}var o=t.oldFrameMaxScroll;o||_3(!1);var i=O4(n,o),a=Z3({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return(0,dr.Z)({},e,{subject:a,frame:i})}(a);return W4(r,s)}({previousImpact:e.previousImpact,impact:o,droppables:r}),a=D4(o);if(!a)return i;var s=r[a];if(o4(t,s))return i;if(s.subject.withPlaceholder)return i;var l=M4(s,t,n);return W4(i,l)}({draggable:m,impact:h,previousImpact:t.impact,draggables:l.draggables,droppables:l.droppables});return(0,dr.Z)({},t,{current:f,dimensions:{draggables:l.draggables,droppables:g},impact:h,viewport:s,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})},U4=function(e){var t=e.impact,n=e.viewport,r=e.draggables,o=e.destination,i=e.forceShouldAnimate,a=t.displaced,s=h4({afterDragging:function(e,t){return e.map((function(e){return t[e]}))}(a.all,r),destination:o,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:i,last:a});return(0,dr.Z)({},t,{displaced:s})},$4=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,i=e.viewport,a=e.afterCritical,s=E4({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:a});return I4({pageBorderBoxCenter:s,draggable:n,viewport:i})},G4=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&_3(!1);var o=t.impact,i=r||t.viewport,a=n||t.dimensions,s=a.draggables,l=a.droppables,c=s[t.critical.draggable.id],u=D4(o);u||_3(!1);var d=l[u],p=U4({impact:o,viewport:i,destination:d,draggables:s}),f=$4({impact:p,draggable:c,droppable:d,draggables:s,viewport:i,afterCritical:t.afterCritical});return Z4({impact:p,clientSelection:f,state:t,dimensions:a,viewport:i})},q4=function(e){var t=e.draggable,n=e.home,r=e.draggables,o=e.viewport,i=L4(n.axis,t.displaceBy),a=e4(n.descriptor.id,r),s=a.indexOf(t);-1===s&&_3(!1);var l,c=a.slice(s+1),u=c.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),d={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:i,effected:u};return{impact:{displaced:h4({afterDragging:c,destination:n,displacedBy:i,last:null,viewport:o.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:(l=t.descriptor,{index:l.index,droppableId:l.droppableId})}},afterCritical:d}},K4=function(e){return"SNAP"===e.movementMode},Y4=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:W4(e.droppables,t)}}(e.dimensions,t);return!K4(e)||n?Z4({state:e,dimensions:r}):G4({state:e,dimensions:r})};function X4(e){return e.isDragging&&"SNAP"===e.movementMode?(0,dr.Z)({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var J4={phase:"IDLE",completed:null,shouldFlush:!1},Q4=function(e,t){if(void 0===e&&(e=J4),"FLUSH"===t.type)return(0,dr.Z)({},J4,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&_3(!1);var n=t.payload,r=n.critical,o=n.clientSelection,i=n.viewport,a=n.dimensions,s=n.movementMode,l=a.draggables[r.draggable.id],c=a.droppables[r.droppable.id],u={selection:o,borderBoxCenter:l.client.borderBox.center,offset:R3},d={client:u,page:{selection:L3(u.selection,i.scroll.initial),borderBoxCenter:L3(u.selection,i.scroll.initial),offset:L3(u.selection,i.scroll.diff.value)}},p=J3(a.droppables).every((function(e){return!e.isFixedOnPage})),f=q4({draggable:l,home:c,draggables:a.draggables,viewport:i}),m=f.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:s,dimensions:a,initial:d,current:d,isWindowScrollAllowed:p,impact:m,afterCritical:f.afterCritical,onLiftImpact:m,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&_3(!1),(0,dr.Z)({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&_3(!1),function(e){var t=e.state,n=e.published,r=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return U3(n,e.scroll)})),o=(0,dr.Z)({},t.dimensions.droppables,{},Y3(r)),i=X3(function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,o=r.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,i=function(e){var t=e.frame;return t||_3(!1),t}(n[t]).scroll.diff.value;return function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,o=f3(t.client,n),i=m3(o,r);return(0,dr.Z)({},t,{placeholder:(0,dr.Z)({},t.placeholder,{client:o}),client:o,page:i})}({draggable:e,offset:L3(o,i),initialWindowScroll:r.scroll.initial})}))}({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),a=(0,dr.Z)({},t.dimensions.draggables,{},i);n.removals.forEach((function(e){delete a[e]}));var s={droppables:o,draggables:a},l=D4(t.impact),c=l?s.droppables[l]:null,u=s.draggables[t.critical.draggable.id],d=s.droppables[t.critical.droppable.id],p=q4({draggable:u,home:d,draggables:a,viewport:t.viewport}),f=p.impact,m=p.afterCritical,h=c&&c.isCombineEnabled?t.impact:f,g=V4({pageOffset:t.current.page.offset,draggable:s.draggables[t.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:h,viewport:t.viewport,afterCritical:m}),v=(0,dr.Z)({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:g,onLiftImpact:f,dimensions:s,afterCritical:m,forceShouldAnimate:!1});return"COLLECTING"===t.phase?v:(0,dr.Z)({phase:"DROP_PENDING"},v,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;F4(e)||_3(!1);var h=t.payload.client;return M3(h,e.current.client.selection)?e:Z4({state:e,clientSelection:h,impact:K4(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return X4(e);if("COLLECTING"===e.phase)return X4(e);F4(e)||_3(!1);var g=t.payload,v=g.id,b=g.newScroll,y=e.dimensions.droppables[v];if(!y)return e;var w=U3(y,b);return Y4(e,w,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;F4(e)||_3(!1);var k=t.payload,x=k.id,_=k.isEnabled,E=e.dimensions.droppables[x];E||_3(!1),E.isEnabled===_&&_3(!1);var C=(0,dr.Z)({},E,{isEnabled:_});return Y4(e,C,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;F4(e)||_3(!1);var S=t.payload,I=S.id,T=S.isCombineEnabled,N=e.dimensions.droppables[I];N||_3(!1),N.isCombineEnabled===T&&_3(!1);var A=(0,dr.Z)({},N,{isCombineEnabled:T});return Y4(e,A,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;F4(e)||_3(!1),e.isWindowScrollAllowed||_3(!1);var P=t.payload.newScroll;if(M3(e.viewport.scroll.current,P))return X4(e);var R=C4(e.viewport,P);return K4(e)?G4({state:e,viewport:R}):Z4({state:e,viewport:R})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!F4(e))return e;var L=t.payload.maxScroll;if(M3(L,e.viewport.scroll.max))return e;var O=(0,dr.Z)({},e.viewport,{scroll:(0,dr.Z)({},e.viewport.scroll,{max:L})});return(0,dr.Z)({phase:"DRAGGING"},e,{viewport:O})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&_3(!1);var M=B4({state:e,type:t.type});return M?Z4({state:e,impact:M.impact,clientSelection:M.clientSelection,scrollJumpRequest:M.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var D=t.payload.reason;return"COLLECTING"!==e.phase&&_3(!1),(0,dr.Z)({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:D})}if("DROP_ANIMATE"===t.type){var B=t.payload,F=B.completed,j=B.dropDuration,z=B.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&_3(!1),{phase:"DROP_ANIMATING",completed:F,dropDuration:j,newHomeClientOffset:z,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},e8=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},t8=function(){return{type:"COLLECTION_STARTING",payload:null}},n8=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},r8=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},o8=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},i8=function(e){return{type:"MOVE",payload:e}},a8=function(){return{type:"MOVE_UP",payload:null}},s8=function(){return{type:"MOVE_DOWN",payload:null}},l8=function(){return{type:"MOVE_RIGHT",payload:null}},c8=function(){return{type:"MOVE_LEFT",payload:null}},u8=function(e){return{type:"DROP_COMPLETE",payload:e}},d8=function(e){return{type:"DROP",payload:e}},p8="cubic-bezier(.2,1,.1,1)",f8=0,m8=.7,h8=.75,g8="0.2s cubic-bezier(0.2, 0, 0, 1)",v8={fluid:"opacity "+g8,snap:"transform "+g8+", opacity "+g8,drop:function(e){var t=e+"s "+p8;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+g8,placeholder:"height "+g8+", width "+g8+", margin "+g8},b8=function(e){return M3(e,R3)?null:"translate("+e.x+"px, "+e.y+"px)"},y8=b8,w8=.33,k8=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var o=t(),i=r.payload.reason;if("COLLECTING"!==o.phase){if("IDLE"!==o.phase){"DROP_PENDING"===o.phase&&o.isWaiting&&_3(!1),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&_3(!1);var a=o.critical,s=o.dimensions,l=s.draggables[o.critical.draggable.id],c=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,o=e.home,i=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:(0,dr.Z)({},r,{displaced:a4}),didDropInsideDroppable:!0}:{impact:U4({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),u=c.impact,d=c.didDropInsideDroppable,p=d?t4(u):null,f=d?n4(u):null,m={index:a.draggable.index,droppableId:a.droppable.id},h={draggableId:l.descriptor.id,type:l.descriptor.type,source:m,reason:i,mode:o.movementMode,destination:p,combine:f},g=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,o=e.viewport,i=e.afterCritical,a=r.draggables,s=r.droppables,l=D4(t),c=l?s[l]:null,u=s[n.descriptor.droppableId],d=$4({impact:t,draggable:n,draggables:a,afterCritical:i,droppable:c||u,viewport:o});return O3(d,n.client.borderBox.center)}({impact:u,draggable:l,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),v={critical:o.critical,afterCritical:o.afterCritical,result:h,impact:u};if(!M3(o.current.client.offset,g)||Boolean(h.combine)){var b=function(e){var t=e.reason,n=F3(e.current,e.destination);if(n<=0)return w8;if(n>=1500)return.55;var r=w8+n/1500*.22000000000000003;return Number(("CANCEL"===t?.6*r:r).toFixed(2))}({current:o.current.client.offset,destination:g,reason:i});n({type:"DROP_ANIMATE",payload:{newHomeClientOffset:g,dropDuration:b,completed:v}})}else n(u8({completed:v}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:i}))}else e(r)}}},x8=function(){return{x:window.pageXOffset,y:window.pageYOffset}};var _8=function(e){var t=function(e){var t=e.onWindowScroll,n=b3((function(){t(x8())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),o=w3;function i(){return o!==w3}return{start:function(){i()&&_3(!1),o=k3(window,[r])},stop:function(){i()||_3(!1),n.cancel(),o(),o=w3},isActive:i}}({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},E8=function(e,t){t()},C8=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},S8=function(e,t,n,r){if(e){var o=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),o=function(o){t||n||(t=!0,e(o),clearTimeout(r))};return o.wasCalled=function(){return t},o}(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}else n(r(t))},I8=function(e,t){var n=function(e,t){var n,r=(n=[],{add:function(e){var t=setTimeout((function(){return function(e){var t=G3(n,(function(t){return t.timerId===e}));-1===t&&_3(!1),n.splice(t,1)[0].callback()}(t)})),r={timerId:t,callback:e};n.push(r)},flush:function(){if(n.length){var e=[].concat(n);n.length=0,e.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}),o=null,i=function(n){o||_3(!1),o=null,E8(0,(function(){return S8(e().onDragEnd,n,t,P3)}))};return{beforeCapture:function(t,n){o&&_3(!1),E8(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){o&&_3(!1),E8(0,(function(){var r=e().onBeforeDragStart;r&&r(C8(t,n))}))},start:function(n,i){o&&_3(!1);var a=C8(n,i);o={mode:i,lastCritical:n,lastLocation:a.source,lastCombine:null},r.add((function(){E8(0,(function(){return S8(e().onDragStart,a,t,N3)}))}))},update:function(n,i){var a=t4(i),s=n4(i);o||_3(!1);var l=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(n,o.lastCritical);l&&(o.lastCritical=n);var c,u,d=(u=a,!(null==(c=o.lastLocation)&&null==u||null!=c&&null!=u&&c.droppableId===u.droppableId&&c.index===u.index));d&&(o.lastLocation=a);var p=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(o.lastCombine,s);if(p&&(o.lastCombine=s),l||d||p){var f=(0,dr.Z)({},C8(n,o.mode),{combine:s,destination:a});r.add((function(){E8(0,(function(){return S8(e().onDragUpdate,f,t,A3)}))}))}},flush:function(){o||_3(!1),r.flush()},drop:i,abort:function(){if(o){var e=(0,dr.Z)({},C8(o.lastCritical,o.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var o=r.payload.critical;return n.beforeStart(o,r.payload.movementMode),t(r),void n.start(o,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var i=r.payload.completed.result;return n.flush(),t(r),void n.drop(i)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},T8=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&_3(!1),e.dispatch(u8({completed:r.completed}))}else t(n)}}},N8=function(e){var t=null,n=null;return function(r){return function(o){if("FLUSH"!==o.type&&"DROP_COMPLETE"!==o.type&&"DROP_ANIMATION_FINISHED"!==o.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),"DROP_ANIMATE"===o.type){var i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=k3(window,[i])}))}}}},A8=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(d8({reason:r.reason})))}}}},P8=E5.qC,R8=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,o=e.width,i=O3({x:n,y:t},{x:o,y:r});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},L8=function(){var e=document.documentElement;return e||_3(!1),e},O8=function(){var e=L8();return R8({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function M8(e,t,n){return n.descriptor.id!==t.id&&n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var D8,B8,F8=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},o=null,i=function(){o||(n.collectionStarting(),o=requestAnimationFrame((function(){o=null;var e=r,i=e.additions,a=e.removals,s=e.modified,l=Object.keys(i).map((function(e){return t.draggable.getById(e).getDimension(R3)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),c=Object.keys(s).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),u={additions:l,removals:Object.keys(a),modified:c};r={additions:{},removals:{},modified:{}},n.publish(u)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],i()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],i()},stop:function(){o&&(cancelAnimationFrame(o),o=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(t){n||_3(!1);var o=n.critical.draggable;"ADDITION"===t.type&&M8(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&M8(e,o,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:function(r,o){e.droppable.exists(r)||_3(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:function(r,o){n&&(e.droppable.exists(r)||_3(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,o){n&&(e.droppable.exists(r)||_3(!1),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:function(t){n&&_3(!1);var r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},s=e.subscribe(o);return n={critical:a,unsubscribe:s},function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,o=function(){var e=x8(),t=O8(),n=e.y,r=e.x,o=L8(),i=o.clientWidth,a=o.clientHeight;return{frame:s3({top:n,left:r,right:r+i,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:R3,displacement:R3}}}}(),i=o.scroll.current,a=t.droppable,s=r.droppable.getAllByType(a.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(i,n)})),l=r.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(i)}));return{dimensions:{draggables:X3(l),droppables:Y3(s)},critical:t,viewport:o}}({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}}},j8=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason},z8=function(e){window.scrollBy(e.x,e.y)},H8=(0,v3.Z)((function(e){return J3(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),V8=function(e){return Math.pow(e,2)},W8=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,o=n-t;return 0===o?0:(r-t)/o},Z8=360,U8=1200,$8=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,o=e.shouldUseTimeDampening,i=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return 28;if(e===t.startScrollingFrom)return 1;var n=W8({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=28*V8(1-n);return Math.ceil(r)}(t,n);return 0===i?0:o?Math.max(function(e,t){var n=t,r=U8,o=Date.now()-n;if(o>=U8)return e;if(o<Z8)return 1;var i=W8({startOfRange:Z8,endOfRange:r,current:o}),a=e*V8(i);return Math.ceil(a)}(i,r),1):i},G8=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:.25*e[t.size],maxScrollValueAt:.05*e[t.size]}}(t,o);return n[o.end]<n[o.start]?$8({distanceToEdge:n[o.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i}):-1*$8({distanceToEdge:n[o.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:i})},q8=z3((function(e){return 0===e?0:e})),K8=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},s=G8({container:n,distanceToEdges:a,dragStartTime:t,axis:d4,shouldUseTimeDampening:i}),l=G8({container:n,distanceToEdges:a,dragStartTime:t,axis:p4,shouldUseTimeDampening:i}),c=q8({x:l,y:s});if(M3(c,R3))return null;var u=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,o=n.height>t.height,i=n.width>t.width;return i||o?i&&o?null:{x:i?0:r.x,y:o?0:r.y}:r}({container:n,subject:r,proposedScroll:c});return u?M3(u,R3)?null:u:null},Y8=z3((function(e){return 0===e?0:e>0?1:-1})),X8=(D8=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,o=L3(t,r),i={x:D8(o.x,n.x),y:D8(o.y,n.y)};return M3(i,R3)?null:i}),J8=function(e){var t=e.max,n=e.current,r=e.change,o={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},i=Y8(r),a=X8({max:o,current:n,change:i});return!a||0!==i.x&&0===a.x||0!==i.y&&0===a.y},Q8=function(e,t){return J8({current:e.scroll.current,max:e.scroll.max,change:t})},e6=function(e,t){var n=e.frame;return!!n&&J8({current:n.scroll.current,max:n.scroll.max,change:t})},t6=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var l=function(e){var t=e.viewport,n=e.subject,r=e.center,o=e.shouldUseTimeDampening,i=K8({dragStartTime:e.dragStartTime,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return i&&Q8(t,i)?i:null}({dragStartTime:n,viewport:t.viewport,subject:s,center:a,shouldUseTimeDampening:r});if(l)return void o(l)}var c=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var o=r[n];return o.frame?o:null}return function(e,t){return q3(H8(t),(function(t){return t.frame||_3(!1),j4(t.frame.pageMarginBox)(e)}))}(t,r)}({center:a,destination:D4(t.impact),droppables:t.dimensions.droppables});if(c){var u=function(e){var t=e.droppable,n=e.subject,r=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var s=K8({dragStartTime:o,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:i});return s&&e6(t,s)?s:null}({dragStartTime:n,droppable:c,subject:s,center:a,shouldUseTimeDampening:r});u&&i(c.descriptor.id,u)}},n6=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow;return function(e){var o=e.scrollJumpRequest;if(o){var i=D4(e.impact);i||_3(!1);var a=function(e,t){if(!e6(e,t))return t;var r=function(e,t){var n=e.frame;return n&&e6(e,t)?X8({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var o=O3(t,r);return n(e.descriptor.id,o),O3(t,o)}(e.dimensions.droppables[i],o);if(a){var s=e.viewport,l=function(e,t,n){if(!e)return n;if(!Q8(t,n))return n;var o=function(e,t){if(!Q8(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return X8({current:r,max:n,change:t})}(t,n);if(!o)return r(n),null;var i=O3(n,o);return r(i),O3(n,i)}(e.isWindowScrollAllowed,s,a);l&&function(e,n){var r=L3(e.current.client.selection,n);t({client:r})}(e,l)}}}},r6={base:B8="data-rbd-drag-handle",draggableId:B8+"-draggable-id",contextId:B8+"-context-id"},o6=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),i6=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),a6="data-rbd-scroll-container-context-id",s6=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},l6="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_.useLayoutEffect:_.useEffect,c6=function(){var e=document.querySelector("head");return e||_3(!1),e},u6=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};var d6=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function p6(e){return e instanceof d6(e).HTMLElement}function f6(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||_3(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return $3(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=o(e);return t||_3(!1),t},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return $3(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var m6=E().createContext(null),h6=function(){var e=document.body;return e||_3(!1),e},g6={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},v6=0,b6={separator:"::"};function y6(e,t){return void 0===t&&(t=b6),(0,Ho.Ye)((function(){return""+e+t.separator+v6++}),[t.separator,e])}var w6=E().createContext(null);function k6(e){var t=(0,_.useRef)(e);return(0,_.useEffect)((function(){t.current=e})),t}var x6,_6,E6=((x6={})[13]=!0,x6[9]=!0,x6),C6=function(e){E6[e.keyCode]&&e.preventDefault()},S6=function(){var e="visibilitychange";return"undefined"==typeof document?e:q3([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}(),I6={type:"IDLE"};function T6(){}var N6=((_6={})[34]=!0,_6[33]=!0,_6[36]=!0,_6[35]=!0,_6);var A6={type:"IDLE"},P6={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function R6(e,t){if(null==t)return!1;if(Boolean(P6[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&R6(e,t.parentElement)}function L6(e,t){var n=t.target;return!!p6(n)&&R6(e,n)}var O6=function(e){return s3(e.getBoundingClientRect()).center},M6=function(){var e="matches";return"undefined"==typeof document?e:q3([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function D6(e,t){return null==e?null:e[M6](t)?e:D6(e.parentElement,t)}function B6(e,t){return e.closest?e.closest(t):D6(e,t)}function F6(e){e.preventDefault()}function j6(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!!r()&&t===n}function z6(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=r.draggable.findById(o);return!!i&&!!i.options.isEnabled&&!!j8(n.getState(),o)}var H6=[function(e){var t=(0,_.useRef)(I6),n=(0,_.useRef)(w3),r=(0,Ho.Ye)((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,a,{sourceEvent:t});if(o){t.preventDefault();var i={x:t.clientX,y:t.clientY};n.current(),c(o,i)}}}}}}),[e]),o=(0,Ho.Ye)((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),i=(0,Ho.I4)((function(){n.current=k3(window,[o,r],{passive:!1,capture:!0})}),[o,r]),a=(0,Ho.I4)((function(){"IDLE"!==t.current.type&&(t.current=I6,n.current(),i())}),[i]),s=(0,Ho.I4)((function(){var e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[a]),l=(0,Ho.I4)((function(){var e=function(e){var t=e.cancel,n=e.completed,r=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,i=e.clientY;if(0===t){var a={x:n,y:i},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);if("PENDING"!==s.type&&_3(!1),l=s.point,c=a,Math.abs(c.x-l.x)>=5||Math.abs(c.y-l.y)>=5){var l,c;e.preventDefault();var u=s.actions.fluidLift(a);o({type:"DRAGGING",actions:u})}}}},{eventName:"mouseup",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void C6(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&_3(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:S6,fn:t}]}({cancel:s,completed:a,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=k3(window,e,{capture:!0,passive:!1})}),[s,a]),c=(0,Ho.I4)((function(e,n){"IDLE"!==t.current.type&&_3(!1),t.current={type:"PENDING",point:n,actions:e},l()}),[l]);l6((function(){return i(),function(){n.current()}}),[i])},function(e){var t=(0,_.useRef)(T6),n=(0,Ho.Ye)((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var o=e.findClosestDraggableId(n);if(o){var i=e.tryGetLock(o,l,{sourceEvent:n});if(i){n.preventDefault();var a=!0,s=i.snapLift();t.current(),t.current=k3(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(N6[r.keyCode]?r.preventDefault():C6(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:S6,fn:n}]}(s,l),{capture:!0,passive:!1})}}}function l(){a||_3(!1),a=!1,t.current(),r()}}}}),[e]),r=(0,Ho.I4)((function(){t.current=k3(window,[n],{passive:!1,capture:!0})}),[n]);l6((function(){return r(),function(){t.current()}}),[r])},function(e){var t=(0,_.useRef)(A6),n=(0,_.useRef)(w3),r=(0,Ho.I4)((function(){return t.current}),[]),o=(0,Ho.I4)((function(e){t.current=e}),[]),i=(0,Ho.Ye)((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var o=e.tryGetLock(r,s,{sourceEvent:t});if(o){var i=t.touches[0],a={x:i.clientX,y:i.clientY};n.current(),d(o,a)}}}}}}),[e]),a=(0,Ho.I4)((function(){n.current=k3(window,[i],{capture:!0,passive:!1})}),[i]),s=(0,Ho.I4)((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(A6),n.current(),a())}),[a,o]),l=(0,Ho.I4)((function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),c=(0,Ho.I4)((function(){var e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:r},o=k3(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var o=e.touches[0],i={x:o.clientX,y:o.clientY};e.preventDefault(),n.actions.move(i)}else t()}},{eventName:"touchend",fn:function(e){var o=r();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&_3(!1);var o=e.touches[0];if(o&&o.force>=.15){var i=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return i?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();i&&t()}}},{eventName:S6,fn:t}]}(t),e),i=k3(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:S6,fn:t}]}(t),e);n.current=function(){o(),i()}}),[l,r,s]),u=(0,Ho.I4)((function(){var e=r();"PENDING"!==e.type&&_3(!1);var t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,o]),d=(0,Ho.I4)((function(e,t){"IDLE"!==r().type&&_3(!1);var n=setTimeout(u,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()}),[c,r,o,u]);l6((function(){return a(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(A6))}}),[r,a,o]),l6((function(){return k3(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function V6(e){var t=e.contextId,n=e.store,r=e.registry,o=e.customSensors,i=e.enableDefaultSensors,a=[].concat(i?H6:[],o||[]),s=(0,_.useState)((function(){return function(){var e=null;function t(){e||_3(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&_3(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],l=(0,Ho.I4)((function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()}),[s]);l6((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();l(e,t),e=t}))}),[s,n,l]),l6((function(){return s.tryAbandon}),[s.tryAbandon]);for(var c=(0,Ho.I4)((function(e){return z6({lockAPI:s,registry:r,store:n,draggableId:e})}),[s,r,n]),u=(0,Ho.I4)((function(e,o,i){return function(e){var t=e.lockAPI,n=e.contextId,r=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent;if(!z6({lockAPI:t,store:r,registry:o,draggableId:i}))return null;var l=o.draggable.getById(i),c=function(e,t){var n="["+o6.contextId+'="'+e+'"]',r=q3(K3(document.querySelectorAll(n)),(function(e){return e.getAttribute(o6.id)===t}));return r&&p6(r)?r:null}(n,l.descriptor.id);if(!c)return null;if(s&&!l.options.canDragInteractiveElements&&L6(c,s))return null;var u=t.claim(a||w3),d="PRE_DRAG";function p(){return l.options.shouldRespectForcePress}function f(){return t.isActive(u)}var m=function(e,t){j6({expected:e,phase:d,isLockActive:f,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function h(e){function n(){t.release(),d="COMPLETED"}function o(t,o){if(void 0===o&&(o={shouldBlockNextClick:!1}),e.cleanup(),o.shouldBlockNextClick){var i=k3(window,[{eventName:"click",fn:F6,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(i)}n(),r.dispatch(d8({reason:t}))}return"PRE_DRAG"!==d&&(n(),"PRE_DRAG"!==d&&_3(!1)),r.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),d="DRAGGING",(0,dr.Z)({isActive:function(){return j6({expected:"DRAGGING",phase:d,isLockActive:f,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return o("DROP",e)},cancel:function(e){return o("CANCEL",e)}},e.actions)}return{isActive:function(){return j6({expected:"PRE_DRAG",phase:d,isLockActive:f,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=b3((function(e){m((function(){return i8({client:e})}))})),n=h({liftActionArgs:{id:i,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return(0,dr.Z)({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return m(a8)},moveRight:function(){return m(l8)},moveDown:function(){return m(s8)},moveLeft:function(){return m(c8)}};return h({liftActionArgs:{id:i,clientSelection:O6(c),movementMode:"SNAP"},cleanup:w3,actions:e})},abort:function(){j6({expected:"PRE_DRAG",phase:d,isLockActive:f,shouldWarn:!0})&&t.release()}}}({lockAPI:s,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:o,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})}),[t,s,r,n]),d=(0,Ho.I4)((function(e){return function(e,t){var n=function(e,t){var n,r=t.target;if(!((n=r)instanceof d6(n).Element))return null;var o=B6(r,function(e){return"["+r6.contextId+'="'+e+'"]'}(e));return o&&p6(o)?o:null}(e,t);return n?n.getAttribute(r6.draggableId):null}(t,e)}),[t]),p=(0,Ho.I4)((function(e){var t=r.draggable.findById(e);return t?t.options:null}),[r.draggable]),f=(0,Ho.I4)((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[s,n]),m=(0,Ho.I4)(s.isClaimed,[s]),h=(0,Ho.Ye)((function(){return{canGetLock:c,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:m}}),[c,u,d,p,f,m]),g=0;g<a.length;g++)a[g](h)}function W6(e){return e.current||_3(!1),e.current}function Z6(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,o=e.nonce,i=e.dragHandleUsageInstructions,a=(0,_.useRef)(null),s=k6(e),l=(0,Ho.I4)((function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(s.current)}),[s]),c=function(e){var t=(0,Ho.Ye)((function(){return function(e){return"rbd-announcement-"+e}(e)}),[e]),n=(0,_.useRef)(null);return(0,_.useEffect)((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),(0,dr.Z)(e.style,g6),h6().appendChild(e),function(){setTimeout((function(){var t=h6();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),(0,Ho.I4)((function(e){var t=n.current;t&&(t.textContent=e)}),[])}(t),u=function(e){var t=e.contextId,n=e.text,r=y6("hidden-text",{separator:"-"}),o=(0,Ho.Ye)((function(){return function(e){return"rbd-hidden-text-"+e.contextId+"-"+e.uniqueId}({contextId:t,uniqueId:r})}),[r,t]);return(0,_.useEffect)((function(){var e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",h6().appendChild(e),function(){var t=h6();t.contains(e)&&t.removeChild(e)}}),[o,n]),o}({contextId:t,text:i}),d=function(e,t){var n=(0,Ho.Ye)((function(){return function(e){var t,n,r=function(e){return function(t){return"["+t+'="'+e+'"]'}}(e),o=(t="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:r(r6.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:t,dragging:"pointer-events: none;",dropAnimating:t}}),i=[(n="\n transition: "+v8.outOfTheWay+";\n ",{selector:r(o6.contextId),styles:{dragging:n,dropAnimating:n,userCancel:n}}),o,{selector:r(i6.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:s6(i,"always"),resting:s6(i,"resting"),dragging:s6(i,"dragging"),dropAnimating:s6(i,"dropAnimating"),userCancel:s6(i,"userCancel")}}(e)}),[e]),r=(0,_.useRef)(null),o=(0,_.useRef)(null),i=(0,Ho.I4)((0,v3.Z)((function(e){var t=o.current;t||_3(!1),t.textContent=e})),[]),a=(0,Ho.I4)((function(e){var t=r.current;t||_3(!1),t.textContent=e}),[]);l6((function(){(r.current||o.current)&&_3(!1);var s=u6(t),l=u6(t);return r.current=s,o.current=l,s.setAttribute("data-rbd-always",e),l.setAttribute("data-rbd-dynamic",e),c6().appendChild(s),c6().appendChild(l),a(n.always),i(n.resting),function(){var e=function(e){var t=e.current;t||_3(!1),c6().removeChild(t),e.current=null};e(r),e(o)}}),[t,a,i,n.always,n.resting,e]);var s=(0,Ho.I4)((function(){return i(n.dragging)}),[i,n.dragging]),l=(0,Ho.I4)((function(e){i("DROP"!==e?n.userCancel:n.dropAnimating)}),[i,n.dropAnimating,n.userCancel]),c=(0,Ho.I4)((function(){o.current&&i(n.resting)}),[i,n.resting]);return(0,Ho.Ye)((function(){return{dragging:s,dropping:l,resting:c}}),[s,l,c])}(t,o),p=(0,Ho.I4)((function(e){W6(a).dispatch(e)}),[]),f=(0,Ho.Ye)((function(){return(0,E5.DE)({publishWhileDragging:e8,updateDroppableScroll:n8,updateDroppableIsEnabled:r8,updateDroppableIsCombineEnabled:o8,collectionStarting:t8},p)}),[p]),m=function(){var e=(0,Ho.Ye)(f6,[]);return(0,_.useEffect)((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),h=(0,Ho.Ye)((function(){return F8(m,f)}),[m,f]),g=(0,Ho.Ye)((function(){return function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,o=function(e){var t=e.scrollDroppable,n=b3(e.scrollWindow),r=b3(t),o=null,i=function(e){o||_3(!1);var t=o,i=t.shouldUseTimeDampening,a=t.dragStartTime;t6({state:e,scrollWindow:n,scrollDroppable:r,dragStartTime:a,shouldUseTimeDampening:i})};return{start:function(e){o&&_3(!1);var t=Date.now(),n=!1,r=function(){n=!0};t6({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),o={dragStartTime:t,shouldUseTimeDampening:n},n&&i(e)},stop:function(){o&&(n.cancel(),r.cancel(),o=null)},scroll:i}}({scrollWindow:n,scrollDroppable:t}),i=n6({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}}((0,dr.Z)({scrollWindow:z8,scrollDroppable:h.scrollDroppable},(0,E5.DE)({move:i8},p)))}),[h.scrollDroppable,p]),v=function(e){var t=(0,_.useRef)({}),n=(0,_.useRef)(null),r=(0,_.useRef)(null),o=(0,_.useRef)(!1),i=(0,Ho.I4)((function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}}),[]),a=(0,Ho.I4)((function(t){var n=function(e,t){var n="["+r6.contextId+'="'+e+'"]',r=K3(document.querySelectorAll(n));if(!r.length)return null;var o=q3(r,(function(e){return e.getAttribute(r6.draggableId)===t}));return o&&p6(o)?o:null}(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),s=(0,Ho.I4)((function(e,t){n.current===e&&(n.current=t)}),[]),l=(0,Ho.I4)((function(){r.current||o.current&&(r.current=requestAnimationFrame((function(){r.current=null;var e=n.current;e&&a(e)})))}),[a]),c=(0,Ho.I4)((function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(r6.draggableId)===e&&(n.current=e)}),[]);return l6((function(){return o.current=!0,function(){o.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}}),[]),(0,Ho.Ye)((function(){return{register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}}),[i,c,l,s])}(t),b=(0,Ho.Ye)((function(){return function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,o=e.styleMarshal,i=e.getResponders,a=e.announce,s=e.autoScroller;return(0,E5.MT)(Q4,P8((0,E5.md)((t=o,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(o){if("LIFT"===o.type){var i=o.payload,a=i.id,s=i.clientSelection,l=i.movementMode,c=n();"DROP_ANIMATING"===c.phase&&r(u8({completed:c.completed})),"IDLE"!==n().phase&&_3(!1),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:l}});var u={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===l}},d=e.startPublishing(u),p=d.critical,f=d.dimensions,m=d.viewport;r({type:"INITIAL_PUBLISH",payload:{critical:p,dimensions:f,clientSelection:s,movementMode:l,viewport:m}})}else t(o)}}}}(n),k8,T8,N8,A8,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var o=t.getState();return"DRAGGING"!==o.phase&&_3(!1),void e.start(o)}n(r),e.scroll(t.getState())}}}}(s),_8,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),I8(i,a))))}({announce:c,autoScroller:g,dimensionMarshal:h,focusMarshal:v,getResponders:l,styleMarshal:d})}),[c,g,h,v,l,d]);a.current=b;var y=(0,Ho.I4)((function(){var e=W6(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),w=(0,Ho.I4)((function(){var e=W6(a).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n((0,Ho.Ye)((function(){return{isDragging:w,tryAbort:y}}),[w,y]));var k=(0,Ho.I4)((function(e){return j8(W6(a).getState(),e)}),[]),x=(0,Ho.I4)((function(){return F4(W6(a).getState())}),[]),C=(0,Ho.Ye)((function(){return{marshal:h,focus:v,contextId:t,canLift:k,isMovementAllowed:x,dragHandleUsageInstructionsId:u,registry:m}}),[t,h,u,v,k,x,m]);return V6({contextId:t,store:b,registry:m,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,_.useEffect)((function(){return y}),[y]),E().createElement(w6.Provider,{value:C},E().createElement(A5,{context:m6,store:b},e.children))}var U6=0;function $6(e){var t=(0,Ho.Ye)((function(){return""+U6++}),[]),n=e.dragHandleUsageInstructions||"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n";return E().createElement(E3,null,(function(r){return E().createElement(Z6,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))}var G6=function(e){return function(t){return e===t}},q6=G6("scroll"),K6=G6("auto"),Y6=(G6("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),X6=function e(t){return null==t||t===document.body||t===document.documentElement?null:function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Y6(n,q6)||Y6(n,K6)}(t)?t:e(t.parentElement)},J6=function(e){return{x:e.scrollLeft,y:e.scrollTop}},Q6=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},e9={passive:!1},t9={passive:!0},n9=function(e){return e.shouldPublishImmediately?e9:t9};function r9(e){var t=(0,_.useContext)(e);return t||_3(!1),t}var o9=function(e){return e&&e.env.closestScrollable||null};function i9(){}var a9={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},s9=E().memo((function(e){var t=(0,_.useRef)(null),n=(0,Ho.I4)((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),r=e.animate,o=e.onTransitionEnd,i=e.onClose,a=e.contextId,s=(0,_.useState)("open"===e.animate),l=s[0],c=s[1];(0,_.useEffect)((function(){return l?"open"!==r?(n(),c(!1),i9):t.current?i9:(t.current=setTimeout((function(){t.current=null,c(!1)})),n):i9}),[r,l,n]);var u=(0,Ho.I4)((function(e){"height"===e.propertyName&&(o(),"close"===r&&i())}),[r,i,o]),d=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,o=function(e){var t=e.placeholder;return e.isAnimatingOpenOnMount||"close"===e.animate?a9:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?v8.placeholder:null}}({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return E().createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:u,ref:e.innerRef})})),l9=E().createContext(null),c9=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return(0,_5.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(E().PureComponent),u9=function(e,t){return t?v8.drop(t.duration):e?v8.snap:v8.fluid},d9=function(e,t){return e?t?f8:m8:null};function p9(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,o=e.dropping,i=Boolean(r),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),s=Boolean(o),l=s?function(e,t){var n=b8(e);return n?t?n+" scale("+h8+")":n:null}(n,i):y8(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:u9(a,o),transform:l,opacity:d9(i,s),zIndex:s?4500:5e3,pointerEvents:"none"}}(e):{transform:y8((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t}function f9(e){e.preventDefault()}var m9=function(e,t){return e===t},h9=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function g9(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var v9={mapped:{type:"SECONDARY",offset:R3,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:g9(null)}},b9=i3((function(){var e,t,n,r=(e=(0,v3.Z)((function(e,t){return{x:e,y:t}})),t=(0,v3.Z)((function(e,t,n,r,o){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=(0,v3.Z)((function(e,n,r,o,i,a,s){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,o,i,a,null)}}})),function(r,o){if(r.isDragging){if(r.critical.draggable.id!==o.draggableId)return null;var i=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=D4(r.impact),l=(u=r.impact).at&&"COMBINE"===u.at.type?u.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(i.x,i.y),r.movementMode,a,o.isClone,s,l,c)}var u;if("DROP_ANIMATING"===r.phase){var d=r.completed;if(d.result.draggableId!==o.draggableId)return null;var p=o.isClone,f=r.dimensions.draggables[o.draggableId],m=d.result,h=m.mode,g=h9(m),v=function(e){return e.combine?e.combine.draggableId:null}(m),b={duration:r.dropDuration,curve:p8,moveTo:r.newHomeClientOffset,opacity:v?f8:null,scale:v?h8:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:f,dropping:b,draggingOver:g,combineWith:v,mode:h,forceShouldAnimate:null,snapshot:t(h,p,g,v,b)}}}return null}),o=function(){var e=(0,v3.Z)((function(e,t){return{x:e,y:t}})),t=(0,v3.Z)(g9),n=(0,v3.Z)((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=function(e){return e?n(R3,e,!0):null},o=function(t,o,i,a){var s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=n4(i),u=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(u);if(i.displaced.invisible[t])return null;var d=D3(a.displacedBy.point),p=e(d.x,d.y);return n(p,u,!0)}if(l)return r(u);var f=i.displacedBy.point,m=e(f.x,f.y);return n(m,u,s.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(e,t){return r(e,t)||o(e,t)||v9}}),{dropAnimationFinished:function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}}},null,{context:m6,pure:!0,areStatePropsEqual:m9})((function(e){var t=(0,_.useRef)(null),n=(0,Ho.I4)((function(e){t.current=e}),[]),r=(0,Ho.I4)((function(){return t.current}),[]),o=r9(w6),i=o.contextId,a=o.dragHandleUsageInstructionsId,s=o.registry,l=r9(l9),c=l.type,u=l.droppableId,d=(0,Ho.Ye)((function(){return{id:e.draggableId,index:e.index,type:c,droppableId:u}}),[e.draggableId,e.index,c,u]),p=e.children,f=e.draggableId,m=e.isEnabled,h=e.shouldRespectForcePress,g=e.canDragInteractiveElements,v=e.isClone,b=e.mapped,y=e.dropAnimationFinished;v||function(e){var t=y6("draggable"),n=e.descriptor,r=e.registry,o=e.getDraggableRef,i=e.canDragInteractiveElements,a=e.shouldRespectForcePress,s=e.isEnabled,l=(0,Ho.Ye)((function(){return{canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}}),[i,s,a]),c=(0,Ho.I4)((function(e){var t=o();return t||_3(!1),function(e,t,n){void 0===n&&(n=R3);var r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=h3(o,r),a=m3(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)}),[n,o]),u=(0,Ho.Ye)((function(){return{uniqueId:t,descriptor:n,options:l,getDimension:c}}),[n,c,l,t]),d=(0,_.useRef)(u),p=(0,_.useRef)(!0);l6((function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}}),[r.draggable]),l6((function(){if(p.current)p.current=!1;else{var e=d.current;d.current=u,r.draggable.update(u,e)}}),[u,r.draggable])}((0,Ho.Ye)((function(){return{descriptor:d,registry:s,getDraggableRef:r,canDragInteractiveElements:g,shouldRespectForcePress:h,isEnabled:m}}),[d,s,r,g,h,m]));var w=(0,Ho.Ye)((function(){return m?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":f,"data-rbd-drag-handle-context-id":i,draggable:!1,onDragStart:f9}:null}),[i,a,f,m]),k=(0,Ho.I4)((function(e){"DRAGGING"===b.type&&b.dropping&&"transform"===e.propertyName&&y()}),[y,b]),x=(0,Ho.Ye)((function(){var e=p9(b),t="DRAGGING"===b.type&&b.dropping?k:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":i,"data-rbd-draggable-id":f,style:e,onTransitionEnd:t},dragHandleProps:w}}),[i,w,f,b,k,n]),E=(0,Ho.Ye)((function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}}),[d.droppableId,d.id,d.index,d.type]);return p(x,b.snapshot,E)}));function y9(e){return r9(l9).isUsingCloneFor!==e.draggableId||e.isClone?E().createElement(b9,e):null}function w9(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return E().createElement(y9,(0,dr.Z)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var k9=function(e,t){return e===t.droppable.type},x9=function(e,t){return t.draggables[e.draggable.id]},_9={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||_3(!1),document.body}},E9=i3((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=(0,dr.Z)({},e,{shouldAnimatePlaceholder:!1}),n=(0,v3.Z)((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),r=(0,v3.Z)((function(r,o,i,a,s,l){var c=s.descriptor.id;if(s.descriptor.droppableId===r){var u=l?{render:l,dragging:n(s.descriptor)}:null,d={isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:u}}if(!o)return t;if(!a)return e;var p={isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}}));return function(n,o){var i=o.droppableId,a=o.type,s=!o.isDropDisabled,l=o.renderClone;if(n.isDragging){var c=n.critical;if(!k9(a,c))return t;var u=x9(c,n.dimensions),d=D4(n.impact)===i;return r(i,s,d,d,u,l)}if("DROP_ANIMATING"===n.phase){var p=n.completed;if(!k9(a,p.critical))return t;var f=x9(p.critical,n.dimensions);return r(i,s,h9(p.result)===i,D4(p.impact)===i,f,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var m=n.completed;if(!k9(a,m.critical))return t;var h=D4(m.impact)===i,g=Boolean(m.impact.at&&"COMBINE"===m.impact.at.type),v=m.critical.droppable.id===i;return h?g?e:t:v?e:t}return t}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:m6,pure:!0,areStatePropsEqual:m9})((function(e){var t=(0,_.useContext)(w6);t||_3(!1);var n=t.contextId,r=t.isMovementAllowed,o=(0,_.useRef)(null),i=(0,_.useRef)(null),a=e.children,s=e.droppableId,l=e.type,c=e.mode,u=e.direction,d=e.ignoreContainerClipping,p=e.isDropDisabled,f=e.isCombineEnabled,m=e.snapshot,h=e.useClone,g=e.updateViewportMaxScroll,v=e.getContainerForClone,b=(0,Ho.I4)((function(){return o.current}),[]),y=(0,Ho.I4)((function(e){o.current=e}),[]),w=((0,Ho.I4)((function(){return i.current}),[]),(0,Ho.I4)((function(e){i.current=e}),[])),k=(0,Ho.I4)((function(){r()&&g({maxScroll:O8()})}),[r,g]);!function(e){var t=(0,_.useRef)(null),n=r9(w6),r=y6("droppable"),o=n.registry,i=n.marshal,a=k6(e),s=(0,Ho.Ye)((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),l=(0,_.useRef)(s),c=(0,Ho.Ye)((function(){return(0,v3.Z)((function(e,n){t.current||_3(!1);var r={x:e,y:n};i.updateDroppableScroll(s.id,r)}))}),[s.id,i]),u=(0,Ho.I4)((function(){var e=t.current;return e&&e.env.closestScrollable?J6(e.env.closestScrollable):R3}),[]),d=(0,Ho.I4)((function(){var e=u();c(e.x,e.y)}),[u,c]),p=(0,Ho.Ye)((function(){return b3(d)}),[d]),f=(0,Ho.I4)((function(){var e=t.current,n=o9(e);e&&n||_3(!1),e.scrollOptions.shouldPublishImmediately?d():p()}),[p,d]),m=(0,Ho.I4)((function(e,r){t.current&&_3(!1);var o=a.current,i=o.getDroppableRef();i||_3(!1);var l=function(e){return{closestScrollable:X6(e),isFixedOnPage:Q6(e)}}(i),c={ref:i,descriptor:s,env:l,scrollOptions:r};t.current=c;var u=function(e){var t=e.ref,n=e.descriptor,r=e.env,o=e.windowScroll,i=e.direction,a=e.isDropDisabled,s=e.isCombineEnabled,l=e.shouldClipSubject,c=r.closestScrollable,u=function(e,t){var n=g3(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,a=o+t.scrollWidth,s=l3({top:r,right:a,bottom:i,left:o},n.border);return d3({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})}(t,c),d=m3(u,o),p=function(){if(!c)return null;var e=g3(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:m3(e,o),scroll:J6(c),scrollSize:t,shouldClipSubject:l}}();return function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,o=e.isFixedOnPage,i=e.direction,a=e.client,s=e.page,l=e.closest,c=function(){if(!l)return null;var e=l.scrollSize,t=l.client,n=R8({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:n,diff:{value:R3,displacement:R3}}}}(),u="vertical"===i?d4:p4;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:u,isEnabled:n,client:a,page:s,frame:c,subject:Z3({page:s,withPlaceholder:null,axis:u,frame:c})}}({descriptor:n,isEnabled:!a,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:i,client:u,page:d,closest:p})}({ref:i,descriptor:s,env:l,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),d=l.closestScrollable;return d&&(d.setAttribute(a6,n.contextId),d.addEventListener("scroll",f,n9(c.scrollOptions))),u}),[n.contextId,s,f,a]),h=(0,Ho.I4)((function(){var e=t.current,n=o9(e);return e&&n||_3(!1),J6(n)}),[]),g=(0,Ho.I4)((function(){var e=t.current;e||_3(!1);var n=o9(e);t.current=null,n&&(p.cancel(),n.removeAttribute(a6),n.removeEventListener("scroll",f,n9(e.scrollOptions)))}),[f,p]),v=(0,Ho.I4)((function(e){var n=t.current;n||_3(!1);var r=o9(n);r||_3(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),b=(0,Ho.Ye)((function(){return{getDimensionAndWatchScroll:m,getScrollWhileDragging:h,dragStopped:g,scroll:v}}),[g,m,h,v]),y=(0,Ho.Ye)((function(){return{uniqueId:r,descriptor:s,callbacks:b}}),[b,s,r]);l6((function(){return l.current=y.descriptor,o.droppable.register(y),function(){t.current&&g(),o.droppable.unregister(y)}}),[b,s,g,y,i,o.droppable]),l6((function(){t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)}),[e.isDropDisabled,i]),l6((function(){t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,i])}({droppableId:s,type:l,mode:c,direction:u,isDropDisabled:p,isCombineEnabled:f,ignoreContainerClipping:d,getDroppableRef:b});var x=E().createElement(c9,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,r=e.data,o=e.animate;return E().createElement(s9,{placeholder:r,onClose:t,innerRef:w,animate:o,contextId:n,onTransitionEnd:k})})),C=(0,Ho.Ye)((function(){return{innerRef:y,placeholder:x,droppableProps:{"data-rbd-droppable-id":s,"data-rbd-droppable-context-id":n}}}),[n,s,x,y]),I=h?h.dragging.draggableId:null,T=(0,Ho.Ye)((function(){return{droppableId:s,type:l,isUsingCloneFor:I}}),[s,I,l]);return E().createElement(l9.Provider,{value:T},a(C,m),function(){if(!h)return null;var e=h.dragging,t=h.render,n=E().createElement(y9,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(n,r){return t(n,r,e)}));return S().createPortal(n,v())}())}));function C9(e){let{value:t,remove:n,onUpdate:r,onCheck:o,index:i}=e;return(0,TQ.jsxs)("div",{className:"mailpoet-form-segments-settings-list","data-automation-id":"custom_field_value_settings",children:[(0,TQ.jsx)("input",{type:"checkbox",defaultChecked:t.isChecked||!1,onChange:e=>o(t.id,e.target.checked)},`check-${t.id}`),(0,TQ.jsx)("input",{type:"text",value:t.name,"data-automation-id":"custom_field_value_settings_value",onChange:e=>r(t.id,e.target.value)}),0!==i&&(0,TQ.jsx)(Xo,{icon:"no-alt",color:"#900",className:"mailpoet-form-segments-segment-remove",onClick:(0,Ee.partial)(n,t.id)})]},t.id)}function S9(e){let{values:t,update:n,remove:r,onReorder:o}=e;const[i,a]=(0,_.useState)(t);if((0,_.useEffect)((()=>{a(t)}),[t]),0===i.length)return null;const s=(e,t)=>{const r=i.find((t=>t.id===e));r.name=t,n(r)},l=(e,t)=>{const r=i.find((t=>t.id===e));if(t){const e=i.find((e=>e.isChecked));e&&(delete e.isChecked,n(e)),r.isChecked=!0}else delete r.isChecked;n(r)};return(0,TQ.jsx)("div",{className:"mailpoet-dnd-items-list",children:(0,TQ.jsx)($6,{onDragEnd:e=>{const t=e.source.index,n=e.destination.index,r=[...i],[s]=r.splice(t,1);r.splice(n,0,s),a(r),o(r)},children:(0,TQ.jsx)(E9,{droppableId:"droppable",children:e=>(0,TQ.jsxs)("div",{...e.droppableProps,ref:e.innerRef,children:[i.map(((e,t)=>(0,TQ.jsx)(w9,{draggableId:e.id,index:t,children:n=>(0,TQ.jsx)("div",{ref:n.innerRef,...n.draggableProps,...n.dragHandleProps,children:(0,TQ.jsx)(C9,{index:t,value:e,remove:r,onCheck:l,onUpdate:s},`inner${e.id}`)})},e.id))),e.placeholder]})})})})}E9.defaultProps=_9,C9.propTypes={value:O$().shape({name:O$().string.isRequired,id:O$().string.isRequired,isChecked:O$().bool}).isRequired,onUpdate:O$().func.isRequired,onCheck:O$().func.isRequired,index:O$().number.isRequired,remove:O$().func.isRequired},S9.propTypes={values:O$().arrayOf(O$().shape({name:O$().string.isRequired,id:O$().string.isRequired}).isRequired).isRequired,update:O$().func.isRequired,remove:O$().func.isRequired,onReorder:O$().func.isRequired};var I9=S9;function T9(e){let{label:t,mandatory:n,values:r,isSaving:o,onSave:i,isDeleting:a,onCustomFieldDelete:s,onChange:l,useDragAndDrop:c}=e;const[u,d]=(0,_.useState)(t),[p,f]=(0,_.useState)(n),[m,h]=(0,_.useState)(JSON.parse(JSON.stringify(r))),g=(0,_.useMemo)((()=>({label:u,mandatory:p,values:m,isValid:(0,Ee.reduce)(m,((e,t)=>!(0,Ee.isEmpty)(t.name)&&e),!0)})),[u,p,m]),v=p!==n||!(0,Ee.isEqualWith)(r,m)||u!==t;return(0,_.useEffect)((()=>{l&&l(g,v)}),[g,l,v]),(0,TQ.jsxs)("div",{className:"custom-field-settings","data-automation-id":"custom_field_settings",children:[(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("label"),value:u,"data-automation-id":"settings_custom_text_label_input",onChange:d}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("blockMandatory"),checked:p,onChange:f}),(0,TQ.jsx)(I9,{remove:e=>{h(m.filter((t=>e!==t.id)))},update:e=>{h(m.map((t=>e.id!==t.id?t:e)))},values:m,onReorder:h,useDragAndDrop:c}),(0,TQ.jsx)(ga,{isLink:!0,onClick:()=>h([...m,{id:`${1e3*Math.random()}-${Date.now()}`,name:`Option ${m.length+1}`}]),className:"button-on-top","data-automation-id":"custom_field_values_add_item",children:SQ.Z.I18n.t("customFieldAddItem")}),(0,TQ.jsx)("br",{}),i?(0,TQ.jsx)(ga,{isPrimary:!0,onClick:()=>i({mandatory:p,values:m,label:u}),isBusy:o,disabled:o||!v,className:"button-on-top","data-automation-id":"custom_field_save",children:SQ.Z.I18n.t("customFieldSaveCTA")}):null,s?(0,TQ.jsx)(Z2,{isBusy:o||a,onDelete:s}):null]})}T9.propTypes={label:O$().string,mandatory:O$().bool,values:O$().arrayOf(O$().shape({name:O$().string.isRequired,id:O$().string.isRequired})),onSave:O$().func,isSaving:O$().bool,isDeleting:O$().bool,onCustomFieldDelete:O$().func,onChange:O$().func,useDragAndDrop:O$().bool},T9.defaultProps={label:"",mandatory:!1,isSaving:!1,values:[],isDeleting:!1,onCustomFieldDelete:null,onSave:null,onChange:null,useDragAndDrop:!0};var N9=T9;function A9(e){let{attributes:t,setAttributes:n,clientId:r}=e;const o=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),i=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:a,deleteCustomField:s,customFieldEdited:l}=(0,ur.Z)("mailpoet-form-editor"),c=(0,TQ.jsxs)(_E,{children:[(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("customFieldSettings"),initialOpen:!0,children:(0,TQ.jsx)(N9,{label:t.label,mandatory:t.mandatory,values:t.values,isSaving:o,onSave:e=>a({customFieldId:t.customFieldId,data:{params:Q2("radio",e)},onFinish:()=>n({mandatory:e.mandatory,values:e.values,label:e.label})}),onCustomFieldDelete:()=>s(t.customFieldId,r),isDeleting:i,onChange:(e,t)=>t&&l()})})}),(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("displayLabel"),checked:!t.hideLabel,onChange:e=>n({hideLabel:!e})})})})]});return(0,TQ.jsxs)(V2,{className:t.className,children:[c,(0,TQ.jsx)("span",{className:"mailpoet_radio_label","data-automation-id":"editor_custom_field_radio_buttons_block",children:t.hideLabel?null:J2(t)}),Array.isArray(t.values)&&t.values.map((e=>(0,TQ.jsx)("div",{children:(0,TQ.jsxs)("label",{children:[(0,TQ.jsx)("input",{type:"radio",disabled:!0,checked:e.isChecked||!1,className:"mailpoet_radio"}),e.name]})},e.id)))]})}A9.propTypes={attributes:O$().shape({label:O$().string.isRequired,customFieldId:O$().number.isRequired,values:O$().arrayOf(O$().shape({name:O$().string.isRequired,id:O$().string.isRequired,isChecked:O$().bool})),mandatory:O$().bool.isRequired,hideLabel:O$().bool,className:O$().string}).isRequired,setAttributes:O$().func.isRequired,clientId:O$().string.isRequired};var P9=A9;let R9,L9;!function(e){e.Divider="divider",e.Spacer="spacer"}(R9||(R9={})),function(e){e.Solid="solid",e.Dashed="dashed",e.Dotted="dotted"}(L9||(L9={}));const O9={className:void 0,height:1,type:R9.Divider,style:L9.Solid,dividerHeight:1,dividerWidth:100,color:"black"},M9=()=>`${Math.random().toString()}-${Date.now()}`,D9=e=>e.map((e=>{const t={name:e.value,id:M9()};return(0,Ee.has)(e,"is_checked")&&e.is_checked&&(t.isChecked=!0),t})),B9=(e,t,n)=>{const r=t.find((t=>t.id===parseInt(e.id,10)));if(!r)return null;const o={...n,name:B2({text:"mailpoet-form/custom-text",textarea:"mailpoet-form/custom-textarea",radio:"mailpoet-form/custom-radio",checkbox:"mailpoet-form/custom-checkbox",select:"mailpoet-form/custom-select",date:"mailpoet-form/custom-date"}[r.type],r)};return o.attributes.customFieldId=r.id,e.params&&((0,Ee.has)(e.params,"validate")&&e.params.validate&&(o.attributes.validate=e.params.validate),(0,Ee.has)(e.params,"hide_label")&&(o.attributes.hideLabel=!!e.params.hide_label),(0,Ee.has)(e.params,"lines")&&(o.attributes.lines=e.params.lines),(0,Ee.has)(e.params,"date_type")&&(o.attributes.dateType=e.params.date_type),(0,Ee.has)(e.params,"date_format")&&(o.attributes.dateFormat=e.params.date_format),(0,Ee.has)(e.params,"is_default_today")&&(o.attributes.defaultToday=!!e.params.is_default_today),(0,Ee.has)(e.params,"values")&&Array.isArray(e.params.values)&&(o.attributes.values=D9(e.params.values))),"text"!==r.type&&"textarea"!==r.type||(o.attributes.styles=a5(e.styles)),o},F9=function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const i=j9(t,n,r,o),a={clientId:M9(),name:`core/${e.type}`,isValid:!0,attributes:{style:{color:{}}},innerBlocks:i(e.body?e.body:[])},s=s5(n,e.params.text_color),l=s5(n,e.params.background_color),c=l5(r,e.params.gradient);return(0,Ee.has)(e.params,"width")&&(a.attributes.width=Number.isNaN(Number(e.params.width))?e.params.width:`${e.params.width}%`),(0,Ee.has)(e.params,"vertical_alignment")&&(a.attributes.verticalAlignment=e.params.vertical_alignment),(0,Ee.has)(e.params,"text_color")&&(a.attributes.textColor=s,a.attributes.style.color.text=s?void 0:e.params.text_color),(0,Ee.has)(e.params,"background_color")&&(a.attributes.backgroundColor=l,a.attributes.style.color.background=l?void 0:e.params.background_color),(0,Ee.has)(e.params,"gradient")&&(a.attributes.gradient=c,a.attributes.style.color.gradient=c?void 0:e.params.gradient),(0,Ee.has)(e.params,"class_name")&&e.params.class_name&&(a.attributes.className=e.params.class_name),(0,Ee.has)(e.params,"padding")&&(a.attributes.style.spacing={padding:e.params.padding}),(0,Ee.has)(e.params,"is_stacked_on_mobile")&&(a.attributes.isStackedOnMobile="1"===e.params.is_stacked_on_mobile),"columns"!==e.type||(0,Ee.has)(e.params,"is_stacked_on_mobile")||(a.attributes.isStackedOnMobile=!0),a},j9=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!Array.isArray(r))throw new Error("Mapper expects customFields to be an array.");const o=o=>{if(!Array.isArray(o))throw new Error("Mapper expects form body to be an array.");return o.map((o=>{var i,a,s,l,c,u;if(["column","columns"].includes(o.type))return F9(o,e,t,n,r);const d={clientId:`${o.id}_${M9()}`,isValid:!0,innerBlocks:[],attributes:{labelWithinInput:!1,mandatory:!1,className:null}};if(["heading","paragraph"].includes(o.type)&&(d.attributes.style={color:{},typography:{fontSize:void 0,lineHeight:void 0}}),o.params&&(0,Ee.has)(o.params,"class_name")&&(d.attributes.className=o.params.class_name),o.params&&(0,Ee.has)(o.params,"required")&&(d.attributes.mandatory=!!o.params.required),o.params&&(0,Ee.has)(o.params,"label_within")&&(d.attributes.labelWithinInput=!!o.params.label_within),o.params&&(d.attributes.label=o.params.label?o.params.label:""),o.params&&(0,Ee.has)(o.params,"text_color")){const e=s5(t,o.params.text_color);d.attributes.textColor=e,["heading","paragraph"].includes(o.type)&&!e?d.attributes.style.color.text=o.params.text_color:e||(d.attributes.customTextColor=o.params.text_color)}if(o.params&&(0,Ee.has)(o.params,"background_color")){const e=s5(t,o.params.background_color);d.attributes.backgroundColor=e,["heading","paragraph"].includes(o.type)&&!e?d.attributes.style.color.background=o.params.background_color:e||(d.attributes.customBackgroundColor=o.params.background_color)}if(o.params&&(0,Ee.has)(o.params,"font_size")){const t=c5(e,o.params.font_size);d.attributes.fontSize=t,d.attributes.style.typography.fontSize=t?void 0:r5(o.params.font_size)}o.params&&(0,Ee.has)(o.params,"line_height")&&(d.attributes.style.typography.lineHeight=o.params.line_height);let p=2;switch(o.id){case"email":return{...d,name:"mailpoet-form/email-input",attributes:{...d.attributes,styles:a5(o.styles)}};case"heading":return o.params&&(0,Ee.has)(o.params,"level")&&(p=r5(o.params.level),void 0===p&&(p=2)),{...d,attributes:{...d.attributes,content:o.params?.content||"",level:p,textAlign:o.params?.align,anchor:o.params?.anchor,className:o.params?.class_name},name:"core/heading"};case"paragraph":return{...d,attributes:{...d.attributes,content:o.params?.content||"",align:o.params?.align,className:o.params?.class_name,dropCap:"1"===o.params?.drop_cap},name:"core/paragraph"};case"image":return{...d,name:"core/image",attributes:{className:o.params?.class_name||"",align:o.params?.align,url:o.params?.url,alt:o.params?.alt,title:o.params?.title,caption:o.params?.caption,linkDestination:o.params?.link_destination,link:o.params?.link,href:o.params?.href,linkClass:o.params?.link_class,rel:o.params?.rel,linkTarget:o.params?.link_target,id:o.params?.id,sizeSlug:o.params?.size_slug,width:o.params?.width,height:o.params?.height}};case"first_name":return{...d,name:"mailpoet-form/first-name-input",attributes:{...d.attributes,styles:a5(o.styles)}};case"last_name":return{...d,name:"mailpoet-form/last-name-input",attributes:{...d.attributes,styles:a5(o.styles)}};case"segments":return o.params&&(0,Ee.has)(o.params,"values")&&Array.isArray(o.params.values)?d.attributes.values=o.params.values.map((e=>({id:e.id,isChecked:"1"===e.is_checked||void 0}))):d.attributes.values=[],{...d,name:"mailpoet-form/segment-select"};case"submit":return{...d,name:"mailpoet-form/submit-button",attributes:{...d.attributes,styles:a5(o.styles)}};case"divider":return delete d.attributes.label,{...d,name:"mailpoet-form/divider",attributes:{className:d.attributes.className,height:r5(null!==(i=o.params?.height)&&void 0!==i?i:O9.height),type:null!==(a=o.params?.type)&&void 0!==a?a:O9.type,style:null!==(s=o.params?.style)&&void 0!==s?s:O9.style,dividerHeight:r5(null!==(l=o.params?.divider_height)&&void 0!==l?l:O9.dividerHeight),dividerWidth:r5(null!==(c=o.params?.divider_width)&&void 0!==c?c:O9.dividerWidth),color:null!==(u=o.params?.color)&&void 0!==u?u:O9.color}};case"html":return{...d,name:"mailpoet-form/html",attributes:{className:d.attributes.className,content:o.params&&o.params.text?o.params.text:"",nl2br:!(!o.params||!o.params.nl2br||!o.params.nl2br)}};default:return Number.isInteger(parseInt(o.id,10))?B9(o,r,d):null}})).filter(Boolean)};return o};function z9(e){return{title:e.name,description:"",icon:F2,category:"custom-fields",attributes:{label:{type:"string",default:e.name},hideLabel:{type:"boolean",default:!1},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},values:{type:"array",default:e.params.values?D9(e.params.values):[]},customFieldId:{type:"string",default:e.id}},supports:{html:!1,multiple:!1},edit:P9,save:()=>null}}function H9(e){let{label:t,mandatory:n,isSaving:r,onSave:o,isChecked:i,checkboxLabel:a,isDeleting:s,onCustomFieldDelete:l,onChange:c}=e;const[u,d]=(0,_.useState)(t),[p,f]=(0,_.useState)(n),[m,h]=(0,_.useState)(i),[g,v]=(0,_.useState)(a),b=p!==n||m!==i||u!==t||g!==a,y=(0,_.useMemo)((()=>({mandatory:p,isChecked:m,label:u,checkboxLabel:g,isValid:!(0,Ee.isEmpty)(g)})),[u,p,m,g]);return(0,_.useEffect)((()=>{c(y,b)}),[y,c,b]),(0,TQ.jsxs)("div",{className:"custom-field-settings",children:[(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("label"),value:u,"data-automation-id":"settings_custom_text_label_input",onChange:d}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("blockMandatory"),checked:p,onChange:f}),(0,TQ.jsxs)(Ky,{children:[(0,TQ.jsx)("input",{type:"checkbox",checked:m,onChange:e=>h(!!e.target.checked)}),(0,TQ.jsx)("input",{value:g,"data-automation-id":"settings_custom_checkbox_value",type:"text",onChange:e=>v(e.target.value)})]}),o?(0,TQ.jsx)(ga,{isPrimary:!0,onClick:()=>o(y),isBusy:r,disabled:r||!b,className:"button-on-top","data-automation-id":"custom_field_save",children:SQ.Z.I18n.t("customFieldSaveCTA")}):null,l?(0,TQ.jsx)(Z2,{isBusy:r||s,onDelete:l}):null]})}H9.propTypes={label:O$().string,mandatory:O$().bool,onSave:O$().func,isSaving:O$().bool,isChecked:O$().bool,checkboxLabel:O$().string,isDeleting:O$().bool,onCustomFieldDelete:O$().func,onChange:O$().func},H9.defaultProps={label:"",mandatory:!1,onSave:null,isSaving:!1,isChecked:!1,checkboxLabel:"",isDeleting:!1,onCustomFieldDelete:null,onChange:()=>{}};var V9=H9;function W9(e){let{attributes:t,setAttributes:n,clientId:r}=e;const o=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),i=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:a,deleteCustomField:s,customFieldEdited:l}=(0,ur.Z)("mailpoet-form-editor"),c=()=>{if(Array.isArray(t.values)){const e=t.values[0];if(e)return e.name}return""},u=()=>{let e=!1;if(Array.isArray(t.values)){const n=t.values[0];n&&n.isChecked&&(e=!0)}return e},d=(0,TQ.jsxs)(_E,{children:[(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("customFieldSettings"),initialOpen:!0,children:(0,TQ.jsx)(V9,{label:t.label,mandatory:t.mandatory,isSaving:o,isChecked:u(),checkboxLabel:c(),onSave:e=>a({customFieldId:t.customFieldId,data:{params:Q2("checkbox",e)},onFinish:()=>n({mandatory:e.mandatory,label:e.label,values:[{isChecked:e.isChecked,name:e.checkboxLabel}]})}),onCustomFieldDelete:()=>s(t.customFieldId,r),isDeleting:i,onChange:(e,t)=>t&&l()})})}),(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("displayLabel"),checked:!t.hideLabel,onChange:e=>n({hideLabel:!e})})})})]});let p=c();return t.mandatory&&(p+=" *"),(0,TQ.jsxs)(V2,{className:t.className,children:[d,(0,TQ.jsx)("span",{className:"mailpoet_checkbox_label","data-automation-id":"editor_custom_field_checkbox_block",children:t.hideLabel||!t.label?null:t.label}),(0,TQ.jsx)("div",{children:(0,TQ.jsxs)("label",{children:[(0,TQ.jsx)("input",{type:"checkbox",disabled:!0,checked:u(),className:"mailpoet_checkbox"}),(0,TQ.jsx)("span",{dangerouslySetInnerHTML:{__html:p}})]})})]})}W9.propTypes={attributes:O$().shape({label:O$().string.isRequired,customFieldId:O$().number.isRequired,mandatory:O$().bool.isRequired,hideLabel:O$().bool,className:O$().string,values:O$().arrayOf(O$().shape({name:O$().string.isRequired,isChecked:O$().bool}))}).isRequired,setAttributes:O$().func.isRequired,clientId:O$().string.isRequired};var Z9=W9;function U9(e){return{title:e.name,description:"",icon:F2,category:"custom-fields",attributes:{label:{type:"string",default:e.name},hideLabel:{type:"boolean",default:!1},values:{type:"array",default:e.params.values?D9(e.params.values):[]},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},customFieldId:{type:"string",default:e.id}},supports:{html:!1,multiple:!1},edit:Z9,save:()=>null}}function $9(e){let{attributes:t,setAttributes:n,clientId:r}=e;const o=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),i=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldSaving()),[]),a=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldDeleting()),[]),{saveCustomField:s,deleteCustomField:l,customFieldEdited:c}=(0,ur.Z)("mailpoet-form-editor"),u=(0,TQ.jsxs)(_E,{children:[(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("customFieldSettings"),initialOpen:!0,children:(0,TQ.jsx)(N9,{label:t.label,mandatory:t.mandatory,values:t.values,isSaving:i,onSave:e=>s({customFieldId:t.customFieldId,data:{params:Q2("select",e)},onFinish:()=>n({mandatory:e.mandatory,values:e.values,label:e.label})}),onCustomFieldDelete:()=>l(t.customFieldId,r),isDeleting:a,onChange:(e,t)=>t&&c()})})}),(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("displayLabelWithinInput"),checked:t.labelWithinInput,onChange:e=>n({labelWithinInput:e})})})})]});return(0,TQ.jsxs)(V2,{className:t.className,children:[u,(0,TQ.jsxs)("div",{className:"mailpoet_custom_select","data-automation-id":"custom_select_block",children:[t.labelWithinInput?null:(0,TQ.jsx)("label",{className:"mailpoet_select_label",htmlFor:r,children:J2(t)}),(()=>{let e=t.labelWithinInput?J2(t):"-";const n=[{label:e}];!Array.isArray(t.values)&&t.values.length||t.values.forEach((r=>{n.push({label:r.name}),!t.labelWithinInput&&r.isChecked&&(e=r.name)}));const i={};return void 0!==o.inputPadding&&(i.padding=o.inputPadding),void 0!==o.alignment&&(i.textAlign=o.alignment,i.margin=m5(i.textAlign)),o.fontFamily&&(i.fontFamily=o.fontFamily),(0,TQ.jsx)("select",{style:i,className:"mailpoet_select",id:r,value:e,readOnly:!0,children:n.map(((e,t)=>(0,TQ.jsx)("option",{value:e.label,disabled:0===t,children:e.label},e.label)))})})()]})]})}$9.propTypes={attributes:O$().shape({customFieldId:O$().number.isRequired,labelWithinInput:O$().bool.isRequired,label:O$().string.isRequired,values:O$().arrayOf(O$().shape({name:O$().string.isRequired,isChecked:O$().bool,id:O$().string.isRequired})),mandatory:O$().bool.isRequired,className:O$().string}).isRequired,setAttributes:O$().func.isRequired,clientId:O$().string.isRequired};var G9=$9;function q9(e){return{title:e.name,description:"",icon:F2,category:"custom-fields",attributes:{label:{type:"string",default:e.name},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!!e.params.required&&!!e.params.required},values:{type:"array",default:e.params.values?D9(e.params.values):[]},customFieldId:{type:"string",default:e.id}},supports:{html:!1,multiple:!1},edit:G9,save:()=>null}}function K9(e){return{date:{name:"mailpoet-form/custom-date",settings:n5(e)},text:{name:"mailpoet-form/custom-text",settings:y5(e)},textarea:{name:"mailpoet-form/custom-textarea",settings:x5(e)},radio:{name:"mailpoet-form/custom-radio",settings:z9(e)},checkbox:{name:"mailpoet-form/custom-checkbox",settings:U9(e)},select:{name:"mailpoet-form/custom-select",settings:q9(e)}}}var Y9=(0,TQ.jsxs)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,TQ.jsx)(Po,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,TQ.jsx)(Po,{d:"M19 13H5v-2h14v2z"})]});const X9={title:SQ.Z.I18n.t("blockDivider"),description:null,icon:Y9,category:"design",attributes:{height:{type:"number",default:O9.height},type:{type:"string",default:O9.type},style:{type:"string",default:O9.style},dividerHeight:{type:"number",default:O9.dividerHeight},dividerWidth:{type:"number",default:O9.dividerWidth},color:{type:"string",default:O9.color}},supports:{html:!1,multiple:!0},edit:function(e){var t,n,r;let{attributes:o,setAttributes:i}=e;const a=null!==(t=o.dividerHeight)&&void 0!==t?t:O9.dividerHeight,s=null!==(n=o.dividerWidth)&&void 0!==n?n:O9.dividerWidth,l=null!==(r=o.height)&&void 0!==r?r:O9.height,c=(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("blockDividerStyle"),"data-automation-id":"settings_divider_style",value:o.style,onChange:e=>i({style:e}),options:[{value:L9.Solid,label:SQ.Z.I18n.t("blockDividerStyleSolid")},{value:L9.Dashed,label:SQ.Z.I18n.t("blockDividerStyleDashed")},{value:L9.Dotted,label:SQ.Z.I18n.t("blockDividerStyleDotted")}]}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("blockDividerDividerHeight"),className:"mailpoet-automation-styles-divider-height",value:a,min:1,max:40,allowReset:!0,onChange:e=>{let t=l;void 0!==e&&(t=Math.max(e,l)),i({dividerHeight:e,height:t})}}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("blockDividerDividerWidth"),className:"mailpoet-automation-styles-divider-width",value:s,min:1,max:100,allowReset:!0,onChange:e=>i({dividerWidth:e})}),(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("blockDividerColor"),value:o.color,onChange:e=>i({color:e})})]}),u={};return o.type===R9.Divider&&(u.borderTopStyle=o.style,u.borderTopWidth=a,u.borderTopColor=o.color,u.height=a,u.width=`${s}%`),(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(_E,{children:(0,TQ.jsx)(zQ,{children:(0,TQ.jsxs)(F_,{title:SQ.Z.I18n.t("formSettingsStyles"),initialOpen:!0,children:[(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("blockSpacerHeight"),className:"mailpoet-automation-spacer-height-size",value:l,min:1,max:400,allowReset:!0,onChange:e=>{let t=a;t=void 0!==e?Math.min(e,a):1,i({height:e,dividerHeight:t})}}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("blockSpacerEnableDivider"),className:"mailpoet-automation-divider-togle-enable",checked:o.type===R9.Divider,onChange:e=>i({type:e?R9.Divider:R9.Spacer})}),o.type===R9.Divider&&c]})})}),(0,TQ.jsx)("div",{className:Lr()("mailpoet_spacer",o.className),"data-automation-id":"editor_spacer_block",style:{height:l,display:"flex",flexDirection:"column",alignItems:"center",width:"100%",justifyContent:"center"},children:(0,TQ.jsx)("div",{className:"mailpoet_divider","data-automation-id":"editor_divider_block",style:u})})]})},save:()=>null};function J9(e){let{attributes:t,setAttributes:n}=e;const r=(0,TQ.jsxs)(_E,{children:[(0,TQ.jsx)(zQ,{children:(0,TQ.jsxs)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:[(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("label"),value:t.label,"data-automation-id":"settings_email_label_input",onChange:e=>n({label:e})}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("displayLabelWithinInput"),checked:t.labelWithinInput,onChange:e=>n({labelWithinInput:e})})]})}),(0,TQ.jsx)(p5,{styles:t.styles,onChange:e=>n({styles:e})})]});return(0,TQ.jsxs)(TQ.Fragment,{children:[r,(0,TQ.jsx)(g5,{className:t.className,name:"email",label:t.label,labelWithinInput:!!t.labelWithinInput,mandatory:!0,styles:t.styles})]})}J9.propTypes={attributes:O$().shape({label:O$().string.isRequired,labelWithinInput:O$().bool.isRequired,className:O$().string,styles:f5.isRequired}).isRequired,setAttributes:O$().func.isRequired};var Q9=J9,e7=(0,TQ.jsxs)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,TQ.jsx)(Po,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,TQ.jsx)(Ao,{children:(0,TQ.jsx)(Po,{fill:"#32373C",d:"m18.82592,6.5l-14,0c-0.8,0 -1.5,0.7 -1.5,1.5l0,8c0,0.8 0.7,1.5 1.5,1.5l14,0c0.8,0 1.5,-0.7 1.5,-1.5l0,-8c0,-0.8 -0.7,-1.5 -1.5,-1.5zm-1.2,1l-5.8,4.9l-5.8,-4.9l11.6,0zm1.7,8.5c0,0.3 -0.2,0.5 -0.5,0.5l-14,0c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-8c0,-0.2 0.1,-0.4 0.3,-0.4l6.9,5.9c0.1,0.1 0.2,0.1 0.3,0.1s0.2,0 0.3,-0.1l6.9,-5.9c0.2,0.1 0.3,0.2 0.3,0.4l0,8z"})})]});const t7={title:SQ.Z.I18n.t("blockEmail"),description:SQ.Z.I18n.t("blockEmailDescription"),icon:e7,category:"obligatory",attributes:{label:{type:"string",default:SQ.Z.I18n.t("blockEmail")},labelWithinInput:{type:"boolean",default:!0},styles:{type:"object",default:o5}},supports:{html:!1,inserter:!1,multiple:!1},edit:Q9,save:()=>null};var n7=function(e){let{styles:t,onChange:n,formInputPadding:r,formFontFamily:o}=e;const i=(0,_.useRef)(t),a=i.current,s=(e,t)=>{const r={...i.current};r[e]=t,n(r),i.current=r};return(0,TQ.jsx)(zQ,{className:"mailpoet-automation-input-styles-panel",children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("formSettingsStyles"),initialOpen:!1,children:(0,TQ.jsxs)("div",{className:"mailpoet-styles-settings","data-automation-id":"input_styles_settings",children:[(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("formSettingsDisplayFullWidth"),checked:a.fullWidth,onChange:(0,Ee.partial)(s,"fullWidth")}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("formSettingsInheritStyleFromTheme"),checked:a.inheritFromTheme,onChange:e=>{if(e)return void s("inheritFromTheme",e);const t={...i.current};t.backgroundColor="#eeeeee",t.bold=!1,t.borderRadius=0,t.borderSize=1,t.borderColor="#313131",t.fontColor="#313131",t.fontSize=void 0,t.padding=r,t.inheritFromTheme=e,n(t),i.current=t},className:"mailpoet-automation-inherit-theme-toggle"}),a.inheritFromTheme?null:(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(i0,{name:SQ.Z.I18n.t("formSettingsStylesBackgroundColor"),colorValue:t.backgroundColor,gradientValue:t.gradient,onColorChange:(0,Ee.partial)(s,"backgroundColor"),onGradientChange:(0,Ee.partial)(s,"gradient")}),(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("formSettingsStylesFontColor"),value:t.fontColor,onChange:(0,Ee.partial)(s,"fontColor")}),(0,TQ.jsx)(a0,{value:t.fontSize,onChange:(0,Ee.partial)(s,"fontSize")}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("formSettingsBold"),checked:a.bold||!1,onChange:(0,Ee.partial)(s,"bold"),className:"mailpoet-automation-styles-bold-toggle"}),(0,TQ.jsx)(x0,{name:SQ.Z.I18n.t("formSettingsStylesFontFamily"),value:t.fontFamily||o,onChange:(0,Ee.partial)(s,"fontFamily")}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("formSettingsInputPadding"),value:void 0!==a.padding?a.padding:r,min:0,max:30,allowReset:!0,onChange:(0,Ee.partial)(s,"padding")}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("formSettingsBorderSize"),value:void 0!==a.borderSize?a.borderSize:1,min:0,max:10,allowReset:!0,onChange:(0,Ee.partial)(s,"borderSize"),className:"mailpoet-automation-styles-border-size"}),(0,TQ.jsx)(iW,{label:SQ.Z.I18n.t("formSettingsBorderRadius"),value:void 0!==a.borderRadius?a.borderRadius:0,min:0,max:40,allowReset:!0,onChange:(0,Ee.partial)(s,"borderRadius")}),(0,TQ.jsx)(o0,{name:SQ.Z.I18n.t("formSettingsBorderColor"),value:a.borderColor,onChange:(0,Ee.partial)(s,"borderColor")})]})]})})})},r7=(0,TQ.jsxs)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,TQ.jsx)(Po,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,TQ.jsx)(Ao,{children:(0,TQ.jsx)(Po,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"})})]});const o7={title:SQ.Z.I18n.t("blockSubmit"),description:SQ.Z.I18n.t("blockSubmitDescription"),icon:r7,category:"obligatory",attributes:{label:{type:"string",default:SQ.Z.I18n.t("blockSubmitLabel")},styles:{type:"object",default:{fullWidth:!0,inheritFromTheme:!0}}},supports:{html:!1,inserter:!1,multiple:!1},edit:function(e){let{attributes:t,setAttributes:n}=e;const r=(0,cr.Z)((e=>e("mailpoet-form-editor").getFormSettings()),[]),o=(0,TQ.jsxs)(_E,{children:[(0,TQ.jsx)(zQ,{children:(0,TQ.jsx)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("label"),value:t.label,onChange:e=>n({label:e}),"data-automation-id":"settings_submit_label_input"})})}),(0,TQ.jsx)(n7,{onChange:e=>n({styles:e}),styles:t.styles,formInputPadding:r.inputPadding,formFontFamily:r.fontFamily})]}),i=t.styles.inheritFromTheme?{}:{fontWeight:t.styles.bold?"bold":"inherit",borderRadius:void 0!==t.styles.borderRadius?`${t.styles.borderRadius}px`:0,borderWidth:void 0!==t.styles.borderSize?`${t.styles.borderSize}px`:"1px",borderColor:t.styles.borderColor||"transparent",borderStyle:"solid",fontSize:t.styles.fontSize?`${t.styles.fontSize}px`:"inherit",color:t.styles.fontColor||"inherit"};t.styles.fullWidth&&(i.width="100%"),void 0===t.styles.padding||t.styles.inheritFromTheme?void 0!==r.inputPadding&&(i.padding=r.inputPadding):i.padding=t.styles.padding,t.styles.backgroundColor&&!t.styles.inheritFromTheme&&(i.backgroundColor=t.styles.backgroundColor),t.styles.backgroundColor&&!t.styles.inheritFromTheme&&(i.backgroundColor=t.styles.backgroundColor),t.styles.gradient&&!t.styles.inheritFromTheme&&(i.backgroundColor=void 0,i.background=t.styles.gradient),t.styles.fontFamily&&!t.styles.inheritFromTheme&&(i.fontFamily=t.styles.fontFamily);const a=Lr()("mailpoet_submit",{button:t.styles.inheritFromTheme});return(0,TQ.jsxs)(V2,{className:t.className,children:[o,(0,TQ.jsx)("input",{className:a,type:"submit",value:t.label,"data-automation-id":"editor_submit_input",style:i})]})},save:()=>null};var i7=(0,TQ.jsxs)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,TQ.jsx)(Po,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,TQ.jsx)(Ao,{children:(0,TQ.jsx)(Po,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"})})]});function a7(e){let{attributes:t,setAttributes:n}=e;const r=(0,TQ.jsxs)(_E,{children:[(0,TQ.jsx)(zQ,{children:(0,TQ.jsxs)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:[(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("label"),value:t.label,"data-automation-id":"settings_first_name_label_input",onChange:e=>n({label:e})}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("displayLabelWithinInput"),checked:t.labelWithinInput,onChange:e=>n({labelWithinInput:e}),className:"mailpoet-automation-label-within-input-toggle"}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("blockMandatory"),checked:t.mandatory,onChange:e=>n({mandatory:e})})]})}),(0,TQ.jsx)(p5,{styles:t.styles,onChange:e=>n({styles:e})})]});return(0,TQ.jsxs)(TQ.Fragment,{children:[r,(0,TQ.jsx)(g5,{className:t.className,name:"first_name",mandatory:t.mandatory,labelWithinInput:t.labelWithinInput,label:t.label,styles:t.styles})]})}a7.propTypes={attributes:O$().shape({label:O$().string.isRequired,labelWithinInput:O$().bool.isRequired,mandatory:O$().bool.isRequired,className:O$().string,styles:f5.isRequired}).isRequired,setAttributes:O$().func.isRequired};var s7=a7;const l7={title:SQ.Z.I18n.t("blockFirstName"),description:SQ.Z.I18n.t("blockFirstNameDescription"),icon:i7,category:"fields",attributes:{label:{type:"string",default:SQ.Z.I18n.t("blockFirstName")},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!1},styles:{type:"object",default:o5}},supports:{html:!1,multiple:!1},edit:s7,save:()=>null};var c7=(0,TQ.jsxs)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,TQ.jsx)(Po,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,TQ.jsx)(Ao,{children:(0,TQ.jsx)(Po,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"})})]});function u7(e){let{attributes:t,setAttributes:n}=e;const r=(0,TQ.jsxs)(_E,{children:[(0,TQ.jsx)(zQ,{children:(0,TQ.jsxs)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:[(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("label"),value:t.label,"data-automation-id":"settings_last_name_label_input",onChange:e=>n({label:e})}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("displayLabelWithinInput"),checked:t.labelWithinInput,onChange:e=>n({labelWithinInput:e})}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("blockMandatory"),checked:t.mandatory,onChange:e=>n({mandatory:e})})]})}),(0,TQ.jsx)(p5,{styles:t.styles,onChange:e=>n({styles:e})})]});return(0,TQ.jsxs)(TQ.Fragment,{children:[r,(0,TQ.jsx)(g5,{className:t.className,name:"last_name",mandatory:t.mandatory,labelWithinInput:t.labelWithinInput,label:t.label,styles:t.styles})]})}u7.propTypes={attributes:O$().shape({label:O$().string.isRequired,labelWithinInput:O$().bool.isRequired,mandatory:O$().bool.isRequired,className:O$().string,styles:f5.isRequired}).isRequired,setAttributes:O$().func.isRequired};var d7=u7;const p7={title:SQ.Z.I18n.t("blockLastName"),description:SQ.Z.I18n.t("blockLastNameDescription"),icon:c7,category:"fields",attributes:{label:{type:"string",default:SQ.Z.I18n.t("blockLastName")},labelWithinInput:{type:"boolean",default:!0},mandatory:{type:"boolean",default:!1},styles:{type:"object",default:o5}},supports:{html:!1,multiple:!1},edit:d7,save:()=>null};var f7=(0,TQ.jsx)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,TQ.jsx)(Ao,{children:(0,TQ.jsx)(Po,{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})})}),m7=(0,_.forwardRef)(((e,t)=>{let{className:n,children:r}=e;return(0,_.createElement)("div",{className:Lr()("components-panel__row",n),ref:t},r)}));function h7(e){let{label:t,className:n,heading:r,checked:o,help:i,onChange:a,...s}=e;r&&He("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",plugin:"Gutenberg"});const l=`inspector-checkbox-control-${zo(h7)}`;return(0,_.createElement)(Ky,{label:r,id:l,help:i,className:Lr()("components-checkbox-control",n)},(0,_.createElement)("span",{className:"components-checkbox-control__input-container"},(0,_.createElement)("input",(0,dr.Z)({id:l,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>a(e.target.checked),checked:o,"aria-describedby":i?l+"__help":void 0},s)),o?(0,_.createElement)(c_,{icon:$_,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,_.createElement)("label",{className:"components-checkbox-control__label",htmlFor:l},t))}function g7(e){let{segment:t,removeSegment:n,onCheck:r}=e;return(0,TQ.jsxs)("div",{className:"mailpoet-form-segments-settings-list",children:[(0,TQ.jsx)(h7,{label:t.name,defaultChecked:!!t.isChecked,onChange:(0,Ee.partial)(r,t.id)},`check-${t.id}`),(0,TQ.jsx)(Xo,{icon:"no-alt",color:"#900",className:"mailpoet-form-segments-segment-remove",onClick:(0,Ee.partial)(n,t.id)})]},t.id)}function v7(e){let{segments:t,updateSegment:n,removeSegment:r,onSegmentsReorder:o}=e;const[i,a]=(0,_.useState)(t);if((0,_.useEffect)((()=>{a(t)}),[t]),0===i.length)return null;const s=(e,t)=>{const r=i.find((t=>t.id===e));r.isChecked=t,n(r)};return(0,TQ.jsx)($6,{onDragEnd:e=>{const t=e.source.index,n=e.destination.index,r=[...i],[s]=r.splice(t,1);r.splice(n,0,s),a(r),o(r)},children:(0,TQ.jsx)(E9,{droppableId:"droppable",children:e=>(0,TQ.jsxs)("div",{...e.droppableProps,ref:e.innerRef,children:[i.map(((e,t)=>(0,TQ.jsx)(w9,{draggableId:e.id,index:t,children:n=>(0,TQ.jsx)("div",{ref:n.innerRef,...n.draggableProps,...n.dragHandleProps,children:(0,TQ.jsx)(g7,{index:t,segment:e,onCheck:s,removeSegment:r},e.id)})},e.id))),e.placeholder]})})})}g7.propTypes={segment:O$().shape({name:O$().string.isRequired,isChecked:O$().bool,id:O$().string.isRequired}).isRequired,onCheck:O$().func.isRequired,removeSegment:O$().func.isRequired},v7.propTypes={segments:O$().arrayOf(O$().shape({name:O$().string.isRequired,isChecked:O$().bool,id:O$().string.isRequired}).isRequired).isRequired,updateSegment:O$().func.isRequired,removeSegment:O$().func.isRequired,onSegmentsReorder:O$().func.isRequired};var b7=v7;const y7=(e,t)=>e.find((e=>e.id===t));function w7(e){let{label:t,onLabelChanged:n,segmentsAddedIntoSelection:r,addSegmentIntoSelection:o,setNewSelection:i}=e;const a=(0,cr.Z)((e=>e("mailpoet-form-editor").getAllAvailableSegments()),[]),s=a.map((e=>({label:e.name,value:e.id}))).filter((e=>!y7(r,e.value)));return(0,TQ.jsx)(_E,{children:(0,TQ.jsx)(zQ,{children:(0,TQ.jsxs)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:[(0,TQ.jsx)(m7,{children:(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("label"),value:t,"data-automation-id":"settings_first_name_label_input",onChange:n})}),(0,TQ.jsx)(m7,{children:s.length?(0,TQ.jsx)(cR,{label:`${SQ.Z.I18n.t("blockSegmentSelectListLabel")}:`,"data-automation-id":"select_list_selections_list",options:[{label:SQ.Z.I18n.t("settingsPleaseSelectList"),value:null},...s],onChange:e=>{const t=y7(a,e);o({name:t.name,isChecked:!1,id:e})}}):null}),(0,TQ.jsx)(b7,{segments:r,updateSegment:e=>{i(r.map((t=>e.id!==t?t:e)))},removeSegment:e=>{i(r.filter((t=>e!==t.id)))},onSegmentsReorder:i})]})})})}w7.propTypes={label:O$().string.isRequired,onLabelChanged:O$().func.isRequired,addSegmentIntoSelection:O$().func.isRequired,setNewSelection:O$().func.isRequired,segmentsAddedIntoSelection:O$().arrayOf(O$().shape({name:O$().string.isRequired,isChecked:O$().bool,id:O$().string.isRequired}).isRequired).isRequired};var k7=w7;function x7(e){let{attributes:t,setAttributes:n}=e;const r=(0,cr.Z)((e=>e("mailpoet-form-editor").getAllAvailableSegments()),[]),o=(0,_.useMemo)((()=>t.values.map((e=>{const t={...e},n=r.find((t=>parseInt(t.id,10)===parseInt(e.id,10)));return t.name=n?n.name:"",t}))),[t.values,r]),i=e=>e.map((e=>{const t={...e};return delete t.name,t}));return(0,TQ.jsxs)(V2,{className:t.className,children:[(0,TQ.jsx)(k7,{label:t.label,onLabelChanged:e=>n({label:e}),segmentsAddedIntoSelection:o,setNewSelection:e=>n({values:i(e)}),addSegmentIntoSelection:e=>n({values:i([...t.values,e])})}),(0,TQ.jsx)("span",{className:"mailpoet_segment_label","data-automation-id":"mailpoet_list_selection_block",children:t.label}),0===t.values.length?(0,TQ.jsx)("p",{className:"mailpoet_error",children:SQ.Z.I18n.t("blockSegmentSelectNoLists")}):o.map((e=>(0,TQ.jsxs)("label",{className:"mailpoet_checkbox_label",children:[(0,TQ.jsx)("input",{type:"checkbox",disabled:!0,checked:!!e.isChecked,className:"mailpoet_checkbox"},e.id),e.name]},e.id)))]})}x7.propTypes={attributes:O$().shape({label:O$().string.isRequired,className:O$().string,values:O$().arrayOf(O$().shape({isChecked:O$().boolean,id:O$().string.isRequired})).isRequired}).isRequired,setAttributes:O$().func.isRequired};var _7=x7;const E7={title:SQ.Z.I18n.t("blockSegmentSelect"),description:SQ.Z.I18n.t("blockLastNameDescription"),icon:f7,category:"fields",attributes:{label:{type:"string",default:SQ.Z.I18n.t("blockSegmentSelectLabel")},values:{type:"array",default:[]}},supports:{html:!1,multiple:!1},edit:_7,save:()=>null};var C7=(0,TQ.jsx)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,TQ.jsx)(Po,{d:"M4.5,11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5V11z M7,10.5h1.5V15H10v-4.5h1.5V9H7V10.5z M14.5,10l-1-1H12v6h1.5v-3.9 l1,1l1-1V15H17V9h-1.5L14.5,10z M19.5,13.5V9H18v6h5v-1.5H19.5z"})});const S7="\n\t( function() {\n\t\tvar observer;\n\n\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfunction sendResize() {\n\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\twindow.parent.postMessage( {\n\t\t\t\taction: 'resize',\n\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\theight: clientBoundingRect.height,\n\t\t\t}, '*' );\n\t\t}\n\n\t\tobserver = new MutationObserver( sendResize );\n\t\tobserver.observe( document.body, {\n\t\t\tattributes: true,\n\t\t\tattributeOldValue: false,\n\t\t\tcharacterData: true,\n\t\t\tcharacterDataOldValue: false,\n\t\t\tchildList: true,\n\t\t\tsubtree: true\n\t\t} );\n\n\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t// the iframe root and interfere with our mechanism for\n\t\t// determining the unconstrained page bounds.\n\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\tif( ruleOrNode.style ) {\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t} );\n\n\t\tdocument.body.style.position = 'absolute';\n\t\tdocument.body.style.width = '100%';\n\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\t\tsendResize();\n\n\t\t// Resize events can change the width of elements with 100% width, but we don't\n\t\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\t\twindow.addEventListener( 'resize', sendResize, true );\n} )();",I7="\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div,\n\tbody > div iframe {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n";function T7(e){let{html:t="",title:n="",type:r,styles:o=[],scripts:i=[],onFocus:a}=e;const s=(0,_.useRef)(),[l,c]=(0,_.useState)(0),[u,d]=(0,_.useState)(0);function p(){try{return!!s.current.contentDocument.body}catch(e){return!1}}function f(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!p())return;const{contentDocument:a,ownerDocument:l}=s.current,{body:c}=a;if(!e&&null!==c.getAttribute("data-resizable-iframe-connected"))return;const u=(0,_.createElement)("html",{lang:l.documentElement.lang,className:r},(0,_.createElement)("head",null,(0,_.createElement)("title",null,n),(0,_.createElement)("style",{dangerouslySetInnerHTML:{__html:I7}}),o.map(((e,t)=>(0,_.createElement)("style",{key:t,dangerouslySetInnerHTML:{__html:e}})))),(0,_.createElement)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:r},(0,_.createElement)("div",{dangerouslySetInnerHTML:{__html:t}}),(0,_.createElement)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:S7}}),i.map((e=>(0,_.createElement)("script",{key:e,src:e})))));a.open(),a.write("<!DOCTYPE html>"+Gc(u)),a.close()}return(0,_.useEffect)((()=>{function e(){f(!1)}function t(e){const t=s.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(c(n.width),d(n.height))}f();const{ownerDocument:n}=s.current,{defaultView:r}=n;return s.current.addEventListener("load",e,!1),r.addEventListener("message",t),()=>{var n;null===(n=s.current)||void 0===n||n.removeEventListener("load",e,!1),r.addEventListener("message",t)}}),[]),(0,_.useEffect)((()=>{f()}),[n,r,o,i]),(0,_.useEffect)((()=>{f(!0)}),[t]),(0,_.createElement)("iframe",{ref:Er([s,Eo((e=>{const{ownerDocument:t}=e;if(!t)return;const{defaultView:n}=t;if(n)return n.addEventListener("blur",r),()=>{n.removeEventListener("blur",r)};function r(){t&&t.activeElement===e&&e.focus()}}),[])]),title:n,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:a,width:Math.ceil(l),height:Math.ceil(u)})}function N7(e){let{attributes:t,setAttributes:n,clientId:r}=e;const o=tw("color.palette"),{fontColor:i,fontSize:a,alignment:s,fontFamily:l}=(0,cr.Z)((e=>{const t=e("mailpoet-form-editor").getFormSettings(),n=A1(o,e("mailpoet-form-editor").getClosestParentAttribute(r,"backgroundColor"),e("mailpoet-form-editor").getClosestParentAttribute(r,"customBackgroundColor")),i=A1(o,e("mailpoet-form-editor").getClosestParentAttribute(r,"textColor"),e("mailpoet-form-editor").getClosestParentAttribute(r,"customTextColor"));return{backgroundColor:n||t.backgroundColor,fontColor:i||t.fontColor,fontSize:t.fontSize,alignment:t.alignment,fontFamily:t.fontFamily}}),[]),[c,u]=(0,_.useState)(t.content),d=(0,_.useCallback)((0,Ee.debounce)((e=>{u(e)}),300),[]),p=(0,TQ.jsx)(_E,{children:(0,TQ.jsx)(zQ,{children:(0,TQ.jsxs)(F_,{title:SQ.Z.I18n.t("formSettings"),initialOpen:!0,children:[(0,TQ.jsx)($Q,{label:SQ.Z.I18n.t("blockCustomHtmlContentLabel"),value:t.content,"data-automation-id":"settings_custom_html_content",rows:4,onChange:e=>{n({content:e}),d(e)}}),(0,TQ.jsx)(Yy,{label:SQ.Z.I18n.t("blockCustomHtmlNl2br"),checked:t.nl2br,onChange:e=>n({nl2br:e})})]})})}),f=t.nl2br?["body { white-space: pre-line; }"]:[];f.push(` body {font-family: ${getComputedStyle(document.body).fontFamily};}`),i?f.push(` body {color: ${i};}`):f.push(` body {color: ${getComputedStyle(document.body).color};}`),a?f.push(` body {font-size: ${a}px }`):f.push(` body {font-size: ${getComputedStyle(document.body).fontSize};}`),s&&f.push(` body {text-align: ${s}}`),l&&f.push(` body {font-family: "${l}"}`);const m=`${c}_${f}`;return(0,TQ.jsxs)(V2,{className:t.className,children:[p,(0,TQ.jsx)("div",{className:"mailpoet-html-block-editor-content-wrapper",children:(0,TQ.jsx)(T7,{html:c,styles:f},m)})]})}N7.propTypes={attributes:O$().shape({content:O$().string.isRequired,nl2br:O$().bool.isRequired,className:O$().string}).isRequired,setAttributes:O$().func.isRequired,clientId:O$().string.isRequired};var A7=N7;const P7={title:SQ.Z.I18n.t("blockCustomHtml"),description:SQ.Z.I18n.t("blockCustomHtmlDescription"),icon:C7,category:"fields",attributes:{content:{type:"string",default:SQ.Z.I18n.t("blockCustomHtmlDefault")},nl2br:{type:"boolean",default:!0}},supports:{html:!1,multiple:!0},edit:A7,save:()=>null};var R7=(0,TQ.jsx)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 694 694",children:(0,TQ.jsx)(Ao,{children:(0,TQ.jsx)(Po,{d:"m 347,44.407738 c 25.64881,0 46.33333,21.800595 46.33333,47.96131 V 299.03869 h 195.26191 c 24.82143,0 45.50595,21.8006 45.50595,47.96131 0,27.03274 -20.68452,48.83333 -45.50595,48.83333 H 393.33333 v 205.79762 c 0,26.16072 -20.68452,47.96131 -46.33333,47.96131 -24.82143,0 -45.50595,-21.80059 -45.50595,-47.96131 V 395.83333 H 105.40476 c -24.821427,0 -45.50595,-21.80059 -45.50595,-48.83333 0,-26.16071 20.684523,-47.96131 45.50595,-47.96131 H 301.49405 V 92.369048 c 0,-26.160715 20.68452,-47.96131 45.50595,-47.96131 z",fillRule:"evenodd",clipRule:"evenodd"})})});const L7=[{value:"text",label:SQ.Z.I18n.t("customFieldTypeText")},{value:"textarea",label:SQ.Z.I18n.t("customFieldTypeTextarea")},{value:"radio",label:SQ.Z.I18n.t("customFieldTypeRadio")},{value:"checkbox",label:SQ.Z.I18n.t("customFieldTypeCheckbox")},{value:"select",label:SQ.Z.I18n.t("customFieldTypeSelect")},{value:"date",label:SQ.Z.I18n.t("customFieldTypeDate")}];function O7(e){let{dateSettings:t,onSubmit:n}=e;const[r,o]=(0,_.useState)("text"),[i,a]=(0,_.useState)(null),[s,l]=(0,_.useState)({}),c=i&&!(0,Ee.isEmpty)(s)&&!1!==s.isValid,u=t.dateTypes[0].value,d=t.dateFormats[u][0];return(0,TQ.jsxs)("div",{className:"mailpoet_custom_field_add_form","data-automation-id":"create_custom_field_form",children:[(0,TQ.jsx)("hr",{}),(0,TQ.jsx)(cR,{label:SQ.Z.I18n.t("selectCustomFieldType"),options:L7,"data-automation-id":"create_custom_field_type_select",onChange:e=>{l({}),o(e)}}),(0,TQ.jsx)(N_,{label:SQ.Z.I18n.t("customFieldName"),onChange:a,"data-automation-id":"create_custom_field_name_input"}),(0,TQ.jsx)("hr",{}),(()=>{switch(r){case"checkbox":return(0,TQ.jsx)(V9,{mandatory:!!s.mandatory&&s.mandatory,isChecked:!!s.isChecked&&s.isChecked,checkboxLabel:s.checkboxLabel?s.checkboxLabel:"",onChange:l});case"date":return(0,TQ.jsx)($2,{dateSettings:t,mandatory:!!s.mandatory&&s.mandatory,dateFormat:s.dateFormat?s.dateFormat:d,dateType:s.dateType?s.dateType:u,defaultToday:!!s.defaultToday&&s.defaultToday,onChange:l});case"radio":case"select":return(0,TQ.jsx)(N9,{mandatory:!!s.mandatory&&s.mandatory,values:s.values?s.values:[{name:"",id:Math.random().toString()}],onChange:l});default:return(0,TQ.jsx)(d5,{mandatory:!!s.mandatory&&s.mandatory,validate:s.validate?s.validate:"",fieldType:r,onChange:l})}})(),(0,TQ.jsx)(ga,{isSecondary:!0,disabled:!c,"data-automation-id":"create_custom_field_submit",onClick:()=>{const e={name:i,type:r,params:Q2(r,s)};n(e)},children:SQ.Z.I18n.t("blockCreateButton")})]})}O7.propTypes={dateSettings:O$().shape({dateTypes:O$().arrayOf(O$().shape({label:O$().string,value:O$().string})),dateFormats:O$().objectOf(O$().arrayOf(O$().string)),months:O$().arrayOf(O$().string)}).isRequired,onSubmit:O$().func.isRequired};var M7=O7;function D7(e){let{clientId:t}=e;const{createCustomField:n}=(0,ur.Z)("mailpoet-form-editor"),r=(0,cr.Z)((e=>e("mailpoet-form-editor").getDateSettingsData()),[]),o=(0,cr.Z)((e=>e("mailpoet-form-editor").getIsCustomFieldCreating()),[]);return(0,TQ.jsx)(EY,{icon:(0,TQ.jsx)(ZN,{icon:R7,showColors:!0}),label:SQ.Z.I18n.t("blockAddCustomFieldFormHeading"),className:"mailpoet_custom_field_add_placeholder",children:o?(0,TQ.jsx)(nX,{}):(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)("p",{children:SQ.Z.I18n.t("blockAddCustomFieldDescription")}),(0,TQ.jsx)(M7,{onSubmit:e=>{n(e,t)},dateSettings:r})]})})}D7.propTypes={clientId:O$().string.isRequired};var B7=D7;const F7={title:SQ.Z.I18n.t("blockAddCustomField"),description:SQ.Z.I18n.t("blockAddCustomFieldDescription"),icon:R7,category:"custom-fields",attributes:{},supports:{html:!1,multiple:!1},edit:B7,save:()=>null};var j7=(0,_.createElement)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));function z7(e){let t,{doc:n}=z7;n||(n=document.implementation.createHTMLDocument(""),z7.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var H7=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),{...(0,Ee.omit)(e,["customTextColor","customBackgroundColor"]),style:t,isStackedOnMobile:!0}},save(e){let{attributes:t}=e;const{verticalAlignment:n,backgroundColor:r,customBackgroundColor:o,textColor:i,customTextColor:a}=t,s=NU("background-color",r),l=NU("color",i),c=Lr()({"has-background":r||o,"has-text-color":i||a,[s]:s,[l]:l,[`are-vertically-aligned-${n}`]:n}),u={backgroundColor:s?void 0:o,color:l?void 0:a};return(0,_.createElement)("div",{className:c||void 0,style:u},(0,_.createElement)(qH.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==z7(e.originalContent))),migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let r=z7(n);return void 0===r&&(r=0),e[r]||(e[r]=[]),e[r].push(t),e}),[]).map((e=>Tl("core/column",{},e)));return[{...(0,Ee.omit)(e,["columns"]),isStackedOnMobile:!0},n]},save(e){let{attributes:t}=e;const{columns:n}=t;return(0,_.createElement)("div",{className:`has-${n}-columns`},(0,_.createElement)(qH.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate:(e,t)=>[e={...(0,Ee.omit)(e,["columns"]),isStackedOnMobile:!0},t],save(e){let{attributes:t}=e;const{verticalAlignment:n,columns:r}=t,o=Lr()(`has-${r}-columns`,{[`are-vertically-aligned-${n}`]:n});return(0,_.createElement)("div",{className:o},(0,_.createElement)(qH.Content,null))}}];const V7=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function W7(e,t){const{width:n=100/t}=e.attributes;return V7(n)}function Z7(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return(0,Ee.sumBy)(e,(e=>W7(e,t)))}function U7(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>{const r=W7(n,t);return Object.assign(e,{[n.clientId]:r})}),{})}function $7(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const r=Z7(e,n);return(0,Ee.mapValues)(U7(e,n),(e=>V7(t*e/r)))}function G7(e,t){return e.map((e=>(0,Ee.merge)({},e,{attributes:{width:`${t[e.clientId]}%`}})))}const q7=["core/column"],K7=RE(((e,t,n)=>({updateAlignment(r){const{clientId:o,setAttributes:i}=t,{updateBlockAttributes:a}=e(Mb),{getBlockOrder:s}=n.select(Mb);i({verticalAlignment:r}),s(o).forEach((e=>{a(e,{verticalAlignment:r})}))},updateColumns(r,o){const{clientId:i}=t,{replaceInnerBlocks:a}=e(Mb),{getBlocks:s}=n.select(Mb);let l=s(i);const c=function(e){return e.every((e=>{var t;const n=e.attributes.width;return Number.isFinite(null!=n&&null!==(t=n.endsWith)&&void 0!==t&&t.call(n,"%")?parseFloat(n):n)}))}(l),u=o>r;if(u&&c){const e=V7(100/o);l=[...G7(l,$7(l,100-e)),...(0,Ee.times)(o-r,(()=>Tl("core/column",{width:`${e}%`})))]}else u?l=[...l,...(0,Ee.times)(o-r,(()=>Tl("core/column")))]:(l=(0,Ee.dropRight)(l,r-o),c&&(l=G7(l,$7(l,100))));a(i,l)}})))((function(e){let{attributes:t,setAttributes:n,updateAlignment:r,updateColumns:o,clientId:i}=e;const{isStackedOnMobile:a,verticalAlignment:s}=t,{count:l}=(0,cr.Z)((e=>({count:e(Mb).getBlockCount(i)})),[i]),c=GH(xN({className:Lr()({[`are-vertically-aligned-${s}`]:s,"is-not-stacked-on-mobile":!a})}),{allowedBlocks:q7,orientation:"horizontal",renderAppender:!1});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ub,null,(0,_.createElement)(LY,{onChange:r,value:s})),(0,_.createElement)(_E,null,(0,_.createElement)(F_,null,(0,_.createElement)(iW,{label:U("Columns"),value:l,onChange:e=>o(l,e),min:1,max:Math.max(6,l)}),l>6&&(0,_.createElement)(v$,{status:"warning",isDismissible:!1},U("This column count exceeds the recommended amount and may cause visual breakage.")),(0,_.createElement)(Yy,{label:U("Stack on mobile"),checked:a,onChange:()=>n({isStackedOnMobile:!a})}))),(0,_.createElement)("div",c))}));function Y7(e){let{clientId:t,name:n,setAttributes:r}=e;const{blockType:o,defaultVariation:i,variations:a}=(0,cr.Z)((e=>{const{getBlockVariations:t,getBlockType:r,getDefaultBlockVariation:o}=e(pc);return{blockType:r(n),defaultVariation:o(n,"block"),variations:t(n,"block")}}),[n]),{replaceInnerBlocks:s}=(0,ur.Z)(Mb),l=xN();return(0,_.createElement)("div",l,(0,_.createElement)(SY,{icon:(0,Ee.get)(o,["icon","src"]),label:(0,Ee.get)(o,["title"]),variations:a,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;e.attributes&&r(e.attributes),e.innerBlocks&&s(t,Nl(e.innerBlocks),!0)},allowSkip:!0}))}var X7=[{name:"one-column-full",title:U("100"),description:U("One column"),icon:(0,_.createElement)(Lo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{fillRule:"evenodd",clipRule:"evenodd",d:"m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"})),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:U("50 / 50"),description:U("Two columns; equal split"),icon:(0,_.createElement)(Lo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:U("30 / 70"),description:U("Two columns; one-third, two-thirds split"),icon:(0,_.createElement)(Lo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:U("70 / 30"),description:U("Two columns; two-thirds, one-third split"),icon:(0,_.createElement)(Lo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:U("33 / 33 / 33"),description:U("Three columns; equal split"),icon:(0,_.createElement)(Lo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:U("25 / 50 / 25"),description:U("Three columns; wide center column"),icon:(0,_.createElement)(Lo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}],J7={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2);return Tl("core/columns",{},Nl(e.map((e=>{let{name:n,attributes:r,innerBlocks:o}=e;return["core/column",{width:`${t}%`},[[n,{...r},o]]]}))))},isMatch:e=>{let{length:t}=e;return t&&t<=6}},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:r,textColor:o,style:i,mediaAlt:a,mediaId:s,mediaPosition:l,mediaSizeSlug:c,mediaType:u,mediaUrl:d,mediaWidth:p,verticalAlignment:f}=e;let m;m="image"!==u&&u?["core/video",{id:s,src:d}]:["core/image",{id:s,alt:a,url:d,sizeSlug:c,href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}];const h=[["core/column",{width:`${p}%`},[m]],["core/column",{width:100-p+"%"},t]];return"right"===l&&h.reverse(),Tl("core/columns",{align:n,backgroundColor:r,textColor:o,style:i,verticalAlignment:f},Nl(h))}}]};const Q7={apiVersion:2,name:"core/columns",title:"Columns",category:"design",description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:eee}=Q7,tee={icon:j7,variations:X7,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:U("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:U("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:U("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:U("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:H7,edit:e=>{const{clientId:t}=e,n=(0,cr.Z)((e=>e(Mb).getBlocks(t).length>0),[t])?K7:Y7;return(0,_.createElement)(n,e)},save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,verticalAlignment:r}=t,o=Lr()({[`are-vertically-aligned-${r}`]:r,"is-not-stacked-on-mobile":!n}),i=xN.save({className:o}),a=GH.save(i);return(0,_.createElement)("div",a)},transforms:J7},nee="core/columns",ree={name:nee,examples:null,deprecated:null,save:()=>null},oee={...Q7,...tee,...ree,category:"design",supports:{...Q7.supports,anchor:!1}};var iee=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"})),aee=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible(e){let{width:t}=e;return isFinite(t)},migrate:e=>({...e,width:`${e.width}%`}),save(e){let{attributes:t}=e;const{verticalAlignment:n,width:r}=t,o=Lr()({[`is-vertically-aligned-${n}`]:n}),i={flexBasis:r+"%"};return(0,_.createElement)("div",{className:o,style:i},(0,_.createElement)(qH.Content,null))}}];const see={apiVersion:2,name:"core/column",title:"Column",category:"text",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}}}},{name:lee}=see,cee={icon:iee,edit:function(e){let{attributes:{verticalAlignment:t,width:n,templateLock:r=!1,allowedBlocks:o},setAttributes:i,clientId:a}=e;const s=Lr()("block-core-columns",{[`is-vertically-aligned-${t}`]:t}),l=kw({availableUnits:tw("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:c,hasChildBlocks:u,rootClientId:d}=(0,cr.Z)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(Mb),r=n(a);return{hasChildBlocks:t(a).length>0,rootClientId:r,columnsIds:t(r)}}),[a]),{updateBlockAttributes:p}=(0,ur.Z)(Mb),f=Number.isFinite(n)?n+"%":n,m=xN({className:s,style:f?{flexBasis:f}:void 0}),h=c.length,g=c.indexOf(a)+1,v=R(U("%1$s (%2$d of %3$d)"),m["aria-label"],g,h),b=GH({...m,"aria-label":v},{templateLock:r,allowedBlocks:o,renderAppender:u?void 0:qH.ButtonBlockAppender});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ub,null,(0,_.createElement)(LY,{onChange:e=>{i({verticalAlignment:e}),p(d,{verticalAlignment:null})},value:t})),(0,_.createElement)(_E,null,(0,_.createElement)(F_,{title:U("Column settings")},(0,_.createElement)(l_,{label:U("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:n||"",onChange:e=>{e=0>parseFloat(e)?"0":e,i({width:e})},units:l}))),(0,_.createElement)("div",b))},save:function(e){let{attributes:t}=e;const{verticalAlignment:n,width:r}=t,o=Lr()({[`is-vertically-aligned-${n}`]:n});let i;if(r&&/\d/.test(r)){let e=Number.isFinite(r)?r+"%":r;if(!Number.isFinite(r)&&null!=r&&r.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(r)*t)/t+"%"}i={flexBasis:e}}const a=xN.save({className:o,style:i}),s=GH.save(a);return(0,_.createElement)("div",s)},deprecated:aee},uee="core/column",dee={name:uee,examples:null,deprecated:null,save:()=>null},pee={...see,...cee,...dee,category:"design",supports:{...see.supports,anchor:!1}};var fee=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"}));const mee={className:!1,anchor:!0},hee={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},gee=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}};return{...(0,Ee.omit)(e,["customTextColor"]),style:t}},vee=["left","right","center"],bee=e=>{const{align:t,...n}=e;return vee.includes(t)?{...n,textAlign:t}:e};var yee=[{supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:hee,isEligible:e=>{let{align:t}=e;return vee.includes(t)},migrate:bee,save(e){let{attributes:t}=e;const{align:n,content:r,level:o}=t,i="h"+o,a=Lr()({[`has-text-align-${n}`]:n});return(0,_.createElement)(i,xN.save({className:a}),(0,_.createElement)(WJ.Content,{value:r}))}},{supports:mee,attributes:{...hee,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>gee(bee(e)),save(e){let{attributes:t}=e;const{align:n,content:r,customTextColor:o,level:i,textColor:a}=t,s="h"+i,l=NU("color",a),c=Lr()({[l]:l,"has-text-color":a||o,[`has-text-align-${n}`]:n});return(0,_.createElement)(WJ.Content,{className:c||void 0,tagName:s,style:{color:l?void 0:o},value:r})}},{attributes:{...hee,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>gee(bee(e)),save(e){let{attributes:t}=e;const{align:n,content:r,customTextColor:o,level:i,textColor:a}=t,s="h"+i,l=NU("color",a),c=Lr()({[l]:l,[`has-text-align-${n}`]:n});return(0,_.createElement)(WJ.Content,{className:c||void 0,tagName:s,style:{color:l?void 0:o},value:r})},supports:mee},{supports:mee,attributes:{...hee,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>gee(bee(e)),save(e){let{attributes:t}=e;const{align:n,level:r,content:o,textColor:i,customTextColor:a}=t,s="h"+r,l=NU("color",i),c=Lr()({[l]:l});return(0,_.createElement)(WJ.Content,{className:c||void 0,tagName:s,style:{textAlign:n,color:l?void 0:a},value:o})}}];function wee(e){let{level:t,isPressed:n=!1}=e;const r={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return r.hasOwnProperty(t)?(0,_.createElement)(Lo,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:n},(0,_.createElement)(Po,{d:r[t]})):null}const kee=[1,2,3,4,5,6],xee={className:"block-library-heading-level-dropdown"};function _ee(e){let{selectedLevel:t,onChange:n}=e;return(0,_.createElement)($b,{popoverProps:xee,icon:(0,_.createElement)(wee,{level:t}),label:U("Change heading level"),controls:kee.map((e=>{{const r=e===t;return{icon:(0,_.createElement)(wee,{level:e,isPressed:r}),label:R(U("Heading %d"),e),isActive:r,onClick(){n(e)}}}}))})}const Eee={},Cee=(e,t)=>{const n=(e=>(0,Ee.trim)((0,Ee.deburr)((e=>{const t=document.createElement("div");return t.innerHTML=e,t.innerText})(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase(),"-"))(t);if(""===n)return null;delete Eee[e];let r=n,o=0;for(;Object.values(Eee).includes(r);)o+=1,r=n+"-"+o;return r},See=(e,t)=>{Eee[e]=t};const{name:Iee}={apiVersion:2,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"};var Tee={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((e=>{let{content:t,anchor:n}=e;return Tl(Iee,{content:t,anchor:n})}))},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:e=>{let{phrasingContentSchema:t,isPaste:n}=e;const r={children:t,attributes:n?[]:["style","id"]};return{h1:r,h2:r,h3:r,h4:r,h5:r,h6:r}},transform(e){const t=Xu(Iee,e.outerHTML),{textAlign:n}=e.style||{};var r;return t.level=(r=e.nodeName,Number(r.substr(1))),"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),Tl(Iee,t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform:t=>Tl(Iee,{level:e,content:t})}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:t=>Tl(Iee,{level:e,content:t})})))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((e=>{let{content:t,anchor:n}=e;return Tl("core/paragraph",{content:t,anchor:n})}))}]};const Nee={apiVersion:2,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},{name:Aee}=Nee,Pee={icon:fee,example:{attributes:{content:U("Code is Poetry"),level:2}},__experimentalLabel(e,t){let{context:n}=t;if("accessibility"===n){const{content:t,level:n}=e;return(0,Ee.isEmpty)(t)?R(U("Level %s. Empty."),n):R(U("Level %1$s. %2$s"),n,t)}},transforms:Tee,deprecated:yee,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:function(e){let{attributes:t,setAttributes:n,mergeBlocks:r,onReplace:o,style:i,clientId:a}=e;const{textAlign:s,content:l,level:c,placeholder:u,anchor:d}=t,p="h"+c,f=xN({className:Lr()({[`has-text-align-${s}`]:s}),style:i}),{__unstableMarkNextChangeAsNotPersistent:m}=(0,ur.Z)(Mb);return(0,_.useEffect)((()=>(!d&&l&&(m(),n({anchor:Cee(a,l)})),See(a,d),()=>See(a,null))),[l,d]),(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ub,{group:"block"},(0,_.createElement)(_ee,{selectedLevel:c,onChange:e=>n({level:e})}),(0,_.createElement)(_Y,{value:s,onChange:e=>{n({textAlign:e})}})),(0,_.createElement)(WJ,(0,dr.Z)({identifier:"content",tagName:p,value:l,onChange:e=>{const t={content:e};d&&e&&Cee(a,l)!==d||(t.anchor=Cee(a,e)),n(t)},onMerge:r,onSplit:(e,n)=>{let r;var o;return r=n||e?Tl("core/heading",{...t,content:e}):Tl(null!==(o=fl())&&void 0!==o?o:"core/heading"),n&&(r.clientId=a),r},onReplace:o,onRemove:()=>o([]),"aria-label":U("Heading text"),placeholder:u||U("Heading"),textAlign:s},f)))},save:function(e){let{attributes:t}=e;const{textAlign:n,content:r,level:o}=t,i="h"+o,a=Lr()({[`has-text-align-${n}`]:n});return(0,_.createElement)(i,xN.save({className:a}),(0,_.createElement)(WJ.Content,{value:r}))}},Ree="core/heading",Lee={name:Ree,examples:null,deprecated:null,save:()=>null},Oee={...Nee,...Pee,...Lee,category:"design",supports:{...Nee.supports,html:!1}};var Mee=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z"}));const Dee={className:!1},Bee={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},Fee=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};return(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize}),{...(0,Ee.omit)(e,["customTextColor","customBackgroundColor","customFontSize"]),style:t}};var jee=[{supports:Dee,attributes:{...(0,Ee.omit)(Bee,["style"]),customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Fee,save(e){let{attributes:t}=e;const{align:n,content:r,dropCap:o,backgroundColor:i,textColor:a,customBackgroundColor:s,customTextColor:l,fontSize:c,customFontSize:u,direction:d}=t,p=NU("color",a),f=NU("background-color",i),m=HG(c),h=Lr()({"has-text-color":a||l,"has-background":i||s,"has-drop-cap":o,[`has-text-align-${n}`]:n,[m]:m,[p]:p,[f]:f}),g={backgroundColor:f?void 0:s,color:p?void 0:l,fontSize:m?void 0:u};return(0,_.createElement)(WJ.Content,{tagName:"p",style:g,className:h||void 0,value:r,dir:d})}},{supports:Dee,attributes:{...(0,Ee.omit)(Bee,["style"]),customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Fee,save(e){let{attributes:t}=e;const{align:n,content:r,dropCap:o,backgroundColor:i,textColor:a,customBackgroundColor:s,customTextColor:l,fontSize:c,customFontSize:u,direction:d}=t,p=NU("color",a),f=NU("background-color",i),m=HG(c),h=Lr()({"has-text-color":a||l,"has-background":i||s,"has-drop-cap":o,[m]:m,[p]:p,[f]:f}),g={backgroundColor:f?void 0:s,color:p?void 0:l,fontSize:m?void 0:u,textAlign:n};return(0,_.createElement)(WJ.Content,{tagName:"p",style:g,className:h||void 0,value:r,dir:d})}},{supports:Dee,attributes:{...(0,Ee.omit)(Bee,["style"]),customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:Fee,save(e){let{attributes:t}=e;const{width:n,align:r,content:o,dropCap:i,backgroundColor:a,textColor:s,customBackgroundColor:l,customTextColor:c,fontSize:u,customFontSize:d}=t,p=NU("color",s),f=NU("background-color",a),m=u&&`is-${u}-text`,h=Lr()({[`align${n}`]:n,"has-background":a||l,"has-drop-cap":i,[m]:m,[p]:p,[f]:f}),g={backgroundColor:f?void 0:l,color:p?void 0:c,fontSize:m?void 0:d,textAlign:r};return(0,_.createElement)(WJ.Content,{tagName:"p",style:g,className:h||void 0,value:o})}},{supports:Dee,attributes:(0,Ee.omit)({...Bee,fontSize:{type:"number"}},["style"]),save(e){let{attributes:t}=e;const{width:n,align:r,content:o,dropCap:i,backgroundColor:a,textColor:s,fontSize:l}=t,c=Lr()({[`align${n}`]:n,"has-background":a,"has-drop-cap":i}),u={backgroundColor:a,color:s,fontSize:l,textAlign:r};return(0,_.createElement)("p",{style:u,className:c||void 0},o)},migrate:e=>Fee((0,Ee.omit)({...e,customFontSize:(0,Ee.isFinite)(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0}))},{supports:Dee,attributes:{...Bee,content:{type:"string",source:"html",default:""}},save(e){let{attributes:t}=e;return(0,_.createElement)(Sc,null,t.content)},migrate:e=>e}],zee=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,_.createElement)(Po,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}));function Hee(e){let{direction:t,setDirection:n}=e;return q()&&(0,_.createElement)($b,{controls:[{icon:zee,title:$("Left to right","editor button"),isActive:"ltr"===t,onClick(){n("ltr"===t?void 0:"ltr")}}]})}const{name:Vee}={apiVersion:2,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"};var Wee={from:[{type:"raw",priority:20,selector:"p",schema:e=>{let{phrasingContentSchema:t,isPaste:n}=e;return{p:{children:t,attributes:n?[]:["style","id"]}}},transform(e){const t=Xu(Vee,e.outerHTML),{textAlign:n}=e.style||{};return"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),Tl(Vee,t)}}]};const Zee={apiVersion:2,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},{name:Uee}=Zee,$ee={icon:Mee,example:{attributes:{content:U("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."),style:{typography:{fontSize:28}},dropCap:!0}},__experimentalLabel(e,t){let{context:n}=t;if("accessibility"===n){const{content:t}=e;return(0,Ee.isEmpty)(t)?U("Empty"):t}},transforms:Wee,deprecated:jee,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:function(e){let{attributes:t,mergeBlocks:n,onReplace:r,onRemove:o,setAttributes:i,clientId:a}=e;const{align:s,content:l,direction:c,dropCap:u,placeholder:d}=t,p=tw("typography.dropCap"),f=xN({className:Lr()({"has-drop-cap":u,[`has-text-align-${s}`]:s}),style:{direction:c}});return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ub,{group:"block"},(0,_.createElement)(_Y,{value:s,onChange:e=>i({align:e})}),(0,_.createElement)(Hee,{direction:c,setDirection:e=>i({direction:e})})),p&&(0,_.createElement)(_E,null,(0,_.createElement)(F_,{title:U("Text settings")},(0,_.createElement)(Yy,{label:U("Drop cap"),checked:!!u,onChange:()=>i({dropCap:!u}),help:U(u?"Showing large initial letter.":"Toggle to show a large initial letter.")}))),(0,_.createElement)(WJ,(0,dr.Z)({identifier:"content",tagName:"p"},f,{value:l,onChange:e=>i({content:e}),onSplit:(e,n)=>{let r;(n||e)&&(r={...t,content:e});const o=Tl("core/paragraph",r);return n&&(o.clientId=a),o},onMerge:n,onReplace:r,onRemove:o,"aria-label":U(l?"Paragraph block":"Empty block; start writing or type forward slash to choose a block"),"data-empty":!l,placeholder:d||U("Type / to choose a block"),__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})))},save:function(e){let{attributes:t}=e;const{align:n,content:r,dropCap:o,direction:i}=t,a=Lr()({"has-drop-cap":o,[`has-text-align-${n}`]:n});return(0,_.createElement)("p",xN.save({className:a,dir:i}),(0,_.createElement)(WJ.Content,{value:r}))}},Gee="core/paragraph",qee={name:Gee,examples:null,deprecated:null,save:()=>null},Kee={...Zee,...$ee,...qee,category:"design",supports:{...Zee.supports,html:!1,anchor:!1}};var Yee=(0,_.createElement)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"}));const Xee={align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}};var Jee=[{attributes:Xee,save(e){let{attributes:t}=e;const{url:n,alt:r,caption:o,align:i,href:a,width:s,height:l,id:c}=t,u=Lr()({[`align${i}`]:i,"is-resized":s||l}),d=(0,_.createElement)("img",{src:n,alt:r,className:c?`wp-image-${c}`:null,width:s,height:l});return(0,_.createElement)("figure",{className:u},a?(0,_.createElement)("a",{href:a},d):d,!WJ.isEmpty(o)&&(0,_.createElement)(WJ.Content,{tagName:"figcaption",value:o}))}},{attributes:Xee,save(e){let{attributes:t}=e;const{url:n,alt:r,caption:o,align:i,href:a,width:s,height:l,id:c}=t,u=(0,_.createElement)("img",{src:n,alt:r,className:c?`wp-image-${c}`:null,width:s,height:l});return(0,_.createElement)("figure",{className:i?`align${i}`:null},a?(0,_.createElement)("a",{href:a},u):u,!WJ.isEmpty(o)&&(0,_.createElement)(WJ.Content,{tagName:"figcaption",value:o}))}},{attributes:Xee,save(e){let{attributes:t}=e;const{url:n,alt:r,caption:o,align:i,href:a,width:s,height:l}=t,c=s||l?{width:s,height:l}:{},u=(0,_.createElement)("img",(0,dr.Z)({src:n,alt:r},c));let d={};return s?d={width:s}:"left"!==i&&"right"!==i||(d={maxWidth:"50%"}),(0,_.createElement)("figure",{className:i?`align${i}`:null,style:d},a?(0,_.createElement)("a",{href:a},u):u,!WJ.isEmpty(o)&&(0,_.createElement)(WJ.Content,{tagName:"figcaption",value:o}))}}],Qee=ip((e=>{function t(t,r){const[o,i]=(0,_.useState)([]),a=(0,_.useMemo)((()=>{const e=e=>{const t=e.id?e:{...e,id:pp()};i((e=>[...e,t]))};return{createNotice:e,createErrorNotice:t=>{e({status:"error",content:t})},removeNotice:e=>{i((t=>t.filter((t=>t.id!==e))))},removeAllNotices:()=>{i([])}}}),[]),s={...t,noticeList:o,noticeOperations:a,noticeUI:o.length>0&&(0,_.createElement)(h1,{className:"components-with-notices-ui",notices:o,onRemove:a.removeNotice})};return n?(0,_.createElement)(e,(0,dr.Z)({},s,{ref:r})):(0,_.createElement)(e,s)}let n;const{render:r}=e;return"function"==typeof r?(n=!0,(0,_.forwardRef)(t)):t})),ete=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tte=function(){return(tte=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}).apply(this,arguments)},nte={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},rte=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return ete(t,e),t.prototype.render=function(){return _.createElement("div",{className:this.props.className||"",style:tte(tte({position:"absolute",userSelect:"none"},nte[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(_.PureComponent),ote=n(53316),ite=n.n(ote),ate=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ste=function(){return(ste=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}).apply(this,arguments)},lte={width:"auto",height:"auto"},cte=ite()((function(e,t,n){return Math.max(Math.min(e,n),t)})),ute=ite()((function(e,t){return Math.round(e/t)*t})),dte=ite()((function(e,t){return new RegExp(e,"i").test(t)})),pte=function(e){return Boolean(e.touches&&e.touches.length)},fte=ite()((function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e})),mte=ite()((function(e,t){return e.substr(e.length-t.length,t.length)===t})),hte=ite()((function(e){return"auto"===(e=e.toString())||mte(e,"px")||mte(e,"%")||mte(e,"vh")||mte(e,"vw")||mte(e,"vmax")||mte(e,"vmin")?e:e+"px"})),gte=function(e,t,n,r){if(e&&"string"==typeof e){if(mte(e,"px"))return Number(e.replace("px",""));if(mte(e,"%"))return t*(Number(e.replace("%",""))/100);if(mte(e,"vw"))return n*(Number(e.replace("vw",""))/100);if(mte(e,"vh"))return r*(Number(e.replace("vh",""))/100)}return e},vte=ite()((function(e,t,n,r,o,i,a){return r=gte(r,e.width,t,n),o=gte(o,e.height,t,n),i=gte(i,e.width,t,n),a=gte(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}})),bte=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],yte="__resizable_base__",wte=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0",t.classList?t.classList.add(yte):t.className+=yte,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return ate(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||lte},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&mte(e.propsSize[t].toString(),"%")){if(mte(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return hte(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?hte(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?hte(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&dte("left",i),s=o&&dte("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,a=o.original,s=this.props,l=s.lockAspectRatio,c=s.lockAspectRatioExtraHeight,u=s.lockAspectRatioExtraWidth,d=a.width,p=a.height,f=c||0,m=u||0;return dte("right",i)&&(d=a.width+(e-a.x)*r/n,l&&(p=(d-m)/this.ratio+f)),dte("left",i)&&(d=a.width-(e-a.x)*r/n,l&&(p=(d-m)/this.ratio+f)),dte("bottom",i)&&(p=a.height+(t-a.y)*r/n,l&&(d=(p-f)*this.ratio+m)),dte("top",i)&&(p=a.height-(t-a.y)*r/n,l&&(d=(p-f)*this.ratio+m)),{newWidth:d,newHeight:p}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=a||0,f=s||0;if(i){var m=(u-p)*this.ratio+f,h=(d-p)*this.ratio+f,g=(l-f)/this.ratio+p,v=(c-f)/this.ratio+p,b=Math.max(l,m),y=Math.min(c,h),w=Math.max(u,g),k=Math.min(d,v);e=cte(e,b,y),t=cte(t,w,k)}else e=cte(e,l,c),t=cte(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,a=r.right,s=r.bottom;this.resizableLeft=o,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&pte(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ste(ste({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&pte(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var t=this.props,n=t.maxWidth,r=t.maxHeight,o=t.minWidth,i=t.minHeight,a=pte(e)?e.touches[0].clientX:e.clientX,s=pte(e)?e.touches[0].clientY:e.clientY,l=this.state,c=l.direction,u=l.original,d=l.width,p=l.height,f=this.getParentSize(),m=vte(f,this.window.innerWidth,this.window.innerHeight,n,r,o,i);n=m.maxWidth,r=m.maxHeight,o=m.minWidth,i=m.minHeight;var h=this.calculateNewSizeFromDirection(a,s),g=h.newHeight,v=h.newWidth,b=this.calculateNewMaxFromBoundary(n,r),y=this.calculateNewSizeFromAspectRatio(v,g,{width:b.maxWidth,height:b.maxHeight},{width:o,height:i});if(v=y.newWidth,g=y.newHeight,this.props.grid){var w=ute(v,this.props.grid[0]),k=ute(g,this.props.grid[1]),x=this.props.snapGap||0;v=0===x||Math.abs(w-v)<=x?w:v,g=0===x||Math.abs(k-g)<=x?k:g}this.props.snap&&this.props.snap.x&&(v=fte(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=fte(g,this.props.snap.y,this.props.snapGap));var _={width:v-u.width,height:g-u.height};d&&"string"==typeof d&&(mte(d,"%")?v=v/f.width*100+"%":mte(d,"vw")?v=v/this.window.innerWidth*100+"vw":mte(d,"vh")&&(v=v/this.window.innerHeight*100+"vh")),p&&"string"==typeof p&&(mte(p,"%")?g=g/f.height*100+"%":mte(p,"vw")?g=g/this.window.innerWidth*100+"vw":mte(p,"vh")&&(g=g/this.window.innerHeight*100+"vh"));var E={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),this.setState(E),this.props.onResize&&this.props.onResize(e,c,this.resizable,_)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ste(ste({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,a=t.handleWrapperClass,s=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?_.createElement(rte,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},s&&s[t]?s[t]:null):null}));return _.createElement("div",{className:a,style:i},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==bte.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=ste(ste(ste({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return _.createElement(r,ste({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&_.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(_.PureComponent);const{clearTimeout:kte,setTimeout:xte}=window,_te={bottom:"bottom",corner:"corner"};const Ete=da("div",{target:"ekdag503"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),Cte=da("div",{target:"ekdag502"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),Ste=da("div",{target:"ekdag501"})("background:",Wy.ui.border,";border-radius:2px;box-sizing:border-box;font-size:12px;color:",Wy.ui.textDark,";padding:4px 8px;position:relative;"),Ite=da(ck,{target:"ekdag500"})("&&&{color:",Wy.ui.textDark,";display:block;font-size:13px;line-height:1.4;}");var Tte=(0,_.forwardRef)((function(e,t){let{label:n,position:r=_te.corner,zIndex:o=1e3,...i}=e;const a=!!n,s=r===_te.bottom,l=r===_te.corner;if(!a)return null;let c={opacity:a?1:void 0,zIndex:o},u={};return s&&(c={...c,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},u={transform:"translate(0, 100%)"}),l&&(c={...c,position:"absolute",top:4,right:q()?void 0:4,left:q()?4:void 0}),(0,_.createElement)(Cte,(0,dr.Z)({"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:t,style:c},i),(0,_.createElement)(Ste,{className:"components-resizable-tooltip__tooltip",style:u},(0,_.createElement)(Ite,{as:"span"},n)))})),Nte=(0,_.forwardRef)((function(e,t){let{axis:n,className:r,fadeTimeout:o=180,isVisible:i=!0,labelRef:a,onResize:s=Ee.noop,position:l=_te.bottom,showPx:c=!0,zIndex:u=1e3,...d}=e;const{label:p,resizeListener:f}=function(e){let{axis:t,fadeTimeout:n=180,onResize:r=Ee.noop,position:o=_te.bottom,showPx:i=!1}=e;const[a,s]=Wr()(),l=!!t,[c,u]=(0,_.useState)(!1),[d,p]=(0,_.useState)(!1),{width:f,height:m}=s,h=(0,_.useRef)(m),g=(0,_.useRef)(f),v=(0,_.useRef)(),b=()=>{l||(u(!1),p(!1))};return(0,_.useEffect)((()=>{if(null===f&&null===m)return;const e=f!==g.current,t=m!==h.current;if(e||t){if(f&&!g.current&&m&&!h.current)return g.current=f,void(h.current=m);e&&(u(!0),g.current=f),t&&(p(!0),h.current=m),r({width:f,height:m}),v.current&&kte(v.current),v.current=xte(b,n)}}),[f,m]),{label:function(e){let{axis:t,height:n,moveX:r=!1,moveY:o=!1,position:i=_te.bottom,showPx:a=!1,width:s}=e;if(!r&&!o)return;if(i===_te.corner)return`${s} x ${n}`;const l=a?" px":"";if(t){if("x"===t&&r)return`${s}${l}`;if("y"===t&&o)return`${n}${l}`}return r&&o?`${s} x ${n}`:r?`${s}${l}`:o?`${n}${l}`:void 0}({axis:t,height:m,moveX:c,moveY:d,position:o,showPx:i,width:f}),resizeListener:a}}({axis:n,fadeTimeout:o,onResize:s,showPx:c,position:l});if(!i)return null;const m=Lr()("components-resize-tooltip",r);return(0,_.createElement)(Ete,(0,dr.Z)({"aria-hidden":"true",className:m,ref:t},d),f,(0,_.createElement)(Tte,{"aria-hidden":d["aria-hidden"],label:p,position:l,ref:a,zIndex:u}))}));const Ate="components-resizable-box__handle",Pte="components-resizable-box__side-handle",Rte="components-resizable-box__corner-handle",Lte={top:Lr()(Ate,Pte,"components-resizable-box__handle-top"),right:Lr()(Ate,Pte,"components-resizable-box__handle-right"),bottom:Lr()(Ate,Pte,"components-resizable-box__handle-bottom"),left:Lr()(Ate,Pte,"components-resizable-box__handle-left"),topLeft:Lr()(Ate,Rte,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:Lr()(Ate,Rte,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:Lr()(Ate,Rte,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:Lr()(Ate,Rte,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},Ote={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},Mte={top:Ote,right:Ote,bottom:Ote,left:Ote,topLeft:Ote,topRight:Ote,bottomRight:Ote,bottomLeft:Ote};var Dte=(0,_.forwardRef)((function(e,t){let{className:n,children:r,showHandle:o=!0,__experimentalShowTooltip:i=!1,__experimentalTooltipProps:a={},...s}=e;return(0,_.createElement)(wte,(0,dr.Z)({className:Lr()("components-resizable-box__container",o&&"has-show-handle",n),handleClasses:Lte,handleStyles:Mte,ref:t},s),r,i&&(0,_.createElement)(Nte,a))})),Bte=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M16.5 7.8v7H18v-7c0-1-.8-1.8-1.8-1.8h-7v1.5h7c.2 0 .3.1.3.3zm-8.7 8.7c-.1 0-.2-.1-.2-.2V2H6v4H2v1.5h4v8.8c0 1 .8 1.8 1.8 1.8h8.8v4H18v-4h4v-1.5H7.8z"})),Fte=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"}));const jte=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],zte="wp-embed";var Hte=n(51991),Vte=n.n(Hte);const{name:Wte}={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Zte=e=>{var t;return null===(t=yl(Wte))||void 0===t?void 0:t.find((t=>{let{patterns:n}=t;return function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((t=>e.match(t)))}(e,n)}))},Ute=e=>e&&e.includes('class="wp-embedded-content"'),$te=e=>{if(!e)return e;const t=jte.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return Vte()(e,t)};function Gte(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return $te(t);const r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;const o=r.body.querySelector("iframe");if(o&&o.height&&o.width){const e=(o.width/o.height).toFixed(2);for(let n=0;n<jte.length;n++){const r=jte[n];if(e>=r.ratio)return e-r.ratio>.1?$te(t):Vte()($te(t),r.className,"wp-has-aspect-ratio")}}return t}T()((function(e,t,n,r){let o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};const i={};let{type:a="rich"}=e;const{html:s,provider_name:l}=e,c=(0,Ee.kebabCase)((l||t).toLowerCase());return Ute(s)&&(a=zte),(s||"photo"===a)&&(i.type=a,i.providerNameSlug=c),i.className=Gte(s,n,r&&o),i}));const qte="none",Kte="media",Yte="attachment",Xte="custom",Jte=["image"];function Qte(e){var t;let{temporaryURL:n,attributes:{url:r="",alt:o,caption:i,align:a,id:s,href:l,rel:c,linkClass:u,linkDestination:d,title:p,width:f,height:m,linkTarget:h,sizeSlug:g},setAttributes:v,isSelected:b,insertBlocksAfter:y,onReplace:w,onSelectImage:k,onSelectURL:x,onUploadError:E,containerRef:C,context:S,clientId:I}=e;const T=(0,_.useRef)(),N=(0,_.useRef)(),A=A$(r),{allowResize:P=!0}=S,{getBlock:L}=(0,cr.Z)(Mb),{image:O,multiImageSelection:M}=(0,cr.Z)((e=>{const{getMedia:t}=e(lr),{getMultiSelectedBlockClientIds:n,getBlockName:r}=e(Mb),o=n();return{image:s&&b?t(s):null,multiImageSelection:o.length&&o.every((e=>"core/image"===r(e)))}}),[s,b]),{canInsertCover:D,imageEditing:B,imageSizes:F,maxWidth:j,mediaUpload:z}=(0,cr.Z)((e=>{const{getBlockRootClientId:t,getSettings:n,canInsertBlockType:r}=e(Mb),o=t(I);return{...(0,Ee.pick)(n(),["imageEditing","imageSizes","maxWidth","mediaUpload"]),canInsertCover:r("core/cover",o)}}),[I]),{replaceBlocks:H,toggleSelection:V}=(0,ur.Z)(Mb),{createErrorNotice:W,createSuccessNotice:Z}=(0,ur.Z)(xR),$=Hr("medium"),G=(0,Ee.includes)(["wide","full"],a),[{loadedNaturalWidth:K,loadedNaturalHeight:Y},X]=(0,_.useState)({}),[J,Q]=(0,_.useState)(!1),[ee,te]=(0,_.useState)(),ne=function(e,t){const[n,r]=(0,_.useState)();function o(){r(e.current.clientWidth)}return(0,_.useEffect)(o,t),(0,_.useEffect)((()=>{const{defaultView:t}=e.current.ownerDocument;return t.addEventListener("resize",o),()=>{t.removeEventListener("resize",o)}}),[]),n}(C,[a]),re=P&&!(G&&$),oe=(0,Ee.map)((0,Ee.filter)(F,(e=>{let{slug:t}=e;return(0,Ee.get)(O,["media_details","sizes",t,"source_url"])})),(e=>{let{name:t,slug:n}=e;return{value:n,label:t}}));(0,_.useEffect)((()=>{ene(s,r)&&b&&!ee&&window.fetch(r).then((e=>e.blob())).then((e=>te(e))).catch((()=>{}))}),[s,r,b,ee]),(0,_.useEffect)((()=>{r&&!A&&b&&N.current.focus()}),[r,A]);const{naturalWidth:ie,naturalHeight:ae}=(0,_.useMemo)((()=>{var e,t;return{naturalWidth:(null===(e=T.current)||void 0===e?void 0:e.naturalWidth)||K||void 0,naturalHeight:(null===(t=T.current)||void 0===t?void 0:t.naturalHeight)||Y||void 0}}),[K,Y,null===(t=T.current)||void 0===t?void 0:t.complete]);(0,_.useEffect)((()=>{b||Q(!1)}),[b]);const se=s&&ie&&ae&&B,le=!M&&se&&!J,ce=(0,_.createElement)(_.Fragment,null,(0,_.createElement)(Ub,{group:"block"},(0,_.createElement)(__,{value:a,onChange:function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};v({...t,align:e})}}),!M&&!J&&(0,_.createElement)(QJ,{url:l||"",onChangeUrl:function(e){v(e)},linkDestination:d,mediaUrl:O&&O.source_url||r,mediaLink:O&&O.link,linkTarget:h,linkClass:u,rel:c}),le&&(0,_.createElement)(Mf,{onClick:()=>Q(!0),icon:Bte,label:U("Crop")}),ee&&(0,_.createElement)(Mf,{onClick:function(){z({filesList:[ee],onFileChange(e){let[t]=e;k(t),Wa(t.url)||(te(),Z(U("Image uploaded."),{type:"snackbar"}))},allowedTypes:Jte,onError(e){W(e,{type:"snackbar"})}})},icon:nJ,label:U("Upload external image")}),!M&&D&&(0,_.createElement)(Mf,{icon:Fte,label:U("Add text over image"),onClick:function(){H(I,Fl(L(I),"core/cover"))}})),!M&&!J&&(0,_.createElement)(Ub,{group:"other"},(0,_.createElement)(iJ,{mediaId:s,mediaURL:r,allowedTypes:Jte,accept:"image/*",onSelect:k,onSelectURL:x,onError:E})),(0,_.createElement)(_E,null,(0,_.createElement)(F_,{title:U("Image settings")},!M&&(0,_.createElement)($Q,{label:U("Alt text (alternative text)"),value:o,onChange:function(e){v({alt:e})},help:(0,_.createElement)(_.Fragment,null,(0,_.createElement)(R_,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},U("Describe the purpose of the image")),U("Leave empty if the image is purely decorative."))}),(0,_.createElement)(vX,{onChangeImage:function(e){const t=(0,Ee.get)(O,["media_details","sizes",e,"source_url"]);if(!t)return null;v({url:t,width:void 0,height:void 0,sizeSlug:e})},onChange:e=>v(e),slug:g,width:f,height:m,imageSizeOptions:oe,isResizable:re,imageWidth:ie,imageHeight:ae}))),(0,_.createElement)(_E,{__experimentalGroup:"advanced"},(0,_.createElement)(N_,{label:U("Title attribute"),value:p||"",onChange:function(e){v({title:e})},help:(0,_.createElement)(_.Fragment,null,U("Describe the role of this image on the page."),(0,_.createElement)(R_,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},U("(Note: many devices and browsers do not display this text.)")))}))),ue=function(e){let t;try{t=new URL(e,"http://example.com").pathname.split("/").pop()}catch(e){}if(t)return t}(r);let de;de=o||(ue?R(U("This image has an empty alt attribute; its file name is %s"),ue):U("This image has an empty alt attribute"));let pe,fe,me=(0,_.createElement)(_.Fragment,null,(0,_.createElement)("img",{src:n||r,alt:de,onError:()=>function(){const e=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{preview:r,attributes:o={}}=e,{url:i,providerNameSlug:a,type:s,...l}=o;if(!i||!ml(Wte))return;const c=Zte(i),u="wordpress"===a||s===zte;if(!u&&c&&(c.attributes.providerNameSlug!==a||!a))return Tl(Wte,{url:i,...l,...c.attributes});const d=null===(t=yl(Wte))||void 0===t?void 0:t.find((e=>{let{name:t}=e;return"wordpress"===t}));return d&&r&&Ute(r.html)&&!u?Tl(Wte,{url:i,...d.attributes,...n}):void 0}({attributes:{url:r}});void 0!==e&&w(e)}(),onLoad:e=>{var t,n;X({loadedNaturalWidth:null===(t=e.target)||void 0===t?void 0:t.naturalWidth,loadedNaturalHeight:null===(n=e.target)||void 0===n?void 0:n.naturalHeight})},ref:T}),n&&(0,_.createElement)(nX,null));if(ne&&ie&&ae){const e=ie>ne,t=ae/ie;pe=e?ne:ie,fe=e?ne*t:ae}if(se&&J)me=(0,_.createElement)(hX,{url:r,width:f,height:m,clientWidth:ne,naturalHeight:ae,naturalWidth:ie});else if(re&&pe){const e=f||pe,t=m||fe,n=ie/ae,r=ie<ae?20:20*n,o=ae<ie?20:20/n,i=2.5*j;let s=!1,l=!1;"center"===a?(s=!0,l=!0):q()?"left"===a?s=!0:l=!0:"right"===a?l=!0:s=!0,me=(0,_.createElement)(Dte,{size:{width:null!=f?f:"auto",height:null!=m?m:"auto"},showHandle:b,minWidth:r,maxWidth:i,minHeight:o,maxHeight:i/n,lockAspectRatio:!0,enable:{top:!1,right:s,bottom:!0,left:l},onResizeStart:function(){V(!1)},onResizeStop:(n,r,o,i)=>{V(!0),v({width:parseInt(e+i.width,10),height:parseInt(t+i.height,10)})}},me)}else me=(0,_.createElement)("div",{style:{width:f,height:m}},me);return(0,_.createElement)(aX,{id:s,url:r,naturalWidth:ie,naturalHeight:ae,clientWidth:ne,onSaveImage:e=>v(e),isEditing:J,onFinishEditing:()=>Q(!1)},!n&&ce,me,(!WJ.isEmpty(i)||b)&&(0,_.createElement)(WJ,{ref:N,tagName:"figcaption","aria-label":U("Image caption text"),placeholder:U("Add caption"),value:i,onChange:e=>v({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>y(Tl("core/paragraph"))}))}const ene=(e,t)=>t&&!e&&!Wa(t);var tne=Qee((function(e){let{attributes:t,setAttributes:n,isSelected:r,className:o,noticeUI:i,insertBlocksAfter:a,noticeOperations:s,onReplace:l,context:c,clientId:u}=e;const{url:d="",alt:p,caption:f,align:m,id:h,width:g,height:v,sizeSlug:b}=t,[y,w]=(0,_.useState)(),k=(0,_.useRef)();(0,_.useEffect)((()=>{k.current=p}),[p]);const x=(0,_.useRef)();(0,_.useEffect)((()=>{x.current=f}),[f]);const E=(0,_.useRef)(),{imageDefaultSize:C,mediaUpload:S}=(0,cr.Z)((e=>{const{getSettings:t}=e(Mb);return(0,Ee.pick)(t(),["imageDefaultSize","mediaUpload"])}),[]);function I(e){s.removeAllNotices(),s.createErrorNotice(e)}function T(e){var r,o,i,a,s;if(!e||!e.url)return void n({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0});if(Wa(e.url))return void w(e.url);w();let l,c=((e,t)=>{const n=(0,Ee.pick)(e,["alt","id","link","caption"]);return n.url=(0,Ee.get)(e,["sizes",t,"url"])||(0,Ee.get)(e,["media_details","sizes",t,"source_url"])||e.url,n})(e,C);var u,p;x.current&&!(0,Ee.get)(c,["caption"])&&(c=(0,Ee.omit)(c,["caption"])),l=e.id&&e.id===h?{url:d}:{width:void 0,height:void 0,sizeSlug:(u=e,p=C,(0,Ee.has)(u,["sizes",p,"url"])||(0,Ee.has)(u,["media_details","sizes",p,"source_url"])?C:"full")};let f,m=t.linkDestination;if(!m)switch((null===(r=wp)||void 0===r||null===(o=r.media)||void 0===o||null===(i=o.view)||void 0===i||null===(a=i.settings)||void 0===a||null===(s=a.defaultProps)||void 0===s?void 0:s.link)||qte){case"file":case Kte:m=Kte;break;case"post":case Yte:m=Yte;break;case Xte:m=Xte;break;case qte:m=qte}switch(m){case Kte:f=e.url;break;case Yte:f=e.link}c.href=f,n({...c,...l,linkDestination:m})}function N(e){e!==d&&n({url:e,id:void 0,width:void 0,height:void 0,sizeSlug:C})}let A=((e,t)=>!e&&Wa(t))(h,d);(0,_.useEffect)((()=>{if(!A)return;const e=function(e){return za[e]}(d);e&&S({filesList:[e],onFileChange:e=>{let[t]=e;T(t)},allowedTypes:Jte,onError:e=>{A=!1,s.createErrorNotice(e),n({src:void 0,id:void 0,url:void 0})}})}),[]),(0,_.useEffect)((()=>{A?w(d):Va(y)}),[A,d]);const P=ene(h,d)?d:void 0,R=!!d&&(0,_.createElement)("img",{alt:U("Edit image"),title:U("Edit image"),className:"edit-image-preview",src:d}),L=xN({ref:E,className:Lr()(o,{"is-transient":y,"is-resized":!!g||!!v,[`size-${b}`]:b})});return(0,_.createElement)("figure",L,(y||d)&&(0,_.createElement)(Qte,{temporaryURL:y,attributes:t,setAttributes:n,isSelected:r,insertBlocksAfter:a,onReplace:l,onSelectImage:T,onSelectURL:N,onUploadError:I,containerRef:E,context:c,clientId:u}),!d&&(0,_.createElement)(Ub,{group:"block"},(0,_.createElement)(__,{value:m,onChange:function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};n({...t,align:e})}})),(0,_.createElement)(vJ,{icon:(0,_.createElement)(ZN,{icon:Yee}),onSelect:T,onSelectURL:N,notices:i,onError:I,accept:"image/*",allowedTypes:Jte,value:{id:h,src:P},mediaPreview:R,disableMediaButtons:y||d}))}));function nne(e,t){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=e;const{firstElementChild:r}=n;if(r&&"A"===r.nodeName)return r.getAttribute(t)||void 0}const rne={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}};var one={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:e=>{let{phrasingContentSchema:t}=e;return{figure:{require:["img"],children:{...rne,a:{attributes:["href","rel","target"],children:rne},figcaption:{children:t}}}}},transform:e=>{const t=e.className+" "+e.querySelector("img").className,n=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),r=""===e.id?void 0:e.id,o=n?n[1]:void 0,i=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),a=i?Number(i[1]):void 0,s=e.querySelector("a"),l=s&&s.href?"custom":void 0,c=s&&s.href?s.href:void 0,u=s&&s.rel?s.rel:void 0,d=s&&s.className?s.className:void 0;return Tl("core/image",Xu("core/image",e.outerHTML,{align:o,id:a,linkDestination:l,href:c,rel:u,linkClass:d,anchor:r}))}},{type:"files",isMatch(e){if(e.some((e=>0===e.type.indexOf("image/")))&&e.some((e=>0!==e.type.indexOf("image/")))){const{createErrorNotice:e}=(0,xe.WI)(xR);e(U("If uploading to a gallery all files need to be image formats"),{id:"gallery-transform-invalid-file"})}return(0,Ee.every)(e,(e=>0===e.type.indexOf("image/")))},transform:e=>e.map((e=>Tl("core/image",{url:Ha(e)})))},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,t){let{shortcode:n}=t;const{body:r}=document.implementation.createHTMLDocument("");r.innerHTML=n.content;let o=r.querySelector("img");for(;o&&o.parentNode&&o.parentNode!==r;)o=o.parentNode;return o&&o.parentNode.removeChild(o),r.innerHTML.trim()}},href:{shortcode:(e,t)=>{let{shortcode:n}=t;return nne(n.content,"href")}},rel:{shortcode:(e,t)=>{let{shortcode:n}=t;return nne(n.content,"rel")}},linkClass:{shortcode:(e,t)=>{let{shortcode:n}=t;return nne(n.content,"class")}},id:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(t)return parseInt(t.replace("attachment_",""),10)}},align:{type:"string",shortcode:e=>{let{named:{align:t="alignnone"}}=e;return t.replace("align","")}}}}]};const ine={apiVersion:2,name:"core/image",title:"Image",category:"media",usesContext:["allowResize","imageCrop","fixedHeight"],description:"Insert an image to make a visual statement.",keywords:["img","photo","picture"],textdomain:"default",attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-image-editor",style:"wp-block-image"},{name:ane}=ine,sne={icon:Yee,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:U("Mont Blanc appears—still, snowy, and serene.")}},__experimentalLabel(e,t){let{context:n}=t;if("accessibility"===n){const{caption:t,alt:n,url:r}=e;return r?n?n+(t?". "+t:""):t||"":U("Empty")}},getEditWrapperProps:e=>({"data-align":e.align}),transforms:one,edit:tne,save:function(e){let{attributes:t}=e;const{url:n,alt:r,caption:o,align:i,href:a,rel:s,linkClass:l,width:c,height:u,id:d,linkTarget:p,sizeSlug:f,title:m}=t,h=(0,Ee.isEmpty)(s)?void 0:s,g=Lr()({[`align${i}`]:i,[`size-${f}`]:f,"is-resized":c||u}),v=(0,_.createElement)("img",{src:n,alt:r,className:d?`wp-image-${d}`:null,width:c,height:u,title:m}),b=(0,_.createElement)(_.Fragment,null,a?(0,_.createElement)("a",{className:l,href:a,target:p,rel:h},v):v,!WJ.isEmpty(o)&&(0,_.createElement)(WJ.Content,{tagName:"figcaption",value:o}));return"left"===i||"right"===i||"center"===i?(0,_.createElement)("div",xN.save(),(0,_.createElement)("figure",{className:g},b)):(0,_.createElement)("figure",xN.save({className:g}),b)},deprecated:Jee},lne="core/image",cne={name:lne,examples:null,deprecated:null,save:()=>null},une={...ine,...sne,...cne,category:"design",supports:{...ine.supports,html:!1,anchor:!1}},dne=e=>{const t=K9(e);if(!t[e.type])return null;const n=B2(t[e.type].name,e);return cl(n,t[e.type].settings),n},pne=e=>{let t=null;return e.errors.length>0&&(t=e.errors.map((e=>e.message)),t=t.join(", ")),t},fne=(e,t)=>e.map((e=>{const n=t(e);return e.innerBlocks&&(n.innerBlocks=fne(e.innerBlocks,t)),n}));var mne={SAVE_FORM(){if((0,xe.Ys)("mailpoet-form-editor").getIsFormSaving())return;if((0,xe.WI)("mailpoet-form-editor").saveFormStarted(),(0,xe.Ys)("mailpoet-form-editor").getFormErrors().length)return;const e=(0,xe.Ys)("mailpoet-form-editor").getFormData(),t=(0,xe.Ys)("mailpoet-form-editor").getFormBlocks(),n=(0,xe.Ys)("mailpoet-form-editor").getAllAvailableCustomFields(),r=L1(Yf.fontSizes,Yf.colors,Yf.gradients,n),o={...O1(e),body:r(t),editor_version:2};SQ.Z.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"saveEditor",data:o}).done((e=>{(0,xe.WI)("mailpoet-form-editor").saveFormDone(e.data.id),L2().remove(`popup_form_dismissed_${e.data.id}`,{path:"/"})})).fail((e=>{(0,xe.WI)("mailpoet-form-editor").saveFormFailed(pne(e))}))},SAVE_CUSTOM_FIELD(e){(0,xe.WI)("mailpoet-form-editor").saveCustomFieldStarted();const t=(0,xe.Ys)("mailpoet-form-editor").getAllAvailableCustomFields().find((t=>t.id===e.customFieldId)),n={};(0,Ee.merge)(n,t,e.data),SQ.Z.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:n}).then((n=>{(0,xe.WI)("mailpoet-form-editor").saveCustomFieldDone(t.id,n.data),"function"==typeof e.onFinish&&e.onFinish()})).then((0,xe.WI)("mailpoet-form-editor").saveForm).fail((e=>{(0,xe.WI)("mailpoet-form-editor").saveCustomFieldFailed(pne(e))}))},CREATE_CUSTOM_FIELD(e){(0,xe.Ys)("mailpoet-form-editor").getIsCustomFieldCreating()||((0,xe.WI)("mailpoet-form-editor").createCustomFieldStarted(e.data),(0,xe.Ys)("mailpoet-form-editor").getIsCustomFieldCreating()&&SQ.Z.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:e.data}).then((t=>{const n=t.data;SQ.Z.trackEvent("Forms > Add new custom field",{"Field type":n.type});const r=Tl(dne(n));(0,xe.WI)("core/block-editor").replaceBlock(e.clientId,r),(0,xe.WI)("mailpoet-form-editor").createCustomFieldDone(t.data)})).fail((e=>{(0,xe.WI)("mailpoet-form-editor").createCustomFieldFailed(pne(e))})))},DELETE_CUSTOM_FIELD(e){(0,xe.WI)("mailpoet-form-editor").deleteCustomFieldStarted();const t=(0,xe.Ys)("mailpoet-form-editor").getAllAvailableCustomFields().find((t=>t.id===e.customFieldId)),n=K9(t);SQ.Z.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"delete",data:{id:e.customFieldId}}).then((()=>{SQ.Z.trackEvent("Forms > Delete custom field",{"Field type":t.type}),(0,xe.WI)("mailpoet-form-editor").deleteCustomFieldDone(e.customFieldId,e.clientId),(0,xe.WI)("core/block-editor").removeBlock(e.clientId),function(e){const t=(0,xe.Ys)(pc).getBlockType(e);if(t)return(0,xe.WI)(pc).removeBlockTypes(e),t;console.error('Block "'+e+'" is not registered.')}(B2(n[t.type].name,t))})).fail((e=>{(0,xe.WI)("mailpoet-form-editor").deleteCustomFieldFailed(pne(e))}))},APPLY_STYLES_TO_ALL_TEXT_INPUTS(e){const t=(0,xe.Ys)("mailpoet-form-editor").getFormBlocks(),n=fne(t,(t=>{const n={...t};return(["mailpoet-form/last-name-input","mailpoet-form/first-name-input","mailpoet-form/email-input"].includes(t.name)||t.name.startsWith("mailpoet-form/custom-text"))&&(n.attributes={...n.attributes,styles:e.styles}),n}));(0,xe.WI)("core/block-editor").resetBlocks(n)},TUTORIAL_DISMISS(){SQ.Z.Ajax.post({api_version:SQ.Z.apiVersion,endpoint:"user_flags",action:"set",data:{form_editor_tutorial_seen:1}})},BLOCKS_CHANGED_IN_BLOCK_EDITOR(e){const t=e.blocks,n=w2(t,"mailpoet-form/email-input"),r=w2(t,"mailpoet-form/submit-button");if(n&&r)return void(0,xe.WI)("mailpoet-form-editor").changeFormBlocks(t);const o=(0,xe.Ys)("mailpoet-form-editor").getFormBlocks(),i=[...t];if(!n){let e=w2(o,"mailpoet-form/email-input");e||(e=Tl("mailpoet-form/email-input")),i.unshift(e)}if(!r){let e=w2(o,"mailpoet-form/submit-button");e||(e=Tl("mailpoet-form/submit-button")),i.push(e)}(0,xe.WI)("core/block-editor").resetBlocks(i)},STORE_LOCALLY(e){let{key:t,value:n}=e;window.localStorage.setItem(t,JSON.stringify(n))},CALL_API:O2.Z,ENSURE_BROWSER_URL(e){let{formId:t}=e,n=(0,xe.Ys)("mailpoet-form-editor").getFormEditorUrl();n=`${n}${t}`,window.location!==n&&window.history.replaceState(null,"",n)}};function hne(e){var t,n,r,o,i,a,s,l,c,u,d,p,f,m;const h={...e,settings:{...e.settings,formPlacement:{popup:{enabled:"1"===e.settings.form_placement?.popup?.enabled,exitIntentEnabled:"1"===e.settings.form_placement?.popup?.exit_intent_enabled,delay:void 0!==e.settings.form_placement?.popup?.delay?r5(e.settings.form_placement?.popup?.delay):g0.formDelay,cookieExpiration:void 0!==e.settings.form_placement?.popup?.cookieExpiration?r5(e.settings.form_placement?.popup?.cookieExpiration):g0.formCookieExpiration,animation:void 0!==e.settings.form_placement?.popup?.animation?e.settings.form_placement?.popup?.animation:g0.animation,styles:{...g0.styles,...e.settings.form_placement?.popup?.styles},categories:null!==(t=e.settings.form_placement?.popup?.categories)&&void 0!==t?t:[],tags:null!==(n=e.settings.form_placement?.popup?.tags)&&void 0!==n?n:[],posts:{all:"1"===e.settings.form_placement?.popup?.posts?.all,selected:Array.isArray(e.settings.form_placement?.popup?.posts?.selected)?e.settings.form_placement?.popup?.posts?.selected:[]},pages:{all:"1"===e.settings.form_placement?.popup?.pages?.all,selected:Array.isArray(e.settings.form_placement?.popup?.pages?.selected)?e.settings.form_placement?.popup?.pages?.selected:[]}},fixedBar:{enabled:"1"===e.settings.form_placement?.fixed_bar?.enabled,delay:void 0!==e.settings.form_placement?.fixed_bar?.delay?r5(e.settings.form_placement?.fixed_bar?.delay):v0.formDelay,cookieExpiration:void 0!==e.settings.form_placement?.fixed_bar?.cookieExpiration?r5(e.settings.form_placement?.fixed_bar?.cookieExpiration):v0.formCookieExpiration,animation:null!==(r=e.settings.form_placement?.fixed_bar?.animation)&&void 0!==r?r:v0.animation,styles:{...v0.styles,...e.settings.form_placement?.fixed_bar?.styles},position:null!==(o=e.settings.form_placement?.fixed_bar?.position)&&void 0!==o?o:v0.position,categories:null!==(i=e.settings.form_placement?.fixed_bar?.categories)&&void 0!==i?i:[],tags:null!==(a=e.settings.form_placement?.fixed_bar?.tags)&&void 0!==a?a:[],posts:{all:"1"===e.settings.form_placement?.fixed_bar?.posts?.all,selected:Array.isArray(e.settings.form_placement?.fixed_bar?.posts?.selected)?e.settings.form_placement?.fixed_bar?.posts?.selected:[]},pages:{all:"1"===e.settings.form_placement?.fixed_bar?.pages?.all,selected:Array.isArray(e.settings.form_placement?.fixed_bar?.pages?.selected)?e.settings.form_placement?.fixed_bar?.pages?.selected:[]}},belowPosts:{enabled:"1"===e.settings.form_placement?.below_posts?.enabled,styles:{...m0,...e.settings.form_placement?.below_posts?.styles},categories:null!==(s=e.settings.form_placement?.below_posts?.categories)&&void 0!==s?s:[],tags:null!==(l=e.settings.form_placement?.below_posts?.tags)&&void 0!==l?l:[],posts:{all:"1"===e.settings.form_placement?.below_posts?.posts?.all,selected:Array.isArray(e.settings.form_placement?.below_posts?.posts?.selected)?e.settings.form_placement?.below_posts?.posts?.selected:[]},pages:{all:"1"===e.settings.form_placement?.below_posts?.pages?.all,selected:Array.isArray(e.settings.form_placement?.below_posts?.pages?.selected)?e.settings.form_placement?.below_posts?.pages?.selected:[]}},slideIn:{enabled:"1"===e.settings.form_placement?.slide_in?.enabled,delay:void 0!==e.settings.form_placement?.slide_in?.delay?r5(e.settings.form_placement?.slide_in?.delay):y0.formDelay,cookieExpiration:void 0!==e.settings.form_placement?.slide_in?.cookieExpiration?r5(e.settings.form_placement?.slide_in?.cookieExpiration):y0.formCookieExpiration,position:null!==(c=e.settings.form_placement?.slide_in?.position)&&void 0!==c?c:y0.position,animation:null!==(u=e.settings.form_placement?.slide_in?.animation)&&void 0!==u?u:y0.animation,styles:{...y0.styles,...e.settings.form_placement?.slide_in?.styles},categories:null!==(d=e.settings.form_placement?.slide_in?.categories)&&void 0!==d?d:[],tags:null!==(p=e.settings.form_placement?.slide_in?.tags)&&void 0!==p?p:[],posts:{all:"1"===e.settings.form_placement?.slide_in?.posts?.all,selected:Array.isArray(e.settings.form_placement?.slide_in?.posts?.selected)?e.settings.form_placement?.slide_in?.posts?.selected:[]},pages:{all:"1"===e.settings.form_placement?.slide_in?.pages?.all,selected:Array.isArray(e.settings.form_placement?.slide_in?.pages?.selected)?e.settings.form_placement?.slide_in?.pages?.selected:[]}},others:{styles:{...b0,...e.settings.form_placement?.others?.styles}}},alignment:null!==(f=e.settings.alignment)&&void 0!==f?f:w0.alignment,borderRadius:void 0!==e.settings.border_radius?r5(e.settings.border_radius):w0.borderRadius,borderSize:void 0!==e.settings.border_size?r5(e.settings.border_size):w0.borderSize,formPadding:void 0!==e.settings.form_padding?r5(e.settings.form_padding):w0.formPadding,inputPadding:void 0!==e.settings.input_padding?r5(e.settings.input_padding):w0.inputPadding,borderColor:e.settings.border_color,fontFamily:e.settings.font_family,fontSize:e.settings.fontSize&&r5(e.settings.fontSize),successValidationColor:e.settings.success_validation_color,errorValidationColor:e.settings.error_validation_color,backgroundImageUrl:e.settings.background_image_url,backgroundImageDisplay:e.settings.background_image_display,closeButton:null!==(m=e.settings.close_button)&&void 0!==m?m:w0.closeButton}};return h.settings.formPlacement.belowPosts.styles.width.value=r5(h.settings.formPlacement.belowPosts.styles.width.value),h.settings.formPlacement.slideIn.styles.width.value=r5(h.settings.formPlacement.slideIn.styles.width.value),h.settings.formPlacement.fixedBar.styles.width.value=r5(h.settings.formPlacement.fixedBar.styles.width.value),h.settings.formPlacement.popup.styles.width.value=r5(h.settings.formPlacement.popup.styles.width.value),h.settings.formPlacement.others.styles.width.value=r5(h.settings.formPlacement.others.styles.width.value),delete h.settings.border_radius,delete h.settings.border_size,delete h.settings.border_color,delete h.settings.input_padding,delete h.settings.form_padding,delete h.settings.close_button,delete h.settings.font_family,delete h.settings.background_image_display,delete h.settings.background_image_url,h}const gne=LE(AE(((e,t)=>{if(vl(t.name,"multiple",!0))return{};const n=e(Mb).getBlocks(),r=(0,Ee.find)(n,(e=>{let{name:n}=e;return t.name===n}));return{originalBlockClientId:r&&r.clientId!==t.clientId&&r.clientId}})),RE(((e,t)=>{let{originalBlockClientId:n}=t;return{selectFirst:()=>e(Mb).selectBlock(n)}}))),vne=ip((e=>gne((t=>{let{originalBlockClientId:n,selectFirst:r,...o}=t;if(!n)return(0,_.createElement)(e,o);const i=ml(o.name),a=function(e){const t=Dl(Bl("to",e),(e=>{let{type:t,blocks:n}=e;return"block"===t&&1===n.length}));return t?ml(t.blocks[0]):null}(o.name);return[(0,_.createElement)("div",{key:"invalid-preview",style:{minHeight:"60px"}},(0,_.createElement)(e,(0,dr.Z)({key:"block-edit"},o))),(0,_.createElement)(qE,{key:"multiple-use-warning",actions:[(0,_.createElement)(ga,{key:"find-original",variant:"secondary",onClick:r},U("Find original")),(0,_.createElement)(ga,{key:"remove",variant:"secondary",onClick:()=>o.onReplace([])},U("Remove")),a&&(0,_.createElement)(ga,{key:"transform",variant:"secondary",onClick:()=>o.onReplace(Tl(a.name,o.attributes))},U("Transform into:")," ",a.title)]},(0,_.createElement)("strong",null,null==i?void 0:i.title,": "),U("This block can only be used once."))]}))),"withMultipleValidation");(0,V.KJ)("editor.BlockEdit","core/edit-post/validate-multiple-use/with-multiple-validation",vne);var bne=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"}));const yne="core/bold",wne=U("Bold"),kne={name:yne,title:wne,tagName:"strong",className:null,edit(e){let{isActive:t,value:n,onChange:r,onFocus:o}=e;function i(){r(sv(n,{type:yne,title:wne}))}return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ZJ,{type:"primary",character:"b",onUse:i}),(0,_.createElement)(UJ,{name:"bold",icon:bne,title:wne,onClick:function(){r(sv(n,{type:yne})),o()},isActive:t,shortcutType:"primary",shortcutCharacter:"b"}),(0,_.createElement)($J,{inputType:"formatBold",onInput:i}))}};var xne=(0,_.createElement)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));const _ne="core/code",Ene=U("Inline code"),Cne={name:_ne,title:Ene,tagName:"code",className:null,__unstableInputRule(e){const{start:t,text:n}=e;if("`"!==n.slice(t-1,t))return e;const r=n.slice(0,t-1).lastIndexOf("`");if(-1===r)return e;const o=r,i=t-2;return o===i?e:(e=Vg(e,o,o+1),e=bg(e=Vg(e,i,i+1),{type:_ne},o,i))},edit(e){let{value:t,onChange:n,onFocus:r,isActive:o}=e;return(0,_.createElement)(UJ,{icon:xne,title:Ene,onClick:function(){n(sv(t,{type:_ne,title:Ene})),r()},isActive:o,role:"menuitemcheckbox"})}},Sne=["image"],Ine="core/image",Tne=U("Inline image"),Nne={name:Ine,title:Tne,keywords:[U("photo"),U("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function(e){let{value:t,onChange:n,onFocus:r,isObjectActive:o,activeObjectAttributes:i,contentRef:a}=e;const[s,l]=(0,_.useState)(!1);function c(){l(!1)}return(0,_.createElement)(oJ,null,(0,_.createElement)(UJ,{icon:(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})),title:Tne,onClick:function(){l(!0)},isActive:o}),s&&(0,_.createElement)(rJ,{allowedTypes:Sne,onSelect:e=>{let{id:o,url:i,alt:a,width:s}=e;c(),n(function(e,t,n,r){return Hg(e,{formats:[,],replacements:[t],text:xg},void 0,void 0)}(t,{type:Ine,attributes:{className:`wp-image-${o}`,style:`width: ${Math.min(s,150)}px;`,url:i,alt:a}})),r()},onClose:c,render:e=>{let{open:t}=e;return t(),null}}),o&&(0,_.createElement)(Ane,{value:t,onChange:n,activeObjectAttributes:i,contentRef:a}))}};function Ane(e){let{value:t,onChange:n,activeObjectAttributes:r,contentRef:o}=e;const{style:i}=r,[a,s]=(0,_.useState)(null==i?void 0:i.replace(/\D/g,"")),l=lv({ref:o,value:t,settings:Nne});return(0,_.createElement)(Na,{position:"bottom center",focusOnMount:!1,anchorRef:l,className:"block-editor-format-toolbar__image-popover"},(0,_.createElement)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:e=>{const o=t.replacements.slice();o[t.start]={type:Ine,attributes:{...r,style:a?`width: ${a}px;`:""}},n({...t,replacements:o}),e.preventDefault()}},(0,_.createElement)(N_,{className:"block-editor-format-toolbar__image-container-value",type:"number",label:U("Width"),value:a,min:1,onChange:e=>s(e)}),(0,_.createElement)(ga,{icon:bX,label:U("Apply"),type:"submit"})))}var Pne=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M12.5 5L10 19h1.9l2.5-14z"}));const Rne="core/italic",Lne=U("Italic"),One={name:Rne,title:Lne,tagName:"em",className:null,edit(e){let{isActive:t,value:n,onChange:r,onFocus:o}=e;function i(){r(sv(n,{type:Rne,title:Lne}))}return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ZJ,{type:"primary",character:"i",onUse:i}),(0,_.createElement)(UJ,{name:"italic",icon:Pne,title:Lne,onClick:function(){r(sv(n,{type:Rne})),o()},isActive:t,shortcutType:"primary",shortcutCharacter:"i"}),(0,_.createElement)($J,{inputType:"formatItalic",onInput:i}))}};function Mne(e){return!!e&&/^#[^\s#?\/]*$/.test(e)}function Dne(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=MX(t);if(!function(e){return!!e&&/^[a-z\-.\+]+[0-9]*:$/i.test(e)}(e))return!1;if((0,Ee.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;if(!(n=function(e){const t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}(t))||!/^[^\s#?]+$/.test(n))return!1;const r=function(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}(t);if(r&&!function(e){return!!e&&/^[^\s#?]+$/.test(e)}(r))return!1;const o=X(t);if(o&&!function(e){return!!e&&/^[^\s#?\/]+$/.test(e)}(o))return!1;const i=function(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}(t);if(i&&!Mne(i))return!1}var n;return!((0,Ee.startsWith)(t,"#")&&!Mne(t))}function Bne(e,t,n,r,o){let i=t;const a={forwards:1,backwards:-1}[o]||1,s=-1*a;for(;e[i]&&e[i][r]===n;)i+=a;return i+=s,i}const Fne=(0,Ee.partialRight)(Bne,"backwards"),jne=(0,Ee.partialRight)(Bne,"forwards"),zne=new WeakMap;let Hne=-1;function Vne(e){return`link-control-instance-${e}`}var Wne=wX((function(e){let{isActive:t,activeAttributes:n,addingLink:r,value:o,onChange:i,speak:a,stopAddingLink:s,contentRef:l}=e;const c=function(e,t){let n=e.start,r=e.end;if(t){const t=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end;const o={start:null,end:null},{formats:i}=e;let a,s;if(null==i||!i.length)return o;const l=i.slice(),c=(0,Ee.find)(l[n],{type:t.type}),u=(0,Ee.find)(l[r],{type:t.type}),d=(0,Ee.find)(l[r-1],{type:t.type});if(c)a=c,s=n;else if(u)a=u,s=r;else{if(!d)return o;a=d,s=r-1}const p=l[s].indexOf(a),f=[l,s,a,p];return n=Fne(...f),r=jne(...f),n=n<0?0:n,{start:n,end:r}}(e,{type:"core/link"});n=t.start,r=t.end+1}return Zg(e,n,r)}(o,t).text,[u,d]=(0,_.useState)(),{createPageEntity:p,userCanCreatePages:f}=(0,cr.Z)((e=>{const{getSettings:t}=e(Mb),n=t();return{createPageEntity:n.__experimentalCreatePageEntity,userCanCreatePages:n.__experimentalUserCanCreatePages}}),[]),m={url:n.url,type:n.type,id:n.id,opensInNewTab:"_blank"===n.target,title:c,...u},h=lv({ref:l,value:o,settings:$ne}),g=function(e){if(e)return zne.has(e)?Vne(zne.get(e)):(Hne+=1,zne.set(e,Hne),Vne(Hne))}(h),v=(0,_.useRef)(!!r&&"firstElement");return(0,_.createElement)(Na,{anchorRef:h,focusOnMount:v.current,onClose:s,position:"bottom center"},(0,_.createElement)(QX,{key:g,value:m,onChange:function(e){e={...u,...e};const n=m.opensInNewTab!==e.opensInNewTab&&m.url===e.url,r=n&&void 0===e.url;if(d(r?e:void 0),r)return;const l=jX(e.url),p=function(e){let{url:t,type:n,id:r,opensInNewWindow:o}=e;const i={type:"core/link",attributes:{url:t}};return n&&(i.attributes.type=n),r&&(i.attributes.id=r),o&&(i.attributes.target="_blank",i.attributes.rel="noreferrer noopener"),i}({url:l,type:e.type,id:void 0!==e.id&&null!==e.id?String(e.id):void 0,opensInNewWindow:e.opensInNewTab}),f=e.title||l;if(Mg(o)&&!t){const e=bg(Eg({text:f}),p,0,f.length);i(Hg(o,e))}else{let e;f===c?e=bg(o,p):(e=Eg({text:f}),e=bg(e,p,0,f.length),e=Wg(o,c,e)),e.start=e.end,e.activeFormats=[],i(e)}n||s(),Dne(l)?a(U(t?"Link edited.":"Link inserted."),"assertive"):a(U("Warning: the link has been inserted but may have errors. Please test it."),"assertive")},onRemove:function(){const e=jg(o,"core/link");i(e),s(),a(U("Link removed."),"assertive")},forceIsEditingLink:r,hasRichPreviews:!0,createSuggestion:p&&async function(e){const t=await p({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:f,createSuggestionButtonText:function(e){return jN(R(U("Create Page: <mark>%s</mark>"),e),{mark:(0,_.createElement)("mark",null)})},hasTextControl:!0}))}));const Zne="core/link",Une=U("Link"),$ne={name:Zne,title:Une,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",target:"target"},__unstablePasteRule(e,t){let{html:n,plainText:r}=t;if(Mg(e))return e;const o=(n||r).replace(/<[^>]+>/g,"").trim();return _X(o)?(window.console.log("Created link:\n\n",o),bg(e,{type:Zne,attributes:{url:du(o)}})):e},edit:function(e){let{isActive:t,activeAttributes:n,value:r,onChange:o,onFocus:i,contentRef:a}=e;const[s,l]=(0,_.useState)(!1);function c(){const e=Og(Zg(r));e&&_X(e)&&Dne(e)?o(bg(r,{type:Zne,attributes:{url:e}})):e&&BX(e)?o(bg(r,{type:Zne,attributes:{url:`mailto:${e}`}})):l(!0)}function u(){o(jg(r,Zne)),ag(U("Link removed."),"assertive")}return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ZJ,{type:"primary",character:"k",onUse:c}),(0,_.createElement)(ZJ,{type:"primaryShift",character:"k",onUse:u}),t&&(0,_.createElement)(UJ,{name:"link",icon:VU,title:U("Unlink"),onClick:u,isActive:t,shortcutType:"primaryShift",shortcutCharacter:"k"}),!t&&(0,_.createElement)(UJ,{name:"link",icon:HU,title:Une,onClick:c,isActive:t,shortcutType:"primary",shortcutCharacter:"k"}),(s||t)&&(0,_.createElement)(Wne,{addingLink:s,stopAddingLink:function(){l(!1),i()},isActive:t,activeAttributes:n,value:r,onChange:o,contentRef:a}))}},Gne="core/strikethrough",qne=U("Strikethrough"),Kne={name:Gne,title:qne,tagName:"s",className:null,edit(e){let{isActive:t,value:n,onChange:r,onFocus:o}=e;return(0,_.createElement)(UJ,{icon:nq,title:qne,onClick:function(){r(sv(n,{type:Gne,title:qne})),o()},isActive:t,role:"menuitemcheckbox"})}},Yne="core/underline",Xne=U("Underline"),Jne={name:Yne,title:Xne,tagName:"span",className:null,attributes:{style:"style"},edit(e){let{value:t,onChange:n}=e;const r=()=>{n(sv(t,{type:Yne,attributes:{style:"text-decoration: underline;"},title:Xne}))};return(0,_.createElement)(_.Fragment,null,(0,_.createElement)(ZJ,{type:"primary",character:"u",onUse:r}),(0,_.createElement)($J,{inputType:"formatUnderline",onInput:r}))}};var Qne=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"}));function ere(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(";").reduce(((e,t)=>{if(t){const[n,r]=t.split(":");"color"===n&&(e.color=r),"background-color"===n&&r!==ire&&(e.backgroundColor=r)}return e}),{})}function tre(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return e.split(" ").reduce(((e,n)=>{if(n.startsWith("has-")&&n.endsWith("-color")){const r=n.replace(/^has-/,"").replace(/-color$/,""),o=IU(t,r);e.color=o.color}return e}),{})}function nre(e,t,n){const r=Lg(e,t);return r?{...ere(r.attributes.style),...tre(r.attributes.class,n)}:{}}function rre(e){let{name:t,property:n,value:r,onChange:o}=e;const i=(0,cr.Z)((e=>{const{getSettings:t}=e(Mb);return(0,Ee.get)(t(),["colors"],[])}),[]),a=(0,_.useCallback)((e=>{o(function(e,t,n,r){const{color:o,backgroundColor:i}={...nre(e,t,n),...r};if(!o&&!i)return jg(e,t);const a=[],s=[],l={};if(i?a.push(["background-color",i].join(":")):a.push(["background-color",ire].join(":")),o){const e=TU(n,o);e?s.push(NU("color",e.slug)):a.push(["color",o].join(":"))}return a.length&&(l.style=a.join(";")),s.length&&(l.class=s.join(" ")),bg(e,{type:t,attributes:l})}(r,t,i,{[n]:e}))}),[i,o,n]),s=(0,_.useMemo)((()=>nre(r,t,i)),[t,r,i]);return(0,_.createElement)(OY,{value:s[n],onChange:a})}function ore(e){let{name:t,value:n,onChange:r,onClose:o,contentRef:i}=e;const a=function(e){const[t,n]=(0,_.useState)(e);return(0,_.useEffect)((()=>{e&&n(e)}),[e]),t}(lv({ref:i,value:n,settings:ure}));return(0,_.createElement)(Na,{onClose:o,className:"components-inline-color-popover",anchorRef:a},(0,_.createElement)(pL,{tabs:[{name:"color",title:U("Text")},{name:"backgroundColor",title:U("Background")}]},(e=>(0,_.createElement)(rre,{name:t,property:e.name,value:n,onChange:r}))))}const ire="rgba(0, 0, 0, 0)",are="core/text-color",sre=U("Highlight"),lre=[];function cre(e,t){const{ownerDocument:n}=e,{defaultView:r}=n,o=r.getComputedStyle(e).getPropertyValue(t);return"background-color"===t&&o===ire&&e.parentElement?cre(e.parentElement,t):o}const ure={name:are,title:sre,tagName:"mark",className:"has-inline-color",attributes:{style:"style",class:"class"},__unstableFilterAttributeValue(e,t){if("style"!==e)return t;if(t&&t.includes("background-color"))return t;const n=["background-color",ire].join(":");return t?[n,t].join(";"):n},edit:function(e){let{value:t,onChange:n,isActive:r,activeAttributes:o,contentRef:i}=e;const a=tw("color.custom"),s=tw("color.palette")||lre,[l,c]=(0,_.useState)(!1),u=(0,_.useCallback)((()=>c(!0)),[c]),d=(0,_.useCallback)((()=>c(!1)),[c]),p=(0,_.useMemo)((()=>function(e,t){let{color:n,backgroundColor:r}=t;if(n||r)return{color:n||cre(e,"color"),backgroundColor:r===ire?cre(e,"background-color"):r}}(i.current,nre(t,are,s))),[t,s]),f=!(0,Ee.isEmpty)(s)||!a;return f||r?(0,_.createElement)(_.Fragment,null,(0,_.createElement)(UJ,{className:"format-library-text-color-button",isActive:r,icon:(0,_.createElement)(c_,{icon:Qne,style:p}),title:sre,onClick:f?u:()=>n(jg(t,are)),role:"menuitemcheckbox"}),l&&(0,_.createElement)(ore,{name:are,onClose:d,activeAttributes:o,value:t,onChange:n,contentRef:i})):null}};var dre=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const pre="core/subscript",fre=U("Subscript"),mre={name:pre,title:fre,tagName:"sub",className:null,edit(e){let{isActive:t,value:n,onChange:r,onFocus:o}=e;return(0,_.createElement)(UJ,{icon:dre,title:fre,onClick:function(){r(sv(n,{type:pre,title:fre})),o()},isActive:t,role:"menuitemcheckbox"})}};var hre=(0,_.createElement)(Lo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(Po,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const gre="core/superscript",vre=U("Superscript"),bre={name:gre,title:vre,tagName:"sup",className:null,edit(e){let{isActive:t,value:n,onChange:r,onFocus:o}=e;return(0,_.createElement)(UJ,{icon:hre,title:vre,onClick:function(){r(sv(n,{type:gre,title:vre})),o()},isActive:t,role:"menuitemcheckbox"})}};var yre=(0,_.createElement)(Lo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,_.createElement)(Po,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));const wre="core/keyboard",kre=U("Keyboard input");[kne,Cne,Nne,One,$ne,Kne,Jne,ure,mre,bre,{name:wre,title:kre,tagName:"kbd",className:null,edit(e){let{isActive:t,value:n,onChange:r,onFocus:o}=e;return(0,_.createElement)(UJ,{icon:yre,title:kre,onClick:function(){r(sv(n,{type:wre,title:kre})),o()},isActive:t,role:"menuitemcheckbox"})}}].forEach((e=>{let{name:t,...n}=e;return Fg(t,n)}));const xre="mailpoet-form/font-selection",_re=["core/paragraph","core/heading"],Ere={name:xre,title:"Font Selection",tagName:"span",className:"mailpoet-has-font",attributes:{style:"style",font:"data-font"},edit:function(e){let{value:t,onChange:n,activeAttributes:r}=e;const o=(0,cr.Z)((e=>e("core/block-editor").getSelectedBlock()),[]);return _re.includes(o.name)?(0,TQ.jsx)(Zb,{children:(0,TQ.jsx)("div",{className:"mailpoet_toolbar_item",children:(0,TQ.jsx)(x0,{value:r.font,onChange:e=>{n(bg(t,{type:"mailpoet-form/font-selection",attributes:{style:`font-family: ${e}`,font:e}}))},name:SQ.Z.I18n.t("formSettingsStylesFontFamily"),hideLabelFromVision:!0})})}):null}};var Cre=n(80416),Sre=n(86529),Ire=n(5830),Tre=n(12912),Nre=n(62698),Are=n(38287);function Pre(){const e=[{name:"popup",label:SQ.Z.I18n.t("popupCategory")},{name:"slide_in",label:SQ.Z.I18n.t("slideInCategory")},{name:"fixed_bar",label:SQ.Z.I18n.t("fixedBarCategory")},{name:"below_posts",label:SQ.Z.I18n.t("belowPagesCategory")},{name:"others",label:SQ.Z.I18n.t("othersCategory")}],t=(0,cr.Z)((e=>e("mailpoet-form-editor-templates").getSelectedCategory()),[]),n=(0,cr.Z)((e=>e("mailpoet-form-editor-templates").getTemplates()),[]),r=(0,cr.Z)((e=>e("mailpoet-form-editor-templates").getLoading()),[]),o=(0,cr.Z)((e=>e("mailpoet-form-editor-templates").getSelectTemplateFailed()),[]),{selectTemplate:i,selectCategory:a}=(0,ur.Z)("mailpoet-form-editor-templates");return(0,TQ.jsxs)(TQ.Fragment,{children:[e.map((e=>n[e.name].map(((e,t)=>t<4&&(0,TQ.jsx)("link",{rel:"preload",href:e.thumbnail,as:"image"},`thumbnail_prefetch_${e.id}`))))),(0,TQ.jsxs)("div",{className:"mailpoet-template-selection-header",children:[(0,TQ.jsx)(BQ.Z,{level:4,children:SQ.Z.I18n.t("selectTemplate")}),(0,TQ.jsx)(Nre.Button,{automationId:"create_blank_form",onClick:()=>i("initial_form","Blank template"),children:SQ.Z.I18n.t("createBlankTemplate")})]}),o&&(0,TQ.jsx)(Are.Z,{type:"error",scroll:!0,renderInPlace:!0,children:(0,TQ.jsx)("p",{children:SQ.Z.I18n.t("createFormError")})}),(0,TQ.jsxs)("div",{"data-automation-id":"template_selection_list",children:[(0,TQ.jsx)(Sre.Z,{color:"#fff"}),(0,TQ.jsxs)("div",{className:"mailpoet-templates",children:[(0,TQ.jsx)(Cre.Z,{categories:e,active:t,onSelect:a}),n[t].map((e=>(0,TQ.jsx)(Tre.Z,{onSelect:()=>i(e.id,e.name),label:e.name,automationId:`select_template_${e.id}`,className:"mailpoet-form-template",children:(0,TQ.jsx)("div",{className:"mailpoet-template-thumbnail",children:(0,TQ.jsx)("img",{src:e.thumbnail,alt:e.name,width:"480",height:"317",loading:"lazy"})})},e.id)))]})]}),r&&(0,TQ.jsx)(Ire.Z,{})]})}var Rre={getTemplates:e=>e.templates,getFormEditorUrl:e=>e.formEditorUrl,getSelectTemplateFailed:e=>e.selectTemplateFailed,getLoading:e=>e.loading,getSelectedCategory:e=>e.activeCategory};const Lre=e=>({...e,selectTemplateFailed:!0,loading:!1}),Ore=e=>({...e,selectTemplateFailed:!1,loading:!0}),Mre=(e,t)=>({...e,activeCategory:t.category});var Dre=e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"SELECT_TEMPLATE_ERROR":return Lre(t);case"SELECT_TEMPLATE_START":return Ore(t);case"SELECT_CATEGORY":return Mre(t,n);default:return t}};function*Bre(e,t){yield{type:"SELECT_TEMPLATE_START"},yield{type:"TRACK_EVENT",name:"Forms > Template selected",data:{"Template id":e,"Template name":t},timeout:200};const n=(0,xe.Ys)("mailpoet-form-editor-templates").getFormEditorUrl();return window.location.href=`${n}${e}`,{}}function Fre(e){return{type:"SELECT_CATEGORY",category:e}}var jre={CALL_API:O2.Z,TRACK_EVENT:async function(e){let{name:t,data:n,timeout:r=0}=e;return SQ.Z.trackEvent(t,n),o=r,new Promise((e=>{setTimeout(e,o)}));var o}};let zre;function Hre(){return(0,TQ.jsx)(we.k.Provider,{value:(0,we.S)(window),children:(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(ke.Z,{}),(0,TQ.jsx)(Pre,{})]})})}!function(e){e.Popup="popup",e.SlideIn="slide_in",e.FixedBar="fixed_bar",e.BelowPosts="below_posts",e.Others="others"}(zre||(zre={}));const Vre=document.querySelector("#mailpoet_form_edit_templates");function Wre(){return(0,TQ.jsx)(we.k.Provider,{value:(0,we.S)(window),children:(0,TQ.jsxs)(TQ.Fragment,{children:[(0,TQ.jsx)(ke.Z,{}),(0,TQ.jsx)(T1,{})]})})}Vre&&((()=>{const e={templates:window.mailpoet_templates,formEditorUrl:window.mailpoet_form_edit_url,selectTemplateFailed:!1,loading:!1,activeCategory:zre.Popup},t={selectors:Rre,actions:x,controls:jre,reducer:Dre(e),resolvers:{}};(0,xe.R9)("mailpoet-form-editor-templates",t)})(),S().render((0,TQ.jsx)(_.StrictMode,{children:(0,TQ.jsx)(Hre,{})}),Vre)),window.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelector("#mailpoet_form_edit");e&&(ye.use(ye.createRootURLMiddleware(window.wpApiSettings.root)),ye.use(ye.createNonceMiddleware(window.wpApiSettings.nonce)),(0,V.KJ)("editor.MediaUpload","mailpoet/form-editor/replace-media-upload",(()=>Ba)),(()=>{const e=window.mailpoet_custom_fields.map((e=>({...e,params:e.params||{}}))),t=j9(Yf.fontSizes,Yf.colors,Yf.gradients,e),n={...window.mailpoet_form_data},r=t(n.body);delete n.body;const o={dateTypes:window.mailpoet_date_types,dateFormats:window.mailpoet_date_formats,months:window.mailpoet_month_names};n.settings.segments=n.settings.segments?n.settings.segments:[];let i=null;if(null!==n.id)try{i=JSON.parse(window.localStorage.getItem(`mailpoet_form_preview_settings${n.id}`))}catch(e){}let a=null;try{a=JSON.parse(window.localStorage.getItem("mailpoet_form_view_options"))}catch(e){a="disabled"}const s={editorHistory:[],editorHistoryOffset:0,formBlocks:r,formData:hne(n),dateSettingData:o,sidebarOpened:!0,formExports:window.mailpoet_form_exports,formErrors:k2(n,r),segments:window.mailpoet_form_segments,customFields:e,isFormSaving:!1,isCustomFieldSaving:!1,isCustomFieldCreating:!1,inserterPanel:null,notices:[],hasUnsavedChanges:!1,sidebar:{activeSidebar:"default",activeTab:"form",openedPanels:["basic-settings"]},previewSettings:i,fullscreenStatus:a,editorUrl:window.location.href,formEditorUrl:window.mailpoet_form_edit_url,previewPageUrl:window.mailpoet_form_preview_page,closeIconsUrl:window.mailpoet_close_icons_url,customFonts:window.mailpoet_custom_fonts,allWpPosts:window.mailpoet_all_wp_posts,allWpPages:window.mailpoet_all_wp_pages,allWpCategories:window.mailpoet_all_wp_categories,allWpTags:window.mailpoet_all_wp_tags,allWooCommerceProducts:window.mailpoet_woocommerce_products,allWooCommerceCategories:window.mailpoet_woocommerce_categories,allWooCommerceTags:window.mailpoet_woocommerce_tags,tutorialSeen:"1"===window.mailpoet_tutorial_seen,tutorialUrl:window.mailpoet_tutorial_url,user:{isAdministrator:window.mailpoet_is_administrator}},l={reducer:N2(s),actions:k,selectors:P2,controls:mne,resolvers:{}};(0,xe.R9)("mailpoet-form-editor",l)})(),(()=>{const e=(0,xe.Ys)("mailpoet-form-editor").getAllAvailableCustomFields();P7.supports.inserter=(0,xe.Ys)("mailpoet-form-editor").isUserAdministrator();const t=[{slug:"obligatory",title:""}];t.push({slug:"design",title:SQ.Z.I18n.t("layoutBlocksCategory")}),t.push({slug:"fields",title:SQ.Z.I18n.t("fieldsBlocksCategory")}),t.push({slug:"custom-fields",title:SQ.Z.I18n.t("customFieldsBlocksCategory")}),function(e){(0,xe.WI)(pc).setCategories(e)}(t),cl("mailpoet-form/divider",X9),cl("mailpoet-form/email-input",t7),cl("mailpoet-form/submit-button",o7),cl("mailpoet-form/first-name-input",l7),cl("mailpoet-form/last-name-input",p7),cl("mailpoet-form/segment-select",E7),cl("mailpoet-form/html",P7),cl("mailpoet-form/add-custom-field",F7),cl(nee,oee),cl(uee,pee),cl(Gee,Kee),cl(Ree,Oee),cl(lne,une),Array.isArray(e)&&e.forEach(dne)})(),Fg(xre,Ere),window.mailpoet_translations.forEach((e=>{const t=JSON.parse(e);t&&t.locale_data?.messages&&Z(t.locale_data.messages)})),S().render((0,TQ.jsx)(_.StrictMode,{children:(0,TQ.jsx)(Wre,{})}),e))}))},51991:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty,r=/\s+/;function o(e,o){if(o){var i=typeof o;"string"===i?function(e,t){for(var n=t.split(r),o=n.length,i=0;i<o;++i)e[n[i]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===i?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,o):"number"===i&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=new e;t(i,r);var a=[];for(var s in i)i[s]&&a.push(s);return a.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},42152:function(e){var t;t=function(){return function(){var e={134:function(e,t,n){"use strict";n.d(t,{default:function(){return b}});var r=n(279),o=n.n(r),i=n(370),a=n.n(i),s=n(817),l=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}var t,n;return t=e,(n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var e="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var e=this,t=this.createFakeElement();this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(t),this.selectedText=l()(t),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=l()(this.target),this.copyText()}},{key:"copyText",value:function(){var e;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==c(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}])&&u(t.prototype,n),e}();function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(l,e);var t,n,r,o,i,s=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(o);if(i){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function l(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(n=s.call(this)).resolveOptions(t),n.listenClick(e),n}return t=l,r=[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],(n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===p(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=a()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new d({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return v("action",e)}},{key:"defaultTarget",value:function(e){var t=v("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return v("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}])&&f(t.prototype,n),r&&f(t,r),l}(o())},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var r=n(828);function o(e,t,n,r,o){var a=i.apply(this,arguments);return e.addEventListener(n,a,o),{destroy:function(){e.removeEventListener(n,a,o)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,r,i)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var r=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return 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.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(134)}().default},e.exports=t()},4631:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=r||o||i,s=a&&(r?document.documentMode||6:+(i||o)[1]),l=!i&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!i&&/Chrome\//.test(e),d=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),h=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),v=h||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=h||/Mac/.test(t),y=/\bCrOS\b/.test(e),w=/win/i.test(t),k=d&&e.match(/Version\/(\d*\.\d*)/);k&&(k=Number(k[1])),k&&k>=15&&(d=!1,l=!0);var x=b&&(c||d&&(null==k||k<12.11)),_=n||a&&s>=9;function E(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C,S=function(e,t){var n=e.className,r=E(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function I(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return I(e).appendChild(t)}function N(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)o.appendChild(t[i]);return o}function A(e,t,n,r){var o=N(e,t,n,r);return o.setAttribute("role","presentation"),o}function P(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function R(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function L(e,t){var n=e.className;E(t).test(n)||(e.className+=(n?" ":"")+t)}function O(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!E(n[r]).test(t)&&(t+=" "+n[r]);return t}C=document.createRange?function(e,t,n,r){var o=document.createRange();return o.setEnd(r||e,n),o.setStart(e,t),o}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var M=function(e){e.select()};function D(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function B(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function F(e,t,n,r,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=r||0,a=o||0;;){var s=e.indexOf("\t",i);if(s<0||s>=t)return a+(t-i);a+=s-i,a+=n-a%n,i=s+1}}h?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(e){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=D(this.onTimeout,this)};function z(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}j.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},j.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var H={toString:function(){return"CodeMirror.Pass"}},V={scroll:!1},W={origin:"*mouse"},Z={origin:"+move"};function U(e,t,n){for(var r=0,o=0;;){var i=e.indexOf("\t",r);-1==i&&(i=e.length);var a=i-r;if(i==e.length||o+a>=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}var $=[""];function G(e){for(;$.length<=e;)$.push(q($)+" ");return $[e]}function q(e){return e[e.length-1]}function K(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Y(){}function X(e,t){var n;return Object.create?n=Object.create(e):(Y.prototype=e,n=new Y),t&&B(t,n),n}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Q(e))||t.test(e):Q(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function ie(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}var ae=null;function se(e,t,n){var r;ae=null;for(var o=0;o<e.length;++o){var i=e[o];if(i.from<t&&i.to>t)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:ae=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:ae=o)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,o=/[1n]/;function i(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l,c="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var u=a.length,d=[],p=0;p<u;++p)d.push((l=a.charCodeAt(p))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(l):1424<=l&&l<=1524?"R":1536<=l&&l<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(l-1536):1774<=l&&l<=2220?"r":8192<=l&&l<=8203?"w":8204==l?"b":"L");for(var f=0,m=c;f<u;++f){var h=d[f];"m"==h?d[f]=m:m=h}for(var g=0,v=c;g<u;++g){var b=d[g];"1"==b&&"r"==v?d[g]="n":n.test(b)&&(v=b,"r"==b&&(d[g]="R"))}for(var y=1,w=d[0];y<u-1;++y){var k=d[y];"+"==k&&"1"==w&&"1"==d[y+1]?d[y]="1":","!=k||w!=d[y+1]||"1"!=w&&"n"!=w||(d[y]=w),w=k}for(var x=0;x<u;++x){var _=d[x];if(","==_)d[x]="N";else if("%"==_){var E=void 0;for(E=x+1;E<u&&"%"==d[E];++E);for(var C=x&&"!"==d[x-1]||E<u&&"1"==d[E]?"1":"N",S=x;S<E;++S)d[S]=C;x=E-1}}for(var I=0,T=c;I<u;++I){var N=d[I];"L"==T&&"1"==N?d[I]="L":n.test(N)&&(T=N)}for(var A=0;A<u;++A)if(t.test(d[A])){var P=void 0;for(P=A+1;P<u&&t.test(d[P]);++P);for(var R="L"==(A?d[A-1]:c),L=R==("L"==(P<u?d[P]:c))?R?"L":"R":c,O=A;O<P;++O)d[O]=L;A=P-1}for(var M,D=[],B=0;B<u;)if(r.test(d[B])){var F=B;for(++B;B<u&&r.test(d[B]);++B);D.push(new i(0,F,B))}else{var j=B,z=D.length,H="rtl"==s?1:0;for(++B;B<u&&"L"!=d[B];++B);for(var V=j;V<B;)if(o.test(d[V])){j<V&&(D.splice(z,0,new i(1,j,V)),z+=H);var W=V;for(++V;V<B&&o.test(d[V]);++V);D.splice(z,0,new i(2,W,V)),z+=H,j=V}else++V;j<B&&D.splice(z,0,new i(1,j,B))}return"ltr"==s&&(1==D[0].level&&(M=a.match(/^\s+/))&&(D[0].from=M[0].length,D.unshift(new i(0,0,M[0].length))),1==q(D).level&&(M=a.match(/\s+$/))&&(q(D).to-=M[0].length,D.push(new i(0,u-M[0].length,u)))),"rtl"==s?D.reverse():D}}();function ce(e,t){var n=e.order;return null==n&&(n=e.order=le(e.text,t)),n}var ue=[],de=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ue).concat(n)}};function pe(e,t){return e._handlers&&e._handlers[t]||ue}function fe(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var i=z(o,n);i>-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function me(e,t){var n=pe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,r)}function he(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),me(e,n||t.type,e,t),ke(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==z(n,t[r])&&n.push(t[r])}function ve(e,t){return pe(e,t).length>0}function be(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){fe(this,e,t)}}function ye(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function xe(e){ye(e),we(e)}function _e(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Ce,Se,Ie=function(){if(a&&s<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==Ce){var t=N("span","");T(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ce=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Ce?N("span",""):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ne(e){if(null!=Se)return Se;var t=T(e,document.createTextNode("AخA")),n=C(t,0,1).getBoundingClientRect(),r=C(t,1,2).getBoundingClientRect();return I(e),!(!n||n.left==n.right)&&(Se=r.right-n.right<3)}var Ae,Pe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Le="oncopy"in(Ae=N("div"))||(Ae.setAttribute("oncopy","return;"),"function"==typeof Ae.oncopy),Oe=null;var Me={},De={};function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Me[e]=t}function Fe(e){if("string"==typeof e&&De.hasOwnProperty(e))e=De[e];else if(e&&"string"==typeof e.name&&De.hasOwnProperty(e.name)){var t=De[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function je(e,t){t=Fe(t);var n=Me[t.name];if(!n)return je(e,"text/plain");var r=n(e,t);if(ze.hasOwnProperty(t.name)){var o=ze[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var ze={};function He(e,t){B(t,ze.hasOwnProperty(e)?ze[e]:ze[e]={})}function Ve(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function We(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ze(e,t,n){return!e.startState||e.startState(t,n)}var Ue=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function $e(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t<i){n=o;break}t-=i}return n.lines[t]}function Ge(e,t,n){var r=[],o=t.line;return e.iter(t.line,n.line+1,(function(e){var i=e.text;o==n.line&&(i=i.slice(0,n.ch)),o==t.line&&(i=i.slice(t.ch)),r.push(i),++o})),r}function qe(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Ke(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ye(e){if(null==e.parent)return null;for(var t=e.parent,n=z(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var o=0;r.children[o]!=t;++o)n+=r.children[o].chunkSize();return n+t.first}function Xe(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var o=e.children[r],i=o.height;if(t<i){e=o;continue e}t-=i,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function Je(e,t){return t>=e.first&&t<e.first+e.size}function Qe(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function ot(e,t){return tt(e,t)<0?t:e}function it(e,t){return tt(e,t)<0?e:t}function at(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,$e(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,$e(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=st(e,t[r]);return n}Ue.prototype.eol=function(){return this.pos>=this.string.length},Ue.prototype.sol=function(){return this.pos==this.lineStart},Ue.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ue.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ue.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ue.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ue.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ue.prototype.skipToEnd=function(){this.pos=this.string.length},Ue.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ue.prototype.backUp=function(e){this.pos-=e},Ue.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ue.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ue.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ue.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ue.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ue.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ue.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var o=[e.state.modeGen],i={};wt(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),i,r);for(var a=n.state,s=function(r){n.baseTokens=o;var s=e.state.overlays[r],l=1,c=0;n.state=!0,wt(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=o[l];r>e&&o.splice(l,1,e,o[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)o.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var i=o[n+1];o[n+1]=(i?i+" ":"")+"overlay "+t}}),i),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function pt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ft(e,Ye(t)),o=t.text.length>e.options.maxHighlightLength&&Ve(e.doc.mode,r.state),i=dt(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new ut(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=i.first)return i.first;var l=$e(i,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=i.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==o||r>u)&&(o=s-1,r=u)}return o}(e,t,n),a=i>r.first&&$e(r,i-1).stateAfter,s=a?ut.fromSaved(r,a,i):new ut(r,Ze(r.mode),i);return r.iter(i,t,(function(n){mt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&r<o.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function mt(e,t,n,r){var o=e.doc.mode,i=new Ue(t,e.options.tabSize,n);for(i.start=i.pos=r||0,""==t&&ht(o,n.state);!i.eol();)gt(o,i,n.state),i.start=i.pos}function ht(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=We(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function gt(e,t,n,r){for(var o=0;o<10;o++){r&&(r[0]=We(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,Ve(e.mode,t.state),n,t.lookAhead):new ut(e,Ve(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bt(e,t,n,r){var o,i,a=e.doc,s=a.mode,l=$e(a,(t=st(a,t)).line),c=ft(e,t.line,n),u=new Ue(l.text,e.options.tabSize,c);for(r&&(i=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=gt(s,u,c.state),r&&i.push(new vt(u,o,Ve(a.mode,c.state)));return r?i:new vt(u,o,c.state)}function yt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function wt(e,t,n,r,o,i,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new Ue(t,e.options.tabSize,r),p=e.options.addModeClass&&[null];for(""==t&&yt(ht(n,r.state),i);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&mt(e,t,r,d.pos),d.pos=t.length,l=null):l=yt(gt(n,d,r.state,p),i),p){var f=p[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c<d.start;)o(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var m=Math.min(d.pos,c+5e3);o(m,u),c=m}}var kt=!1,xt=!1;function _t(e,t,n){this.marker=e,this.from=t,this.to=n}function Et(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ct(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function St(e,t){if(t.full)return null;var n=Je(e,t.from.line)&&$e(e,t.from.line).markedSpans,r=Je(e,t.to.line)&&$e(e,t.to.line).markedSpans;if(!n&&!r)return null;var o=t.from.ch,i=t.to.ch,a=0==tt(t.from,t.to),s=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t)||i.from==t&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var s=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(r||(r=[])).push(new _t(a,i.from,s?null:i.to))}}return r}(n,o,a),l=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(r||(r=[])).push(new _t(a,s?null:i.from-t,null==i.to?null:i.to-t))}}return r}(r,i,a),c=1==t.text.length,u=q(t.text).length+(c?o:0);if(s)for(var d=0;d<s.length;++d){var p=s[d];if(null==p.to){var f=Et(l,p.marker);f?c&&(p.to=null==f.to?null:f.to+u):p.to=o}}if(l)for(var m=0;m<l.length;++m){var h=l[m];null!=h.to&&(h.to+=u),null==h.from?Et(s,h.marker)||(h.from=u,c&&(s||(s=[])).push(h)):(h.from+=u,c&&(s||(s=[])).push(h))}s&&(s=It(s)),l&&l!=s&&(l=It(l));var g=[s];if(!c){var v,b=t.text.length-2;if(b>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(v||(v=[])).push(new _t(s[y].marker,null,null));for(var w=0;w<b;++w)g.push(v);g.push(l)}return g}function It(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Tt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Nt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function At(e){return e.inclusiveLeft?-1:0}function Pt(e){return e.inclusiveRight?1:0}function Rt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),o=t.find(),i=tt(r.from,o.from)||At(e)-At(t);return i?-i:tt(r.to,o.to)||Pt(e)-Pt(t)||t.id-e.id}function Lt(e,t){var n,r=xt&&e.markedSpans;if(r)for(var o=void 0,i=0;i<r.length;++i)(o=r[i]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||Rt(n,o.marker)<0)&&(n=o.marker);return n}function Ot(e){return Lt(e,!0)}function Mt(e){return Lt(e,!1)}function Dt(e,t){var n,r=xt&&e.markedSpans;if(r)for(var o=0;o<r.length;++o){var i=r[o];i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!n||Rt(n,i.marker)<0)&&(n=i.marker)}return n}function Bt(e,t,n,r,o){var i=$e(e,t),a=xt&&i.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=tt(c.from,n)||At(l.marker)-At(o),d=tt(c.to,r)||Pt(l.marker)-Pt(o);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Ft(e){for(var t;t=Ot(e);)e=t.find(-1,!0).line;return e}function jt(e,t){var n=$e(e,t),r=Ft(n);return n==r?t:Ye(r)}function zt(e,t){if(t>e.lastLine())return t;var n,r=$e(e,t);if(!Ht(e,r))return t;for(;n=Mt(r);)r=n.find(1,!0).line;return Ye(r)+1}function Ht(e,t){var n=xt&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)if((r=n[o]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Vt(e,t,r))return!0}}function Vt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Vt(e,r.line,Et(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,i=0;i<t.markedSpans.length;++i)if((o=t.markedSpans[i]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&Vt(e,t,o))return!0}function Wt(e){for(var t=0,n=(e=Ft(e)).parent,r=0;r<n.lines.length;++r){var o=n.lines[r];if(o==e)break;t+=o.height}for(var i=n.parent;i;i=(n=i).parent)for(var a=0;a<i.children.length;++a){var s=i.children[a];if(s==n)break;t+=s.height}return t}function Zt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Ot(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=Mt(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function Ut(e){var t=e.display,n=e.doc;t.maxLine=$e(n,n.first),t.maxLineLength=Zt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Zt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var $t=function(e,t,n){this.text=e,Nt(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,Tt(e)}$t.prototype.lineNo=function(){return Ye(this)},be($t);var qt={},Kt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Kt:qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(e,t){var n=A("span",null,null,l?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;r.pos=0,r.addToken=Qt,Ne(e.display.measure)&&(a=ce(i,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(i,r,pt(e,i,t!=e.display.externalMeasured&&Ye(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=O(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=O(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Te(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=O(r.pre.className,r.textClass||"")),r}function Jt(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,n,r,o,i,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;o<e.length;o++){var i=e.charAt(o);" "!=i||!n||o!=e.length-1&&32!=e.charCodeAt(o+1)||(i=" "),r+=i,n=" "==i}return r}(t,e.trailingSpace):t,d=e.cm.state.specialChars,p=!1;if(d.test(t)){c=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var m=d.exec(t),h=m?m.index-f:t.length-f;if(h){var g=document.createTextNode(u.slice(f,f+h));a&&s<9?c.appendChild(N("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!m)break;f+=h+1;var v=void 0;if("\t"==m[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(v=c.appendChild(N("span",G(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==m[0]||"\n"==m[0]?((v=c.appendChild(N("span","\r"==m[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",m[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(m[0])).setAttribute("cm-text",m[0]),a&&s<9?c.appendChild(N("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||o||p||i||l){var w=n||"";r&&(w+=r),o&&(w+=o);var k=N("span",[c],w,i);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&k.setAttribute(x,l[x]);return e.content.appendChild(k)}e.content.appendChild(c)}}function en(e,t){return function(n,r,o,i,a,s,l){o=o?o+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,p=0;p<t.length&&!((d=t[p]).to>c&&d.from<=c);p++);if(d.to>=u)return e(n,r,o,i,a,s,l);e(n,r.slice(0,d.to-c),o,i,null,s,l),i=null,r=r.slice(d.to-c),c=d.to}}}function tn(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,s,l,c,u,d,p,f=o.length,m=0,h=1,g="",v=0;;){if(v==m){l=c=u=s="",p=null,d=null,v=1/0;for(var b=[],y=void 0,w=0;w<r.length;++w){var k=r[w],x=k.marker;if("bookmark"==x.type&&k.from==m&&x.widgetNode)b.push(x);else if(k.from<=m&&(null==k.to||k.to>m||x.collapsed&&k.to==m&&k.from==m)){if(null!=k.to&&k.to!=m&&v>k.to&&(v=k.to,c=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&k.from==m&&(u+=" "+x.startStyle),x.endStyle&&k.to==v&&(y||(y=[])).push(x.endStyle,k.to),x.title&&((p||(p={})).title=x.title),x.attributes)for(var _ in x.attributes)(p||(p={}))[_]=x.attributes[_];x.collapsed&&(!d||Rt(d.marker,x)<0)&&(d=k)}else k.from>m&&v>k.from&&(v=k.from)}if(y)for(var E=0;E<y.length;E+=2)y[E+1]==v&&(c+=" "+y[E]);if(!d||d.from==m)for(var C=0;C<b.length;++C)tn(t,0,b[C]);if(d&&(d.from||0)==m){if(tn(t,(null==d.to?f+1:d.to)-m,d.marker,null==d.from),null==d.to)return;d.to==m&&(d=!1)}}if(m>=f)break;for(var S=Math.min(f,v);;){if(g){var I=m+g.length;if(!d){var T=I>S?g.slice(0,S-m):g;t.addToken(t,T,a?a+l:l,u,m+T.length==v?c:"",s,p)}if(I>=S){g=g.slice(S-m),m=S;break}m=I,u=""}g=o.slice(i,i=n[h++]),a=Yt(n[h++],t.cm.options)}}else for(var N=1;N<n.length;N+=2)t.addToken(t,o.slice(i,i=n[N]),Yt(n[N+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Mt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ye(q(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ht(e,t)}function on(e,t,n){for(var r,o=[],i=t;i<n;i=r){var a=new rn(e.doc,$e(e.doc,i),i);r=i+a.size,o.push(a)}return o}var an=null;var sn=null;function ln(e,t){var n=pe(e,t);if(n.length){var r,o=Array.prototype.slice.call(arguments,2);an?r=an.delayedCallbacks:sn?r=sn:(r=sn=[],setTimeout(cn,0));for(var i=function(e){r.push((function(){return n[e].apply(null,o)}))},a=0;a<n.length;++a)i(a)}}function cn(){var e=sn;sn=null;for(var t=0;t<e.length;++t)e[t]()}function un(e,t,n,r){for(var o=0;o<t.changes.length;o++){var i=t.changes[o];"text"==i?fn(e,t):"gutter"==i?hn(e,t,n,r):"class"==i?mn(e,t):"widget"==i&&gn(e,t,r)}t.changes=null}function dn(e){return e.node==e.text&&(e.node=N("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function pn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Xt(e,t)}function fn(e,t){var n=t.text.className,r=pn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,mn(e,t)):n&&(t.text.className=n)}function mn(e,t){(function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=dn(t);t.background=r.insertBefore(N("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?dn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function hn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=dn(t);t.gutterBackground=N("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var a=dn(t),s=t.gutter=N("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(N("div",Qe(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=i.hasOwnProperty(c)&&i[c];u&&s.appendChild(N("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function gn(e,t,n){t.alignable&&(t.alignable=null);for(var r=E("CodeMirror-linewidget"),o=t.node.firstChild,i=void 0;o;o=i)i=o.nextSibling,r.test(o.className)&&t.node.removeChild(o);bn(e,t,n)}function vn(e,t,n,r){var o=pn(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),mn(e,t),hn(e,t,n,r),bn(e,t,r),t.node}function bn(e,t,n){if(yn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)yn(e,t.rest[r],t,n,!1)}function yn(e,t,n,r,o){if(t.widgets)for(var i=dn(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=N("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),wn(l,c,n,r),e.display.input.setUneditable(c),o&&l.above?i.insertBefore(c,n.gutter||n.text):i.appendChild(c),ln(l,"redraw")}}function wn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(o-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function kn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!P(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),T(t.display.measure,N("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function xn(e,t){for(var n=_e(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function _n(e){return e.lineSpace.offsetTop}function En(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Cn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,N("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Sn(e){return 50-e.display.nativeBarWidth}function In(e){return e.display.scroller.clientWidth-Sn(e)-e.display.barWidth}function Tn(e){return e.display.scroller.clientHeight-Sn(e)-e.display.barHeight}function Nn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var o=0;o<e.rest.length;o++)if(Ye(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function An(e,t,n,r){return Ln(e,Rn(e,t),n,r)}function Pn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ur(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Rn(e,t){var n=Ye(t),r=Pn(e,n);r&&!r.text?r=null:r&&r.changes&&(un(e,r,n,ir(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Ye(t=Ft(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var o=r.built=Xt(e,r);return r.text=o.pre,T(e.display.lineMeasure,o.pre),r}(e,t));var o=Nn(r,t,n);return{line:t,view:r,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Ln(e,t,n,r,o){t.before&&(n=-1);var i,l=n+(r||"");return t.cache.hasOwnProperty(l)?i=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,o=r&&In(e);if(!t.measure.heights||r&&t.measure.width!=o){var i=t.measure.heights=[];if(r){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&i.push((l.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,n,r){var o,i=Dn(t.map,n,r),l=i.node,c=i.start,u=i.end,d=i.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;c&&re(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u<i.coverEnd&&re(t.line.text.charAt(i.coverStart+u));)++u;if((o=a&&s<9&&0==c&&u==i.coverEnd-i.coverStart?l.parentNode.getBoundingClientRect():Bn(C(l,c,u).getClientRects(),r)).left||o.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(o=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Oe)return Oe;var t=T(e,N("span","x")),n=t.getBoundingClientRect(),r=C(t,0,1).getBoundingClientRect();return Oe=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,o))}else{var f;c>0&&(d=r="right"),o=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!o||!o.left&&!o.right)){var m=l.parentNode.getClientRects()[0];o=m?{left:m.left,right:m.left+or(e.display),top:m.top,bottom:m.bottom}:Mn}for(var h=o.top-t.rect.top,g=o.bottom-t.rect.top,v=(h+g)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var w=y?b[y-1]:0,k=b[y],x={left:("right"==d?o.right:o.left)-t.rect.left,right:("left"==d?o.left:o.right)-t.rect.left,top:w,bottom:k};return o.left||o.right||(x.bogus=!0),e.options.singleCursorHeightPerLine||(x.rtop=h,x.rbottom=g),x}(e,t,n,r)).bogus||(t.cache[l]=i)),{left:i.left,right:i.right,top:o?i.rtop:i.top,bottom:o?i.rbottom:i.bottom}}var On,Mn={left:0,right:0,top:0,bottom:0};function Dn(e,t,n){for(var r,o,i,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(o=0,i=1,a="left"):t<l?i=1+(o=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(o=(i=l-s)-1,t>=l&&(a="right")),null!=o){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&o==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:o,end:i,collapse:a,coverStart:s,coverEnd:l}}function Bn(e,t){var n=Mn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function Fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function jn(e){e.display.externalMeasure=null,I(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Fn(e.display.view[t])}function zn(e){jn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Hn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Vn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Wn(e){var t=Ft(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=kn(t[r]));return n}function Zn(e,t,n,r,o){if(!o){var i=Wn(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var a=Wt(t);if("local"==r?a+=_n(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:Vn());var l=s.left+("window"==r?0:Hn());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function Un(e,t,n){if("div"==n)return t;var r=t.left,o=t.top;if("page"==n)r-=Hn(),o-=Vn();else if("local"==n||!n){var i=e.display.sizer.getBoundingClientRect();r+=i.left,o+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:o-a.top}}function $n(e,t,n,r,o){return r||(r=$e(e.doc,t.line)),Zn(e,r,An(e,r,t.ch,o),n)}function Gn(e,t,n,r,o,i){function a(t,a){var s=Ln(e,o,t,a?"right":"left",i);return a?s.left=s.right:s.right=s.left,Zn(e,r,s,n)}r=r||$e(e.doc,t.line),o||(o=Rn(e,r));var s=ce(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=se(s,l,c),p=ae,f=u(l,d,"before"==c);return null!=p&&(f.other=u(l,p,"before"!=c)),f}function qn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=or(e.display)*t.ch);var r=$e(e.doc,t.line),o=Wt(r)+_n(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function Kn(e,t,n,r,o){var i=et(e,t,n);return i.xRel=o,r&&(i.outside=r),i}function Yn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Kn(r.first,0,null,-1,-1);var o=Xe(r,n),i=r.first+r.size-1;if(o>i)return Kn(r.first+r.size-1,$e(r,i).text.length,null,1,1);t<0&&(t=0);for(var a=$e(r,o);;){var s=er(e,a,o,t,n),l=Dt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==o)return c;a=$e(r,o=c.line)}}function Xn(e,t,n,r){r-=Wn(t);var o=t.text.length,i=ie((function(t){return Ln(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=ie((function(t){return Ln(e,n,t).top>r}),i,o)}}function Jn(e,t,n,r){return n||(n=Rn(e,t)),Xn(e,t,n,Zn(e,t,Ln(e,n,r),"line").top)}function Qn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,o){o-=Wt(t);var i=Rn(e,t),a=Wn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?nr:tr)(e,t,n,i,u,r,o);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var p,f,m=null,h=null,g=ie((function(t){var n=Ln(e,i,t);return n.top+=a,n.bottom+=a,!!Qn(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(m=t,h=n),!0)}),s,l),v=!1;if(h){var b=r-h.left<h.right-r,y=b==c;g=m+(y?0:1),f=y?"after":"before",p=b?h.left:h.right}else{c||g!=l&&g!=s||g++,f=0==g?"after":g==t.text.length?"before":Ln(e,i,g-(c?1:0)).bottom+a<=o==c?"after":"before";var w=Gn(e,et(n,g,f),"line",t,i);p=w.left,v=o<w.top?-1:o>=w.bottom?1:0}return Kn(n,g=oe(t.text,g,1),f,v,r-p)}function tr(e,t,n,r,o,i,a){var s=ie((function(s){var l=o[s],c=1!=l.level;return Qn(Gn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),i,a,!0)}),0,o.length-1),l=o[s];if(s>0){var c=1!=l.level,u=Gn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Qn(u,i,a,!0)&&u.top>a&&(l=o[s-1])}return l}function nr(e,t,n,r,o,i,a){var s=Xn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,p=0;p<o.length;p++){var f=o[p];if(!(f.from>=c||f.to<=l)){var m=Ln(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,h=m<i?i-m+1e9:m-i;(!u||d>h)&&(u=f,d=h)}}return u||(u=o[o.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==On){On=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)On.appendChild(document.createTextNode("x")),On.appendChild(N("br"));On.appendChild(document.createTextNode("x"))}T(e.measure,On);var n=On.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),I(e.measure),n||1}function or(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),n=N("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ir(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=i.offsetLeft+i.clientLeft+o,r[s]=i.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/or(e.display)-3);return function(o){if(Ht(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return n?i+(Math.ceil(o.text.length/r)||1)*t:i+t}}function lr(e){var t=e.doc,n=sr(e);t.iter((function(e){var t=n(e);t!=e.height&&Ke(e,t)}))}function cr(e,t,n,r){var o=e.display;if(!n&&"true"==_e(t).getAttribute("cm-not-content"))return null;var i,a,s=o.lineSpace.getBoundingClientRect();try{i=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=Yn(e,i,a);if(r&&c.xRel>0&&(l=$e(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((i-Cn(e.display).left)/or(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function dr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var o=e.display;if(r&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)xt&&jt(e.doc,t)<o.viewTo&&fr(e);else if(n<=o.viewFrom)xt&&zt(e.doc,n+r)>o.viewFrom?fr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)fr(e);else if(t<=o.viewFrom){var i=mr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):fr(e)}else if(n>=o.viewTo){var a=mr(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):fr(e)}else{var s=mr(e,t,t,-1),l=mr(e,n,n+r,1);s&&l?(o.view=o.view.slice(0,s.index).concat(on(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):fr(e)}var c=o.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(o.externalMeasured=null))}function pr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var i=r.view[ur(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==z(a,n)&&a.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mr(e,t,n,r){var o,i=ur(e,t),a=e.display.view;if(!xt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,l=0;l<i;l++)s+=a[l].size;if(s!=t){if(r>0){if(i==a.length-1)return null;o=s+a[i].size-t,i++}else o=s-t;t+=o,n+=o}for(;jt(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function hr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var o=t[r];o.hidden||o.node&&!o.changes||++n}return n}function gr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},o=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var l=n.sel.ranges[s];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(a){var u=a(e,l);u&&br(e,u,o)}else(c||e.options.showCursorWhenSelecting)&&br(e,l.head,o);c||wr(e,l,i)}}return r}function br(e,t,n){var r=Gn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(N("div"," ","CodeMirror-cursor"));if(o.style.left=r.left+"px",o.style.top=r.top+"px",o.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var i=$n(e,t,"div",null,null),a=i.right-i.left;o.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function yr(e,t){return e.top-t.top||e.left-t.left}function wr(e,t,n){var r=e.display,o=e.doc,i=document.createDocumentFragment(),a=Cn(e.display),s=a.left,l=Math.max(r.sizerWidth,In(e)-r.sizer.offsetLeft)-a.right,c="ltr"==o.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var i,a,d=$e(o,t),p=d.text.length;function f(n,r){return $n(e,et(t,n),"div",d,r)}function m(t,n,r){var o=Jn(e,d,null,t),i="ltr"==n==("after"==r)?"left":"right";return f("after"==r?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),i)[i]}var h=ce(d,o.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,i=0;i<e.length;++i){var a=e[i];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(h,n||0,null==r?p:r,(function(e,t,o,d){var g="ltr"==o,v=f(e,g?"left":"right"),b=f(t-1,g?"right":"left"),y=null==n&&0==e,w=null==r&&t==p,k=0==d,x=!h||d==h.length-1;if(b.top-v.top<=3){var _=(c?w:y)&&x,E=(c?y:w)&&k?s:(g?v:b).left,C=_?l:(g?b:v).right;u(E,v.top,C-E,v.bottom)}else{var S,I,T,N;g?(S=c&&y&&k?s:v.left,I=c?l:m(e,o,"before"),T=c?s:m(t,o,"after"),N=c&&w&&x?l:b.right):(S=c?m(e,o,"before"):s,I=!c&&y&&k?l:v.right,T=!c&&w&&x?s:b.left,N=c?m(t,o,"after"):l),u(S,v.top,I-S,v.bottom),v.bottom<b.top&&u(s,v.bottom,null,b.top),u(T,b.top,N-T,b.bottom)}(!i||yr(v,i)<0)&&(i=v),yr(b,i)<0&&(i=b),(!a||yr(v,a)<0)&&(a=v),yr(b,a)<0&&(a=b)})),{start:i,end:a}}var p=t.from(),f=t.to();if(p.line==f.line)d(p.line,p.ch,f.ch);else{var m=$e(o,p.line),h=$e(o,f.line),g=Ft(m)==Ft(h),v=d(p.line,p.ch,g?m.text.length+1:null).end,b=d(f.line,g?0:null,f.ch).start;g&&(v.top<b.top-2?(u(v.right,v.top,null,v.bottom),u(s,b.top,b.left,b.bottom)):u(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&u(s,v.bottom,null,b.top)}n.appendChild(i)}function kr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Cr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function xr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Er(e))}function _r(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Cr(e))}),100)}function Er(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,t),e.state.focused=!0,L(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),kr(e))}function Cr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Sr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,i=0,l=0;l<t.view.length;l++){var c=t.view[l],u=e.options.lineWrapping,d=void 0,p=0;if(!c.hidden){if(o+=c.line.height,a&&s<8){var f=c.node.offsetTop+c.node.offsetHeight;d=f-n,n=f}else{var m=c.node.getBoundingClientRect();d=m.bottom-m.top,!u&&c.text.firstChild&&(p=c.text.firstChild.getBoundingClientRect().right-m.left-1)}var h=c.line.height-d;if((h>.005||h<-.005)&&(o<r&&(i-=h),Ke(c.line,d),Ir(c.line),c.rest))for(var g=0;g<c.rest.length;g++)Ir(c.rest[g]);if(p>e.display.sizerWidth){var v=Math.ceil(p/or(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(t.scroller.scrollTop+=i)}function Ir(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Tr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-_n(e));var o=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,i=Xe(t,r),a=Xe(t,o);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<i?(i=s,a=Xe(t,Wt($e(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(i=Xe(t,Wt($e(t,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function Nr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Tn(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+En(n),l=t.top<r,c=t.bottom>s-r;if(t.top<o)a.scrollTop=l?0:t.top;else if(t.bottom>o+i){var u=Math.min(t.top,(c?s:t.bottom)-i);u!=o&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,f=In(e)-n.gutters.offsetWidth,m=t.right-t.left>f;return m&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<p?a.scrollLeft=Math.max(0,t.left+d-(m?0:10)):t.right>f+p-3&&(a.scrollLeft=t.right+(m?0:10)-f),a}function Ar(e,t){null!=t&&(Lr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Pr(e){Lr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Rr(e,t,n){null==t&&null==n||Lr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Lr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Or(e,qn(e,t.from),qn(e,t.to),t.margin))}function Or(e,t,n,r){var o=Nr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Rr(e,o.scrollLeft,o.scrollTop)}function Mr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||lo(e,{top:t}),Dr(e,t,!0),n&&lo(e),ro(e,100))}function Dr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Br(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,po(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+En(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var jr=function(e,t,n){this.cm=n;var r=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};jr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},jr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},jr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},jr.prototype.zeroWidthHack=function(){var e=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new j,this.disableVert=new j},jr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},jr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var zr=function(){};function Hr(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;Vr(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Sr(e),Vr(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function Vr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}zr.prototype.update=function(){return{bottom:0,right:0}},zr.prototype.setScrollLeft=function(){},zr.prototype.setScrollTop=function(){},zr.prototype.clear=function(){};var Wr={native:jr,null:zr};function Zr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Wr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Br(e,t):Mr(e,t)}),e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var Ur=0;function $r(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ur,markArrays:null},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Gr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var o=e.ops[r];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}(n)}finally{an=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)qr(t[n]);for(var r=0;r<t.length;r++)Kr(t[r]);for(var o=0;o<t.length;o++)Yr(t[o]);for(var i=0;i<t.length;i++)Xr(t[i]);for(var a=0;a<t.length;a++)Jr(t[a])}(e)}))}function qr(e){var t=e.cm,n=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Sn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Sn(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&Ut(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Kr(e){e.updatedDisplay=e.mustUpdate&&ao(e.cm,e.update)}function Yr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Sr(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=An(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-In(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Xr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Br(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==R();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Hr(t,e.barMeasure),e.updatedDisplay&&uo(t,e.barMeasure),e.selectionChanged&&kr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&xr(e.cm)}function Jr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&so(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Dr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Br(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!he(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),o=null;if(t.top+r.top<0?o=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!m){var i=N("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-_n(e.display))+"px;\n height: "+(t.bottom-t.top+Sn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(t,function(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?et(t.line,t.ch+1,"before"):t,t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i=0;i<5;i++){var a=!1,s=Gn(e,t),l=n&&n!=t?Gn(e,n):s,c=Nr(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Mr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Br(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||me(o[a],"hide");if(i)for(var s=0;s<i.length;++s)i[s].lines.length&&me(i[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&me(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qr(e,t){if(e.curOp)return t();$r(e);try{return t()}finally{Gr(e)}}function eo(e,t){return function(){if(e.curOp)return t.apply(e,arguments);$r(e);try{return t.apply(e,arguments)}finally{Gr(e)}}}function to(e){return function(){if(this.curOp)return e.apply(this,arguments);$r(this);try{return e.apply(this,arguments)}finally{Gr(this)}}}function no(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);$r(t);try{return e.apply(this,arguments)}finally{Gr(t)}}}function ro(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,D(oo,e))}function oo(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?Ve(t.mode,r.state):null,l=dt(e,i,r,!0);s&&(r.state=s),i.styles=l.styles;var c=i.styleClasses,u=l.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!d&&p<a.length;++p)d=a[p]!=i.styles[p];d&&o.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=e.options.maxHighlightLength&&mt(e,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ro(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&Qr(e,(function(){for(var t=0;t<o.length;t++)pr(e,o[t],"text")}))}}var io=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Tr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=In(e),this.force=n,this.dims=ir(e),this.events=[]};function ao(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return fr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==hr(e))return!1;fo(e)&&(fr(e),t.dims=ir(e));var o=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFrom<i&&i-n.viewFrom<20&&(i=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),xt&&(i=jt(e.doc,i),a=zt(e.doc,a));var s=i!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;(function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(on(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n})(e,i,a),n.viewOffset=Wt($e(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=hr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=R();if(!t||!P(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&P(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function s(t){var n=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var p=c[d];if(p.hidden);else if(p.node&&p.node.parentNode==i){for(;a!=p.node;)a=s(a);var f=o&&null!=t&&t<=u&&p.lineNumber;p.changes&&(z(p.changes,"gutter")>-1&&(f=!1),un(e,p,u,n)),f&&(I(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),a=p.node.nextSibling}else{var m=vn(e,p,u,n);i.insertBefore(m,a)}u+=p.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=R()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&P(document.body,e.anchorNode)&&P(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),I(n.cursorDiv),I(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ro(e,400)),n.updateLineNumbers=null,!0}function so(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=In(e))r&&(t.visible=Tr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+En(e.display)-Tn(e),n.top)}),t.visible=Tr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ao(e,t))break;Sr(e);var o=Fr(e);gr(e),Hr(e,o),uo(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function lo(e,t){var n=new io(e,t);if(ao(e,n)){Sr(e),so(e,n);var r=Fr(e);gr(e),Hr(e,r),uo(e,r),n.finish()}}function co(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ln(e,"gutterChanged",e)}function uo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Sn(e)+"px"}function po(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=i),n[a].gutterBackground&&(n[a].gutterBackground.style.left=i));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=r+o+"px")}}function fo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Qe(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var o=r.measure.appendChild(N("div",[N("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=o.firstChild.offsetWidth,a=o.offsetWidth-i;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(i,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",co(e.display),!0}return!1}function mo(e,t){for(var n=[],r=!1,o=0;o<e.length;o++){var i=e[o],a=null;if("string"!=typeof i&&(a=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!t)continue;r=!0}n.push({className:i,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function ho(e){var t=e.gutters,n=e.gutterSpecs;I(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var o=n[r],i=o.className,a=o.style,s=t.appendChild(N("div",null,"CodeMirror-gutter "+i));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==i&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",co(e)}function go(e){ho(e.display),dr(e),po(e)}function vo(e,t,r,o){var i=this;this.input=r,i.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=A("div",null,"CodeMirror-code"),i.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=N("div",null,"CodeMirror-cursors"),i.measure=N("div",null,"CodeMirror-measure"),i.lineMeasure=N("div",null,"CodeMirror-measure"),i.lineSpace=A("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var c=A("div",[i.lineSpace],"CodeMirror-lines");i.mover=N("div",[c],null,"position: relative"),i.sizer=N("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=N("div",null,null,"position: absolute; height: 50px; width: 1px;"),i.gutters=N("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=N("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=N("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),i.wrapper.setAttribute("translate","no"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),l||n&&v||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=mo(o.gutters,o.lineNumbers),ho(i),r.init(i)}io.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)me.apply(null,this.events[e])};var bo=0,yo=null;function wo(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function ko(e){var t=wo(e);return t.x*=yo,t.y*=yo,t}function xo(e,t){var r=wo(t),o=r.x,i=r.y,a=yo;0===t.deltaMode&&(o=t.deltaX,i=t.deltaY,a=1);var s=e.display,c=s.scroller,u=c.scrollWidth>c.clientWidth,p=c.scrollHeight>c.clientHeight;if(o&&u||i&&p){if(i&&b&&l)e:for(var f=t.target,m=s.view;f!=c;f=f.parentNode)for(var h=0;h<m.length;h++)if(m[h].node==f){e.display.currentWheelTarget=f;break e}if(o&&!n&&!d&&null!=a)return i&&p&&Mr(e,Math.max(0,c.scrollTop+i*a)),Br(e,Math.max(0,c.scrollLeft+o*a)),(!i||i&&p)&&ye(t),void(s.wheelStartX=null);if(i&&null!=a){var g=i*a,v=e.doc.scrollTop,y=v+s.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):y=Math.min(e.doc.height,y+g+50),lo(e,{top:v,bottom:y})}bo<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=c.scrollLeft,s.wheelStartY=c.scrollTop,s.wheelDX=o,s.wheelDY=i,setTimeout((function(){if(null!=s.wheelStartX){var e=c.scrollLeft-s.wheelStartX,t=c.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(yo=(yo*bo+n)/(bo+1),++bo)}}),200)):(s.wheelDX+=o,s.wheelDY+=i))}}a?yo=-.53:n?yo=15:u?yo=-.7:p&&(yo=-1/3);var _o=function(e,t){this.ranges=e,this.primIndex=t};_o.prototype.primary=function(){return this.ranges[this.primIndex]},_o.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},_o.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Eo(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new _o(e,this.primIndex)},_o.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},_o.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var Eo=function(e,t){this.anchor=e,this.head=t};function Co(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=z(t,o);for(var i=1;i<t.length;i++){var a=t[i],s=t[i-1],l=tt(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=it(s.from(),a.from()),u=ot(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;i<=n&&--n,t.splice(--i,2,new Eo(d?u:c,d?c:u))}}return new _o(t,n)}function So(e,t){return new _o([new Eo(e,t||e)],0)}function Io(e){return e.text?et(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function To(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Io(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Io(t).ch-t.to.ch),et(n,r)}function No(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var o=e.sel.ranges[r];n.push(new Eo(To(o.anchor,t),To(o.head,t)))}return Co(e.cm,n,e.sel.primIndex)}function Ao(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Po(e){e.doc.mode=je(e.options,e.doc.modeOption),Ro(e)}function Ro(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ro(e,100),e.state.modeGen++,e.curOp&&dr(e)}function Lo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Oo(e,t,n,r){function o(e){return n?n[e]:null}function i(e,n,o){(function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Tt(e),Nt(e,n);var o=r?r(e):1;o!=e.height&&Ke(e,o)})(e,n,o,r),ln(e,"change",e,t)}function a(e,t){for(var n=[],i=e;i<t;++i)n.push(new $t(c[i],o(i),r));return n}var s=t.from,l=t.to,c=t.text,u=$e(e,s.line),d=$e(e,l.line),p=q(c),f=o(c.length-1),m=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Lo(e,t)){var h=a(0,c.length-1);i(d,d.text,f),m&&e.remove(s.line,m),h.length&&e.insert(s.line,h)}else if(u==d)if(1==c.length)i(u,u.text.slice(0,s.ch)+p+u.text.slice(l.ch),f);else{var g=a(1,c.length-1);g.push(new $t(p+u.text.slice(l.ch),f,r)),i(u,u.text.slice(0,s.ch)+c[0],o(0)),e.insert(s.line+1,g)}else if(1==c.length)i(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),o(0)),e.remove(s.line+1,m);else{i(u,u.text.slice(0,s.ch)+c[0],o(0)),i(d,p+d.text.slice(l.ch),f);var v=a(1,c.length-1);m>1&&e.remove(s.line+1,m-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Mo(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=o){var l=i&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function Do(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,lr(e),Po(e),Bo(e),e.options.direction=t.direction,e.options.lineWrapping||Ut(e),e.options.mode=t.modeOption,dr(e)}function Bo(e){("rtl"==e.doc.direction?L:S)(e.display.lineDiv,"CodeMirror-rtl")}function Fo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function jo(e,t){var n={from:rt(t.from),to:Io(t),text:Ge(e,t.from,t.to)};return Zo(e,n,t.from.line,t.to.line+1),Mo(e,(function(e){return Zo(e,n,t.from.line,t.to.line+1)}),!0),n}function zo(e){for(;e.length&&q(e).ranges;)e.pop()}function Ho(e,t,n,r){var o=e.history;o.undone.length=0;var i,a,s=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(zo(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}(o,o.lastOp==r)))a=q(i.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Io(t):i.changes.push(jo(e,t));else{var l=q(o.done);for(l&&l.ranges||Wo(e.sel,o.done),i={changes:[jo(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||me(e,"historyAdded")}function Vo(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,q(o.done),t))?o.done[o.done.length-1]=t:Wo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&zo(o.undone)}function Wo(e,t){var n=q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Zo(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function Uo(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function $o(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],o=0;o<t.text.length;++o)r.push(Uo(n[o]));return r}(e,t),r=St(e,t);if(!n)return r;if(!r)return n;for(var o=0;o<n.length;++o){var i=n[o],a=r[o];if(i&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<i.length;++c)if(i[c].marker==l.marker)continue e;i.push(l)}else a&&(n[o]=a)}return n}function Go(e,t,n){for(var r=[],o=0;o<e.length;++o){var i=e[o];if(i.ranges)r.push(n?_o.prototype.deepCopy.call(i):i);else{var a=i.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&z(t,Number(u[1]))>-1&&(q(s)[d]=c[d],delete c[d])}}}return r}function qo(e,t,n,r){if(r){var o=e.anchor;if(n){var i=tt(t,o)<0;i!=tt(n,o)<0?(o=t,t=n):i!=tt(t,n)<0&&(t=n)}return new Eo(o,t)}return new Eo(n||t,t)}function Ko(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new _o([qo(e.sel.primary(),t,n,o)],0),r)}function Yo(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)r[i]=qo(e.sel.ranges[i],t[i],null,o);ei(e,Co(e.cm,r,e.sel.primIndex),n)}function Xo(e,t,n,r){var o=e.sel.ranges.slice(0);o[t]=n,ei(e,Co(e.cm,o,e.sel.primIndex),r)}function Jo(e,t,n,r){ei(e,So(t,n),r)}function Qo(e,t,n){var r=e.history.done,o=q(r);o&&o.ranges?(r[r.length-1]=t,ti(e,t,n)):ei(e,t,n)}function ei(e,t,n){ti(e,t,n),Vo(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ti(e,t,n){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Eo(st(e,t[n].anchor),st(e,t[n].head))},origin:n&&n.origin};return me(e,"beforeSelectionChange",e,r),e.cm&&me(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Co(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);ni(e,oi(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Pr(e.cm)}function ni(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ge(e.cm)),ln(e,"cursorActivity",e))}function ri(e){ni(e,oi(e,e.sel,null,!1))}function oi(e,t,n,r){for(var o,i=0;i<t.ranges.length;i++){var a=t.ranges[i],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],l=ai(e,a.anchor,s&&s.anchor,n,r),c=ai(e,a.head,s&&s.head,n,r);(o||l!=a.anchor||c!=a.head)&&(o||(o=t.ranges.slice(0,i)),o[i]=new Eo(l,c))}return o?Co(e.cm,o,t.primIndex):t}function ii(e,t,n,r,o){var i=$e(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var s=i.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(o&&(me(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),p=void 0;if((r<0?u:c)&&(d=si(e,d,-r,d&&d.line==t.line?i:null)),d&&d.line==t.line&&(p=tt(d,n))&&(r<0?p<0:p>0))return ii(e,d,t,r,o)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=si(e,f,r,f.line==t.line?i:null)),f?ii(e,f,t,r,o):null}}return t}function ai(e,t,n,r,o){var i=r||1;return ii(e,t,n,i,o)||!o&&ii(e,t,n,i,!0)||ii(e,t,n,-i,o)||!o&&ii(e,t,n,-i,!0)||(e.cantEdit=!0,et(e.first,0))}function si(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||$e(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function li(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),V)}function ci(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,o,i){t&&(r.from=st(e,t)),n&&(r.to=st(e,n)),o&&(r.text=o),void 0!==i&&(r.origin=i)}),me(e,"beforeChange",e,r),e.cm&&me(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ui(e,t,n){if(e.cm){if(!e.cm.curOp)return eo(e.cm,ui)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=ci(e,t,!0))){var r=kt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=z(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var o=[{from:t,to:n}],i=0;i<r.length;++i)for(var a=r[i],s=a.find(0),l=0;l<o.length;++l){var c=o[l];if(!(tt(c.to,s.from)<0||tt(c.from,s.to)>0)){var u=[l,1],d=tt(c.from,s.from),p=tt(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:s.to,to:c.to}),o.splice.apply(o,u),l+=u.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)di(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else di(e,t)}}function di(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=No(e,t);Ho(e,t,n,e.cm?e.cm.curOp.id:NaN),mi(e,t,n,St(e,t));var r=[];Mo(e,(function(e,n){n||-1!=z(r,e.history)||(bi(e.history,t),r.push(e.history)),mi(e,t,null,St(e,t))}))}}function pi(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,s="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,c=0;c<s.length&&(o=s[c],n?!o.ranges||o.equals(e.sel):o.ranges);c++);if(c!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(o=s.pop()).ranges){if(r)return void s.push(o);break}if(Wo(o,l),n&&!o.equals(e.sel))return void ei(e,o,{clearRedo:!1});a=o}var u=[];Wo(a,l),l.push({changes:u,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var d=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),p=function(n){var r=o.changes[n];if(r.origin=t,d&&!ci(e,r,!1))return s.length=0,{};u.push(jo(e,r));var i=n?No(e,r):q(s);mi(e,r,i,$o(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Io(r)});var a=[];Mo(e,(function(e,t){t||-1!=z(a,e.history)||(bi(e.history,r),a.push(e.history)),mi(e,r,null,$o(e,r))}))},f=o.changes.length-1;f>=0;--f){var m=p(f);if(m)return m.v}}}}function fi(e,t){if(0!=t&&(e.first+=t,e.sel=new _o(K(e.sel.ranges,(function(e){return new Eo(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)pr(e.cm,r,"gutter")}}function mi(e,t,n,r){if(e.cm&&!e.cm.curOp)return eo(e.cm,mi)(e,t,n,r);if(t.to.line<e.first)fi(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);fi(e,o),t={from:et(e.first,0),to:et(t.to.line+o,t.to.ch),text:[q(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:et(i,$e(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=No(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,s=!1,l=i.line;e.options.lineWrapping||(l=Ye(Ft($e(r,i.line))),r.iter(l,a.line+1,(function(e){if(e==o.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Oo(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,i.line+t.text.length,(function(e){var t=Zt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var o=$e(e,r).stateAfter;if(o&&(!(o instanceof ct)||r+o.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,i.line),ro(e,400);var c=t.text.length-(a.line-i.line)-1;t.full?dr(e):i.line!=a.line||1!=t.text.length||Lo(e.doc,t)?dr(e,i.line,a.line+1,c):pr(e,i.line,"text");var u=ve(e,"changes"),d=ve(e,"change");if(d||u){var p={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&ln(e,"change",e,p),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}(e.cm,t,r):Oo(e,t,r),ti(e,n,V),e.cantEdit&&ai(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function hi(e,t,n,r,o){var i;r||(r=n),tt(r,n)<0&&(n=(i=[r,n])[0],r=i[1]),"string"==typeof t&&(t=e.splitLines(t)),ui(e,{from:n,to:r,text:t,origin:o})}function gi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function vi(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o],a=!0;if(i.ranges){i.copied||((i=e[o]=i.deepCopy()).copied=!0);for(var s=0;s<i.ranges.length;s++)gi(i.ranges[s].anchor,t,n,r),gi(i.ranges[s].head,t,n,r)}else{for(var l=0;l<i.changes.length;++l){var c=i.changes[l];if(n<c.from.line)c.from=et(c.from.line+r,c.from.ch),c.to=et(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function bi(e,t){var n=t.from.line,r=t.to.line,o=t.text.length-(r-n)-1;vi(e.done,n,r,o),vi(e.undone,n,r,o)}function yi(e,t,n,r){var o=t,i=t;return"number"==typeof t?i=$e(e,at(e,t)):o=Ye(t),null==o?null:(r(i,o)&&e.cm&&pr(e.cm,o,n),i)}function wi(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ki(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var o=e[r];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}Eo.prototype.from=function(){return it(this.anchor,this.head)},Eo.prototype.to=function(){return ot(this.anchor,this.head)},Eo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},wi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var o=this.lines[n];this.height-=o.height,Gt(o),ln(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},ki.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<o){var i=Math.min(t,o-e),a=r.height;if(r.removeInner(e,i),this.height-=a-r.height,o==i&&(this.children.splice(n--,1),r.parent=null),0==(t-=i))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof wi))){var s=[];this.collapse(s),this.children=[new wi(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<=i){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,s=a;s<o.lines.length;){var l=new wi(o.lines.slice(s,s+=25));o.height-=l.height,this.children.splice(++r,0,l),l.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ki(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=z(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ki(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<i){var a=Math.min(t,i-e);if(o.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=i}}};var xi=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function _i(e,t,n){Wt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ar(e,n)}xi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ye(n);if(null!=r&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var i=kn(this);Ke(n,Math.max(0,n.height-i)),e&&(Qr(e,(function(){_i(e,n,-i),pr(e,r,"widget")})),ln(e,"lineWidgetCleared",e,this,r))}},xi.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var o=kn(this)-t;o&&(Ht(this.doc,r)||Ke(r,r.height+o),n&&Qr(n,(function(){n.curOp.forceUpdate=!0,_i(n,r,o),ln(n,"lineWidgetChanged",n,e,Ye(r))})))},be(xi);var Ei=0,Ci=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ei};function Si(e,t,n,r,o){if(r&&r.shared)return function(e,t,n,r,o){(r=B(r)).shared=!1;var i=[Si(e,t,n,r,o)],a=i[0],s=r.widgetNode;return Mo(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),i.push(Si(e,st(e,t),st(e,n),r,o));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=q(i)})),new Ii(i,a)}(e,t,n,r,o);if(e.cm&&!e.cm.curOp)return eo(e.cm,Si)(e,t,n,r,o);var i=new Ci(e,o),a=tt(t,n);if(r&&B(r,i,!1),a>0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=A("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Bt(e,t.line,t,n,i)||t.line!=n.line&&Bt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");xt=!0}i.addToHistory&&Ho(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&i.collapsed&&!c.options.lineWrapping&&Ft(r)==c.display.maxLine&&(s=!0),i.collapsed&&l!=t.line&&Ke(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new _t(i,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&Ke(t,0)})),i.clearOnEnter&&de(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(kt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++Ei,i.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),i.collapsed)dr(c,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=t.line;u<=n.line;u++)pr(c,u,"text");i.atomic&&ri(c.doc),ln(c,"markerAdded",c,i)}return i}Ci.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&$r(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],s=Et(a.markedSpans,this);e&&!this.collapsed?pr(e,Ye(a),"text"):e&&(null!=s.to&&(o=Ye(a)),null!=s.from&&(r=Ye(a))),a.markedSpans=Ct(a.markedSpans,s),null==s.from&&this.collapsed&&!Ht(this.doc,a)&&e&&Ke(a,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Ft(this.lines[l]),u=Zt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ri(e.doc)),e&&ln(e,"markerCleared",e,this,r,o),t&&Gr(e),this.parent&&this.parent.clear()}},Ci.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var i=this.lines[o],a=Et(i.markedSpans,this);if(null!=a.from&&(n=et(t?i:Ye(i),a.from),-1==e))return n;if(null!=a.to&&(r=et(t?i:Ye(i),a.to),1==e))return r}return n&&{from:n,to:r}},Ci.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Qr(r,(function(){var o=t.line,i=Ye(t.line),a=Pn(r,i);if(a&&(Fn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ht(n.doc,o)&&null!=n.height){var s=n.height;n.height=null;var l=kn(n)-s;l&&Ke(o,o.height+l)}ln(r,"markerChanged",r,e)}))},Ci.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=z(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ci.prototype.detachLine=function(e){if(this.lines.splice(z(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(Ci);var Ii=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Ti(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Ni(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Mo(n.primary.doc,(function(e){return r.push(e)}));for(var o=0;o<n.markers.length;o++){var i=n.markers[o];-1==z(r,i.doc)&&(i.parent=null,n.markers.splice(o--,1))}},n=0;n<e.length;n++)t(n)}Ii.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ln(this,"clear")}},Ii.prototype.find=function(e,t){return this.primary.find(e,t)},be(Ii);var Ai=0,Pi=function(e,t,n,r,o){if(!(this instanceof Pi))return new Pi(e,t,n,r,o);null==n&&(n=0),ki.call(this,[new wi([new $t("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=et(n,0);this.sel=So(i),this.history=new Fo(null),this.id=++Ai,this.modeOption=t,this.lineSep=r,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Oo(this,{from:i,to:i,text:e}),ei(this,So(i),V)};Pi.prototype=X(ki.prototype,{constructor:Pi,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=qe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:no((function(e){var t=et(this.first,0),n=this.first+this.size-1;ui(this,{from:t,to:et(n,$e(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Rr(this.cm,0,0),ei(this,So(t),V)})),replaceRange:function(e,t,n,r){hi(this,e,t=st(this,t),n=n?st(this,n):t,r)},getRange:function(e,t,n){var r=Ge(this,st(this,e),st(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Je(this,e))return $e(this,e)},getLineNumber:function(e){return Ye(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=$e(this,e)),Ft(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:no((function(e,t,n){Jo(this,st(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:no((function(e,t,n){Jo(this,st(this,e),st(this,t||e),n)})),extendSelection:no((function(e,t,n){Ko(this,st(this,e),t&&st(this,t),n)})),extendSelections:no((function(e,t){Yo(this,lt(this,e),t)})),extendSelectionsBy:no((function(e,t){Yo(this,lt(this,K(this.sel.ranges,e)),t)})),setSelections:no((function(e,t,n){if(e.length){for(var r=[],o=0;o<e.length;o++)r[o]=new Eo(st(this,e[o].anchor),st(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),ei(this,Co(this.cm,r,t),n)}})),addSelection:no((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Eo(st(this,e),st(this,t||e))),ei(this,Co(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var o=Ge(this,n[r].from(),n[r].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var o=Ge(this,n[r].from(),n[r].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[r]=o}return t},replaceSelection:function(e,t,n){for(var r=[],o=0;o<this.sel.ranges.length;o++)r[o]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:no((function(e,t,n){for(var r=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];r[i]={from:a.from(),to:a.to(),text:this.splitLines(e[i]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],o=et(e.first,0),i=o,a=0;a<t.length;a++){var s=t[a],l=Ao(s.from,o,i),c=Ao(Io(s),o,i);if(o=s.to,i=c,"around"==n){var u=e.sel.ranges[a],d=tt(u.head,u.anchor)<0;r[a]=new Eo(d?c:l,d?l:c)}else r[a]=new Eo(l,l)}return new _o(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)ui(this,r[l]);s?Qo(this,s):this.cm&&Pr(this.cm)})),undo:no((function(){pi(this,"undo")})),redo:no((function(){pi(this,"redo")})),undoSelection:no((function(){pi(this,"undo",!0)})),redoSelection:no((function(){pi(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Fo(this.history),Mo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Go(this.history.done),undone:Go(this.history.undone)}},setHistory:function(e){var t=this.history=new Fo(this.history);t.done=Go(e.done.slice(0),null,!0),t.undone=Go(e.undone.slice(0),null,!0)},setGutterMarker:no((function(e,t,n){return yi(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:no((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&yi(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Je(this,e))return null;if(t=e,!(e=$e(this,e)))return null}else if(null==(t=Ye(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:no((function(e,t,n){return yi(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(E(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:no((function(e,t,n){return yi(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[r];if(!o)return!1;if(null==n)e[r]=null;else{var i=o.match(E(n));if(!i)return!1;var a=i.index+i[0].length;e[r]=o.slice(0,i.index)+(i.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0}))})),addLineWidget:no((function(e,t,n){return function(e,t,n,r){var o=new xi(e,n,r),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),yi(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length,Math.max(0,o.insertAt)),0,o),o.line=t,i&&!Ht(e,t)){var r=Wt(t)<e.scrollTop;Ke(t,t.height+kn(o)),r&&Ar(i,o.height),i.curOp.forceUpdate=!0}return!0})),i&&ln(i,"lineWidgetAdded",i,o,"number"==typeof t?t:Ye(t)),o}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Si(this,st(this,e),st(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Si(this,e=st(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=$e(this,(e=st(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&o==e.line&&e.ch>=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(o){var i=o.text.length+r;if(i>e)return t=e,!0;e-=i,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Pi(qe(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Pi(qe(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=r.find(),i=e.clipPos(o.from),a=e.clipPos(o.to);if(tt(i,a)){var s=Si(e,i,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Ti(this)),r},unlinkDoc:function(e){if(e instanceof Ia&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ni(Ti(this));break}if(e.history==this.history){var n=[e.id];Mo(e,(function(e){return n.push(e.id)}),!0),e.history=new Fo(null),e.history.done=Go(this.history.done,n),e.history.undone=Go(this.history.undone,n)}},iterLinkedDocs:function(e){Mo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Pe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:no((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Qr(t=this.cm,(function(){Bo(t),dr(t)})))}))}),Pi.prototype.eachLine=Pi.prototype.iter;var Ri=0;function Li(e){var t=this;if(Oi(t),!he(t,e)&&!xn(t.display,e)){ye(e),a&&(Ri=+new Date);var n=cr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var o=r.length,i=Array(o),s=0,l=function(){++s==o&&eo(t,(function(){var e={from:n=st(t.doc,n),to:n,text:t.doc.splitLines(i.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ui(t.doc,e),Qo(t.doc,So(st(t.doc,n),st(t.doc,Io(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==z(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(i[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),ti(t.doc,So(n,n)),p)for(var f=0;f<p.length;++f)hi(t.doc,"",p[f].anchor,p[f].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Oi(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Mi(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var o=t[r].CodeMirror;o&&n.push(o)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Di=!1;function Bi(){var e;Di||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Mi(Fi)}),100))})),de(window,"blur",(function(){return Mi(Cr)})),Di=!0)}function Fi(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ji={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},zi=0;zi<10;zi++)ji[zi+48]=ji[zi+96]=String(zi);for(var Hi=65;Hi<=90;Hi++)ji[Hi]=String.fromCharCode(Hi);for(var Vi=1;Vi<=12;Vi++)ji[Vi+111]=ji[Vi+63235]="F"+Vi;var Wi={};function Zi(e){var t,n,r,o,i=e.split(/-(?!$)/);e=i[i.length-1];for(var a=0;a<i.length-1;a++){var s=i[a];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ui(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var o=K(n.split(" "),Zi),i=0;i<o.length;i++){var a=void 0,s=void 0;i==o.length-1?(s=o.join(" "),a=r):(s=o.slice(0,i+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function $i(e,t,n,r){var o=(t=Yi(t)).call?t.call(e,r):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return $i(e,t.fallthrough,n,r);for(var i=0;i<t.fallthrough.length;i++){var a=$i(e,t.fallthrough[i],n,r);if(a)return a}}}function Gi(e){var t="string"==typeof e?e:ji[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function qi(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(x?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(x?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Ki(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=ji[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),qi(n,e,t))}function Yi(e){return"string"==typeof e?Wi[e]:e}function Xi(e,t){for(var n=e.doc.sel.ranges,r=[],o=0;o<n.length;o++){for(var i=t(n[o]);r.length&&tt(i.from,q(r).to)<=0;){var a=r.pop();if(tt(a.from,i.from)<0){i.from=a.from;break}}r.push(i)}Qr(e,(function(){for(var t=r.length-1;t>=0;t--)hi(e.doc,"",r[t].from,r[t].to,"+delete");Pr(e)}))}function Ji(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Qi(e,t,n){var r=Ji(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=ce(n,t.doc.direction);if(i){var a,s=o<0?q(i):i[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Rn(t,n);a=o<0?n.text.length-1:0;var u=Ln(t,c,a).top;a=ie((function(e){return Ln(t,c,e).top==u}),o<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Ji(n,a,1))}else a=o<0?s.to:s.from;return new et(r,a,l)}}return new et(r,o<0?n.text.length:0,o<0?"before":"after")}Wi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Wi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Wi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Wi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Wi.default=b?Wi.macDefault:Wi.pcDefault;var ta={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Xi(e,(function(t){if(t.empty()){var n=$e(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Xi(e,(function(t){return{from:et(t.from().line,0),to:st(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Xi(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Xi(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Xi(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return na(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ra(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=$e(e.doc,t),r=function(e){for(var t;t=Mt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Ye(r)),ea(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),Z)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),Z)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ra(e,t.head):r}),Z)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,o=0;o<n.length;o++){var i=n[o].from(),a=F(e.getLine(i.line),i.ch,r);t.push(G(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var o=t[r].head,i=$e(e.doc,o.line).text;if(i)if(o.ch==i.length&&(o=new et(o.line,o.ch-1)),o.ch>0)o=new et(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),et(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=$e(e.doc,o.line-1).text;a&&(o=new et(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(o.line-1,a.length-1),o,"+transpose"))}n.push(new Eo(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Pr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function na(e,t){var n=$e(e.doc,t),r=Ft(n);return r!=n&&(t=Ye(r)),ea(!0,e,r,t,1)}function ra(e,t){var n=na(e,t.line),r=$e(e.doc,n.line),o=ce(r,e.doc.direction);if(!o||0==o[0].level){var i=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=i&&t.ch;return et(n.line,a?0:i,n.sticky)}return n}function oa(e,t,n){if("string"==typeof t&&!(t=ta[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=H}finally{e.display.shift=r,e.state.suppressEdits=!1}return o}var ia=new j;function aa(e,t,n,r){var o=e.state.keySeq;if(o){if(Gi(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ia.set(50,(function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())})),sa(e,o+" "+t,n,r))return!0}return sa(e,t,n,r)}function sa(e,t,n,r){var o=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var o=$i(t,e.state.keyMaps[r],n,e);if(o)return o}return e.options.extraKeys&&$i(t,e.options.extraKeys,n,e)||$i(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&ln(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(ye(n),kr(e)),!!o}function la(e,t){var n=Ki(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?aa(e,"Shift-"+n,t,(function(t){return oa(e,t,!0)}))||aa(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return oa(e,t)})):aa(e,n,t,(function(t){return oa(e,t)})))}var ca=null;function ua(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=R(),he(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var o=la(t,e);d&&(ca=o?r:null,o||88!=r||Le||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!o&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(S(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n))}L(t,"CodeMirror-crosshair"),de(document,"keyup",n),de(document,"mouseover",n)}(t)}}function da(e){16==e.keyCode&&(this.doc.sel.shift=!1),he(this,e)}function pa(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||xn(t.display,e)||he(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==ca)return ca=null,void ye(e);if(!d||e.which&&!(e.which<10)||!la(t,e)){var o=String.fromCharCode(null==r?n:r);"\b"!=o&&(function(e,t,n){return aa(e,"'"+n+"'",t,(function(t){return oa(e,t,!0)}))}(t,e,o)||t.display.input.onKeyPress(e))}}}var fa,ma,ha=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ga(e){var t=this,n=t.display;if(!(he(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,xn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!ya(t,e)){var r=cr(t,e),o=Ee(e),i=r?function(e,t){var n=+new Date;return ma&&ma.compare(n,e,t)?(fa=ma=null,"triple"):fa&&fa.compare(n,e,t)?(ma=new ha(n,e,t),fa=null,"double"):(fa=new ha(n,e,t),ma=null,"single")}(r,o):"single";window.focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,o){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),aa(e,qi(i=(1==t?"Left":2==t?"Middle":"Right")+i,o),o,(function(t){if("string"==typeof t&&(t=ta[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=H}finally{e.state.suppressEdits=!1}return r}))}(t,o,r,i,e)||(1==o?r?function(e,t,n,r){a?setTimeout(D(xr,e),0):e.curOp.focus=R();var o,i=function(e,t,n){var r=e.getOption("configureMouse"),o=r?r(e,t,n):{};if(null==o.unit){var i=y?n.shiftKey&&n.metaKey:n.altKey;o.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=b?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(b?n.altKey:n.ctrlKey)),o}(e,n,r),c=e.doc.sel;e.options.dragDrop&&Ie&&!e.isReadOnly()&&"single"==n&&(o=c.contains(t))>-1&&(tt((o=c.ranges[o]).from(),t)<0||t.xRel>0)&&(tt(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,c=eo(e,(function(t){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:_r(e)),fe(o.wrapper.ownerDocument,"mouseup",c),fe(o.wrapper.ownerDocument,"mousemove",u),fe(o.scroller,"dragstart",d),fe(o.scroller,"drop",c),i||(ye(t),r.addNew||Ko(e.doc,n,null,null,r.extend),l&&!p||a&&9==s?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),u=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return i=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,de(o.wrapper.ownerDocument,"mouseup",c),de(o.wrapper.ownerDocument,"mousemove",u),de(o.scroller,"dragstart",d),de(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,r,t,i):function(e,t,n,r){a&&_r(e);var o=e.display,i=e.doc;ye(t);var s,l,c=i.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=i.sel.contains(n),s=l>-1?u[l]:new Eo(n,n)):(s=i.sel.primary(),l=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Eo(n,n)),n=cr(e,t,!0,!0),l=-1;else{var d=va(e,n,r.unit);s=r.extend?qo(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,ei(i,Co(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(ei(i,Co(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=i.sel):Xo(i,l,s,W):(l=0,ei(i,new _o([s],0),W),c=i.sel);var p=n;function f(t){if(0!=tt(p,t))if(p=t,"rectangle"==r.unit){for(var o=[],a=e.options.tabSize,u=F($e(i,n.line).text,n.ch,a),d=F($e(i,t.line).text,t.ch,a),f=Math.min(u,d),m=Math.max(u,d),h=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));h<=g;h++){var v=$e(i,h).text,b=U(v,f,a);f==m?o.push(new Eo(et(h,b),et(h,b))):v.length>b&&o.push(new Eo(et(h,b),et(h,U(v,m,a))))}o.length||o.push(new Eo(n,n)),ei(i,Co(e,c.ranges.slice(0,l).concat(o),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,w=s,k=va(e,t,r.unit),x=w.anchor;tt(k.anchor,x)>0?(y=k.head,x=it(w.from(),k.anchor)):(y=k.anchor,x=ot(w.to(),k.head));var _=c.ranges.slice(0);_[l]=function(e,t){var n=t.anchor,r=t.head,o=$e(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var i=ce(o);if(!i)return t;var a=se(i,n.ch,n.sticky),s=i[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==i.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(i,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var p=i[c+(l?-1:0)],f=l==(1==p.level),m=f?p.from:p.to,h=f?"after":"before";return n.ch==m&&n.sticky==h?t:new Eo(new et(n.line,m,h),r)}(e,new Eo(st(i,x),y)),ei(i,Co(e,_,l),W)}}var m=o.wrapper.getBoundingClientRect(),h=0;function g(t){var n=++h,a=cr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=tt(a,p)){e.curOp.focus=R(),f(a);var s=Tr(o,i);(a.line>=s.to||a.line<s.from)&&setTimeout(eo(e,(function(){h==n&&g(t)})),150)}else{var l=t.clientY<m.top?-20:t.clientY>m.bottom?20:0;l&&setTimeout(eo(e,(function(){h==n&&(o.scroller.scrollTop+=l,g(t))})),50)}}function v(t){e.state.selectingText=!1,h=1/0,t&&(ye(t),o.input.focus()),fe(o.wrapper.ownerDocument,"mousemove",b),fe(o.wrapper.ownerDocument,"mouseup",y),i.history.lastSelOrigin=null}var b=eo(e,(function(e){0!==e.buttons&&Ee(e)?g(e):v(e)})),y=eo(e,v);e.state.selectingText=y,de(o.wrapper.ownerDocument,"mousemove",b),de(o.wrapper.ownerDocument,"mouseup",y)}(e,r,t,i)}(t,r,i,e):_e(e)==n.scroller&&ye(e):2==o?(r&&Ko(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(_?t.display.input.onContextMenu(e):_r(t)))}}function va(e,t,n){if("char"==n)return new Eo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Eo(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Eo(r.from,r.to)}function ba(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ye(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!ve(e,n))return ke(t);i-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=o)return me(e,n,e,Xe(e.doc,i),e.display.gutterSpecs[l].className,t),ke(t)}}function ya(e,t){return ba(e,t,"gutterClick",!0)}function wa(e,t){xn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&ba(e,t,"gutterContextMenu",!1)}(e,t)||he(e,t,"contextmenu")||_||e.display.input.onContextMenu(t)}function ka(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(e)}ha.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var xa={toString:function(){return"CodeMirror.Init"}},_a={},Ea={};function Ca(e,t,n){if(!t!=!(n&&n!=xa)){var r=e.display.dragFunctions,o=t?de:fe;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Sa(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),Ut(e)),lr(e),dr(e),zn(e),setTimeout((function(){return Hr(e)}),100)}function Ia(e,t){var n=this;if(!(this instanceof Ia))return new Ia(e,t);this.options=t=t?B(t):{},B(_a,t,!1);var r=t.value;"string"==typeof r?r=new Pi(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new Ia.inputStyles[t.inputStyle](this),i=this.display=new vo(e,r,o,t);for(var c in i.wrapper.CodeMirror=this,ka(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Zr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new j,keySeq:null,specialChars:null},t.autofocus&&!v&&i.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",eo(e,ga)),de(t.scroller,"dblclick",a&&s<11?eo(e,(function(t){if(!he(e,t)){var n=cr(e,t);if(n&&!ya(e,t)&&!xn(e.display,t)){ye(t);var r=e.findWordAt(n);Ko(e.doc,r.anchor,r.head)}}})):function(t){return he(e,t)||ye(t)}),de(t.scroller,"contextmenu",(function(t){return wa(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||wa(e,n)}));var n,r={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function i(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(o){if(!he(e,o)&&!i(o)&&!ya(e,o)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!xn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var i,a=e.coordsChar(t.activeTouch,"page");i=!r.prev||l(r,r.prev)?new Eo(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new Eo(et(a.line,0),st(e.doc,et(a.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),ye(n)}o()})),de(t.scroller,"touchcancel",o),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Mr(e,t.scroller.scrollTop),Br(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return xo(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return xo(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){he(e,t)||xe(t)},over:function(t){he(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();br(e,n,r),e.display.dragCursor||(e.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),xe(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Ri<100))xe(t);else if(!he(e,t)&&!xn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=N("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:eo(e,Li),leave:function(t){he(e,t)||Oi(e)}};var c=t.input.getField();de(c,"keyup",(function(t){return da.call(e,t)})),de(c,"keydown",eo(e,ua)),de(c,"keypress",eo(e,pa)),de(c,"focus",(function(t){return Er(e,t)})),de(c,"blur",(function(t){return Cr(e,t)}))}(this),Bi(),$r(this),this.curOp.forceUpdate=!0,Do(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Er(n)}),20):Cr(this),Ea)Ea.hasOwnProperty(c)&&Ea[c](this,t[c],xa);fo(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ta.length;++u)Ta[u](this);Gr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}Ia.defaults=_a,Ia.optionHandlers=Ea;var Ta=[];function Na(e,t,n,r){var o,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?o=ft(e,t).state:n="prev");var a=e.options.tabSize,s=$e(i,t),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=i.mode.indent(o,s.text.slice(u.length),s.text))==H||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>i.first?F($e(i,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",p=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)p+=a,d+="\t";if(p<c&&(d+=G(c-p)),d!=u)return hi(i,d,et(t,0),et(t,u.length),"+input"),s.stateAfter=null,!0;for(var m=0;m<i.sel.ranges.length;m++){var h=i.sel.ranges[m];if(h.head.line==t&&h.head.ch<u.length){var g=et(t,u.length);Xo(i,m,new Eo(g,g));break}}}Ia.defineInitHook=function(e){return Ta.push(e)};var Aa=null;function Pa(e){Aa=e}function Ra(e,t,n,r,o){var i=e.doc;e.display.shift=!1,r||(r=i.sel);var a=+new Date-200,s="paste"==o||e.state.pasteIncoming>a,l=Pe(t),c=null;if(s&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==t){if(r.ranges.length%Aa.text.length==0){c=[];for(var u=0;u<Aa.text.length;u++)c.push(i.splitLines(Aa.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=K(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,p=r.ranges.length-1;p>=0;p--){var f=r.ranges[p],m=f.from(),h=f.to();f.empty()&&(n&&n>0?m=et(m.line,m.ch-n):e.state.overwrite&&!s?h=et(h.line,Math.min($e(i,h.line).text.length,h.ch+q(l).length)):s&&Aa&&Aa.lineWise&&Aa.text.join("\n")==l.join("\n")&&(m=h=et(m.line,0)));var g={from:m,to:h,text:c?c[p%c.length]:l,origin:o||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ui(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&Oa(e,t),Pr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function La(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qr(t,(function(){return Ra(t,n,0,null,"paste")})),!0}function Oa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s<i.electricChars.length;s++)if(t.indexOf(i.electricChars.charAt(s))>-1){a=Na(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test($e(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Na(e,o.head.line,"smart"));a&&ln(e,"electricInput",e,o.head.line)}}}function Ma(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var o=e.doc.sel.ranges[r].head.line,i={anchor:et(o,0),head:et(o+1,0)};n.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:n}}function Da(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ba(){var e=N("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=N("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),Da(e),t}function Fa(e,t,n,r,o){var i=t,a=n,s=$e(e,t.line),l=o&&"rtl"==e.direction?-n:n;function c(i){var a,c;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else a=o?function(e,t,n,r){var o=ce(t,e.doc.direction);if(!o)return Qi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=se(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Qi(t,n,r);var s,l=function(e,n){return Ji(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||Rn(e,t),Jn(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==r<0,p=l(n,d?1:-1);if(null!=p&&(d?p<=a.to&&p<=u.end:p>=a.from&&p>=u.begin)){var f=d?"before":"after";return new et(n.line,p,f)}}var m=function(e,t,r){for(var i=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],s=t>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return i(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return i(c,s)}},h=m(i+r,r,u);if(h)return h;var g=r>0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(h=m(r>0?0:o.length-1,r,c(g)))?null:h}(e.cm,s,t,n):Qi(s,t,n);if(null==a){if(i||((c=t.line+l)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=$e(e,c)))))return!1;t=ea(o,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var m=s.text.charAt(t.ch)||"\n",h=ee(m,p)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||f||h||(h="s"),u&&u!=h){n<0&&(n=1,c(),t.sticky="after");break}if(h&&(u=h),n>0&&!c(!f))break}var g=ai(e,t,i,a,!0);return nt(i,g)&&(g.hitSide=!0),g}function ja(e,t,n,r){var o,i,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;(i=Yn(e,s,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}var za=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(e,t){var n=Pn(e,t.line);if(!n||n.hidden)return null;var r=$e(e.doc,t.line),o=Nn(n,r,t.line),i=ce(r,e.doc.direction),a="left";i&&(a=se(i,t.ch)%2?"right":"left");var s=Dn(o.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Va(e,t){return t&&(e.bad=!0),e}function Wa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Va(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var i=e.display.view[o];if(i.node==r)return Za(i,t,n)}}function Za(e,t,n){var r=e.text.firstChild,o=!1;if(!t||!P(r,t))return Va(et(Ye(e.line),0),!0);if(t==r&&(o=!0,t=r.childNodes[n],n=0,!t)){var i=e.rest?q(e.rest):e.line;return Va(et(Ye(i),i.text.length),o)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var o=-1;o<(c?c.length:0);o++)for(var i=o<0?l.map:c[o],a=0;a<i.length;a+=3){var s=i[a+2];if(s==t||s==n){var u=Ye(o<0?e.line:e.rest[o]),d=i[a]+r;return(r<0||s!=t)&&(d=i[a+(r?1:0)]),et(u,d)}}}var d=u(a,s,n);if(d)return Va(d,o);for(var p=s.nextSibling,f=a?a.nodeValue.length-n:0;p;p=p.nextSibling){if(d=u(p,p.firstChild,0))return Va(et(d.line,d.ch-f),o);f+=p.textContent.length}for(var m=s.previousSibling,h=n;m;m=m.previousSibling){if(d=u(m,m.firstChild,-1))return Va(et(d.line,d.ch+h),o);h+=m.textContent.length}}za.prototype.init=function(e){var t=this,n=this,r=n.cm,o=n.div=e.lineDiv;function i(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(i(e)&&!he(r,e)){if(r.somethingSelected())Pa({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Ma(r);Pa({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,V),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Aa.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Ba(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Aa.text.join("\n");var c=R();M(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==o&&n.showPrimarySelection()}),50)}}o.contentEditable=!0,Da(o,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),de(o,"paste",(function(e){!i(e)||he(r,e)||La(e,r)||s<=11&&setTimeout(eo(r,(function(){return t.updateFromDOM()})),20)})),de(o,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),de(o,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),de(o,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),de(o,"touchstart",(function(){return n.forceCompositionEnd()})),de(o,"input",(function(){t.composing||t.readFromDOMSoon()})),de(o,"copy",a),de(o,"cut",a)},za.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},za.prototype.prepareSelection=function(){var e=vr(this.cm,!1);return e.focus=R()==this.div,e},za.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},za.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},za.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),o=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var a=Wa(t,e.anchorNode,e.anchorOffset),s=Wa(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=tt(it(a,s),o)||0!=tt(ot(a,s),i)){var l=t.display.view,c=o.line>=t.display.viewFrom&&Ha(t,o)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Ha(t,i);if(!u){var d=l[l.length-1].measure,p=d.maps?d.maps[d.maps.length-1]:d.map;u={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(c&&u){var f,m=e.rangeCount&&e.getRangeAt(0);try{f=C(c.node,c.offset,u.offset,u.node)}catch(e){}f&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),m&&null==e.anchorNode?e.addRange(m):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},za.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},za.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},za.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},za.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return P(this.div,t)},za.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&R()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},za.prototype.blur=function(){this.div.blur()},za.prototype.getField=function(){return this.div},za.prototype.supportsTouch=function(){return!0},za.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Qr(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},za.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},za.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Wa(t,e.anchorNode,e.anchorOffset),r=Wa(t,e.focusNode,e.focusOffset);n&&r&&Qr(t,(function(){ei(t.doc,So(n,r),V),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},za.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,o=r.display,i=r.doc.sel.primary(),a=i.from(),s=i.to();if(0==a.ch&&a.line>r.firstLine()&&(a=et(a.line-1,$e(r.doc,a.line-1).length)),s.ch==$e(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=et(s.line+1,0)),a.line<o.viewFrom||s.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(e=ur(r,a.line))?(t=Ye(o.view[0].line),n=o.view[0].node):(t=Ye(o.view[e].line),n=o.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==o.view.length-1?(l=o.viewTo-1,c=o.lineDiv.lastChild):(l=Ye(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,o){var i="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(i+=s,l&&(i+=s),a=l=!1)}function u(e){e&&(c(),i+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var i,p=t.getAttribute("cm-marker");if(p){var f=e.findMarks(et(r,0),et(o+1,0),(g=+p,function(e){return e.id==g}));return void(f.length&&(i=f[0].find(0))&&u(Ge(e.doc,i.from,i.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var h=0;h<t.childNodes.length;h++)d(t.childNodes[h]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),m&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(t),t!=n;)t=t.nextSibling,l=!1;return i}(r,n,c,t,l)),p=Ge(r.doc,et(t,0),et(l,$e(r.doc,l).text.length));d.length>1&&p.length>1;)if(q(d)==q(p))d.pop(),p.pop(),l--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),t++}for(var f=0,m=0,h=d[0],g=p[0],v=Math.min(h.length,g.length);f<v&&h.charCodeAt(f)==g.charCodeAt(f);)++f;for(var b=q(d),y=q(p),w=Math.min(b.length-(1==d.length?f:0),y.length-(1==p.length?f:0));m<w&&b.charCodeAt(b.length-m-1)==y.charCodeAt(y.length-m-1);)++m;if(1==d.length&&1==p.length&&t==a.line)for(;f&&f>a.ch&&b.charCodeAt(b.length-m-1)==y.charCodeAt(y.length-m-1);)f--,m++;d[d.length-1]=b.slice(0,b.length-m).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var k=et(t,f),x=et(l,p.length?q(p).length-m:0);return d.length>1||d[0]||tt(k,x)?(hi(r.doc,d,k,x,"+input"),!0):void 0},za.prototype.ensurePolled=function(){this.forceCompositionEnd()},za.prototype.reset=function(){this.forceCompositionEnd()},za.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},za.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},za.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return dr(e.cm)}))},za.prototype.setUneditable=function(e){e.contentEditable="false"},za.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||eo(this.cm,Ra)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},za.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},za.prototype.onContextMenu=function(){},za.prototype.resetPosition=function(){},za.prototype.needsContentAttribute=!0;var Ua=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null};Ua.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!he(r,e)){if(r.somethingSelected())Pa({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ma(r);Pa({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,V):(n.prevInput="",o.value=t.text.join("\n"),M(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),h&&(o.style.width="0px"),de(o,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(o,"paste",(function(e){he(r,e)||La(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(o,"cut",i),de(o,"copy",i),de(e.scroller,"paste",(function(t){if(!xn(e,t)&&!he(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),de(e.lineSpace,"selectstart",(function(t){xn(e,t)||ye(t)})),de(o,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ua.prototype.createField=function(e){this.wrapper=Ba(),this.textarea=this.wrapper.firstChild},Ua.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ua.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var o=Gn(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},Ua.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ua.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&M(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ua.prototype.getField=function(){return this.textarea},Ua.prototype.supportsTouch=function(){return!1},Ua.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ua.prototype.blur=function(){this.textarea.blur()},Ua.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ua.prototype.receivedFocus=function(){this.slowPoll()},Ua.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ua.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ua.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||b&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,o.length);l<c&&r.charCodeAt(l)==o.charCodeAt(l);)++l;return Qr(t,(function(){Ra(t,o.slice(l),r.length-l,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ua.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ua.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ua.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=cr(n,e),c=r.scroller.scrollTop;if(i&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&eo(n,ei)(n.doc,So(i),V);var u,p=o.style.cssText,f=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),_){xe(e);var h=function(){fe(window,"mouseup",h),setTimeout(v,20)};de(window,"mouseup",h)}else setTimeout(v,50)}function g(){if(null!=o.selectionStart){var e=n.somethingSelected(),i=""+(e?o.value:"");o.value="⇚",o.value=i,t.prevInput=e?"":"",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,o.style.cssText=p,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&s<9)&&g();var e=0,i=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&""==t.prevInput?eo(n,li)(n):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},Ua.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ua.prototype.setUneditable=function(){},Ua.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,o,i){e.defaults[n]=r,o&&(t[n]=i?function(e,t,n){n!=xa&&o(e,t,n)}:o)}e.defineOption=n,e.Init=xa,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Po(e)}),!0),n("indentUnit",2,Po,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Ro(e),zn(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(et(r,i))}r++}));for(var o=n.length-1;o>=0;o--)hi(e.doc,t,n[o],et(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=xa&&e.refresh()})),n("specialCharPlaceholder",Jt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){ka(e),go(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Yi(t),o=n!=xa&&Yi(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Sa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=mo(t,e.options.lineNumbers),go(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hr(e)}),!0),n("scrollbarStyle","native",(function(e){Zr(e),Hr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=mo(e.options.gutters,t),go(e)}),!0),n("firstLineNumber",1,go,!0),n("lineNumberFormatter",(function(e){return e}),go,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Cr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ca),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ro,!0),n("addModeClass",!1,Ro,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Ro,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ia),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&eo(this,t[e])(this,n,o),me(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Yi(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:to((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");(function(e,t,n){for(var r=0,o=n(t);r<e.length&&n(e[r])<=o;)r++;e.splice(r,0,t)})(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,dr(this)})),removeOverlay:to((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void dr(this)}})),indentLine:to((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Je(this.doc,e)&&Na(this,e,t,n)})),indentSelection:to((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var o=t[r];if(o.empty())o.head.line>n&&(Na(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&Pr(this));else{var i=o.from(),a=o.to(),s=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Na(this,l,e);var c=this.doc.sel.ranges;0==i.ch&&t.length==c.length&&c[r].from().ch>0&&Xo(this.doc,r,new Eo(i,c[r].to()),V)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=pt(this,$e(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]<i)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var o=n[t],i=this.getModeAt(e);if("string"==typeof i[t])o[i[t]]&&r.push(o[i[t]]);else if(i[t])for(var a=0;a<i[t].length;a++){var s=o[i[t][a]];s&&r.push(s)}else i.helperType&&o[i.helperType]?r.push(o[i.helperType]):o[i.name]&&r.push(o[i.name]);for(var l=0;l<o._global.length;l++){var c=o._global[l];c.pred(i,this)&&-1==z(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return ft(this,(e=at(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Gn(this,null==e?n.head:"object"==typeof e?st(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return $n(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Yn(this,(e=Un(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Un(this,{top:e,left:0},t||"page").top,Xe(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,o=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,o=!0),r=$e(this.doc,e)}else r=e;return Zn(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-Wt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i,a,s,l=this.display,c=(e=Gn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),p=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>p&&(u=p-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==o?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(i=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Nr(i,a)).scrollTop&&Mr(i,s.scrollTop),null!=s.scrollLeft&&Br(i,s.scrollLeft))},triggerOnKeyDown:to(ua),triggerOnKeyPress:to(pa),triggerOnKeyUp:da,triggerOnMouseDown:to(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:to((function(e){Oa(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=st(this.doc,e),a=0;a<t&&!(i=Fa(this.doc,i,o,n,r)).hitSide;++a);return i},moveH:to((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Fa(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),Z)})),deleteH:to((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Xi(this,(function(n){var o=Fa(r,n.head,e,t,!1);return e<0?{from:o,to:n.head}:{from:n.head,to:o}}))})),findPosV:function(e,t,n,r){var o=1,i=r;t<0&&(o=-1,t=-t);for(var a=st(this.doc,e),s=0;s<t;++s){var l=Gn(this,a,"div");if(null==i?i=l.left:l.left=i,(a=ja(this,l,o,n)).hitSide)break}return a},moveV:to((function(e,t){var n=this,r=this.doc,o=[],i=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(i)return e<0?a.from():a.to();var s=Gn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),o.push(s.left);var l=ja(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Ar(n,$n(n,l,"div").top-s.top),l}),Z),o.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=o[a]})),findWordAt:function(e){var t=$e(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var i=t.charAt(n),a=ee(i,o)?function(e){return ee(e,o)}:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new Eo(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?L(this.display.cursorDiv,"CodeMirror-overwrite"):S(this.display.cursorDiv,"CodeMirror-overwrite"),me(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==R()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:to((function(e,t){Rr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Sn(this)-this.display.barHeight,width:e.scrollWidth-Sn(this)-this.display.barWidth,clientHeight:Tn(this),clientWidth:In(this)}},scrollIntoView:to((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Lr(e),e.curOp.scrollToPos=t}(this,e):Or(this,e.from,e.to,e.margin)})),setSize:to((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&jn(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){pr(n,o,"widget");break}++o})),this.curOp.forceUpdate=!0,me(this,"refresh",this)})),operation:function(e){return Qr(this,e)},startOperation:function(){return $r(this)},endOperation:function(){return Gr(this)},refresh:to((function(){var e=this.display.cachedTextHeight;dr(this),this.curOp.forceUpdate=!0,zn(this),Rr(this,this.doc.scrollLeft,this.doc.scrollTop),co(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&lr(this),me(this,"refresh",this)})),swapDoc:to((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Do(this,e),zn(this),this.display.input.reset(),Rr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(Ia);var $a="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Pi.prototype)Pi.prototype.hasOwnProperty(Ga)&&z($a,Ga)<0&&(Ia.prototype[Ga]=function(e){return function(){return e.apply(this.doc,arguments)}}(Pi.prototype[Ga]));return be(Pi),Ia.inputStyles={textarea:Ua,contenteditable:za},Ia.defineMode=function(e){Ia.defaults.mode||"null"==e||(Ia.defaults.mode=e),Be.apply(this,arguments)},Ia.defineMIME=function(e,t){De[e]=t},Ia.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ia.defineMIME("text/plain","null"),Ia.defineExtension=function(e,t){Ia.prototype[e]=t},Ia.defineDocExtension=function(e,t){Pi.prototype[e]=t},Ia.fromTextArea=function(e,t){if((t=t?B(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=R();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var o;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var s=Ia((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=fe,e.on=de,e.wheelEventPixels=ko,e.Doc=Pi,e.splitLines=Pe,e.countColumn=F,e.findColumn=U,e.isWordChar=Q,e.Pass=H,e.signal=me,e.Line=$t,e.changeEnd=Io,e.scrollbarModel=Wr,e.Pos=et,e.cmpPos=tt,e.modes=Me,e.mimeModes=De,e.resolveMode=Fe,e.getMode=je,e.modeExtensions=ze,e.extendMode=He,e.copyState=Ve,e.startState=Ze,e.innerMode=We,e.commands=ta,e.keyMap=Wi,e.keyName=Ki,e.isModifierKey=Gi,e.lookupKey=$i,e.normalizeKeyMap=Ui,e.StringStream=Ue,e.SharedTextMarker=Ii,e.TextMarker=Ci,e.LineWidget=xi,e.e_preventDefault=ye,e.e_stopPropagation=we,e.e_stop=xe,e.addClass=L,e.contains=P,e.rmClass=S,e.keyNames=ji}(Ia),Ia.version="5.65.1",Ia}()},36629:function(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var o,i,a=t.indentUnit,s=n.tokenHooks,l=n.documentTypes||{},c=n.mediaTypes||{},u=n.mediaFeatures||{},d=n.mediaValueKeywords||{},p=n.propertyKeywords||{},f=n.nonStandardPropertyKeywords||{},m=n.fontProperties||{},h=n.counterDescriptors||{},g=n.colorKeywords||{},v=n.valueKeywords||{},b=n.allowNested,y=n.lineComment,w=!0===n.supportsAtComponent,k=!1!==t.highlightNonStandardPropertyKeywords;function x(e,t){return o=t,e}function _(e,t){var n=e.next();if(s[n]){var r=s[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),x("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?x(null,"compare"):'"'==n||"'"==n?(t.tokenize=E(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),x("atom","hash")):"!"==n?(e.match(/^\s*\w*/),x("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),x("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?x(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?x(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=C),x("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function E(e){return function(t,n){for(var r,o=!1;null!=(r=t.next());){if(r==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==r}return(r==e||!o&&")"!=e)&&(n.tokenize=null),x("string","string")}}function C(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=E(")"),x(null,"(")}function S(e,t,n){this.type=e,this.indent=t,this.prev=n}function I(e,t,n,r){return e.context=new S(n,t.indentation()+(!1===r?0:a),e.context),n}function T(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function N(e,t,n){return R[n.context.type](e,t,n)}function A(e,t,n,r){for(var o=r||1;o>0;o--)n.context=n.context.prev;return N(e,t,n)}function P(e){var t=e.current().toLowerCase();i=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var R={top:function(e,t,n){if("{"==e)return I(n,t,"block");if("}"==e&&n.context.prev)return T(n);if(w&&/@component/i.test(e))return I(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return I(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return I(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return I(n,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return I(n,t,"interpolation");if(":"==e)return"pseudo";if(b&&"("==e)return I(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return p.hasOwnProperty(r)?(i="property","maybeprop"):f.hasOwnProperty(r)?(i=k?"string-2":"property","maybeprop"):b?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==e?"block":b||"hash"!=e&&"qualifier"!=e?R.top(e,t,n):(i="error","block")},maybeprop:function(e,t,n){return":"==e?I(n,t,"prop"):N(e,t,n)},prop:function(e,t,n){if(";"==e)return T(n);if("{"==e&&b)return I(n,t,"propBlock");if("}"==e||"{"==e)return A(e,t,n);if("("==e)return I(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)P(t);else if("interpolation"==e)return I(n,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?T(n):"word"==e?(i="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?A(e,t,n):")"==e?T(n):"("==e?I(n,t,"parens"):"interpolation"==e?I(n,t,"interpolation"):("word"==e&&P(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(i="variable-3",n.context.type):N(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(i="tag",n.context.type):R.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return I(n,t,"atBlock_parens");if("}"==e||";"==e)return A(e,t,n);if("{"==e)return T(n)&&I(n,t,b?"block":"top");if("interpolation"==e)return I(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();i="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":p.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?k?"string-2":"property":v.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?A(e,t,n):"{"==e?T(n)&&I(n,t,b?"block":"top",!1):("word"==e&&(i="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?T(n):"{"==e||"}"==e?A(e,t,n,2):R.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?I(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(i="variable","restricted_atBlock_before"):N(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,T(n)):"word"==e?(i="@font-face"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(i="variable","keyframes"):"{"==e?I(n,t,"top"):N(e,t,n)},at:function(e,t,n){return";"==e?T(n):"{"==e||"}"==e?A(e,t,n):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?T(n):"{"==e||";"==e?A(e,t,n):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new S(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||_)(e,t);return n&&"object"==typeof n&&(o=n[1],n=n[0]),i=n,"comment"!=o&&(t.state=R[t.state](o,e,t)),i},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),o=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(o=Math.max(0,n.indent-a)):o=(n=n.prev).indent),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],c=t(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(u),p=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=t(p),m=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),h=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=t(b),w=n.concat(o).concat(a).concat(l).concat(u).concat(p).concat(g).concat(b);function k(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",w),e.defineMIME("text/css",{documentTypes:r,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:m,counterDescriptors:h,colorKeywords:v,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:i,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:m,counterDescriptors:h,colorKeywords:v,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css",helperType:"gss"})}(n(4631))},31934: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()}))]}},70057:function(e,t,n){t.parse=n(49951),t.stringify=n(29980)},49951:function(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function n(e){return e?e.replace(/^\s+|\s+$/g,""):""}function r(e,t){var n=e&&"string"==typeof e.type,o=n?e:t;for(var i in e){var a=e[i];Array.isArray(a)?a.forEach((function(e){r(e,o)})):a&&"object"==typeof a&&r(a,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}e.exports=function(e,o){o=o||{};var i=1,a=1;function s(e){var t=e.match(/\n/g);t&&(i+=t.length);var n=e.lastIndexOf("\n");a=~n?e.length-n:a+e.length}function l(){var e={line:i,column:a};return function(t){return t.position=new c(e),g(),t}}function c(e){this.start=e,this.end={line:i,column:a},this.source=o.source}c.prototype.content=e;var u=[];function d(t){var n=new Error(o.source+":"+i+":"+a+": "+t);if(n.reason=t,n.filename=o.source,n.line=i,n.column=a,n.source=e,!o.silent)throw n;u.push(n)}function p(){return h(/^{\s*/)}function f(){return h(/^}/)}function m(){var t,n,r,o=[];for(g(),v(o);e.length&&"}"!=e.charAt(0)&&(t=T()||(n=void 0,r=void 0,n=l(),(r=y())?(v(),n({type:"rule",selectors:r,declarations:k()})):d("selector missing")));)!1!==t&&(o.push(t),v(o));return o}function h(t){var n=t.exec(e);if(n){var r=n[0];return s(r),e=e.slice(r.length),n}}function g(){h(/^\s*/)}function v(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=l();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return d("End of comment missing");var r=e.slice(2,n-2);return a+=2,s(r),e=e.slice(n),a+=2,t({type:"comment",comment:r})}}function y(){var e=h(/^([^{]+)/);if(e)return n(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 w(){var e=l(),r=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(r){if(r=n(r[0]),!h(/^:\s*/))return d("property missing ':'");var o=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:r.replace(t,""),value:o?n(o[0]).replace(t,""):""});return h(/^[;\s]*/),i}}function k(){var e,t=[];if(!p())return d("missing '{'");for(v(t);e=w();)!1!==e&&(t.push(e),v(t));return f()?t:d("missing '}'")}function x(){for(var e,t=[],n=l();e=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),h(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:k()})}var _,E=I("import"),C=I("charset"),S=I("namespace");function I(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=l(),r=h(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function T(){if("@"==e[0])return function(){var e=l();if(t=h(/^@([-\w]+)?keyframes\s*/)){var t,n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return d("@keyframes missing name");var r,o=t[1];if(!p())return d("@keyframes missing '{'");for(var i=v();r=x();)i.push(r),i=i.concat(v());return f()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):d("@keyframes missing '}'")}}()||function(){var e=l(),t=h(/^@media *([^{]+)/);if(t){var r=n(t[1]);if(!p())return d("@media missing '{'");var o=v().concat(m());return f()?e({type:"media",media:r,rules:o}):d("@media missing '}'")}}()||function(){var e=l(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:n(t[1]),media:n(t[2])})}()||function(){var e=l(),t=h(/^@supports *([^{]+)/);if(t){var r=n(t[1]);if(!p())return d("@supports missing '{'");var o=v().concat(m());return f()?e({type:"supports",supports:r,rules:o}):d("@supports missing '}'")}}()||E()||C()||S()||function(){var e=l(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var r=n(t[1]),o=n(t[2]);if(!p())return d("@document missing '{'");var i=v().concat(m());return f()?e({type:"document",document:o,vendor:r,rules:i}):d("@document missing '}'")}}()||function(){var e=l();if(h(/^@page */)){var t=y()||[];if(!p())return d("@page missing '{'");for(var n,r=v();n=w();)r.push(n),r=r.concat(v());return f()?e({type:"page",selectors:t,declarations:r}):d("@page missing '}'")}}()||function(){var e=l();if(h(/^@host\s*/)){if(!p())return d("@host missing '{'");var t=v().concat(m());return f()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=l();if(h(/^@font-face\s*/)){if(!p())return d("@font-face missing '{'");for(var t,n=v();t=w();)n.push(t),n=n.concat(v());return f()?e({type:"font-face",declarations:n}):d("@font-face missing '}'")}}()}return r((_=m(),{type:"stylesheet",stylesheet:{source:o.source,rules:_,parsingErrors:u}}))}},57146:function(e){function t(e){this.options=e||{}}e.exports=t,t.prototype.emit=function(e){return e},t.prototype.visit=function(e){return this[e.type](e)},t.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n}},25078:function(e,t,n){var r=n(57146),o=n(33597);function i(e){r.call(this,e)}e.exports=i,o(i,r),i.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},i.prototype.comment=function(e){return this.emit("",e.position)},i.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},i.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},i.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},i.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},i.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},i.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},i.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},i.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},i.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},i.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},i.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},i.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},i.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},i.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")}},4483:function(e,t,n){var r=n(57146),o=n(33597);function i(e){e=e||{},r.call(this,e),this.indentation=e.indent}e.exports=i,o(i,r),i.prototype.compile=function(e){return this.stylesheet(e)},i.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},i.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},i.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},i.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}")},i.prototype.document=function(e){var 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}")},i.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},i.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},i.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}")},i.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)+"}")},i.prototype.keyframe=function(e){var 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")},i.prototype.page=function(e){var 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}")},i.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}")},i.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}")},i.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},i.prototype.rule=function(e){var 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()+"}"):""},i.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},i.prototype.indent=function(e){return this.level=this.level||1,null!=e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")}},29980:function(e,t,n){var r=n(25078),o=n(4483);e.exports=function(e,t){var i=(t=t||{}).compress?new r(t):new o(t);if(t.sourcemap){n(98835)(i);var a=i.compile(e);return i.applySourceMaps(),{code:a,map:"generator"===t.sourcemap?i.map:i.map.toJSON()}}return i.compile(e)}},98835:function(e,t,n){var r=n(49125).SourceMapGenerator,o=n(49125).SourceMapConsumer,i=n(6603),a=n(91343),s=n(26470);e.exports=function(e){for(var n in e._comment=e.comment,e.map=new r,e.position={line:1,column:1},e.files={},t)e[n]=t[n]};const l=function(e){return"\\"===s.sep?e.replace(/\\/g,"/").replace(/^[a-z]:\/?/i,"/"):e};t.updatePosition=function(e){var t=e.match(/\n/g);t&&(this.position.line+=t.length);var n=e.lastIndexOf("\n");this.position.column=~n?e.length-n:this.position.column+e.length},t.emit=function(e,t){if(t){var n=l(t.source||"source.css");this.map.addMapping({source:n,generated:{line:this.position.line,column:Math.max(this.position.column-1,0)},original:{line:t.start.line,column:t.start.column-1}}),this.addFile(n,t)}return this.updatePosition(e),e},t.addFile=function(e,t){"string"==typeof t.content&&(Object.prototype.hasOwnProperty.call(this.files,e)||(this.files[e]=t.content))},t.applySourceMaps=function(){Object.keys(this.files).forEach((function(e){var t=this.files[e];if(this.map.setSourceContent(e,t),!1!==this.options.inputSourcemaps){var n=i.resolveSync(t,e,a.readFileSync);if(n){var r=new o(n.map),c=n.sourcesRelativeTo;this.map.applySourceMap(r,e,l(s.dirname(c)))}}}),this)},t.comment=function(e){return/^# sourceMappingURL=/.test(e.comment)?this.emit("",e.position):this._comment(e)}},33597: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}}},6603:function(e,t,n){var r=n(79892),o=n(8575),i=n(26470),a=n(44020);function s(){return Array.prototype.reduce.call(arguments,(function(e,t){return o.resolve(e,t)}))}function l(e){return"\\"===i.sep?e.replace(/\\/g,"/").replace(/^[a-z]:\/?/i,"/"):e}function c(e){return a(e.replace(/\+/g,"%2B"))}function u(e,t,n){setImmediate((function(){e(t,n)}))}function d(e,t){try{return JSON.parse(e.replace(/^\)\]\}'/,""))}catch(e){throw e.sourceMapData=t,e}}function p(e,t,n){var r=c(t);try{return String(e(r))}catch(e){throw e.sourceMapData=n,e}}var f=/[#@] sourceMappingURL=([^\s'"]*)/,m=RegExp("(?:/\\*(?:\\s*\r?\n(?://)?)?(?:"+f.source+")\\s*\\*/|//(?:"+f.source+"))\\s*");function h(e,t,n,r){var o;try{o=y(e,t)}catch(e){return u(r,e)}if(!o||o.map)return u(r,null,o);n(c(o.url),(function(e,t){if(e)return e.sourceMapData=o,r(e);o.map=String(t);try{o.map=d(o.map,o)}catch(e){return r(e)}r(null,o)}))}function g(e,t,n){var r=y(e,t);return!r||r.map||(r.map=p(n,r.url,r),r.map=d(r.map,r)),r}var v=/^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/,b=/^(?:application|text)\/json$/;function y(e,t){t=l(t);var n=function(e){var t=e.match(m);return t?t[1]||t[2]||"":null}(e);if(!n)return null;var o=n.match(v);if(o){var i=o[1]||"text/plain",a=o[2]||"",c=o[3]||"",u={sourceMappingURL:n,url:null,sourcesRelativeTo:t,map:c};if(!b.test(i)){var p=new Error("Unuseful data uri mime type: "+i);throw p.sourceMapData=u,p}try{u.map=d(";base64"===a?function(e){if("undefined"==typeof TextDecoder||"undefined"==typeof Uint8Array)return r(e);var t=function(e){for(var t=r(e),n=t.length,o=new Uint8Array(n),i=0;i<n;i++)o[i]=t.charCodeAt(i);return o}(e);return new TextDecoder("utf-8",{fatal:!0}).decode(t)}(c):decodeURIComponent(c),u)}catch(p){throw p.sourceMapData=u,p}return u}var f=s(t,n);return{sourceMappingURL:n,url:f,sourcesRelativeTo:f,map:null}}function w(e,t,n,r,o){"function"==typeof r&&(o=r,r={});var i=e.sources?e.sources.length:0,a={sourcesResolved:[],sourcesContent:[]};if(0!==i){var s=function(){0==--i&&o(null,a)};_(e,t,r,(function(e,t,r){if(a.sourcesResolved[r]=e,"string"==typeof t)a.sourcesContent[r]=t,u(s,null);else{var o=c(e);n(o,(function(e,t){a.sourcesContent[r]=e||String(t),s()}))}}))}else u(o,null,a)}function k(e,t,n,r){var o={sourcesResolved:[],sourcesContent:[]};return e.sources&&0!==e.sources.length?(_(e,t,r,(function(e,t,r){if(o.sourcesResolved[r]=e,null!==n)if("string"==typeof t)o.sourcesContent[r]=t;else{var i=c(e);try{o.sourcesContent[r]=String(n(i))}catch(e){o.sourcesContent[r]=e}}})),o):o}var x=/\/?$/;function _(e,t,n,r){var o;n=n||{},t=l(t);for(var i=0,a=e.sources.length;i<a;i++)o=null,"string"==typeof n.sourceRoot?o=n.sourceRoot:"string"==typeof e.sourceRoot&&!1!==n.sourceRoot&&(o=e.sourceRoot),r(null===o||""===o?s(t,e.sources[i]):s(t,o.replace(x,"/"),e.sources[i]),(e.sourcesContent||[])[i],i)}e.exports={resolveSourceMap:h,resolveSourceMapSync:g,resolveSources:w,resolveSourcesSync:k,resolve:function(e,t,n,r,o){if("function"==typeof r&&(o=r,r={}),null===e){var i={sourceMappingURL:null,url:t,sourcesRelativeTo:t,map:null},a=c(t);n(a,(function(e,t){if(e)return e.sourceMapData=i,o(e);i.map=String(t);try{i.map=d(i.map,i)}catch(e){return o(e)}s(i)}))}else h(e,t,n,(function(e,t){return e?o(e):t?void s(t):o(null,null)}));function s(e){w(e.map,e.sourcesRelativeTo,n,r,(function(t,n){if(t)return o(t);e.sourcesResolved=n.sourcesResolved,e.sourcesContent=n.sourcesContent,o(null,e)}))}},resolveSync:function(e,t,n,r){var o;if(null===e)(o={sourceMappingURL:null,url:t,sourcesRelativeTo:t,map:null}).map=p(n,t,o),o.map=d(o.map,o);else if(!(o=g(e,t,n)))return null;var i=k(o.map,o.sourcesRelativeTo,n,r);return o.sourcesResolved=i.sourcesResolved,o.sourcesContent=i.sourcesContent,o},parseMapToJSON:d}},44020:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=o(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var o=i(n[0]);o!==n[0]&&(t[n[0]]=o)}n=r.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),s=0;s<a.length;s++){var l=a[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},89010:function(e,t,n){"use strict";var r=n(54657);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,a=n.alignWithTop,s=n.alignWithLeft,l=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var p=r.isWindow(t),f=r.offset(e),m=r.outerHeight(e),h=r.outerWidth(e),g=void 0,v=void 0,b=void 0,y=void 0,w=void 0,k=void 0,x=void 0,_=void 0,E=void 0,C=void 0;p?(x=t,C=r.height(x),E=r.width(x),_={left:r.scrollLeft(x),top:r.scrollTop(x)},w={left:f.left-_.left-c,top:f.top-_.top-l},k={left:f.left+h-(_.left+E)+d,top:f.top+m-(_.top+C)+u},y=_):(g=r.offset(t),v=t.clientHeight,b=t.clientWidth,y={left:t.scrollLeft,top:t.scrollTop},w={left:f.left-(g.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-c,top:f.top-(g.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},k={left:f.left+h-(g.left+b+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+m-(g.top+v+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),w.top<0||k.top>0?!0===a?r.scrollTop(t,y.top+w.top):!1===a?r.scrollTop(t,y.top+k.top):w.top<0?r.scrollTop(t,y.top+w.top):r.scrollTop(t,y.top+k.top):i||((a=void 0===a||!!a)?r.scrollTop(t,y.top+w.top):r.scrollTop(t,y.top+k.top)),o&&(w.left<0||k.left>0?!0===s?r.scrollLeft(t,y.left+w.left):!1===s?r.scrollLeft(t,y.left+k.left):w.left<0?r.scrollLeft(t,y.left+w.left):r.scrollLeft(t,y.left+k.left):i||((s=void 0===s||!!s)?r.scrollLeft(t,y.left+w.left):r.scrollLeft(t,y.left+k.left)))}},34979:function(e,t,n){"use strict";e.exports=n(89010)},54657: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 a(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,i=o.body,a=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=a.clientLeft||i.clientLeft||0,top:r-=a.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=o(r),t.top+=i(r),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),l=/^(top|right|bottom|left)$/,c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function d(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(s.test(n)&&!l.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 p=["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 m(e,t,n){var r=0,o=void 0,i=void 0,a=void 0;for(i=0;i<t.length;i++)if(o=t[i])for(a=0;a<n.length;a++){var s;s="border"===o?o+n[a]+"Width":o+n[a],r+=parseFloat(c(e,s))||0}return r}function h(e){return null!=e&&e==e.window}var g={};function v(e,t,n){if(h(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),d(e)),a=0;(null==o||o<=0)&&(o=void 0,(null==(a=c(e,t))||Number(a)<0)&&(a=e.style[t]||0),a=parseFloat(a)||0),void 0===n&&(n=i?1:-1);var s=void 0!==o||i,l=o||a;if(-1===n)return s?l-m(e,["border","padding"],r):a;if(s){var u=2===n?-m(e,["border"],r):m(e,["margin"],r);return l+(1===n?0:u)}return a+m(e,p.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 y(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):f(e,b,(function(){t=v.apply(void 0,n)})),t}function w(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)&&w(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&&y(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];g[e]=function(t,r){return void 0===r?t&&y(t,e,-1):t?(c(t),d(t)&&(r+=m(t,["padding","border"],n)),w(t,e,r)):void 0}})),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 a(e);!function(e,t){"static"===w(e,"position")&&(e.style.position="relative");var n=a(e),r={},o=void 0,i=void 0;for(i in t)t.hasOwnProperty(i)&&(o=parseFloat(w(e,i))||0,r[i]=o+t[i]-n[i]);w(e,r)}(e,t)},isWindow:h,each:u,css:w,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(h(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(h(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)},56781:function(e,t){"use strict";if("function"==typeof Symbol&&Symbol.for){var n=Symbol.for;n("react.element"),n("react.portal"),n("react.fragment"),n("react.strict_mode"),n("react.profiler"),n("react.provider"),n("react.context"),n("react.forward_ref"),n("react.suspense"),n("react.suspense_list"),n("react.memo"),n("react.lazy"),n("react.block"),n("react.server.block"),n("react.fundamental"),n("react.debug_trace_mode"),n("react.legacy_hidden")}},21726:function(e,t,n){"use strict";n(56781)},53316:function(e){function t(e,t,n,r){var o,i=null==(o=r)||"number"==typeof o||"boolean"==typeof o?r:n(r),a=t.get(i);return void 0===a&&(a=e.call(this,r),t.set(i,a)),a}function n(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return void 0===i&&(i=e.apply(this,r),t.set(o,i)),i}function r(e,t,n,r,o){return n.bind(t,e,r,o)}function o(e,o){return r(e,this,1===e.length?t:n,o.cache.create(),o.serializer)}function i(){return JSON.stringify(arguments)}function a(){this.cache=Object.create(null)}a.prototype.has=function(e){return e in this.cache},a.prototype.get=function(e){return this.cache[e]},a.prototype.set=function(e,t){this.cache[e]=t};var s={create:function(){return new a}};e.exports=function(e,t){var n=t&&t.cache?t.cache:s,r=t&&t.serializer?t.serializer:i;return(t&&t.strategy?t.strategy:o)(e,{cache:n,serializer:r})},e.exports.strategies={variadic:function(e,t){return r(e,this,n,t.cache.create(),t.serializer)},monadic:function(e,n){return r(e,this,t,n.cache.create(),n.serializer)}}},49948:function(e,t){var n={};n.parse=function(){var e=/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,t=/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,n=/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,r=/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,i=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,a=/^(left|center|right|top|bottom)/i,s=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,d=/^\(/,p=/^\)/,f=/^,/,m=/^\#([0-9a-fA-F]+)/,h=/^([a-zA-Z]+)/,g=/^rgb/i,v=/^rgba/i,b=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,y="";function w(e){var t=new Error(y+": "+e);throw t.source=y,t}function k(){return x("linear-gradient",e,E)||x("repeating-linear-gradient",t,E)||x("radial-gradient",n,C)||x("repeating-radial-gradient",r,C)}function x(e,t,n){return _(t,(function(t){var r=n();return r&&(M(f)||w("Missing comma before color stops")),{type:e,orientation:r,colorStops:N(A)}}))}function _(e,t){var n=M(e);if(n)return M(d)||w("Missing ("),result=t(n),M(p)||w("Missing )"),result}function E(){return O("directional",o,1)||O("angular",u,1)}function C(){var e,t,n=S();return n&&((e=[]).push(n),t=y,M(f)&&((n=S())?e.push(n):y=t)),e}function S(){var e,t,n=((t=O("shape",/^(circle)/i,0))&&(t.style=L()||I()),t||((e=O("shape",/^(ellipse)/i,0))&&(e.style=R()||I()),e));if(n)n.at=function(){if(O("position",/^at/,0)){var e=T();return e||w("Missing positioning value"),e}}();else{var r=T();r&&(n={type:"default-radial",at:r})}return n}function I(){return O("extent-keyword",i,1)}function T(){var e={x:R(),y:R()};if(e.x||e.y)return{type:"position",value:e}}function N(e){var t=e(),n=[];if(t)for(n.push(t);M(f);)(t=e())?n.push(t):w("One extra comma");return n}function A(){var e=O("hex",m,1)||_(v,(function(){return{type:"rgba",value:N(P)}}))||_(g,(function(){return{type:"rgb",value:N(P)}}))||O("literal",h,0);return e||w("Expected color definition"),e.length=R(),e}function P(){return M(b)[1]}function R(){return O("%",l,1)||O("position-keyword",a,1)||L()}function L(){return O("px",s,1)||O("em",c,1)}function O(e,t,n){var r=M(t);if(r)return{type:e,value:r[n]}}function M(e){var t,n;return(n=/^[\n\r\t\s]+/.exec(y))&&D(n[0].length),(t=e.exec(y))&&D(t[0].length),t}function D(e){y=y.substr(e)}return function(e){return y=e.toString(),t=N(k),y.length>0&&w("Invalid input not EOF"),t;var t}}(),t.parse=(n||{}).parse},96928:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return r.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return r.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return r.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return r.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=function(e){var t=e.autoEscape,i=e.caseSensitive,a=void 0!==i&&i,s=e.findChunks,l=void 0===s?r:s,c=e.sanitize,u=e.searchWords,d=e.textToHighlight;return o({chunksToHighlight:n({chunks:l({autoEscape:t,caseSensitive:a,sanitize:c,searchWords:u,textToHighlight:d})}),totalLength:d?d.length:0})};var n=t.combineChunks=function(e){var t=e.chunks;return t.sort((function(e,t){return e.start-t.start})).reduce((function(e,t){if(0===e.length)return[t];var n=e.pop();if(t.start<=n.end){var r=Math.max(n.end,t.end);e.push({highlight:!1,start:n.start,end:r})}else e.push(n,t);return e}),[])},r=function(e){var t=e.autoEscape,n=e.caseSensitive,r=e.sanitize,o=void 0===r?i:r,a=e.searchWords,s=e.textToHighlight;return s=o(s),a.filter((function(e){return e})).reduce((function(e,r){r=o(r),t&&(r=r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));for(var i=new RegExp(r,n?"g":"gi"),a=void 0;a=i.exec(s);){var l=a.index,c=i.lastIndex;c>l&&e.push({highlight:!1,start:l,end:c}),a.index===i.lastIndex&&i.lastIndex++}return e}),[])};t.findChunks=r;var o=t.fillInChunks=function(e){var t=e.chunksToHighlight,n=e.totalLength,r=[],o=function(e,t,n){t-e>0&&r.push({start:e,end:t,highlight:n})};if(0===t.length)o(0,n,!1);else{var i=0;t.forEach((function(e){o(i,e.start,!1),o(e.start,e.end,!0),i=e.end})),o(i,n,!1)}return r};function i(e){return e}}])},36808:function(e,t,n){var r,o,i;void 0===(o="function"==typeof(r=i=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var l in i)i[l]&&(s+="; "+l,!0!==i[l]&&(s+="="+i[l].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),l=s.slice(1).join("=");n||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var c=t(s[0]);if(l=(r.read||r)(l,c)||t(l),n)try{l=JSON.parse(l)}catch(e){}if(o[c]=l,e===c)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))})?r.call(t,n,t,e):r)||(e.exports=o),e.exports=i()},58303:function(e,t,n){var r=n(31934);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,a=document.createElement(i);a.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&a.setAttribute("rows","1");var s=r(e,"font-size");a.style.fontSize=s,a.style.padding="0px",a.style.border="0px";var l=document.body;l.appendChild(a),n=a.offsetHeight,l.removeChild(a)}return n}},59588:function(e){e.exports=function(e,t){var n,r,o=0;function i(){var i,a,s=n,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a<l;a++)if(s.args[a]!==arguments[a]){s=s.next;continue e}return s!==n&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=n,s.prev=null,n.prev=s,n=s),s.val}s=s.next}for(i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return s={args:i,val:e.apply(null,i)},n?(n.prev=s,s.next=n):r=s,o===t.maxSize?(r=r.prev).next=null:o++,n=s,s.val}return t=t||{},i.clear=function(){n=null,r=null,o=0},i}},52796:function(e,t,n){e.exports=n(10643)},13264: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},84518:function(e){var t,n,r,o,i,a,s,l,c,u,d,p,f,m,h,g=!1;function v(){if(!g){g=!0;var e=navigator.userAgent,v=/(?: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(p=/\b(iPhone|iP[ao]d)/.exec(e),f=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),m=/FBAN\/\w+;/i.exec(e),h=/Mobile/i.exec(e),d=!!/Win64/.exec(e),v){(t=v[1]?parseFloat(v[1]):v[5]?parseFloat(v[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);a=y?parseFloat(y[1])+4:t,n=v[2]?parseFloat(v[2]):NaN,r=v[3]?parseFloat(v[3]):NaN,(o=v[4]?parseFloat(v[4]):NaN)?(v=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=v&&v[1]?parseFloat(v[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(b){if(b[1]){var w=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);s=!w||parseFloat(w[1].replace("_","."))}else s=!1;l=!!b[2],c=!!b[3]}else s=l=c=!1}}var b={ie:function(){return v()||t},ieCompatibilityMode:function(){return v()||a>t},ie64:function(){return b.ie()&&d},firefox:function(){return v()||n},opera:function(){return v()||r},webkit:function(){return v()||o},safari:function(){return b.webkit()},chrome:function(){return v()||i},windows:function(){return v()||l},osx:function(){return v()||s},linux:function(){return v()||c},iphone:function(){return v()||p},mobile:function(){return v()||p||f||u||h},nativeApp:function(){return v()||m},android:function(){return v()||u},ipad:function(){return v()||f}};e.exports=b},96534:function(e,t,n){"use strict";var r,o=n(13264);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),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 a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},10643:function(e,t,n){"use strict";var r=n(84518),o=n(96534);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},26470:function(e,t,n){var r=n(34155);function o(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var a=n>=0?arguments[n]:r.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,t="/"===a.charAt(0))}return(t?"/":"")+(e=o(i(e.split("/"),(function(e){return!!e})),!t).join("/"))||"."},t.normalize=function(e){var n=t.isAbsolute(e),r="/"===a(e,-1);return(e=o(i(e.split("/"),(function(e){return!!e})),!n).join("/"))||n||(e="."),e&&r&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(i(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),s=a,l=0;l<a;l++)if(o[l]!==i[l]){s=l;break}var c=[];for(l=s;l<o.length;l++)c.push("..");return(c=c.concat(i.slice(s))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var a=function(e,t,n){return e.substr(t,n)}},34155:function(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&p())}function p(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u<t;)s&&s[u].run();u=-1,t=l.length}s=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||c||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},5464:function(e,t,n){var r=n(45993),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},i=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},a=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=a);var t=r.useState(e(null)),n=t[0],o=t[1],s=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(i,{onResize:s})}),[s]),n]}},53787:function(e,t,n){var r;(function(){function o(e){"use strict";var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r].defaultValue);return n}var i={},a={},s={},l=o(!0),c="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:o(!0),allOn:function(){"use strict";var e=o(!0),t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}()};function d(e,t){"use strict";var n=t?"Error in "+t+" extension->":"Error in unnamed extension",r={valid:!0,error:""};i.helper.isArray(e)||(e=[e]);for(var o=0;o<e.length;++o){var a=n+" sub-extension "+o+": ",s=e[o];if("object"!=typeof s)return r.valid=!1,r.error=a+"must be an object, but "+typeof s+" given",r;if(!i.helper.isString(s.type))return r.valid=!1,r.error=a+'property "type" must be a string, but '+typeof s.type+" given",r;var l=s.type=s.type.toLowerCase();if("language"===l&&(l=s.type="lang"),"html"===l&&(l=s.type="output"),"lang"!==l&&"output"!==l&&"listener"!==l)return r.valid=!1,r.error=a+"type "+l+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',r;if("listener"===l){if(i.helper.isUndefined(s.listeners))return r.valid=!1,r.error=a+'. Extensions of type "listener" must have a property called "listeners"',r}else if(i.helper.isUndefined(s.filter)&&i.helper.isUndefined(s.regex))return r.valid=!1,r.error=a+l+' extensions must define either a "regex" property or a "filter" method',r;if(s.listeners){if("object"!=typeof s.listeners)return r.valid=!1,r.error=a+'"listeners" property must be an object but '+typeof s.listeners+" given",r;for(var c in s.listeners)if(s.listeners.hasOwnProperty(c)&&"function"!=typeof s.listeners[c])return r.valid=!1,r.error=a+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+c+" must be a function but "+typeof s.listeners[c]+" given",r}if(s.filter){if("function"!=typeof s.filter)return r.valid=!1,r.error=a+'"filter" must be a function, but '+typeof s.filter+" given",r}else if(s.regex){if(i.helper.isString(s.regex)&&(s.regex=new RegExp(s.regex,"g")),!(s.regex instanceof RegExp))return r.valid=!1,r.error=a+'"regex" property must either be a string or a RegExp object, but '+typeof s.regex+" given",r;if(i.helper.isUndefined(s.replace))return r.valid=!1,r.error=a+'"regex" extensions must implement a replace string or function',r}}return r}function p(e,t){"use strict";return"¨E"+t.charCodeAt(0)+"E"}i.helper={},i.extensions={},i.setOption=function(e,t){"use strict";return l[e]=t,this},i.getOption=function(e){"use strict";return l[e]},i.getOptions=function(){"use strict";return l},i.resetOptions=function(){"use strict";l=o(!0)},i.setFlavor=function(e){"use strict";if(!u.hasOwnProperty(e))throw Error(e+" flavor was not found");i.resetOptions();var t=u[e];for(var n in c=e,t)t.hasOwnProperty(n)&&(l[n]=t[n])},i.getFlavor=function(){"use strict";return c},i.getFlavorOptions=function(e){"use strict";if(u.hasOwnProperty(e))return u[e]},i.getDefaultOptions=function(e){"use strict";return o(e)},i.subParser=function(e,t){"use strict";if(i.helper.isString(e)){if(void 0===t){if(a.hasOwnProperty(e))return a[e];throw Error("SubParser named "+e+" not registered!")}a[e]=t}},i.extension=function(e,t){"use strict";if(!i.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=i.helper.stdExtName(e),i.helper.isUndefined(t)){if(!s.hasOwnProperty(e))throw Error("Extension named "+e+" is not registered!");return s[e]}"function"==typeof t&&(t=t()),i.helper.isArray(t)||(t=[t]);var n=d(t,e);if(!n.valid)throw Error(n.error);s[e]=t},i.getAllExtensions=function(){"use strict";return s},i.removeExtension=function(e){"use strict";delete s[e]},i.resetExtensions=function(){"use strict";s={}},i.validateExtension=function(e){"use strict";var t=d(e,null);return!!t.valid||(console.warn(t.error),!1)},i.hasOwnProperty("helper")||(i.helper={}),i.helper.isString=function(e){"use strict";return"string"==typeof e||e instanceof String},i.helper.isFunction=function(e){"use strict";return e&&"[object Function]"==={}.toString.call(e)},i.helper.isArray=function(e){"use strict";return Array.isArray(e)},i.helper.isUndefined=function(e){"use strict";return void 0===e},i.helper.forEach=function(e,t){"use strict";if(i.helper.isUndefined(e))throw new Error("obj param is required");if(i.helper.isUndefined(t))throw new Error("callback param is required");if(!i.helper.isFunction(t))throw new Error("callback param must be a function/closure");if("function"==typeof e.forEach)e.forEach(t);else if(i.helper.isArray(e))for(var n=0;n<e.length;n++)t(e[n],n,e);else{if("object"!=typeof e)throw new Error("obj does not seem to be an array or an iterable object");for(var r in e)e.hasOwnProperty(r)&&t(e[r],r,e)}},i.helper.stdExtName=function(e){"use strict";return e.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},i.helper.escapeCharactersCallback=p,i.helper.escapeCharacters=function(e,t,n){"use strict";var r="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var o=new RegExp(r,"g");return e.replace(o,p)},i.helper.unescapeHTMLEntities=function(e){"use strict";return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")};var f=function(e,t,n,r){"use strict";var o,i,a,s,l,c=r||"",u=c.indexOf("g")>-1,d=new RegExp(t+"|"+n,"g"+c.replace(/g/g,"")),p=new RegExp(t,c.replace(/g/g,"")),f=[];do{for(o=0;a=d.exec(e);)if(p.test(a[0]))o++||(s=(i=d.lastIndex)-a[0].length);else if(o&&!--o){l=a.index+a[0].length;var m={left:{start:s,end:i},match:{start:i,end:a.index},right:{start:a.index,end:l},wholeMatch:{start:s,end:l}};if(f.push(m),!u)return f}}while(o&&(d.lastIndex=i));return f};i.helper.matchRecursiveRegExp=function(e,t,n,r){"use strict";for(var o=f(e,t,n,r),i=[],a=0;a<o.length;++a)i.push([e.slice(o[a].wholeMatch.start,o[a].wholeMatch.end),e.slice(o[a].match.start,o[a].match.end),e.slice(o[a].left.start,o[a].left.end),e.slice(o[a].right.start,o[a].right.end)]);return i},i.helper.replaceRecursiveRegExp=function(e,t,n,r,o){"use strict";if(!i.helper.isFunction(t)){var a=t;t=function(){return a}}var s=f(e,n,r,o),l=e,c=s.length;if(c>0){var u=[];0!==s[0].wholeMatch.start&&u.push(e.slice(0,s[0].wholeMatch.start));for(var d=0;d<c;++d)u.push(t(e.slice(s[d].wholeMatch.start,s[d].wholeMatch.end),e.slice(s[d].match.start,s[d].match.end),e.slice(s[d].left.start,s[d].left.end),e.slice(s[d].right.start,s[d].right.end))),d<c-1&&u.push(e.slice(s[d].wholeMatch.end,s[d+1].wholeMatch.start));s[c-1].wholeMatch.end<e.length&&u.push(e.slice(s[c-1].wholeMatch.end)),l=u.join("")}return l},i.helper.regexIndexOf=function(e,t,n){"use strict";if(!i.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(t instanceof RegExp==0)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var r=e.substring(n||0).search(t);return r>=0?r+(n||0):r},i.helper.splitAtIndex=function(e,t){"use strict";if(!i.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},i.helper.encodeEmailAddress=function(e){"use strict";var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e.replace(/./g,(function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var n=Math.random();e=n>.9?t[2](e):n>.45?t[1](e):t[0](e)}return e}))},i.helper.padEnd=function(e,t,n){"use strict";return t>>=0,n=String(n||" "),e.length>t?String(e):((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),String(e)+n.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),i.helper.regexes={asteriskDashAndColon:/([*_:~])/g},i.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:"<span style=\"font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;\">S</span>"},i.Converter=function(e){"use strict";var t={},n=[],r=[],o={},a=c,p={parsed:{},raw:"",format:""};function f(e,t){if(t=t||null,i.helper.isString(e)){if(t=e=i.helper.stdExtName(e),i.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new i.Converter)),i.helper.isArray(e)||(e=[e]);var o=d(e,t);if(!o.valid)throw Error(o.error);for(var a=0;a<e.length;++a)switch(e[a].type){case"lang":n.push(e[a]);break;case"output":r.push(e[a]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}(i.extensions[e],e);if(i.helper.isUndefined(s[e]))throw Error('Extension "'+e+'" could not be loaded. It was either not found or is not a valid extension.');e=s[e]}"function"==typeof e&&(e=e()),i.helper.isArray(e)||(e=[e]);var o=d(e,t);if(!o.valid)throw Error(o.error);for(var a=0;a<e.length;++a){switch(e[a].type){case"lang":n.push(e[a]);break;case"output":r.push(e[a])}if(e[a].hasOwnProperty("listeners"))for(var l in e[a].listeners)e[a].listeners.hasOwnProperty(l)&&m(l,e[a].listeners[l])}}function m(e,t){if(!i.helper.isString(e))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof e+" given");if("function"!=typeof t)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof t+" given");o.hasOwnProperty(e)||(o[e]=[]),o[e].push(t)}!function(){for(var n in e=e||{},l)l.hasOwnProperty(n)&&(t[n]=l[n]);if("object"!=typeof e)throw Error("Converter expects the passed parameter to be an object, but "+typeof e+" was passed instead.");for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.extensions&&i.helper.forEach(t.extensions,f)}(),this._dispatch=function(e,t,n,r){if(o.hasOwnProperty(e))for(var i=0;i<o[e].length;++i){var a=o[e][i](e,t,this,n,r);a&&void 0!==a&&(t=a)}return t},this.listen=function(e,t){return m(e,t),this},this.makeHtml=function(e){if(!e)return e;var o={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:n,outputModifiers:r,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return e=(e=(e=(e=(e=e.replace(/¨/g,"¨T")).replace(/\$/g,"¨D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g," "),t.smartIndentationFix&&(e=function(e){var t=e.match(/^\s*/)[0].length,n=new RegExp("^\\s{0,"+t+"}","gm");return e.replace(n,"")}(e)),e="\n\n"+e+"\n\n",e=(e=i.subParser("detab")(e,t,o)).replace(/^[ \t]+$/gm,""),i.helper.forEach(n,(function(n){e=i.subParser("runExtension")(n,e,t,o)})),e=i.subParser("metadata")(e,t,o),e=i.subParser("hashPreCodeTags")(e,t,o),e=i.subParser("githubCodeBlocks")(e,t,o),e=i.subParser("hashHTMLBlocks")(e,t,o),e=i.subParser("hashCodeTags")(e,t,o),e=i.subParser("stripLinkDefinitions")(e,t,o),e=i.subParser("blockGamut")(e,t,o),e=i.subParser("unhashHTMLSpans")(e,t,o),e=(e=(e=i.subParser("unescapeSpecialChars")(e,t,o)).replace(/¨D/g,"$$")).replace(/¨T/g,"¨"),e=i.subParser("completeHTMLDocument")(e,t,o),i.helper.forEach(r,(function(n){e=i.subParser("runExtension")(n,e,t,o)})),p=o.metadata,e},this.makeMarkdown=this.makeMd=function(e,t){if(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+</,">¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var n=t.createElement("div");n.innerHTML=e;var r={preList:function(e){for(var t=e.querySelectorAll("pre"),n=[],r=0;r<t.length;++r)if(1===t[r].childElementCount&&"code"===t[r].firstChild.tagName.toLowerCase()){var o=t[r].firstChild.innerHTML.trim(),a=t[r].firstChild.getAttribute("data-language")||"";if(""===a)for(var s=t[r].firstChild.className.split(" "),l=0;l<s.length;++l){var c=s[l].match(/^language-(.+)$/);if(null!==c){a=c[1];break}}o=i.helper.unescapeHTMLEntities(o),n.push(o),t[r].outerHTML='<precode language="'+a+'" precodenum="'+r.toString()+'"></precode>'}else n.push(t[r].innerHTML),t[r].innerHTML="",t[r].setAttribute("prenum",r.toString());return n}(n)};!function e(t){for(var n=0;n<t.childNodes.length;++n){var r=t.childNodes[n];3===r.nodeType?/\S/.test(r.nodeValue)?(r.nodeValue=r.nodeValue.split("\n").join(" "),r.nodeValue=r.nodeValue.replace(/(\s)+/g,"$1")):(t.removeChild(r),--n):1===r.nodeType&&e(r)}}(n);for(var o=n.childNodes,a="",s=0;s<o.length;s++)a+=i.subParser("makeMarkdown.node")(o[s],r);return a},this.setOption=function(e,n){t[e]=n},this.getOption=function(e){return t[e]},this.getOptions=function(){return t},this.addExtension=function(e,t){f(e,t=t||null)},this.useExtension=function(e){f(e)},this.setFlavor=function(e){if(!u.hasOwnProperty(e))throw Error(e+" flavor was not found");var n=u[e];for(var r in a=e,n)n.hasOwnProperty(r)&&(t[r]=n[r])},this.getFlavor=function(){return a},this.removeExtension=function(e){i.helper.isArray(e)||(e=[e]);for(var t=0;t<e.length;++t){for(var o=e[t],a=0;a<n.length;++a)n[a]===o&&n[a].splice(a,1);for(;0<r.length;++a)r[0]===o&&r[0].splice(a,1)}},this.getAllExtensions=function(){return{language:n,output:r}},this.getMetadata=function(e){return e?p.raw:p.parsed},this.getMetadataFormat=function(){return p.format},this._setMetadataPair=function(e,t){p.parsed[e]=t},this._setMetadataFormat=function(e){p.format=e},this._setMetadataRaw=function(e){p.raw=e}},i.subParser("anchors",(function(e,t,n){"use strict";var r=function(e,r,o,a,s,l,c){if(i.helper.isUndefined(c)&&(c=""),o=o.toLowerCase(),e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)a="";else if(!a){if(o||(o=r.toLowerCase().replace(/ ?\n/g," ")),a="#"+o,i.helper.isUndefined(n.gUrls[o]))return e;a=n.gUrls[o],i.helper.isUndefined(n.gTitles[o])||(c=n.gTitles[o])}var u='<a href="'+(a=a.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback))+'"';return""!==c&&null!==c&&(u+=' title="'+(c=(c=c.replace(/"/g,""")).replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback))+'"'),t.openLinksInNewWindow&&!/^#/.test(a)&&(u+=' rel="noopener noreferrer" target="¨E95Eblank"'),u+">"+r+"</a>"};return e=(e=(e=(e=(e=n.converter._dispatch("anchors.before",e,t,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,r)).replace(/\[([^\[\]]+)]()()()()()/g,r),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,(function(e,n,r,o,a){if("\\"===r)return n+o;if(!i.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,a),l="";return t.openLinksInNewWindow&&(l=' rel="noopener noreferrer" target="¨E95Eblank"'),n+'<a href="'+s+'"'+l+">"+o+"</a>"}))),n.converter._dispatch("anchors.after",e,t,n)}));var m=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,g=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,v=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,b=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,y=function(e){"use strict";return function(t,n,r,o,a,s,l){var c=r=r.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback),u="",d="",p=n||"",f=l||"";return/^www\./i.test(r)&&(r=r.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(u=s),e.openLinksInNewWindow&&(d=' rel="noopener noreferrer" target="¨E95Eblank"'),p+'<a href="'+r+'"'+d+">"+c+"</a>"+u+f}},w=function(e,t){"use strict";return function(n,r,o){var a="mailto:";return r=r||"",o=i.subParser("unescapeSpecialChars")(o,e,t),e.encodeEmails?(a=i.helper.encodeEmailAddress(a+o),o=i.helper.encodeEmailAddress(o)):a+=o,r+'<a href="'+a+'">'+o+"</a>"}};i.subParser("autoLinks",(function(e,t,n){"use strict";return e=(e=(e=n.converter._dispatch("autoLinks.before",e,t,n)).replace(g,y(t))).replace(b,w(t,n)),n.converter._dispatch("autoLinks.after",e,t,n)})),i.subParser("simplifiedAutoLinks",(function(e,t,n){"use strict";return t.simplifiedAutoLink?(e=n.converter._dispatch("simplifiedAutoLinks.before",e,t,n),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(h,y(t)):e.replace(m,y(t))).replace(v,w(t,n)),e=n.converter._dispatch("simplifiedAutoLinks.after",e,t,n)):e})),i.subParser("blockGamut",(function(e,t,n){"use strict";return e=n.converter._dispatch("blockGamut.before",e,t,n),e=i.subParser("blockQuotes")(e,t,n),e=i.subParser("headers")(e,t,n),e=i.subParser("horizontalRule")(e,t,n),e=i.subParser("lists")(e,t,n),e=i.subParser("codeBlocks")(e,t,n),e=i.subParser("tables")(e,t,n),e=i.subParser("hashHTMLBlocks")(e,t,n),e=i.subParser("paragraphs")(e,t,n),n.converter._dispatch("blockGamut.after",e,t,n)})),i.subParser("blockQuotes",(function(e,t,n){"use strict";e=n.converter._dispatch("blockQuotes.before",e,t,n),e+="\n\n";var r=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(r=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(r,(function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=i.subParser("githubCodeBlocks")(e,t,n),e=(e=(e=i.subParser("blockGamut")(e,t,n)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,(function(e,t){var n=t;return(n=n.replace(/^ /gm,"¨0")).replace(/¨0/g,"")})),i.subParser("hashBlock")("<blockquote>\n"+e+"\n</blockquote>",t,n)})),n.converter._dispatch("blockQuotes.after",e,t,n)})),i.subParser("codeBlocks",(function(e,t,n){"use strict";return e=n.converter._dispatch("codeBlocks.before",e,t,n),e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(e,r,o){var a=r,s=o,l="\n";return a=i.subParser("outdent")(a,t,n),a=i.subParser("encodeCode")(a,t,n),a=(a=(a=i.subParser("detab")(a,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(l=""),a="<pre><code>"+a+l+"</code></pre>",i.subParser("hashBlock")(a,t,n)+s}))).replace(/¨0/,""),n.converter._dispatch("codeBlocks.after",e,t,n)})),i.subParser("codeSpans",(function(e,t,n){"use strict";return void 0===(e=n.converter._dispatch("codeSpans.before",e,t,n))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,r,o,a){var s=a;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=r+"<code>"+(s=i.subParser("encodeCode")(s,t,n))+"</code>",i.subParser("hashHTMLSpans")(s,t,n)})),n.converter._dispatch("codeSpans.after",e,t,n)})),i.subParser("completeHTMLDocument",(function(e,t,n){"use strict";if(!t.completeHTMLDocument)return e;e=n.converter._dispatch("completeHTMLDocument.before",e,t,n);var r="html",o="<!DOCTYPE HTML>\n",i="",a='<meta charset="utf-8">\n',s="",l="";for(var c in void 0!==n.metadata.parsed.doctype&&(o="<!DOCTYPE "+n.metadata.parsed.doctype+">\n","html"!==(r=n.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==r||(a='<meta charset="utf-8">')),n.metadata.parsed)if(n.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":i="<title>"+n.metadata.parsed.title+"</title>\n";break;case"charset":a="html"===r||"html5"===r?'<meta charset="'+n.metadata.parsed.charset+'">\n':'<meta name="charset" content="'+n.metadata.parsed.charset+'">\n';break;case"language":case"lang":s=' lang="'+n.metadata.parsed[c]+'"',l+='<meta name="'+c+'" content="'+n.metadata.parsed[c]+'">\n';break;default:l+='<meta name="'+c+'" content="'+n.metadata.parsed[c]+'">\n'}return e=o+"<html"+s+">\n<head>\n"+i+a+l+"</head>\n<body>\n"+e.trim()+"\n</body>\n</html>",n.converter._dispatch("completeHTMLDocument.after",e,t,n)})),i.subParser("detab",(function(e,t,n){"use strict";return e=(e=(e=(e=(e=(e=n.converter._dispatch("detab.before",e,t,n)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,(function(e,t){for(var n=t,r=4-n.length%4,o=0;o<r;o++)n+=" ";return n}))).replace(/¨A/g," ")).replace(/¨B/g,""),n.converter._dispatch("detab.after",e,t,n)})),i.subParser("ellipsis",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("ellipsis.before",e,t,n)).replace(/\.\.\./g,"…"),n.converter._dispatch("ellipsis.after",e,t,n)})),i.subParser("emoji",(function(e,t,n){"use strict";return t.emoji?(e=(e=n.converter._dispatch("emoji.before",e,t,n)).replace(/:([\S]+?):/g,(function(e,t){return i.helper.emojis.hasOwnProperty(t)?i.helper.emojis[t]:e})),n.converter._dispatch("emoji.after",e,t,n)):e})),i.subParser("encodeAmpsAndAngles",(function(e,t,n){"use strict";return e=(e=(e=(e=(e=n.converter._dispatch("encodeAmpsAndAngles.before",e,t,n)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&")).replace(/<(?![a-z\/?$!])/gi,"<")).replace(/</g,"<")).replace(/>/g,">"),n.converter._dispatch("encodeAmpsAndAngles.after",e,t,n)})),i.subParser("encodeBackslashEscapes",(function(e,t,n){"use strict";return e=(e=(e=n.converter._dispatch("encodeBackslashEscapes.before",e,t,n)).replace(/\\(\\)/g,i.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,i.helper.escapeCharactersCallback),n.converter._dispatch("encodeBackslashEscapes.after",e,t,n)})),i.subParser("encodeCode",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("encodeCode.before",e,t,n)).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/([*_{}\[\]\\=~-])/g,i.helper.escapeCharactersCallback),n.converter._dispatch("encodeCode.after",e,t,n)})),i.subParser("escapeSpecialCharsWithinTagAttributes",(function(e,t,n){"use strict";return e=(e=(e=n.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,n)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,(function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)}))).replace(/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,(function(e){return e.replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)})),n.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,n)})),i.subParser("githubCodeBlocks",(function(e,t,n){"use strict";return t.ghCodeBlocks?(e=n.converter._dispatch("githubCodeBlocks.before",e,t,n),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,r,o,a){var s=t.omitExtraWLInCodeBlocks?"":"\n";return a=i.subParser("encodeCode")(a,t,n),a="<pre><code"+(o?' class="'+o+" language-"+o+'"':"")+">"+(a=(a=(a=i.subParser("detab")(a,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"</code></pre>",a=i.subParser("hashBlock")(a,t,n),"\n\n¨G"+(n.ghCodeBlocks.push({text:e,codeblock:a})-1)+"G\n\n"}))).replace(/¨0/,""),n.converter._dispatch("githubCodeBlocks.after",e,t,n)):e})),i.subParser("hashBlock",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("hashBlock.before",e,t,n)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n",n.converter._dispatch("hashBlock.after",e,t,n)})),i.subParser("hashCodeTags",(function(e,t,n){"use strict";return e=n.converter._dispatch("hashCodeTags.before",e,t,n),e=i.helper.replaceRecursiveRegExp(e,(function(e,r,o,a){var s=o+i.subParser("encodeCode")(r,t,n)+a;return"¨C"+(n.gHtmlSpans.push(s)-1)+"C"}),"<code\\b[^>]*>","</code>","gim"),n.converter._dispatch("hashCodeTags.after",e,t,n)})),i.subParser("hashElement",(function(e,t,n){"use strict";return function(e,t){var r=t;return r=(r=(r=r.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),"\n\n¨K"+(n.gHtmlBlocks.push(r)-1)+"K\n\n"}})),i.subParser("hashHTMLBlocks",(function(e,t,n){"use strict";e=n.converter._dispatch("hashHTMLBlocks.before",e,t,n);var r=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],o=function(e,t,r,o){var i=e;return-1!==r.search(/\bmarkdown\b/)&&(i=r+n.converter.makeHtml(t)+o),"\n\n¨K"+(n.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"<"+t+">"})));for(var a=0;a<r.length;++a)for(var s,l=new RegExp("^ {0,3}(<"+r[a]+"\\b[^>]*>)","im"),c="<"+r[a]+"\\b[^>]*>",u="</"+r[a]+">";-1!==(s=i.helper.regexIndexOf(e,l));){var d=i.helper.splitAtIndex(e,s),p=i.helper.replaceRecursiveRegExp(d[1],o,c,u,"im");if(p===d[1])break;e=d[0].concat(p)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,n)),e=(e=i.helper.replaceRecursiveRegExp(e,(function(e){return"\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n"}),"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,n)),n.converter._dispatch("hashHTMLBlocks.after",e,t,n)})),i.subParser("hashHTMLSpans",(function(e,t,n){"use strict";function r(e){return"¨C"+(n.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=n.converter._dispatch("hashHTMLSpans.before",e,t,n)).replace(/<[^>]+?\/>/gi,(function(e){return r(e)}))).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<[^>]+?>/gi,(function(e){return r(e)})),n.converter._dispatch("hashHTMLSpans.after",e,t,n)})),i.subParser("unhashHTMLSpans",(function(e,t,n){"use strict";e=n.converter._dispatch("unhashHTMLSpans.before",e,t,n);for(var r=0;r<n.gHtmlSpans.length;++r){for(var o=n.gHtmlSpans[r],i=0;/¨C(\d+)C/.test(o);){var a=RegExp.$1;if(o=o.replace("¨C"+a+"C",n.gHtmlSpans[a]),10===i){console.error("maximum nesting of 10 spans reached!!!");break}++i}e=e.replace("¨C"+r+"C",o)}return n.converter._dispatch("unhashHTMLSpans.after",e,t,n)})),i.subParser("hashPreCodeTags",(function(e,t,n){"use strict";return e=n.converter._dispatch("hashPreCodeTags.before",e,t,n),e=i.helper.replaceRecursiveRegExp(e,(function(e,r,o,a){var s=o+i.subParser("encodeCode")(r,t,n)+a;return"\n\n¨G"+(n.ghCodeBlocks.push({text:e,codeblock:s})-1)+"G\n\n"}),"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),n.converter._dispatch("hashPreCodeTags.after",e,t,n)})),i.subParser("headers",(function(e,t,n){"use strict";e=n.converter._dispatch("headers.before",e,t,n);var r=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),o=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,a=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(o,(function(e,o){var a=i.subParser("spanGamut")(o,t,n),s=t.noHeaderId?"":' id="'+l(o)+'"',c="<h"+r+s+">"+a+"</h"+r+">";return i.subParser("hashBlock")(c,t,n)}))).replace(a,(function(e,o){var a=i.subParser("spanGamut")(o,t,n),s=t.noHeaderId?"":' id="'+l(o)+'"',c=r+1,u="<h"+c+s+">"+a+"</h"+c+">";return i.subParser("hashBlock")(u,t,n)}));var s=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function l(e){var r,o;if(t.customizedHeaderId){var a=e.match(/\{([^{]+?)}\s*$/);a&&a[1]&&(e=a[1])}return r=e,o=i.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(r=o+r),r=t.ghCompatibleHeaderId?r.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?r.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():r.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(r=o+r),n.hashLinkCounts[r]?r=r+"-"+n.hashLinkCounts[r]++:n.hashLinkCounts[r]=1,r}return e=e.replace(s,(function(e,o,a){var s=a;t.customizedHeaderId&&(s=a.replace(/\s?\{([^{]+?)}\s*$/,""));var c=i.subParser("spanGamut")(s,t,n),u=t.noHeaderId?"":' id="'+l(a)+'"',d=r-1+o.length,p="<h"+d+u+">"+c+"</h"+d+">";return i.subParser("hashBlock")(p,t,n)})),n.converter._dispatch("headers.after",e,t,n)})),i.subParser("horizontalRule",(function(e,t,n){"use strict";e=n.converter._dispatch("horizontalRule.before",e,t,n);var r=i.subParser("hashBlock")("<hr />",t,n);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,r),n.converter._dispatch("horizontalRule.after",e,t,n)})),i.subParser("images",(function(e,t,n){"use strict";function r(e,t,r,o,a,s,l,c){var u=n.gUrls,d=n.gTitles,p=n.gDimensions;if(r=r.toLowerCase(),c||(c=""),e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)o="";else if(""===o||null===o){if(""!==r&&null!==r||(r=t.toLowerCase().replace(/ ?\n/g," ")),o="#"+r,i.helper.isUndefined(u[r]))return e;o=u[r],i.helper.isUndefined(d[r])||(c=d[r]),i.helper.isUndefined(p[r])||(a=p[r].width,s=p[r].height)}t=t.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback);var f='<img src="'+(o=o.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback))+'" alt="'+t+'"';return c&&i.helper.isString(c)&&(f+=' title="'+(c=c.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback))+'"'),a&&s&&(f+=' width="'+(a="*"===a?"auto":a)+'"',f+=' height="'+(s="*"===s?"auto":s)+'"'),f+" />"}return e=(e=(e=(e=(e=(e=n.converter._dispatch("images.before",e,t,n)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,r)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,n,o,i,a,s,l){return r(e,t,n,o=o.replace(/\s/g,""),i,a,0,l)}))).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,r)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,r)).replace(/!\[([^\[\]]+)]()()()()()/g,r),n.converter._dispatch("images.after",e,t,n)})),i.subParser("italicsAndBold",(function(e,t,n){"use strict";function r(e,t,n){return t+e+n}return e=n.converter._dispatch("italicsAndBold.before",e,t,n),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return r(t,"<strong><em>","</em></strong>")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return r(t,"<strong>","</strong>")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return r(t,"<em>","</em>")})):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong><em>","</em></strong>"):e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong>","</strong>"):e}))).replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?r(t,"<em>","</em>"):e})),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<strong><em>","</em></strong>")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<strong>","</strong>")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<em>","</em>")})):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong><em>","</em></strong>"):e}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong>","</strong>"):e}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<em>","</em>"):e})),n.converter._dispatch("italicsAndBold.after",e,t,n)})),i.subParser("lists",(function(e,t,n){"use strict";function r(e,r){n.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var o=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,a=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(o=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(o,(function(e,r,o,s,l,c,u){u=u&&""!==u.trim();var d=i.subParser("outdent")(l,t,n),p="";return c&&t.tasklists&&(p=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var e='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return u&&(e+=" checked"),e+">"}))),d=d.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,(function(e){return"¨A"+e})),r||d.search(/\n{2,}/)>-1?(d=i.subParser("githubCodeBlocks")(d,t,n),d=i.subParser("blockGamut")(d,t,n)):(d=(d=i.subParser("lists")(d,t,n)).replace(/\n$/,""),d=(d=i.subParser("hashHTMLBlocks")(d,t,n)).replace(/\n\n+/g,"\n\n"),d=a?i.subParser("paragraphs")(d,t,n):i.subParser("spanGamut")(d,t,n)),"<li"+p+">"+(d=d.replace("¨A",""))+"</li>\n"}))).replace(/¨0/g,""),n.gListLevel--,r&&(e=e.replace(/\s+$/,"")),e}function o(e,t){if("ol"===t){var n=e.match(/^ *(\d+)\./);if(n&&"1"!==n[1])return' start="'+n[1]+'"'}return""}function a(e,n,i){var a=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===n?a:s,c="";if(-1!==e.search(l))!function t(u){var d=u.search(l),p=o(e,n);-1!==d?(c+="\n\n<"+n+p+">\n"+r(u.slice(0,d),!!i)+"</"+n+">\n",l="ul"==(n="ul"===n?"ol":"ul")?a:s,t(u.slice(d))):c+="\n\n<"+n+p+">\n"+r(u,!!i)+"</"+n+">\n"}(e);else{var u=o(e,n);c="\n\n<"+n+u+">\n"+r(e,!!i)+"</"+n+">\n"}return c}return e=n.converter._dispatch("lists.before",e,t,n),e+="¨0",e=(e=n.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n){return a(t,n.search(/[*+-]/g)>-1?"ul":"ol",!0)})):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n,r){return a(n,r.search(/[*+-]/g)>-1?"ul":"ol",!1)}))).replace(/¨0/,""),n.converter._dispatch("lists.after",e,t,n)})),i.subParser("metadata",(function(e,t,n){"use strict";if(!t.metadata)return e;function r(e){n.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,(function(e,t,r){return n.metadata.parsed[t]=r,""}))}return e=(e=(e=(e=n.converter._dispatch("metadata.before",e,t,n)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,(function(e,t,n){return r(n),"¨M"}))).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,(function(e,t,o){return t&&(n.metadata.format=t),r(o),"¨M"}))).replace(/¨M/g,""),n.converter._dispatch("metadata.after",e,t,n)})),i.subParser("outdent",(function(e,t,n){"use strict";return e=(e=(e=n.converter._dispatch("outdent.before",e,t,n)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),n.converter._dispatch("outdent.after",e,t,n)})),i.subParser("paragraphs",(function(e,t,n){"use strict";for(var r=(e=(e=(e=n.converter._dispatch("paragraphs.before",e,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),o=[],a=r.length,s=0;s<a;s++){var l=r[s];l.search(/¨(K|G)(\d+)\1/g)>=0?o.push(l):l.search(/\S/)>=0&&(l=(l=i.subParser("spanGamut")(l,t,n)).replace(/^([ \t]*)/g,"<p>"),l+="</p>",o.push(l))}for(a=o.length,s=0;s<a;s++){for(var c="",u=o[s],d=!1;/¨(K|G)(\d+)\1/.test(u);){var p=RegExp.$1,f=RegExp.$2;c=(c="K"===p?n.gHtmlBlocks[f]:d?i.subParser("encodeCode")(n.ghCodeBlocks[f].text,t,n):n.ghCodeBlocks[f].codeblock).replace(/\$/g,"$$$$"),u=u.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,c),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(u)&&(d=!0)}o[s]=u}return e=(e=(e=o.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),n.converter._dispatch("paragraphs.after",e,t,n)})),i.subParser("runExtension",(function(e,t,n,r){"use strict";if(e.filter)t=e.filter(t,r.converter,n);else if(e.regex){var o=e.regex;o instanceof RegExp||(o=new RegExp(o,"g")),t=t.replace(o,e.replace)}return t})),i.subParser("spanGamut",(function(e,t,n){"use strict";return e=n.converter._dispatch("spanGamut.before",e,t,n),e=i.subParser("codeSpans")(e,t,n),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,n),e=i.subParser("encodeBackslashEscapes")(e,t,n),e=i.subParser("images")(e,t,n),e=i.subParser("anchors")(e,t,n),e=i.subParser("autoLinks")(e,t,n),e=i.subParser("simplifiedAutoLinks")(e,t,n),e=i.subParser("emoji")(e,t,n),e=i.subParser("underline")(e,t,n),e=i.subParser("italicsAndBold")(e,t,n),e=i.subParser("strikethrough")(e,t,n),e=i.subParser("ellipsis")(e,t,n),e=i.subParser("hashHTMLSpans")(e,t,n),e=i.subParser("encodeAmpsAndAngles")(e,t,n),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"<br />\n")):e=e.replace(/ +\n/g,"<br />\n"),n.converter._dispatch("spanGamut.after",e,t,n)})),i.subParser("strikethrough",(function(e,t,n){"use strict";return t.strikethrough&&(e=(e=n.converter._dispatch("strikethrough.before",e,t,n)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,r){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,n)),"<del>"+e+"</del>"}(r)})),e=n.converter._dispatch("strikethrough.after",e,t,n)),e})),i.subParser("stripLinkDefinitions",(function(e,t,n){"use strict";var r=function(e,r,o,a,s,l,c){return r=r.toLowerCase(),o.match(/^data:.+?\/.+?;base64,/)?n.gUrls[r]=o.replace(/\s/g,""):n.gUrls[r]=i.subParser("encodeAmpsAndAngles")(o,t,n),l?l+c:(c&&(n.gTitles[r]=c.replace(/"|'/g,""")),t.parseImgDimensions&&a&&s&&(n.gDimensions[r]={width:a,height:s}),"")};return(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,r)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,r)).replace(/¨0/,"")})),i.subParser("tables",(function(e,t,n){"use strict";if(!t.tables)return e;function r(e,r){return"<td"+r+">"+i.subParser("spanGamut")(e,t,n)+"</td>\n"}function o(e){var o,a=e.split("\n");for(o=0;o<a.length;++o)/^ {0,3}\|/.test(a[o])&&(a[o]=a[o].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(a[o])&&(a[o]=a[o].replace(/\|[ \t]*$/,"")),a[o]=i.subParser("codeSpans")(a[o],t,n);var s,l,c,u,d=a[0].split("|").map((function(e){return e.trim()})),p=a[1].split("|").map((function(e){return e.trim()})),f=[],m=[],h=[],g=[];for(a.shift(),a.shift(),o=0;o<a.length;++o)""!==a[o].trim()&&f.push(a[o].split("|").map((function(e){return e.trim()})));if(d.length<p.length)return e;for(o=0;o<p.length;++o)h.push((s=p[o],/^:[ \t]*--*$/.test(s)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(s)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(s)?' style="text-align:center;"':""));for(o=0;o<d.length;++o)i.helper.isUndefined(h[o])&&(h[o]=""),m.push((l=d[o],c=h[o],u=void 0,u="",l=l.trim(),(t.tablesHeaderId||t.tableHeaderId)&&(u=' id="'+l.replace(/ /g,"_").toLowerCase()+'"'),"<th"+u+c+">"+(l=i.subParser("spanGamut")(l,t,n))+"</th>\n"));for(o=0;o<f.length;++o){for(var v=[],b=0;b<m.length;++b)i.helper.isUndefined(f[o][b]),v.push(r(f[o][b],h[b]));g.push(v)}return function(e,t){for(var n="<table>\n<thead>\n<tr>\n",r=e.length,o=0;o<r;++o)n+=e[o];for(n+="</tr>\n</thead>\n<tbody>\n",o=0;o<t.length;++o){n+="<tr>\n";for(var i=0;i<r;++i)n+=t[o][i];n+="</tr>\n"}return n+"</tbody>\n</table>\n"}(m,g)}return e=(e=(e=(e=n.converter._dispatch("tables.before",e,t,n)).replace(/\\(\|)/g,i.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,o)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,o),n.converter._dispatch("tables.after",e,t,n)})),i.subParser("underline",(function(e,t,n){"use strict";return t.underline?(e=n.converter._dispatch("underline.before",e,t,n),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return"<u>"+t+"</u>"}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return"<u>"+t+"</u>"})):(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e}))).replace(/(_)/g,i.helper.escapeCharactersCallback),e=n.converter._dispatch("underline.after",e,t,n)):e})),i.subParser("unescapeSpecialChars",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("unescapeSpecialChars.before",e,t,n)).replace(/¨E(\d+)E/g,(function(e,t){var n=parseInt(t);return String.fromCharCode(n)})),n.converter._dispatch("unescapeSpecialChars.after",e,t,n)})),i.subParser("makeMarkdown.blockquote",(function(e,t){"use strict";var n="";if(e.hasChildNodes())for(var r=e.childNodes,o=r.length,a=0;a<o;++a){var s=i.subParser("makeMarkdown.node")(r[a],t);""!==s&&(n+=s)}return"> "+(n=n.trim()).split("\n").join("\n> ")})),i.subParser("makeMarkdown.codeBlock",(function(e,t){"use strict";var n=e.getAttribute("language"),r=e.getAttribute("precodenum");return"```"+n+"\n"+t.preList[r]+"\n```"})),i.subParser("makeMarkdown.codeSpan",(function(e){"use strict";return"`"+e.innerHTML+"`"})),i.subParser("makeMarkdown.emphasis",(function(e,t){"use strict";var n="";if(e.hasChildNodes()){n+="*";for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);n+="*"}return n})),i.subParser("makeMarkdown.header",(function(e,t,n){"use strict";var r=new Array(n+1).join("#"),o="";if(e.hasChildNodes()){o=r+" ";for(var a=e.childNodes,s=a.length,l=0;l<s;++l)o+=i.subParser("makeMarkdown.node")(a[l],t)}return o})),i.subParser("makeMarkdown.hr",(function(){"use strict";return"---"})),i.subParser("makeMarkdown.image",(function(e){"use strict";var t="";return e.hasAttribute("src")&&(t+="+">",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t})),i.subParser("makeMarkdown.links",(function(e,t){"use strict";var n="";if(e.hasChildNodes()&&e.hasAttribute("href")){var r=e.childNodes,o=r.length;n="[";for(var a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);n+="](",n+="<"+e.getAttribute("href")+">",e.hasAttribute("title")&&(n+=' "'+e.getAttribute("title")+'"'),n+=")"}return n})),i.subParser("makeMarkdown.list",(function(e,t,n){"use strict";var r="";if(!e.hasChildNodes())return"";for(var o=e.childNodes,a=o.length,s=e.getAttribute("start")||1,l=0;l<a;++l)void 0!==o[l].tagName&&"li"===o[l].tagName.toLowerCase()&&(r+=("ol"===n?s.toString()+". ":"- ")+i.subParser("makeMarkdown.listItem")(o[l],t),++s);return(r+="\n\x3c!-- --\x3e\n").trim()})),i.subParser("makeMarkdown.listItem",(function(e,t){"use strict";for(var n="",r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);return/\n$/.test(n)?n=n.split("\n").join("\n ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):n+="\n",n})),i.subParser("makeMarkdown.node",(function(e,t,n){"use strict";n=n||!1;var r="";if(3===e.nodeType)return i.subParser("makeMarkdown.txt")(e,t);if(8===e.nodeType)return"\x3c!--"+e.data+"--\x3e\n\n";if(1!==e.nodeType)return"";switch(e.tagName.toLowerCase()){case"h1":n||(r=i.subParser("makeMarkdown.header")(e,t,1)+"\n\n");break;case"h2":n||(r=i.subParser("makeMarkdown.header")(e,t,2)+"\n\n");break;case"h3":n||(r=i.subParser("makeMarkdown.header")(e,t,3)+"\n\n");break;case"h4":n||(r=i.subParser("makeMarkdown.header")(e,t,4)+"\n\n");break;case"h5":n||(r=i.subParser("makeMarkdown.header")(e,t,5)+"\n\n");break;case"h6":n||(r=i.subParser("makeMarkdown.header")(e,t,6)+"\n\n");break;case"p":n||(r=i.subParser("makeMarkdown.paragraph")(e,t)+"\n\n");break;case"blockquote":n||(r=i.subParser("makeMarkdown.blockquote")(e,t)+"\n\n");break;case"hr":n||(r=i.subParser("makeMarkdown.hr")(e,t)+"\n\n");break;case"ol":n||(r=i.subParser("makeMarkdown.list")(e,t,"ol")+"\n\n");break;case"ul":n||(r=i.subParser("makeMarkdown.list")(e,t,"ul")+"\n\n");break;case"precode":n||(r=i.subParser("makeMarkdown.codeBlock")(e,t)+"\n\n");break;case"pre":n||(r=i.subParser("makeMarkdown.pre")(e,t)+"\n\n");break;case"table":n||(r=i.subParser("makeMarkdown.table")(e,t)+"\n\n");break;case"code":r=i.subParser("makeMarkdown.codeSpan")(e,t);break;case"em":case"i":r=i.subParser("makeMarkdown.emphasis")(e,t);break;case"strong":case"b":r=i.subParser("makeMarkdown.strong")(e,t);break;case"del":r=i.subParser("makeMarkdown.strikethrough")(e,t);break;case"a":r=i.subParser("makeMarkdown.links")(e,t);break;case"img":r=i.subParser("makeMarkdown.image")(e,t);break;default:r=e.outerHTML+"\n\n"}return r})),i.subParser("makeMarkdown.paragraph",(function(e,t){"use strict";var n="";if(e.hasChildNodes())for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);return n.trim()})),i.subParser("makeMarkdown.pre",(function(e,t){"use strict";var n=e.getAttribute("prenum");return"<pre>"+t.preList[n]+"</pre>"})),i.subParser("makeMarkdown.strikethrough",(function(e,t){"use strict";var n="";if(e.hasChildNodes()){n+="~~";for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);n+="~~"}return n})),i.subParser("makeMarkdown.strong",(function(e,t){"use strict";var n="";if(e.hasChildNodes()){n+="**";for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t);n+="**"}return n})),i.subParser("makeMarkdown.table",(function(e,t){"use strict";var n,r,o="",a=[[],[]],s=e.querySelectorAll("thead>tr>th"),l=e.querySelectorAll("tbody>tr");for(n=0;n<s.length;++n){var c=i.subParser("makeMarkdown.tableCell")(s[n],t),u="---";if(s[n].hasAttribute("style"))switch(s[n].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":u=":---";break;case"text-align:right;":u="---:";break;case"text-align:center;":u=":---:"}a[0][n]=c.trim(),a[1][n]=u}for(n=0;n<l.length;++n){var d=a.push([])-1,p=l[n].getElementsByTagName("td");for(r=0;r<s.length;++r){var f=" ";void 0!==p[r]&&(f=i.subParser("makeMarkdown.tableCell")(p[r],t)),a[d].push(f)}}var m=3;for(n=0;n<a.length;++n)for(r=0;r<a[n].length;++r){var h=a[n][r].length;h>m&&(m=h)}for(n=0;n<a.length;++n){for(r=0;r<a[n].length;++r)1===n?":"===a[n][r].slice(-1)?a[n][r]=i.helper.padEnd(a[n][r].slice(-1),m-1,"-")+":":a[n][r]=i.helper.padEnd(a[n][r],m,"-"):a[n][r]=i.helper.padEnd(a[n][r],m);o+="| "+a[n].join(" | ")+" |\n"}return o.trim()})),i.subParser("makeMarkdown.tableCell",(function(e,t){"use strict";var n="";if(!e.hasChildNodes())return"";for(var r=e.childNodes,o=r.length,a=0;a<o;++a)n+=i.subParser("makeMarkdown.node")(r[a],t,!0);return n.trim()})),i.subParser("makeMarkdown.txt",(function(e){"use strict";var t=e.nodeValue;return t=(t=t.replace(/ +/g," ")).replace(/¨NBSP;/g," "),(t=(t=(t=(t=(t=(t=(t=(t=i.helper.unescapeHTMLEntities(t)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")})),void 0===(r=function(){"use strict";return i}.call(t,n,t,e))||(e.exports=r)}).call(this)},78213:function(e,t,n){var r=n(32728),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function a(){this._array=[],this._set=i?new Map:Object.create(null)}a.fromArray=function(e,t){for(var n=new a,r=0,o=e.length;r<o;r++)n.add(e[r],t);return n},a.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},a.prototype.add=function(e,t){var n=i?e:r.toSetString(e),a=i?this.has(e):o.call(this._set,n),s=this._array.length;a&&!t||this._array.push(e),a||(i?this._set.set(e,s):this._set[n]=s)},a.prototype.has=function(e){if(i)return this._set.has(e);var t=r.toSetString(e);return o.call(this._set,t)},a.prototype.indexOf=function(e){if(i){var t=this._set.get(e);if(t>=0)return t}else{var n=r.toSetString(e);if(o.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},a.prototype.toArray=function(){return this._array.slice()},t.I=a},16400:function(e,t,n){var r=n(67923);t.encode=function(e){var t,n="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,(o>>>=5)>0&&(t|=32),n+=r.encode(t)}while(o>0);return n},t.decode=function(e,t,n){var o,i,a,s,l=e.length,c=0,u=0;do{if(t>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));o=!!(32&i),c+=(i&=31)<<u,u+=5}while(o);n.value=(s=(a=c)>>1,1==(1&a)?-s:s),n.rest=t}},67923:function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},9216:function(e,t){function n(e,r,o,i,a,s){var l=Math.floor((r-e)/2)+e,c=a(o,i[l],!0);return 0===c?l:c>0?r-l>1?n(l,r,o,i,a,s):s==t.LEAST_UPPER_BOUND?r<i.length?r:-1:l:l-e>1?n(e,l,o,i,a,s):s==t.LEAST_UPPER_BOUND?l:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,o,i){if(0===r.length)return-1;var a=n(-1,r.length,e,r,o,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===o(r[a],r[a-1],!0);)--a;return a}},21188:function(e,t,n){var r=n(32728);function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},o.prototype.add=function(e){var t,n,o,i,a,s;n=e,o=(t=this._last).generatedLine,i=n.generatedLine,a=t.generatedColumn,s=n.generatedColumn,i>o||i==o&&s>=a||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.H=o},22826:function(e,t){function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t,o,i){if(o<i){var a=o-1;n(e,(u=o,d=i,Math.round(u+Math.random()*(d-u))),i);for(var s=e[i],l=o;l<i;l++)t(e[l],s)<=0&&n(e,a+=1,l);n(e,a+1,l);var c=a+1;r(e,t,o,c-1),r(e,t,c+1,i)}var u,d}t.U=function(e,t){r(e,t,0,e.length-1)}},76771:function(e,t,n){var r=n(32728),o=n(9216),i=n(78213).I,a=n(16400),s=n(22826).U;function l(e,t){var n=e;return"string"==typeof e&&(n=r.parseSourceMapInput(e)),null!=n.sections?new d(n,t):new c(n,t)}function c(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var o=r.getArg(n,"version"),a=r.getArg(n,"sources"),s=r.getArg(n,"names",[]),l=r.getArg(n,"sourceRoot",null),c=r.getArg(n,"sourcesContent",null),u=r.getArg(n,"mappings"),d=r.getArg(n,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);l&&(l=r.normalize(l)),a=a.map(String).map(r.normalize).map((function(e){return l&&r.isAbsolute(l)&&r.isAbsolute(e)?r.relative(l,e):e})),this._names=i.fromArray(s.map(String),!0),this._sources=i.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map((function(e){return r.computeSourceURL(l,e,t)})),this.sourceRoot=l,this.sourcesContent=c,this._mappings=u,this._sourceMapURL=t,this.file=d}function u(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function d(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var o=r.getArg(n,"version"),a=r.getArg(n,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new i,this._names=new i;var s={line:-1,column:0};this._sections=a.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=r.getArg(e,"offset"),o=r.getArg(n,"line"),i=r.getArg(n,"column");if(o<s.line||o===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=n,{generatedOffset:{generatedLine:o+1,generatedColumn:i+1},consumer:new l(r.getArg(e,"map"),t)}}))}l.fromSourceMap=function(e,t){return c.fromSourceMap(e,t)},l.prototype._version=3,l.prototype.__generatedMappings=null,Object.defineProperty(l.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),l.prototype.__originalMappings=null,Object.defineProperty(l.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),l.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},l.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},l.GENERATED_ORDER=1,l.ORIGINAL_ORDER=2,l.GREATEST_LOWER_BOUND=1,l.LEAST_UPPER_BOUND=2,l.prototype.eachMapping=function(e,t,n){var o,i=t||null;switch(n||l.GENERATED_ORDER){case l.GENERATED_ORDER:o=this._generatedMappings;break;case l.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return{source:t=r.computeSourceURL(a,t,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,i)},l.prototype.allGeneratedPositionsFor=function(e){var t=r.getArg(e,"line"),n={source:r.getArg(e,"source"),originalLine:t,originalColumn:r.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,o.LEAST_UPPER_BOUND);if(a>=0){var s=this._originalMappings[a];if(void 0===e.column)for(var l=s.originalLine;s&&s.originalLine===l;)i.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)i.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return i},t.SourceMapConsumer=l,c.prototype=Object.create(l.prototype),c.prototype.consumer=l,c.prototype._findSourceIndex=function(e){var t,n=e;if(null!=this.sourceRoot&&(n=r.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==e)return t;return-1},c.fromSourceMap=function(e,t){var n=Object.create(c.prototype),o=n._names=i.fromArray(e._names.toArray(),!0),a=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=t,n._absoluteSources=n._sources.toArray().map((function(e){return r.computeSourceURL(n.sourceRoot,e,t)}));for(var l=e._mappings.toArray().slice(),d=n.__generatedMappings=[],p=n.__originalMappings=[],f=0,m=l.length;f<m;f++){var h=l[f],g=new u;g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=a.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=o.indexOf(h.name)),p.push(g)),d.push(g)}return s(n.__originalMappings,r.compareByOriginalPositions),n},c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),c.prototype._parseMappings=function(e,t){for(var n,o,i,l,c,d=1,p=0,f=0,m=0,h=0,g=0,v=e.length,b=0,y={},w={},k=[],x=[];b<v;)if(";"===e.charAt(b))d++,b++,p=0;else if(","===e.charAt(b))b++;else{for((n=new u).generatedLine=d,l=b;l<v&&!this._charIsMappingSeparator(e,l);l++);if(i=y[o=e.slice(b,l)])b+=o.length;else{for(i=[];b<l;)a.decode(e,b,w),c=w.value,b=w.rest,i.push(c);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");y[o]=i}n.generatedColumn=p+i[0],p=n.generatedColumn,i.length>1&&(n.source=h+i[1],h+=i[1],n.originalLine=f+i[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=m+i[3],m=n.originalColumn,i.length>4&&(n.name=g+i[4],g+=i[4])),x.push(n),"number"==typeof n.originalLine&&k.push(n)}s(x,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,s(k,r.compareByOriginalPositions),this.__originalMappings=k},c.prototype._findMapping=function(e,t,n,r,i,a){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return o.search(e,t,i,a)},c.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositionsDeflated,r.getArg(e,"bias",l.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===t.generatedLine){var i=r.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=r.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=r.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:r.getArg(o,"originalLine",null),column:r.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},c.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var o,i=e;if(null!=this.sourceRoot&&(i=r.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=r.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",l.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:r.getArg(i,"generatedLine",null),column:r.getArg(i,"generatedColumn",null),lastColumn:r.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},d.prototype=Object.create(l.prototype),d.prototype.constructor=l,d.prototype._version=3,Object.defineProperty(d.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),d.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=o.search(t,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn})),i=this._sections[n];return i?i.consumer.originalPositionFor({line:t.generatedLine-(i.generatedOffset.generatedLine-1),column:t.generatedColumn-(i.generatedOffset.generatedLine===t.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},d.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},d.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},d.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(-1!==n.consumer._findSourceIndex(r.getArg(e,"source"))){var o=n.consumer.generatedPositionFor(e);if(o)return{line:o.line+(n.generatedOffset.generatedLine-1),column:o.column+(n.generatedOffset.generatedLine===o.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},d.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var o=this._sections[n],i=o.consumer._generatedMappings,a=0;a<i.length;a++){var l=i[a],c=o.consumer._sources.at(l.source);c=r.computeSourceURL(o.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var u=null;l.name&&(u=o.consumer._names.at(l.name),this._names.add(u),u=this._names.indexOf(u));var d={source:c,generatedLine:l.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(o.generatedOffset.generatedLine===l.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:u};this.__generatedMappings.push(d),"number"==typeof d.originalLine&&this.__originalMappings.push(d)}s(this.__generatedMappings,r.compareByGeneratedPositionsDeflated),s(this.__originalMappings,r.compareByOriginalPositions)}},34433:function(e,t,n){var r=n(16400),o=n(32728),i=n(78213).I,a=n(21188).H;function s(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new a,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e){var t=e.sourceRoot,n=new s({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=o.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var i=r;null!==t&&(i=o.relative(t,r)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(r);null!=a&&n.setSourceContent(r,a)})),n},s.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),n=o.getArg(e,"original",null),r=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},s.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var a=this._sourceRoot;null!=a&&(r=o.relative(a,r));var s=new i,l=new i;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=n&&(t.source=o.join(n,t.source)),null!=a&&(t.source=o.relative(a,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var c=t.source;null==c||s.has(c)||s.add(c);var u=t.name;null==u||l.has(u)||l.add(u)}),this),this._sources=s,this._names=l,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=o.join(n,t)),null!=a&&(t=o.relative(a,t)),this.setSourceContent(t,r))}),this)},s.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},s.prototype._serializeMappings=function(){for(var e,t,n,i,a=0,s=1,l=0,c=0,u=0,d=0,p="",f=this._mappings.toArray(),m=0,h=f.length;m<h;m++){if(e="",(t=f[m]).generatedLine!==s)for(a=0;t.generatedLine!==s;)e+=";",s++;else if(m>0){if(!o.compareByGeneratedPositionsInflated(t,f[m-1]))continue;e+=","}e+=r.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=r.encode(i-d),d=i,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-l),l=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-u),u=n)),p+=e}return p},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=s},17085:function(e,t,n){var r=n(34433).SourceMapGenerator,o=n(32728),i=/(\r?\n)/,a="$$$isSourceNode$$$";function s(e,t,n,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==o?null:o,this[a]=!0,null!=r&&this.add(r)}s.fromStringWithSourceMap=function(e,t,n){var r=new s,a=e.split(i),l=0,c=function(){return e()+(e()||"");function e(){return l<a.length?a[l++]:void 0}},u=1,d=0,p=null;return t.eachMapping((function(e){if(null!==p){if(!(u<e.generatedLine)){var t=(n=a[l]||"").substr(0,e.generatedColumn-d);return a[l]=n.substr(e.generatedColumn-d),d=e.generatedColumn,f(p,t),void(p=e)}f(p,c()),u++,d=0}for(;u<e.generatedLine;)r.add(c()),u++;if(d<e.generatedColumn){var n=a[l]||"";r.add(n.substr(0,e.generatedColumn)),a[l]=n.substr(e.generatedColumn),d=e.generatedColumn}p=e}),this),l<a.length&&(p&&f(p,c()),r.add(a.splice(l).join(""))),t.sources.forEach((function(e){var i=t.sourceContentFor(e);null!=i&&(null!=n&&(e=o.join(n,e)),r.setSourceContent(e,i))})),r;function f(e,t){if(null===e||void 0===e.source)r.add(t);else{var i=n?o.join(n,e.source):e.source;r.add(new s(e.originalLine,e.originalColumn,i,t,e.name))}}},s.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},s.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},s.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)(t=this.children[n])[a]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},s.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},s.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},s.prototype.setSourceContent=function(e,t){this.sourceContents[o.toSetString(e)]=t},s.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(t=0,n=r.length;t<n;t++)e(o.fromSetString(r[t]),this.sourceContents[r[t]])},s.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},s.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new r(e),o=!1,i=null,a=null,s=null,l=null;return this.walk((function(e,r){t.code+=e,null!==r.source&&null!==r.line&&null!==r.column?(i===r.source&&a===r.line&&s===r.column&&l===r.name||n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),i=r.source,a=r.line,s=r.column,l=r.name,o=!0):o&&(n.addMapping({generated:{line:t.line,column:t.column}}),i=null,o=!1);for(var c=0,u=e.length;c<u;c++)10===e.charCodeAt(c)?(t.line++,t.column=0,c+1===u?(i=null,o=!1):o&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name})):t.column++})),this.walkSourceContents((function(e,t){n.setSourceContent(e,t)})),{code:t.code,map:n}}},32728:function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function a(e){var n=e,r=o(e);if(r){if(!r.path)return e;n=r.path}for(var a,s=t.isAbsolute(n),l=n.split(/\/+/),c=0,u=l.length-1;u>=0;u--)"."===(a=l[u])?l.splice(u,1):".."===a?c++:c>0&&(""===a?(l.splice(u+1,c),c=0):(l.splice(u,2),c--));return""===(n=l.join("/"))&&(n=s?"/":"."),r?(r.path=n,i(r)):n}function s(e,t){""===e&&(e="."),""===t&&(t=".");var n=o(t),s=o(e);if(s&&(e=s.path||"/"),n&&!n.scheme)return s&&(n.scheme=s.scheme),i(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,i(s);var l="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=l,i(s)):l}t.urlParse=o,t.urlGenerate=i,t.normalize=a,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var l=!("__proto__"in Object.create(null));function c(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=l?c:function(e){return u(e)?"$"+e:e},t.fromSetString=l?c:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=d(e.source,t.source);return 0!==r||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:d(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!=(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=d(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||0!==(n=d(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=o(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var l=r.path.lastIndexOf("/");l>=0&&(r.path=r.path.substring(0,l+1))}t=s(i(r),t)}return a(t)}},49125:function(e,t,n){t.SourceMapGenerator=n(34433).SourceMapGenerator,t.SourceMapConsumer=n(76771).SourceMapConsumer,n(17085)},13692:function(e){var t=e.exports=function(e){return new n(e)};function n(e){this.value=e}function r(e,t,n){var r=[],a=[],u=!0;return function e(d){var p=n?o(d):d,f={},m=!0,h={node:p,node_:d,path:[].concat(r),parent:a[a.length-1],parents:a,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(m=!1)},delete:function(e){delete h.parent.node[h.key],e&&(m=!1)},remove:function(e){s(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(m=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){u=!1},block:function(){m=!1}};if(!u)return h;function g(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=i(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<a.length;e++)if(a[e].node_===d){h.circular=a[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}g();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),f.before&&f.before.call(h,h.node),m?("object"!=typeof h.node||null===h.node||h.circular||(a.push(h),g(),l(h.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(h,h.node[t],t);var i=e(h.node[t]);n&&c.call(h.node,t)&&(h.node[t]=i.node),i.isLast=o==h.keys.length-1,i.isFirst=0==o,f.post&&f.post.call(h,i),r.pop()})),a.pop()),f.after&&f.after.call(h,h.node),h):h}(e).node}function o(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===a(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return l(i(e),(function(n){t[n]=e[n]})),t}return e}n.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!c.call(t,r)){t=void 0;break}t=t[r]}return t},n.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!c.call(t,r))return!1;t=t[r]}return!0},n.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];c.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},n.prototype.map=function(e){return r(this.value,e,!0)},n.prototype.forEach=function(e){return this.value=r(this.value,e,!1),this.value},n.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},n.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},n.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},n.prototype.clone=function(){var e=[],t=[];return function n(r){for(var a=0;a<e.length;a++)if(e[a]===r)return t[a];if("object"==typeof r&&null!==r){var s=o(r);return e.push(r),t.push(s),l(i(r),(function(e){s[e]=n(r[e])})),e.pop(),t.pop(),s}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},l=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};l(i(n.prototype),(function(e){t[e]=function(t){var r=[].slice.call(arguments,1),o=new n(t);return o[e].apply(o,r)}}));var c=Object.hasOwnProperty||function(e,t){return t in e}},52511:function(e,t,n){var r;e=n.nmd(e),function(o){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof n.g&&n.g;i.global!==i&&i.window!==i&&i.self;var a,s=2147483647,l=36,c=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,m=String.fromCharCode;function h(e){throw RangeError(p[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function b(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function y(e){return g(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+m(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,n){var r=0;for(e=n?f(e/700):e>>1,e+=f(e/t);e>455;r+=l)e=f(e/35);return f(r+36*e/(e+38))}function x(e){var t,n,r,o,i,a,c,u,d,p,m,g=[],v=e.length,b=0,w=128,x=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&h("not-basic"),g.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<v;){for(i=b,a=1,c=l;o>=v&&h("invalid-input"),((u=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:l)>=l||u>f((s-b)/a))&&h("overflow"),b+=u*a,!(u<(d=c<=x?1:c>=x+26?26:c-x));c+=l)a>f(s/(p=l-d))&&h("overflow"),a*=p;x=k(b-i,t=g.length+1,0==i),f(b/t)>s-w&&h("overflow"),w+=f(b/t),b%=t,g.splice(b++,0,w)}return y(g)}function _(e){var t,n,r,o,i,a,c,u,d,p,g,v,y,x,_,E=[];for(v=(e=b(e)).length,t=128,n=0,i=72,a=0;a<v;++a)(g=e[a])<128&&E.push(m(g));for(r=o=E.length,o&&E.push("-");r<v;){for(c=s,a=0;a<v;++a)(g=e[a])>=t&&g<c&&(c=g);for(c-t>f((s-n)/(y=r+1))&&h("overflow"),n+=(c-t)*y,t=c,a=0;a<v;++a)if((g=e[a])<t&&++n>s&&h("overflow"),g==t){for(u=n,d=l;!(u<(p=d<=i?1:d>=i+26?26:d-i));d+=l)_=u-p,x=l-p,E.push(m(w(p+_%x,0))),u=f(_/x);E.push(m(w(u,0))),i=k(n,y,r==o),n=0,++r}++n,++t}return E.join("")}a={version:"1.3.2",ucs2:{decode:b,encode:y},decode:x,encode:_,toASCII:function(e){return v(e,(function(e){return u.test(e)?"xn--"+_(e):e}))},toUnicode:function(e){return v(e,(function(e){return c.test(e)?x(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},27225:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,o){n=n||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(n);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var u,d,p,f,m=e[c].replace(a,"%20"),h=m.indexOf(r);h>=0?(u=m.substr(0,h),d=m.substr(h+1)):(u=m,d=""),p=decodeURIComponent(u),f=decodeURIComponent(d),t(i,p)?Array.isArray(i[p])?i[p].push(f):i[p]=[i[p],f]:i[p]=f}return i}},44066:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,o){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var i=encodeURIComponent(t(o))+r;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(t(e))})).join(n):i+encodeURIComponent(t(e[o]))})).join(n):o?encodeURIComponent(t(o))+r+encodeURIComponent(t(e)):""}},36254:function(e,t,n){"use strict";t.decode=t.parse=n(27225),t.encode=t.stringify=n(44066)},8575:function(e,t,n){"use strict";var r=n(52511),o=n(62502);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){return o.isString(e)&&(e=y(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),p=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=n(36254);function y(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var y=e=c.join(s);if(y=y.trim(),!n&&1===e.split("#").length){var w=l.exec(y);if(w)return this.path=y,this.href=y,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var k=a.exec(y);if(k){var x=(k=k[0]).toLowerCase();this.protocol=x,y=y.substr(k.length)}if(n||k||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var _="//"===y.substr(0,2);!_||k&&g[k]||(y=y.substr(2),this.slashes=!0)}if(!g[k]&&(_||k&&!v[k])){for(var E,C,S=-1,I=0;I<p.length;I++)-1!==(T=y.indexOf(p[I]))&&(-1===S||T<S)&&(S=T);for(-1!==(C=-1===S?y.lastIndexOf("@"):y.lastIndexOf("@",S))&&(E=y.slice(0,C),y=y.slice(C+1),this.auth=decodeURIComponent(E)),S=-1,I=0;I<d.length;I++){var T;-1!==(T=y.indexOf(d[I]))&&(-1===S||T<S)&&(S=T)}-1===S&&(S=y.length),this.host=y.slice(0,S),y=y.slice(S),this.parseHost(),this.hostname=this.hostname||"";var N="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!N)for(var A=this.hostname.split(/\./),P=(I=0,A.length);I<P;I++){var R=A[I];if(R&&!R.match(f)){for(var L="",O=0,M=R.length;O<M;O++)R.charCodeAt(O)>127?L+="x":L+=R[O];if(!L.match(f)){var D=A.slice(0,I),B=A.slice(I+1),F=R.match(m);F&&(D.push(F[1]),B.unshift(F[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=r.toASCII(this.hostname));var j=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+j,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!h[x])for(I=0,P=u.length;I<P;I++){var H=u[I];if(-1!==y.indexOf(H)){var V=encodeURIComponent(H);V===H&&(V=escape(H)),y=y.split(H).join(V)}}var W=y.indexOf("#");-1!==W&&(this.hash=y.substr(W),y=y.slice(0,W));var Z=y.indexOf("?");if(-1!==Z?(this.search=y.substr(Z),this.query=y.substr(Z+1),t&&(this.query=b.parse(this.query)),y=y.slice(0,Z)):t&&(this.search="",this.query={}),y&&(this.pathname=y),v[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var U=this.search||"";this.path=j+U}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=b.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var d=Object.keys(e),p=0;p<d.length;p++){var f=d[p];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var m=(e.pathname||"").split("/");m.length&&!(e.host=m.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==m[0]&&m.unshift(""),m.length<2&&m.unshift(""),n.pathname=m.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var h=n.pathname||"",b=n.search||"";n.path=h+b}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),k=w||y||n.host&&e.pathname,x=k,_=n.pathname&&n.pathname.split("/")||[],E=(m=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===_[0]?_[0]=n.host:_.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===m[0]?m[0]=e.host:m.unshift(e.host)),e.host=null),k=k&&(""===m[0]||""===_[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,_=m;else if(m.length)_||(_=[]),_.pop(),_=_.concat(m),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search))return E&&(n.hostname=n.host=_.shift(),(N=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=N.shift(),n.host=n.hostname=N.shift())),n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!_.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=_.slice(-1)[0],S=(n.host||e.host||_.length>1)&&("."===C||".."===C)||""===C,I=0,T=_.length;T>=0;T--)"."===(C=_[T])?_.splice(T,1):".."===C?(_.splice(T,1),I++):I&&(_.splice(T,1),I--);if(!k&&!x)for(;I--;I)_.unshift("..");!k||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),S&&"/"!==_.join("/").substr(-1)&&_.push("");var N,A=""===_[0]||_[0]&&"/"===_[0].charAt(0);return E&&(n.hostname=n.host=A?"":_.length?_.shift():"",(N=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=N.shift(),n.host=n.hostname=N.shift())),(k=k||n.host&&_.length)&&!A&&_.unshift(""),_.length?n.pathname=_.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},62502:function(e){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},65311:function(e){"use strict";e.exports=jQuery},91343:function(){}},function(e){e.O(0,[351],(function(){return 31235,e(e.s=31235)})),e.O()}]);