var v2=Object.defineProperty;var w2=(e,t,r)=>t in e?v2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qh=(e,t,r)=>(w2(e,typeof t!="symbol"?t+"":t,r),r);const y2="modulepreload",_2=function(e){return"/"+e},qh={},S2=function(t,r,l){if(!r||r.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(r.map(s=>{if(s=_2(s),s in qh)return;qh[s]=!0;const c=s.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!l)for(let y=o.length-1;y>=0;y--){const w=o[y];if(w.href===s&&(!c||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${f}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":y2,c||(m.as="script",m.crossOrigin=""),m.href=s,document.head.appendChild(m),c)return new Promise((y,w)=>{m.addEventListener("load",y),m.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=s,window.dispatchEvent(c),!c.defaultPrevented)throw s})};var fl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function x2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o0={exports:{}},ss={},u0={exports:{}},he={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var no=Symbol.for("react.element"),C2=Symbol.for("react.portal"),E2=Symbol.for("react.fragment"),k2=Symbol.for("react.strict_mode"),L2=Symbol.for("react.profiler"),R2=Symbol.for("react.provider"),I2=Symbol.for("react.context"),T2=Symbol.for("react.forward_ref"),O2=Symbol.for("react.suspense"),A2=Symbol.for("react.memo"),P2=Symbol.for("react.lazy"),Kh=Symbol.iterator;function N2(e){return e===null||typeof e!="object"?null:(e=Kh&&e[Kh]||e["@@iterator"],typeof e=="function"?e:null)}var s0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},a0=Object.assign,c0={};function Di(e,t,r){this.props=e,this.context=t,this.refs=c0,this.updater=r||s0}Di.prototype.isReactComponent={};Di.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Di.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f0(){}f0.prototype=Di.prototype;function mf(e,t,r){this.props=e,this.context=t,this.refs=c0,this.updater=r||s0}var vf=mf.prototype=new f0;vf.constructor=mf;a0(vf,Di.prototype);vf.isPureReactComponent=!0;var Yh=Array.isArray,d0=Object.prototype.hasOwnProperty,wf={current:null},p0={key:!0,ref:!0,__self:!0,__source:!0};function h0(e,t,r){var l,o={},s=null,c=null;if(t!=null)for(l in t.ref!==void 0&&(c=t.ref),t.key!==void 0&&(s=""+t.key),t)d0.call(t,l)&&!p0.hasOwnProperty(l)&&(o[l]=t[l]);var f=arguments.length-2;if(f===1)o.children=r;else if(1>>1,ve=j[Z];if(0>>1;Zo(ft,G))dto(Tt,ft)?(j[Z]=Tt,j[dt]=G,Z=dt):(j[Z]=ft,j[Ee]=G,Z=Ee);else if(dto(Tt,G))j[Z]=Tt,j[dt]=G,Z=dt;else break e}}return q}function o(j,q){var G=j.sortIndex-q.sortIndex;return G!==0?G:j.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var p=[],m=[],y=1,w=null,_=3,k=!1,A=!1,T=!1,B=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(j){for(var q=r(m);q!==null;){if(q.callback===null)l(m);else if(q.startTime<=j)l(m),q.sortIndex=q.expirationTime,t(p,q);else break;q=r(m)}}function O(j){if(T=!1,C(j),!A)if(r(p)!==null)A=!0,it(M);else{var q=r(m);q!==null&&fe(O,q.startTime-j)}}function M(j,q){A=!1,T&&(T=!1,v(z),z=-1),k=!0;var G=_;try{for(C(q),w=r(p);w!==null&&(!(w.expirationTime>q)||j&&!ee());){var Z=w.callback;if(typeof Z=="function"){w.callback=null,_=w.priorityLevel;var ve=Z(w.expirationTime<=q);q=e.unstable_now(),typeof ve=="function"?w.callback=ve:w===r(p)&&l(p),C(q)}else l(p);w=r(p)}if(w!==null)var je=!0;else{var Ee=r(m);Ee!==null&&fe(O,Ee.startTime-q),je=!1}return je}finally{w=null,_=G,k=!1}}var F=!1,P=null,z=-1,J=5,H=-1;function ee(){return!(e.unstable_now()-Hj||125Z?(j.sortIndex=G,t(m,j),r(p)===null&&j===r(m)&&(T?(v(z),z=-1):T=!0,fe(O,G-Z))):(j.sortIndex=ve,t(p,j),A||k||(A=!0,it(M))),j},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(j){var q=_;return function(){var G=_;_=q;try{return j.apply(this,arguments)}finally{_=G}}}})(w0);v0.exports=w0;var G2=v0.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var y0=X,$t=G2;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=Object.prototype.hasOwnProperty,Q2=/^[: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][: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]*$/,Xh={},Jh={};function q2(e){return _c.call(Jh,e)?!0:_c.call(Xh,e)?!1:Q2.test(e)?Jh[e]=!0:(Xh[e]=!0,!1)}function K2(e,t,r,l){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Y2(e,t,r,l){if(t===null||typeof t>"u"||K2(e,t,r,l))return!0;if(l)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function yt(e,t,r,l,o,s,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=c}var rt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rt[e]=new yt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rt[t]=new yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rt[e]=new yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rt[e]=new yt(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".split(" ").forEach(function(e){rt[e]=new yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rt[e]=new yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rt[e]=new yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rt[e]=new yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rt[e]=new yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var _f=/[\-:]([a-z])/g;function Sf(e){return 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".split(" ").forEach(function(e){var t=e.replace(_f,Sf);rt[t]=new yt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_f,Sf);rt[t]=new yt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_f,Sf);rt[t]=new yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rt[e]=new yt(e,1,!1,e.toLowerCase(),null,!1,!1)});rt.xlinkHref=new yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rt[e]=new yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function xf(e,t,r,l){var o=rt.hasOwnProperty(t)?rt[t]:null;(o!==null?o.type!==0:l||!(2f||o[c]!==s[f]){var p=` `+o[c].replace(" at new "," at ");return e.displayName&&p.includes("")&&(p=p.replace("",e.displayName)),p}while(1<=c&&0<=f);break}}}finally{qa=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Cl(e):""}function Z2(e){switch(e.tag){case 5:return Cl(e.type);case 16:return Cl("Lazy");case 13:return Cl("Suspense");case 19:return Cl("SuspenseList");case 0:case 2:case 15:return e=Ka(e.type,!1),e;case 11:return e=Ka(e.type.render,!1),e;case 1:return e=Ka(e.type,!0),e;default:return""}}function Ec(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case hi:return"Fragment";case pi:return"Portal";case Sc:return"Profiler";case Cf:return"StrictMode";case xc:return"Suspense";case Cc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x0:return(e.displayName||"Context")+".Consumer";case S0:return(e._context.displayName||"Context")+".Provider";case Ef:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kf:return t=e.displayName||null,t!==null?t:Ec(e.type)||"Memo";case rr:t=e._payload,e=e._init;try{return Ec(e(t))}catch{}}return null}function X2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ec(t);case 8:return t===Cf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _r(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function J2(e){var t=E0(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(c){l=""+c,s.call(this,c)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function iu(e){e._valueTracker||(e._valueTracker=J2(e))}function k0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),l="";return e&&(l=E0(e)?e.checked?"true":"false":e.value),e=l,e!==r?(t.setValue(e),!0):!1}function Nu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kc(e,t){var r=t.checked;return We({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function eg(e,t){var r=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;r=_r(t.value!=null?t.value:r),e._wrapperState={initialChecked:l,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function L0(e,t){t=t.checked,t!=null&&xf(e,"checked",t,!1)}function Lc(e,t){L0(e,t);var r=_r(t.value),l=t.type;if(r!=null)l==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Rc(e,t.type,r):t.hasOwnProperty("defaultValue")&&Rc(e,t.type,_r(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function tg(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Rc(e,t,r){(t!=="number"||Nu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var El=Array.isArray;function ki(e,t,r,l){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=lu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Dl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Il={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},b2=["Webkit","ms","Moz","O"];Object.keys(Il).forEach(function(e){b2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Il[t]=Il[e]})});function O0(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Il.hasOwnProperty(e)&&Il[e]?(""+t).trim():t+"px"}function A0(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var l=r.indexOf("--")===0,o=O0(r,t[r],l);r==="float"&&(r="cssFloat"),l?e.setProperty(r,o):e[r]=o}}var eE=We({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oc(e,t){if(t){if(eE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function Ac(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Pc=null;function Lf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nc=null,Li=null,Ri=null;function ig(e){if(e=lo(e)){if(typeof Nc!="function")throw Error(V(280));var t=e.stateNode;t&&(t=ps(t),Nc(e.stateNode,e.type,t))}}function P0(e){Li?Ri?Ri.push(e):Ri=[e]:Li=e}function N0(){if(Li){var e=Li,t=Ri;if(Ri=Li=null,ig(e),t)for(e=0;e>>=0,e===0?32:31-(fE(e)/dE|0)|0}var ou=64,uu=4194304;function kl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zu(e,t){var r=e.pendingLanes;if(r===0)return 0;var l=0,o=e.suspendedLanes,s=e.pingedLanes,c=r&268435455;if(c!==0){var f=c&~o;f!==0?l=kl(f):(s&=c,s!==0&&(l=kl(s)))}else c=r&~o,c!==0?l=kl(c):s!==0&&(l=kl(s));if(l===0)return 0;if(t!==0&&t!==l&&!(t&o)&&(o=l&-l,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(l&4&&(l|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0r;r++)t.push(e);return t}function ro(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hn(t),e[t]=r}function mE(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=Ol),pg=String.fromCharCode(32),hg=!1;function b0(e,t){switch(e){case"keyup":return VE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function em(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gi=!1;function QE(e,t){switch(e){case"compositionend":return em(t);case"keypress":return t.which!==32?null:(hg=!0,pg);case"textInput":return e=t.data,e===pg&&hg?null:e;default:return null}}function qE(e,t){if(gi)return e==="compositionend"||!Mf&&b0(e,t)?(e=X0(),Eu=Af=sr=null,gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=wg(r)}}function im(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?im(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lm(){for(var e=window,t=Nu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Nu(e.document)}return t}function Bf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function nk(e){var t=lm(),r=e.focusedElem,l=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&im(r.ownerDocument.documentElement,r)){if(l!==null&&Bf(r)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,s=Math.min(l.start,o);l=l.end===void 0?s:Math.min(l.end,o),!e.extend&&s>l&&(o=l,l=s,s=o),o=yg(r,s);var c=yg(r,l);o&&c&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==c.node||e.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>l?(e.addRange(t),e.extend(c.node,c.offset)):(t.setEnd(c.node,c.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,mi=null,$c=null,Pl=null,Fc=!1;function _g(e,t,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Fc||mi==null||mi!==Nu(l)||(l=mi,"selectionStart"in l&&Bf(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Pl&&Vl(Pl,l)||(Pl=l,l=Fu($c,"onSelect"),0yi||(e.current=Qc[yi],Qc[yi]=null,yi--)}function Re(e,t){yi++,Qc[yi]=e.current,e.current=t}var Sr={},ct=Cr(Sr),Lt=Cr(!1),Ur=Sr;function Pi(e,t){var r=e.type.contextTypes;if(!r)return Sr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in r)o[s]=t[s];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Rt(e){return e=e.childContextTypes,e!=null}function ju(){Oe(Lt),Oe(ct)}function Rg(e,t,r){if(ct.current!==Sr)throw Error(V(168));Re(ct,t),Re(Lt,r)}function hm(e,t,r){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return r;l=l.getChildContext();for(var o in l)if(!(o in t))throw Error(V(108,X2(e)||"Unknown",o));return We({},r,l)}function Hu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sr,Ur=ct.current,Re(ct,e),Re(Lt,Lt.current),!0}function Ig(e,t,r){var l=e.stateNode;if(!l)throw Error(V(169));r?(e=hm(e,t,Ur),l.__reactInternalMemoizedMergedChildContext=e,Oe(Lt),Oe(ct),Re(ct,e)):Oe(Lt),Re(Lt,r)}var zn=null,hs=!1,sc=!1;function gm(e){zn===null?zn=[e]:zn.push(e)}function hk(e){hs=!0,gm(e)}function Er(){if(!sc&&zn!==null){sc=!0;var e=0,t=Ce;try{var r=zn;for(Ce=1;e>=c,o-=c,Dn=1<<32-hn(t)+o|r<z?(J=P,P=null):J=P.sibling;var H=_(v,P,C[z],O);if(H===null){P===null&&(P=J);break}e&&P&&H.alternate===null&&t(v,P),S=s(H,S,z),F===null?M=H:F.sibling=H,F=H,P=J}if(z===C.length)return r(v,P),Pe&&Mr(v,z),M;if(P===null){for(;zz?(J=P,P=null):J=P.sibling;var ee=_(v,P,H.value,O);if(ee===null){P===null&&(P=J);break}e&&P&&ee.alternate===null&&t(v,P),S=s(ee,S,z),F===null?M=ee:F.sibling=ee,F=ee,P=J}if(H.done)return r(v,P),Pe&&Mr(v,z),M;if(P===null){for(;!H.done;z++,H=C.next())H=w(v,H.value,O),H!==null&&(S=s(H,S,z),F===null?M=H:F.sibling=H,F=H);return Pe&&Mr(v,z),M}for(P=l(v,P);!H.done;z++,H=C.next())H=k(P,v,z,H.value,O),H!==null&&(e&&H.alternate!==null&&P.delete(H.key===null?z:H.key),S=s(H,S,z),F===null?M=H:F.sibling=H,F=H);return e&&P.forEach(function(le){return t(v,le)}),Pe&&Mr(v,z),M}function B(v,S,C,O){if(typeof C=="object"&&C!==null&&C.type===hi&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case ru:e:{for(var M=C.key,F=S;F!==null;){if(F.key===M){if(M=C.type,M===hi){if(F.tag===7){r(v,F.sibling),S=o(F,C.props.children),S.return=v,v=S;break e}}else if(F.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===rr&&Bg(M)===F.type){r(v,F.sibling),S=o(F,C.props),S.ref=vl(v,F,C),S.return=v,v=S;break e}r(v,F);break}else t(v,F);F=F.sibling}C.type===hi?(S=Fr(C.props.children,v.mode,O,C.key),S.return=v,v=S):(O=Pu(C.type,C.key,C.props,null,v.mode,O),O.ref=vl(v,S,C),O.return=v,v=O)}return c(v);case pi:e:{for(F=C.key;S!==null;){if(S.key===F)if(S.tag===4&&S.stateNode.containerInfo===C.containerInfo&&S.stateNode.implementation===C.implementation){r(v,S.sibling),S=o(S,C.children||[]),S.return=v,v=S;break e}else{r(v,S);break}else t(v,S);S=S.sibling}S=mc(C,v.mode,O),S.return=v,v=S}return c(v);case rr:return F=C._init,B(v,S,F(C._payload),O)}if(El(C))return A(v,S,C,O);if(dl(C))return T(v,S,C,O);hu(v,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,S!==null&&S.tag===6?(r(v,S.sibling),S=o(S,C),S.return=v,v=S):(r(v,S),S=gc(C,v.mode,O),S.return=v,v=S),c(v)):r(v,S)}return B}var Mi=Cm(!0),Em=Cm(!1),oo={},En=Cr(oo),Kl=Cr(oo),Yl=Cr(oo);function Dr(e){if(e===oo)throw Error(V(174));return e}function Vf(e,t){switch(Re(Yl,t),Re(Kl,e),Re(En,oo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Tc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Tc(t,e)}Oe(En),Re(En,t)}function Bi(){Oe(En),Oe(Kl),Oe(Yl)}function km(e){Dr(Yl.current);var t=Dr(En.current),r=Tc(t,e.type);t!==r&&(Re(Kl,e),Re(En,r))}function Gf(e){Kl.current===e&&(Oe(En),Oe(Kl))}var Me=Cr(0);function Yu(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ac=[];function Qf(){for(var e=0;er?r:4,e(!0);var l=cc.transition;cc.transition={};try{e(!1),t()}finally{Ce=r,cc.transition=l}}function Um(){return tn().memoizedState}function wk(e,t,r){var l=mr(e);if(r={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null},jm(e))Hm(t,r);else if(r=ym(e,t,r,l),r!==null){var o=vt();gn(r,e,l,o),Vm(r,t,l)}}function yk(e,t,r){var l=mr(e),o={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null};if(jm(e))Hm(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var c=t.lastRenderedState,f=s(c,r);if(o.hasEagerState=!0,o.eagerState=f,mn(f,c)){var p=t.interleaved;p===null?(o.next=o,jf(t)):(o.next=p.next,p.next=o),t.interleaved=o;return}}catch{}finally{}r=ym(e,t,o,l),r!==null&&(o=vt(),gn(r,e,l,o),Vm(r,t,l))}}function jm(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function Hm(e,t){Nl=Zu=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Vm(e,t,r){if(r&4194240){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,If(e,r)}}var Xu={readContext:en,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},_k={readContext:en,useCallback:function(e,t){return Sn().memoizedState=[e,t===void 0?null:t],e},useContext:en,useEffect:zg,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Iu(4194308,4,Wm.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Iu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Iu(4,2,e,t)},useMemo:function(e,t){var r=Sn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var l=Sn();return t=r!==void 0?r(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=wk.bind(null,Be,e),[l.memoizedState,e]},useRef:function(e){var t=Sn();return e={current:e},t.memoizedState=e},useState:Wg,useDebugValue:Xf,useDeferredValue:function(e){return Sn().memoizedState=e},useTransition:function(){var e=Wg(!1),t=e[0];return e=vk.bind(null,e[1]),Sn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var l=Be,o=Sn();if(Pe){if(r===void 0)throw Error(V(407));r=r()}else{if(r=t(),Xe===null)throw Error(V(349));Hr&30||Im(l,t,r)}o.memoizedState=r;var s={value:r,getSnapshot:t};return o.queue=s,zg(Om.bind(null,l,s,e),[e]),l.flags|=2048,Jl(9,Tm.bind(null,l,s,r,t),void 0,null),r},useId:function(){var e=Sn(),t=Xe.identifierPrefix;if(Pe){var r=$n,l=Dn;r=(l&~(1<<32-hn(l)-1)).toString(32)+r,t=":"+t+"R"+r,r=Zl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=c.createElement(r,{is:l.is}):(e=c.createElement(r),r==="select"&&(c=e,l.multiple?c.multiple=!0:l.size&&(c.size=l.size))):e=c.createElementNS(e,r),e[xn]=t,e[ql]=l,bm(e,t,!1,!1),t.stateNode=e;e:{switch(c=Ac(r,l),r){case"dialog":Te("cancel",e),Te("close",e),o=l;break;case"iframe":case"object":case"embed":Te("load",e),o=l;break;case"video":case"audio":for(o=0;ozi&&(t.flags|=128,l=!0,wl(s,!1),t.lanes=4194304)}else{if(!l)if(e=Yu(c),e!==null){if(t.flags|=128,l=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),wl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Pe)return st(t),null}else 2*Ue()-s.renderingStartTime>zi&&r!==1073741824&&(t.flags|=128,l=!0,wl(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(r=s.last,r!==null?r.sibling=c:t.child=c,s.last=c)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ue(),t.sibling=null,r=Me.current,Re(Me,l?r&1|2:r&1),t):(st(t),null);case 22:case 23:return rd(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&t.mode&1?Wt&1073741824&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function Ik(e,t){switch(zf(t),t.tag){case 1:return Rt(t.type)&&ju(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bi(),Oe(Lt),Oe(ct),Qf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Gf(t),null;case 13:if(Oe(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(Me),null;case 4:return Bi(),null;case 10:return Uf(t.type._context),null;case 22:case 23:return rd(),null;case 24:return null;default:return null}}var mu=!1,at=!1,Tk=typeof WeakSet=="function"?WeakSet:Set,Y=null;function Ci(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(l){De(e,t,l)}else r.current=null}function lf(e,t,r){try{r()}catch(l){De(e,t,l)}}var Qg=!1;function Ok(e,t){if(Uc=Du,e=lm(),Bf(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var o=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var c=0,f=-1,p=-1,m=0,y=0,w=e,_=null;t:for(;;){for(var k;w!==r||o!==0&&w.nodeType!==3||(f=c+o),w!==s||l!==0&&w.nodeType!==3||(p=c+l),w.nodeType===3&&(c+=w.nodeValue.length),(k=w.firstChild)!==null;)_=w,w=k;for(;;){if(w===e)break t;if(_===r&&++m===o&&(f=c),_===s&&++y===l&&(p=c),(k=w.nextSibling)!==null)break;w=_,_=w.parentNode}w=k}r=f===-1||p===-1?null:{start:f,end:p}}else r=null}r=r||{start:0,end:0}}else r=null;for(jc={focusedElem:e,selectionRange:r},Du=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var A=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var T=A.memoizedProps,B=A.memoizedState,v=t.stateNode,S=v.getSnapshotBeforeUpdate(t.elementType===t.type?T:fn(t.type,T),B);v.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(O){De(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return A=Qg,Qg=!1,A}function Ml(e,t,r){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var o=l=l.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&lf(t,r,s)}o=o.next}while(o!==l)}}function vs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var l=r.create;r.destroy=l()}r=r.next}while(r!==t)}}function of(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function nv(e){var t=e.alternate;t!==null&&(e.alternate=null,nv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[xn],delete t[ql],delete t[Gc],delete t[dk],delete t[pk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rv(e){return e.tag===5||e.tag===3||e.tag===4}function qg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uf(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Uu));else if(l!==4&&(e=e.child,e!==null))for(uf(e,t,r),e=e.sibling;e!==null;)uf(e,t,r),e=e.sibling}function sf(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(sf(e,t,r),e=e.sibling;e!==null;)sf(e,t,r),e=e.sibling}var tt=null,dn=!1;function nr(e,t,r){for(r=r.child;r!==null;)iv(e,t,r),r=r.sibling}function iv(e,t,r){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(as,r)}catch{}switch(r.tag){case 5:at||Ci(r,t);case 6:var l=tt,o=dn;tt=null,nr(e,t,r),tt=l,dn=o,tt!==null&&(dn?(e=tt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):tt.removeChild(r.stateNode));break;case 18:tt!==null&&(dn?(e=tt,r=r.stateNode,e.nodeType===8?uc(e.parentNode,r):e.nodeType===1&&uc(e,r),jl(e)):uc(tt,r.stateNode));break;case 4:l=tt,o=dn,tt=r.stateNode.containerInfo,dn=!0,nr(e,t,r),tt=l,dn=o;break;case 0:case 11:case 14:case 15:if(!at&&(l=r.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){o=l=l.next;do{var s=o,c=s.destroy;s=s.tag,c!==void 0&&(s&2||s&4)&&lf(r,t,c),o=o.next}while(o!==l)}nr(e,t,r);break;case 1:if(!at&&(Ci(r,t),l=r.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=r.memoizedProps,l.state=r.memoizedState,l.componentWillUnmount()}catch(f){De(r,t,f)}nr(e,t,r);break;case 21:nr(e,t,r);break;case 22:r.mode&1?(at=(l=at)||r.memoizedState!==null,nr(e,t,r),at=l):nr(e,t,r);break;default:nr(e,t,r)}}function Kg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Tk),t.forEach(function(l){var o=$k.bind(null,e,l);r.has(l)||(r.add(l),l.then(o,o))})}}function an(e,t){var r=t.deletions;if(r!==null)for(var l=0;lo&&(o=c),l&=~s}if(l=o,l=Ue()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Pk(l/1960))-l,10e?16:e,ar===null)var l=!1;else{if(e=ar,ar=null,es=0,we&6)throw Error(V(331));var o=we;for(we|=4,Y=e.current;Y!==null;){var s=Y,c=s.child;if(Y.flags&16){var f=s.deletions;if(f!==null){for(var p=0;pUe()-td?$r(e,0):ed|=r),It(e,t)}function dv(e,t){t===0&&(e.mode&1?(t=uu,uu<<=1,!(uu&130023424)&&(uu=4194304)):t=1);var r=vt();e=Hn(e,t),e!==null&&(ro(e,t,r),It(e,r))}function Dk(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),dv(e,r)}function $k(e,t){var r=0;switch(e.tag){case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(V(314))}l!==null&&l.delete(t),dv(e,r)}var pv;pv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lt.current)kt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return kt=!1,Lk(e,t,r);kt=!!(e.flags&131072)}else kt=!1,Pe&&t.flags&1048576&&mm(t,Gu,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Tu(e,t),e=t.pendingProps;var o=Pi(t,ct.current);Ti(t,r),o=Kf(null,t,l,e,o,r);var s=Yf();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Rt(l)?(s=!0,Hu(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Hf(t),o.updater=gs,t.stateNode=o,o._reactInternals=t,Xc(t,l,e,r),t=ef(null,t,l,!0,s,r)):(t.tag=0,Pe&&s&&Wf(t),mt(null,t,o,r),t=t.child),t;case 16:l=t.elementType;e:{switch(Tu(e,t),e=t.pendingProps,o=l._init,l=o(l._payload),t.type=l,o=t.tag=Uk(l),e=fn(l,e),o){case 0:t=bc(null,t,l,e,r);break e;case 1:t=Hg(null,t,l,e,r);break e;case 11:t=Ug(null,t,l,e,r);break e;case 14:t=jg(null,t,l,fn(l.type,e),r);break e}throw Error(V(306,l,""))}return t;case 0:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:fn(l,o),bc(e,t,l,o,r);case 1:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:fn(l,o),Hg(e,t,l,o,r);case 3:e:{if(Zm(t),e===null)throw Error(V(387));l=t.pendingProps,s=t.memoizedState,o=s.element,_m(e,t),Ku(t,l,null,r);var c=t.memoizedState;if(l=c.element,s.isDehydrated)if(s={element:l,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Wi(Error(V(423)),t),t=Vg(e,t,l,r,o);break e}else if(l!==o){o=Wi(Error(V(424)),t),t=Vg(e,t,l,r,o);break e}else for(zt=pr(t.stateNode.containerInfo.firstChild),Dt=t,Pe=!0,pn=null,r=Em(t,null,l,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ni(),l===o){t=Vn(e,t,r);break e}mt(e,t,l,r)}t=t.child}return t;case 5:return km(t),e===null&&Kc(t),l=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,c=o.children,Hc(l,o)?c=null:s!==null&&Hc(l,s)&&(t.flags|=32),Ym(e,t),mt(e,t,c,r),t.child;case 6:return e===null&&Kc(t),null;case 13:return Xm(e,t,r);case 4:return Vf(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Mi(t,null,l,r):mt(e,t,l,r),t.child;case 11:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:fn(l,o),Ug(e,t,l,o,r);case 7:return mt(e,t,t.pendingProps,r),t.child;case 8:return mt(e,t,t.pendingProps.children,r),t.child;case 12:return mt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(l=t.type._context,o=t.pendingProps,s=t.memoizedProps,c=o.value,Re(Qu,l._currentValue),l._currentValue=c,s!==null)if(mn(s.value,c)){if(s.children===o.children&&!Lt.current){t=Vn(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var f=s.dependencies;if(f!==null){c=s.child;for(var p=f.firstContext;p!==null;){if(p.context===l){if(s.tag===1){p=Fn(-1,r&-r),p.tag=2;var m=s.updateQueue;if(m!==null){m=m.shared;var y=m.pending;y===null?p.next=p:(p.next=y.next,y.next=p),m.pending=p}}s.lanes|=r,p=s.alternate,p!==null&&(p.lanes|=r),Yc(s.return,r,t),f.lanes|=r;break}p=p.next}}else if(s.tag===10)c=s.type===t.type?null:s.child;else if(s.tag===18){if(c=s.return,c===null)throw Error(V(341));c.lanes|=r,f=c.alternate,f!==null&&(f.lanes|=r),Yc(c,r,t),c=s.sibling}else c=s.child;if(c!==null)c.return=s;else for(c=s;c!==null;){if(c===t){c=null;break}if(s=c.sibling,s!==null){s.return=c.return,c=s;break}c=c.return}s=c}mt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,l=t.pendingProps.children,Ti(t,r),o=en(o),l=l(o),t.flags|=1,mt(e,t,l,r),t.child;case 14:return l=t.type,o=fn(l,t.pendingProps),o=fn(l.type,o),jg(e,t,l,o,r);case 15:return qm(e,t,t.type,t.pendingProps,r);case 17:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:fn(l,o),Tu(e,t),t.tag=1,Rt(l)?(e=!0,Hu(t)):e=!1,Ti(t,r),xm(t,l,o),Xc(t,l,o,r),ef(null,t,l,!0,e,r);case 19:return Jm(e,t,r);case 22:return Km(e,t,r)}throw Error(V(156,t.tag))};function hv(e,t){return F0(e,t)}function Fk(e,t,r,l){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,r,l){return new Fk(e,t,r,l)}function ld(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Uk(e){if(typeof e=="function")return ld(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ef)return 11;if(e===kf)return 14}return 2}function vr(e,t){var r=e.alternate;return r===null?(r=Jt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Pu(e,t,r,l,o,s){var c=2;if(l=e,typeof e=="function")ld(e)&&(c=1);else if(typeof e=="string")c=5;else e:switch(e){case hi:return Fr(r.children,o,s,t);case Cf:c=8,o|=8;break;case Sc:return e=Jt(12,r,t,o|2),e.elementType=Sc,e.lanes=s,e;case xc:return e=Jt(13,r,t,o),e.elementType=xc,e.lanes=s,e;case Cc:return e=Jt(19,r,t,o),e.elementType=Cc,e.lanes=s,e;case C0:return ys(r,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case S0:c=10;break e;case x0:c=9;break e;case Ef:c=11;break e;case kf:c=14;break e;case rr:c=16,l=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=Jt(c,r,t,o),t.elementType=e,t.type=l,t.lanes=s,t}function Fr(e,t,r,l){return e=Jt(7,e,l,t),e.lanes=r,e}function ys(e,t,r,l){return e=Jt(22,e,l,t),e.elementType=C0,e.lanes=r,e.stateNode={isHidden:!1},e}function gc(e,t,r){return e=Jt(6,e,null,t),e.lanes=r,e}function mc(e,t,r){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jk(e,t,r,l,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Za(0),this.expirationTimes=Za(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Za(0),this.identifierPrefix=l,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function od(e,t,r,l,o,s,c,f,p){return e=new jk(e,t,r,f,p),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Jt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:l,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hf(s),e}function Hk(e,t,r){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wv)}catch(e){console.error(e)}}wv(),m0.exports=Ft;var cd=m0.exports,yv,n0=cd;yv=yc.createRoot=n0.createRoot,yc.hydrateRoot=n0.hydrateRoot;(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();var rs={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */rs.exports;(function(e,t){(function(){var r,l="4.17.21",o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",f="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",m=500,y="__lodash_placeholder__",w=1,_=2,k=4,A=1,T=2,B=1,v=2,S=4,C=8,O=16,M=32,F=64,P=128,z=256,J=512,H=30,ee="...",le=800,ae=16,_e=1,me=2,it=3,fe=1/0,j=9007199254740991,q=17976931348623157e292,G=0/0,Z=4294967295,ve=Z-1,je=Z>>>1,Ee=[["ary",P],["bind",B],["bindKey",v],["curry",C],["curryRight",O],["flip",J],["partial",M],["partialRight",F],["rearg",z]],ft="[object Arguments]",dt="[object Array]",Tt="[object AsyncFunction]",Hi="[object Boolean]",Vi="[object Date]",Nv="[object DOMException]",co="[object Error]",fo="[object Function]",gd="[object GeneratorFunction]",nn="[object Map]",Gi="[object Number]",Mv="[object Null]",Ln="[object Object]",md="[object Promise]",Bv="[object Proxy]",Qi="[object RegExp]",rn="[object Set]",qi="[object String]",po="[object Symbol]",Wv="[object Undefined]",Ki="[object WeakMap]",zv="[object WeakSet]",Yi="[object ArrayBuffer]",Yr="[object DataView]",Es="[object Float32Array]",ks="[object Float64Array]",Ls="[object Int8Array]",Rs="[object Int16Array]",Is="[object Int32Array]",Ts="[object Uint8Array]",Os="[object Uint8ClampedArray]",As="[object Uint16Array]",Ps="[object Uint32Array]",Dv=/\b__p \+= '';/g,$v=/\b(__p \+=) '' \+/g,Fv=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vd=/&(?:amp|lt|gt|quot|#39);/g,wd=/[&<>"']/g,Uv=RegExp(vd.source),jv=RegExp(wd.source),Hv=/<%-([\s\S]+?)%>/g,Vv=/<%([\s\S]+?)%>/g,yd=/<%=([\s\S]+?)%>/g,Gv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qv=/^\w*$/,qv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ns=/[\\^$.*+?()[\]{}|]/g,Kv=RegExp(Ns.source),Ms=/^\s+/,Yv=/\s/,Zv=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xv=/\{\n\/\* \[wrapped with (.+)\] \*/,Jv=/,? & /,bv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,e1=/[()=,{}\[\]\/\s]/,t1=/\\(\\)?/g,n1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_d=/\w*$/,r1=/^[-+]0x[0-9a-f]+$/i,i1=/^0b[01]+$/i,l1=/^\[object .+?Constructor\]$/,o1=/^0o[0-7]+$/i,u1=/^(?:0|[1-9]\d*)$/,s1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ho=/($^)/,a1=/['\n\r\u2028\u2029\\]/g,go="\\ud800-\\udfff",c1="\\u0300-\\u036f",f1="\\ufe20-\\ufe2f",d1="\\u20d0-\\u20ff",Sd=c1+f1+d1,xd="\\u2700-\\u27bf",Cd="a-z\\xdf-\\xf6\\xf8-\\xff",p1="\\xac\\xb1\\xd7\\xf7",h1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g1="\\u2000-\\u206f",m1=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ed="A-Z\\xc0-\\xd6\\xd8-\\xde",kd="\\ufe0e\\ufe0f",Ld=p1+h1+g1+m1,Bs="['’]",v1="["+go+"]",Rd="["+Ld+"]",mo="["+Sd+"]",Id="\\d+",w1="["+xd+"]",Td="["+Cd+"]",Od="[^"+go+Ld+Id+xd+Cd+Ed+"]",Ws="\\ud83c[\\udffb-\\udfff]",y1="(?:"+mo+"|"+Ws+")",Ad="[^"+go+"]",zs="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",Zr="["+Ed+"]",Pd="\\u200d",Nd="(?:"+Td+"|"+Od+")",_1="(?:"+Zr+"|"+Od+")",Md="(?:"+Bs+"(?:d|ll|m|re|s|t|ve))?",Bd="(?:"+Bs+"(?:D|LL|M|RE|S|T|VE))?",Wd=y1+"?",zd="["+kd+"]?",S1="(?:"+Pd+"(?:"+[Ad,zs,Ds].join("|")+")"+zd+Wd+")*",x1="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",C1="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Dd=zd+Wd+S1,E1="(?:"+[w1,zs,Ds].join("|")+")"+Dd,k1="(?:"+[Ad+mo+"?",mo,zs,Ds,v1].join("|")+")",L1=RegExp(Bs,"g"),R1=RegExp(mo,"g"),$s=RegExp(Ws+"(?="+Ws+")|"+k1+Dd,"g"),I1=RegExp([Zr+"?"+Td+"+"+Md+"(?="+[Rd,Zr,"$"].join("|")+")",_1+"+"+Bd+"(?="+[Rd,Zr+Nd,"$"].join("|")+")",Zr+"?"+Nd+"+"+Md,Zr+"+"+Bd,C1,x1,Id,E1].join("|"),"g"),T1=RegExp("["+Pd+go+Sd+kd+"]"),O1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,A1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],P1=-1,Ie={};Ie[Es]=Ie[ks]=Ie[Ls]=Ie[Rs]=Ie[Is]=Ie[Ts]=Ie[Os]=Ie[As]=Ie[Ps]=!0,Ie[ft]=Ie[dt]=Ie[Yi]=Ie[Hi]=Ie[Yr]=Ie[Vi]=Ie[co]=Ie[fo]=Ie[nn]=Ie[Gi]=Ie[Ln]=Ie[Qi]=Ie[rn]=Ie[qi]=Ie[Ki]=!1;var Le={};Le[ft]=Le[dt]=Le[Yi]=Le[Yr]=Le[Hi]=Le[Vi]=Le[Es]=Le[ks]=Le[Ls]=Le[Rs]=Le[Is]=Le[nn]=Le[Gi]=Le[Ln]=Le[Qi]=Le[rn]=Le[qi]=Le[po]=Le[Ts]=Le[Os]=Le[As]=Le[Ps]=!0,Le[co]=Le[fo]=Le[Ki]=!1;var N1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},M1={"&":"&","<":"<",">":">",'"':""","'":"'"},B1={"&":"&","<":"<",">":">",""":'"',"'":"'"},W1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},z1=parseFloat,D1=parseInt,$d=typeof fl=="object"&&fl&&fl.Object===Object&&fl,$1=typeof self=="object"&&self&&self.Object===Object&&self,Je=$d||$1||Function("return this")(),Fs=t&&!t.nodeType&&t,kr=Fs&&!0&&e&&!e.nodeType&&e,Fd=kr&&kr.exports===Fs,Us=Fd&&$d.process,jt=function(){try{var L=kr&&kr.require&&kr.require("util").types;return L||Us&&Us.binding&&Us.binding("util")}catch{}}(),Ud=jt&&jt.isArrayBuffer,jd=jt&&jt.isDate,Hd=jt&&jt.isMap,Vd=jt&&jt.isRegExp,Gd=jt&&jt.isSet,Qd=jt&&jt.isTypedArray;function Ot(L,W,N){switch(N.length){case 0:return L.call(W);case 1:return L.call(W,N[0]);case 2:return L.call(W,N[0],N[1]);case 3:return L.call(W,N[0],N[1],N[2])}return L.apply(W,N)}function F1(L,W,N,K){for(var ie=-1,ye=L==null?0:L.length;++ie-1}function js(L,W,N){for(var K=-1,ie=L==null?0:L.length;++K-1;);return N}function ep(L,W){for(var N=L.length;N--&&Xr(W,L[N],0)>-1;);return N}function Y1(L,W){for(var N=L.length,K=0;N--;)L[N]===W&&++K;return K}var Z1=Qs(N1),X1=Qs(M1);function J1(L){return"\\"+W1[L]}function b1(L,W){return L==null?r:L[W]}function Jr(L){return T1.test(L)}function ew(L){return O1.test(L)}function tw(L){for(var W,N=[];!(W=L.next()).done;)N.push(W.value);return N}function Zs(L){var W=-1,N=Array(L.size);return L.forEach(function(K,ie){N[++W]=[ie,K]}),N}function tp(L,W){return function(N){return L(W(N))}}function Yn(L,W){for(var N=-1,K=L.length,ie=0,ye=[];++N-1}function jw(n,i){var u=this.__data__,a=Mo(u,n);return a<0?(++this.size,u.push([n,i])):u[a][1]=i,this}Rn.prototype.clear=Dw,Rn.prototype.delete=$w,Rn.prototype.get=Fw,Rn.prototype.has=Uw,Rn.prototype.set=jw;function In(n){var i=-1,u=n==null?0:n.length;for(this.clear();++i=i?n:i)),n}function Qt(n,i,u,a,d,g){var x,E=i&w,R=i&_,D=i&k;if(u&&(x=d?u(n,a,d,g):u(n)),x!==r)return x;if(!Ne(n))return n;var $=oe(n);if($){if(x=Qy(n),!E)return _t(n,x)}else{var U=ot(n),Q=U==fo||U==gd;if(tr(n))return zp(n,E);if(U==Ln||U==ft||Q&&!d){if(x=R||Q?{}:nh(n),!E)return R?By(n,iy(x,n)):My(n,pp(x,n))}else{if(!Le[U])return d?n:{};x=qy(n,U,E)}}g||(g=new on);var b=g.get(n);if(b)return b;g.set(n,x),Ah(n)?n.forEach(function(re){x.add(Qt(re,i,u,re,n,g))}):Th(n)&&n.forEach(function(re,de){x.set(de,Qt(re,i,u,de,n,g))});var ne=D?R?xa:Sa:R?xt:Ke,se=$?r:ne(n);return Ht(se||n,function(re,de){se&&(de=re,re=n[de]),nl(x,de,Qt(re,i,u,de,n,g))}),x}function ly(n){var i=Ke(n);return function(u){return hp(u,n,i)}}function hp(n,i,u){var a=u.length;if(n==null)return!a;for(n=ke(n);a--;){var d=u[a],g=i[d],x=n[d];if(x===r&&!(d in n)||!g(x))return!1}return!0}function gp(n,i,u){if(typeof n!="function")throw new Vt(c);return al(function(){n.apply(r,u)},i)}function rl(n,i,u,a){var d=-1,g=vo,x=!0,E=n.length,R=[],D=i.length;if(!E)return R;u&&(i=Ae(i,At(u))),a?(g=js,x=!1):i.length>=o&&(g=Zi,x=!1,i=new Ir(i));e:for(;++dd?0:d+u),a=a===r||a>d?d:ue(a),a<0&&(a+=d),a=u>a?0:Nh(a);u0&&u(E)?i>1?be(E,i-1,u,a,d):Kn(d,E):a||(d[d.length]=E)}return d}var ra=Hp(),wp=Hp(!0);function vn(n,i){return n&&ra(n,i,Ke)}function ia(n,i){return n&&wp(n,i,Ke)}function Wo(n,i){return qn(i,function(u){return Nn(n[u])})}function Or(n,i){i=bn(i,n);for(var u=0,a=i.length;n!=null&&ui}function sy(n,i){return n!=null&&xe.call(n,i)}function ay(n,i){return n!=null&&i in ke(n)}function cy(n,i,u){return n>=lt(i,u)&&n=120&&$.length>=120)?new Ir(x&&$):r}$=n[0];var U=-1,Q=E[0];e:for(;++U-1;)E!==n&&Ro.call(E,R,1),Ro.call(n,R,1);return n}function Tp(n,i){for(var u=n?i.length:0,a=u-1;u--;){var d=i[u];if(u==a||d!==g){var g=d;Pn(d)?Ro.call(n,d,1):ha(n,d)}}return n}function fa(n,i){return n+Oo(ap()*(i-n+1))}function Cy(n,i,u,a){for(var d=-1,g=Ge(To((i-n)/(u||1)),0),x=N(g);g--;)x[a?g:++d]=n,n+=u;return x}function da(n,i){var u="";if(!n||i<1||i>j)return u;do i%2&&(u+=n),i=Oo(i/2),i&&(n+=n);while(i);return u}function ce(n,i){return Ta(lh(n,i,Ct),n+"")}function Ey(n){return dp(ai(n))}function ky(n,i){var u=ai(n);return qo(u,Tr(i,0,u.length))}function ol(n,i,u,a){if(!Ne(n))return n;i=bn(i,n);for(var d=-1,g=i.length,x=g-1,E=n;E!=null&&++dd?0:d+i),u=u>d?d:u,u<0&&(u+=d),d=i>u?0:u-i>>>0,i>>>=0;for(var g=N(d);++a>>1,x=n[g];x!==null&&!Nt(x)&&(u?x<=i:x=o){var D=i?null:$y(n);if(D)return yo(D);x=!1,d=Zi,R=new Ir}else R=i?[]:E;e:for(;++a=a?n:qt(n,i,u)}var Wp=mw||function(n){return Je.clearTimeout(n)};function zp(n,i){if(i)return n.slice();var u=n.length,a=ip?ip(u):new n.constructor(u);return n.copy(a),a}function wa(n){var i=new n.constructor(n.byteLength);return new ko(i).set(new ko(n)),i}function Oy(n,i){var u=i?wa(n.buffer):n.buffer;return new n.constructor(u,n.byteOffset,n.byteLength)}function Ay(n){var i=new n.constructor(n.source,_d.exec(n));return i.lastIndex=n.lastIndex,i}function Py(n){return tl?ke(tl.call(n)):{}}function Dp(n,i){var u=i?wa(n.buffer):n.buffer;return new n.constructor(u,n.byteOffset,n.length)}function $p(n,i){if(n!==i){var u=n!==r,a=n===null,d=n===n,g=Nt(n),x=i!==r,E=i===null,R=i===i,D=Nt(i);if(!E&&!D&&!g&&n>i||g&&x&&R&&!E&&!D||a&&x&&R||!u&&R||!d)return 1;if(!a&&!g&&!D&&n=E)return R;var D=u[a];return R*(D=="desc"?-1:1)}}return n.index-i.index}function Fp(n,i,u,a){for(var d=-1,g=n.length,x=u.length,E=-1,R=i.length,D=Ge(g-x,0),$=N(R+D),U=!a;++E1?u[d-1]:r,x=d>2?u[2]:r;for(g=n.length>3&&typeof g=="function"?(d--,g):r,x&&ht(u[0],u[1],x)&&(g=d<3?r:g,d=1),i=ke(i);++a-1?d[g?i[x]:x]:r}}function Qp(n){return An(function(i){var u=i.length,a=u,d=Gt.prototype.thru;for(n&&i.reverse();a--;){var g=i[a];if(typeof g!="function")throw new Vt(c);if(d&&!x&&Go(g)=="wrapper")var x=new Gt([],!0)}for(a=x?a:u;++a1&&ge.reverse(),$&&RE))return!1;var D=g.get(n),$=g.get(i);if(D&&$)return D==i&&$==n;var U=-1,Q=!0,b=u&T?new Ir:r;for(g.set(n,i),g.set(i,n);++U1?"& ":"")+i[a],i=i.join(u>2?", ":" "),n.replace(Zv,`{ /* [wrapped with `+i+`] */ `)}function Yy(n){return oe(n)||Nr(n)||!!(up&&n&&n[up])}function Pn(n,i){var u=typeof n;return i=i??j,!!i&&(u=="number"||u!="symbol"&&u1.test(n))&&n>-1&&n%1==0&&n0){if(++i>=le)return arguments[0]}else i=0;return n.apply(r,arguments)}}function qo(n,i){var u=-1,a=n.length,d=a-1;for(i=i===r?a:i;++u1?n[i-1]:r;return u=typeof u=="function"?(n.pop(),u):r,vh(n,u)});function wh(n){var i=h(n);return i.__chain__=!0,i}function oS(n,i){return i(n),n}function Ko(n,i){return i(n)}var uS=An(function(n){var i=n.length,u=i?n[0]:0,a=this.__wrapped__,d=function(g){return na(g,n)};return i>1||this.__actions__.length||!(a instanceof pe)||!Pn(u)?this.thru(d):(a=a.slice(u,+u+(i?1:0)),a.__actions__.push({func:Ko,args:[d],thisArg:r}),new Gt(a,this.__chain__).thru(function(g){return i&&!g.length&&g.push(r),g}))});function sS(){return wh(this)}function aS(){return new Gt(this.value(),this.__chain__)}function cS(){this.__values__===r&&(this.__values__=Ph(this.value()));var n=this.__index__>=this.__values__.length,i=n?r:this.__values__[this.__index__++];return{done:n,value:i}}function fS(){return this}function dS(n){for(var i,u=this;u instanceof No;){var a=fh(u);a.__index__=0,a.__values__=r,i?d.__wrapped__=a:i=a;var d=a;u=u.__wrapped__}return d.__wrapped__=n,i}function pS(){var n=this.__wrapped__;if(n instanceof pe){var i=n;return this.__actions__.length&&(i=new pe(this)),i=i.reverse(),i.__actions__.push({func:Ko,args:[Oa],thisArg:r}),new Gt(i,this.__chain__)}return this.thru(Oa)}function hS(){return Mp(this.__wrapped__,this.__actions__)}var gS=Fo(function(n,i,u){xe.call(n,u)?++n[u]:Tn(n,u,1)});function mS(n,i,u){var a=oe(n)?qd:oy;return u&&ht(n,i,u)&&(i=r),a(n,te(i,3))}function vS(n,i){var u=oe(n)?qn:vp;return u(n,te(i,3))}var wS=Gp(dh),yS=Gp(ph);function _S(n,i){return be(Yo(n,i),1)}function SS(n,i){return be(Yo(n,i),fe)}function xS(n,i,u){return u=u===r?1:ue(u),be(Yo(n,i),u)}function yh(n,i){var u=oe(n)?Ht:Xn;return u(n,te(i,3))}function _h(n,i){var u=oe(n)?U1:mp;return u(n,te(i,3))}var CS=Fo(function(n,i,u){xe.call(n,u)?n[u].push(i):Tn(n,u,[i])});function ES(n,i,u,a){n=St(n)?n:ai(n),u=u&&!a?ue(u):0;var d=n.length;return u<0&&(u=Ge(d+u,0)),eu(n)?u<=d&&n.indexOf(i,u)>-1:!!d&&Xr(n,i,u)>-1}var kS=ce(function(n,i,u){var a=-1,d=typeof i=="function",g=St(n)?N(n.length):[];return Xn(n,function(x){g[++a]=d?Ot(i,x,u):il(x,i,u)}),g}),LS=Fo(function(n,i,u){Tn(n,u,i)});function Yo(n,i){var u=oe(n)?Ae:Cp;return u(n,te(i,3))}function RS(n,i,u,a){return n==null?[]:(oe(i)||(i=i==null?[]:[i]),u=a?r:u,oe(u)||(u=u==null?[]:[u]),Rp(n,i,u))}var IS=Fo(function(n,i,u){n[u?0:1].push(i)},function(){return[[],[]]});function TS(n,i,u){var a=oe(n)?Hs:Xd,d=arguments.length<3;return a(n,te(i,4),u,d,Xn)}function OS(n,i,u){var a=oe(n)?j1:Xd,d=arguments.length<3;return a(n,te(i,4),u,d,mp)}function AS(n,i){var u=oe(n)?qn:vp;return u(n,Jo(te(i,3)))}function PS(n){var i=oe(n)?dp:Ey;return i(n)}function NS(n,i,u){(u?ht(n,i,u):i===r)?i=1:i=ue(i);var a=oe(n)?ty:ky;return a(n,i)}function MS(n){var i=oe(n)?ny:Ry;return i(n)}function BS(n){if(n==null)return 0;if(St(n))return eu(n)?br(n):n.length;var i=ot(n);return i==nn||i==rn?n.size:sa(n).length}function WS(n,i,u){var a=oe(n)?Vs:Iy;return u&&ht(n,i,u)&&(i=r),a(n,te(i,3))}var zS=ce(function(n,i){if(n==null)return[];var u=i.length;return u>1&&ht(n,i[0],i[1])?i=[]:u>2&&ht(i[0],i[1],i[2])&&(i=[i[0]]),Rp(n,be(i,1),[])}),Zo=vw||function(){return Je.Date.now()};function DS(n,i){if(typeof i!="function")throw new Vt(c);return n=ue(n),function(){if(--n<1)return i.apply(this,arguments)}}function Sh(n,i,u){return i=u?r:i,i=n&&i==null?n.length:i,On(n,P,r,r,r,r,i)}function xh(n,i){var u;if(typeof i!="function")throw new Vt(c);return n=ue(n),function(){return--n>0&&(u=i.apply(this,arguments)),n<=1&&(i=r),u}}var Pa=ce(function(n,i,u){var a=B;if(u.length){var d=Yn(u,ui(Pa));a|=M}return On(n,a,i,u,d)}),Ch=ce(function(n,i,u){var a=B|v;if(u.length){var d=Yn(u,ui(Ch));a|=M}return On(i,a,n,u,d)});function Eh(n,i,u){i=u?r:i;var a=On(n,C,r,r,r,r,r,i);return a.placeholder=Eh.placeholder,a}function kh(n,i,u){i=u?r:i;var a=On(n,O,r,r,r,r,r,i);return a.placeholder=kh.placeholder,a}function Lh(n,i,u){var a,d,g,x,E,R,D=0,$=!1,U=!1,Q=!0;if(typeof n!="function")throw new Vt(c);i=Yt(i)||0,Ne(u)&&($=!!u.leading,U="maxWait"in u,g=U?Ge(Yt(u.maxWait)||0,i):g,Q="trailing"in u?!!u.trailing:Q);function b(Fe){var sn=a,Bn=d;return a=d=r,D=Fe,x=n.apply(Bn,sn),x}function ne(Fe){return D=Fe,E=al(de,i),$?b(Fe):x}function se(Fe){var sn=Fe-R,Bn=Fe-D,Gh=i-sn;return U?lt(Gh,g-Bn):Gh}function re(Fe){var sn=Fe-R,Bn=Fe-D;return R===r||sn>=i||sn<0||U&&Bn>=g}function de(){var Fe=Zo();if(re(Fe))return ge(Fe);E=al(de,se(Fe))}function ge(Fe){return E=r,Q&&a?b(Fe):(a=d=r,x)}function Mt(){E!==r&&Wp(E),D=0,a=R=d=E=r}function gt(){return E===r?x:ge(Zo())}function Bt(){var Fe=Zo(),sn=re(Fe);if(a=arguments,d=this,R=Fe,sn){if(E===r)return ne(R);if(U)return Wp(E),E=al(de,i),b(R)}return E===r&&(E=al(de,i)),x}return Bt.cancel=Mt,Bt.flush=gt,Bt}var $S=ce(function(n,i){return gp(n,1,i)}),FS=ce(function(n,i,u){return gp(n,Yt(i)||0,u)});function US(n){return On(n,J)}function Xo(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new Vt(c);var u=function(){var a=arguments,d=i?i.apply(this,a):a[0],g=u.cache;if(g.has(d))return g.get(d);var x=n.apply(this,a);return u.cache=g.set(d,x)||g,x};return u.cache=new(Xo.Cache||In),u}Xo.Cache=In;function Jo(n){if(typeof n!="function")throw new Vt(c);return function(){var i=arguments;switch(i.length){case 0:return!n.call(this);case 1:return!n.call(this,i[0]);case 2:return!n.call(this,i[0],i[1]);case 3:return!n.call(this,i[0],i[1],i[2])}return!n.apply(this,i)}}function jS(n){return xh(2,n)}var HS=Ty(function(n,i){i=i.length==1&&oe(i[0])?Ae(i[0],At(te())):Ae(be(i,1),At(te()));var u=i.length;return ce(function(a){for(var d=-1,g=lt(a.length,u);++d=i}),Nr=_p(function(){return arguments}())?_p:function(n){return ze(n)&&xe.call(n,"callee")&&!op.call(n,"callee")},oe=N.isArray,ix=Ud?At(Ud):dy;function St(n){return n!=null&&bo(n.length)&&!Nn(n)}function $e(n){return ze(n)&&St(n)}function lx(n){return n===!0||n===!1||ze(n)&&pt(n)==Hi}var tr=yw||Va,ox=jd?At(jd):py;function ux(n){return ze(n)&&n.nodeType===1&&!cl(n)}function sx(n){if(n==null)return!0;if(St(n)&&(oe(n)||typeof n=="string"||typeof n.splice=="function"||tr(n)||si(n)||Nr(n)))return!n.length;var i=ot(n);if(i==nn||i==rn)return!n.size;if(sl(n))return!sa(n).length;for(var u in n)if(xe.call(n,u))return!1;return!0}function ax(n,i){return ll(n,i)}function cx(n,i,u){u=typeof u=="function"?u:r;var a=u?u(n,i):r;return a===r?ll(n,i,r,u):!!a}function Ma(n){if(!ze(n))return!1;var i=pt(n);return i==co||i==Nv||typeof n.message=="string"&&typeof n.name=="string"&&!cl(n)}function fx(n){return typeof n=="number"&&sp(n)}function Nn(n){if(!Ne(n))return!1;var i=pt(n);return i==fo||i==gd||i==Tt||i==Bv}function Ih(n){return typeof n=="number"&&n==ue(n)}function bo(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=j}function Ne(n){var i=typeof n;return n!=null&&(i=="object"||i=="function")}function ze(n){return n!=null&&typeof n=="object"}var Th=Hd?At(Hd):gy;function dx(n,i){return n===i||ua(n,i,Ea(i))}function px(n,i,u){return u=typeof u=="function"?u:r,ua(n,i,Ea(i),u)}function hx(n){return Oh(n)&&n!=+n}function gx(n){if(Jy(n))throw new ie(s);return Sp(n)}function mx(n){return n===null}function vx(n){return n==null}function Oh(n){return typeof n=="number"||ze(n)&&pt(n)==Gi}function cl(n){if(!ze(n)||pt(n)!=Ln)return!1;var i=Lo(n);if(i===null)return!0;var u=xe.call(i,"constructor")&&i.constructor;return typeof u=="function"&&u instanceof u&&xo.call(u)==pw}var Ba=Vd?At(Vd):my;function wx(n){return Ih(n)&&n>=-j&&n<=j}var Ah=Gd?At(Gd):vy;function eu(n){return typeof n=="string"||!oe(n)&&ze(n)&&pt(n)==qi}function Nt(n){return typeof n=="symbol"||ze(n)&&pt(n)==po}var si=Qd?At(Qd):wy;function yx(n){return n===r}function _x(n){return ze(n)&&ot(n)==Ki}function Sx(n){return ze(n)&&pt(n)==zv}var xx=Vo(aa),Cx=Vo(function(n,i){return n<=i});function Ph(n){if(!n)return[];if(St(n))return eu(n)?ln(n):_t(n);if(Xi&&n[Xi])return tw(n[Xi]());var i=ot(n),u=i==nn?Zs:i==rn?yo:ai;return u(n)}function Mn(n){if(!n)return n===0?n:0;if(n=Yt(n),n===fe||n===-fe){var i=n<0?-1:1;return i*q}return n===n?n:0}function ue(n){var i=Mn(n),u=i%1;return i===i?u?i-u:i:0}function Nh(n){return n?Tr(ue(n),0,Z):0}function Yt(n){if(typeof n=="number")return n;if(Nt(n))return G;if(Ne(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=Ne(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Jd(n);var u=i1.test(n);return u||o1.test(n)?D1(n.slice(2),u?2:8):r1.test(n)?G:+n}function Mh(n){return wn(n,xt(n))}function Ex(n){return n?Tr(ue(n),-j,j):n===0?n:0}function Se(n){return n==null?"":Pt(n)}var kx=li(function(n,i){if(sl(i)||St(i)){wn(i,Ke(i),n);return}for(var u in i)xe.call(i,u)&&nl(n,u,i[u])}),Bh=li(function(n,i){wn(i,xt(i),n)}),tu=li(function(n,i,u,a){wn(i,xt(i),n,a)}),Lx=li(function(n,i,u,a){wn(i,Ke(i),n,a)}),Rx=An(na);function Ix(n,i){var u=ii(n);return i==null?u:pp(u,i)}var Tx=ce(function(n,i){n=ke(n);var u=-1,a=i.length,d=a>2?i[2]:r;for(d&&ht(i[0],i[1],d)&&(a=1);++u1),g}),wn(n,xa(n),u),a&&(u=Qt(u,w|_|k,Fy));for(var d=i.length;d--;)ha(u,i[d]);return u});function qx(n,i){return zh(n,Jo(te(i)))}var Kx=An(function(n,i){return n==null?{}:Sy(n,i)});function zh(n,i){if(n==null)return{};var u=Ae(xa(n),function(a){return[a]});return i=te(i),Ip(n,u,function(a,d){return i(a,d[0])})}function Yx(n,i,u){i=bn(i,n);var a=-1,d=i.length;for(d||(d=1,n=r);++ai){var a=n;n=i,i=a}if(u||n%1||i%1){var d=ap();return lt(n+d*(i-n+z1("1e-"+((d+"").length-1))),i)}return fa(n,i)}var oC=oi(function(n,i,u){return i=i.toLowerCase(),n+(u?Fh(i):i)});function Fh(n){return Da(Se(n).toLowerCase())}function Uh(n){return n=Se(n),n&&n.replace(s1,Z1).replace(R1,"")}function uC(n,i,u){n=Se(n),i=Pt(i);var a=n.length;u=u===r?a:Tr(ue(u),0,a);var d=u;return u-=i.length,u>=0&&n.slice(u,d)==i}function sC(n){return n=Se(n),n&&jv.test(n)?n.replace(wd,X1):n}function aC(n){return n=Se(n),n&&Kv.test(n)?n.replace(Ns,"\\$&"):n}var cC=oi(function(n,i,u){return n+(u?"-":"")+i.toLowerCase()}),fC=oi(function(n,i,u){return n+(u?" ":"")+i.toLowerCase()}),dC=Vp("toLowerCase");function pC(n,i,u){n=Se(n),i=ue(i);var a=i?br(n):0;if(!i||a>=i)return n;var d=(i-a)/2;return Ho(Oo(d),u)+n+Ho(To(d),u)}function hC(n,i,u){n=Se(n),i=ue(i);var a=i?br(n):0;return i&&a>>0,u?(n=Se(n),n&&(typeof i=="string"||i!=null&&!Ba(i))&&(i=Pt(i),!i&&Jr(n))?er(ln(n),0,u):n.split(i,u)):[]}var SC=oi(function(n,i,u){return n+(u?" ":"")+Da(i)});function xC(n,i,u){return n=Se(n),u=u==null?0:Tr(ue(u),0,n.length),i=Pt(i),n.slice(u,u+i.length)==i}function CC(n,i,u){var a=h.templateSettings;u&&ht(n,i,u)&&(i=r),n=Se(n),i=tu({},i,a,Xp);var d=tu({},i.imports,a.imports,Xp),g=Ke(d),x=Ys(d,g),E,R,D=0,$=i.interpolate||ho,U="__p += '",Q=Xs((i.escape||ho).source+"|"+$.source+"|"+($===yd?n1:ho).source+"|"+(i.evaluate||ho).source+"|$","g"),b="//# sourceURL="+(xe.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++P1+"]")+` `;n.replace(Q,function(re,de,ge,Mt,gt,Bt){return ge||(ge=Mt),U+=n.slice(D,Bt).replace(a1,J1),de&&(E=!0,U+=`' + __e(`+de+`) + '`),gt&&(R=!0,U+=`'; `+gt+`; __p += '`),ge&&(U+=`' + ((__t = (`+ge+`)) == null ? '' : __t) + '`),D=Bt+re.length,re}),U+=`'; `;var ne=xe.call(i,"variable")&&i.variable;if(!ne)U=`with (obj) { `+U+` } `;else if(e1.test(ne))throw new ie(f);U=(R?U.replace(Dv,""):U).replace($v,"$1").replace(Fv,"$1;"),U="function("+(ne||"obj")+`) { `+(ne?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(E?", __e = _.escape":"")+(R?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+U+`return __p }`;var se=Hh(function(){return ye(g,b+"return "+U).apply(r,x)});if(se.source=U,Ma(se))throw se;return se}function EC(n){return Se(n).toLowerCase()}function kC(n){return Se(n).toUpperCase()}function LC(n,i,u){if(n=Se(n),n&&(u||i===r))return Jd(n);if(!n||!(i=Pt(i)))return n;var a=ln(n),d=ln(i),g=bd(a,d),x=ep(a,d)+1;return er(a,g,x).join("")}function RC(n,i,u){if(n=Se(n),n&&(u||i===r))return n.slice(0,np(n)+1);if(!n||!(i=Pt(i)))return n;var a=ln(n),d=ep(a,ln(i))+1;return er(a,0,d).join("")}function IC(n,i,u){if(n=Se(n),n&&(u||i===r))return n.replace(Ms,"");if(!n||!(i=Pt(i)))return n;var a=ln(n),d=bd(a,ln(i));return er(a,d).join("")}function TC(n,i){var u=H,a=ee;if(Ne(i)){var d="separator"in i?i.separator:d;u="length"in i?ue(i.length):u,a="omission"in i?Pt(i.omission):a}n=Se(n);var g=n.length;if(Jr(n)){var x=ln(n);g=x.length}if(u>=g)return n;var E=u-br(a);if(E<1)return a;var R=x?er(x,0,E).join(""):n.slice(0,E);if(d===r)return R+a;if(x&&(E+=R.length-E),Ba(d)){if(n.slice(E).search(d)){var D,$=R;for(d.global||(d=Xs(d.source,Se(_d.exec(d))+"g")),d.lastIndex=0;D=d.exec($);)var U=D.index;R=R.slice(0,U===r?E:U)}}else if(n.indexOf(Pt(d),E)!=E){var Q=R.lastIndexOf(d);Q>-1&&(R=R.slice(0,Q))}return R+a}function OC(n){return n=Se(n),n&&Uv.test(n)?n.replace(vd,lw):n}var AC=oi(function(n,i,u){return n+(u?" ":"")+i.toUpperCase()}),Da=Vp("toUpperCase");function jh(n,i,u){return n=Se(n),i=u?r:i,i===r?ew(n)?sw(n):G1(n):n.match(i)||[]}var Hh=ce(function(n,i){try{return Ot(n,r,i)}catch(u){return Ma(u)?u:new ie(u)}}),PC=An(function(n,i){return Ht(i,function(u){u=yn(u),Tn(n,u,Pa(n[u],n))}),n});function NC(n){var i=n==null?0:n.length,u=te();return n=i?Ae(n,function(a){if(typeof a[1]!="function")throw new Vt(c);return[u(a[0]),a[1]]}):[],ce(function(a){for(var d=-1;++dj)return[];var u=Z,a=lt(n,Z);i=te(i),n-=Z;for(var d=Ks(a,i);++u0||i<0)?new pe(u):(n<0?u=u.takeRight(-n):n&&(u=u.drop(n)),i!==r&&(i=ue(i),u=i<0?u.dropRight(-i):u.take(i-n)),u)},pe.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},pe.prototype.toArray=function(){return this.take(Z)},vn(pe.prototype,function(n,i){var u=/^(?:filter|find|map|reject)|While$/.test(i),a=/^(?:head|last)$/.test(i),d=h[a?"take"+(i=="last"?"Right":""):i],g=a||/^find/.test(i);d&&(h.prototype[i]=function(){var x=this.__wrapped__,E=a?[1]:arguments,R=x instanceof pe,D=E[0],$=R||oe(x),U=function(de){var ge=d.apply(h,Kn([de],E));return a&&Q?ge[0]:ge};$&&u&&typeof D=="function"&&D.length!=1&&(R=$=!1);var Q=this.__chain__,b=!!this.__actions__.length,ne=g&&!Q,se=R&&!b;if(!g&&$){x=se?x:new pe(this);var re=n.apply(x,E);return re.__actions__.push({func:Ko,args:[U],thisArg:r}),new Gt(re,Q)}return ne&&se?n.apply(this,E):(re=this.thru(U),ne?a?re.value()[0]:re.value():re)})}),Ht(["pop","push","shift","sort","splice","unshift"],function(n){var i=_o[n],u=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",a=/^(?:pop|shift)$/.test(n);h.prototype[n]=function(){var d=arguments;if(a&&!this.__chain__){var g=this.value();return i.apply(oe(g)?g:[],d)}return this[u](function(x){return i.apply(oe(x)?x:[],d)})}}),vn(pe.prototype,function(n,i){var u=h[i];if(u){var a=u.name+"";xe.call(ri,a)||(ri[a]=[]),ri[a].push({name:i,func:u})}}),ri[Uo(r,v).name]=[{name:"wrapper",func:r}],pe.prototype.clone=Ow,pe.prototype.reverse=Aw,pe.prototype.value=Pw,h.prototype.at=uS,h.prototype.chain=sS,h.prototype.commit=aS,h.prototype.next=cS,h.prototype.plant=dS,h.prototype.reverse=pS,h.prototype.toJSON=h.prototype.valueOf=h.prototype.value=hS,h.prototype.first=h.prototype.head,Xi&&(h.prototype[Xi]=fS),h},ei=aw();kr?((kr.exports=ei)._=ei,Fs._=ei):Je._=ei}).call(fl)})(rs,rs.exports);var Qn=rs.exports;const wr={};["wrap","carousel","grid","grid-carousel","center","columnLeft","columnRight","featured","featured-carousel","wallpaper","wallpaper-carousel","table","table-carousel","minimal","minimal-carousel","mini-grid","mini-grid-carousel"].forEach(e=>wr[e]=`cWidgetContainer--${e}`);const fd=2,dd=new Set(["table","table-carousel","grid-carousel","list","minimal","minimal-carousel","featured","featured-carousel","mini-grid","mini-grid-carousel","wallpaper","wallpaper-carousel"]),pf=new Set([...dd,"grid"]),yr={grid:"grid-carousel",minimal:"minimal-carousel","mini-grid":"mini-grid-carousel",table:"table-carousel",wallpaper:"wallpaper-carousel",featured:"featured-carousel"},Ze={};for(const e in yr)Ze[yr[e]]=e;const vc={"mini-grid":290,grid:300,carousel:"100%","table-carousel":"100%","featured-carousel":"100%",featured:"100%"},_v=new Set(["table-carousel","stack","list","minimal","table","featured","featured-carousel"]),pd=new Set(["grid","grid-carousel","table","table-carousel","minimal","minimal-carousel","mini-grid","mini-grid-carousel","featured","featured-carousel","carousel"]),Sv=new Set(["grid","grid-carousel","featured","featured-carousel","table","table-carousel","minimal","minimal-carousel","mini-grid","mini-grid-carousel"]),Kk=`.cBuilderSvg__box--secondaryColoring{color:color-mix(in srgb,var(--i-svg--st) 25%,var(--i-svg--co) 75%)}.cBuilderSvg__arrow,.cBuilderSvg__path{color:var(--i-svg--st)}.cBuilderSvg__marker{fill:var( --i-svg--st )}.cBuilderSvg__box--outlined{stroke:var(--i-svg--st);stroke-width:var(--i-svg--st-wi);color:var(--i-svg--co)}.cBuilderSvg text{fill:var(--i-svg--st)}.cBuilderSvg *:not(#x){transform-origin:center}.cBuilderSvg__image-icon{color:var(--i-svg--st)}.cBuilderSvg__solid{fill:var(--i-svg--st);stroke:var(--i-svg--st)} `;function ur({blocks:e=[],arrows:t=[],arrowId:r,rotate:l=!1,rotateNegative:o=!1,flip:s=!1,lines:c=[],children:f=[],includeInlineStyle:p=!1,effect:m,...y}){X.useEffect(()=>m==null?void 0:m()),r=r||Math.floor(Math.random()*Math.pow(2,4*8)).toString(16),f?Symbol.iterator in f||(f=[f]):f=[],y.className||(y.className=""),y.className+=" cBuilderSvg";const w=()=>p?I.jsx("style",{children:Kk}):I.jsx(I.Fragment,{});return I.jsxs("svg",{viewBox:"0 0 100 100",...y,children:[I.jsx(w,{}),I.jsxs("defs",{children:[I.jsx("marker",{id:`arrow_${r}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"2.5",markerHeight:"2.5",orient:"auto-start-reverse",fill:"currentColor",className:"cBuilderSvg__marker",markerUnits:"strokeWidth",children:I.jsx("path",{d:"M 0 0 L 10 5 L 0 10 Z"})}),I.jsx("clipPath",{id:`main_clip_${r}`,clipPathUnits:"userSpaceOnUse",children:I.jsx("rect",{x:5,y:5,width:90,height:90,rx:11.75})}),I.jsx("clipPath",{id:`clip1_${r}`,clipPathUnits:"userSpaceOnUse",children:I.jsx("path",{d:"M 0 0 L 25 0 L 25 100 L 0 100 Z"})}),I.jsx("clipPath",{id:`clip2_${r}`,clipPathUnits:"userSpaceOnUse",children:I.jsx("path",{d:"M72.5 0 L 97.5 0 L 97.5 100 L 72.5 100 Z"})}),I.jsx("clipPath",{id:`clip3_${r}`,clipPathUnits:"userSpaceOnUse",children:I.jsx("path",{d:"M75 25 L 80 25 A 5 5 0 0 0 85 30 L 85 80 A 5 5 0 0 0 80 85 L 30 85 A 5 5 0 0 0 25 80 L 25 75 L 70 75 A 5 5 0 0 0 75 70 Z"})}),I.jsx("clipPath",{id:`clip4_${r}`,clipPathUnits:"userSpaceOnUse",children:I.jsx("rect",{x:20,y:70,width:60,height:15,rx:5})})]}),I.jsx("g",{transform:l?void 0:`rotate(${o?"-":""}90)`,x:0,y:0,width:100,height:100,children:I.jsxs("g",{transform:l?void 0:`scale(${s?"1,-1":"1,1"})`,x:0,y:0,width:100,height:100,children:[I.jsx("rect",{width:95,height:95,x:2.5,y:2.5,rx:15,fill:"none",stroke:"none",strokeWidth:5,"data-role":"background"}),I.jsxs("g",{id:"mainarea",clipPath:`url(#main_clip_${r})`,children:[e.map((_,k)=>I.jsx("rect",{fill:"currentColor",rx:5,..._},k)),t.map(_=>I.jsx("path",{d:"M "+(_ instanceof Array?_:_.points).map(({x:k,y:A})=>`${k} ${A}`).join(" L "),rx:20,fill:"none",strokeWidth:6,stroke:"currentColor",strokeLinejoin:"round",markerStart:["both","start"].includes(_.marker)?`url(#arrow_${r})`:void 0,markerEnd:["both","end",void 0].includes(_.marker)?`url(#arrow_${r})`:void 0,className:"cBuilderSvg__arrow"},JSON.stringify(_))),c.map(_=>I.jsx("path",{d:"M "+(_ instanceof Array?_:_.points).map(({x:k,y:A})=>`${k} ${A}`).join(" L "),rx:20,fill:"none",strokeWidth:6,stroke:"currentColor",strokeLinejoin:"round",className:_.className||void 0},JSON.stringify(_))),f]}),I.jsx("rect",{width:95,height:95,x:2.5,y:2.5,rx:15,fill:"none",stroke:"currentColor",strokeWidth:5,"data-role":"outerborder"})]})})]})}function Yk({pattern:e="start",horizontal:t=!0,...r}){const o=[{width:60},{width:80},{width:40}].map((s,c)=>({...s,height:23.4,className:"cBuilderSvg__box--outlined",y:5+90*c/3+1.3+2,x:(()=>e==="end"?97.5-s.width:e==="center"?50-s.width/2:2.5)()}));return I.jsx(ur,{blocks:o,rotate:t,...r})}function cn({...e}){return e.className=[e.className||"","cBuilderSvg__image-icon"].join(" ").trim().replace(/\s+/," "),I.jsxs("svg",{...e,viewBox:"0 0 90 90",children:[I.jsx("rect",{x:0,y:0,className:"cBuilderSvg__box--secondaryColoring",width:90,height:90,rx:10,fill:"currentColor"}),I.jsx("path",{d:"M4 86 L 25 28 L 55 68 L 69 50 L 84 86Z",stroke:"currentColor",strokeWidth:"6",fill:"currentColor",strokeLinejoin:"round"}),I.jsx("circle",{r:"10",cx:"70",cy:"20",fill:"currentColor",stroke:"currentColor"})]})}const _l=[[{x:35,y:84},{x:16,y:84}],[{x:65,y:84},{x:84,y:84}]];function Zk({behavior:e="wrap",horizontal:t=!1,...r}){r.className=r.className||"",r.className+=" cBuilderSvg--wrap-icon";const l=[],o=[],s=[];let c=4,f=c,p=[57,31],m,y,w,_,k,A;switch(e){case"carousel":l.push({width:15,height:40,x:0,y:20,className:"cBuilderSvg__box--outlined"}),l.push({width:66,height:60,x:17,y:10,className:"cBuilderSvg__box--outlined"}),l.push({width:15,height:40,x:85,y:20,className:"cBuilderSvg__box--outlined"}),l.push({height:3,width:40,y:25,x:22,rx:0}),l.push({height:3,width:30,y:32,x:22,rx:0}),l.push({height:3,width:52,y:39,x:22,rx:0}),l.push({height:3,width:22,y:46,x:22,rx:0}),o.push([{x:35,y:84},{x:16,y:84}]),o.push([{x:65,y:84},{x:84,y:84}]);break;case"table":case"table-carousel":c=1.3,w=e==="table-carousel"?78:70,_=e==="table-carousel"?11:15,m=e==="table-carousel"?20:0,y=e==="table-carousel"?1:3;for(let T=0;TT.map(B=>({x:B.x,y:B.y-15}))));break;case"mini-grid":case"grid-carousel":case"mini-grid-carousel":case"grid":k=e.startsWith("mini")?3:2,y=e.startsWith("mini")?3:2,A=88,m=e==="grid-carousel"?7:0,e.startsWith("mini")&&(f=10,c=5),e==="grid-carousel"&&(y=1,k=3),e.endsWith("carousel")&&(A=e.startsWith("mini")?68:54,o.splice(o.length,0,..._l.map(T=>T.map(B=>({x:B.x,y:B.y-5}))))),e==="mini-grid"&&(m=10,A=68),e==="mini-grid-carousel"&&(A=68*2/3,m=5,y=2);for(let T=0;Tv+S,8+c),y:6+88*T/3+c+1.5,width:p[B]-2*c-4,height:88/3-2*c-3,className:"cBuilderSvg__box--outlined"});break;case"image-grid":case"wallpaper":return I.jsxs(ur,{...r,rotate:!0,children:[I.jsx(cn,{x:12,y:12,width:35,height:35}),I.jsx(cn,{x:53,y:12,width:35,height:35}),I.jsx(cn,{x:12,y:53,width:35,height:35}),I.jsx(cn,{x:53,y:53,width:35,height:35})]});case"image-carousel":case"wallpaper-carousel":return o.splice(o.length,0,..._l),I.jsxs(ur,{...r,arrows:o,rotate:!0,children:[I.jsx(cn,{x:17,y:10,height:60,width:66}),I.jsx(cn,{x:-25,y:20,height:40,width:40}),I.jsx(cn,{x:85,y:20,height:40,width:40})]});case"featured":for(let T=0;T<2;T++)l.push({x:12,y:12+41*T,height:35,width:80}),l.push({width:37,height:6,x:51,y:16.5+41*T,className:"cBuilderSvg__box--secondaryColoring"}),l.push({width:18,height:3,x:52,y:26.5+41*T,className:"cBuilderSvg__box--secondaryColoring"}),l.push({width:28,height:3,x:52,y:34.5+41*T,className:"cBuilderSvg__box--secondaryColoring"});return I.jsxs(ur,{...r,blocks:l,rotate:!0,children:[I.jsx(cn,{x:12,y:12,height:35,width:35}),I.jsx(cn,{x:12,y:53,height:35,width:35})]});case"featured-carousel":return l.push({width:38,height:6,x:51,y:25,className:"cBuilderSvg__box--secondaryColoring"}),l.push({width:20,height:3,x:52,y:35,className:"cBuilderSvg__box--secondaryColoring"}),l.push({width:30,height:3,x:52,y:43,className:"cBuilderSvg__box--secondaryColoring"}),l.push({x:12,y:19.5,height:41,width:80}),I.jsx(ur,{...r,arrows:_l.map(T=>T.map(B=>({y:B.y-5,x:B.x}))),blocks:l,rotate:!0,children:I.jsx(cn,{x:12,y:22.5,height:35,width:35})});case"minimal":case"minimal-carousel":for(let T=20;T<=(e==="minimal"?80:60);T+=20)s.push({points:[{x:20,y:T},{x:80,y:T}],className:"cBuilderSvg__path"});e==="minimal-carousel"&&o.splice(o.length,0,..._l);break;default:l.push({x:4,y:7,width:53,height:100/3-10,className:"cBuilderSvg__box--outlined"}),l.push({x:63,y:7,width:34,height:100/3-10,className:"cBuilderSvg__box--outlined"}),l.push({x:0,y:100/3+3,width:17,height:100/3+2,className:"cBuilderSvg__box--outlined"}),l.push({x:23,y:100/3+3,width:49,height:100/3+2,className:"cBuilderSvg__box--outlined"}),l.push({x:78,y:100/3+3,width:22,height:100/3+2,className:"cBuilderSvg__box--outlined"}),l.push({x:4,y:2*100/3+12,width:43,height:100/3-18,className:"cBuilderSvg__box--outlined"}),l.push({x:53,y:2*100/3+12,width:44,height:100/3-18,className:"cBuilderSvg__box--outlined"})}return I.jsx(ur,{blocks:l,arrows:o,rotate:t,lines:s,flip:!0,...r})}function Xk({noGap:e=!1,horizontal:t=!0,...r}){const l=[{points:[{y:65,x:35},{y:65,x:65}],marker:"both"}],o=[{x:0,y:15,width:30,height:70,className:"cBuilderSvg__box--outlined"},{x:70,y:15,width:30,height:70,className:"cBuilderSvg__box--outlined"}],s=[];if(e){const c=t?"y":"x",f=t?"x":"y";s.push({points:[{[c]:10,[f]:10},{[c]:90,[f]:90}],className:"cBuilderSvg__path"})}return I.jsx(ur,{rotate:t,arrows:l,lines:s,blocks:o,...r,children:I.jsx("text",{x:38,y:50,height:18,fontSize:20,width:18,fontWeight:800,color:"currentColor",children:"px"})})}function kn({icon:e,horizontal:t=!1,children:r=[],...l}){if(l["data-icon-name"]=e,l.className=l.className||"",l.className+=` cBuilderSvg--${e}`,e in wr)return I.jsx(Zk,{...l,behavior:e,horizontal:t,children:r});if(["gap","nogap"].includes(e))return I.jsx(Xk,{...l,noGap:e==="nogap",horizontal:t,children:r});const o={blocks:[],arrows:[],lines:[],rotate:!!t,arrowId:Math.round(Math.random()*Math.pow(16,8)).toString(16)};switch(e){case"minSize":o.blocks.push({x:16,y:48,width:68,height:52,className:"cBuilderSvg__box--outlined"}),r.push(I.jsx("text",{x:39.5,y:23,height:21,fontSize:23,width:21,fontWeight:800,color:"currentColor",children:"px"})),r.push(I.jsx("path",{d:"M17, 44 Q17,34 27,34 L44,34 Q49,33 50, 27 Q51, 33 56,34 L73,34 Q83,34 83, 44",fill:"none",stroke:"currentColor",strokeWidth:4,strokeLinejoin:"miter",className:"cBuilderSvg__path"}));break;case"box":case"nobox":for(let w=0;w<18;w++)r.push(I.jsx("path",{d:`M${200*w/18-100}, 0 l 100, 100`,fill:"none",strokeWidth:"4px",stroke:"currentColor",clipPath:`url(#clip3_${o.arrowId})`}));r.push(I.jsx("rect",{x:15,y:15,width:60,height:60,rx:5,fill:"currentColor",className:"cBuilderSvg__box--outlined"})),o.rotate=!0;break;case"paddingInline":case"paddingBlock":e==="paddingBlock"&&(o.rotate=!o.rotate);for(let w=0;w<16;w++)r.push(I.jsx("path",{d:`M${200*w/16-100}, 0 l 100, 100`,fill:"none",strokeWidth:4,stroke:"currentColor",clipPath:`url(#clip1_${o.arrowId})`,className:"cBuilderSvg__path"}));for(let w=0;w<16;w++)r.push(I.jsx("path",{d:`M${200*w/16-100}, 0 l 100, 100`,fill:"none",strokeWidth:4,stroke:"currentColor",clipPath:`url(#clip2_${o.arrowId})`,className:"cBuilderSvg__path"}));for(let w=0;w<2;w++)for(let _=0;_<2;_++)o.blocks.push({x:27.5+_*25,y:25+30*w,width:20,height:20,className:"cBuilderSvg__box--outlined"});break;case"interval":case"nointerval":const s=30,c=(s-5)/Math.cos(30*Math.PI/180),f=Math.PI*320/180,p=50+s*Math.cos(f),m=50-Math.abs(s*Math.sin(f)),y=2;r.push(I.jsx("path",{d:`M40 ${(100-c)/2} L 40 ${c+(100-c)/2} L 65 50 Z`,strokeLinejoin:"round",strokeWidth:6,stroke:"currentColor",fill:"currentColor",className:"cBuilderSvg__solid"})),r.push(I.jsx("path",{d:`M${s+50} 50 A ${s} ${s} 0 1 1 ${p} ${m} L ${p-Math.tan(f+-5*Math.PI/180)*y} ${m-y/Math.tan(f+-5*Math.PI/180)}`,fill:"none",stroke:"currentColor",strokeWidth:8,className:"cBuilderSvg__path",markerEnd:`url(#arrow_${o.arrowId})`}));break;case"noimages":case"images":r.push(I.jsx(cn,{x:20,y:20,width:60,height:60}));break;default:throw new RangeError(`The icon ${e} is not recognized`)}return["noimages","nogap","nointerval","nobox"].includes(e)&&r.push(I.jsx("path",{d:"M15,15 L85,85",fill:"none",stroke:"currentColor",strokeWidth:6,strokeLinecap:"round",className:"cBuilderSvg__path"})),I.jsx(ur,{...l,...o,children:r.map((s,c)=>I.jsx("g",{children:s},c))})}document.addEventListener("click",e=>{var l;const t=new WeakSet;let r=e.target.parentElement;for(;r instanceof Element;)t.add(r),r=r.parentElement;for(const[o,s]of hf.entries()){const c=o.current;c instanceof Element&&!t.has(c)&&c.classList.contains("cWidgetContainer__menu_dropout--open")&&(e.stopPropagation(),(l=e.stopImmediatePropagation)==null||l.call(e),s())}});const hf=new Map;function Jk(e,t,r){X.useMemo(()=>{t?hf.set(e,()=>r(!1)):hf.delete(e)},[t,r,e])}function bk(e,t){X.useEffect(()=>{if(t&&e.current){const r=e.current.querySelector(".cWidgetContainer__other_children");if(r){const l=e.current.getBoundingClientRect();let o=r.getBoundingClientRect();r.style.left=`${(o.width-l.width)/-2}px`,o=r.getBoundingClientRect(),o.left<10&&(r.style.left=`${(o.width-l.width)/-2+10-o.left}px`)}}},[t])}function e3({children:e=[],direction:t="right",className:r,hidden:l=!1,...o},s){const[c,f]=X.useState(!1),p=X.useRef(null);Jk(p,c,f),bk(p,c),X.useImperativeHandle(s,()=>p.current);const m=[],y=[];let w;e.forEach(k=>{Array.isArray(k)?k[2]?w=k[0]:(k[1]?y:m).push(k[0]):m.push(k)}),e=m;const _=w||e[0];return I.jsxs("div",{className:`cWidgetContainer__menu_dropout cWidgetContainer__menu_dropout--${t} ${r||""}${c?"cWidgetContainer__menu_dropout--open":""}`,...o,hidden:l||!_,ref:p,onClick:k=>{var A,T;(T=(A=k.target)==null?void 0:A.closest)!=null&&T.call(A,".cWidgetContainer__other_children")||setTimeout(()=>f(!c))},children:[y,_,I.jsx("div",{className:"cWidgetContainer__other_children","data-role":`${e.length?"otherChildren":"emptyPlaceholder"}`,style:void 0,children:e})]})}const t3=X.forwardRef(e3);function n3({list:e=[],field:t,onChange:r,children:l=[],root:o,hideWhenEmpty:s=!1,...c},f){let p={};if(s&&(!l.length&&!e.length||l.length+e.length<=1))return I.jsx(I.Fragment,{});if(e.length&&!Array.isArray(e[0])){let y=[];for(const w of e)y.push([w,w]);e=y}const m=e.map(([y,w,_={}])=>I.jsx("button",{type:"button",className:"cWidgetContainer__menu-icon",onClick:k=>{y!==e[0]?r(y):(k.stopPropagation(),k.preventDefault())},title:t&&window.ips.haveString(`core_pagebuilder_${t}__${y}`)?window.ips.getString(`core_pagebuilder_${t}__${y}`):y,..._,children:w},y));return m.splice(0,0,[I.jsx("div",{hidden:!p.title,children:I.jsx("i",{...p,className:"fa-solid fa-info-circle ipsTitle--h4",style:{position:"absolute",backgroundColor:"#fff",borderRadius:"50%",zIndex:"3",marginTop:"37px",marginLeft:"3px",padding:"2px"}})},`info_${e.length}`),!0]),o&&m.splice(1,0,[I.jsx("span",{children:o},"menudropout_label"),!1,!0]),l&&!(Symbol.iterator in l)?l=[l]:l||(l=[]),I.jsx(t3,{...c,ref:f,children:[...m,...l]})}const Ui=X.forwardRef(n3);function r3({wrapBehavior:e,onChange:t,allowedBehaviors:r,menuOptions:l,getParent:o,otherOptions:s,widgets:c}){const f=X.useRef(null),p=X.useRef(null),m=r.includes(e)?e:r[0],y=m in Ze&&r.includes(Ze[m])?Ze[m]:m,w=()=>{p.current&&f.current&&(f.current.querySelectorAll(`.cWidgetContainer__other_children [data-active][data-value]:not([data-value='${p.current}'])`).forEach(_=>_.removeAttribute("data-active")),f.current.querySelectorAll(`.cWidgetContainer__other_children [data-value='${p.current}']`).forEach(_=>_.setAttribute("data-active","")))};return X.useEffect(w),I.jsxs(Ui,{ref:f,list:r.filter(_=>!(_ in Ze)).map(_=>[_,I.jsxs(I.Fragment,{children:[I.jsx(kn,{icon:_,horizontal:!0}),I.jsx("p",{children:window.ips.getString(`core_pagebuilder_wrap__${_}`)})]}),{"data-active":_===y||y!=null&&y.endsWith("-carousel")&&Ze[y]===_?"":void 0,"data-value":_}]),root:I.jsx(kn,{icon:y||"wrap",horizontal:!0}),"data-role":"wrapBehavior",field:"wrap",onChange:_=>{let k=_;if(m in Ze&&_ in yr&&r.includes(yr[_])&&(_=yr[_]),p.current=k,_===e){w();return}t({newState:{wrapBehavior:_},reloadWidget:!0})},hidden:!l.has("wrap"),title:window.ips.getString("core_pagebuilder_wrapBehavior"),children:[I.jsx(i3,{wrapBehavior:m,allowedBehaviors:r,onChange:t,getParent:o}),I.jsx(l3,{otherOptions:s,widgets:c,onChange:t,wrapBehavior:e})]})}function i3({wrapBehavior:e,allowedBehaviors:t,onChange:r,getParent:l}){var y;const o=X.useRef(null),s=((y=l==null?void 0:l())==null?void 0:y.wrapBehavior)==="carousel";X.useEffect(()=>{if(!o.current)return;const w=window.$(o.current.parentElement);window.ips.cleanContentsOf(w),s&&window.$(document).trigger("contentChange",[w])});let c=e in Ze?e:yr[e];if((c===void 0||!t.includes(c))&&(c=t.find(w=>w in Ze)),!c)return o.current=null,I.jsx(I.Fragment,{});let f=!1;const p=()=>{if(f)return;f=!0;let w;t.includes(Ze[e])?w=Ze[e]:t.includes(yr[e])?w=yr[e]:e in Ze?w=t.find(_=>!(_ in Ze))||e:w=c,r({newState:{wrapBehavior:w},reloadWidget:!0})},m=e in Ze;return I.jsxs("button",{ref:o,disabled:s,"data-ipstooltip":s?"":void 0,title:s?window.ips.getString("core_pagebuilder_wrap__nested-carousel-info"):window.ips.getString("core_pagebuilder_wrap__toggle-carousel"),className:"cWidgetContainer__menu-icon cWidgetContainer__menu-icon--carousel-toggle",onClick:w=>{w.preventDefault(),!s&&p()},children:[I.jsx(kn,{icon:c,horizontal:!0}),I.jsx("p",{children:window.ips.getString("core_pagebuilder_wrap__toggle-carousel")}),I.jsx("span",{"data-checked":m?"":void 0,className:"cWidgetContainer__menu-checkbox"})]})}function l3({wrapBehavior:e,otherOptions:t,onChange:r,widgets:l}){if(!l.length)return I.jsx(I.Fragment,{});const o=!t.showImages,s=!Sv.has(e);return I.jsxs("button",{disabled:s,className:"cWidgetContainer__menu-icon cWidgetContainer__menu-icon--images-toggle",onClick:s?void 0:c=>{c.preventDefault(),r({newState:{otherOptions:{showImages:!t.showImages}}})},children:[I.jsx(kn,{icon:"noimages",horizontal:!0}),I.jsx("p",{children:window.ips.getString("core_pagebuilder_wrap__hide-images")}),I.jsx("span",{"data-checked":o?"":void 0,className:"cWidgetContainer__menu-checkbox"})]})}function uo({value:e,onChange:t,onInput:r,interval:l=2e3,formatter:o,name:s,min:c,max:f,step:p=1,...m}){const[y,w]=X.useState(e),_=X.useMemo(()=>Qn.debounce(t,l),[t,l]),k=async(...A)=>_(...A);return I.jsxs("div",{"data-role":`${s}rangecontainer`,className:"rangecontainer",children:[I.jsx("label",{"data-role":`${s}display`,disabled:m.disabled,children:o instanceof Function?o(y):y}),I.jsx("input",{type:"range",min:c,max:f,step:p,defaultValue:e,onInput:A=>{A.stopPropagation(),w(parseFloat(A.target.value)),r==null||r(parseFloat(A.target.value)),k(parseFloat(A.target.value))},...m})]})}function o3({menuOptions:e,otherOptions:t,onChange:r,areaId:l}){return I.jsxs(Ui,{hidden:!e.has("carousel"),"data-role":"area-carousel_interval",title:window.ips.getString("core_pagebuilder_area-carousel_interval"),root:I.jsx(kn,{icon:t.interval?"interval":"nointerval",horizontal:!0}),children:[I.jsxs("div",{children:[I.jsx("label",{htmlFor:`area_option_has_interval${l}`,children:window.ips.getString("core_pagebuilder_area-autoplay")}),I.jsx("input",{id:`area_option_has_interval${l}`,type:"checkbox",checked:!!(t.interval&&t.interval>=1),onChange:()=>r({newState:{otherOptions:{interval:t.interval?void 0:5}}})})]}),I.jsx(uo,{name:"carousel_interval",value:t.interval||5,onChange:o=>{r({newState:{otherOptions:{interval:Math.round(o)}},reloadWidget:!0})},formatter:o=>`Every ${o} second${o===1?"":"s"}`,onInput:o=>{o=Math.round(o),t.interval=o},min:2,max:10,step:1,disabled:!t.interval||t.interval<=1})]})}function u3({menuOptions:e,otherOptions:t,onChange:r,widgets:l,areaRef:o}){return I.jsx(Ui,{hidden:!e.has("gap"),"data-role":"area-gaps",title:window.ips.getString("core_pagebuilder_area-gap_size"),root:I.jsx(kn,{icon:(t.gapSize,"gap"),horizontal:!0}),children:I.jsx(uo,{name:"gap_size",value:t.gapSize||20,formatter:s=>I.jsxs(I.Fragment,{children:[s,"px"]}),onChange:s=>{r({newState:{otherOptions:{gapSize:Math.round(s)}}})},min:0,max:50,onInput:s=>{s=Math.round(s),t.gapSize=s,o.current instanceof HTMLElement&&(l.length?o.current.style.setProperty("--i-widget--gap",`${s}px`):o.current.style.setProperty("--i-block--gap",`${s}px`),o.current.dataset.widgetGapSize=`${s}`)}})})}function s3({otherOptions:e,wrapBehavior:t,areaId:r,areaRef:l,onChange:o,widgets:s,menuOptions:c}){const f=!Number.isNaN(e.minSize)&&e.minSize?e.minSize:300;return I.jsxs(Ui,{hidden:!c.has("min_size"),title:window.ips.getString("core_pagebuilder_area-min_size"),"data-role":"area-min_size",root:I.jsx(kn,{icon:"minSize",horizontal:!0}),children:[I.jsxs("div",{hidden:!t.match(/carousel$/i),children:[I.jsx("label",{htmlFor:`area_option_full_width_items${r}`,children:window.ips.getString("core_pagebuilder_area-full_width")}),I.jsx("input",{id:`area_option_full_width_items${r}`,type:"checkbox",value:e.fullWidthItems?1:0,checked:!!e.fullWidthItems,onChange:()=>o({newState:{otherOptions:{fullWidthItems:!e.fullWidthItems,minSize:f}}})})]}),I.jsx(uo,{disabled:t.match(/carousel$/i)&&!!e.fullWidthItems,name:"min_size",value:f,onChange:p=>{o({newState:{otherOptions:{minSize:Math.round(p)}}})},formatter:p=>`${p}px`,onInput:p=>{p=Math.round(p),e.minSize=p,l.current instanceof HTMLElement&&(s.length?l.current.style.setProperty("--i-widget--size",`${p}px`):l.current.style.setProperty("--i-block--size",`${p}px`),l.current.dataset.widgetMinSize=`${p}`)},min:250,max:900,step:5})]})}function a3({otherOptions:e,onChange:t,menuOptions:r,areaRef:l,widgets:o}){return I.jsx(Ui,{title:window.ips.getString("core_pagebuilder_area-padding_block"),"data-role":"area-padding_block",hidden:!r.has("padding_block"),root:I.jsx(kn,{icon:"paddingBlock",horizontal:!0}),children:I.jsx(uo,{name:"padding_block",value:e.paddingBlock||0,onChange:s=>t({newState:{otherOptions:{...e,paddingBlock:Math.round(s)}}}),formatter:s=>`${s}px`,onInput:s=>{s=Math.round(s),e.paddingBlock=s,l.current instanceof HTMLElement&&(o.length?l.current.style.setProperty("--i-widget--padding-block",`${s}`):l.current.style.setProperty("--i-block--padding-block",`${s}`),l.current.dataset.widgetPaddingBlock=`${s}`)},min:0,max:50,step:1})})}function c3({otherOptions:e,onChange:t,widgets:r,menuOptions:l,areaRef:o}){return I.jsx(Ui,{title:window.ips.getString("core_pagebuilder_area-padding_inline"),"data-role":"area-padding_inline",root:I.jsx(kn,{icon:"paddingInline",horizontal:!0}),hidden:!l.has("padding_inline"),children:I.jsx(uo,{name:"padding_inline",value:e.paddingInline||0,onChange:s=>t({newState:{otherOptions:{...e,paddingInline:Math.round(s)}}}),formatter:s=>`${s}px`,onInput:s=>{s=Math.round(s),e.paddingInline=s,o.current instanceof HTMLElement&&(r.length?o.current.style.setProperty("--i-widget--padding-inline",`${s}`):o.current.style.setProperty("--i-block--padding-inline",`${s}`),o.current.dataset.widgetPaddingInline=`${s}`)},min:0,max:50,step:1})})}function f3({menuOptions:e}){return I.jsx("div",{hidden:!!e.size,className:"cBuilderMenuText",children:window.ips.getString("core_pagebuilder_area-no_options")})}function d3({moveUp:e,moveDown:t,menuOptions:r}){return I.jsxs(I.Fragment,{children:[I.jsx("button",{className:"cWidgetContainer__menu_item cWidgetContainer__menu_item--reposition",hidden:!(r!=null&&r.has("reposition")),type:"button","data-role":"moveup",disabled:!(e instanceof Function),"data-ipstooltip":"",title:window.ips.getString("core_pagebuilder_area-move-up"),onClick:()=>{e==null||e()},children:I.jsx("i",{className:"fa-solid fa-chevron-up"})}),I.jsx("button",{className:"cWidgetContainer__menu_item cWidgetContainer__menu_item--reposition",hidden:!(r!=null&&r.has("reposition")),type:"button",disabled:!(t instanceof Function),"data-ipstooltip":"",title:window.ips.getString("core_pagebuilder_area-move-down"),onClick:()=>{t==null||t()},"data-role":"movedown",children:I.jsx("i",{className:"fa-solid fa-chevron-down"})})]})}const p3=X.forwardRef(function(t,r){var z,J;let{editing:l,setEditing:o,getParent:s,isLeaf:c=!1,onChange:f,wrapBehavior:p="wrap",otherOptions:m,widgets:y,menuRef:w,depth:_}=t;const k=X.useRef(l),A=X.useRef(0),T=({newState:H,...ee})=>{H.otherOptions&&Object.assign(m,H.otherOptions),H.otherOptions={...m},p=H.wrapBehavior||p,f({newState:H,...ee})},B=X.useRef();X.useEffect(()=>{var H,ee,le,ae,_e,me,it;if(!l&&m.shouldBeEditing){delete m.shouldBeEditing,document.body.dispatchEvent(new is(r.current)),o(!0);return}if(delete m.shouldBeEditing,B.current&&document.body.removeEventListener("click",B.current),B.current=fe=>{l&&!Object.is(fe.root,r.current)&&o(!1)},document.body.addEventListener("ips.widgetAreaMenuOpened",B.current),l&&!k.current)A.current=0,(le=(ee=(H=r.current)==null?void 0:H.querySelectorAll)==null?void 0:ee.call(H,".cWidgetContainer__menu_dropout"))==null||le.forEach(fe=>{var q,G;(q=fe.classList)==null||q.add("dropoutNoShow"),(G=fe.querySelector('[data-role="otherChildren"]'))==null||G.setAttribute("hidden","true");const j=Qn.debounce(()=>{var Z,ve,je;A.current++>1&&((je=(ve=(Z=r.current)==null?void 0:Z.querySelectorAll)==null?void 0:ve.call(Z,".cWidgetContainer__menu_dropout"))==null||je.forEach(Ee=>{Ee.removeEventListener("mousemove",j),Ee.classList.remove("dropoutNoShow")}))},50);setTimeout(()=>{var Z;(Z=fe.querySelector('[data-role="otherChildren"]'))==null||Z.removeAttribute("hidden"),fe.addEventListener("mousemove",j)},750)}),(ae=r.current)==null||ae.animate(r0,{duration:140,easing:"ease-in-out"});else if(!l&&k.current){const fe=(_e=r.current)==null?void 0:_e.querySelector(":scope > .cWidgetContainer__menu");fe instanceof Element&&((me=r.current.querySelector(":scope > button"))==null||me.setAttribute("hidden","true"),fe.removeAttribute("hidden"),(it=r.current)==null||it.animate(r0.reverse(),{duration:140}),setTimeout(()=>{var j;k.current||(c&&((j=r.current.querySelector(":scope > button"))==null||j.removeAttribute("hidden")),fe.setAttribute("hidden","true"))},100))}k.current=l});const v=((z=t.otherOptions)==null?void 0:z.area)==="sidebar",S=!(v&&!y.length)&&(!y.length||["1","true"].includes((J=ji(y[0].blockID))==null?void 0:J.dataset.widgetCustomizable))&&!(v&&t.depth>1),C=y.length&&hd(y[0].blockID),O=H=>!(!c&&dd.has(H)||C!=null&&C.size&&!(C!=null&&C.has(H))),M=S?[...Object.keys(wr)].filter(O):[],F=h3({allowedBehaviors:M,customizable:S,wrapBehavior:p,widgets:y,isSidebar:v,getParent:s,depth:_}),P={otherOptions:m,wrapBehavior:p,onChange:T,menuOptions:F,widgets:y,getParent:s,areaId:t.areaId,areaRef:t.areaRef,depth:_,moveUp:t.moveUp,moveDown:t.moveDown};return I.jsx("div",{className:"cWidgetContainer__menu_region",ref:r,children:cd.createPortal(I.jsxs("form",{ref:w,"data-current":l?"yes":"no",hidden:!l,"data-role":"widgetAreaConfigForm",className:`cWidgetContainer__menu ${l?"ipsMenu":""} ${F.size?"":"cWidgetContainer__menu--empty"}`,onSubmit:H=>{H.preventDefault(),H.stopPropagation(),window.Debug.warn("Closing a widget area form because it was submitted; these forms should never be submitted"),o(!1)},children:[I.jsx(r3,{...P,allowedBehaviors:M}),I.jsx(o3,{...P}),I.jsx(u3,{...P}),I.jsx(s3,{...P}),I.jsx(a3,{...P}),I.jsx(c3,{...P}),I.jsx(f3,{menuOptions:F}),I.jsx(d3,{...P})]}),document.body,"area_menu")})});function h3({customizable:e,allowedBehaviors:t,wrapBehavior:r,widgets:l,isSidebar:o,getParent:s,depth:c}){var p,m;const f=new Set;return e&&t.length>1&&f.add("wrap"),e&&r.match(/carousel$/)&&((p=s())==null?void 0:p.wrapBehavior)!=="carousel"&&f.add("carousel"),r!=="carousel"&&!(l.length&&pd.has(r))&&e&&f.add("gap"),!o&&!_v.has(r)&&(e||!l.length)&&f.add("min_size"),!o&&!(l.length&&!x3(l[0].blockID))&&(f.add("padding_block"),r.match(/carousel$/)||f.add("padding_inline")),c===1&&((m=s())==null?void 0:m.children.length)>1&&f.add("reposition"),f}class is extends Event{constructor(t){super("ips.widgetAreaMenuOpened"),this.root=t}}const r0=[{transform:"scaleY(0)",transformOrigin:"top"},{transform:"scaleY(1)",transformOrigin:"top"}],Kr=X.createContext({area:void 0}),xv=/^(?:ipsHide|cWidgetContainer(?:--.+)?)$/;function Cv(e,t=null){const r={orientation:kv(e)?"horizontal":"vertical",children:[],wrapBehavior:"wrap",otherOptions:{},widgets:[]};if(t!=null&&t.orientation&&(r.orientation=t.orientation==="vertical"?"horizontal":"vertical"),e.dataset.widgetLayout in wr)r.wrapBehavior=e.dataset.widgetLayout;else for(const o in wr)if(e.classList.contains(wr[o])){r.wrapBehavior=o;break}r.areaClasses=[];for(const o of e.classList)xv.test(o)||r.areaClasses.push(o);for(const o in e.dataset)if(o.match(/^widget[A-Z0-9_]+$/i)){const s=o.match(/^(?:widget)+([A-Z0-9_]+)$/i)[1].replace(/^(.)/i,(c,f)=>f.toLowerCase());r.otherOptions[s]=e.dataset[o]}delete r.otherOptions.shouldBeEditing,e.querySelectorAll('[data-controller="core.front.widgets.area"],[data-controller="core.front.widgets.block"]').forEach(o=>{delete o.dataset.dataController});for(const o of e.querySelectorAll(":scope > .cWidgetContainer"))r.children.push(Cv(o,r));let l=[];for(const o of e.querySelectorAll(":scope > .ipsWidget__content--wrap > :is(.ipsWidget, [data-blocktitle], [data-blockid])"))l.push({title:o.dataset.blocktitle,blockID:o.dataset.blockid,config:!!o.dataset.blockconfig,blank:!!o.querySelector(":scope > .ipsWidgetBlank"),contentRaw:[...o.querySelectorAll(":scope > :not(.ipsWidgetBlank,.cSidebarBlock_managing)")].map(s=>s.outerHTML).join("")});return l.length<2?r.widgets=l:r.children=l.map(o=>({orientation:r.orientation==="horizontal"?"vertical":"horizontal",areaClasses:[],children:[],wrapBehavior:r.wrapBehavior,otherOptions:{},widgets:[o]})),r}function ls(e,t=null,r=[],l=0,o=void 0){var c;t!==null&&(e.orientation=t==="horizontal"?"vertical":"horizontal"),delete e.otherOptions.layout,!o&&l===0&&((c=e.otherOptions)!=null&&c.area)?o=e.otherOptions.area:o&&(e.otherOptions=e.otherOptions||{},e.otherOptions.area=o,o==="sidebar"&&l===1&&e.children.length&&!["carousel"].includes(e.wrapBehavior)&&(e.wrapBehavior="carousel")),e.areaClasses=(e.areaClasses instanceof Array?e.areaClasses:[]).filter(f=>typeof f=="string"&&!xv.test(f));for(const[f,p]of Object.entries({gapSize:20,areaId:void 0}))(typeof e.otherOptions[f]!="number"||Number.isNaN(e.otherOptions[f]))&&(e.otherOptions[f]=typeof e.otherOptions[f]=="string"?Number(e.otherOptions[f]):void 0,Number.isNaN(e.otherOptions[f])&&p!==void 0&&(e.otherOptions[f]=p));for(const[f,p]of Object.entries({fullWidthItems:!1,showImages:!0}))typeof e.otherOptions[f]!="boolean"&&(f in e.otherOptions?e.otherOptions[f]=!["0","false",""].includes(e.otherOptions[f]):e.otherOptions[f]=p);for(let f=0;f!r.includes(m.areaId)&&(m.children.length||m.widgets.length));p.children.length===1&&!r.includes(p.areaId);)p=p.children[0],p.children=p.children.filter(m=>!r.includes(m.areaId)&&(m.children.length||m.widgets.length));if(r.includes(p.areaId)||p.children.length===0&&p.widgets.length===0)e.children.splice(f--,1);else if(p.children.length===1||p.children.length&&p.orientation===e.orientation){const m=p.children.filter(y=>!r.includes(y.areaId)&&(y.children.length||y.widgets.length)).map(y=>ls(y,e.orientation,r,l+1));e.children.splice(f--,1,...m),f+=m.length}else e.children.splice(f,1,ls(p,e.orientation,r,l+1,o))}if(l>=fd&&e.children.length){const f=[];for(const p of e.children)f.splice(f.length,0,...p.widgets);e.children=[]}const s=new Set;if(e.children=e.children.filter(f=>f.widgets.length&&s.has(f.widgets[0].blockID)?!1:!!(!f.widgets.length||s.add(f.widgets[0].blockID)||!0)),!e.widgets.length&&dd.has(e.wrapBehavior)&&(e.wrapBehavior="wrap"),"gapSize"in e.otherOptions||(e.widgets.length&&pd.has(e.wrapBehavior)?e.otherOptions.gapSize=0:e.otherOptions.gapSize=20),delete e.otherOptions.hasGaps,e.widgets.length){const f=hd(e.widgets[0].blockID);f.size&&!f.has(e.wrapBehavior)?e.wrapBehavior=f.values().next().value:!f.size&&!pf.has(e.wrapBehavior)&&(e.wrapBehavior="table")}else if(e.wrapBehavior==="carousel"&&e.children.length)for(const f of e.children)f.wrapBehavior in Ze&&(f.wrapBehavior=Ze[f.wrapBehavior],f.widgets.length&&(f.widgets[0].blank=!0,f.widgets[0].contentRaw=`
${f.widgets[0].contentRaw||""}
`));return e.children.length&&(delete e.otherOptions.showImages,e.areaClasses=[]),Ev(e),e}function Ev(e,t={current:0}){e.otherOptions=e.otherOptions||{},e.areaId=e.otherOptions.areaId=t.current++;for(const r of e.children)Ev(r,t)}function kv(e){if(!(e instanceof Element))return!1;for(const t of["stack","accordion","main"])if(e.classList.contains(`cWidgetContainer--${t}`))return!1;return!0}function Lv(e,t,r){var _,k,A,T;const l=kv(e.closest(".cWidgetContainer")),o=Sl(e.getBoundingClientRect()),s=((_=e.lastElementChild)==null?void 0:_.getBoundingClientRect())||o,c=Math.min(45,window.innerHeight/10,Math.max(15,(l?s.height:s.width)*.15));if((k=e.parentElement)!=null&&k.closest(".cWidgetContainer")&&(l&&ro.bottom-c||!l&&t>o.right-c))return"after";const f=[...e.querySelectorAll(":scope > :is(.cWidgetContainer__accordionWrapper, .cWidgetContainer)")];if(!f.length){if(e.querySelector(".ipsWidget__content--wrap")){const v=(e.querySelector(".ipsWidget__content--wrap .cSidebarBlock_managing")||e.querySelector(".ipsWidget__content--wrap")).getBoundingClientRect(),S=l?"x":"y",C=l?"right":"bottom",O=(v[S]+v[C])/2;return{x:t,y:r}[S]>O?1:0}return 0}let p={left:void 0,top:void 0,height:0,width:0},m=0,y,w;for(y=0;y=v?y+1:y}if(p.left!==void 0&&p.top!==void 0&&w&&(l&&(B.left<=w.left||B.top+20>=p.top+p.height)||!l&&(B.top<=w.top+10||B.left+20>=p.left+p.width))){w=void 0,l?p.height=(p.height+Math.max(p.height,B.top-p.top))/2:p.width=(p.width+Math.max(p.width,B.right-p.right))/2;let v=Sl(new DOMRect(p.left,p.top,p.width,p.height));if(l&&v.top<=r&&v.bottom>=r||!l&&v.left<=t&&v.right>=t){y=Math.max(0,y-1);break}m=y,p={left:l?B.left:v.right,top:l?v.bottom:B.top,height:B.height,width:B.width}}(p.left===void 0||B.leftp.left+p.width&&(p.width=B.right-p.left),(p.top===void 0||B.topp.top+p.height&&(p.height=B.bottom-p.top),w=B}if(l&&t<=p.left||!l&&r<=p.top)return m;if(l&&t>=p.left+p.width||!l&&r>=p.top+p.height)return y+1;for(let B=m;B<=y;B++){const v=Sl(f[B].getBoundingClientRect()),S=Sl((T=f[B+1])==null?void 0:T.getBoundingClientRect());if(B===y||!S){const C=(l?v.left+v.right:v.top+v.bottom)/2;return(l?t:r)>C?B+1:B}else if(l&&v.leftt||!l&&v.topr)return l?t>(v.left+v.right)/2?B+1:B:r>(v.top+v.bottom)/2?B+1:B}return window.Debug.warn(new Error("Something went wrong when evaluating which child is being hovered over based on the client x and y position. A default value of the last element is returned so as to not break things, however this is a bug which may need further investigation.")),f.length}function Sl(e){if(e)for(const t of["width","height"])t in e&&isNaN(e[t])&&(e[t]=0);return e}const g3=(e,t)=>{if(t instanceof DOMRect){const r=t.left>=e.left&&t.right<=e.right,l=t.top>=e.top&&t.bottom<=e.bottom;return r&&l}else{const{x:r,y:l}=t;return r>=e.left&&r<=e.right&&l>=e.top&&l<=e.bottom}};async function m3(e,t){try{await window.ips.fetch(window.ips.getSetting("baseURL"),{method:"POST",data:{...so(),do:"removeBlock",blockIDs:e,pageArea:t,area:t,pageApp:document.body.dataset.pageapp,pageModule:document.body.dataset.pagemodule,pageController:document.body.dataset.pagecontroller}})}catch(r){window.Debug.log("An error occurred when attempting to remove the block from the page"),window.Debug.error(r)}}function Rv(e){e=JSON.parse(JSON.stringify(e)),"areaId"in e&&(e.otherOptions=e.otherOptions||{},e.otherOptions.areaId=e.areaId);for(const t in e.widgets)delete e.widgets[t].contentRaw,delete e.widgets[t].blank;for(const t in e.children)e.children[t]=Rv(e.children[t]);return e}const yu={},fi={};function Iv(e,t,r=!0){return new Promise(async l=>{if(yu[t]){if(r){fi[t]&&await fi[t](!1),fi[t]=e instanceof Function?e:async o=>(l(o),e);return}e instanceof Function&&e(!1).then(()=>{}),l(!1);return}try{if(yu[t]=!0,e instanceof Function&&(e=await e(!0)),l(!0),await window.ips.fetch(window.ips.getSetting("baseURL"),{method:"POST",data:{...so(),do:"saveWidgetTree",tree:JSON.stringify(Rv(e)),pageApp:document.body.dataset.pageapp,pageModule:document.body.dataset.pagemodule,pageController:document.body.dataset.pagecontroller,pageArea:t,area:t}}),yu[t]=!1,fi[t]){let o=fi[t];fi[t]=null,Iv(o,t,!1).then(()=>{})}return}catch(o){yu[t]=!1,window.Debug.log("An error occurred when attempting to update the page tree"),window.Debug.error(o)}l(!1)})}function v3(){var e,t,r;return((t=(e=window.ips)==null?void 0:e.getSetting)==null?void 0:t.call(e,"pageID"))||((r=window.document.querySelector("#elCmsPageWrap"))==null?void 0:r.dataset.pageid)||""}function so(){const e=v3();return{app:e?"cms":"core",module:e?"pages":"system",controller:e?"builder":"widgets",pageID:e}}function w3(e,t){do{if(e===t)return!0;e=e.parentElement}while(e);return!1}function y3({blockID:e,setState:t,state:r,title:l,blockArea:o,reloadContent:s},c){const[f,p]=X.useState({}),[m,y]=X.useState(null),w=X.useRef(null),_=X.useRef(null),k=X.useRef(null),A=X.useRef(null);r==="editing"&&!A.current&&(A.current=document.createElement("div")),X.useEffect(()=>()=>{var v;r==="editing"&&((v=A.current)==null||v.remove(),A.current=null)},[r]);const T=_3();X.useEffect(()=>{if(r==="editing"&&c.current){const v=c.current.querySelector(":scope > .ipsWidget");v&&!v.querySelector(".ipsForm")&&f.element.parentElement!==v&&(v.innerHTML="",v.classList.add("ipsLoading"),v.appendChild(f.element),B(f.element),window.$(document).trigger("contentChange",[window.$(f.element),window.$(c.current.querySelector(".cSidebarBlock_managing"))]),v.classList.remove("ipsLoading")),k.current&&(k.current.storage.ipsInlineEditing.applyStickyStyles=!0)}w.current=r}),X.useEffect(()=>{},[T,e]);function B(v,S=!1){var O,M;const C=new Set;if(console.log("hiding stuff"),v.querySelectorAll(".ipsComposeArea_editor").forEach(F=>{let P=F.parentElement;for(;P&&P!==v;)P.querySelectorAll(":scope > *").forEach(z=>{S?(z.ipsShow(),C.add(z)):C.has(z)||z.ipsHide()}),P=P.parentElement;for(P=S?F.parentElement:F,S&&F.ipsHide();P&&P!==v;)C.add(P),P.style.display==="none"&&(P.style.display=""),P.ipsShow(),P=P.parentElement}),S){(O=v.querySelector("#ipsTabs_tabs_form_form_tab_settings_panel"))==null||O.ipsHide(),v.querySelectorAll('[id="form_tab_settings"]').forEach(P=>{P.parentElement.ipsHide()});const F=v.querySelectorAll('#tabs_form > ul[role="tablist"] > li:not([hidden]) a');F[0]&&(F[0].click(),F.length===1&&((M=F[0].closest("#tabs_form"))==null||M.ipsHide()))}else _.current&&!v.querySelector(".tiptap.ProseMirror")&&(c.current.style.height=_.current+"px",v.addEventListener("ips:editorAfterInit",F=>{var P;c.current&&setTimeout(()=>c.current.style.height="",100),k.current=((P=F.detail)==null?void 0:P.instance)||k.current},{once:!0}))}return{toolList:m,blockUsesInlineEditing:T,editForm:f,tiptapRef:k,toolListWrap:A,captureHeight(){_.current=c.current.getBoundingClientRect().height},async setEditing(){if(!(r!=="default"||!T)){if(!f.configId||!f.element){const v=`${window.ips.getSetting("baseURL")}index.php?${Object.entries(so()).map(([F,P])=>`${encodeURIComponent(F)}=${encodeURIComponent(P)}`).join("&")}&do=getConfiguration&block=${encodeURIComponent(e)}&pageApp=${encodeURIComponent(document.body.dataset.pageapp)}&pageModule=${encodeURIComponent(document.body.dataset.pagemodule)}&pageController=${encodeURIComponent(document.body.dataset.pagecontroller)}&pageArea=${encodeURIComponent(o)}&area=${encodeURIComponent(o)}`,S=window.ips.ui.dialog.create({title:l,forceReload:!1,content:'
',destructOnClose:!1,remoteSubmit:!1,remoteVerify:!1});t("loading");const C=await window.ips.fetch(v,{method:"GET"}),O=window.ips.uid(),M=document.createElement("div");M.setAttribute("data-ipsconfigform",O),M.innerHTML=C,M.querySelectorAll("form").forEach(F=>F.addEventListener("submit",P=>{var _e;P.preventDefault();const z=[...new FormData(F).entries()],J=Object.fromEntries(z),H=window.ips.ui.editorv5.getObj(c.current.querySelector("[data-ipseditorv5]")),ee=(H==null?void 0:H.getInstance())||k.current,le=J.content||(ee==null?void 0:ee.getHTML());(_e=ee==null?void 0:ee.commands)==null||_e.resetStickyAncestorStyles(),H==null||H.destruct();try{window.ips.cleanContentsOf(M)}catch(me){window.Debug.warn(me)}k.current=null;const ae=le!==void 0?c.current.querySelector(":scope > .ipsWidget").getBoundingClientRect():c.current.getBoundingClientRect();if(le!==void 0){c.current.classList.remove("ipsWidget__content--wrap--editing");const me=c.current.querySelector(":scope > .ipsWidget");me&&(me.innerHTML=`
${le}
`)}else c.current.style.height=`${ae.height}px`,c.current.style.width=`${ae.width}px`;setTimeout(async()=>{let me;try{me=await window.ips.fetch(F.action,{data:J,method:"post",bypassRedirect:!0})}catch(it){window.Debug.error(it)}S.hide(),M.remove(),t("default"),p({}),s(me)},100)})),S.addContentProcessor(F=>{var J,H;const P=(J=M.parentElement)==null?void 0:J.getBoundingClientRect();if(P){const ee=M.parentElement;ee.style.width=P.width+"px",ee.style.height=P.height+"px";const le=(H=F.closest(".ipsDialog"))==null?void 0:H.getAttribute("id");if(le){const ae=(_e,{dialogID:me})=>{le===me&&(ee.style.width="",ee.style.height="",ee.appendChild(M),B(M),window.$(document).off("hideDialog",ae))};window.$(document).on("hideDialog",ae)}}let z=M;for(;z;){if(z.parentElement===F)return;z=z.parentElement}F.innerHTML="",F.appendChild(M),B(M,!0)}),p({element:M,configId:O,dialogRef:S})}t("editing")}}}}function eo(e){return(e instanceof Element?e:document).querySelector("[data-ipsconfigform]")}function _3(e){return!1}function S3({blockID:e,title:t,config:r,update:l,defaultConfiguration:o,blank:s,getArea:c,contentRaw:f,selectArea:p},m){const[y,w]=X.useState("default"),_=X.useRef(null),k=H=>{y==="default"&&H==="editing"&&e.startsWith("app_cms_Wysiwyg")&&(S==null||S()),w(H)};let A=!1;const{area:T}=X.useContext(Kr),{setEditing:B,editForm:v,captureHeight:S,blockUsesInlineEditing:C,toolList:O,tiptapRef:M,toolListWrap:F}=y3({blockID:e,setState:k,state:y,blockArea:T,title:t,reloadContent:z,contentRaw:f},m);X.useEffect(()=>{if(y==="default"){const H=e.split("_");(!H[3]||s)&&(A=!H[3],A&&(e+=`_${Math.random().toString(36).slice(2,9)}`),z(),k("loading"))}}),X.useEffect(()=>{var H;r&&_.current&&((H=_.current)==null?void 0:H.dataset.menuListenerSet)!=="true"&&(_.current.dataset.menuListenerSet="true",window.$(document).trigger("contentChange",[window.$(_.current.parentElement)]),_.current.addEventListener("ipsMenuOpened",async ee=>{if(await new Promise(ae=>setTimeout(ae,1)),C){await p(),J(),await B();return}let le=`${window.ips.getSetting("baseURL")}index.php?${Object.entries(so()).map(([ae,_e])=>`${encodeURIComponent(ae)}=${encodeURIComponent(_e)}`).join("&")}&do=getConfiguration&block=${encodeURIComponent(e)}&pageApp=${encodeURIComponent(document.body.dataset.pageapp)}&pageModule=${encodeURIComponent(document.body.dataset.pagemodule)}&pageController=${encodeURIComponent(document.body.dataset.pagecontroller)}&pageArea=${encodeURIComponent(T)}&area=${encodeURIComponent(T)}`;try{if(P()==="modal"){J();const ae=window.ips.ui.dialog.create({title:t,url:le,forceReload:!0,destructOnClose:!0,remoteSubmit:!0});ae.show(),document.querySelectorAll(`[id="${e}_edit_menu"]`).ipsHide();const _e=Qn.throttle(me=>{me.dialogID===ae.dialogID&&(me.stopImmediatePropagation(),me.preventDefault(),z(me.response))},200);document.addEventListener("dialogSubmission",_e,{once:!0})}else ee.menu.html(window.$("
").addClass("ipsLoading").css({height:"100px"})),setTimeout(async()=>{const ae=await window.ips.fetch(le),_e=ee.menu.get(0);if(_e.id)for(const me of document.querySelectorAll(`[id="${_e.id}"]`))me!==_e&&me.remove();ee.menu.html(ae).find("form").on("submit",async me=>{var it;me.preventDefault();try{const fe=await window.ips.fetch(window.$(me.currentTarget).attr("action"),{data:window.$(me.currentTarget).serialize(),type:"post"});typeof fe=="object"||((it=fe==null?void 0:fe.toLowerCase)==null?void 0:it.call(fe))==="ok"?(await z(fe),ee.menu.trigger("closeMenu")):typeof fe=="string"&&ee.menu.html(fe)}catch(fe){window.Debug.warn(fe),window.ips.ui.alert.show({type:"alert",icon:"warn",message:window.ips.getString("sidebarConfigError"),callbacks:{}})}}),ee.menu.trigger("contentChange",[ee.menu])},10);document.body.dispatchEvent(new is(null))}catch(ae){window.Debug.warn(ae),window.ips.ui.alert("Something went wrong when loading the configuration settings")}await p()}))});function P(){var H;return((H=ji(e))==null?void 0:H.dataset.menustyle)||"none"}async function z(H){const ee={blockID:e,title:t,config:r,blank:!1,contentRaw:"Error"};(H==null?void 0:H.areaClasses)instanceof Array&&(ee.areaClasses=Array.from(new Set(H.areaClasses)));try{const le=await Tv(e,o,T,A,c().wrapBehavior);ee.contentRaw=le,ee.defaultConfiguration=void 0,l==null||l(ee),k("default")}catch(le){l==null||l(ee),k("contentLoadError"),window.Debug.log("something went wrong when loading a block's content."),window.Debug.error(le)}}function J(){document.querySelectorAll(`[id="${e}_edit_menu"]`).ipsHide()}return{reloadContent:z,state:y,setState:k,editForm:v,blockUsesInlineEditing:C,manageBlockRef:_,toolList:O,tiptapRef:M,toolListWrap:F}}function ao(e){return e.split("_").slice(0,3).join("_")}function ji(e){if(typeof e!="string")return window.Debug.warn("Could not get a block base because the id is not a string"),null;const t=ao(e);return t?document.querySelector(`[data-role="availableBlocks"] :is([data-blockID="${t}"],[data-blockID*="${t}_"])`):(window.Debug.warn(`The block id ${JSON.stringify(e)} does not have a valid base identifier (expecting an id of the format '{"app"|"plugin"}_{appname}_{widgetkey}*')`),null)}const _u={};function hd(e){if(typeof e!="string")return window.Debug.warn("Could not get a block base because the id is not a string"),new Set(pf);const t=ao(e);if(!(t in _u)){const r=ji(e);if(r!=null&&r.dataset.widgetLayouts){_u[t]=new Set;for(const l of r.dataset.widgetLayouts.split(","))_u[t].add(l.trim())}else return new Set(pf)}return _u[t]}const wc={};function x3(e){var r;const t=ao(e);if(!t)return!1;if(!(t in wc)){const l=ji(e);if(!l)return!1;wc[t]=["1","true",""].includes((r=l.dataset)==null?void 0:r.widgetPaddingallowed)}return wc[t]}async function Tv(e,t,r,l,o){const s={...so(),do:"getBlock",blockID:e,pageApp:document.body.dataset.pageapp,pageModule:document.body.dataset.pagemodule,pageController:document.body.dataset.pagecontroller,pageArea:r,area:r,orientation:"vertical",createIfDoesNotExist:l?!0:void 0,defaultConfiguration:JSON.stringify(t||""),currentURL:window.location.href};o&&(s.layout=o);const c=await window.ips.fetch(window.ips.getSetting("baseURL"),{method:"POST",data:s});if(typeof c!="string")throw new TypeError("The response is not a string");return new DOMParser().parseFromString(c,"text/html").querySelector("body").innerHTML}const us=class us extends CustomEvent{constructor({widget:t,area:r}){super(us.key,{bubbles:!0}),this.blockID=t.blockID,this.area=r}};Qh(us,"key","ips_widget_drop");let to=us;const Rl={};document.addEventListener(to.key,e=>{var t;!(e instanceof to)||typeof e.blockID!="string"||typeof e.area!="string"||((t=Rl[e.blockID])==null||t.call(Rl,e),delete Rl[e.blockID])});function C3({remove:e,blockID:t}){const{area:r}=X.useContext(Kr);t!==ao(t)&&(Rl[t]=l=>{l.area!==r&&e({shallow:!0})})}const i0=new Set;let xl;function Ov(){return new Promise(e=>{var t,r,l;if(xl)e(xl);else if(((l=(r=(t=window==null?void 0:window.ips)==null?void 0:t.utils)==null?void 0:r.crypto)==null?void 0:l.md5)instanceof Function){xl=window.ips.utils.crypto.md5(Date.now()+Math.round(Math.random()*1e4).toString(16));for(const o of i0)o(xl);e(xl)}else i0.add(e)})}function E3({children:e,parentRef:t,state:r,blockID:l,blockUsesInlineEditing:o,toolList:s,tiptapRef:c,toolListWrap:f}){const p=X.useRef(null),m=X.useRef(null);X.useEffect(()=>{m.current&&f.current&&f.current.parentElement!==m.current&&(m.current.appendChild(f.current),f.current.dataset.role="tiptap-messages-portal-root")});const y=w=>{if(w=w||t.current,!w){p.current.setAttribute("hidden","");return}const _=w.getBoundingClientRect();let k=p.current.parentElement;for(;k&&!["relative","absolute","fixed","sticky"].includes(getComputedStyle(k).position.toLowerCase());)k=k.parentElement;const A=(k||document.documentElement).getBoundingClientRect();p.current.style.left=`calc(${_.right-A.left}px + var(--i-hz-offset, 20px))`,p.current.style.top=`${_.top-A.top}px`;let T=!1;const B=p.current.getBoundingClientRect();B.right>window.innerWidth-10&&(p.current.style.left=`calc(${_.left-A.left-B.width}px - var(--i-hz-offset, 20px))`,T=!0);const v=p.current.querySelector('[data-role="toollist-wrap"]');s?(s.parentElement!==v&&(v.innerHTML="",v.appendChild(s)),v.style.top=`calc(${_.height}px + var(--i-hz-offset, 20px))`,v.style.width=`${_.width}px`,T?(v.style.right="revert",v.style.left="calc(100% + var(--i-hz-offset, 20px))"):(v.style.right="",v.style.left="")):v.innerHTML=""};return X.useEffect(()=>{var F;if(!o||r!=="editing")return;const w=t.current;let _=Date.now();const k=P=>{var z,J,H;Date.now()-_<100||(_=Date.now(),y((J=(z=P.detail)==null?void 0:z.instance)==null?void 0:J.view.dom),c.current=((H=P.detail)==null?void 0:H.instance)||c.current)};w==null||w.addEventListener("ips:editorUpdated",k);let A=0;const T=2e3,B=100,v=setInterval(()=>{if(A>=T){clearInterval(A);return}A+=B,y()},B),S=window._.debounce(()=>{var P,z;p.current.removeAttribute("hidden"),(P=c.current)==null||P.commands.showMenu(),y(((z=c.current)==null?void 0:z.view.dom)||w),document.dispatchEvent(new CustomEvent("ipsAnchorPosition"))},200),C=()=>{var P,z;if(c.current&&!((P=c.current.storage.ipsInlineEditing)!=null&&P.stickyAncestor)){document.removeEventListener("scroll",C);return}(z=c.current)==null||z.commands.hideMenu(),p.current.setAttribute("hidden",""),S()};(!c.current||(F=c.current.storage.ipsInlineEditing)!=null&&F.stickyAncestor)&&document.addEventListener("scroll",C);const O=P=>{var z,J;(J=c.current||((z=P==null?void 0:P.detail)==null?void 0:z.instance))==null||J.commands.hideMenu(),p.current.setAttribute("hidden","")},M=P=>{var z,J,H,ee,le;(J=c.current||((z=P==null?void 0:P.detail)==null?void 0:z.instance))==null||J.commands.showMenu(),p.current.removeAttribute("hidden"),y((le=(ee=(H=P==null?void 0:P.detail)==null?void 0:H.instance)==null?void 0:ee.view)==null?void 0:le.dom)};return w==null||w.addEventListener("ips:editorHidePanes",O),w==null||w.addEventListener("ips:editorShowPanes",M),()=>{w==null||w.removeEventListener("ips:editorUpdated",k),w==null||w.removeEventListener("ips:editorHidePanes",O),w==null||w.removeEventListener("ips:editorShowPanes",M),document.removeEventListener("scroll",C),clearInterval(v)}}),cd.createPortal(I.jsxs("div",{className:"cWidgetContainer__portal-menu",id:`pagebuilder_portal_menu--${l}`,hidden:r!=="editing",ref:p,children:[e,I.jsx("div",{"data-role":"toollist-wrap",ref:m})]}),document.body)}function k3({blockID:e,state:t,title:r,config:l,editForm:o,setState:s,remove:c,blockUsesInlineEditing:f,parentRef:p,manageBlockRef:m,toolList:y,tiptapRef:w,toolListWrap:_,getArea:k}){const{area:A}=X.useContext(Kr);return I.jsxs(I.Fragment,{children:[I.jsxs("div",{className:"cSidebarBlock_managing",hidden:t==="editing"&&f,id:`elWidgetMenu--${e}`,children:[I.jsx("h4",{className:"cSidebarBlock_managing__heading",hidden:t==="editing",children:r}),I.jsx("button",{ref:m,"data-ipsmenu":"","data-ipsmenu-closeonclick":"false",id:e+"_edit","data-action":"manageBlock",className:"ipsButton ipsButton--primary ipsButton--icon","data-ipstooltip":"",title:window.ips.getString("editBlock"),hidden:!l||t==="editing","data-ipsmenu-appendto":`[data-widget-area-id="${k().areaId}"][data-widgetarea="${A}"]`,children:I.jsx("i",{className:"fa-solid fa-pencil"})}),I.jsx("button",{className:"ipsButton ipsButton--icon ipsButton--inherit","data-action":"removeBlock","data-ipstooltip":"",title:window.ips.getString("removeBlock"),onClick:c,children:I.jsx("i",{className:"fa-solid fa-xmark"})}),I.jsx("div",{className:"ipsMenu ipsMenu_wide ipsHide",id:`${e}_edit_menu`})]}),I.jsxs(E3,{parentRef:p,state:t,blockID:e,blockUsesInlineEditing:f,toolList:y,tiptapRef:w,toolListWrap:_,children:[I.jsx("button",{id:e+"_save","data-action":"saveBlock",className:"ipsButton ipsButton--positive ipsButton--icon","data-ipstooltip":"",title:window.ips.getString("save"),hidden:t!=="editing",onClick:()=>{var T;(T=p.current.querySelector(".ipsWidget [data-ipsconfigform] form"))==null||T.dispatchEvent(new Event("submit"))},children:I.jsx("i",{className:"fa-solid fa-save"})}),I.jsx("button",{id:e+"_edit_more","data-action":"manageBlock",className:"ipsButton ipsButton--primary ipsButton--icon","data-ipstooltip":"",title:"More Options",hidden:t!=="editing",onClick:()=>{var T;(T=o.dialogRef)==null||T.show()},children:I.jsx("i",{className:"fa-solid fa-ellipsis"})}),I.jsx("button",{className:"ipsButton ipsButton--icon ipsButton--inherit","data-action":"cancel","data-ipstooltip":"",title:window.ips.getString("cancel"),onClick:()=>{var T;w.current&&(w.current.storage.ipsInlineEditing.applyStickyStyles=!1,w.current.commands.resetStickyAncestorStyles()),(T=o.dialogRef)==null||T.hide(),o.element&&(window.ips.cleanContentsOf(o.element),w.current=null),s("default")},children:I.jsx("i",{className:"fa-solid fa-xmark"})})]})]})}function L3(e){let{blockID:t,title:r,config:l,blank:o,contentRaw:s,areaId:c,remove:f,getArea:p}=e;const m=X.useRef(null),{state:y,setState:w,editForm:_,blockUsesInlineEditing:k,manageBlockRef:A,toolList:T,tiptapRef:B,toolListWrap:v}=S3(e,m),{area:S}=X.useContext(Kr);C3({remove:f,blockID:t});const C=!["loading","editing"].includes(y),O=Qn.debounce(()=>{var M;return(M=eo(m.current.closest(".pageBuilderRoot, body")))==null?void 0:M.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},300);return I.jsxs("div",{ref:m,className:`ipsWidget__content--wrap ${{editing:"ipsWidget__content--wrap--editing",loading:"ipsLoading"}[y]||""}`,draggable:C,onDragStart:async M=>{if(!C||!m.current)return;if(eo(m.current.closest(".pageBuilderRoot, body"))){M.preventDefault(),window.ips.ui.flashMsg.show(window.ips.getString("core_pagebuilder_widget-cannot-drag")),O();return}const F=await Ov(),P=p();document.querySelectorAll(".cWidgetContainer__menu_region.ipsMenu").forEach(z=>z.style.display="none"),M.dataTransfer.setData("application/x.ipsblock",JSON.stringify({areaDetails:{wrapBehavior:P.wrapBehavior,otherOptions:P.otherOptions},blockID:t,blockTitle:r,config:l,blank:o,contentRaw:s,areaId:c,area:S,pageHash:F})),setTimeout(()=>{var z,J;(J=(z=m.current)==null?void 0:z.closest("section.cWidgetContainer"))==null||J.setAttribute("hidden","")},100)},onDragEnd:()=>{setTimeout(()=>{var M,F;document.querySelectorAll(".cWidgetContainer__menu_region.ipsMenu").forEach(P=>P.style.display=""),(F=(M=m.current)==null?void 0:M.closest("section.cWidgetContainer"))==null||F.removeAttribute("hidden")},200)},children:[I.jsx("div",{className:"ipsWidgetBlank",hidden:!o||!!s,children:"This widget is empty"}),I.jsx("div",{className:"ipsWidget",dangerouslySetInnerHTML:y==="editing"?void 0:{__html:s||""},"data-blocktitle":r,"data-blockid":t,"data-blockerrormessage":o?window.ips.getString("core_pagebuilder_widget-load_error"):void 0,"data-blockconfig":l?"true":void 0}),I.jsx(k3,{...e,editForm:_,setState:w,state:y,parentRef:m,blockUsesInlineEditing:k,manageBlockRef:A,toolList:T,tiptapRef:B,toolListWrap:v,getArea:p})]})}function R3({orientation:e="vertical",children:t=[],wrapBehavior:r,onChange:l=()=>{},otherOptions:o={},widgets:s=[],insertSibling:c=()=>{},areaId:f,getParent:p,depth:m=0},y){r===void 0&&(r=s.length?"table":"wrap");const{area:w}=X.useContext(Kr);if(m>=fd)return{};const _=Qn.debounce(()=>{var k;(k=eo(y.current.closest(".pageBuilderRoot, body")))==null||k.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},300);return{onDragEnter:k=>k.preventDefault(),onDrop:async k=>{var A,T,B,v,S,C;if(eo(y.current.closest(".pageBuilderRoot"))){k.preventDefault(),k.stopPropagation(),window.ips.ui.flashMsg.show(window.ips.getString("core_pagebuilder_widget-cannot-drag")),_();return}k.stopPropagation(),k.preventDefault();try{let O;const M=JSON.parse(k.dataTransfer.getData("application/x.ipsblock")||"null");for(const P of["blockTitle","blockID","config","blank"])if(!M||typeof M!="object"||!(P in M)){let z=k.dataTransfer.getData("text/html")||k.dataTransfer.getData("text/plain")||"";k.dataTransfer.types.includes("text/uri-list")&&!z&&(z=k.dataTransfer.getData("text/uri-list").split(/\s*\n\s*/).filter(ae=>!ae.match(/^#/)).map(ae=>`${ae}`).join(` `)),await window.ips.ui.editorv5.whenLoaded();const J=document.createElement("div");J.setAttribute("hidden",""),document.body.appendChild(J);const[H,ee]=await window.ips.utils.tiptap.editorInstance(J,{...window.ips.ui.editorv5.buildConfig({}),content:z});if(await new Promise(le=>setTimeout(le)),z=H.getHTML(),H.destroy(),ee.unmount(),J.remove(),z){O={orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:"table",otherOptions:{},widgets:[{title:"WYSIWYG Editor",blockID:"app_cms_Wysiwyg",config:!0,blank:!1,contentRaw:z,defaultConfiguration:{content:z}}]};break}throw new Error(`The data from the drop event did not include ${P}, so the block could not be inserted in the widget area tree`)}const F=y.current;if(F){if(M.blockID.startsWith("app_cms_Blocks:")){const le=ji(M.blockID),ae=le==null?void 0:le.dataset.customblockid;if(!ae)throw new Error("The dropped block is a custom block but the block id is invalid");const _e=await window.ips.fetch(window.ips.getSetting("baseURL"),{method:"get",data:{app:"cms",module:"pages",controller:"builder",do:"getCustomBlockContent",id:ae}});if(typeof _e.content!="string"||typeof _e.block_key!="string"||typeof((A=_e.configuration)==null?void 0:A.blocktitle)!="string")throw new TypeError("Could not add a custom block because the server didn't return a string for it's content, blocktitle data attribute, or block key (as in the key of the custom block)");M.contentRaw=_e.content,M.defaultConfiguration={cms_widget_custom_block:_e.block_key},M.blockID=`app_cms_Blocks_${Math.round(Math.random()*Math.pow(16,8)).toString(16)}`,M.blockTitle=_e.configuration.blocktitle}const P=Lv(F,k.clientX,k.clientY),z=M.areaDetails,J={title:M.blockTitle,blockID:M.blockID,config:M.config,blank:M.blank,contentRaw:M.contentRaw||"
"};M.defaultConfiguration&&(J.defaultConfiguration=J.configuration=M.defaultConfiguration),O=O||{orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:(z==null?void 0:z.wrapBehavior)||M.ipsWrapBehavior||((v=(B=(T=hd(M.blockID))==null?void 0:T.values())==null?void 0:B.next())==null?void 0:v.value)||"table",otherOptions:{...z==null?void 0:z.otherOptions},widgets:[J]};const H=await Ov(),ee=[];if(Number.isInteger(M==null?void 0:M.areaId)&&M.area===w&&M.pageHash===H&&ee.push(M.areaId),ee.includes(f))return;if(ao(O.widgets[0].blockID)===O.widgets[0].blockID){O.widgets[0].blockID+="_";for(let le=0;le<6;le++)O.widgets[0].blockID+=Math.round(Math.random()*16).toString(16);O.widgets[0].contentRaw=await Tv(O.widgets[0].blockID,O.widgets[0].defaultConfiguration,w,!0,O.wrapBehavior),O.widgets[0].blank=!1}if((S=y==null?void 0:y.current)!=null&&S.closest(".cWidgetContainer--carousel")&&O.wrapBehavior in Ze&&(O.wrapBehavior=Ze[O.wrapBehavior],O.widgets.length&&(O.widgets[0].blank=!0,O.widgets[0].contentRaw=`
${O.widgets[0].contentRaw||""}
`)),["before","after"].includes(P))O.orientation=e,c==null||c(O,P==="before",ee);else if(!t.length&&s.length){const le={orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:r,otherOptions:o,widgets:s,areaId:f};l({newState:{children:P===0?[O,le]:[le,O],wrapBehavior:"wrap",widgets:[],otherOptions:{}},toRemove:ee})}else t.splice(P,0,O),l({newState:{children:t},toRemove:ee});(C=y.current)==null||C.dispatchEvent(new to({widget:O.widgets[0],area:w}))}}catch(O){window.Debug.warn(O),window.Debug.log("Could not insert the content dropped inside a widget area"),window.ips.ui.alert.show({message:"This content cannot be dropped in the page"})}document.querySelectorAll("section.cWidgetContainer:not([data-controller])").forEach(O=>{O.removeAttribute("hidden"),O.querySelectorAll(":scope > .cWidgetContainer__menu_region").forEach(M=>M.style.display="")})},onDragOver:k=>{k.preventDefault(),k.stopPropagation(),O3({ref:y,orientation:e,wrapBehavior:r,getParent:p,children:t,clientX:k.clientX,clientY:k.clientY})}}}function I3(e,t){if(e!=null&&e.classList.contains("cWidgetContainer--dragInside")){const r=e.getBoundingClientRect();let l;if(e.scrollWidth<=r.width)return!1;if(tr.right-Math.max(r.width/10,70))l="next";else return!1;if(l&&!window.ips.ui.carousel.containerAtEnd(e,l))return T3(e,l),!0}return!1}const T3=Qn.throttle((e,t)=>{e.dispatchEvent(new CustomEvent("scrollPanels",{detail:{direction:t,loop:!1}}))},1e3),O3=Qn.throttle(function({ref:e,orientation:t,wrapBehavior:r,getParent:l,children:o,clientX:s,clientY:c}){var f,p;if(e.current){if(eo(e.current.closest(".pageBuilderRoot")))return;const m=l==null?void 0:l();try{let y,w,_=e.current,k=Lv(_,s,c),A=t;if(["stack","accordion"].includes(r)&&(t="vertical"),["before","after"].includes(k)){A=t==="horizontal"?"vertical":"horizontal";const v=k;if(_=(f=e.current.parentElement)==null?void 0:f.closest(".pageBuilderRoot .cWidgetContainer"),_){let S=_.querySelectorAll(":is(:scope, :scope > .cWidgetContainer__accordionWrapper) > :is(.cWidgetContainer, .ipsWidget)");for(k=0,k=0;k :first-child"))!=null&&p.classList.contains("cWidgetContainer__menu_region")&&(k+=1);let T=1,B=k*T;if(_&&(k>0&&(y=_.querySelector(`:scope > :is(.cWidgetContainer,.ipsWidget, .cWidgetContainer__accordionWrapper):nth-child(${B})`)),w=_.querySelector(`:scope > :is(.cWidgetContainer, .ipsWidget, .cWidgetContainer__accordionWrapper):nth-child(${B+T})`),di(_,"cWidgetContainer--dragInside"),_.classList.contains("cWidgetContainer--carousel")&&(y?w||di(_,"cWidgetContainer--dragAfterLast"):di(_,"cWidgetContainer--dragBeforeFirst"),_.classList.contains("ipsScrolling")||I3(_,s))))return;y&&di(y,A==="horizontal"?"cWidgetContainer--dragLeft":"cWidgetContainer--dragBelow"),w&&di(w,A==="horizontal"?"cWidgetContainer--dragRight":"cWidgetContainer--dragAbove")}catch(y){y.message=`An unexpected error occurred when handling the drag over event `+y.message,window.Debug.warn(y)}}},200);function di(e,t,r=400){var l;et.has(e)||et.set(e,new Map);for(const o of t.split(/\s+/).filter(s=>!!s)){et.get(e).has(o)&&(clearTimeout(et.get(e).get(o)),et.get(e).delete(o)),e.classList.add(o),document.querySelectorAll(`.${o}`).forEach(c=>{var f;if(c!==e){c.classList.remove(o);const p=(f=et.get(c))==null?void 0:f.get(o);p&&(clearTimeout(p),et.get(c).delete(o))}});const s=setTimeout(()=>{var f;e.classList.remove(o);const c=(f=et.get(e))==null?void 0:f.get(o);c&&(clearTimeout(c),et.get(e).delete(o),et.get(e).size||et.delete(e))},r);et.get(e).set(o,s)}(l=et.get(e))!=null&&l.size||et.delete(e)}setInterval(()=>{for(const e of et.keys())if(e.closest("body")!==document.body){for(const t of et.get(e).values())clearTimeout(t);et.delete(e)}},5e3);const et=new Map;function A3({wrapBehavior:e,widgets:t,scrollRef:r}){const l=X.useRef(null),o=e==="carousel"&&!t.length;X.useEffect(()=>{if(o&&(p(),r.current)){const y=r.current;os.set(y,p);const w=k=>{var O;const[A,T,B]=c(),v=((O=k==null?void 0:k.detail)==null?void 0:O.direction)||"next",S=v!=="prev"&&(A>=T-1||B[T-1].getBoundingClientRect().right<=y.getBoundingClientRect().right);if(v==="prev"&&A===0||v!=="prev"&&S)return;const C=y.querySelector(`[data-carousel-arrow="${v}"]`);C instanceof HTMLElement&&m({target:C})};y.addEventListener("scrollPanels",w);const _=new ResizeObserver(Qn.debounce(p,100));return _.observe(r.current),()=>{os.delete(y),y.removeEventListener("scrollPanels",w),_.disconnect()}}});function s(){var y;return(y=r.current)!=null&&y.classList.contains("cWidgetContainer--carousel")?r.current:null}function c(){var T;const y=s(),w=y==null?void 0:y.querySelectorAll(":scope > .cWidgetContainer");if(!w)throw new ReferenceError;const _=w.length;if(gf.has(y))return[parseInt(((T=l.current)==null?void 0:T.dataset.actualOffset)||"0"),_,w];const k=y.getBoundingClientRect();let A;for(A=0;A<_;A++)if(w[A].getBoundingClientRect().left>=k.left-1)return[A,_,w];return[_-1,_,w]}function f(){var k,A;const y=(k=r.current)==null?void 0:k.getBoundingClientRect(),w=(A=r.current)==null?void 0:A.querySelectorAll(":scope > .cWidgetContainer");if(!y||!(w!=null&&w.length)||w.length===1)return 1;const _=Math.abs(w[w.length-1].getBoundingClientRect().right-w[0].getBoundingClientRect().left);if(_){let T=Math.ceil(_/y.width);return w.length>2&&w[w.length-1].getBoundingClientRect().right-w[w.length-2].getBoundingClientRect().left>y.width&&T++,T}return 1}function p(){if(!l.current)return;let[y,w]=c();const _=f();y=Math.min(y,_),w=Math.min(w,_),l.current.innerText=`${y+1}/${w}`,l.current.closest(".cWidgetContainer__carousel-buttons").querySelectorAll("button").forEach(k=>w<=1?k.setAttribute("disabled",""):k.removeAttribute("disabled"))}function m(y){const w=s();if(!w)return;const _=y.target instanceof HTMLElement&&y.target.dataset.carouselArrow||"next",[k,A,T]=c();if(T.length<=1)return;const B=w.getBoundingClientRect(),v=_!=="prev"&&(k+1>=A||T[A-1].getBoundingClientRect().right<=B.right),S=(_==="prev"&&k===0?A-1:v?0:k+(_==="prev"?-1:1))%A;let C=(S===A-1?T[S].getBoundingClientRect().right:T[S].getBoundingClientRect().left)-B.left;l.current.dataset.actualOffset=`${S}`,gf.add(w),w.scrollTo({left:r.current.scrollLeft+C,behavior:"smooth"}),p()}return{indicatorRef:l,scroll:m}}const gf=new WeakSet,os=new WeakMap;function Av(e,t=!1){var r,l;if((r=e.classList)!=null&&r.contains("cWidgetContainer--carousel")&&e.querySelector(".ipsWidget__content--wrap--editing")){const o=e.querySelector(".ipsWidget__content--wrap--editing"),s=(l=window.ips.ui.editorv5.getObj(window.$(o.querySelector("[data-ipseditorv5]"))))==null?void 0:l.getInstance();t?o==null||o.dispatchEvent(new CustomEvent("ips:editorHidePanes",{detail:{instance:s},bubbles:!0,cancelable:!0})):o.dispatchEvent(new CustomEvent("ips:editorShowPanes",{detail:{instance:s},bubbles:!0,cancelable:!0}))}}function l0(e){let t=e.target;for(;t instanceof HTMLElement;){if(Av(t),os.has(t)){let r=!1;const l=e.stopPropagation;if(e.stopPropagation=(function(){r=!0,l.call(this)}).bind(e),os.get(t)(e),gf.delete(t),r)break;e.stopPropagation=l.bind(e)}t=t.parentElement}}"onscrollend"in HTMLElement.prototype?window.addEventListener("scrollend",l0,{capture:!0}):window.addEventListener("scroll",Qn.debounce(l0,200),{capture:!0});window.addEventListener("scroll",e=>{var r;let t=e.target;(r=t==null?void 0:t.classList)!=null&&r.contains("cWidgetContainer--carousel")&&Av(t,!0)},{capture:!0});function P3({widgets:e,scrollRef:t,wrapBehavior:r}){const{indicatorRef:l,scroll:o}=A3({widgets:e,scrollRef:t,wrapBehavior:r});return I.jsxs("div",{className:"cWidgetContainer__carousel-buttons","data-controller":"core.front.widgets.carouselControls",children:[I.jsx("div",{className:"cWidgetContainer__carousel-indicator",ref:l}),[["prev","left"],["next","right"]].map(([s,c])=>I.jsx("button",{onClick:o,"data-carousel-arrow":s,children:I.jsx("i",{className:`fa-solid fa-chevron-${c}`})},s))]})}function Pv({...e}){var P,z,J,H,ee,le,ae,_e,me,it,fe;const{onChange:t=({...j})=>window.Debug.warn({...j,message:"An area was changed but cannot propagate to its parent because its neglectful child protection services widget area parent didn't provide an onChange prop"}),areaId:r,depth:l=0}=e,{area:o}=X.useContext(Kr),s=X.useRef({});Object.assign(s.current,{children:e.children||[],widgets:e.widgets||[],otherOptions:e.otherOptions||{},wrapBehavior:e.wrapBehavior||"wrap",areaClasses:e.areaClasses});const c=X.useRef(null),f=(P=e.getParent)==null?void 0:P.call(e),[p,m]=X.useState(!1),[y,w]=X.useState(0);s.current.wrapBehavior in wr||(s.current.wrapBehavior=e.wrapBehavior="wrap");const _=X.useRef(null),k=X.useRef(null),A=R3(e,_),T=(J=(z=s.current.widgets)==null?void 0:z[0])==null?void 0:J.blockID,B=X.useMemo(()=>T?ji(T):null,[T]),v=["cWidgetContainer","cWidgetContainer_managing"];(H=e.getParent)!=null&&H.call(e)&&!((le=(ee=e.getParent()).getParent)!=null&&le.call(ee))&&v.push("cWidgetContainer--editable"),!s.current.widgets.length&&f&&v.push("cWidgetContainer--isGroup"),s.current.widgets.length||v.push(wr[s.current.wrapBehavior]),s.current.widgets.length&&(s.current.children=[],v.push("cWidgetContainer--isWidget"));let S=!1;f||(v.push("cWidgetContainer--main"),s.current.widgets.length||(S=!0)),p&&v.push("cWidgetContainer--menu_open"),s.current.areaClasses instanceof Array&&v.push(...s.current.areaClasses),s.current.otherOptions.showImages===!1&&s.current.widgets.length&&Sv.has(s.current.wrapBehavior)&&v.push("cWidgetContainer--noImages");const C={},O=s.current.widgets.length?"widget":"block";if((f&&!s.current.widgets.length||f&&((ae=B==null?void 0:B.dataset.widgetLayouts)==null?void 0:ae.split(",").length)>1)&&(s.current.widgets.length||Object.assign(C,{"--i-block--padding-block":s.current.otherOptions.paddingBlock||0,"--i-block--padding-inline":s.current.otherOptions.paddingInline||0})),!pd.has(s.current.wrapBehavior)||!s.current.widgets.length?C[`--i-${O}--gap`]=(typeof s.current.otherOptions.gapSize=="number"?s.current.otherOptions.gapSize:20)+"px":C[`--i-${O}--gap`]="0px",s.current.otherOptions.fullWidthItems&&s.current.wrapBehavior.match(/carousel$/)?C[`--i-${O}--size`]="100%":(_v.has(s.current.wrapBehavior)?s.current.wrapBehavior in vc&&(C[`--i-${O}--size`]=`${vc[s.current.wrapBehavior]}`):C[`--i-${O}--size`]=`${s.current.otherOptions.minSize||vc[s.current.wrapBehavior]||300}`,(_e=C[`--i-${O}--size`])!=null&&_e.match(/^\d+(?:\.\d*)?$|^\.\d+$/)&&(C[`--i-${O}--size`]+="px")),C[`--i-${O}--size`]==="100%"&&s.current.wrapBehavior.match(/carousel$/)&&(s.current.otherOptions.fullWidthItems=!0,e.otherOptions.fullWidthItems=!0),s.current.widgets.length){const j={paddingBlock:"padding-block",paddingInline:"padding-inline"};for(const q in j)C[`--i-widget--${j[q]}`]=s.current.otherOptions[q]||"0"}const F={"data-widget-layout":s.current.wrapBehavior};for(const j in s.current.otherOptions){const q=j.replaceAll(/([A-Z])/g,(G,Z)=>`-${Z}`.toLowerCase()).toLowerCase().trim().replaceAll(/[^0-9a-z_]+/g,"-").replaceAll(/^[^0-9a-z_]+|[^0-9a-z_]+$/g,"");F["data-widget-"+q]=((it=(me=s.current.otherOptions[j])==null?void 0:me.toString)==null?void 0:it.call(me).toLowerCase())||void 0}return S&&!((fe=s.current.children)!=null&&fe.length)&&window.ips.haveString("page_editor_cta")&&(F["data-pageeditor-empty-message"]=window.ips.getString("page_editor_cta")),I.jsxs("section",{"data-depth":l,"data-max-depth":fd,className:v.join(" "),ref:_,...F,"data-widget-area-id":r,"data-widget-area":o,"data-widgetarea":o,style:C,onMouseDown:j=>{var q,G,Z,ve,je,Ee;if(c.current&&w3(j.target,c.current)){j.stopPropagation();return}(Z=(G=(q=j.currentTarget)==null?void 0:q.closest)==null?void 0:G.call(q,".pageBuilderRoot"))!=null&&Z.querySelector("[data-ipsconfigform]")||(!p&&k.current&&(l<=1||e.parentIsEditing||(je=(ve=_.current)==null?void 0:ve.parentElement)!=null&&je.querySelector(".cWidgetContainer--menu_open.cWidgetContainer"))?(j.stopPropagation(),document.body.dispatchEvent(new is(k.current)),setTimeout(()=>m(!0),10)):p&&l!==1&&((Ee=e.setParentEditing)==null||Ee.call(e,!0)))},...A,children:[S?I.jsx(I.Fragment,{}):I.jsx(p3,{...e,areaRef:_,depth:l,editing:p,setEditing:m,setParentEditing:e.setParentEditing,isLeaf:s.current.widgets.length&&!s.current.children.length,ref:k,menuRef:c}),s.current.children.map((j,q)=>X.createElement(Pv,{...j,key:j.areaId,onChange:({newState:G,toRemove:Z=[],removedBlocks:ve=[],reloadWidget:je=!1})=>{var ft,dt;let Ee=s.current.children.findIndex(Tt=>Tt.areaId===j.areaId&&Tt.areaId!==void 0);if(Ee>=0&&Number.isInteger(Ee)){if(G.otherOptions&&Object.assign(s.current.children[Ee].otherOptions,G.otherOptions),Object.assign(s.current.children[Ee],G),je&&s.current.children[Ee].widgets.length){s.current.children[Ee].widgets[0].blank=!0;const Tt=(dt=(ft=document.querySelector(`[data-blockid="${s.current.children[Ee].widgets[0].blockID}"]`))==null?void 0:ft.getBoundingClientRect)==null?void 0:dt.call(ft);Tt instanceof DOMRect&&(s.current.children[Ee].widgets[0].contentRaw=`
`)}t({newState:{children:s.current.children},toRemove:Z,removedBlocks:ve,reloadWidget:je})}},insertSibling:(G,Z=!1,ve=[])=>{let je=s.current.children.findIndex(Ee=>Ee.areaId===j.areaId&&Ee.areaId);je||(je=0),s.current.children.splice(Z?je:je+1,0,G),t({newState:{children:s.current.children},toRemove:ve})},setParentEditing:m,parentIsEditing:!!p,getParent:()=>e,isCurrent:q===y,setCurrent:()=>w(q),depth:l+1,moveUp:q===0?void 0:()=>{const[G,Z]=s.current.children.slice(q-1,q+1);Z.otherOptions=Z.otherOptions||{},Z.otherOptions.shouldBeEditing=!0,G.otherOptions.shouldBeEditing&&delete G.otherOptions.shouldBeEditing,s.current.children.splice(q-1,2,Z,G),t({newState:{children:s.current.children}})},moveDown:q===s.current.children.length-1?void 0:()=>{const[G,Z]=s.current.children.slice(q,q+2);G.otherOptions=G.otherOptions||{},G.otherOptions.shouldBeEditing=!0,Z.otherOptions.shouldBeEditing&&delete Z.otherOptions.shouldBeEditing,s.current.children.splice(q,2,Z,G),t({newState:{children:s.current.children}})}})),s.current.widgets.map((j,q)=>I.jsx(L3,{...j,areaId:r,remove:({shallow:G=!1})=>{var Z;s.current.widgets.splice(q,1),t({newState:{widgets:((Z=s.current)==null?void 0:Z.widgets)||[]},toRemove:G?[r]:[],removedBlocks:G?[]:[j.blockID]})},update:G=>{let Z;G.areaClasses instanceof Array&&(Z=G.areaClasses),delete G.areaClasses,Object.assign(s.current.widgets[q],G);const ve={newState:{widgets:s.current.widgets},toRemove:[]};Z&&(s.current.areaClasses=ve.newState.areaClasses=Z),t(ve)},parentOptions:s.current.otherOptions,getArea:()=>({...e,...s.current}),selectArea:()=>new Promise(G=>{document.body.dispatchEvent(new is(k.current)),setTimeout(()=>{m(!0),G()})})},j.blockID+q)),s.current.wrapBehavior==="carousel"?I.jsx(P3,{widgets:s.current.widgets,scrollRef:_,wrapBehavior:s.current.wrapBehavior}):I.jsx(I.Fragment,{})]})}function N3({tree:e,onChange:t,area:r,effect:l}){const[o,s]=X.useState(e),[c,f]=X.useState(()=>!!document.querySelector('[data-role="availableBlocks"] [data-blockid]')),{Provider:p}=Kr;return X.useEffect(()=>l==null?void 0:l()),X.useEffect(()=>{c||document.addEventListener("ipsWidgetManagerLoaded",()=>f(!0))},[c]),I.jsx(p,{value:{area:r},children:I.jsx(Pv,{...o,onChange:async({newState:m,toRemove:y=[],removedBlocks:w=[],reloadWidget:_=!0})=>{w.length&&await m3(w,r),Object.assign(o,m),m=JSON.parse(JSON.stringify({...ls(o,null,y)})),Iv(m,r).then(k=>{k&&(t==null||t({newState:m}))}),s(m)}})})}window.ips.createModule("ips.utils.pagebuilder",()=>{const e={};return{initializePageBuilderTree(t,r,l){var p,m;const o=ls(Cv(r)),s=((p=r.closest("[data-widget-area]"))==null?void 0:p.dataset.widgetArea)||((m=r.closest("[data-widgetarea]"))==null?void 0:m.dataset.widgetarea),c=yc.createRoot(t);let f;return new Promise(y=>{c.render(I.jsx(D2.StrictMode,{children:I.jsx(N3,{tree:o,area:s,onChange:l,effect:()=>{f||(f=!0,y({root:c,domRoot:t}))}})}))})},fillSemanticIcon(t,r){return S2(()=>Promise.resolve({}),["assets/main-51be5621.css"]).then(()=>window.Debug.log("Loaded SVG css file")),new Promise(l=>{e[r]?(t.innerHTML=e[r],l()):yv(t).render(I.jsx(kn,{icon:r,className:"ipsButton ipsButton--icon pagebuildericon",includeInlineStyle:!0,horizontal:!0,width:"88px",effect:()=>{e[r]=t.innerHTML,t.innerHTML=e[r],l()}}))})}}});