OwlCyberSecurity - MANAGER
Edit File: extendify-help-center-47f154c590f38f5ce8da.js
(()=>{var e,t,n={960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},915:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(960),a=n(790);o(n(790),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},790:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=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},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(960),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),E(this,e)},e}();t.Node=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=a.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=d;var h=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=h;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(h);t.CDATA=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(h);t.Document=m;var f=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(h);function g(e){return(0,a.isTag)(e)}function y(e){return e.type===a.ElementType.CDATA}function v(e){return e.type===a.ElementType.Text}function x(e){return e.type===a.ElementType.Comment}function w(e){return e.type===a.ElementType.Directive}function b(e){return e.type===a.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new c(e.data);else if(x(e))n=new u(e.data);else if(g(e)){var r=t?S(e.children):[],o=new f(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(y(e)){r=t?S(e.children):[];var a=new p(r);r.forEach((function(e){return e.parent=a})),n=a}else if(b(e)){r=t?S(e.children):[];var s=new m(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function S(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=f,t.isTag=g,t.isCDATA=y,t.isText=v,t.isComment=x,t.isDirective=w,t.isDocument=b,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=E},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,a=/<head[^]*>/i,s=/<body[^]*>/i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var h=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=h.documentElement.querySelector(t);return n&&(n.innerHTML=e),h}return h.documentElement.innerHTML=e,h}}var p,m="object"==typeof document&&document.createElement("template");m&&m.content&&(p=function(e){return m.innerHTML=e,m.content.childNodes}),t.default=function(e){var t,u,d=e.match(i),h=d&&d[1]?d[1].toLowerCase():"";switch(h){case n:var m=c(e);return a.test(e)||null===(t=null==(g=m.querySelector(r))?void 0:g.parentNode)||void 0===t||t.removeChild(g),s.test(e)||null===(u=null==(g=m.querySelector(o))?void 0:g.parentNode)||void 0===u||u.removeChild(g),m.querySelectorAll(n);case r:case o:var f=l(e).querySelectorAll(h);return s.test(e)&&a.test(e)?f[0].parentNode.childNodes:f;default:return p?p(e):(g=l(e,o).querySelector(o)).childNodes;var g}}},152:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(276)),i=n(507),a=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(a),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)}},507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var r=n(915),o=n(885);function i(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function a(e){return function(e){return o.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var s,l=[],c=0,u=t.length;c<u;c++){var d=t[c];switch(d.nodeType){case 1:var h=a(d.nodeName);(s=new r.Element(h,i(d.attributes))).children=e("template"===h?d.content.childNodes:d.childNodes,s);break;case 3:s=new r.Text(d.nodeValue);break;case 8:s=new r.Comment(d.nodeValue);break;default:continue}var p=l[c-1]||null;p&&(p.next=s),s.parent=n,s.prev=p,s.next=null,l.push(s)}return o&&((s=new r.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=l[0]||null,s.parent=n,l.unshift(s),l[1]&&(l[1].prev=l[0])),l}},484:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(726),o=n(606),i=["checked","value"],a=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var h=u.toLowerCase(),p=l(h);if(p){var m=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&a.includes(t)&&!c&&(p=l("default"+h)),n[p]=d,m&&m.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n}},670:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(196),i=r(n(484)),a=n(606),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function l(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,a.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||a.returnFirstArg,u=n.library||s,d=u.cloneElement,h=u.createElement,p=u.isValidElement,m=t.length,f=0;f<m;f++){var g=t[f];if(o){var y=n.replace(g,f);if(p(y)){m>1&&(y=d(y,{key:y.key||f})),r.push(c(y,g,f));continue}}if("text"!==g.type){var v=g,x={};l(v)?((0,a.setStyleProp)(v.attribs.style,v.attribs),x=v.attribs):v.attribs&&(x=(0,i.default)(v.attribs,v.name));var w=void 0;switch(g.type){case"script":case"style":g.children[0]&&(x.dangerouslySetInnerHTML={__html:g.children[0].data});break;case"tag":"textarea"===g.name&&g.children[0]?x.defaultValue=g.children[0].data:g.children&&g.children.length&&(w=e(g.children,n));break;default:continue}m>1&&(x.key=f),r.push(c(h(g.name,x,w),g,f))}else{var b=!g.data.trim().length;if(b&&g.parent&&!(0,a.canTextBeChildOfNode)(g.parent))continue;if(n.trim&&b)continue;r.push(c(g.data,g,f))}}return 1===r.length?r[0]:r}},426:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var o=r(n(152));t.htmlToDOM=o.default;var i=r(n(484));t.attributesToProps=i.default;var a=r(n(670));t.domToReact=a.default;var s=n(915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,a.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},606:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var o=n(196),i=r(n(476)),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!a.has(e):Boolean(t&&"string"==typeof t.is)};var s={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},370:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");h=~r?e.length-r:h+e.length}function m(){var e={line:d,column:h};return function(t){return t.position=new f(e),x(),t}}function f(e){this.start=e,this.end={line:d,column:h},this.source=l.source}f.prototype.content=e;var g=[];function y(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n;g.push(n)}function v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function x(){v(r)}function w(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var r=e.slice(2,n-2);return h+=2,p(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function E(){var e=m(),n=v(o);if(n){if(b(),!v(i))return y("property missing ':'");var r=v(a),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(s),l}}return x(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},726:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,a=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},476:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(174)),o=n(678);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,l):e.replace(i,l)).replace(r,s))}},174:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(370));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},250:(e,t,n)=>{"use strict";var r=n(196),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),a((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},139:(e,t,n)=>{"use strict";var r=n(196),o=n(688),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=c((function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==o&&h.hasValue){var t=h.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(a=e,s=n)}var a,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var p=a(e,d[0],d[1]);return l((function(){h.hasValue=!0,h.value=p}),[p]),u(p),p}},688:(e,t,n)=>{"use strict";e.exports=n(250)},798:(e,t,n)=>{"use strict";e.exports=n(139)},196:e=>{"use strict";e.exports=window.React},967:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=o(196),t=o.t(e,2);const n=window.wp.domReady;var r=o.n(n);const i=window.wp.element,a="undefined"!=typeof document,s=a?e.useLayoutEffect:e.useEffect;function l(){const t=(0,e.useRef)(!1);return s((()=>(t.current=!0,()=>{t.current=!1})),[]),t}const c=e=>e;class u{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const d=["prepare","read","update","preRender","render","postRender"],{schedule:h,cancel:p,state:m,steps:f}=function(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=d.reduce(((e,t)=>(e[t]=function(e){let t=new u,n=new u,r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:n;return i&&a.add(e),c.add(e)&&l&&o&&(r=t.order.length),e},cancel:e=>{n.remove(e),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let n=0;n<r;n++){const r=t.order[n];r(l),a.has(r)&&(s.schedule(r),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((()=>n=!0)),e)),{}),a=e=>i[e].process(o),s=()=>{const t=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(t-o.timestamp,40),1),o.timestamp=t,o.isProcessing=!0,d.forEach(a),o.isProcessing=!1,n&&(r=!1,e(s))};return{schedule:d.reduce(((t,a)=>{const l=i[a];return t[a]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(s)),l.schedule(t,i,a)),t}),{}),cancel:e=>d.forEach((t=>i[t].cancel(e))),state:o,steps:i}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c),g=(0,e.createContext)(null);function y(t){const n=(0,e.useRef)(null);return null===n.current&&(n.current=t()),n.current}class v extends e.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function x({children:t,isPresent:n}){const r=(0,e.useId)(),o=(0,e.useRef)(null),i=(0,e.useRef)({width:0,height:0,top:0,left:0});return(0,e.useInsertionEffect)((()=>{const{width:e,height:t,top:a,left:s}=i.current;if(n||!o.current||!e||!t)return;o.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n top: ${a}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[n]),e.createElement(v,{isPresent:n,childRef:o,sizeRef:i},e.cloneElement(t,{ref:o}))}const w=({children:t,initial:n,isPresent:r,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:s})=>{const l=y(b),c=(0,e.useId)(),u=(0,e.useMemo)((()=>({id:c,initial:n,isPresent:r,custom:i,onExitComplete:e=>{l.set(e,!0);for(const e of l.values())if(!e)return;o&&o()},register:e=>(l.set(e,!1),()=>l.delete(e))})),a?void 0:[r]);return(0,e.useMemo)((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[r]),e.useEffect((()=>{!r&&!l.size&&o&&o()}),[r]),"popLayout"===s&&(t=e.createElement(x,{isPresent:r},t)),e.createElement(g.Provider,{value:u},t)};function b(){return new Map}const E=(0,e.createContext)({});let S=c,T=c;const C=e=>e.key||"",P=({children:t,custom:n,initial:r=!0,onExitComplete:o,exitBeforeEnter:i,presenceAffectsLayout:a=!0,mode:c="sync"})=>{T(!i,"Replace exitBeforeEnter with mode='wait'");const u=(0,e.useContext)(E).forceRender||function(){const t=l(),[n,r]=(0,e.useState)(0),o=(0,e.useCallback)((()=>{t.current&&r(n+1)}),[n]);return[(0,e.useCallback)((()=>h.postRender(o)),[o]),n]}()[0],d=l(),p=function(t){const n=[];return e.Children.forEach(t,(t=>{(0,e.isValidElement)(t)&&n.push(t)})),n}(t);let m=p;const f=(0,e.useRef)(new Map).current,g=(0,e.useRef)(m),y=(0,e.useRef)(new Map).current,v=(0,e.useRef)(!0);var x;if(s((()=>{v.current=!1,function(e,t){e.forEach((e=>{const n=C(e);t.set(n,e)}))}(p,y),g.current=m})),x=()=>{v.current=!0,y.clear(),f.clear()},(0,e.useEffect)((()=>()=>x()),[]),v.current)return e.createElement(e.Fragment,null,m.map((t=>e.createElement(w,{key:C(t),isPresent:!0,initial:!!r&&void 0,presenceAffectsLayout:a,mode:c},t))));m=[...m];const b=g.current.map(C),S=p.map(C),P=b.length;for(let e=0;e<P;e++){const t=b[e];-1!==S.indexOf(t)||f.has(t)||f.set(t,void 0)}return"wait"===c&&f.size&&(m=[]),f.forEach(((t,r)=>{if(-1!==S.indexOf(r))return;const i=y.get(r);if(!i)return;const s=b.indexOf(r);let l=t;if(!l){const t=()=>{y.delete(r),f.delete(r);const e=g.current.findIndex((e=>e.key===r));if(g.current.splice(e,1),!f.size){if(g.current=p,!1===d.current)return;u(),o&&o()}};l=e.createElement(w,{key:C(i),isPresent:!1,onExitComplete:t,custom:n,presenceAffectsLayout:a,mode:c},i),f.set(r,l)}m.splice(s,0,l)})),m=m.map((t=>{const n=t.key;return f.has(n)?t:e.createElement(w,{key:C(t),isPresent:!0,presenceAffectsLayout:a,mode:c},t)})),e.createElement(e.Fragment,null,f.size?m:m.map((t=>(0,e.cloneElement)(t))))},k=window.wp.i18n;function _(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function A(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return _((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=A();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}var L=Object.defineProperty,M=(e,t,n)=>(((e,t,n)=>{t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let D=new class{constructor(){M(this,"current",this.detect()),M(this,"handoffState","pending"),M(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},N=(t,n)=>{D.isServer?(0,e.useEffect)(t,n):(0,e.useLayoutEffect)(t,n)};function O(t){let n=(0,e.useRef)(t);return N((()=>{n.current=t}),[t]),n}let R=function(t){let n=O(t);return e.useCallback(((...e)=>n.current(...e)),[n])};function V(t,n,r,o){let i=O(r);(0,e.useEffect)((()=>{function e(e){i.current(e)}return(t=null!=t?t:window).addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}),[t,n,o])}function I(){let t=(0,e.useRef)(!1);return N((()=>(t.current=!0,()=>{t.current=!1})),[]),t}function F(t){let n=R(t),r=(0,e.useRef)(!1);(0,e.useEffect)((()=>(r.current=!1,()=>{r.current=!0,_((()=>{r.current&&n()}))})),[n])}function j(e){return D.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function B(...t){return(0,e.useMemo)((()=>j(...t)),[...t])}function H(){let n=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in t&&t.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[r,o]=e.useState(D.isHandoffComplete);return r&&!1===D.isHandoffComplete&&o(!1),e.useEffect((()=>{!0!==r&&o(!0)}),[r]),e.useEffect((()=>D.handoff()),[]),!n&&r}let z=Symbol();function U(...t){let n=(0,e.useRef)(t);(0,e.useEffect)((()=>{n.current=t}),[t]);let r=R((e=>{for(let t of n.current)null!=t&&("function"==typeof t?t(e):t.current=e)}));return t.every((e=>null==e||(null==e?void 0:e[z])))?void 0:r}function q(t,n,r){let o=O(n);(0,e.useEffect)((()=>{function e(e){o.current(e)}return window.addEventListener(t,e,r),()=>window.removeEventListener(t,e,r)}),[t,r])}var $=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))($||{});function W(t,n){let r=(0,e.useRef)([]),o=R(t);(0,e.useEffect)((()=>{let e=[...r.current];for(let[t,i]of n.entries())if(r.current[t]!==i){let t=o(n,e);return r.current=n,t}}),[o,...n])}function G(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function Y(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Y),r}var X=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(X||{}),Z=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Z||{});function K({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a,mergeRefs:s}){s=null!=s?s:Q;let l=ee(t,e);if(i)return J(l,n,r,a,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=l;if(e)return J(t,n,r,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return Y(e?0:1,{0:()=>null,1:()=>J({...t,hidden:!0,style:{display:"none"}},n,r,a,s)})}return J(l,n,r,a,s)}function J(t,n={},r,o,i){let{as:a=r,children:s,refName:l="ref",...c}=re(t,["unmount","static"]),u=void 0!==t.ref?{[l]:t.ref}:{},d="function"==typeof s?s(n):s;"className"in c&&c.className&&"function"==typeof c.className&&(c.className=c.className(n));let h={};if(n){let e=!1,t=[];for(let[r,o]of Object.entries(n))"boolean"==typeof o&&(e=!0),!0===o&&t.push(r);e&&(h["data-headlessui-state"]=t.join(" "))}if(a===e.Fragment&&Object.keys(ne(c)).length>0){if(!(0,e.isValidElement)(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(c).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let t=d.props,n="function"==typeof(null==t?void 0:t.className)?(...e)=>G(null==t?void 0:t.className(...e),c.className):G(null==t?void 0:t.className,c.className),r=n?{className:n}:{};return(0,e.cloneElement)(d,Object.assign({},ee(d.props,ne(re(c,["ref"]))),h,u,{ref:i(d.ref,u.ref)},r))}return(0,e.createElement)(a,Object.assign({},re(c,["ref"]),a!==e.Fragment&&u,a!==e.Fragment&&h),d)}function Q(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function ee(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function te(t){var n;return Object.assign((0,e.forwardRef)(t),{displayName:null!=(n=t.displayName)?n:t.name})}function ne(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function re(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}var oe=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(oe||{});let ie=te((function(e,t){var n;let{features:r=1,...o}=e;return K({ourProps:{ref:t,"aria-hidden":2==(2&r)||(null!=(n=o["aria-hidden"])?n:void 0),style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&r)&&2!=(2&r)&&{display:"none"}}},theirProps:o,slot:{},defaultTag:"div",name:"Hidden"})})),ae=[];!function(e){function t(){"loading"!==document.readyState&&((()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&ae[0]!==e.target&&(ae.unshift(e.target),ae=ae.filter((e=>null!=e&&e.isConnected)),ae.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})})(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}();let se=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var le,ce,ue=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(ue||{}),de=((ce=de||{})[ce.Error=0]="Error",ce[ce.Overflow=1]="Overflow",ce[ce.Success=2]="Success",ce[ce.Underflow=3]="Underflow",ce),he=((le=he||{})[le.Previous=-1]="Previous",le[le.Next=1]="Next",le);var pe=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(pe||{});var me=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(me||{});function fe(e){null==e||e.focus({preventScroll:!0})}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let ge=["textarea","input"].join(",");function ye(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?function(e,t=(e=>e)){return e.slice().sort(((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(e):e:function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(se)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e);o.length>0&&a.length>1&&(a=a.filter((e=>!o.includes(e)))),r=null!=r?r:i.activeElement;let s,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,a.indexOf(r))-1;if(4&t)return Math.max(0,a.indexOf(r))+1;if(8&t)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,h=a.length;do{if(d>=h||d+h<=0)return 0;let e=c+d;if(16&t)e=(e+h)%h;else{if(e<0)return 3;if(e>=h)return 1}s=a[e],null==s||s.focus(u),d+=l}while(s!==i.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,ge))&&n}(s)&&s.select(),2}function ve(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}var xe=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(xe||{});let we=te((function(t,n){let r=(0,e.useRef)(null),o=U(r,n),{initialFocus:i,containers:a,features:s=30,...l}=t;H()||(s=1);let c=B(r);Ee({ownerDocument:c},Boolean(16&s));let u=function({ownerDocument:t,container:n,initialFocus:r},o){let i=(0,e.useRef)(null),a=I();return W((()=>{if(!o)return;let e=n.current;e&&_((()=>{if(!a.current)return;let n=null==t?void 0:t.activeElement;if(null!=r&&r.current){if((null==r?void 0:r.current)===n)return void(i.current=n)}else if(e.contains(n))return void(i.current=n);null!=r&&r.current?fe(r.current):ye(e,ue.First)===de.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=null==t?void 0:t.activeElement}))}),[o]),i}({ownerDocument:c,container:r,initialFocus:i},Boolean(2&s));!function({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=I();V(null==e?void 0:e.defaultView,"focus",(e=>{if(!o||!i.current)return;let a=ve(n);t.current instanceof HTMLElement&&a.add(t.current);let s=r.current;if(!s)return;let l=e.target;l&&l instanceof HTMLElement?Se(a,l)?(r.current=l,fe(l)):(e.preventDefault(),e.stopPropagation(),fe(s)):fe(r.current)}),!0)}({ownerDocument:c,container:r,containers:a,previousActiveElement:u},Boolean(8&s));let d=function(){let t=(0,e.useRef)(0);return q("keydown",(e=>{"Tab"===e.key&&(t.current=e.shiftKey?1:0)}),!0),t}(),h=R((e=>{let t=r.current;t&&Y(d.current,{[$.Forwards]:()=>{ye(t,ue.First,{skipElements:[e.relatedTarget]})},[$.Backwards]:()=>{ye(t,ue.Last,{skipElements:[e.relatedTarget]})}})})),p=function(){let[t]=(0,e.useState)(A);return(0,e.useEffect)((()=>()=>t.dispose()),[t]),t}(),m=(0,e.useRef)(!1),f={ref:o,onKeyDown(e){"Tab"==e.key&&(m.current=!0,p.requestAnimationFrame((()=>{m.current=!1})))},onBlur(e){let t=ve(a);r.current instanceof HTMLElement&&t.add(r.current);let n=e.relatedTarget;n instanceof HTMLElement&&"true"!==n.dataset.headlessuiFocusGuard&&(Se(t,n)||(m.current?ye(r.current,Y(d.current,{[$.Forwards]:()=>ue.Next,[$.Backwards]:()=>ue.Previous})|ue.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&fe(e.target)))}};return e.createElement(e.Fragment,null,Boolean(4&s)&&e.createElement(ie,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:oe.Focusable}),K({ourProps:f,theirProps:l,defaultTag:"div",name:"FocusTrap"}),Boolean(4&s)&&e.createElement(ie,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:oe.Focusable}))})),be=Object.assign(we,{features:xe});function Ee({ownerDocument:t},n){let r=function(t=!0){let n=(0,e.useRef)(ae.slice());return W((([e],[t])=>{!0===t&&!1===e&&_((()=>{n.current.splice(0)})),!1===t&&!0===e&&(n.current=ae.slice())}),[t,ae,n]),R((()=>{var e;return null!=(e=n.current.find((e=>null!=e&&e.isConnected)))?e:null}))}(n);W((()=>{n||(null==t?void 0:t.activeElement)===(null==t?void 0:t.body)&&fe(r())}),[n]),F((()=>{n&&fe(r())}))}function Se(e,t){for(let n of e)if(n.contains(t))return!0;return!1}const Te=window.ReactDOM;let Ce=(0,e.createContext)(!1);function Pe(){return(0,e.useContext)(Ce)}function ke(t){return e.createElement(Ce.Provider,{value:t.force},t.children)}let _e=e.Fragment,Ae=e.Fragment,Le=(0,e.createContext)(null),Me=(0,e.createContext)(null),De=te((function(t,n){let r=t,o=(0,e.useRef)(null),i=U(function(e,t=!0){return Object.assign(e,{[z]:t})}((e=>{o.current=e})),n),a=B(o),s=function(t){let n=Pe(),r=(0,e.useContext)(Le),o=B(t),[i,a]=(0,e.useState)((()=>{if(!n&&null!==r||D.isServer)return null;let e=null==o?void 0:o.getElementById("headlessui-portal-root");if(e)return e;if(null===o)return null;let t=o.createElement("div");return t.setAttribute("id","headlessui-portal-root"),o.body.appendChild(t)}));return(0,e.useEffect)((()=>{null!==i&&(null!=o&&o.body.contains(i)||null==o||o.body.appendChild(i))}),[i,o]),(0,e.useEffect)((()=>{n||null!==r&&a(r.current)}),[r,a,n]),i}(o),[l]=(0,e.useState)((()=>{var e;return D.isServer?null:null!=(e=null==a?void 0:a.createElement("div"))?e:null})),c=(0,e.useContext)(Me),u=H();return N((()=>{!s||!l||s.contains(l)||(l.setAttribute("data-headlessui-portal",""),s.appendChild(l))}),[s,l]),N((()=>{if(l&&c)return c.register(l)}),[c,l]),F((()=>{var e;!s||!l||(l instanceof Node&&s.contains(l)&&s.removeChild(l),s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s)))})),u&&s&&l?(0,Te.createPortal)(K({ourProps:{ref:i},theirProps:r,defaultTag:_e,name:"Portal"}),l):null})),Ne=te((function(t,n){let{target:r,...o}=t,i={ref:U(n)};return e.createElement(Le.Provider,{value:r},K({ourProps:i,theirProps:o,defaultTag:Ae,name:"Popover.Group"}))})),Oe=Object.assign(De,{Group:Ne});const Re="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},{useState:Ve,useEffect:Ie,useLayoutEffect:Fe,useDebugValue:je}=t;function Be(e){const t=e.getSnapshot,n=e.value;try{const e=t();return!Re(n,e)}catch{return!0}}const He="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t,n){return t()}:function(e,t,n){const r=t(),[{inst:o},i]=Ve({inst:{value:r,getSnapshot:t}});return Fe((()=>{o.value=r,o.getSnapshot=t,Be(o)&&i({inst:o})}),[e,r,t]),Ie((()=>(Be(o)&&i({inst:o}),e((()=>{Be(o)&&i({inst:o})})))),[e]),je(r),r},ze="useSyncExternalStore"in t?(e=>e.useSyncExternalStore)(t):He;function Ue(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=(null!=(n=t.defaultView)?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function qe(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function $e(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let We=function(e,t){let n=new Map,r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let i=t[e].call(n,...o);i&&(n=i,r.forEach((e=>e())))}}}(0,{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:A(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:$e(n)},o=[qe()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=A();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),a=e.querySelector(o);a&&!r(a)&&(i=a)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)}))}))}}:{},Ue(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach((({before:e})=>null==e?void 0:e(r))),o.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Ge(e,t,n){let r=function(e){return ze(e.subscribe,e.getSnapshot,e.getSnapshot)}(We),o=e?r.get(e):void 0,i=!!o&&o.count>0;return N((()=>{if(e&&t)return We.dispatch("PUSH",e,n),()=>We.dispatch("POP",e,n)}),[t,e]),i}var Ye;We.subscribe((()=>{let e=We.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&We.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&We.dispatch("TEARDOWN",n)}}));let Xe=null!=(Ye=e.useId)?Ye:function(){let t=H(),[n,r]=e.useState(t?()=>D.nextId():null);return N((()=>{null===n&&r(D.nextId())}),[n]),null!=n?""+n:void 0},Ze=new Map,Ke=new Map;function Je(e,t=!0){N((()=>{var n;if(!t)return;let r="function"==typeof e?e():e.current;if(!r)return;let o=null!=(n=Ke.get(r))?n:0;return Ke.set(r,o+1),0!==o||(Ze.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),function(){var e;if(!r)return;let t=null!=(e=Ke.get(r))?e:1;if(1===t?Ke.delete(r):Ke.set(r,t-1),1!==t)return;let n=Ze.get(r);n&&(null===n["aria-hidden"]?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,Ze.delete(r))}}),[e,t])}function Qe(t,n,r){let o=O(n);(0,e.useEffect)((()=>{function e(e){o.current(e)}return document.addEventListener(t,e,r),()=>document.removeEventListener(t,e,r)}),[t,r])}function et(t,n,r=!0){let o=(0,e.useRef)(!1);function i(e,r){if(!o.current||e.defaultPrevented)return;let i=r(e);if(null===i||!i.getRootNode().contains(i)||!i.isConnected)return;let a=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a){if(null===t)continue;let n=t instanceof HTMLElement?t:t.current;if(null!=n&&n.contains(i)||e.composed&&e.composedPath().includes(n))return}return!function(e,t=0){var n;return e!==(null==(n=j(e))?void 0:n.body)&&Y(t,{0:()=>e.matches(se),1(){let t=e;for(;null!==t;){if(t.matches(se))return!0;t=t.parentElement}return!1}})}(i,pe.Loose)&&-1!==i.tabIndex&&e.preventDefault(),n(e,i)}(0,e.useEffect)((()=>{requestAnimationFrame((()=>{o.current=r}))}),[r]);let a=(0,e.useRef)(null);Qe("pointerdown",(e=>{var t,n;o.current&&(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),Qe("mousedown",(e=>{var t,n;o.current&&(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),Qe("click",(e=>{qe()||/Android/gi.test(window.navigator.userAgent)||a.current&&(i(e,(()=>a.current)),a.current=null)}),!0),Qe("touchend",(e=>i(e,(()=>e.target instanceof HTMLElement?e.target:null))),!0),q("blur",(e=>i(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}let tt=(0,e.createContext)(null);tt.displayName="OpenClosedContext";var nt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(nt||{});let rt=(0,e.createContext)((()=>{}));rt.displayName="StackContext";var ot=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(ot||{});function it({children:t,onUpdate:n,type:r,element:o,enabled:i}){let a=(0,e.useContext)(rt),s=R(((...e)=>{null==n||n(...e),a(...e)}));return N((()=>{let e=void 0===i||!0===i;return e&&s(0,r,o),()=>{e&&s(1,r,o)}}),[s,r,o,i]),e.createElement(rt.Provider,{value:s},t)}let at=(0,e.createContext)(null);function st(){let t=(0,e.useContext)(at);if(null===t){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,st),e}return t}let lt=te((function(e,t){let n=Xe(),{id:r=`headlessui-description-${n}`,...o}=e,i=st(),a=U(t);return N((()=>i.register(r)),[r,i.register]),K({ourProps:{ref:a,...i.props,id:r},theirProps:o,slot:i.slot||{},defaultTag:"p",name:i.name||"Description"})})),ct=Object.assign(lt,{});var ut=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ut||{}),dt=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(dt||{}),ht=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ht||{});let pt={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},mt=(0,e.createContext)(null);function ft(t){let n=(0,e.useContext)(mt);if(null===n){let e=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,ft),e}return n}function gt(e,t){return Y(t.type,pt,e,t)}mt.displayName="DialogContext";let yt=X.RenderStrategy|X.Static,vt=te((function(t,n){let r=Xe(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:a,initialFocus:s,role:l="dialog",__demoMode:c=!1,...u}=t,[d,h]=(0,e.useState)(0),p=(0,e.useRef)(!1);l="dialog"===l||"alertdialog"===l?l:(p.current||(p.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog");let m=(0,e.useContext)(tt);void 0===i&&null!==m&&(i=(m&nt.Open)===nt.Open);let f=(0,e.useRef)(null),g=U(f,n),y=B(f),v=t.hasOwnProperty("open")||null!==m,x=t.hasOwnProperty("onClose");if(!v&&!x)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!v)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!x)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof i)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if("function"!=typeof a)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${a}`);let w=i?0:1,[b,E]=(0,e.useReducer)(gt,{titleId:null,descriptionId:null,panelRef:(0,e.createRef)()}),S=R((()=>a(!1))),T=R((e=>E({type:0,id:e}))),C=!!H()&&!c&&0===w,P=d>1,k=null!==(0,e.useContext)(mt),[_,A]=function(){let t=(0,e.useContext)(Me),n=(0,e.useRef)([]),r=R((e=>(n.current.push(e),t&&t.register(e),()=>o(e)))),o=R((e=>{let r=n.current.indexOf(e);-1!==r&&n.current.splice(r,1),t&&t.unregister(e)})),i=(0,e.useMemo)((()=>({register:r,unregister:o,portals:n})),[r,o,n]);return[n,(0,e.useMemo)((()=>function({children:t}){return e.createElement(Me.Provider,{value:i},t)}),[i])]}(),L={get current(){var e;return null!=(e=b.panelRef.current)?e:f.current}},{resolveContainers:M,mainTreeNodeRef:D,MainTreeNode:N}=function({defaultContainers:t=[],portals:n,mainTreeNodeRef:r}={}){var o;let i=(0,e.useRef)(null!=(o=null==r?void 0:r.current)?o:null),a=B(i),s=R((()=>{var e,r,o;let s=[];for(let e of t)null!==e&&(e instanceof HTMLElement?s.push(e):"current"in e&&e.current instanceof HTMLElement&&s.push(e.current));if(null!=n&&n.current)for(let e of n.current)s.push(e);for(let t of null!=(e=null==a?void 0:a.querySelectorAll("html > *, body > *"))?e:[])t!==document.body&&t!==document.head&&t instanceof HTMLElement&&"headlessui-portal-root"!==t.id&&(t.contains(i.current)||t.contains(null==(o=null==(r=i.current)?void 0:r.getRootNode())?void 0:o.host)||s.some((e=>t.contains(e)))||s.push(t));return s}));return{resolveContainers:s,contains:R((e=>s().some((t=>t.contains(e))))),mainTreeNodeRef:i,MainTreeNode:(0,e.useMemo)((()=>function(){return null!=r?null:e.createElement(ie,{features:oe.Hidden,ref:i})}),[i,r])}}({portals:_,defaultContainers:[L]}),O=P?"parent":"leaf",I=null!==m&&(m&nt.Closing)===nt.Closing,F=!k&&!I&&C,j=(0,e.useCallback)((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==y?void 0:y.querySelectorAll("body > *"))?e:[]).find((e=>"headlessui-portal-root"!==e.id&&e.contains(D.current)&&e instanceof HTMLElement)))?t:null}),[D]);Je(j,F);let z=!!P||C,q=(0,e.useCallback)((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==y?void 0:y.querySelectorAll("[data-headlessui-portal]"))?e:[]).find((e=>e.contains(D.current)&&e instanceof HTMLElement)))?t:null}),[D]);Je(q,z),et(M,S,!(!C||P));let $=!(P||0!==w);V(null==y?void 0:y.defaultView,"keydown",(e=>{$&&(e.defaultPrevented||e.key===ut.Escape&&(e.preventDefault(),e.stopPropagation(),S()))})),function(e,t,n=(()=>[document.body])){Ge(e,t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}(y,!(I||0!==w||k),M),(0,e.useEffect)((()=>{if(0!==w||!f.current)return;let e=new ResizeObserver((e=>{for(let t of e){let e=t.target.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&S()}}));return e.observe(f.current),()=>e.disconnect()}),[w,f,S]);let[W,G]=function(){let[t,n]=(0,e.useState)([]);return[t.length>0?t.join(" "):void 0,(0,e.useMemo)((()=>function(t){let r=R((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),o=(0,e.useMemo)((()=>({register:r,slot:t.slot,name:t.name,props:t.props})),[r,t.slot,t.name,t.props]);return e.createElement(at.Provider,{value:o},t.children)}),[n])]}(),X=(0,e.useMemo)((()=>[{dialogState:w,close:S,setTitleId:T},b]),[w,b,S,T]),Z=(0,e.useMemo)((()=>({open:0===w})),[w]),J={ref:g,id:o,role:l,"aria-modal":0===w||void 0,"aria-labelledby":b.titleId,"aria-describedby":W};return e.createElement(it,{type:"Dialog",enabled:0===w,element:f,onUpdate:R(((e,t)=>{"Dialog"===t&&Y(e,{[ot.Add]:()=>h((e=>e+1)),[ot.Remove]:()=>h((e=>e-1))})}))},e.createElement(ke,{force:!0},e.createElement(Oe,null,e.createElement(mt.Provider,{value:X},e.createElement(Oe.Group,{target:f},e.createElement(ke,{force:!1},e.createElement(G,{slot:Z,name:"Dialog.Description"},e.createElement(be,{initialFocus:s,containers:M,features:C?Y(O,{parent:be.features.RestoreFocus,leaf:be.features.All&~be.features.FocusLock}):be.features.None},e.createElement(A,null,K({ourProps:J,theirProps:u,slot:Z,defaultTag:"div",features:yt,visible:0===w,name:"Dialog"}))))))))),e.createElement(N,null))})),xt=te((function(t,n){let r=Xe(),{id:o=`headlessui-dialog-backdrop-${r}`,...i}=t,[{dialogState:a},s]=ft("Dialog.Backdrop"),l=U(n);(0,e.useEffect)((()=>{if(null===s.panelRef.current)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")}),[s.panelRef]);let c=(0,e.useMemo)((()=>({open:0===a})),[a]);return e.createElement(ke,{force:!0},e.createElement(Oe,null,K({ourProps:{ref:l,id:o,"aria-hidden":!0},theirProps:i,slot:c,defaultTag:"div",name:"Dialog.Backdrop"})))})),wt=te((function(t,n){let r=Xe(),{id:o=`headlessui-dialog-panel-${r}`,...i}=t,[{dialogState:a},s]=ft("Dialog.Panel"),l=U(n,s.panelRef),c=(0,e.useMemo)((()=>({open:0===a})),[a]),u=R((e=>{e.stopPropagation()}));return K({ourProps:{ref:l,id:o,onClick:u},theirProps:i,slot:c,defaultTag:"div",name:"Dialog.Panel"})})),bt=te((function(t,n){let r=Xe(),{id:o=`headlessui-dialog-overlay-${r}`,...i}=t,[{dialogState:a,close:s}]=ft("Dialog.Overlay"),l=U(n),c=R((e=>{if(e.target===e.currentTarget){if(function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),s()}}));return K({ourProps:{ref:l,id:o,"aria-hidden":!0,onClick:c},theirProps:i,slot:(0,e.useMemo)((()=>({open:0===a})),[a]),defaultTag:"div",name:"Dialog.Overlay"})})),Et=te((function(t,n){let r=Xe(),{id:o=`headlessui-dialog-title-${r}`,...i}=t,[{dialogState:a,setTitleId:s}]=ft("Dialog.Title"),l=U(n);(0,e.useEffect)((()=>(s(o),()=>s(null))),[o,s]);let c=(0,e.useMemo)((()=>({open:0===a})),[a]);return K({ourProps:{ref:l,id:o},theirProps:i,slot:c,defaultTag:"h2",name:"Dialog.Title"})})),St=Object.assign(vt,{Backdrop:xt,Panel:wt,Overlay:bt,Title:Et,Description:ct});const Tt=(0,e.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ct=(0,e.createContext)({}),Pt=(0,e.createContext)({strict:!1});function kt(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function _t(e){return"string"==typeof e||Array.isArray(e)}function At(e){return"object"==typeof e&&"function"==typeof e.start}const Lt=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mt=["initial",...Lt];function Dt(e){return At(e.animate)||Mt.some((t=>_t(e[t])))}function Nt(e){return Boolean(Dt(e)||e.variants)}function Ot(e){return Array.isArray(e)?e.join(" "):e}const Rt={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Vt={};for(const e in Rt)Vt[e]={isEnabled:t=>Rt[e].some((e=>!!t[e]))};const It=(0,e.createContext)({}),Ft=Symbol.for("motionComponentSymbol");function jt({preloadedFeatures:t,createVisualElement:n,useRender:r,useVisualState:o,Component:i}){t&&function(e){for(const t in e)Vt[t]={...Vt[t],...e[t]}}(t);const l=(0,e.forwardRef)((function(l,c){let u;const d={...(0,e.useContext)(Tt),...l,layoutId:Bt(l)},{isStatic:h}=d,p=function(t){const{initial:n,animate:r}=function(e,t){if(Dt(e)){const{initial:t,animate:n}=e;return{initial:!1===t||_t(t)?t:void 0,animate:_t(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,(0,e.useContext)(Ct));return(0,e.useMemo)((()=>({initial:n,animate:r})),[Ot(n),Ot(r)])}(l),m=o(l,h);if(!h&&a){p.visualElement=function(t,n,r,o){const{visualElement:i}=(0,e.useContext)(Ct),a=(0,e.useContext)(Pt),l=(0,e.useContext)(g),c=(0,e.useContext)(Tt).reducedMotion,u=(0,e.useRef)();o=o||a.renderer,!u.current&&o&&(u.current=o(t,{visualState:n,parent:i,props:r,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));const d=u.current;(0,e.useInsertionEffect)((()=>{d&&d.update(r,l)}));const h=(0,e.useRef)(Boolean(window.HandoffAppearAnimations));return s((()=>{d&&(d.render(),h.current&&d.animationState&&d.animationState.animateChanges())})),(0,e.useEffect)((()=>{d&&(d.updateFeatures(),!h.current&&d.animationState&&d.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,h.current=!1)})),d}(i,m,d,n);const r=(0,e.useContext)(It),o=(0,e.useContext)(Pt).strict;p.visualElement&&(u=p.visualElement.loadFeatures(d,o,t,r))}return e.createElement(Ct.Provider,{value:p},u&&p.visualElement?e.createElement(u,{visualElement:p.visualElement,...d}):null,r(i,l,function(t,n,r){return(0,e.useCallback)((e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):kt(r)&&(r.current=e))}),[n])}(m,p.visualElement,c),m,h,p.visualElement))}));return l[Ft]=i,l}function Bt({layoutId:t}){const n=(0,e.useContext)(E).id;return n&&void 0!==t?n+"-"+t:t}function Ht(e){function t(t,n={}){return jt(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const zt=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ut(e){return"string"==typeof e&&!e.includes("-")&&!!(zt.indexOf(e)>-1||/[A-Z]/.test(e))}const qt={},$t=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wt=new Set($t);function Gt(e,{layout:t,layoutId:n}){return Wt.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!qt[e]||"opacity"===e)}const Yt=e=>Boolean(e&&e.getVelocity),Xt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zt=$t.length,Kt=e=>t=>"string"==typeof t&&t.startsWith(e),Jt=Kt("--"),Qt=Kt("var(--"),en=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tn=(e,t,n)=>Math.min(Math.max(n,e),t),nn={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},rn={...nn,transform:e=>tn(0,1,e)},on={...nn,default:1},an=e=>Math.round(1e5*e)/1e5,sn=/(-)?([\d]*\.?[\d])+/g,ln=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,cn=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function un(e){return"string"==typeof e}const dn=e=>({test:t=>un(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),hn=dn("deg"),pn=dn("%"),mn=dn("px"),fn=dn("vh"),gn=dn("vw"),yn={...pn,parse:e=>pn.parse(e)/100,transform:e=>pn.transform(100*e)},vn={...nn,transform:Math.round},xn={borderWidth:mn,borderTopWidth:mn,borderRightWidth:mn,borderBottomWidth:mn,borderLeftWidth:mn,borderRadius:mn,radius:mn,borderTopLeftRadius:mn,borderTopRightRadius:mn,borderBottomRightRadius:mn,borderBottomLeftRadius:mn,width:mn,maxWidth:mn,height:mn,maxHeight:mn,size:mn,top:mn,right:mn,bottom:mn,left:mn,padding:mn,paddingTop:mn,paddingRight:mn,paddingBottom:mn,paddingLeft:mn,margin:mn,marginTop:mn,marginRight:mn,marginBottom:mn,marginLeft:mn,rotate:hn,rotateX:hn,rotateY:hn,rotateZ:hn,scale:on,scaleX:on,scaleY:on,scaleZ:on,skew:hn,skewX:hn,skewY:hn,distance:mn,translateX:mn,translateY:mn,translateZ:mn,x:mn,y:mn,z:mn,perspective:mn,transformPerspective:mn,opacity:rn,originX:yn,originY:yn,originZ:mn,zIndex:vn,fillOpacity:rn,strokeOpacity:rn,numOctaves:vn};function wn(e,t,n,r){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let l=!1,c=!1,u=!0;for(const e in t){const n=t[e];if(Jt(e)){i[e]=n;continue}const r=xn[e],d=en(n,r);if(Wt.has(e)){if(l=!0,a[e]=d,!u)continue;n!==(r.default||0)&&(u=!1)}else e.startsWith("origin")?(c=!0,s[e]=d):o[e]=d}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let t=0;t<Zt;t++){const n=$t[t];void 0!==e[n]&&(i+=`${Xt[n]||n}(${e[n]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:e="50%",originY:t="50%",originZ:n=0}=s;o.transformOrigin=`${e} ${t} ${n}`}}const bn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function En(e,t,n){for(const r in t)Yt(t[r])||Gt(r,n)||(e[r]=t[r])}function Sn(t,n,r){const o={},i=function(t,n,r){const o={};return En(o,t.style||{},t),Object.assign(o,function({transformTemplate:t},n,r){return(0,e.useMemo)((()=>{const e=bn();return wn(e,n,{enableHardwareAcceleration:!r},t),Object.assign({},e.vars,e.style)}),[n])}(t,n,r)),t.transformValues?t.transformValues(o):o}(t,n,r);return t.drag&&!1!==t.dragListener&&(o.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=i,o}const Tn=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Cn(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Tn.has(e)}let Pn=e=>!Cn(e);try{(kn=require("@emotion/is-prop-valid").default)&&(Pn=e=>e.startsWith("on")?!Cn(e):kn(e))}catch(e){}var kn;function An(e,t,n){return"string"==typeof e?e:mn.transform(t+n*e)}const Ln={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mn={offset:"strokeDashoffset",array:"strokeDasharray"};function Dn(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d,h){if(wn(e,c,u,h),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:f}=e;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==o||void 0!==i||m.transform)&&(m.transformOrigin=function(e,t,n){return`${An(t,e.x,e.width)} ${An(n,e.y,e.height)}`}(f,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(p.x=t),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Ln:Mn;e[i.offset]=mn.transform(-r);const a=mn.transform(t),s=mn.transform(n);e[i.array]=`${a} ${s}`}(p,a,s,l,!1)}const Nn=()=>({...bn(),attrs:{}}),On=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Rn(t,n,r,o){const i=(0,e.useMemo)((()=>{const e=Nn();return Dn(e,n,{enableHardwareAcceleration:!1},On(o),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};En(e,t.style,t),i.style={...e,...i.style}}return i}function Vn(t=!1){return(n,r,o,{latestValues:i},a)=>{const s=(Ut(n)?Rn:Sn)(r,i,a,n),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Pn(o)||!0===n&&Cn(o)||!t&&!Cn(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof n,t),c={...l,...s,ref:o},{children:u}=r,d=(0,e.useMemo)((()=>Yt(u)?u.get():u),[u]);return(0,e.createElement)(n,{...c,children:d})}}const In=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Fn(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const jn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Bn(e,t,n,r){Fn(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(jn.has(n)?n:In(n),t.attrs[n])}function Hn(e,t){const{style:n}=e,r={};for(const o in n)(Yt(n[o])||t.style&&Yt(t.style[o])||Gt(o,e))&&(r[o]=n[o]);return r}function zn(e,t){const n=Hn(e,t);for(const r in e)(Yt(e[r])||Yt(t[r]))&&(n[-1!==$t.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return n}function Un(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}const qn=e=>Array.isArray(e),$n=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Wn=e=>qn(e)?e[e.length-1]||0:e;function Gn(e){const t=Yt(e)?e.get():e;return $n(t)?t.toValue():t}const Yn=t=>(n,r)=>{const o=(0,e.useContext)(Ct),i=(0,e.useContext)(g),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:Xn(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(t,n,o,i);return r?a():y(a)};function Xn(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Gn(i[e]);let{initial:a,animate:s}=e;const l=Dt(e),c=Nt(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;return d&&"boolean"!=typeof d&&!At(d)&&(Array.isArray(d)?d:[d]).forEach((t=>{const n=Un(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]})),o}const Zn={useVisualState:Yn({scrapeMotionValuesFromProps:zn,createRenderState:Nn,onMount:(e,t,{renderState:n,latestValues:r})=>{h.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),h.render((()=>{Dn(n,r,{enableHardwareAcceleration:!1},On(t.tagName),e.transformTemplate),Bn(t,n)}))}})},Kn={useVisualState:Yn({scrapeMotionValuesFromProps:Hn,createRenderState:bn})};function Jn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Qn=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function er(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const tr=e=>t=>Qn(t)&&e(t,er(t));function nr(e,t,n,r){return Jn(e,t,tr(n),r)}const rr=(e,t)=>n=>t(e(n)),or=(...e)=>e.reduce(rr);function ir(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}const ar=ir("dragHorizontal"),sr=ir("dragVertical");function lr(e){let t=!1;if("y"===e)t=sr();else if("x"===e)t=ar();else{const e=ar(),n=sr();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function cr(){const e=lr(!0);return!e||(e(),!1)}class ur{constructor(e){this.isMounted=!1,this.node=e}update(){}}function dr(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return nr(e.current,n,((n,o)=>{if("touch"===n.type||cr())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t),i[r]&&h.update((()=>i[r](n,o)))}),{passive:!e.getProps()[r]})}const hr=(e,t)=>!!t&&(e===t||hr(e,t.parentElement));function pr(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,er(n))}const mr=new WeakMap,fr=new WeakMap,gr=e=>{const t=mr.get(e.target);t&&t(e)},yr=e=>{e.forEach(gr)};const vr={some:0,all:1},xr={inView:{Feature:class extends ur{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:vr[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;fr.has(n)||fr.set(n,{});const r=fr.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(yr,{root:e,...t})),r[o]}(t);return mr.set(e,n),r.observe(e),()=>{mr.delete(e),r.unobserve(e)}}(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ur{constructor(){super(...arguments),this.removeStartListeners=c,this.removeEndListeners=c,this.removeAccessibleListeners=c,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=nr(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();h.update((()=>{hr(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),o=nr(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=or(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Jn(this.node.current,"keydown",(e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=Jn(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&pr("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&h.update((()=>n(e,t)))}))})),pr("down",((e,t)=>{this.startPress(e,t)})))})),t=Jn(this.node.current,"blur",(()=>{this.isPressing&&pr("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=or(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&h.update((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!cr()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&h.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=nr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Jn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=or(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ur{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=or(Jn(this.node.current,"focus",(()=>this.onFocus())),Jn(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends ur{mount(){this.unmount=or(dr(this.node,!0),dr(this.node,!1))}unmount(){}}}};function wr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function br(e,t,n){const r=e.getProps();return Un(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}const Er="data-"+In("framerAppearId"),Sr=e=>1e3*e,Tr=e=>e/1e3,Cr=e=>Array.isArray(e)&&"number"==typeof e[0];function Pr(e){return Boolean(!e||"string"==typeof e&&_r[e]||Cr(e)||Array.isArray(e)&&e.every(Pr))}const kr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,_r={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kr([0,.65,.55,1]),circOut:kr([.55,0,1,.45]),backIn:kr([.31,.01,.66,-.59]),backOut:kr([.33,1.53,.69,.99])};function Ar(e){if(e)return Cr(e)?kr(e):Array.isArray(e)?e.map(Ar):_r[e]}const Lr=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Mr(e,t,n,r){if(e===t&&n===r)return c;return o=>0===o||1===o?o:Lr(function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Lr(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(o,0,1,e,n),t,r)}const Dr=Mr(.42,0,1,1),Nr=Mr(0,0,.58,1),Or=Mr(.42,0,.58,1),Rr=e=>Array.isArray(e)&&"number"!=typeof e[0],Vr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ir=e=>t=>1-e(1-t),Fr=e=>1-Math.sin(Math.acos(e)),jr=Ir(Fr),Br=Vr(jr),Hr=Mr(.33,1.53,.69,.99),zr=Ir(Hr),Ur=Vr(zr),qr={linear:c,easeIn:Dr,easeInOut:Or,easeOut:Nr,circIn:Fr,circInOut:Br,circOut:jr,backIn:zr,backInOut:Ur,backOut:Hr,anticipate:e=>(e*=2)<1?.5*zr(e):.5*(2-Math.pow(2,-10*(e-1)))},$r=e=>{if(Array.isArray(e)){T(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Mr(t,n,r,o)}return"string"==typeof e?(T(void 0!==qr[e],`Invalid easing type '${e}'`),qr[e]):e},Wr=(e,t)=>n=>Boolean(un(n)&&cn.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Gr=(e,t,n)=>r=>{if(!un(r))return r;const[o,i,a,s]=r.match(sn);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Yr={...nn,transform:e=>Math.round((e=>tn(0,255,e))(e))},Xr={test:Wr("rgb","red"),parse:Gr("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Yr.transform(e)+", "+Yr.transform(t)+", "+Yr.transform(n)+", "+an(rn.transform(r))+")"},Zr={test:Wr("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),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:Xr.transform},Kr={test:Wr("hsl","hue"),parse:Gr("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+pn.transform(an(t))+", "+pn.transform(an(n))+", "+an(rn.transform(r))+")"},Jr={test:e=>Xr.test(e)||Zr.test(e)||Kr.test(e),parse:e=>Xr.test(e)?Xr.parse(e):Kr.test(e)?Kr.parse(e):Zr.parse(e),transform:e=>un(e)?e:e.hasOwnProperty("red")?Xr.transform(e):Kr.transform(e)},Qr=(e,t,n)=>-n*e+n*t+e;function eo(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}const to=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},no=[Zr,Xr,Kr];function ro(e){const t=(e=>no.find((t=>t.test(e))))(e);T(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Kr&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=eo(s,r,e+1/3),i=eo(s,r,e),a=eo(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const oo=(e,t)=>{const n=ro(e),r=ro(t),o={...n};return e=>(o.red=to(n.red,r.red,e),o.green=to(n.green,r.green,e),o.blue=to(n.blue,r.blue,e),o.alpha=Qr(n.alpha,r.alpha,e),Xr.transform(o))},io={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:c},ao={regex:ln,countKey:"Colors",token:"${c}",parse:Jr.parse},so={regex:sn,countKey:"Numbers",token:"${n}",parse:nn.parse};function lo(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function co(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&lo(n,io),lo(n,ao),lo(n,so),n}function uo(e){return co(e).values}function ho(e){const{values:t,numColors:n,numVars:r,tokenised:o}=co(e),i=t.length;return e=>{let t=o;for(let o=0;o<i;o++)t=o<r?t.replace(io.token,e[o]):o<r+n?t.replace(ao.token,Jr.transform(e[o])):t.replace(so.token,an(e[o]));return t}}const po=e=>"number"==typeof e?0:e,mo={test:function(e){var t,n;return isNaN(e)&&un(e)&&((null===(t=e.match(sn))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ln))||void 0===n?void 0:n.length)||0)>0},parse:uo,createTransformer:ho,getAnimatableNone:function(e){const t=uo(e);return ho(e)(t.map(po))}},fo=(e,t)=>n=>`${n>0?t:e}`;function go(e,t){return"number"==typeof e?n=>Qr(e,t,n):Jr.test(e)?oo(e,t):e.startsWith("var(")?fo(e,t):xo(e,t)}const yo=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>go(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}},vo=(e,t)=>{const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=go(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},xo=(e,t)=>{const n=mo.createTransformer(t),r=co(e),o=co(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?or(yo(r.values,o.values),n):(S(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),fo(e,t))},wo=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},bo=(e,t)=>n=>Qr(e,t,n);function Eo(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(T(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||function(e){return"number"==typeof e?bo:"string"==typeof e?Jr.test(e)?oo:xo:Array.isArray(e)?yo:"object"==typeof e?vo:bo}(e[0]),i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||c:t;i=or(e,i)}r.push(i)}return r}(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=wo(e[n],e[n+1],t);return a[n](r)};return n?t=>l(tn(e[0],e[i-1],t)):l}function So({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Rr(r)?r.map($r):$r(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=wo(0,t,r);e.push(Qr(n,1,o))}}(t,e.length-1),t}(t),e),s=Eo(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||Or)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}function To(e,t){return t?e*(1e3/t):0}const Co=5;function Po(e,t,n){const r=Math.max(t-Co,0);return To(n-e(r),t-r)}const ko=.001,_o=.01,Ao=10,Lo=.05,Mo=1;const Do=12;function No(e,t){return e*Math.sqrt(1-t*t)}const Oo=["duration","bounce"],Ro=["stiffness","damping","mass"];function Vo(e,t){return t.some((t=>void 0!==e[t]))}function Io({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Vo(e,Ro)&&Vo(e,Oo)){const n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;S(e<=Sr(Ao),"Spring duration must be 10 seconds or less");let a=1-t;a=tn(Lo,Mo,a),e=tn(_o,Ao,Tr(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=No(t,a),l=Math.exp(-o);return ko-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=No(Math.pow(t,2),a);return(-o(t)+ko>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-ko,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<Do;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Sr(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r),p=u?-Tr(u):0,m=l/(2*Math.sqrt(s*c)),f=i-o,g=Tr(Math.sqrt(s/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),t||(t=y?.005:.5),m<1){const e=No(g,m);v=t=>{const n=Math.exp(-m*g*t);return i-n*((p+m*g*f)/e*Math.sin(e*t)+f*Math.cos(e*t))}}else if(1===m)v=e=>i-Math.exp(-g*e)*(f+(p+g*f)*e);else{const e=g*Math.sqrt(m*m-1);v=t=>{const n=Math.exp(-m*g*t),r=Math.min(e*t,300);return i-n*((p+m*g*f)*Math.sinh(r)+e*f*Math.cosh(r))/e}}return{calculatedDuration:h&&d||null,next:e=>{const r=v(e);if(h)a.done=e>=d;else{let o=p;0!==e&&(o=m<1?Po(v,e,r):0);const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function Fo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let m=n*t;const f=d+m,g=void 0===a?f:a(f);g!==f&&(m=g-d);const y=e=>-m*Math.exp(-e/r),v=e=>g+y(e),x=e=>{const t=y(e),n=v(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let w,b;const E=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(h.value)&&(w=e,b=Io({keyframes:[h.value,p(h.value)],velocity:Po(v,e,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return b||void 0!==w||(t=!0,x(e),E(e)),void 0!==w&&e>w?b.next(e-w):(!t&&x(e),h)}}}const jo=e=>{const t=({timestamp:t})=>e(t);return{start:()=>h.update(t,!0),stop:()=>p(t),now:()=>m.isProcessing?m.timestamp:performance.now()}},Bo=2e4;function Ho(e){let t=0,n=e.next(t);for(;!n.done&&t<Bo;)t+=50,n=e.next(t);return t>=Bo?1/0:t}const zo={decay:Fo,inertia:Fo,tween:So,keyframes:So,spring:Io};function Uo({autoplay:e=!0,delay:t=0,driver:n=jo,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:d,...h}){let p,m,f=1,g=!1;const y=()=>{m=new Promise((e=>{p=e}))};let v;y();const x=zo[o]||So;let w;x!==So&&"number"!=typeof r[0]&&(w=Eo([0,100],r,{clamp:!1}),r=[0,100]);const b=x({...h,keyframes:r});let E;"mirror"===s&&(E=x({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let S="idle",T=null,C=null,P=null;null===b.calculatedDuration&&i&&(b.calculatedDuration=Ho(b));const{calculatedDuration:k}=b;let _=1/0,A=1/0;null!==k&&(_=k+a,A=_*(i+1)-a);let L=0;const M=e=>{if(null===C)return;f>0&&(C=Math.min(C,e)),f<0&&(C=Math.min(e-A/f,C)),L=null!==T?T:Math.round(e-C)*f;const n=L-t*(f>=0?1:-1),o=f>=0?n<0:n>A;L=Math.max(n,0),"finished"===S&&null===T&&(L=A);let l=L,c=b;if(i){const e=L/_;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,i+1);const r=Boolean(t%2);r&&("reverse"===s?(n=1-n,a&&(n-=a/_)):"mirror"===s&&(c=E));let o=tn(0,1,n);L>A&&(o="reverse"===s&&r?1:0),l=o*_}const u=o?{done:!1,value:r[0]}:c.next(l);w&&(u.value=w(u.value));let{done:h}=u;o||null===k||(h=f>=0?L>=A:L<=0);const p=null===T&&("finished"===S||"running"===S&&h);return d&&d(u.value),p&&O(),u},D=()=>{v&&v.stop(),v=void 0},N=()=>{S="idle",D(),p(),y(),C=P=null},O=()=>{S="finished",u&&u(),D(),p()},R=()=>{if(g)return;v||(v=n(M));const e=v.now();l&&l(),null!==T?C=e-T:C&&"finished"!==S||(C=e),"finished"===S&&y(),P=C,T=null,S="running",v.start()};e&&R();const V={then:(e,t)=>m.then(e,t),get time(){return Tr(L)},set time(e){e=Sr(e),L=e,null===T&&v&&0!==f?C=v.now()-e/f:T=e},get duration(){const e=null===b.calculatedDuration?Ho(b):b.calculatedDuration;return Tr(e)},get speed(){return f},set speed(e){e!==f&&v&&(f=e,V.time=Tr(L))},get state(){return S},play:R,pause:()=>{S="paused",T=L},stop:()=>{g=!0,"idle"!==S&&(S="idle",c&&c(),N())},cancel:()=>{null!==P&&M(P),N()},complete:()=>{S="finished"},sample:e=>(C=0,M(e))};return V}const qo=function(e){let t;return()=>(void 0===t&&(t=Object.hasOwnProperty.call(Element.prototype,"animate")),t)}(),$o=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);const Wo={type:"spring",stiffness:500,damping:25,restSpeed:10},Go={type:"keyframes",duration:.8},Yo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xo=(e,{keyframes:t})=>t.length>2?Go:Wt.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Wo:Yo,Zo=(e,t)=>!("zIndex"===e||"number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!mo.test(t)&&"0"!==t||t.startsWith("url("))),Ko=new Set(["brightness","contrast","saturate","opacity"]);function Jo(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(sn)||[];if(!r)return e;const o=n.replace(r,"");let i=Ko.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Qo=/([a-z-]*)\(.*?\)/g,ei={...mo,getAnimatableNone:e=>{const t=e.match(Qo);return t?t.map(Jo).join(" "):e}},ti={...xn,color:Jr,backgroundColor:Jr,outlineColor:Jr,fill:Jr,stroke:Jr,borderColor:Jr,borderTopColor:Jr,borderRightColor:Jr,borderBottomColor:Jr,borderLeftColor:Jr,filter:ei,WebkitFilter:ei},ni=e=>ti[e];function ri(e,t){let n=ni(e);return n!==ei&&(n=mo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const oi=e=>/^0[^.\s]+$/.test(e);function ii(e){return"number"==typeof e?0===e:null!==e?"none"===e||"0"===e||oi(e):void 0}function ai(e,t){return e[t]||e.default||e}const si=(e,t,n,r={})=>o=>{const i=ai(r,e)||{},a=i.delay||r.delay||0;let{elapsed:s=0}=r;s-=Sr(a);const l=function(e,t,n,r){const o=Zo(t,n);let i;i=Array.isArray(n)?[...n]:[null,n];const a=void 0!==r.from?r.from:e.get();let s;const l=[];for(let e=0;e<i.length;e++)null===i[e]&&(i[e]=0===e?a:i[e-1]),ii(i[e])&&l.push(e),"string"==typeof i[e]&&"none"!==i[e]&&"0"!==i[e]&&(s=i[e]);if(o&&l.length&&s)for(let e=0;e<l.length;e++)i[l[e]]=ri(t,s);return i}(t,e,n,i),u=l[0],d=l[l.length-1],f=Zo(e,u),g=Zo(e,d);S(f===g,`You are trying to animate ${e} from "${u}" to "${d}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${d} via the \`style\` property.`);let y={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-s,onUpdate:e=>{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(i)||(y={...y,...Xo(e,y)}),y.duration&&(y.duration=Sr(y.duration)),y.repeatDelay&&(y.repeatDelay=Sr(y.repeatDelay)),!f||!g||!1===i.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:c,pause:c,stop:c,then:e=>(e(),Promise.resolve()),cancel:c,complete:c});return t?Uo({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}(y);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=function(e,t,{onUpdate:n,onComplete:r,...o}){if(!qo()||!$o.has(t)||o.repeatDelay||"mirror"===o.repeatType||0===o.damping||"inertia"===o.type)return!1;let i,a,s=!1;const l=()=>{a=new Promise((e=>{i=e}))};l();let{keyframes:u,duration:d=300,ease:f,times:g}=o;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!Pr(t.ease))(t,o)){const e=Uo({...o,repeat:0,delay:0});let t={done:!1,value:u[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;g=void 0,u=n,d=r-10,f="linear"}const y=function(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Ar(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,u,{...o,duration:d,ease:f,times:g});o.syncStart&&(y.startTime=m.isProcessing?m.timestamp:document.timeline?document.timeline.currentTime:performance.now());const v=()=>y.cancel(),x=()=>{h.update(v),i(),l()};return y.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(u,o)),r&&r(),x()},{then:(e,t)=>a.then(e,t),attachTimeline:e=>(y.timeline=e,y.onfinish=null,c),get time(){return Tr(y.currentTime||0)},set time(e){y.currentTime=Sr(e)},get speed(){return y.playbackRate},set speed(e){y.playbackRate=e},get duration(){return Tr(d)},play:()=>{s||(y.play(),p(v))},pause:()=>y.pause(),stop:()=>{if(s=!0,"idle"===y.playState)return;const{currentTime:t}=y;if(t){const n=Uo({...o,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}x()},complete:()=>y.finish(),cancel:x}}(t,e,y);if(n)return n}return Uo(y)};function li(e){return Boolean(Yt(e)&&e.add)}const ci=e=>/^\-?\d*\.?\d+$/.test(e);function ui(e,t){-1===e.indexOf(t)&&e.push(t)}function di(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class hi{constructor(){this.subscriptions=[]}add(e){return ui(this.subscriptions,e),()=>di(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const pi={current:void 0};class mi{constructor(e,t={}){var n;this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=m;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,h.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>h.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new hi);const n=this.events[e].add(t);return"change"===e?()=>{n(),h.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return pi.current&&pi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?To(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fi(e,t){return new mi(e,t)}const gi=e=>t=>t.test(e),yi=[nn,mn,pn,hn,gn,fn,{test:e=>"auto"===e,parse:e=>e}],vi=e=>yi.find(gi(e)),xi=[...yi,Jr,mo],wi=e=>xi.find(gi(e));function bi(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fi(n))}function Ei(e,t){if(t)return(t[e]||t.default||t).from}function Si({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Ti(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in s){const r=e.getValue(t),o=s[t];if(!r||void 0===o||u&&Si(u,t))continue;const a={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!r.hasAnimated){const n=e.getProps()[Er];n&&(a.elapsed=window.HandoffAppearAnimations(n,t,r,h),a.syncStart=!0)}r.start(si(t,r,o,e.shouldReduceMotion&&Wt.has(t)?{type:!1}:a));const d=r.animation;li(l)&&(l.add(t),d.then((()=>l.remove(t)))),c.push(d)}return a&&Promise.all(c).then((()=>{a&&function(e,t){const n=br(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const t in i)bi(e,t,Wn(i[t]))}(e,a)})),c}function Ci(e,t,n={}){const r=br(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Ti(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Pi).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Ci(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then((()=>t()))}return Promise.all([i(),a(n.delay)])}function Pi(e,t){return e.sortNodePosition(t)}const ki=[...Lt].reverse(),_i=Lt.length;function Ai(e){let t=function(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Ci(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Ci(e,t,n);else{const o="function"==typeof t?br(e,t,n.custom):t;r=Promise.all(Ti(e,o,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}(e);const n={animate:Li(!0),whileInView:Li(),whileHover:Li(),whileTap:Li(),whileDrag:Li(),whileFocus:Li(),exit:Li()};let r=!0;const o=(t,n)=>{const r=br(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},c=[],u=new Set;let d={},h=1/0;for(let t=0;t<_i;t++){const f=ki[t],g=n[f],y=void 0!==s[f]?s[f]:l[f],v=_t(y),x=f===a?g.isActive:null;!1===x&&(h=t);let w=y===l[f]&&y!==s[f]&&v;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...d},!g.isActive&&null===x||!y&&!g.prevProp||At(y)||"boolean"==typeof y)continue;const b=(p=g.prevProp,"string"==typeof(m=y)?m!==p:!!Array.isArray(m)&&!wr(m,p));let E=b||f===a&&g.isActive&&!w&&v||t>h&&v;const S=Array.isArray(y)?y:[y];let T=S.reduce(o,{});!1===x&&(T={});const{prevResolvedValues:C={}}=g,P={...C,...T},k=e=>{E=!0,u.delete(e),g.needsAnimating[e]=!0};for(const e in P){const t=T[e],n=C[e];d.hasOwnProperty(e)||(t!==n?qn(t)&&qn(n)?!wr(t,n)||b?k(e):g.protectedKeys[e]=!0:void 0!==t?k(e):u.add(e):void 0!==t&&u.has(e)?k(e):g.protectedKeys[e]=!0)}g.prevProp=y,g.prevResolvedValues=T,g.isActive&&(d={...d,...T}),r&&e.blockInitialAnimation&&(E=!1),E&&!w&&c.push(...S.map((e=>({animation:e,options:{type:f,...i}}))))}var p,m;if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),c.push({animation:t})}let f=Boolean(c.length);return r&&!1===s.initial&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Li(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Mi=0;const Di={animation:{Feature:class extends ur{constructor(e){super(e),e.animationState||(e.animationState=Ai(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),At(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ur{constructor(){super(...arguments),this.id=Mi++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&o.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Ni=(e,t)=>Math.abs(e-t);class Oi{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Ii(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Ni(e.x,t.x),r=Ni(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=m;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Ri(t,this.transformPagePoint),h.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,o=Ii("pointercancel"===e.type?this.lastMoveEventInfo:Ri(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!Qn(e))return;this.handlers=t,this.transformPagePoint=n;const r=Ri(er(e),this.transformPagePoint),{point:o}=r,{timestamp:i}=m;this.history=[{...o,timestamp:i}];const{onSessionStart:a}=t;a&&a(e,Ii(r,this.history)),this.removeListeners=or(nr(window,"pointermove",this.handlePointerMove),nr(window,"pointerup",this.handlePointerUp),nr(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),p(this.updatePoint)}}function Ri(e,t){return t?{point:t(e.point)}:e}function Vi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ii({point:e},t){return{point:e,delta:Vi(e,ji(t)),offset:Vi(e,Fi(t)),velocity:Bi(t,.1)}}function Fi(e){return e[0]}function ji(e){return e[e.length-1]}function Bi(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ji(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Sr(t)));)n--;if(!r)return{x:0,y:0};const i=Tr(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const 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 Hi(e){return e.max-e.min}function zi(e,t=0,n=.01){return Math.abs(e-t)<=n}function Ui(e,t,n,r=.5){e.origin=r,e.originPoint=Qr(t.min,t.max,e.origin),e.scale=Hi(n)/Hi(t),(zi(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Qr(n.min,n.max,e.origin)-e.originPoint,(zi(e.translate)||isNaN(e.translate))&&(e.translate=0)}function qi(e,t,n,r){Ui(e.x,t.x,n.x,r?r.originX:void 0),Ui(e.y,t.y,n.y,r?r.originY:void 0)}function $i(e,t,n){e.min=n.min+t.min,e.max=e.min+Hi(t)}function Wi(e,t,n){e.min=t.min-n.min,e.max=e.min+Hi(t)}function Gi(e,t,n){Wi(e.x,t.x,n.x),Wi(e.y,t.y,n.y)}function Yi(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 Xi(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Zi=.35;function Ki(e,t,n){return{min:Ji(e,t),max:Ji(e,n)}}function Ji(e,t){return"number"==typeof e?e:e[t]||0}const Qi=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),ea=()=>({x:{min:0,max:0},y:{min:0,max:0}});function ta(e){return[e("x"),e("y")]}function na({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ra(e){return void 0===e||1===e}function oa({scale:e,scaleX:t,scaleY:n}){return!ra(e)||!ra(t)||!ra(n)}function ia(e){return oa(e)||aa(e)||e.z||e.rotate||e.rotateX||e.rotateY}function aa(e){return sa(e.x)||sa(e.y)}function sa(e){return e&&"0%"!==e}function la(e,t,n){return n+t*(e-n)}function ca(e,t,n,r,o){return void 0!==o&&(e=la(e,o,r)),la(e,n,r)+t}function ua(e,t=0,n=1,r,o){e.min=ca(e.min,t,n,r,o),e.max=ca(e.max,t,n,r,o)}function da(e,{x:t,y:n}){ua(e.x,t.translate,t.scale,t.originPoint),ua(e.y,n.translate,n.scale,n.originPoint)}function ha(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function pa(e,t){e.min=e.min+t,e.max=e.max+t}function ma(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,a=Qr(e.min,e.max,i);ua(e,t[n],t[r],a,t.scale)}const fa=["x","scaleX","originX"],ga=["y","scaleY","originY"];function ya(e,t){ma(e.x,t,fa),ma(e.y,t,ga)}function va(e,t){return na(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const xa=new WeakMap;class wa{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ea(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;n&&!1===n.isPresent||(this.panSession=new Oi(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(er(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=lr(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ta((e=>{let t=this.getAxisMotionValue(e).get()||0;if(pn.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Hi(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),o&&h.update((()=>o(e,t)),!1,!0);const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()}))}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&h.update((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!ba(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Qr(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Qr(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&kt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Yi(e.x,n,o),y:Yi(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Zi){return!1===e?e=0:!0===e&&(e=Zi),{x:Ki(e,"left","right"),y:Ki(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ta((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!kt(e))return!1;const n=e.current;T(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=va(e,n),{scroll:o}=t;return o&&(pa(r.x,o.offset.x),pa(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Xi(e.x,t.x),y:Xi(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=na(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=ta((a=>{if(!ba(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(si(e,n,0,t))}stopAnimation(){ta((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){ta((t=>{const{drag:n}=this.getProps();if(!ba(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Qr(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!kt(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ta((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=Hi(e),o=Hi(t);return o>r?n=wo(t.min,t.max-r,e.min):r>o&&(n=wo(e.min,e.max-o,t.min)),tn(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ta((t=>{if(!ba(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Qr(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;xa.set(this.visualElement,this);const e=nr(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();kt(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=Jn(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ta((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Zi,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function ba(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Ea=e=>(t,n)=>{e&&h.update((()=>e(t,n)))},Sa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ta(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ca={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!mn.test(e))return e;e=parseFloat(e)}return`${Ta(e,t.target.x)}% ${Ta(e,t.target.y)}%`}},Pa={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=mo.parse(e);if(o.length>5)return r;const i=mo.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Qr(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}};class ka extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Aa,Object.assign(qt,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Sa.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||h.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function _a(t){const[n,r]=function(){const t=(0,e.useContext)(g);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=(0,e.useId)();return(0,e.useEffect)((()=>o(i)),[]),!n&&r?[!1,()=>r&&r(i)]:[!0]}(),o=(0,e.useContext)(E);return e.createElement(ka,{...t,layoutGroup:o,switchLayoutGroup:(0,e.useContext)(It),isPresent:n,safeToRemove:r})}const Aa={borderRadius:{...Ca,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ca,borderTopRightRadius:Ca,borderBottomLeftRadius:Ca,borderBottomRightRadius:Ca,boxShadow:Pa},La=["TopLeft","TopRight","BottomLeft","BottomRight"],Ma=La.length,Da=e=>"string"==typeof e?parseFloat(e):e,Na=e=>"number"==typeof e||mn.test(e);function Oa(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Ra=Ia(0,.5,jr),Va=Ia(.5,.95,c);function Ia(e,t,n){return r=>r<e?0:r>t?1:n(wo(e,t,r))}function Fa(e,t){e.min=t.min,e.max=t.max}function ja(e,t){Fa(e.x,t.x),Fa(e.y,t.y)}function Ba(e,t,n,r,o){return e=la(e-=t,1/n,r),void 0!==o&&(e=la(e,1/o,r)),e}function Ha(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(pn.test(t)&&(t=parseFloat(t),t=Qr(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=Qr(i.min,i.max,r);e===i&&(s-=t),e.min=Ba(e.min,t,n,s,o),e.max=Ba(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const za=["x","scaleX","originX"],Ua=["y","scaleY","originY"];function qa(e,t,n,r){Ha(e.x,t,za,n?n.x:void 0,r?r.x:void 0),Ha(e.y,t,Ua,n?n.y:void 0,r?r.y:void 0)}function $a(e){return 0===e.translate&&1===e.scale}function Wa(e){return $a(e.x)&&$a(e.y)}function Ga(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Ya(e){return Hi(e.x)/Hi(e.y)}class Xa{constructor(){this.members=[]}add(e){ui(this.members,e),e.scheduleRender()}remove(e){if(di(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Za(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+=`scale(${a}, ${s})`),r||"none"}const Ka=(e,t)=>e.depth-t.depth;class Ja{constructor(){this.children=[],this.isDirty=!1}add(e){ui(this.children,e),this.isDirty=!0}remove(e){di(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ka),this.isDirty=!1,this.children.forEach(e)}}const Qa=["","X","Y","Z"];let es=0;const ts={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ns({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=es++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;ts.totalNodes=ts.resolvedTargetDeltas=ts.recalculatedProjection=0,this.nodes.forEach(is),this.nodes.forEach(hs),this.nodes.forEach(ps),this.nodes.forEach(as),e=ts,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ja)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new hi),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:t})=>{const o=t-n;o>=250&&(p(r),e(o-250))};return h.read(r,!0),()=>p(r)}(r),Sa.hasAnimatedSinceResize&&(Sa.hasAnimatedSinceResize=!1,this.nodes.forEach(ds))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||xs,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!Ga(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...ai(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||ds(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,p(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ms),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ls);this.isUpdating||this.nodes.forEach(cs),this.isUpdating=!1,this.nodes.forEach(us),this.nodes.forEach(rs),this.nodes.forEach(os),this.clearAllSnapshots();const e=performance.now();m.delta=tn(0,1e3/60,e-m.timestamp),m.timestamp=e,m.isProcessing=!0,f.update.process(m),f.preRender.process(m),f.render.process(m),m.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(ss),this.sharedNodes.forEach(fs)}scheduleUpdateProjection(){h.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){h.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ea(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!Wa(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||ia(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Es((r=n).x),Es(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return ea();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(pa(t.x,n.offset.x),pa(t.y,n.offset.y)),t}removeElementScroll(e){const t=ea();ja(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){ja(t,e);const{scroll:n}=this.root;n&&(pa(t.x,-n.offset.x),pa(t.y,-n.offset.y))}pa(t.x,o.offset.x),pa(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n=ea();ja(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ya(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),ia(r.latestValues)&&ya(n,r.latestValues)}return ia(this.latestValues)&&ya(n,this.latestValues),n}removeTransform(e){const t=ea();ja(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!ia(n.latestValues))continue;oa(n.latestValues)&&n.updateSnapshot();const r=ea();ja(r,n.measurePageBox()),qa(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return ia(this.latestValues)&&qa(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==m.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=m.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ea(),this.relativeTargetOrigin=ea(),Gi(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),ja(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target=ea(),this.targetWithTransforms=ea()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,$i(a.x,s.x,l.x),$i(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ja(this.target,this.layout.layoutBox),da(this.target,this.targetDelta)):ja(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ea(),this.relativeTargetOrigin=ea(),Gi(this.relativeTargetOrigin,this.target,e.target),ja(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ts.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!oa(this.parent.latestValues)&&!aa(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===m.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;ja(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ya(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,da(e,a)),r&&ia(i.latestValues)&&ya(e,i.latestValues))}t.x=ha(t.x),t.y=ha(t.y)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox);const{target:l}=t;if(!l)return void(this.projectionTransform&&(this.projectionDelta=Qi(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=Qi(),this.projectionDeltaWithTransform=Qi());const c=this.projectionTransform;qi(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=Za(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ts.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=Qi();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a=ea(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(vs));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,p,m;gs(i.x,e.x,n),gs(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gi(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,h=this.relativeTargetOrigin,p=a,m=n,ys(l.x,h.x,p.x,m),ys(l.y,h.y,p.y,m),d&&function(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=ea()),ja(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Qr(0,void 0!==n.opacity?n.opacity:1,Ra(r)),e.opacityExit=Qr(void 0!==t.opacity?t.opacity:1,0,Va(r))):i&&(e.opacity=Qr(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Ma;o++){const i=`border${La[o]}Radius`;let a=Oa(t,i),s=Oa(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Na(a)===Na(s)?(e[i]=Math.max(Qr(Da(a),Da(s),r),0),(pn.test(s)||pn.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Qr(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(p(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=h.update((()=>{Sa.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Yt(0)?0:fi(0);return r.start(si("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Ss(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||ea();const t=Hi(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Hi(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}ja(t,n),ya(t,o),qi(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Xa),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let t=0;t<Qa.length;t++){const o="rotate"+Qa[t];n[o]&&(r[o]=n[o],e.setStaticValue(o,0))}e.render();for(const t in r)e.setStaticValue(t,r[t]);e.scheduleRender()}getProjectionStyles(e={}){var t,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Gn(e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Gn(e.pointerEvents)||""),this.hasProjected&&!ia(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=Za(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in qt){if(void 0===a[e])continue;const{correct:t,applyTo:n}=qt[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Gn(e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(ls),this.root.sharedNodes.clear()}}}function rs(e){e.updateLayout()}function os(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?ta((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Hi(r);r.min=t[e].min,r.max=r.min+o})):Ss(o,n.layoutBox,t)&&ta((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=Hi(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a=Qi();qi(a,t,n.layoutBox);const s=Qi();i?qi(s,e.applyTransform(r,!0),n.measuredBox):qi(s,t,n.layoutBox);const l=!Wa(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a=ea();Gi(a,n.layoutBox,o.layoutBox);const s=ea();Gi(s,t,i.layoutBox),Ga(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function is(e){ts.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function as(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ss(e){e.clearSnapshot()}function ls(e){e.clearMeasurements()}function cs(e){e.isLayoutDirty=!1}function us(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ds(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hs(e){e.resolveTargetDelta()}function ps(e){e.calcProjection()}function ms(e){e.resetRotation()}function fs(e){e.removeLeadSnapshot()}function gs(e,t,n){e.translate=Qr(t.translate,0,n),e.scale=Qr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ys(e,t,n,r){e.min=Qr(t.min,n.min,r),e.max=Qr(t.max,n.max,r)}function vs(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const xs={duration:.45,ease:[.4,0,.1,1]},ws=e=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(e),bs=ws("applewebkit/")&&!ws("chrome/")?Math.round:c;function Es(e){e.min=bs(e.min),e.max=bs(e.max)}function Ss(e,t,n){return"position"===e||"preserve-aspect"===e&&!zi(Ya(t),Ya(n),.2)}const Ts=ns({attachResizeListener:(e,t)=>Jn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Cs={current:void 0},Ps=ns({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cs.current){const e=new Ts({});e.mount(window),e.setOptions({layoutScroll:!0}),Cs.current=e}return Cs.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),ks={pan:{Feature:class extends ur{constructor(){super(...arguments),this.removePointerDownListener=c}onPointerDown(e){this.session=new Oi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ea(e),onStart:Ea(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&h.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=nr(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ur{constructor(e){super(e),this.removeGroupControls=c,this.removeListeners=c,this.controls=new wa(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||c}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ps,MeasureLayout:_a}},_s=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function As(e,t,n=1){T(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=_s.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return ci(e)?parseFloat(e):e}return Qt(o)?As(o,t,n+1):o}const Ls=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Ms=e=>Ls.has(e),Ds=e=>e===nn||e===mn,Ns=(e,t)=>parseFloat(e.split(", ")[t]),Os=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Ns(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?Ns(t[1],e):0}},Rs=new Set(["x","y","z"]),Vs=$t.filter((e=>!Rs.has(e))),Is={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Os(4,13),y:Os(5,14)};Is.translateX=Is.x,Is.translateY=Is.y;function Fs(e,t,n,r){return(e=>Object.keys(e).some(Ms))(t)?((e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(Ms);let i=[],s=!1;const l=[];if(o.forEach((o=>{const a=e.getValue(o);if(!e.hasValue(o))return;let c=n[o],u=vi(c);const d=t[o];let h;if(qn(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=vi(c);for(let n=t;n<e&&null!==d[n];n++)h?T(vi(d[n])===h,"All keyframes must be of the same type"):(h=vi(d[n]),T(h===u||Ds(u)&&Ds(h),"Keyframes must be of the same dimension as the current value"))}else h=vi(d);if(u!==h)if(Ds(u)&&Ds(h)){const e=a.get();"string"==typeof e&&a.set(parseFloat(e)),"string"==typeof d?t[o]=parseFloat(d):Array.isArray(d)&&h===mn&&(t[o]=d.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==h?void 0:h.transform)&&(0===c||0===d)?0===c?a.set(h.transform(c)):t[o]=u.transform(d):(s||(i=function(e){const t=[];return Vs.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),s=!0),l.push(o),r[o]=void 0!==r[o]?r[o]:t[o],a.jump(d))})),l.length){const n=l.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=Is[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(s[n]),e[n]=Is[n](l,i)})),e})(t,e,l);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),a&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}})(e,t,n,r):{target:t,transitionEnd:r}}const js={current:null},Bs={current:!1},Hs=new WeakMap,zs=Object.keys(Vt),Us=zs.length,qs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],$s=Mt.length;class Ws{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>h.render(this.render,!1,!0);const{latestValues:a,renderState:s}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.isControllingVariants=Dt(t),this.isVariantNode=Nt(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(t,{});for(const e in c){const t=c[e];void 0!==a[e]&&Yt(t)&&(t.set(a[e],!1),li(l)&&l.add(e))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,Hs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Bs.current||function(){if(Bs.current=!0,a)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>js.current=e.matches;e.addListener(t),t()}else js.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||js.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Hs.delete(this.current),this.projection&&this.projection.unmount(),p(this.notifyUpdate),p(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=Wt.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&h.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,o){let i,a;for(let e=0;e<Us;e++){const n=zs[e],{isEnabled:r,Feature:o,ProjectionNode:s,MeasureLayout:l}=Vt[n];s&&(i=s),r(t)&&(!this.features[n]&&o&&(this.features[n]=new o(this)),l&&(a=l))}if(!this.projection&&i){this.projection=new i(this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:a,layoutScroll:s,layoutRoot:l}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||a&&kt(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:s,layoutRoot:l})}return a}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ea()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<qs.length;t++){const n=qs[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],a=n[o];if(Yt(i))e.addValue(o,i),li(r)&&r.add(o);else if(Yt(a))e.addValue(o,fi(i,{owner:e})),li(r)&&r.remove(o);else if(a!==i)if(e.hasValue(o)){const t=e.getValue(o);!t.hasAnimated&&t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,fi(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<$s;e++){const n=Mt[e],r=this.props[n];(_t(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=fi(t,{owner:this}),this.addValue(e,n)),n}readValue(e){var t;return void 0===this.latestValues[e]&&this.current?null!==(t=this.getBaseTargetFromProps(this.props,e))&&void 0!==t?t:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=Un(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Yt(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new hi),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class Gs extends Ws{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},o){let i=function(e,t,n){const r={};for(const o in e){const e=Ei(o,t);if(void 0!==e)r[o]=e;else{const e=n.getValue(o);e&&(r[o]=e.get())}}return r}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),i&&(i=r(i))),o){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;if(a)for(let s=0;s<a;s++){const a=i[s],l=t[a];let c=null;Array.isArray(l)&&(c=l[0]),null===c&&(c=null!==(o=null!==(r=n[a])&&void 0!==r?r:e.readValue(a))&&void 0!==o?o:t[a]),null!=c&&("string"==typeof c&&(ci(c)||oi(c))?c=parseFloat(c):!wi(c)&&mo.test(l)&&(c=ri(a,l)),e.addValue(a,fi(c,{owner:e})),void 0===n[a]&&(n[a]=c),null!==c&&e.setBaseTarget(a,c))}}(this,n,i);const e=((e,t,n,r)=>{const o=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!Qt(t))return;const n=As(t,r);n&&e.set(n)}));for(const e in t){const o=t[e];if(!Qt(o))continue;const i=As(o,r);i&&(t[e]=i,n||(n={}),void 0===n[e]&&(n[e]=o))}return{target:t,transitionEnd:n}}(e,t,r);return Fs(e,t=o.target,n,r=o.transitionEnd)})(this,n,i,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class Ys extends Gs{readValueFromInstance(e,t){if(Wt.has(t)){const e=ni(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Jt(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return va(e,t)}build(e,t,n,r){wn(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return Hn(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Yt(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){Fn(e,t,n,r)}}class Xs extends Gs{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Wt.has(t)){const e=ni(t);return e&&e.default||0}return t=jn.has(t)?t:In(t),e.getAttribute(t)}measureInstanceViewportBox(){return ea()}scrapeMotionValuesFromProps(e,t){return zn(e,t)}build(e,t,n,r){Dn(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){Bn(e,t,0,r)}mount(e){this.isSVGTag=On(e.tagName),super.mount(e)}}const Zs=(e,t)=>Ut(e)?new Xs(t,{enableHardwareAcceleration:!1}):new Ys(t,{enableHardwareAcceleration:!0}),Ks={...Di,...xr,...ks,layout:{ProjectionNode:Ps,MeasureLayout:_a}},Js=Ht(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...Ut(e)?Zn:Kn,preloadedFeatures:n,useRender:Vn(t),createVisualElement:r,Component:e}}(e,t,Ks,Zs))),Qs=window.wp.apiFetch;var el=o.n(Qs);const tl=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,o,i);return i};var nl=o(798);const{useDebugValue:rl}=e,{useSyncExternalStoreWithSelector:ol}=nl;let il=!1;const al=e=>e,sl=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?tl(e):tl)(e):e,n=(e,n)=>function(e,t=al,n){n&&!il&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),il=!0);const r=ol(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return rl(r),r}(t,e,n);return Object.assign(n,t),n},ll=e=>e?sl(e):sl,cl=new Map,ul=e=>{const t=cl.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},dl=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:a,store:s,...l}=t;let c;try{c=(null==i||i)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,o);const{connection:u,...d}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const r=cl.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return cl.set(n.name,o),{type:"tracked",store:e,...o}})(s,c,l);let h=!0;o.setState=(e,t,i)=>{const c=n(e,t);if(!h)return c;const d=void 0===i?{type:a||"anonymous"}:"string"==typeof i?{type:i}:i;return void 0===s?(null==u||u.send(d,r()),c):(null==u||u.send({...d,type:`${s}/${d.type}`},{...ul(l.name),[s]:o.getState()}),c)};const p=(...e)=>{const t=h;h=!1,n(...e),h=t},m=e(o.setState,r,o);if("untracked"===d.type?null==u||u.init(m):(d.stores[d.store]=o,null==u||u.init(Object.fromEntries(Object.entries(d.stores).map((([e,t])=>[e,e===d.store?m:t.getState()]))))),o.dispatchFromDevtools&&"function"==typeof o.dispatch){let e=!1;const t=o.dispatch;o.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):hl(e.payload,(e=>{if("__setState"!==e.type)o.dispatchFromDevtools&&"function"==typeof o.dispatch&&o.dispatch(e);else{if(void 0===s)return void p(e.state);1!==Object.keys(e.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format. \n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const t=e.state[s];if(null==t)return;JSON.stringify(o.getState())!==JSON.stringify(t)&&p(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return p(m),void 0===s?null==u?void 0:u.init(o.getState()):null==u?void 0:u.init(ul(l.name));case"COMMIT":return void 0===s?void(null==u||u.init(o.getState())):null==u?void 0:u.init(ul(l.name));case"ROLLBACK":return hl(e.state,(e=>{if(void 0===s)return p(e),void(null==u||u.init(o.getState()));p(e[s]),null==u||u.init(ul(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return hl(e.state,(e=>{void 0!==s?JSON.stringify(o.getState())!==JSON.stringify(e[s])&&p(e[s]):p(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return p(void 0===s?r:r[s]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return h=!h}return}})),m},hl=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)};function pl(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;const o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(r=n.getItem(e))?r:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}const ml=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>ml(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>ml(t)(e)}}},fl=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=i.getStorage()}catch(e){}if(!c)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const u=ml(i.serialize),d=()=>{const e=i.partialize({...r()});let t;const n=u({state:e,version:i.version}).then((e=>c.setItem(i.name,e))).catch((e=>{t=e}));if(t)throw t;return n},h=o.setState;o.setState=(e,t)=>{h(e,t),d()};const p=e(((...e)=>{n(...e),d()}),r,o);let m;const f=()=>{var e;if(!c)return;a=!1,s.forEach((e=>e(r())));const t=(null==(e=i.onRehydrateStorage)?void 0:e.call(i,r()))||void 0;return ml(c.getItem.bind(c))(i.name).then((e=>{if(e)return i.deserialize(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===i.version)return e.state;if(i.migrate)return i.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return m=i.merge(e,null!=(t=r())?t:p),n(m,!0),d()})).then((()=>{null==t||t(m,void 0),a=!0,l.forEach((e=>e(m)))})).catch((e=>{null==t||t(void 0,e)}))};return o.persist={setOptions:e=>{i={...i,...e},e.getStorage&&(c=e.getStorage())},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>f(),hasHydrated:()=>a,onHydrate:e=>(s.add(e),()=>{s.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},f(),m||p})(e,t)):((e,t)=>(n,r,o)=>{let i={storage:pl((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},a=!1;const s=new Set,l=new Set;let c=i.storage;if(!c)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const u=()=>{const e=i.partialize({...r()});return c.setItem(i.name,{state:e,version:i.version})},d=o.setState;o.setState=(e,t)=>{d(e,t),u()};const h=e(((...e)=>{n(...e),u()}),r,o);let p;o.getInitialState=()=>h;const m=()=>{var e,t;if(!c)return;a=!1,s.forEach((e=>{var t;return e(null!=(t=r())?t:h)}));const o=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=r())?e:h))||void 0;return ml(c.getItem.bind(c))(i.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===i.version)return e.state;if(i.migrate)return i.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return p=i.merge(e,null!=(t=r())?t:h),n(p,!0),u()})).then((()=>{null==o||o(p,void 0),p=r(),a=!0,l.forEach((e=>e(p)))})).catch((e=>{null==o||o(void 0,e)}))};return o.persist={setOptions:e=>{i={...i,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:e=>(s.add(e),()=>{s.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},i.skipHydration||m(),p||h})(e,t),gl=e=>{try{return JSON.parse(e)}catch(e){return{}}},yl=(0,i.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,i.cloneElement)(e,{width:t,height:t,...n,ref:r})})),vl=window.wp.primitives,xl=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"})),wl=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),bl=window.wp.blocks;var El=o(967),Sl=o.n(El);const Tl=({text:t,reset:n})=>(0,e.createElement)("div",{className:"p-5 rounded-lg bg-red-100 border border-solid border-red-500"},(0,e.createElement)("p",{className:"m-0 mb-4 text-gray-800 text-sm"},t),n&&(0,e.createElement)("p",{className:"m-0"},(0,e.createElement)("button",{type:"button",className:"bg-transparent border-none p-0 underline cursor-pointer",onClick:n},(0,k.__)("Please try again.","extendify-local")))),Cl=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("g",{clipPath:"url(#clip0_2114_35675)"},(0,e.createElement)("path",{d:"M11.2266 6.0469V4.93948C11.0919 4.889 10.9613 4.82828 10.8359 4.75784C10.345 4.46641 9.97524 4.00815 9.79416 3.46671C9.61308 2.92526 9.63277 2.33675 9.84962 1.80862C9.97012 1.5206 10.1452 1.25862 10.3652 1.03713C10.5846 0.817735 10.8447 0.643251 11.1309 0.523459C11.4193 0.403518 11.7287 0.342425 12.041 0.343772C12.5103 0.343706 12.9689 0.48286 13.359 0.74362C13.7491 1.00438 14.0531 1.37502 14.2324 1.80862C14.4719 2.38837 14.4719 3.03941 14.2324 3.61917C14.1131 3.90723 13.9378 4.16878 13.7168 4.3887L13.7051 4.40042C13.566 4.53722 13.4113 4.65718 13.2442 4.75784C13.1202 4.83102 12.9894 4.89186 12.8535 4.93948V6.0469H18.416C19.2143 6.04948 19.9792 6.36788 20.5435 6.93255C21.1078 7.49722 21.4257 8.26227 21.4278 9.06058V9.50784H22.459C22.8681 9.50939 23.2599 9.67272 23.549 9.96217C23.8381 10.2516 24.0009 10.6437 24.002 11.0528V14.6407C24.0009 15.0497 23.8381 15.4418 23.549 15.7313C23.2599 16.0207 22.8681 16.184 22.459 16.1856H21.4336V16.5899C21.431 17.389 21.1122 18.1547 20.5467 18.7194C19.9812 19.2841 19.2152 19.602 18.416 19.6036H10.7852L6.21094 23.5313C6.16052 23.5746 6.10202 23.6075 6.03882 23.6281C5.97562 23.6487 5.90897 23.6566 5.84271 23.6514C5.77644 23.6461 5.71188 23.6278 5.65273 23.5974C5.59357 23.5671 5.54101 23.5254 5.49805 23.4747C5.41215 23.3745 5.36809 23.2451 5.37501 23.1133L5.61915 19.5977H5.57813C4.78086 19.5956 4.01681 19.2781 3.45287 18.7146C2.88893 18.151 2.57094 17.3871 2.56836 16.5899V16.1856H1.54297C1.13355 16.1846 0.74119 16.0215 0.451684 15.7319C0.162178 15.4424 -0.00092183 15.0501 -0.00195312 14.6407L-0.00195312 11.0528C-0.000924304 10.6437 0.161907 10.2516 0.450991 9.96217C0.740076 9.67272 1.13193 9.50939 1.54102 9.50784H2.56836V9.05862C2.56991 8.26068 2.88744 7.49583 3.45149 6.93141C4.01554 6.367 4.78019 6.04897 5.57813 6.0469H11.2266ZM16.1582 9.58597C16.5198 9.58597 16.8732 9.69319 17.1739 9.89406C17.4745 10.0949 17.7088 10.3805 17.8472 10.7145C17.9856 11.0485 18.0218 11.4161 17.9512 11.7707C17.8807 12.1254 17.7066 12.4511 17.4509 12.7068C17.1952 12.9624 16.8695 13.1366 16.5149 13.2071C16.1602 13.2776 15.7927 13.2414 15.4586 13.1031C15.1246 12.9647 14.8391 12.7304 14.6382 12.4297C14.4373 12.1291 14.3301 11.7757 14.3301 11.4141C14.3301 10.9292 14.5227 10.4643 14.8655 10.1214C15.2084 9.77857 15.6734 9.58597 16.1582 9.58597ZM7.8418 9.58597C8.20337 9.58597 8.55682 9.69319 8.85746 9.89406C9.15809 10.0949 9.39241 10.3805 9.53077 10.7145C9.66914 11.0485 9.70534 11.4161 9.6348 11.7707C9.56427 12.1254 9.39015 12.4511 9.13448 12.7068C8.87882 12.9624 8.55308 13.1366 8.19845 13.2071C7.84383 13.2776 7.47626 13.2414 7.14221 13.1031C6.80816 12.9647 6.52265 12.7304 6.32177 12.4297C6.1209 12.1291 6.01368 11.7757 6.01368 11.4141C6.01368 10.9292 6.20628 10.4643 6.54912 10.1214C6.89196 9.77857 7.35695 9.58597 7.8418 9.58597ZM9.0879 15.711C9.06032 15.6892 9.03541 15.6643 9.01368 15.6368C8.95038 15.5625 8.91453 15.4687 8.91212 15.3711C8.91035 15.2731 8.94204 15.1773 9.00196 15.0996C9.02434 15.0714 9.0499 15.0459 9.07813 15.0235C9.18557 14.9388 9.31767 14.8915 9.45442 14.8887C9.59117 14.8859 9.72511 14.9277 9.83595 15.0078C10.1697 15.2712 10.5402 15.4844 10.9356 15.6407C11.2762 15.7724 11.6387 15.8387 12.0039 15.836C12.3737 15.8281 12.7393 15.7554 13.084 15.6211C13.4841 15.4612 13.8616 15.2498 14.207 14.9922C14.3204 14.9149 14.4558 14.8766 14.5928 14.8829C14.7298 14.8893 14.8611 14.94 14.9668 15.0274C14.9933 15.0518 15.0175 15.0786 15.0391 15.1075C15.0965 15.1867 15.1254 15.2831 15.1211 15.3809C15.1128 15.4787 15.073 15.5712 15.0078 15.6446C14.9831 15.6727 14.9548 15.6977 14.9238 15.7188C14.4846 16.0434 14.0029 16.3063 13.4922 16.5C13.0218 16.6774 12.5242 16.7719 12.0215 16.7793C11.5182 16.7864 11.0179 16.7016 10.5449 16.5293C10.0237 16.3343 9.53556 16.0603 9.09766 15.7168L9.0879 15.711ZM18.4141 7.06253H5.57813C5.04903 7.06459 4.54222 7.27582 4.16826 7.65014C3.79431 8.02445 3.58358 8.53147 3.58203 9.06058V16.5899C3.58358 17.119 3.79431 17.626 4.16826 18.0003C4.54222 18.3746 5.04903 18.5859 5.57813 18.5879H6.19727C6.33117 18.5979 6.45571 18.6604 6.54384 18.7617C6.63197 18.863 6.67658 18.995 6.66797 19.1289L6.47266 21.9766L10.2422 18.7325C10.2891 18.6856 10.3448 18.6485 10.4062 18.6233C10.4676 18.5982 10.5333 18.5855 10.5996 18.586H18.4121C18.9412 18.5839 19.448 18.3727 19.822 17.9984C20.1959 17.6241 20.4067 17.117 20.4082 16.5879V9.05862C20.4072 8.52988 20.1968 8.02306 19.8231 7.649C19.4494 7.27494 18.9428 7.06408 18.4141 7.06253Z"})),(0,e.createElement)("defs",null,(0,e.createElement)("clipPath",{id:"clip0_2114_35675"},(0,e.createElement)("rect",{width:"24",height:"23.3106",transform:"translate(0 0.34375)"})))),Pl=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M3.51 6.03L11.02 9.25L3.5 8.25L3.51 6.03ZM11.01 14.75L3.5 17.97V15.75L11.01 14.75ZM1.51 3L1.5 10L16.5 12L1.5 14L1.51 21L22.5 12L1.51 3Z"})),kl=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M14.1818 5H7.63636C7.03273 5 6.51636 5.36364 6.29818 5.88727L4.10182 11.0145C4.03636 11.1818 4 11.3564 4 11.5455V13C4 13.8 4.65455 14.4545 5.45455 14.4545H10.0436L9.35273 17.7782L9.33091 18.0109C9.33091 18.3091 9.45455 18.5855 9.65091 18.7818L10.4218 19.5455L15.2145 14.7527C15.4764 14.4909 15.6364 14.1273 15.6364 13.7273V6.45455C15.6364 5.65455 14.9818 5 14.1818 5ZM14.1818 13.7273L11.0255 16.8836L12 13H5.45455V11.5455L7.63636 6.45455H14.1818V13.7273ZM17.0909 5H20V13.7273H17.0909V5Z"})),_l=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M9.81818 19.5455H16.3636C16.9673 19.5455 17.4836 19.1818 17.7018 18.6582L19.8982 13.5309C19.9636 13.3636 20 13.1891 20 13V11.5455C20 10.7455 19.3455 10.0909 18.5455 10.0909H13.9564L14.6473 6.76727L14.6691 6.53455C14.6691 6.23636 14.5455 5.96 14.3491 5.76364L13.5782 5L8.78545 9.79273C8.52364 10.0545 8.36364 10.4182 8.36364 10.8182V18.0909C8.36364 18.8909 9.01818 19.5455 9.81818 19.5455ZM9.81818 10.8182L12.9745 7.66182L12 11.5455H18.5455V13L16.3636 18.0909H9.81818V10.8182ZM4 10.8182H6.90909V19.5455H4V10.8182Z"})),Al=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M9.70492 6L8.29492 7.41L12.8749 12L8.29492 16.59L9.70492 18L15.7049 12L9.70492 6Z"})),Ll=((0,e.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M15.5 4V11H5.67L4.5 12.17V4H15.5ZM16.5 2H3.5C2.95 2 2.5 2.45 2.5 3V17L6.5 13H16.5C17.05 13 17.5 12.55 17.5 12V3C17.5 2.45 17.05 2 16.5 2ZM21.5 6H19.5V15H6.5V17C6.5 17.55 6.95 18 7.5 18H18.5L22.5 22V7C22.5 6.45 22.05 6 21.5 6Z"})),"https://kb.extendify.com"),Ml="https://ai.extendify.com",Dl=["siteId","partnerId","wpVersion","wpLanguage","devbuild","isBlockTheme","showAIConsent","userGaveConsent","userId"],Nl={...Object.fromEntries(Object.entries(window.extSharedData).filter((([e])=>Dl.includes(e))))},Ol=({answerId:t})=>{const[n,r]=(0,i.useState)(void 0);return(0,i.useEffect)((()=>{t&&void 0!==n&&(({answerId:e,rating:t})=>{fetch(`${Ml}/api/chat/rate-answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answerId:e,rating:t})})})({answerId:t,rating:n})}),[n,t]),(0,e.createElement)("div",{className:"mt-1 flex items-center gap-0.5 justify-end text-right"},(0,e.createElement)("button",{type:"button","aria-pressed":1===n,"aria-live":"polite",onClick:()=>r((e=>1===e?0:1)),"aria-label":1===n?(0,k.__)("Remove rating","extendify-local"):(0,k.__)("Rate that this answer was helpful","extendify-local"),className:Sl()("cursor-pointer bg-transparent w-5 h-5 border-0 p-0 m-0 hover:text-design-main",{"text-design-main":1===n,"text-gray-500":1!==n})},(0,e.createElement)(yl,{className:"fill-current",icon:_l})),(0,e.createElement)("button",{type:"button","aria-pressed":-1===n,"aria-live":"polite",onClick:()=>r((e=>-1===e?0:-1)),"aria-label":-1===n?(0,k.__)("Remove rating","extendify-local"):(0,k.__)("Rate that this answer was not helpful","extendify-local"),className:Sl()("cursor-pointer bg-transparent w-5 h-5 border-0 p-0 m-0 hover:text-design-main",{"text-design-main":-1===n,"text-gray-500":-1!==n})},(0,e.createElement)(yl,{className:"fill-current",icon:kl})))},Rl=ll(fl(dl(((e,t)=>({history:[],experienceLevel:"beginner",currentQuestion:void 0,setCurrentQuestion(t){e({currentQuestion:t})},setExperienceLevel(t){e({experienceLevel:t})},addHistory(t){e((e=>({history:[t,...e.history.filter((({answerId:e})=>e!==t.answerId)).slice(0,9)]})))},hasHistory:()=>t().history.length>0,clearHistory(){e({history:[]})},deleteFromHistory(t){e((e=>({history:e.history.filter((({answerId:e})=>e!==t.answerId))})))},historyCount:()=>t().history.length})),{name:"Extendify Chat History"}),{name:"extendify-chat-history",storage:pl((()=>localStorage)),partialize:e=>({history:e.history,experienceLevel:e.experienceLevel})})),Vl=({question:t,answer:n,reset:r,error:o,answerId:a})=>{const s=(0,i.useRef)(null),{addHistory:l}=Rl(),c=(0,bl.pasteHandler)({plainText:n.replace(/[\r\n]+/g,"<br />")}),u=Array.isArray(c)?(0,bl.serialize)(c):c;return(0,i.useEffect)((()=>{a&&l({answerId:a,htmlAnswer:u,question:t,time:Date.now()})}),[a,u,l,t]),o?(0,e.createElement)("div",{className:"p-6 pb-10 overflow-y-auto",ref:s},(0,e.createElement)("div",{className:"flex justify-end mb-8 ml-4 relative"},(0,e.createElement)(Tl,{text:(0,k.__)("Oops! We were unable to send your question.","extendify-local"),reset:r}))):(0,e.createElement)("div",{className:"flex flex-col h-full"},(0,e.createElement)("div",{className:"p-6 pb-10 flex-grow overflow-y-auto",ref:s},(0,e.createElement)("div",{className:"flex justify-end mb-8 ml-4 relative"},(0,e.createElement)("div",{className:"m-0 p-5 rounded-lg bg-gray-800 text-design-text text-sm"},t)),(0,e.createElement)("div",{className:"relative"},(0,e.createElement)("div",{className:"absolute z-10 -mt-4 -ml-2 rounded-full bg-design-main p-2 flex items-center"},(0,e.createElement)(yl,{icon:Cl,className:"text-design-text fill-current w-4 h-4"})),(0,e.createElement)("div",{className:Sl()("m-0 p-5 rounded-lg bg-gray-100 inline-block text-gray-800 text-sm",{"animate-pulse bg-gray-300":"..."===n,"bg-gray-100":"..."!==n}),dangerouslySetInnerHTML:{__html:u}}),a&&(0,e.createElement)(Ol,{answerId:a}))),(0,e.createElement)("div",{className:"ask-another-question p-4 relative flex justify-center"},(0,e.createElement)("button",{type:"button",onClick:r,className:"bg-design-main text-design-text border-none py-2 px-4 rounded-sm cursor-pointer text-sm flex items-center gap-2"},(0,k.__)("Ask Another Question","extendify-local"),(0,e.createElement)(yl,{icon:Pl,className:"text-design-text fill-current h-6"}))))},Il=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),Fl=({setShowHistory:t})=>{const{history:n,setCurrentQuestion:r,deleteFromHistory:o}=Rl();return(0,i.useEffect)((()=>{n.length>0||setTimeout((()=>t(!1)),750)}),[n,t]),(0,e.createElement)("div",{className:"relative h-full"},(0,e.createElement)("div",{className:"flex p-4 px-6 justify-between items-center bg-gray-100 text-gray-900"},(0,e.createElement)("h1",{className:"m-0 p-0 text-sm font-medium"},(0,k.__)("Chat History","extendify-local")),(0,e.createElement)("button",{type:"button",onClick:()=>t(!1),className:"text-design-text fill-current cursor-pointer m-0 p-0 border-0 bg-transparent"},(0,e.createElement)(yl,{icon:Il,size:16}),(0,e.createElement)("span",{className:"sr-only"},(0,k.__)("Close history","extendify-local")))),(0,e.createElement)("ul",{className:"m-0 p-0 mt-3 h-full overflow-y-auto"},[...n].sort(((e,t)=>e.time-t.time)).map((t=>(0,e.createElement)("li",{key:t.answerId,className:"group px-2 pr-4 flex gap-1"},(0,e.createElement)("button",{type:"button",onClick:()=>o(t),className:"bg-transparent border-0 p-0 m-0 group-hover:opacity-100 opacity-0 cursor-pointer"},(0,e.createElement)(yl,{icon:Il,size:12}),(0,e.createElement)("span",{className:"sr-only"},(0,k.__)("Remove from history","extendify-local"))),(0,e.createElement)("button",{type:"button",className:"rounded-md border border-gray-200 w-full text-left m-0 p-2.5 bg-transparent flex items-center justify-between gap-2 cursor-pointer hover:bg-gray-100",onClick:()=>r(t)},(0,e.createElement)("div",null,(0,e.createElement)("span",{className:"text-ellipsis overflow-hidden truncate"},t.question.substring(0,100))),(0,e.createElement)("span",null,(0,e.createElement)(yl,{className:"fill-current text-gray-900",icon:Al}))))))))},jl=window.wp.components,Bl=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Hl=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),zl=({setShowHistory:t})=>{const n={beginner:(0,k.__)("Beginner","extendify-local"),intermediate:(0,k.__)("Intermediate","extendify-local"),advanced:(0,k.__)("Advanced","extendify-local")},{historyCount:r,hasHistory:o,experienceLevel:i,setExperienceLevel:a}=Rl();return(0,e.createElement)("nav",{className:"absolute z-10 flex gap-2 items-center justify-between mx-4 mt-3 right-0"},(0,e.createElement)("div",{className:"flex gap-2 items-center"},(0,e.createElement)(jl.Dropdown,{className:"flex",contentClassName:"origin-top-right rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none",popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:t})=>(0,e.createElement)("span",null,(0,e.createElement)(jl.Icon,{icon:Bl,onClick:t,size:28,className:"text-design-text fill-current p-1 rounded cursor-pointer hover:bg-white/10"}),(0,e.createElement)("span",{className:"sr-only"},(0,k.__)("Toggle menu","extendify-local"))),renderContent:({onClose:s})=>(0,e.createElement)(jl.MenuGroup,{label:(0,k.__)("WordPress Comfort Level","extendify-local")},Object.entries(n).map((([t,n])=>(0,e.createElement)(jl.MenuItem,{key:t,isSelected:i===t,onClick:()=>{a(t),s()},icon:i===t?Hl:null},n))),(0,e.createElement)("hr",null),(0,e.createElement)(jl.MenuItem,{disabled:!o(),onClick:()=>{t(!0),s()}},(0,k.sprintf)((0,k.__)("Chat History (%d)","extendify-local"),r)))})))},Ul=({value:t,className:n,onChange:r,onKeyDown:o,disabled:a,placeholder:s,maxRows:l=6})=>{const c=(0,i.useRef)(null),[u,d]=(0,i.useState)("auto"),[h,p]=(0,i.useState)("auto");return(0,i.useLayoutEffect)((()=>{if(!c.current)return;const e=window.getComputedStyle(c.current),t=parseFloat(e.lineHeight);p(t)}),[]),(0,i.useLayoutEffect)((()=>{const e=document.createElement("textarea");e.value=t||s,e.rows=1;const n=window.getComputedStyle(c.current);["paddingTop","paddingBottom","paddingLeft","paddingRight","width","fontFamily","fontSize","borderWidth"].forEach((t=>e.style[t]=n[t])),Object.assign(e.style,{position:"absolute",left:"-9999px"}),document.body.appendChild(e),d(e.scrollHeight),document.body.removeChild(e)}),[t,s]),(0,i.useEffect)((()=>{const e=c.current;if(!e)return;if(document.activeElement===e)return;const t=e.value.length;e.focus(),e.setSelectionRange(t,t)}),[t]),(0,e.createElement)(P,null,(0,e.createElement)(Js.div,{key:"input",animate:{height:`${u}px`},transition:{duration:.2},style:{overflow:"hidden",maxHeight:h?h*l+16+"px":"none"}},(0,e.createElement)("label",{htmlFor:"draft-ai-textarea",className:"sr-only"},s),(0,e.createElement)("textarea",{ref:c,id:"draft-ai-textarea",disabled:a,className:n,value:t,rows:1,onChange:r,onKeyDown:o,placeholder:s,style:{overflowY:u<h*l?"hidden":"scroll",maxHeight:h?h*l+"px":"none",boxShadow:"none"}})))},ql=({onSubmit:t})=>{const[n,r]=(0,i.useState)(""),o=(0,i.useRef)(null);return(0,e.createElement)("form",{onSubmit:t,ref:o,className:""},(0,e.createElement)("p",{className:"text-lg font-medium m-0 mb-1 opacity-80"},(0,k.__)("Hi there!","extendify-local")),(0,e.createElement)("p",{className:"text-2xl font-medium m-0 mb-6"},(0,k.__)("Ask me any questions about WordPress.","extendify-local")),(0,e.createElement)("div",{className:"relative rounded border shadow border-gray-300 bg-white"},(0,e.createElement)(Ul,{value:n,className:"w-full h-full flex-1 py-4 pl-3 pr-10 placeholder-gray-600 resize-none",placeholder:(0,k.__)("Ask your WordPress question…","extendify-local"),onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||o?.current?.requestSubmit()}}),(0,e.createElement)("button",{type:"submit",className:"absolute bottom-3.5 right-2.5 h-6 bg-transparent border-none fill-current flex items-center cursor-pointer text-gray-700 hover:text-gray-900",disabled:!n},(0,e.createElement)(yl,{icon:Pl,className:"w-4 h-4"}))))},$l=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})),Wl=({height:t})=>window.extHelpCenterData?.supportUrl?(0,e.createElement)("div",{className:"px-6 py-8"},(0,e.createElement)("a",{href:window.extHelpCenterData.supportUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-gray-800 no-underline border border-gray-300 border-solid rounded py-3 px-4 flex items-center gap-4"},(0,e.createElement)("span",null,(0,k.__)("For other questions, visit our support page.","extendify-local")),(0,e.createElement)(yl,{icon:$l,className:"w-8 fill-current"}))):(0,e.createElement)("div",{className:`bg-design-main ${t}`}),Gl=({onOpen:t})=>(0,e.createElement)("section",{className:""},(0,e.createElement)("button",{type:"button",onClick:t,className:"rounded-md border border-gray-200 w-full text-left m-0 p-2.5 bg-transparent flex justify-between gap-2 cursor-pointer hover:bg-gray-100"},(0,e.createElement)(yl,{icon:xl,className:"p-2 bg-design-main fill-design-text border-0 rounded-full",size:48}),(0,e.createElement)("div",{className:"grow pl-1"},(0,e.createElement)("h1",{className:"m-0 p-0 text-lg font-medium"},(0,k.__)("Ask AI","extendify-local")),(0,e.createElement)("p",{className:"m-0 p-0 text-xs text-gray-800"},(0,k.__)("Got questions? Ask our AI chatbot","extendify-local"))),(0,e.createElement)("div",{className:"flex justify-end items-center h-12 grow-0"},(0,e.createElement)(yl,{icon:wl,size:24,className:"fill-current text-gray-700"})))),Yl=({onAccept:t})=>(0,e.createElement)("div",{className:"bg-black/75 p-6 absolute inset-0 flex items-center justify-center"},(0,e.createElement)("div",{className:"bg-white p-4 rounded"},(0,e.createElement)("h2",{className:"text-lg mt-0 mb-2"},(0,k.__)("Terms of Use","extendify-local")),(0,e.createElement)("p",{className:"m-0",dangerouslySetInnerHTML:{__html:window.extSharedData.consentTermsHTML}}),(0,e.createElement)("button",{className:"mt-4 bg-design-main text-white rounded px-4 py-2 border-0 text-center w-full cursor-pointer",type:"button",onClick:t},(0,k.__)("Accept","extendify-local")))),Xl=[{slug:"ai-chat",title:(0,k.__)("AI Chatbot","extendify-local"),component:()=>{const[t,n]=(0,i.useState)(void 0),[r,o]=(0,i.useState)(void 0),[a,s]=(0,i.useState)(void 0),[l,c]=(0,i.useState)(!1),[u,d]=(0,i.useState)(!1),{experienceLevel:h,currentQuestion:p,setCurrentQuestion:m}=Rl(),f=window.extSharedData?.showAIConsent,[g,y]=(0,i.useState)(window.extSharedData?.userGaveConsent);return(0,i.useLayoutEffect)((()=>{n(p?.question),o(p?.htmlAnswer),d(!1)}),[p]),f&&!g?(0,e.createElement)(Yl,{onAccept:()=>{el()({path:"/extendify/v1/shared/update-user-meta",method:"POST",data:{option:"ai_consent",value:true}}),y(!0)}}):t?(0,e.createElement)(Vl,{question:t,answer:r,answerId:a,reset:()=>{n(void 0),o(void 0),s(void 0),c(!1),s(void 0),d(!1),m(void 0)},error:l}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("section",{className:"flex flex-col h-full"},(0,e.createElement)(zl,{setShowHistory:d,showHistory:u}),(0,e.createElement)("div",{className:"p-6 bg-design-main text-design-text flex-grow flex items-center"},(0,e.createElement)(ql,{onSubmit:async e=>{var t;e.preventDefault();const r=null!==(t=e.target?.[0]?.value)&&void 0!==t?t:"";if(!r)return;o("..."),n(r);const i=await(({question:e,experienceLevel:t})=>fetch(`${Ml}/api/chat/ask-question`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:e,experienceLevel:t,...Nl})}))({question:r,experienceLevel:h});if(i.ok)try{const e=i.body.getReader(),t=new TextDecoder;for(;;){const{value:n,done:r}=await e.read();if(r)break;const i=t.decode(n);try{const{id:e}=JSON.parse(i);if(!e)throw new Error("False positive");s(e)}catch(e){o((e=>"..."===e?i:e+i))}}}catch(e){console.error(e)}else c(!0)}})),(0,e.createElement)(Wl,{height:"h-11"})),(0,e.createElement)(P,null,u&&(0,e.createElement)(Js.section,{initial:{x:50},animate:{x:0},exit:{x:0},transition:{duration:.2},style:{"--ext-design-text":"#000000"},className:"flex flex-col h-full shadow-2xl ml-4 mt-4 rounded-tl-lg overflow-hidden absolute bottom-0 right-0 left-0 top-0 bg-white z-20"},(0,e.createElement)(Fl,{setShowHistory:d}))))}}];var Zl=o(426);const Kl=Zl.default||Zl;var Jl=o(688);const Ql=()=>{},ec=Ql(),tc=Object,nc=e=>e===ec,rc=e=>"function"==typeof e,oc=(e,t)=>({...e,...t}),ic=new WeakMap;let ac=0;const sc=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(tc(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=ic.get(e),o)return o;if(o=++ac+"~",ic.set(e,o),n==Array){for(o="@",i=0;i<e.length;i++)o+=sc(e[i])+",";ic.set(e,o)}if(n==tc){o="#";const t=tc.keys(e).sort();for(;!nc(i=t.pop());)nc(e[i])||(o+=i+":"+sc(e[i])+",");ic.set(e,o)}}return o},lc=new WeakMap,cc={},uc={},dc="undefined",hc=typeof window!=dc,pc=typeof document!=dc,mc=(e,t)=>{const n=lc.get(e);return[()=>!nc(t)&&e.get(t)||cc,r=>{if(!nc(t)){const o=e.get(t);t in uc||(uc[t]=o),n[5](t,oc(o,r),o||cc)}},n[6],()=>!nc(t)&&t in uc?uc[t]:!nc(t)&&e.get(t)||cc]};let fc=!0;const[gc,yc]=hc&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ql,Ql],vc={isOnline:()=>fc,isVisible:()=>{const e=pc&&document.visibilityState;return nc(e)||"hidden"!==e}},xc={initFocus:e=>(pc&&document.addEventListener("visibilitychange",e),gc("focus",e),()=>{pc&&document.removeEventListener("visibilitychange",e),yc("focus",e)}),initReconnect:e=>{const t=()=>{fc=!0,e()},n=()=>{fc=!1};return gc("online",t),gc("offline",n),()=>{yc("online",t),yc("offline",n)}}},wc=!e.useId,bc=!hc||"Deno"in window,Ec=bc?e.useEffect:e.useLayoutEffect,Sc="undefined"!=typeof navigator&&navigator.connection,Tc=!bc&&Sc&&(["slow-2g","2g"].includes(Sc.effectiveType)||Sc.saveData),Cc=e=>{if(rc(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?sc(e):"",t]};let Pc=0;const kc=()=>++Pc;async function _c(...e){const[t,n,r,o]=e,i=oc({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let a=i.populateCache;const s=i.rollbackOnError;let l=i.optimisticData;const c=i.throwOnError;if(rc(n)){const e=n,r=[],o=t.keys();for(const n of o)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(u))}return u(n);async function u(n){const[o]=Cc(n);if(!o)return;const[u,d]=mc(t,o),[h,p,m,f]=lc.get(t),g=()=>{const e=h[o];return(rc(i.revalidate)?i.revalidate(u().data,n):!1!==i.revalidate)&&(delete m[o],delete f[o],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return g();let y,v=r;const x=kc();p[o]=[x,0];const w=!nc(l),b=u(),E=b.data,S=b._c,T=nc(S)?E:S;if(w&&(l=rc(l)?l(T,E):l,d({data:l,_c:T})),rc(v))try{v=v(T)}catch(e){y=e}if(v&&(e=>rc(e.then))(v)){if(v=await v.catch((e=>{y=e})),x!==p[o][0]){if(y)throw y;return v}y&&w&&(e=>"function"==typeof s?s(e):!1!==s)(y)&&(a=!0,d({data:T,_c:ec}))}if(a&&!y)if(rc(a)){const e=a(v,T);d({data:e,error:ec,_c:ec})}else d({data:v,error:ec,_c:ec});if(p[o][1]=kc(),Promise.resolve(g()).then((()=>{d({_c:ec})})),!y)return v;if(c)throw y}}const Ac=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Lc=(e,t)=>{if(!lc.has(e)){const n=oc(xc,t),r={},o=_c.bind(ec,e);let i=Ql;const a={},s=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);const o=a[t];if(o)for(const e of o)e(n,r)},c=()=>{if(!lc.has(e)&&(lc.set(e,[r,{},{},{},o,l,s]),!bc)){const t=n.initFocus(setTimeout.bind(ec,Ac.bind(ec,r,0))),o=n.initReconnect(setTimeout.bind(ec,Ac.bind(ec,r,1)));i=()=>{t&&t(),o&&o(),lc.delete(e)}}};return c(),[e,o,c,i]}return[e,lc.get(e)[4]]},[Mc,Dc]=Lc(new Map),Nc=oc({onLoadingSlow:Ql,onSuccess:Ql,onError:Ql,onErrorRetry:(e,__,t,n,r)=>{const o=t.errorRetryCount,i=r.retryCount,a=~~((Math.random()+.5)*(1<<(i<8?i:8)))*t.errorRetryInterval;!nc(o)&&i>o||setTimeout(n,a,r)},onDiscarded:Ql,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Tc?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Tc?5e3:3e3,compare:(e,t)=>sc(e)==sc(t),isPaused:()=>!1,cache:Mc,mutate:Dc,fallback:{}},vc),Oc=(e,t)=>{const n=oc(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:a}=t;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=oc(o,a))}return n},Rc=(0,e.createContext)({}),Vc=hc&&window.__SWR_DEVTOOLS_USE__,Ic=Vc?window.__SWR_DEVTOOLS_USE__:[],Fc=e=>rc(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],jc=Ic.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=Cc(t),[,,,o]=lc.get(Mc);if(r.startsWith("$inf$"))return n(...e);const i=o[r];return nc(i)?n(...e):(delete o[r],i)}),r)));Vc&&(window.__SWR_DEVTOOLS_REACT__=e);const Bc=e.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),Hc={dedupe:!0};tc.defineProperty((t=>{const{value:n}=t,r=(0,e.useContext)(Rc),o=rc(n),i=(0,e.useMemo)((()=>o?n(r):n),[o,r,n]),a=(0,e.useMemo)((()=>o?i:Oc(r,i)),[o,r,i]),s=i&&i.provider,l=(0,e.useRef)(ec);s&&!l.current&&(l.current=Lc(s(a.cache||Mc),i));const c=l.current;return c&&(a.cache=c[0],a.mutate=c[1]),Ec((()=>{if(c)return c[2]&&c[2](),c[3]}),[]),(0,e.createElement)(Rc.Provider,oc(t,{value:a}))}),"defaultValue",{value:Nc});const zc=(Uc=(t,n,r)=>{const{cache:o,compare:i,suspense:a,fallbackData:s,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:h,keepPreviousData:p}=r,[m,f,g,y]=lc.get(o),[v,x]=Cc(t),w=(0,e.useRef)(!1),b=(0,e.useRef)(!1),E=(0,e.useRef)(v),S=(0,e.useRef)(n),T=(0,e.useRef)(r),C=()=>T.current,P=()=>C().isVisible()&&C().isOnline(),[k,_,A,L]=mc(o,v),M=(0,e.useRef)({}).current,D=nc(s)?r.fallback[v]:s,N=(e,t)=>{for(const n in M){const r=n;if("data"===r){if(!i(e[r],t[r])){if(!nc(e[r]))return!1;if(!i(z,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},O=(0,e.useMemo)((()=>{const e=!!v&&!!n&&(nc(l)?!C().isPaused()&&!a&&(!!nc(c)||c):l),t=t=>{const n=oc(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=k(),o=L(),i=t(r),s=r===o?i:t(o);let u=i;return[()=>{const e=t(k());return N(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>s]}),[o,v]),R=(0,Jl.useSyncExternalStore)((0,e.useCallback)((e=>A(v,((t,n)=>{N(n,t)||e()}))),[o,v]),O[0],O[1]),V=!w.current,I=m[v]&&m[v].length>0,F=R.data,j=nc(F)?D:F,B=R.error,H=(0,e.useRef)(j),z=p?nc(F)?H.current:F:j,U=!(I&&!nc(B))&&(V&&!nc(l)?l:!C().isPaused()&&(a?!nc(j)&&c:nc(j)||c)),q=!!(v&&n&&V&&U),$=nc(R.isValidating)?q:R.isValidating,W=nc(R.isLoading)?q:R.isLoading,G=(0,e.useCallback)((async e=>{const t=S.current;if(!v||!t||b.current||C().isPaused())return!1;let n,o,a=!0;const s=e||{},l=!g[v]||!s.dedupe,c=()=>wc?!b.current&&v===E.current&&w.current:v===E.current,u={isValidating:!1,isLoading:!1},d=()=>{_(u)},h=()=>{const e=g[v];e&&e[1]===o&&delete g[v]},p={isValidating:!0};nc(k().data)&&(p.isLoading=!0);try{if(l&&(_(p),r.loadingTimeout&&nc(k().data)&&setTimeout((()=>{a&&c()&&C().onLoadingSlow(v,r)}),r.loadingTimeout),g[v]=[t(x),kc()]),[n,o]=g[v],n=await n,l&&setTimeout(h,r.dedupingInterval),!g[v]||g[v][1]!==o)return l&&c()&&C().onDiscarded(v),!1;u.error=ec;const e=f[v];if(!nc(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),l&&c()&&C().onDiscarded(v),!1;const s=k().data;u.data=i(s,n)?s:n,l&&c()&&C().onSuccess(n,v,r)}catch(e){h();const t=C(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,v,t),(!0===n||rc(n)&&n(e))&&(C().revalidateOnFocus&&C().revalidateOnReconnect&&!P()||t.onErrorRetry(e,v,t,(e=>{const t=m[v];t&&t[0]&&t[0](3,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0}))))}return a=!1,d(),!0}),[v,o]),Y=(0,e.useCallback)(((...e)=>_c(o,E.current,...e)),[]);if(Ec((()=>{S.current=n,T.current=r,nc(F)||(H.current=F)})),Ec((()=>{if(!v)return;const e=G.bind(ec,Hc);let t=0;const n=((e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}})(v,m,((n,r={})=>{if(0==n){const n=Date.now();C().revalidateOnFocus&&n>t&&P()&&(t=n+C().focusThrottleInterval,e())}else if(1==n)C().revalidateOnReconnect&&P()&&e();else{if(2==n)return G();if(3==n)return G(r)}}));return b.current=!1,E.current=v,w.current=!0,_({_k:x}),U&&(nc(j)||bc?e():(e=>{hc&&typeof window.requestAnimationFrame!=dc?window.requestAnimationFrame(e):setTimeout(e,1)})(e)),()=>{b.current=!0,n()}}),[v]),Ec((()=>{let e;function t(){const t=rc(u)?u(k().data):u;t&&-1!==e&&(e=setTimeout(n,t))}function n(){k().error||!d&&!C().isVisible()||!h&&!C().isOnline()?t():G(Hc).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[u,d,h,v]),(0,e.useDebugValue)(z),a&&nc(j)&&v){if(!wc&&bc)throw new Error("Fallback data is required when using suspense in SSR.");S.current=n,T.current=r,b.current=!1;const e=y[v];if(!nc(e)){const t=Y(e);Bc(t)}if(!nc(B))throw B;{const e=G(Hc);nc(z)||(e.status="fulfilled",e.value=!0),Bc(e)}}return{mutate:Y,get data(){return M.data=!0,z},get error(){return M.error=!0,B},get isValidating(){return M.isValidating=!0,$},get isLoading(){return M.isLoading=!0,W}}},function(...t){const n=oc(Nc,(0,e.useContext)(Rc)),[r,o,i]=Fc(t),a=Oc(n,i);let s=Uc;const{use:l}=a,c=(l||[]).concat(jc);for(let e=c.length;e--;)s=c[e](s);return s(r,o||a.fetcher||null,a)});var Uc;const qc=((e,t)=>(...n)=>{const[r,o,i]=Fc(n),a=(i.use||[]).concat(t);return e(r,o,{...i,use:a})})(zc,(e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)))),$c=e=>{const t=window.extSharedData.wpLanguage||null,n=new URLSearchParams({lang:t});return fetch(`${Ll}/api/posts/${e}?${n.toString()}`).then((e=>{if(404===e.status)throw new Error("Not found");if(!e.ok)throw new Error(e.statusText);return e.json()}))};var Wc;const Gc={articles:[],recentArticles:[],viewedArticles:[],searchTerm:"",...null!==(Wc=gl(window.extHelpCenterData.userData.supportArticlesData)?.state)&&void 0!==Wc?Wc:{}},Yc="/extendify/v1/help-center/support-articles-data",Xc={getItem:async()=>await el()({path:Yc}),setItem:async(e,t)=>await el()({path:Yc,method:"POST",data:{state:t}})},Zc=ll(fl(dl((e=>({...Gc,pushArticle(t){const{slug:n,title:r}=t;e((e=>{const o=(new Date).toISOString(),i=o,a=e.viewedArticles.find((e=>e.slug===n));return{articles:[t,...e.articles],recentArticles:[t,...e.recentArticles.slice(0,9)],viewedArticles:[...e.viewedArticles.filter((e=>e.slug!==n)),a?{...a,count:a.count+1,lastViewedAt:o}:{slug:n,title:r,firstViewedAt:i,lastViewedAt:o,count:1}]}}))},popArticle(){e((e=>({articles:e.articles.slice(1)})))},clearArticles(){e({articles:[]})},reset(){e({articles:[],searchTerm:""})},updateTitle(t,n){e((e=>({articles:e.articles.map((e=>(e.slug===t&&(e.title=n),e)))})))},clearSearchTerm(){e({searchTerm:""})},setSearchTerm(t){e({searchTerm:t})}})),{name:"Extendify Help Center Knowledge Base"}),{storage:pl((()=>Xc)),skipHydration:!0,partialize:e=>(delete e.articles,delete e.searchTerm,e)})),Kc=()=>{const{articles:t,pushArticle:n,popArticle:r,updateTitle:o}=Zc(),[a,s]=(0,i.useState)(),[l,c]=(0,i.useState)(!1),u=(0,i.useRef)(),d=t?.[0]?.slug,{data:h,error:p,loading:m}=(e=>{const{data:t,error:n}=qc(e,$c);return{data:t,error:n,loading:!t&&!n}})(d),f=h?.title;return(0,i.useEffect)((()=>{if(!p)return s(!1);a||(s(!0),r(),window.open(`https://wordpress.org/documentation/article/${d}`,"_blank"))}),[p,d,a,r]),(0,i.useEffect)((()=>{d&&f&&o(d,f)}),[f,o,d]),(0,i.useEffect)((()=>{if(!u.current)return;const e=u.current?.querySelectorAll("a"),t=u.current?.querySelectorAll("figure"),r=u.current?.querySelectorAll("img");t.forEach((e=>{e.classList.add("mx-auto"),e.classList.add("my-4"),e.classList.add("block"),e.classList.add("w-full"),e.classList.remove("wp-block-image")})),r.forEach((e=>{e.classList.add("object-contain"),e.classList.add("max-w-[400px]"),e.classList.add("max-h-[250px]")}));const o=async e=>{var t;if(e.preventDefault(),e.ctrlKey||e.metaKey)return e.stopPropagation(),window.open(e.target.href,"_blank");const r=null!==(t=e.target?.href)&&void 0!==t?t:e.target?.closest("a")?.href,{pathname:o}=new URL(r),i=o.split("/").filter(Boolean)?.at(-1);c(!0);const a=await(s=o,el()({path:`/extendify/v1/help-center/get-redirect?path=${s}`}));var s;if(c(!1),!a)return o.startsWith("/documentation/article/")?n({slug:i,title:void 0}):window.open(`https://wordpress.org${o}`,"_blank");n({slug:a.split("/").filter(Boolean)?.at(-1)})},i=e=>{e.preventDefault(),window.open(e.target.href,"_blank")},a=e=>e.preventDefault();return e.forEach((e=>{const{hash:t,host:n,pathname:r}=new URL(e.href);if(t&&n===window.location.host||r.startsWith("/support/category"))return e.addEventListener("click",a),e.setAttribute("aria-disabled","true"),void e.classList.add("link-disabled");if(r.match(/\.(jpg|jpeg|png|gif|pdf|doc|docx|xls|xlsx|ppt|pptx)$/))return void e.addEventListener("click",a);if(r.startsWith("/documentation/article")||r.startsWith("/support/article"))return void e.addEventListener("click",o);e.addEventListener("click",i);const s=document.createElement("span");s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" class="components-external-link__icon css-rvs7bx esh4a730" aria-hidden="true" focusable="false"><path 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"></path></svg>',e.appendChild(s)})),()=>{e.forEach((e=>{e?.removeEventListener("click",o),e?.removeEventListener("click",i),e?.removeEventListener("click",a)}))}}),[h,n]),m||l?(0,e.createElement)("div",{className:"p-8 text-base text-center"},(0,e.createElement)(jl.Spinner,null)):p?(0,e.createElement)("div",{className:"p-8 text-base text-center"},(0,k.__)("There was an error loading this article","extendify-local")):(0,e.createElement)("article",{ref:u,className:"extendify-documentation w-full","data-test":"kb-article-content"},(0,e.createElement)("h1",{className:"m-0 text-3xl"},f),h?.content&&Kl(h?.content))},Jc=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{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"})),Qc=({articles:t})=>{const{pushArticle:n}=Zc(),{navigateTo:r}=Vu();return(0,e.createElement)("ul",{className:"m-0 py-2 flex flex-col gap-1","data-test":"help-center-kb-articles-list"},t.map((({slug:t,title:o})=>(0,e.createElement)("li",{key:t,className:"m-0 py-1 pr-3 pl-2"},(0,e.createElement)("button",{type:"button",className:"text-sm bg-transparent text-gray-800 flex gap-2 hover:underline hover:underline-offset-4 cursor-pointer",onClick:()=>{n({slug:t,title:o}),r("knowledge-base-article")}},(0,e.createElement)(yl,{size:20,icon:Jc,className:"fill-gray-700 transform rotate-180"}),o)))))},eu=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),tu=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),nu=({onChange:t})=>{const{searchTerm:n,clearSearchTerm:r,reset:o}=Zc(),a=(0,i.useRef)(!1),s=(0,i.useRef)();return(0,e.createElement)("form",{method:"get",onSubmit:e=>e.preventDefault(),className:"relative w-full h-10"},(0,e.createElement)("label",{htmlFor:"ext-help-center-search",className:"sr-only"},(0,k.__)("Search for articles","extendify-local")),(0,e.createElement)("input",{ref:s,name:"ext-kb-search",autoFocus:!0,autoCapitalize:"off",id:"ext-help-center-search",type:"text",value:null!=n?n:"",onChange:e=>t(e.target.value),onFocus:()=>{a.current||(a.current=!0,fetch(`${Ll}/api/posts?boot=true`,{method:"POST"}))},placeholder:(0,k.__)("What do you need help with?","extendify-local"),className:"input border border-text-800 w-full placeholder-gray-600 text-sm h-10 px-3"}),(0,e.createElement)("div",{className:"absolute right-2 text-gray-400 flex items-center justify-center inset-y-5"},(0,e.createElement)(yl,{icon:n?tu:eu,className:Sl()("fill-current",{"cursor-pointer":n}),onClick:()=>{o(),r(),s.current?.focus()},size:24})))},ru=async e=>{if(e.length<3)return null;const t=new URLSearchParams({lang:window.extSharedData.wpLanguage||null,search:e});return await fetch(`${Ll}/api/posts?${t.toString()}`,{method:"POST"}).then((e=>{if(!e.ok)throw new Error(e.statusText);return e.json()}))},ou=["wordpress-block-editor","blocks-list","adding-a-new-block","block-pattern","block-pattern-directory"],iu=gl(window.extHelpCenterData.resourceData)?.supportArticles?.filter((e=>ou.includes(e.slug))),au=({onOpen:t})=>{const{setSearchTerm:n}=Zc();return(0,e.createElement)("section",{className:"border rounded-md","data-test":"help-center-kb-section"},(0,e.createElement)("div",{className:"bg-gray-100 p-2.5 pb-4 border-b border-gray-150"},(0,e.createElement)("h1",{className:"m-0 mb-3 p-0 text-lg font-medium"},(0,k.__)("Knowledge Base","extendify-local")),(0,e.createElement)(nu,{onChange:e=>{n(e),t()}})),(0,e.createElement)(Qc,{articles:iu.slice(0,5)}))},su=[{slug:"knowledge-base",title:(0,k.__)("Knowledge Base","extendify-local"),component:()=>{var t;const{setSearchTerm:n,searchTerm:r}=Zc(),{data:o,loading:i}=(e=>{const{data:t,error:n}=qc(e||null,ru);return{data:t,error:n,loading:!t&&!n}})(r);return(0,e.createElement)("section",{className:"p-4"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"mb-4"},(0,e.createElement)("h2",{className:"m-0 mb-2 text-sm"},r&&i?(0,k.__)("Searching...","extendify-local"):o?.length>0?(0,k.__)("Search results","extendify-local"):(0,k.__)("Search the knowledge base","extendify-local")),(0,e.createElement)(nu,{onChange:n})),i&&r?(0,e.createElement)("div",{className:"p-8 text-base text-center"},(0,e.createElement)(jl.Spinner,null)):(0,e.createElement)(Qc,{articles:null!==(t=o?.slice(0,10))&&void 0!==t?t:[]})))}},{slug:"knowledge-base-article",title:(0,k.__)("Knowledge Base","extendify-local"),component:()=>(0,e.createElement)("section",{className:"p-4"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:""},(0,e.createElement)(Kc,null))))}],lu=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M18.72,8.267L20,8.267L20,17.653C20,18.949 18.95,20 17.654,20L6.56,20L6.56,18.72L17.654,18.72C18.243,18.72 18.72,18.242 18.72,17.653L18.72,8.267Z"}),(0,e.createElement)("path",{d:"M16.8,5.387L16.8,15.413C16.8,16.179 16.179,16.8 15.413,16.8L5.387,16.8C4.621,16.8 4,16.179 4,15.413L4,5.387C4,4.621 4.621,4 5.387,4L15.413,4C16.179,4 16.8,4.621 16.8,5.387ZM15.52,5.387C15.52,5.328 15.472,5.28 15.413,5.28L5.387,5.28C5.328,5.28 5.28,5.328 5.28,5.387L5.28,15.413C5.28,15.472 5.328,15.52 5.387,15.52L15.413,15.52C15.472,15.52 15.52,15.472 15.52,15.413L15.52,5.387Z"}),(0,e.createElement)("path",{d:"M9.573,13.839L8.667,12.934L10.775,10.827L8.667,8.719L9.573,7.814L12.585,10.827L9.573,13.839Z"})),cu=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,e.createElement)("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM8 14.5V5.5L14 10L8 14.5Z",fill:"currentColor"})),uu=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,e.createElement)("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 16.5C6.69 16.5 4 13.81 4 10.5H6C6 12.71 7.79 14.5 10 14.5C12.21 14.5 14 12.71 14 10.5C14 8.26 12.15 6.41 9.84 6.51L11.41 8.08L10 9.5L6 5.5L10 1.5L11.41 2.91L9.81 4.51C13.28 4.4 16 7.18 16 10.5C16 13.81 13.31 16.5 10 16.5Z"})),du=ll(fl(dl((e=>({visibility:!1,queuedTour:null,queueTourForRedirect(t){e({queuedTour:t})},clearQueuedTour(){e({queuedTour:null})},setVisibility(t){if(!["open","minimized","closed"].includes(t))throw new Error("Invalid visibility state");e({visibility:t})}})),{name:"Extendify Help Center Globals Sync"}),{name:"extendify-help-center-globals-sync"}));var hu;const pu={currentTour:null,currentStep:void 0,preparingStep:void 0,progress:[],...null!==(hu=gl(window.extHelpCenterData.userData.tourData)?.state)&&void 0!==hu?hu:{}},mu="/extendify/v1/help-center/tour-data",fu={getItem:async()=>await el()({path:mu}),setItem:async(e,t)=>await el()({path:mu,method:"POST",data:{state:t}})},gu=ll(fl(dl(((e,t)=>({...pu,startTour:async n=>{const{trackTourProgress:r,updateProgress:o,getStepData:i,onTourPage:a}=t();a(n?.settings?.startFrom)&&(await(n?.onStart?.(n)),n.steps=n.steps?.filter((e=>e?.showOnlyIf?.()||void 0===e?.showOnlyIf?.()))||[],await(i(0,n)?.events?.beforeAttach?.(n))),e({currentTour:n,currentStep:0,preparingStep:void 0});const s=r(n.id);o(s.id,{openedCount:s.openedCount+1,lastAction:"started"})},onTourPage(e=null){const n=window.location.href;if(e?.includes(n))return!0;const{currentTour:r}=t();return r?.settings?.startFrom?.includes(n)},completeCurrentTour:async()=>{const{currentTour:n,wasCompleted:r,findTourProgress:o,updateProgress:i}=t(),a=o(n?.id);a?.id&&(r(a.id)||i(a.id,{completedAt:(new Date).toISOString(),lastAction:"completed"}),i(a.id,{completedCount:a.completedCount+1,lastAction:"completed"}),await(n?.onDetach?.()),await(n?.onFinish?.()),e({currentTour:null,currentStep:void 0}),"site-assistant-tour"===a?.id&&window.dispatchEvent(new CustomEvent("extendify-assist:is-tour-finished",{detail:{isFinished:!0}})))},closeCurrentTour:async n=>{const{currentTour:r,findTourProgress:o,updateProgress:i}=t(),a=o(r?.id);if(!a?.id)return;const s={};return["redirected"].includes(n)?i(a?.id,{lastAction:n}):["closed-by-caught-error"].includes(n)?i(a?.id,{lastAction:n,errored:!0}):("closed-manually"===n&&(s.closedManuallyCount=a.closedManuallyCount+1),await(r?.onDetach?.()),await(r?.onFinish?.()),i(a?.id,{lastAction:n,...s}),void e({currentTour:null,currentStep:void 0,preparingStep:void 0}))},findTourProgress:e=>t().progress.find((t=>t.id===e)),wasCompleted:e=>t().findTourProgress(e)?.completedAt,wasOpened:e=>t().findTourProgress(e)?.openedCount>0,isSeen:e=>t().findTourProgress(e)?.firstSeenAt,trackTourProgress(n){const{findTourProgress:r}=t();return r(n)||e((e=>({progress:[...e.progress,{id:n,firstSeenAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),completedAt:null,lastAction:"init",currentStep:0,openedCount:0,closedManuallyCount:0,completedCount:0,errored:!1}]}))),r(n)},updateProgress(t,n){var r;const o=null!==(r=n?.lastAction)&&void 0!==r?r:"unknown";e((e=>({progress:e.progress.map((e=>e.id===t?{...e,...n,lastAction:o,updatedAt:(new Date).toISOString()}:e))})))},getStepData(e,n=t().currentTour){var r;return null!==(r=n?.steps?.[e])&&void 0!==r?r:{}},hasNextStep:()=>!!t().currentTour&&t().currentStep<t().currentTour.steps.length-1,nextStep:async()=>{const{currentTour:e,goToStep:n,updateProgress:r,currentStep:o}=t(),i=o+1;await n(i),r(e.id,{currentStep:i,lastAction:"next"})},hasPreviousStep:()=>!!t().currentTour&&t().currentStep>0,prevStep:async()=>{const{currentTour:e,goToStep:n,updateProgress:r,currentStep:o}=t(),i=o-1;await n(i),r(e.id,{currentStep:i,lastAction:"prev"})},goToStep:async n=>{const{currentTour:r,updateProgress:o,closeCurrentTour:i,getStepData:a}=t(),s=r;if(n<0||n>s.steps.length-1)return void i("closed-by-caught-error");o(s.id,{currentStep:n,lastAction:`go-to-step-${n}`});const l=a(n)?.events;l?.beforeAttach&&(e((()=>({preparingStep:n}))),await Promise.allSettled([l.beforeAttach?.(s),new Promise((e=>setTimeout(e,300)))]),e((()=>({preparingStep:void 0})))),e((()=>({currentStep:n})))}})),{name:"Extendify Tour Progress"}),{name:"extendify-help-center-tour-progress",storage:pl((()=>fu)),skipHydration:!0,partialize:e=>{const{currentTour:t,currentStep:n,preparingStep:r,...o}=e;return o}})),yu=e=>new Promise((t=>{const n=setInterval((()=>{document.querySelector(e)&&(clearInterval(n),t())}),50)})),vu=e=>new Promise((t=>{const n=setInterval((()=>{document.querySelector(e)||(clearInterval(n),t())}),50)})),xu={id:"library-tour",title:(0,k.__)("Design Library","extendify-local"),settings:{allowOverflow:!0,hideDotsNav:!0,startFrom:[window.extSharedData.adminUrl+"post-new.php?post_type=page"]},onStart:async()=>{await yu("#extendify-library-btn"),document.querySelector(`[aria-label="${(0,k.__)("Settings")}"].is-pressed`)?.click()},steps:[{title:(0,k.__)("Open the Pattern Library","extendify-local"),text:(0,k.__)("The Extendify pattern library can be opened by clicking the button to the left.","extendify-local"),attachTo:{element:'#extendify-library-btn [role="button"]',offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{beforeAttach:()=>dispatchEvent(new CustomEvent("extendify::close-library"))}},{title:(0,k.__)("Filter Patterns","extendify-local"),text:(0,k.__)("Click on any pattern category to refine the selection.","extendify-local"),attachTo:{element:"#extendify-library-category-control",position:{x:"right",y:"top"},hook:"top left"},options:{allowPointerEvents:!0},events:{beforeAttach:async()=>(dispatchEvent(new CustomEvent("extendify::open-library")),await yu("#extendify-library-category-control"))}},{title:(0,k.__)("Select a Pattern","extendify-local"),text:(0,k.__)("Simply select any pattern you wish to insert into a page by clicking on it.","extendify-local"),attachTo:{element:"#extendify-library-patterns-list",position:{x:"left",y:"top"},hook:"top left"},events:{beforeAttach:async()=>{await yu("#extendify-library-patterns-list")}}},{title:(0,k.__)("View the Inserted Pattern","extendify-local"),text:(0,k.__)("The selected pattern has been inserted into the page.","extendify-local"),attachTo:{element:".wp-block-group:last-child",frame:'iframe[name="editor-canvas"]',offset:{marginTop:15,marginLeft:0},position:{x:"right",y:"top"},hook:"top right"},events:{beforeAttach:async()=>(document.querySelector("#extendify-library-patterns-list .library-pattern")?.click(),await vu("#extendify-library-patterns-list"))},options:{hideBackButton:!0}}]},wu=()=>!!document.querySelector('iframe[name="editor-canvas"]'),bu=e=>{var t;return null!==(t=13!==e.keyCode)&&void 0!==t?t:e.preventDefault()},Eu=(e="")=>`.edit-post-header-toolbar__inserter-toggle${e}, .editor-document-tools__inserter-toggle${e}`,Su={id:"page-editor-tour",title:(0,k.__)("Page editor","extendify-local"),settings:{allowOverflow:!0,startFrom:[window.extSharedData.adminUrl+"post-new.php?post_type=page"]},onStart:()=>(document.querySelector(`[aria-label="${(0,k.__)("Settings")}"].is-pressed`)?.click(),dispatchEvent(new CustomEvent("extendify::close-library"))),steps:[{title:(0,k.__)("Add a Block","extendify-local"),text:(0,k.__)("Click the plus to open the block inserter.","extendify-local"),attachTo:{element:Eu(),offset:{marginTop:15,marginLeft:0},position:{x:"left",y:"bottom"},hook:"top left"},events:{beforeAttach:async()=>(window.wp.data.select("core/edit-post").isFeatureActive("welcomeGuide")&&await window.wp.data.dispatch("core/edit-post").toggleFeature("welcomeGuide"),await yu(Eu()))}},{title:(0,k.__)("Block Inserter","extendify-local"),text:(0,k.__)("Add a block by clicking or dragging it onto the page.","extendify-local"),attachTo:{element:".block-editor-inserter__menu",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{beforeAttach:async()=>(document.querySelector(Eu(":not(.is-pressed)"))?.click(),await yu(".block-editor-inserter__tabs")),onAttach:()=>{const e=document.querySelector(Eu());Tu.observe(e,{attributes:!0}),window.addEventListener("keydown",bu)},onDetach:async()=>{Tu.disconnect(),window.removeEventListener("keydown",bu),document.querySelector(Eu(".is-pressed"))?.click(),await vu(".block-editor-inserter__block-list"),requestAnimationFrame((()=>{document.getElementById("help-center-tour-next-button")?.focus()}))}}},{title:(0,k.__)("Page Title","extendify-local"),text:(0,k.__)("Edit the page title by clicking it. Note: The title may or may not show up on the published page, depending on the page template used.","extendify-local"),attachTo:{element:()=>wu()?'iframe[name="editor-canvas"]':".wp-block-post-title",offset:()=>({marginTop:wu()?15:0,marginLeft:wu()?-15:15}),position:{x:"right",y:"top"},hook:()=>wu()?"top right":"top left"},events:{beforeAttach:async()=>{await window.wp.data.dispatch("core/editor").editPost({title:"Sample Post"})}}},{title:(0,k.__)("Blocks","extendify-local"),text:(0,k.__)("Each block will show up on the page and can be edited by clicking on it.","extendify-local"),attachTo:{element:()=>wu()?'iframe[name="editor-canvas"]':".wp-block-post-content > p",offset:()=>({marginTop:wu()?15:0,marginLeft:wu()?-15:15}),position:{x:"right",y:"top"},hook:()=>wu()?"top right":"top left"},events:{beforeAttach:async()=>{if(await window.wp.data.select("core/block-editor").getBlockCount()>0)return;const e=(0,bl.createBlock)("core/paragraph",{content:(0,k.__)("This is a sample paragraph block. It can be several sentences long and will span multiple rows. You can add as many blocks as you'd like to the page.","extendify-local")});return await window.wp.data.dispatch("core/block-editor").insertBlock(e),wu()?await window.wp.data.dispatch("core/block-editor").flashBlock(e.clientId):null}}},{title:(0,k.__)("Page and Block Settings","extendify-local"),text:(0,k.__)("Select either page or block to change the settings for the entire page or the block that is selected.","extendify-local"),attachTo:{element:".interface-interface-skeleton__sidebar",offset:{marginTop:0,marginLeft:-15},position:{x:"left",y:"top"},hook:"top right"},events:{beforeAttach:async()=>{document.querySelector(`[aria-label="${(0,k.__)("Settings")}"]:not(.is-pressed)`)?.click(),await yu(".interface-interface-skeleton__sidebar"),document.querySelector('.edit-post-sidebar__panel-tab,[data-tab-id="edit-post/document"]')?.click(),await yu(".edit-post-post-status"),document.querySelector(".edit-post-post-status:not(.is-opened) button")?.click(),await yu(".edit-post-post-status.is-opened")}}},{title:(0,k.__)("Preview","extendify-local"),text:(0,k.__)("Click preview to view how your changes look on the front end of your site.","extendify-local"),attachTo:{element:".block-editor-post-preview__button-toggle,.editor-preview-dropdown__toggle",offset:{marginTop:0,marginLeft:-15},position:{x:"left",y:"top"},hook:"top right"},events:{}},{title:(0,k.__)("Publish or Save","extendify-local"),text:(0,k.__)("Click publish or update to save the changes you have made to the page and make them live on the site.","extendify-local"),attachTo:{element:".editor-post-publish-button__button",offset:{marginTop:15},position:{x:"right",y:"bottom"},hook:"top right"},events:{}}]},Tu=new MutationObserver((()=>{document.querySelector(Eu(":not(.is-pressed)"))?.click()})),Cu={id:"plugin-install-tour",title:(0,k.__)("Installing a plugin","extendify-local"),settings:{allowOverflow:!1,startFrom:[window.extSharedData.adminUrl+"plugin-install.php"]},onStart:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-plugins").classList.add("opensub")},steps:[{title:(0,k.__)("Add New plugin menu","extendify-local"),text:(0,k.__)("Click here to access the Add Plugins page.","extendify-local"),attachTo:{element:'#menu-plugins .wp-submenu a[href="plugin-install.php"]',offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onDetach:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-plugins").classList.remove("opensub")}}},{title:(0,k.__)("Search","extendify-local"),text:(0,k.__)("Search for a plugin by name or functionality.","extendify-local"),attachTo:{element:".search-form.search-plugins",offset:{marginTop:5,marginLeft:-15},boxPadding:{top:-5,bottom:3,left:5,right:5},position:{x:"left",y:"top"},hook:"top right"},events:{}},{title:(0,k.__)("Plugin details","extendify-local"),text:(0,k.__)("See important information about each plugin.","extendify-local"),attachTo:{element:"#the-list .plugin-card:first-child .plugin-card-bottom",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"bottom"},hook:"bottom left"},events:{}},{title:(0,k.__)("Install now","extendify-local"),text:(0,k.__)("Install the plugin. Then, press this button again to activate the plugin.","extendify-local"),attachTo:{element:"#the-list .plugin-card:first-child .install-now",offset:{marginTop:-5,marginLeft:15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Upload Plugin","extendify-local"),text:(0,k.__)("If you have a plugin from an external source, you can upload it directly here.","extendify-local"),attachTo:{element:".upload-view-toggle",offset:{marginTop:-5,marginLeft:15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"right",y:"top"},hook:"top left"},events:{}}]},Pu={id:"plugin-management-tour",title:(0,k.__)("Plugin management","extendify-local"),settings:{allowOverflow:!1,startFrom:[window.extSharedData.adminUrl+"plugins.php"]},onStart:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-plugins").classList.add("opensub")},steps:[{title:(0,k.__)("Installed Plugins menu","extendify-local"),text:(0,k.__)("Click this menu to see and manage the plugins you have installed.","extendify-local"),attachTo:{element:"#menu-plugins ul > li:nth-child(2)",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onDetach:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-plugins").classList.remove("opensub")}}},{title:(0,k.__)("Installed plugins","extendify-local"),text:(0,k.__)("See all plugins installed on your site. This includes plugins that are active and deactivated.","extendify-local"),attachTo:{element:"tbody#the-list > tr:nth-child(1)",offset:{marginTop:15,marginLeft:0},position:{x:"right",y:"bottom"},hook:"top right"},events:{}},{title:(0,k.__)("Deactivate/activate option","extendify-local"),text:(0,k.__)("Under each plugin you can activate or deactivate it.","extendify-local"),attachTo:{element:"tbody#the-list > tr:nth-child(1) > td.plugin-title",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Add another","extendify-local"),text:(0,k.__)("Click here to add another plugin to your site.","extendify-local"),attachTo:{element:"a.page-title-action",offset:{marginTop:-5,marginLeft:15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"right",y:"top"},hook:"top left"},events:{}}]},ku={id:"site-assistant-tour",title:(0,k.__)("Site Assistant","extendify-local"),settings:{allowOverflow:!1,startFrom:[`${window.extSharedData.adminUrl}admin.php?page=extendify-assist#dashboard`]},steps:[{title:(0,k.__)("Tasks","extendify-local"),text:(0,k.__)("Now that you've created your starter site, make it your own with these follow up tasks.","extendify-local"),showOnlyIf:()=>document.getElementById("assist-tasks-module"),attachTo:{element:"#assist-tasks-module",offset:{marginTop:window.innerWidth<=1151?-15:2,marginLeft:window.innerWidth<=1151?-25:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Quick Links","extendify-local"),text:(0,k.__)("Easily access some of the most common items in WordPress with these quick links.","extendify-local"),attachTo:{element:"#assist-quick-links-module",offset:{marginTop:window.innerWidth<=1151?-15:2,marginLeft:window.innerWidth<=1151?-25:15},position:{x:"right",y:"top"},hook:"top left"},events:{onAttach:()=>{}}},{title:(0,k.__)("Website Tools & Plugins","extendify-local"),text:(0,k.__)("See our personalized recommendations for you that will help you accomplish your goals.","extendify-local"),showOnlyIf:()=>document.querySelector("#assist-recommendations-module"),attachTo:{element:"#assist-recommendations-module",offset:{marginTop:window.innerWidth<=1151?-15:2,marginLeft:window.innerWidth<=1151?-25:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Help Center","extendify-local"),text:(0,k.__)("You can always access the help center by clicking this button.","extendify-local"),showOnlyIf:()=>document.querySelector("#wp-admin-bar-help-center-btn"),attachTo:{element:"#wp-admin-bar-help-center-btn",offset:{marginTop:45,marginLeft:-5},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Visit your site","extendify-local"),text:(0,k.__)("You can always visit your site by clicking this button.","extendify-local"),attachTo:{element:"#assist-menu-bar",offset:{marginTop:20,marginLeft:-5},position:{x:"left",y:"bottom"},hook:"top left",boxPadding:{top:5,bottom:5,left:5,right:5}},events:{}},{title:(0,k.__)("Site Assistant","extendify-local"),text:(0,k.__)("Come back to the Site Assistant any time by clicking the menu item.","extendify-local"),attachTo:{element:"#toplevel_page_extendify-admin-page",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onAttach:()=>{document.body.classList.contains("folded")&&(document.body.classList.remove("folded"),document.body.classList.add("temp-open"))},onDetach:()=>{document.body.classList.contains("temp-open")&&(document.body.classList.remove("temp-open"),document.body.classList.add("folded"))}}}]},_u={id:"users-screen-tour",title:(0,k.__)("Users screen","extendify-local"),settings:{allowOverflow:!0,startFrom:[window.extSharedData.adminUrl+"users.php"]},onStart:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-users").classList.add("opensub")},steps:[{title:(0,k.__)("All Users menu","extendify-local"),text:(0,k.__)("Click here to view and manage the users on your site.","extendify-local"),attachTo:{element:"#menu-users ul > li:nth-child(2)",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onDetach:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-users").classList.remove("opensub")}}},{title:(0,k.__)("Users","extendify-local"),text:(0,k.__)("See all of your users, including admin users in this table.","extendify-local"),attachTo:{element:"tbody#the-list > tr:nth-child(1)",offset:{marginTop:15,marginLeft:0},position:{x:"right",y:"bottom"},hook:"top right"},events:{}},{title:(0,k.__)("Edit user information","extendify-local"),text:(0,k.__)("Click the edit button to change the user's role, manage their account, or change their profile information.","extendify-local"),attachTo:{element:"tbody#the-list > tr:nth-child(1) > td.username",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onAttach:()=>{document.querySelector("tbody#the-list > tr:nth-child(1) > td.username .row-actions").style.left="0"},onDetach:()=>{document.querySelector("tbody#the-list > tr:nth-child(1) > td.username .row-actions").style.left="-9999em"}}},{title:(0,k.__)("Search for users","extendify-local"),text:(0,k.__)("Use the search bar to find a particular user.","extendify-local"),attachTo:{element:"p.search-box",offset:{marginTop:-5,marginLeft:-15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"left",y:"top"},hook:"top right"},events:{}},{title:(0,k.__)("Add a new user","extendify-local"),text:(0,k.__)("Click the Add New button to add a new user to your site.","extendify-local"),attachTo:{element:".page-title-action",offset:{marginTop:-5,marginLeft:15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"right",y:"top"},hook:"top left"},events:{}}]},Au={"welcome-tour":{id:"welcome-tour",title:(0,k.__)("Getting started with WordPress","extendify-local"),settings:{allowOverflow:!0,startFrom:[window.extSharedData.adminUrl+"index.php",window.extSharedData.adminUrl+"admin.php?page=extendify-assist#dashboard"],minBoxWidth:"360px"},onStart:()=>{document.body.classList.contains("folded")&&(document.body.classList.remove("folded"),document.body.classList.add("temp-open"))},onFinish:()=>{document.body.classList.contains("temp-open")&&(document.body.classList.remove("temp-open"),document.body.classList.add("folded"))},steps:[{title:(0,k.__)("View Site","extendify-local"),text:(0,k.__)("At any time, you can view your site (from a visitor's perspective) from the top admin bar under your site's name.","extendify-local"),image:"https://assets.extendify.com/tours/welcome/view-site.gif",attachTo:{element:"#wp-admin-bar-view-site",offset:{marginTop:0,marginLeft:10},position:{x:"right",y:"top"},hook:"top left"},events:{beforeAttach:()=>{const e=document.querySelector("#wp-admin-bar-site-name .ab-sub-wrapper");e.style.position="relative",e.style.display="block"},onAttach:()=>{const e=document.querySelector("#wp-admin-bar-site-name .ab-sub-wrapper");e.style.position="relative",e.style.display="block"},onDetach:()=>{const e=document.querySelector("#wp-admin-bar-site-name .ab-sub-wrapper");e.style.position="absolute",e.style.display=""}}},{title:(0,k.__)("Site Assistant","extendify-local"),text:(0,k.__)("Access the Site Assistant at any time.","extendify-local"),attachTo:{element:"#toplevel_page_extendify-admin-page",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:document.getElementById("toplevel_page_wpSq")?.textContent?.replace(/[^\w\s²]/g,"").trim(),text:(0,k.__)("Click here to go to your website management dashboard. From there you will be able to create more websites, and manage your account settings.","extendify-local"),showOnlyIf:()=>document.getElementById("toplevel_page_wpSq"),attachTo:{element:"#toplevel_page_wpSq",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Dashboard","extendify-local"),text:(0,k.__)("The default WordPress dashboard will have some overall site metrics and modules added from certain plugins.","extendify-local"),attachTo:{element:"#menu-dashboard",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Posts","extendify-local"),text:(0,k.__)("Manage and create blog posts.","extendify-local"),attachTo:{element:"#menu-posts",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Media","extendify-local"),text:(0,k.__)("Add, edit, or remove images and other media from your library. When you upload an image to be used on your site, it will be added to the library.","extendify-local"),attachTo:{element:"#menu-media",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Pages","extendify-local"),text:(0,k.__)("Use the pages menu to add, delete, or edit the pages on your site.","extendify-local"),image:"https://assets.extendify.com/tours/welcome/add-pages.gif",attachTo:{element:"#menu-pages",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Comments","extendify-local"),text:(0,k.__)("If you have commenting enabled on your posts, you can manage those comments here.","extendify-local"),attachTo:{element:"#menu-comments",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Appearance","extendify-local"),text:(0,k.__)("Manage your theme and access the Site Editor from the Appearance menu. The Site Editor is where you can make global changes to your site (such as the menu, header/footer, and styles).","extendify-local"),attachTo:{element:"#menu-appearance",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Plugins","extendify-local"),text:(0,k.__)("Add or manage the plugins on your site.","extendify-local"),attachTo:{element:"#menu-plugins",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Users","extendify-local"),text:(0,k.__)("Add or manage users on your site, both admin users and others.","extendify-local"),attachTo:{element:"#menu-users",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Tools","extendify-local"),text:(0,k.__)("Import/export post data, check site health, and edit theme or plugin files directly in the WordPress admin.","extendify-local"),attachTo:{element:"#menu-tools",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Settings","extendify-local"),text:(0,k.__)("Advanced settings for your site and for certain plugins.","extendify-local"),attachTo:{element:"#menu-settings",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("Collapse menu","extendify-local"),text:(0,k.__)("Use this toggle to collapse or expand the sidebar menu.","extendify-local"),attachTo:{element:"#collapse-menu",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,k.__)("User","extendify-local"),text:(0,k.__)("Manage your profile or log out of your account here.","extendify-local"),attachTo:{element:"#wp-admin-bar-user-actions",offset:{marginTop:0,marginLeft:-15},position:{x:"left",y:"top"},hook:"top right"},events:{beforeAttach:()=>{const e=document.querySelector("#wp-admin-bar-my-account .ab-sub-wrapper");e.style.position="relative",e.style.display="block"},onAttach:()=>{const e=document.querySelector("#wp-admin-bar-my-account .ab-sub-wrapper");e.style.position="relative",e.style.display="block",document.querySelector("#help-center-tour-next-button")?.focus()},onDetach:()=>{const e=document.querySelector("#wp-admin-bar-my-account .ab-sub-wrapper");e.style.position="absolute",e.style.display=""}}}]},"plugin-install-tour":Cu,"plugin-management-tour":Pu,"page-editor-tour":Su,"library-tour":xu,"users-screen-tour":_u,"site-assistant-tour":ku},Lu=({onOpen:t,classes:n})=>{const{startTour:r}=gu(),{setVisibility:o}=du(),i=Object.values(Au).filter((e=>e.settings.startFrom.includes(window.location.href)||!e.settings.startFrom));return(0,e.createElement)("section",{className:n,"data-test":"help-center-tours-section"},(0,e.createElement)("button",{"data-test":"help-center-tours-open-button",type:"button",onClick:t,className:Sl()("rounded-md border border-gray-200 w-full text-left m-0 p-2.5 bg-transparent flex justify-between gap-2 cursor-pointer hover:bg-gray-100",{"rounded-b-none":i.length>0})},(0,e.createElement)(yl,{icon:lu,className:"p-2 bg-design-main fill-design-text border-0 rounded-full",size:48}),(0,e.createElement)("div",{className:"grow pl-1"},(0,e.createElement)("h1",{className:"m-0 p-0 text-lg font-medium"},(0,k.__)("Tours","extendify-local")),(0,e.createElement)("p",{className:"m-0 p-0 text-xs text-gray-800"},(0,k.__)("Learn more about your WordPress admin","extendify-local"))),(0,e.createElement)("div",{className:"flex justify-between items-center h-12 grow-0"},(0,e.createElement)(yl,{icon:wl,size:24,className:"fill-current text-gray-700"}))),i.length>0&&(0,e.createElement)("button",{type:"button",className:"rounded-md border border-t-0 border-gray-200 rounded-t-none w-full bg-transparent text-gray-900 hover:bg-gray-100 cursor-pointer p-3 text-md font-medium m-0 px-4 text-left justify-between items-center flex gap-2 pl-[4.25rem]",onClick:()=>{o("minimized"),r(i[0])}},(0,k.__)("Tour this page","extendify-local"),(0,e.createElement)(yl,{icon:cu,size:16})))},Mu=[{slug:"tours",title:(0,k.__)("Tours","extendify-local"),component:()=>{const{wasCompleted:t,startTour:n}=gu(),{setVisibility:r}=du();return(0,e.createElement)("section",{className:"p-4"},(0,e.createElement)("ul",{className:"m-0 p-0 flex flex-col gap-2","data-test":"help-center-tours-items-list"},Object.values(Au).map((o=>{const{id:i,title:a}=o;return(0,e.createElement)("li",{key:i,className:"m-0 p-0"},(0,e.createElement)("button",{type:"button",className:"text-sm font-medium m-0 py-3.5 px-4 w-full bg-gray-100 text-gray-900 hover:bg-gray-150 cursor-pointer flex gap-2 justify-between items-center",onClick:()=>{r("minimized"),n(o)}},a,t(i)?(0,e.createElement)(yl,{"data-test":"restart-tour-icon",icon:uu,size:16}):(0,e.createElement)(yl,{"data-test":"play-tour-icon",icon:cu,size:16})))}))))}}],Du=[{slug:"dashboard",title:(0,k.__)("Help Center","extendify-local"),component:()=>{const{navigateTo:t}=Vu();return(0,e.createElement)("div",{className:"mx-auto w-full max-w-md rounded-2xl flex flex-col gap-3 p-4"},(0,e.createElement)(au,{onOpen:()=>t("knowledge-base")}),(0,e.createElement)(Lu,{onOpen:()=>t("tours"),classes:"hidden md:block"}),window.extHelpCenterData?.showChat&&(0,e.createElement)(Gl,{onOpen:()=>t("ai-chat")}))}},...su,...Mu,...Xl],Nu="/extendify/v1/help-center/router-data",Ou={getItem:async()=>await el()({path:Nu}),setItem:async(e,t)=>await el()({path:Nu,method:"POST",data:{state:t}})},Ru=ll(fl(dl(((e,t)=>{var n;return{history:[],viewedPages:[],current:null,...null!==(n=gl(window.extHelpCenterData.userData)?.state)&&void 0!==n?n:{},goBack:()=>{t().history.length<2||e((e=>({history:e.history.slice(1),current:t().history[1]})))},setCurrent:n=>{n&&t().history[0]?.slug!==n.slug&&e((e=>{const t=(new Date).toISOString(),r=t,o=e.viewedPages.find((e=>e.slug===n.slug));return{history:[n,...e.history].filter(Boolean),current:n,viewedPages:[...e.viewedPages.filter((e=>e.slug!==n.slug)),o?{...o,count:o.count+1,lastViewedAt:t}:{slug:n.slug,firstViewedAt:r,lastViewedAt:t,count:1}]}}))}}}),{name:"Extendify Help Center Router"}),{name:"extendify-help-center-router",storage:pl((()=>Ou)),skipHydration:!0,partialize:({viewedPages:e})=>({viewedPages:e})})),Vu=()=>{var t;const{current:n,setCurrent:r,history:o,goBack:a}=Ru(),s=null!==(t=n?.component)&&void 0!==t?t:()=>null;return(0,i.useEffect)((()=>{n||r(Du[0])}),[n,r]),{current:n,CurrentPage:(0,i.useCallback)((()=>(0,e.createElement)("div",{role:"region","aria-live":"polite",className:"h-full"},(0,e.createElement)("h1",{className:"sr-only"},n?.title),(0,e.createElement)(s,null))),[n]),navigateTo:e=>{const t=Du.find((t=>t.slug===e));r(null!=t?t:Du[0])},goBack:a,history:o}},Iu=()=>{const{CurrentPage:t}=Vu();return(0,e.createElement)("div",{className:"w-full h-full"},(0,e.createElement)(t,null))},Fu=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),ju=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(vl.Path,{d:"M7 11.5h10V13H7z"})),{partnerLogo:Bu,partnerName:Hu}=window.extSharedData,zu=()=>{const{visibility:t,setVisibility:n}=du(),{current:r,history:o}=Vu(),i="minimized"===t,a=()=>{n(i?"open":"minimized")};return(0,e.createElement)("div",{className:"relative bg-banner-main flex justify-end items-center p-4 gap-x-2"},(0,e.createElement)("div",{role:i?"button":"heading",onClick:i?a:void 0,"aria-label":i?(0,k.__)("Show Help Center","extendify-local"):void 0,"aria-expanded":i?"false":"true",className:Sl()("bg-banner-main flex justify-between w-full",{"cursor-pointer":i})},(0,e.createElement)("div",{className:Sl()("flex w-full gap-1",{"gap-4":1===o.length})},(0,e.createElement)(Uu,null),r?.title&&(0,e.createElement)("span",{className:"text-banner-text border-banner-text text-base font-medium"},r.title))),(0,e.createElement)("div",{className:"flex justify-end items-center gap-2.5"},(0,e.createElement)("button",{className:"text-banner-text fill-banner-text border-0 bg-transparent p-0 m-0 cursor-pointer",type:"button","data-test":"help-center-toggle-minimize-button",onClick:a},i?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yl,{className:"fill-current rotate-90",icon:Fu,size:24}),(0,e.createElement)("span",{className:"sr-only"},(0,k.__)("Show Help Center","extendify-local"))):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yl,{className:"fill-current",icon:ju,size:24}),(0,e.createElement)("span",{className:"sr-only"},(0,k.__)("Minimize Help Center","extendify-local")))),(0,e.createElement)("button",{className:"text-banner-text fill-banner-text border-0 bg-transparent p-0 m-0 cursor-pointer",type:"button","data-test":"help-center-close-button",onClick:()=>n("closed")},(0,e.createElement)(yl,{icon:tu,size:24}),(0,e.createElement)("span",{className:"sr-only"},(0,k.__)("close","extendify-local")))))},Uu=()=>{const{goBack:t,history:n}=Vu(),{visibility:r}=du();return n.length>1&&"open"===r?(0,e.createElement)("button",{className:"text-banner-text fill-banner-text border-0 bg-transparent p-0 m-0 cursor-pointer",type:"button",onClick:t},(0,e.createElement)(yl,{icon:Fu}),(0,e.createElement)("span",{className:"sr-only"},(0,k.__)("Go back","extendify-local"))):Bu?(0,e.createElement)("div",{className:"bg-banner-main flex justify-center h-6 after:text-banner-text after:opacity-40 after:relative after:-right-2 after:top-0.5 after:content-['|']"},(0,e.createElement)("div",{className:"flex h-6 overflow-hidden max-w-[9rem]"},(0,e.createElement)("img",{className:"max-w-full max-h-full object-contain",src:Bu,alt:Hu}))):null},qu=()=>(0,e.createElement)("div",{className:"shadow-2xl overflow-hidden rounded-md border border-gray-500","data-test":"help-center-minimize-state"},(0,e.createElement)(zu,null)),$u=()=>{const{visibility:t}=du();return"minimized"===t?(0,e.createElement)("div",{className:"extendify-help-center"},(0,e.createElement)("div",{className:"fixed mx-auto z-high md:m-8 bottom-0 right-0 w-[420px]"},(0,e.createElement)(qu,null))):"open"!==t?null:(0,e.createElement)(St,{ref:async()=>{await Promise.resolve(),document?.documentElement?.style&&(document.documentElement.style.overflow="unset")},className:"extendify-help-center","data-test":"help-center-modal",open:"open"===t,static:!0,onClose:()=>{}},(0,e.createElement)("div",{className:"fixed mx-auto z-high md:m-8 md:mt-20 max-w-[420px] w-full bottom-0 right-0 h-full max-h-[589px]"},(0,e.createElement)(Js.div,{key:"help-center-modal",initial:{y:6,opacity:0},animate:{y:0,opacity:1},exit:{y:0,opacity:0},transition:{duration:.2,delay:.1},className:"sm:flex h-full w-full relative shadow-2xl-flipped md:shadow-2xl md:rounded-md sm:overflow-hidden mx-auto"},(0,e.createElement)(St.Title,{className:"sr-only"},(0,k.__)("Extendify Help Center","extendify-local")),(0,e.createElement)("div",{className:"flex flex-col w-full relative h-full bg-gray-50 md:overflow-hidden rounded-md border border-gray-400"},(0,e.createElement)(zu,null),(0,e.createElement)("div",{className:"overflow-y-auto flex-grow overscroll-contain"},(0,e.createElement)(Iu,null))))))},Wu=e=>{const{top:t,right:n,bottom:r,left:o,width:i,height:a,x:s,y:l}=e.getBoundingClientRect();return{top:t,right:n,bottom:r,left:o,width:i,height:a,x:s,y:l}},Gu=()=>{var t,n;const r=(0,i.useRef)(),{currentTour:o,currentStep:a,startTour:s,closeCurrentTour:l,getStepData:c,onTourPage:u}=gu(),{settings:d}=o||{},{image:h,title:p,text:m,attachTo:f,events:g,options:y}=c(a),{queueTourForRedirect:v,queuedTour:x,clearQueuedTour:w}=du(),{element:b,frame:E,offset:S,position:T,hook:C,boxPadding:_}=f||{},A=(0,i.useMemo)((()=>"function"==typeof b?b():b),[b]),L=(0,i.useMemo)((()=>"function"==typeof E?E():E),[E]),M=(0,i.useMemo)((()=>"function"==typeof S?S():S),[S]),D=(0,i.useMemo)((()=>"function"==typeof C?C():C),[C]),N=(0,i.useRef)(),O=(0,i.useRef)(!1),[R,V]=(0,i.useState)(null),[I,F]=(0,i.useState)(!1),[j,B]=(0,i.useState)(!1),[H,z]=(0,i.useState)(null),[U,q]=(0,i.useState)({x:void 0,y:void 0,...M}),$=(0,i.useCallback)(((e,t)=>{q(20===e?{x:e,y:t}:{x:e,y:t,...M})}),[M]),W=(0,i.useCallback)((()=>{const e=D?.split(" ")||[];return{x:e.includes("right")?r.current?.offsetWidth:0,y:e.includes("bottom")?r.current?.offsetHeight:0}}),[D]),G=(0,i.useCallback)((()=>{var e,t,n,o;if(!R)return;const i=L&&null!==(e=document.querySelector(L)?.contentDocument)&&void 0!==e?e:document,a=Wu(null!==(t=i.querySelector(A))&&void 0!==t?t:R);if(i!==document){const e=Wu(i.defaultView.frameElement);a.x+=e.x,a.left+=e.x,a.right+=e.x,a.y+=e.y,a.top+=e.y,a.bottom+=e.y}if(window.innerWidth<=960)return void l("closed-resize");if(void 0===T?.x)return $(void 0,void 0),z(null),void B(!1);const s=Math.max(20,a?.[T.x]-W().x),c=Math.max(20,a?.[T.y]-W().y),u=r.current;$(Math.min(s,window.innerWidth-(null!==(n=u?.offsetWidth)&&void 0!==n?n:0)-20),Math.min(c,window.innerHeight-(null!==(o=u?.offsetHeight)&&void 0!==o?o:0)-20)),z(a)}),[R,T,W,$,L,A,l]);if((0,i.useLayoutEffect)((()=>{d?.startFrom&&(u()||(F(!0),v(o.id),l("redirected"),window.location.assign(d?.startFrom[0]),window.location.href.split("#")[0]===d.startFrom[0].split("#")[0]&&window.location.reload()))}),[d?.startFrom,o,v,l,u]),(0,i.useEffect)((()=>{const e=e=>{const{tourSlug:t}=e.detail;Au[t]&&requestAnimationFrame((()=>{window.dispatchEvent(new CustomEvent("extendify-hc:minimize")),s(Au[t])}))};return window.addEventListener("extendify-assist:start-tour",e),()=>{window.removeEventListener("extendify-assist:start-tour",e)}}),[s]),(0,i.useLayoutEffect)((()=>{if(I)return;const e=x;let t=0;if(!e||!Au[e])return w();const n=()=>{requestAnimationFrame((()=>{s(Au[e])})),w()};return addEventListener("load",n),"complete"===document.readyState&&(t=requestAnimationFrame(n)),()=>{cancelAnimationFrame(t),removeEventListener("load",n)}}),[s,x,w,I]),(0,i.useEffect)((()=>{var e,t;if(!A)return;const n=null!==(t=(L&&null!==(e=document.querySelector(L)?.contentDocument)&&void 0!==e?e:document).querySelector(A))&&void 0!==t?t:document.querySelector(A);return n?(V(n),()=>V(null)):void 0}),[L,A]),(0,i.useLayoutEffect)((()=>{if(R&&!I)return B(!0),G(),addEventListener("resize",G),y?.allowPointerEvents||(R.style.pointerEvents="none"),()=>{removeEventListener("resize",G),R.style.pointerEvents="auto"}}),[I,R,G,y]),(0,i.useEffect)((()=>{O.current||a&&(O.current=!0)}),[a]),(0,i.useEffect)((()=>{if(void 0===a||!R)return;g?.onAttach?.(R);let e=0;const t=requestAnimationFrame((()=>{R.scrollIntoView({block:"start"}),G(),e=requestAnimationFrame(G)}));return N?.current?.focus(),()=>{g?.onDetach?.(R),cancelAnimationFrame(t),cancelAnimationFrame(e)}}),[a,g,R,G,N]),(0,i.useLayoutEffect)((()=>{if(d?.allowOverflow)return document.documentElement.classList.add("ext-force-overflow-auto"),()=>{document.documentElement.classList.remove("ext-force-overflow-auto")}}),[d]),!j)return null;const Y=Zu(H,_);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(P,null,Boolean(o)&&(0,e.createElement)(St,{as:Js.div,static:!0,initialFocus:N,className:"extendify-help-center",open:Boolean(o),onClose:()=>{}},(0,e.createElement)("div",{className:"relative z-max"},(0,e.createElement)(Js.div,{ref:r,animate:{opacity:1,...U},initial:{opacity:0,...U},onAnimationComplete:()=>{G()},transition:{duration:O.current?.5:0,ease:"easeInOut"},className:"fixed top-0 left-0 shadow-2xl sm:overflow-hidden bg-transparent flex flex-col max-w-xs z-20",style:{minWidth:null!==(t=d?.minBoxWidth)&&void 0!==t?t:"325px"}},(0,e.createElement)("button",{"data-test":"close-tour",className:"absolute bg-white cursor-pointer flex ring-gray-200 ring-1 focus:ring-wp focus:ring-design-main focus:shadow-none h-6 items-center justify-center leading-none m-2 outline-none p-0 right-0 rounded-full top-0 w-6 border-0 z-20",onClick:()=>l("closed-manually"),"aria-label":(0,k.__)("Close Modal","extendify-local")},(0,e.createElement)(yl,{icon:Il,className:"w-4 h-4 fill-current"})),(0,e.createElement)(St.Title,{className:"sr-only"},null!==(n=o?.title)&&void 0!==n?n:(0,k.__)("Tour","extendify-local")),h&&(0,e.createElement)("div",{className:"w-full p-6",style:{minHeight:150,background:"linear-gradient(58.72deg, #485563 7.71%, #29323C 92.87%)"}},(0,e.createElement)("img",{src:h,className:"w-full block",alt:p})),(0,e.createElement)("div",{className:"m-0 p-6 pt-0 text-left relative bg-white"},p&&(0,e.createElement)("h2",{className:"text-xl font-medium mb-2"},p),m&&(0,e.createElement)("p",{className:"mb-6"},m),(0,e.createElement)(Xu,{initialFocus:N})))))),y?.allowPointerEvents||(0,e.createElement)("div",{"aria-hidden":!0,className:"fixed inset-0 z-max-1"}),(0,e.createElement)(P,null,Boolean(o)&&void 0!==H?.left&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Js.div,{initial:{opacity:0,clipPath:"polygon(0px 0px, 100% 0px, 100% 100%, 0px 100%, 0 0)"},animate:{opacity:1,clipPath:`polygon(0px 0px, 100% 0px, 100% 100%, 0px 100%, 0 0, ${Y.left}px 0, ${Y.left}px ${Y?.bottom}px, ${Y?.right}px ${Y.bottom}px, ${Y.right}px ${Y.top}px, ${Y.left}px ${Y.top}px)`},transition:{duration:O.current?.5:0,ease:"easeInOut"},className:"hidden lg:block fixed inset-0 bg-black/70 z-max-1","aria-hidden":"true"}),(0,e.createElement)(Yu,{rectWithPadding:Y,finishedStepOne:O}))))},Yu=({rectWithPadding:t,finishedStepOne:n})=>{const[r,o]=(0,i.useState)(!1);return(0,e.createElement)(Js.div,{initial:{...null!=t?t:{}},animate:{...null!=t?t:{}},transition:{duration:n.current?.5:0,ease:"easeInOut"},onAnimationStart:()=>o(!1),onAnimationComplete:()=>o(!0),className:Sl()("hidden lg:block fixed inset-0 border-2 z-high",{"border-transparent":!r,"border-design-main":r}),"aria-hidden":"true"})},Xu=({initialFocus:t})=>{const{goToStep:n,completeCurrentTour:r,currentStep:o,preparingStep:i,getStepData:a,hasNextStep:s,nextStep:l,hasPreviousStep:c,prevStep:u,currentTour:d}=gu(),{options:h={}}=a(o),{hideBackButton:p=!1}=h,{steps:m,settings:f}=d||{};return(0,e.createElement)("div",{id:"extendify-tour-navigation",className:"flex justify-between items-center w-full"},(0,e.createElement)("div",{className:"flex-1 flex justify-start"},(0,e.createElement)(P,null,c()&&!p&&(0,e.createElement)(Js.div,{initial:{opacity:0},animate:{opacity:1}},(0,e.createElement)("button",{className:"flex gap-2 p-0 h-8 rounded-sm items-center justify-center bg-transparent hover:bg-transparent focus:outline-none ring-design-main focus:ring-wp focus:ring-offset-1 focus:ring-offset-white text-gray-900 disabled:opacity-60",onClick:u,disabled:i>-1},i<o&&(0,e.createElement)(jl.Spinner,{className:"text-design-main m-0 h-4"}),(0,e.createElement)("span",null,(0,k.__)("Back","extendify-local")))))),m?.length>2&&!f?.hideDotsNav?(0,e.createElement)("nav",{role:"navigation","aria-label":(0,k.__)("Tour Steps","extendify-local"),className:"flex-1 flex items-center justify-center gap-1 -translate-x-3"},m.map(((t,r)=>(0,e.createElement)("div",{key:r},(0,e.createElement)("button",{"aria-label":(0,k.sprintf)( // translators: %1$s is the current step, %2$s is the total number of steps (0,k.__)("%1$s of %2$s","extendify-local"),r+1,m.length),"aria-current":r===o,className:"focus:ring-wp focus:outline-none ring-offset-1 ring-offset-white focus:ring-design-main block cursor-pointer w-2.5 h-2.5 m-0 p-0 rounded-full "+(r===o?"bg-design-main":"bg-gray-300"),onClick:()=>n(r),disabled:i>-1}))))):null,(0,e.createElement)("div",{className:"flex-1 flex justify-end"},s()?(0,e.createElement)(jl.Button,{ref:t,id:"help-center-tour-next-button","data-test":"help-center-tour-next-button",onClick:l,disabled:i>-1,className:"flex gap-2 text-design-text bg-design-main focus:text-design-text disabled:opacity-60",variant:"primary"},i>o&&(0,e.createElement)(jl.Spinner,{className:"text-design-main m-0 h-4"}),(0,e.createElement)("span",null,(0,k.__)("Next","extendify-local"))):(0,e.createElement)(jl.Button,{id:"help-center-tour-next-button","data-test":"help-center-tour-next-button",onClick:()=>{r()},className:"bg-design-main",variant:"primary"},(0,k.__)("Done","extendify-local"))))},Zu=(e,t)=>{var n,r,o,i,a,s,l,c,u,d;return{top:e.top-(null!==(n=t?.top)&&void 0!==n?n:0),left:e.left-(null!==(r=t?.left)&&void 0!==r?r:0),right:e.right+(null!==(o=t?.right)&&void 0!==o?o:0),bottom:e.bottom+(null!==(i=t?.bottom)&&void 0!==i?i:0),width:e.width+(null!==(a=t?.left)&&void 0!==a?a:0)+(null!==(s=t?.right)&&void 0!==s?s:0),height:e.height+(null!==(l=t?.top)&&void 0!==l?l:0)+(null!==(c=t?.bottom)&&void 0!==c?c:0),x:e.x-(null!==(u=t?.left)&&void 0!==u?u:0),y:e.y-(null!==(d=t?.top)&&void 0!==d?d:0)}},Ku=()=>{const{setVisibility:t,visibility:n}=du();return(0,i.useEffect)((()=>{const e=()=>{"open"===n&&t("minimized")};return window.addEventListener("extendify-hc:minimize",e),()=>{window.removeEventListener("extendify-hc:minimize",e)}}),[t,n]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(P,null,(0,e.createElement)($u,null)),(0,e.createElement)(Gu,null))},Ju=(e,t)=>{"function"==typeof i.createRoot?(0,i.createRoot)(t).render(e):(0,i.render)(e,t)},Qu=()=>{const e=new URLSearchParams(window.location.search);return["page"].includes(e.get("extendify-launch"))},ed=window.wp.plugins,td=(0,e.createElement)(vl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},(0,e.createElement)(vl.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1 16v-2h2v2h-2zm2-3v-1.141A3.991 3.991 0 0016 10a4 4 0 00-8 0h2c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2a1 1 0 00-1 1v2h2z"})),nd=()=>{const{setVisibility:t}=du();return(0,e.createElement)("button",{type:"button","data-test":"help-center-adminbar-button",onClick:()=>t("open"),className:"cursor-pointer inline-flex justify-center items-center gap-1 leading-extra-tight p-1 px-2 rounded-sm h-6 -mt-1 m-1.5 bg-wp-theme-main text-white border-0 focus:ring-wp focus:ring-wp-theme-main focus:outline-none ring-offset-1 ring-offset-wp-theme-bg"},(0,k.__)("Help","extendify-local"),(0,e.createElement)(jl.Icon,{icon:td,width:18,height:18,className:"fill-design-text"}))},rd=()=>{const{setVisibility:t}=du();return(0,e.createElement)(jl.Button,{className:"inline-flex gap-1 ml-1","data-test":"help-center-editor-page-button",onClick:()=>t("open"),variant:"primary"},(0,k.__)("Help","extendify-local"),(0,e.createElement)(yl,{icon:td,width:18,height:18,className:"fill-design-text"}))};(()=>{if(Qu())return;const t="wp-admin-bar-help-center-btn";if(document.getElementById(t))return;const n=Object.assign(document.createElement("li"),{className:"extendify-help-center",id:t});document.querySelector("#wp-admin-bar-my-account")?.after(n),Ju((0,e.createElement)(nd,null),n)})(),(0,ed.registerPlugin)("extendify-help-center-buttons",{render:()=>(0,e.createElement)(od,null)});const od=()=>((0,i.useEffect)((()=>{if(Qu())return;const t="extendify-gtnbrg-help-center-btn";if(document.getElementById(t))return;const n=Object.assign(document.createElement("span"),{className:"extendify-help-center",id:t});requestAnimationFrame((()=>{requestAnimationFrame((()=>{document.querySelector('[aria-controls="edit-post:document"]')?.after(n),document.querySelector('[aria-controls="edit-site:template"]')?.after(n),Ju((0,e.createElement)(rd,null),n)}))}))}),[]),null);r()((()=>{if(Qu())return;const t="extendify-help-center-main";if(document.getElementById(t))return;const n=Object.assign(document.createElement("div"),{className:"extendify-help-center",id:t});document.body.append(n),Ju((0,e.createElement)(Ku,null),n)}))})()})();