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:{}},me={};/** * @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"),I2=Symbol.for("react.provider"),R2=Symbol.for("react.context"),T2=Symbol.for("react.forward_ref"),A2=Symbol.for("react.suspense"),O2=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 $i(e,t,r){this.props=e,this.context=t,this.refs=c0,this.updater=r||s0}$i.prototype.isReactComponent={};$i.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")};$i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f0(){}f0.prototype=$i.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,$i.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,we=F[X];if(0>>1;Xo(Ye,G))Zeo(Tt,Ye)?(F[X]=Tt,F[Ze]=G,X=Ze):(F[X]=Ye,F[Ee]=G,X=Ee);else if(Zeo(Tt,G))F[X]=Tt,F[Ze]=G,X=Ze;else break e}}return V}function o(F,V){var G=F.sortIndex-V.sortIndex;return G!==0?G:F.id-V.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 d=[],m=[],y=1,w=null,x=3,k=!1,O=!1,I=!1,P=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,_=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(F){for(var V=r(m);V!==null;){if(V.callback===null)l(m);else if(V.startTime<=F)l(m),V.sortIndex=V.expirationTime,t(d,V);else break;V=r(m)}}function M(F){if(I=!1,C(F),!O)if(r(d)!==null)O=!0,Fe(z);else{var V=r(m);V!==null&&pe(M,V.startTime-F)}}function z(F,V){O=!1,I&&(I=!1,v(B),B=-1),k=!0;var G=x;try{for(C(V),w=r(d);w!==null&&(!(w.expirationTime>V)||F&&!te());){var X=w.callback;if(typeof X=="function"){w.callback=null,x=w.priorityLevel;var we=X(w.expirationTime<=V);V=e.unstable_now(),typeof we=="function"?w.callback=we:w===r(d)&&l(d),C(V)}else l(d);w=r(d)}if(w!==null)var Re=!0;else{var Ee=r(m);Ee!==null&&pe(M,Ee.startTime-V),Re=!1}return Re}finally{w=null,x=G,k=!1}}var U=!1,A=null,B=-1,b=5,Q=-1;function te(){return!(e.unstable_now()-QF||125X?(F.sortIndex=G,t(m,F),r(d)===null&&F===r(m)&&(I?(v(B),B=-1):I=!0,pe(M,G-X))):(F.sortIndex=we,t(d,F),O||k||(O=!0,Fe(z))),F},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(F){var V=x;return function(){var G=x;x=V;try{return F.apply(this,arguments)}finally{x=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=Z,$t=G2;function H(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 ot={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ot[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];ot[t]=new yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ot[e]=new yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ot[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){ot[e]=new yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ot[e]=new yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ot[e]=new yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ot[e]=new yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ot[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);ot[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);ot[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);ot[t]=new yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ot[e]=new yt(e,1,!1,e.toLowerCase(),null,!1,!1)});ot.xlinkHref=new yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ot[e]=new yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function xf(e,t,r,l){var o=ot.hasOwnProperty(t)?ot[t]:null;(o!==null?o.type!==0:l||!(2f||o[c]!==s[f]){var d=` `+o[c].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}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 gi:return"Fragment";case hi: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 ze({},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")?Ic(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ic(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 Ic(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 Li(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 Rl={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(Rl).forEach(function(e){b2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Rl[t]=Rl[e]})});function A0(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Rl.hasOwnProperty(e)&&Rl[e]?(""+t).trim():t+"px"}function O0(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var l=r.indexOf("--")===0,o=A0(r,t[r],l);r==="float"&&(r="cssFloat"),l?e.setProperty(r,o):e[r]=o}}var eE=ze({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 Ac(e,t){if(t){if(eE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Oc(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,Ii=null,Ri=null;function ig(e){if(e=lo(e)){if(typeof Nc!="function")throw Error(H(280));var t=e.stateNode;t&&(t=ps(t),Nc(e.stateNode,e.type,t))}}function P0(e){Ii?Ri?Ri.push(e):Ri=[e]:Ii=e}function N0(){if(Ii){var e=Ii,t=Ri;if(Ri=Ii=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=Al),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 mi=!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(mi)return e==="compositionend"||!Mf&&b0(e,t)?(e=X0(),Eu=Of=sr=null,mi=!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,vi=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||vi==null||vi!==Nu(l)||(l=vi,"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"),0_i||(e.current=Qc[_i],Qc[_i]=null,_i--)}function Ie(e,t){_i++,Qc[_i]=e.current,e.current=t}var Sr={},dt=Er(Sr),Lt=Er(!1),jr=Sr;function Ni(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 It(e){return e=e.childContextTypes,e!=null}function ju(){Oe(Lt),Oe(dt)}function Ig(e,t,r){if(dt.current!==Sr)throw Error(H(168));Ie(dt,t),Ie(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(H(108,X2(e)||"Unknown",o));return ze({},r,l)}function Hu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sr,jr=dt.current,Ie(dt,e),Ie(Lt,Lt.current),!0}function Rg(e,t,r){var l=e.stateNode;if(!l)throw Error(H(169));r?(e=hm(e,t,jr),l.__reactInternalMemoizedMergedChildContext=e,Oe(Lt),Oe(dt),Ie(dt,e)):Oe(Lt),Ie(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 kr(){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<B?(b=A,A=null):b=A.sibling;var Q=x(v,A,C[B],M);if(Q===null){A===null&&(A=b);break}e&&A&&Q.alternate===null&&t(v,A),_=s(Q,_,B),U===null?z=Q:U.sibling=Q,U=Q,A=b}if(B===C.length)return r(v,A),Ne&&Br(v,B),z;if(A===null){for(;BB?(b=A,A=null):b=A.sibling;var te=x(v,A,Q.value,M);if(te===null){A===null&&(A=b);break}e&&A&&te.alternate===null&&t(v,A),_=s(te,_,B),U===null?z=te:U.sibling=te,U=te,A=b}if(Q.done)return r(v,A),Ne&&Br(v,B),z;if(A===null){for(;!Q.done;B++,Q=C.next())Q=w(v,Q.value,M),Q!==null&&(_=s(Q,_,B),U===null?z=Q:U.sibling=Q,U=Q);return Ne&&Br(v,B),z}for(A=l(v,A);!Q.done;B++,Q=C.next())Q=k(A,v,B,Q.value,M),Q!==null&&(e&&Q.alternate!==null&&A.delete(Q.key===null?B:Q.key),_=s(Q,_,B),U===null?z=Q:U.sibling=Q,U=Q);return e&&A.forEach(function(ie){return t(v,ie)}),Ne&&Br(v,B),z}function P(v,_,C,M){if(typeof C=="object"&&C!==null&&C.type===gi&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case ru:e:{for(var z=C.key,U=_;U!==null;){if(U.key===z){if(z=C.type,z===gi){if(U.tag===7){r(v,U.sibling),_=o(U,C.props.children),_.return=v,v=_;break e}}else if(U.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===rr&&Bg(z)===U.type){r(v,U.sibling),_=o(U,C.props),_.ref=vl(v,U,C),_.return=v,v=_;break e}r(v,U);break}else t(v,U);U=U.sibling}C.type===gi?(_=Ur(C.props.children,v.mode,M,C.key),_.return=v,v=_):(M=Pu(C.type,C.key,C.props,null,v.mode,M),M.ref=vl(v,_,C),M.return=v,v=M)}return c(v);case hi:e:{for(U=C.key;_!==null;){if(_.key===U)if(_.tag===4&&_.stateNode.containerInfo===C.containerInfo&&_.stateNode.implementation===C.implementation){r(v,_.sibling),_=o(_,C.children||[]),_.return=v,v=_;break e}else{r(v,_);break}else t(v,_);_=_.sibling}_=mc(C,v.mode,M),_.return=v,v=_}return c(v);case rr:return U=C._init,P(v,_,U(C._payload),M)}if(El(C))return O(v,_,C,M);if(dl(C))return I(v,_,C,M);hu(v,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,_!==null&&_.tag===6?(r(v,_.sibling),_=o(_,C),_.return=v,v=_):(r(v,_),_=gc(C,v.mode,M),_.return=v,v=_),c(v)):r(v,_)}return P}var Bi=Cm(!0),Em=Cm(!1),oo={},En=Er(oo),Kl=Er(oo),Yl=Er(oo);function $r(e){if(e===oo)throw Error(H(174));return e}function Vf(e,t){switch(Ie(Yl,t),Ie(Kl,e),Ie(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),Ie(En,t)}function Wi(){Oe(En),Oe(Kl),Oe(Yl)}function km(e){$r(Yl.current);var t=$r(En.current),r=Tc(t,e.type);t!==r&&(Ie(Kl,e),Ie(En,r))}function Gf(e){Kl.current===e&&(Oe(En),Oe(Kl))}var Be=Er(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 d=t.interleaved;d===null?(o.next=o,jf(t)):(o.next=d.next,d.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===We||t!==null&&t===We}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,Rf(e,r)}}var Xu={readContext:en,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useInsertionEffect:at,useLayoutEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useMutableSource:at,useSyncExternalStore:at,useId:at,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,Ru(4194308,4,Wm.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ru(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ru(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,We,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=We,o=Sn();if(Ne){if(r===void 0)throw Error(H(407));r=r()}else{if(r=t(),et===null)throw Error(H(349));Vr&30||Rm(l,t,r)}o.memoizedState=r;var s={value:r,getSnapshot:t};return o.queue=s,zg(Am.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=et.identifierPrefix;if(Ne){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=Oc(r,l),r){case"dialog":Ae("cancel",e),Ae("close",e),o=l;break;case"iframe":case"object":case"embed":Ae("load",e),o=l;break;case"video":case"audio":for(o=0;oDi&&(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&&!Ne)return ct(t),null}else 2*He()-s.renderingStartTime>Di&&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=He(),t.sibling=null,r=Be.current,Ie(Be,l?r&1|2:r&1),t):(ct(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&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function Rk(e,t){switch(zf(t),t.tag){case 1:return It(t.type)&&ju(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(),Oe(Lt),Oe(dt),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(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(Be),null;case 4:return Wi(),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,ft=!1,Tk=typeof WeakSet=="function"?WeakSet:Set,Y=null;function Ei(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(l){$e(e,t,l)}else r.current=null}function lf(e,t,r){try{r()}catch(l){$e(e,t,l)}}var Qg=!1;function Ak(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,d=-1,m=0,y=0,w=e,x=null;t:for(;;){for(var k;w!==r||o!==0&&w.nodeType!==3||(f=c+o),w!==s||l!==0&&w.nodeType!==3||(d=c+l),w.nodeType===3&&(c+=w.nodeValue.length),(k=w.firstChild)!==null;)x=w,w=k;for(;;){if(w===e)break t;if(x===r&&++m===o&&(f=c),x===s&&++y===l&&(d=c),(k=w.nextSibling)!==null)break;w=x,x=w.parentNode}w=k}r=f===-1||d===-1?null:{start:f,end:d}}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 O=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(O!==null){var I=O.memoizedProps,P=O.memoizedState,v=t.stateNode,_=v.getSnapshotBeforeUpdate(t.elementType===t.type?I:fn(t.type,I),P);v.__reactInternalSnapshotBeforeUpdate=_}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(H(163))}}catch(M){$e(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return O=Qg,Qg=!1,O}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 it=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:ft||Ei(r,t);case 6:var l=it,o=dn;it=null,nr(e,t,r),it=l,dn=o,it!==null&&(dn?(e=it,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):it.removeChild(r.stateNode));break;case 18:it!==null&&(dn?(e=it,r=r.stateNode,e.nodeType===8?uc(e.parentNode,r):e.nodeType===1&&uc(e,r),jl(e)):uc(it,r.stateNode));break;case 4:l=it,o=dn,it=r.stateNode.containerInfo,dn=!0,nr(e,t,r),it=l,dn=o;break;case 0:case 11:case 14:case 15:if(!ft&&(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(!ft&&(Ei(r,t),l=r.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=r.memoizedProps,l.state=r.memoizedState,l.componentWillUnmount()}catch(f){$e(r,t,f)}nr(e,t,r);break;case 21:nr(e,t,r);break;case 22:r.mode&1?(ft=(l=ft)||r.memoizedState!==null,nr(e,t,r),ft=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=He()-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,ye&6)throw Error(H(331));var o=ye;for(ye|=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 d=0;dHe()-td?Fr(e,0):ed|=r),Rt(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),Rt(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(H(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,Ne&&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=Ni(t,dt.current);Ai(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,It(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,Ne&&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(H(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(H(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=zi(Error(H(423)),t),t=Vg(e,t,l,r,o);break e}else if(l!==o){o=zi(Error(H(424)),t),t=Vg(e,t,l,r,o);break e}else for(zt=pr(t.stateNode.containerInfo.firstChild),Dt=t,Ne=!0,pn=null,r=Em(t,null,l,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Mi(),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=Bi(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,Ie(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 d=f.firstContext;d!==null;){if(d.context===l){if(s.tag===1){d=Fn(-1,r&-r),d.tag=2;var m=s.updateQueue;if(m!==null){m=m.shared;var y=m.pending;y===null?d.next=d:(d.next=y.next,y.next=d),m.pending=d}}s.lanes|=r,d=s.alternate,d!==null&&(d.lanes|=r),Yc(s.return,r,t),f.lanes|=r;break}d=d.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(H(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,Ai(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,It(l)?(e=!0,Hu(t)):e=!1,Ai(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(H(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 gi:return Ur(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(H(130,e==null?e:typeof e,""))}return t=Jt(c,r,t,o),t.elementType=e,t.type=l,t.lanes=s,t}function Ur(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,d){return e=new jk(e,t,r,f,d),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`",d="__lodash_hash_undefined__",m=500,y="__lodash_placeholder__",w=1,x=2,k=4,O=1,I=2,P=1,v=2,_=4,C=8,M=16,z=32,U=64,A=128,B=256,b=512,Q=30,te="...",ie=800,le=16,ce=1,se=2,Fe=3,pe=1/0,F=9007199254740991,V=17976931348623157e292,G=0/0,X=4294967295,we=X-1,Re=X>>>1,Ee=[["ary",A],["bind",P],["bindKey",v],["curry",C],["curryRight",M],["flip",b],["partial",z],["partialRight",U],["rearg",B]],Ye="[object Arguments]",Ze="[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]",Zr="[object DataView]",Es="[object Float32Array]",ks="[object Float64Array]",Ls="[object Int8Array]",Is="[object Int16Array]",Rs="[object Int32Array]",Ts="[object Uint8Array]",As="[object Uint8ClampedArray]",Os="[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+"]",Id="["+Ld+"]",mo="["+Sd+"]",Rd="\\d+",w1="["+xd+"]",Td="["+Cd+"]",Ad="[^"+go+Ld+Rd+xd+Cd+Ed+"]",Ws="\\ud83c[\\udffb-\\udfff]",y1="(?:"+mo+"|"+Ws+")",Od="[^"+go+"]",zs="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",Xr="["+Ed+"]",Pd="\\u200d",Nd="(?:"+Td+"|"+Ad+")",_1="(?:"+Xr+"|"+Ad+")",Md="(?:"+Bs+"(?:d|ll|m|re|s|t|ve))?",Bd="(?:"+Bs+"(?:D|LL|M|RE|S|T|VE))?",Wd=y1+"?",zd="["+kd+"]?",S1="(?:"+Pd+"(?:"+[Od,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="(?:"+[Od+mo+"?",mo,zs,Ds,v1].join("|")+")",L1=RegExp(Bs,"g"),I1=RegExp(mo,"g"),$s=RegExp(Ws+"(?="+Ws+")|"+k1+Dd,"g"),R1=RegExp([Xr+"?"+Td+"+"+Md+"(?="+[Id,Xr,"$"].join("|")+")",_1+"+"+Bd+"(?="+[Id,Xr+Nd,"$"].join("|")+")",Xr+"?"+Nd+"+"+Md,Xr+"+"+Bd,C1,x1,Rd,E1].join("|"),"g"),T1=RegExp("["+Pd+go+Sd+kd+"]"),A1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,O1=["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,Te={};Te[Es]=Te[ks]=Te[Ls]=Te[Is]=Te[Rs]=Te[Ts]=Te[As]=Te[Os]=Te[Ps]=!0,Te[Ye]=Te[Ze]=Te[Yi]=Te[Hi]=Te[Zr]=Te[Vi]=Te[co]=Te[fo]=Te[nn]=Te[Gi]=Te[Ln]=Te[Qi]=Te[rn]=Te[qi]=Te[Ki]=!1;var Le={};Le[Ye]=Le[Ze]=Le[Yi]=Le[Zr]=Le[Hi]=Le[Vi]=Le[Es]=Le[ks]=Le[Ls]=Le[Is]=Le[Rs]=Le[nn]=Le[Gi]=Le[Ln]=Le[Qi]=Le[rn]=Le[qi]=Le[po]=Le[Ts]=Le[As]=Le[Os]=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,tt=$d||$1||Function("return this")(),Fs=t&&!t.nodeType&&t,Lr=Fs&&!0&&e&&!e.nodeType&&e,Fd=Lr&&Lr.exports===Fs,Us=Fd&&$d.process,jt=function(){try{var L=Lr&&Lr.require&&Lr.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 At(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 oe=-1,_e=L==null?0:L.length;++oe<_e;){var Ge=L[oe];W(K,Ge,N(Ge),L)}return K}function Ht(L,W){for(var N=-1,K=L==null?0:L.length;++N-1}function js(L,W,N){for(var K=-1,oe=L==null?0:L.length;++K-1;);return N}function ep(L,W){for(var N=L.length;N--&&Jr(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 br(L){return T1.test(L)}function ew(L){return A1.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,oe){N[++W]=[oe,K]}),N}function tp(L,W){return function(N){return L(W(N))}}function Yn(L,W){for(var N=-1,K=L.length,oe=0,_e=[];++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}In.prototype.clear=Dw,In.prototype.delete=$w,In.prototype.get=Fw,In.prototype.has=Uw,In.prototype.set=jw;function Rn(n){var i=-1,u=n==null?0:n.length;for(this.clear();++i=i?n:i)),n}function Qt(n,i,u,a,p,g){var S,E=i&w,R=i&x,D=i&k;if(u&&(S=p?u(n,a,p,g):u(n)),S!==r)return S;if(!Me(n))return n;var $=ue(n);if($){if(S=Qy(n),!E)return _t(n,S)}else{var j=st(n),q=j==fo||j==gd;if(tr(n))return zp(n,E);if(j==Ln||j==Ye||q&&!p){if(S=R||q?{}:nh(n),!E)return R?By(n,iy(S,n)):My(n,pp(S,n))}else{if(!Le[j])return p?n:{};S=qy(n,j,E)}}g||(g=new on);var J=g.get(n);if(J)return J;g.set(n,S),Oh(n)?n.forEach(function(re){S.add(Qt(re,i,u,re,n,g))}):Th(n)&&n.forEach(function(re,he){S.set(he,Qt(re,i,u,he,n,g))});var ne=D?R?xa:Sa:R?xt:Xe,fe=$?r:ne(n);return Ht(fe||n,function(re,he){fe&&(he=re,re=n[he]),nl(S,he,Qt(re,i,u,he,n,g))}),S}function ly(n){var i=Xe(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 p=u[a],g=i[p],S=n[p];if(S===r&&!(p in n)||!g(S))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 p=-1,g=vo,S=!0,E=n.length,R=[],D=i.length;if(!E)return R;u&&(i=Pe(i,Ot(u))),a?(g=js,S=!1):i.length>=o&&(g=Zi,S=!1,i=new Tr(i));e:for(;++pp?0:p+u),a=a===r||a>p?p:ae(a),a<0&&(a+=p),a=u>a?0:Nh(a);u0&&u(E)?i>1?nt(E,i-1,u,a,p):Kn(p,E):a||(p[p.length]=E)}return p}var ra=Hp(),wp=Hp(!0);function vn(n,i){return n&&ra(n,i,Xe)}function ia(n,i){return n&&wp(n,i,Xe)}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>=ut(i,u)&&n=120&&$.length>=120)?new Tr(S&&$):r}$=n[0];var j=-1,q=E[0];e:for(;++j-1;)E!==n&&Io.call(E,R,1),Io.call(n,R,1);return n}function Tp(n,i){for(var u=n?i.length:0,a=u-1;u--;){var p=i[u];if(u==a||p!==g){var g=p;Pn(p)?Io.call(n,p,1):ha(n,p)}}return n}function fa(n,i){return n+Ao(ap()*(i-n+1))}function Cy(n,i,u,a){for(var p=-1,g=Qe(To((i-n)/(u||1)),0),S=N(g);g--;)S[a?g:++p]=n,n+=u;return S}function da(n,i){var u="";if(!n||i<1||i>F)return u;do i%2&&(u+=n),i=Ao(i/2),i&&(n+=n);while(i);return u}function de(n,i){return Ta(lh(n,i,Ct),n+"")}function Ey(n){return dp(ci(n))}function ky(n,i){var u=ci(n);return qo(u,Ar(i,0,u.length))}function ol(n,i,u,a){if(!Me(n))return n;i=bn(i,n);for(var p=-1,g=i.length,S=g-1,E=n;E!=null&&++pp?0:p+i),u=u>p?p:u,u<0&&(u+=p),p=i>u?0:u-i>>>0,i>>>=0;for(var g=N(p);++a>>1,S=n[g];S!==null&&!Nt(S)&&(u?S<=i:S=o){var D=i?null:$y(n);if(D)return yo(D);S=!1,p=Zi,R=new Tr}else R=i?[]:E;e:for(;++a=a?n:qt(n,i,u)}var Wp=mw||function(n){return tt.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 Ay(n,i){var u=i?wa(n.buffer):n.buffer;return new n.constructor(u,n.byteOffset,n.byteLength)}function Oy(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,p=n===n,g=Nt(n),S=i!==r,E=i===null,R=i===i,D=Nt(i);if(!E&&!D&&!g&&n>i||g&&S&&R&&!E&&!D||a&&S&&R||!u&&R||!p)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 p=-1,g=n.length,S=u.length,E=-1,R=i.length,D=Qe(g-S,0),$=N(R+D),j=!a;++E1?u[p-1]:r,S=p>2?u[2]:r;for(g=n.length>3&&typeof g=="function"?(p--,g):r,S&&ht(u[0],u[1],S)&&(g=p<3?r:g,p=1),i=ke(i);++a-1?p[g?i[S]:S]:r}}function Qp(n){return On(function(i){var u=i.length,a=u,p=Gt.prototype.thru;for(n&&i.reverse();a--;){var g=i[a];if(typeof g!="function")throw new Vt(c);if(p&&!S&&Go(g)=="wrapper")var S=new Gt([],!0)}for(a=S?a:u;++a1&&ve.reverse(),$&&RE))return!1;var D=g.get(n),$=g.get(i);if(D&&$)return D==i&&$==n;var j=-1,q=!0,J=u&I?new Tr:r;for(g.set(n,i),g.set(i,n);++j1?"& ":"")+i[a],i=i.join(u>2?", ":" "),n.replace(Zv,`{ /* [wrapped with `+i+`] */ `)}function Yy(n){return ue(n)||Mr(n)||!!(up&&n&&n[up])}function Pn(n,i){var u=typeof n;return i=i??F,!!i&&(u=="number"||u!="symbol"&&u1.test(n))&&n>-1&&n%1==0&&n0){if(++i>=ie)return arguments[0]}else i=0;return n.apply(r,arguments)}}function qo(n,i){var u=-1,a=n.length,p=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=On(function(n){var i=n.length,u=i?n[0]:0,a=this.__wrapped__,p=function(g){return na(g,n)};return i>1||this.__actions__.length||!(a instanceof ge)||!Pn(u)?this.thru(p):(a=a.slice(u,+u+(i?1:0)),a.__actions__.push({func:Ko,args:[p],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?p.__wrapped__=a:i=a;var p=a;u=u.__wrapped__}return p.__wrapped__=n,i}function pS(){var n=this.__wrapped__;if(n instanceof ge){var i=n;return this.__actions__.length&&(i=new ge(this)),i=i.reverse(),i.__actions__.push({func:Ko,args:[Aa],thisArg:r}),new Gt(i,this.__chain__)}return this.thru(Aa)}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=ue(n)?qd:oy;return u&&ht(n,i,u)&&(i=r),a(n,ee(i,3))}function vS(n,i){var u=ue(n)?qn:vp;return u(n,ee(i,3))}var wS=Gp(dh),yS=Gp(ph);function _S(n,i){return nt(Yo(n,i),1)}function SS(n,i){return nt(Yo(n,i),pe)}function xS(n,i,u){return u=u===r?1:ae(u),nt(Yo(n,i),u)}function yh(n,i){var u=ue(n)?Ht:Xn;return u(n,ee(i,3))}function _h(n,i){var u=ue(n)?U1:mp;return u(n,ee(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:ci(n),u=u&&!a?ae(u):0;var p=n.length;return u<0&&(u=Qe(p+u,0)),eu(n)?u<=p&&n.indexOf(i,u)>-1:!!p&&Jr(n,i,u)>-1}var kS=de(function(n,i,u){var a=-1,p=typeof i=="function",g=St(n)?N(n.length):[];return Xn(n,function(S){g[++a]=p?At(i,S,u):il(S,i,u)}),g}),LS=Fo(function(n,i,u){Tn(n,u,i)});function Yo(n,i){var u=ue(n)?Pe:Cp;return u(n,ee(i,3))}function IS(n,i,u,a){return n==null?[]:(ue(i)||(i=i==null?[]:[i]),u=a?r:u,ue(u)||(u=u==null?[]:[u]),Ip(n,i,u))}var RS=Fo(function(n,i,u){n[u?0:1].push(i)},function(){return[[],[]]});function TS(n,i,u){var a=ue(n)?Hs:Xd,p=arguments.length<3;return a(n,ee(i,4),u,p,Xn)}function AS(n,i,u){var a=ue(n)?j1:Xd,p=arguments.length<3;return a(n,ee(i,4),u,p,mp)}function OS(n,i){var u=ue(n)?qn:vp;return u(n,Jo(ee(i,3)))}function PS(n){var i=ue(n)?dp:Ey;return i(n)}function NS(n,i,u){(u?ht(n,i,u):i===r)?i=1:i=ae(i);var a=ue(n)?ty:ky;return a(n,i)}function MS(n){var i=ue(n)?ny:Iy;return i(n)}function BS(n){if(n==null)return 0;if(St(n))return eu(n)?ei(n):n.length;var i=st(n);return i==nn||i==rn?n.size:sa(n).length}function WS(n,i,u){var a=ue(n)?Vs:Ry;return u&&ht(n,i,u)&&(i=r),a(n,ee(i,3))}var zS=de(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]]),Ip(n,nt(i,1),[])}),Zo=vw||function(){return tt.Date.now()};function DS(n,i){if(typeof i!="function")throw new Vt(c);return n=ae(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,An(n,A,r,r,r,r,i)}function xh(n,i){var u;if(typeof i!="function")throw new Vt(c);return n=ae(n),function(){return--n>0&&(u=i.apply(this,arguments)),n<=1&&(i=r),u}}var Pa=de(function(n,i,u){var a=P;if(u.length){var p=Yn(u,si(Pa));a|=z}return An(n,a,i,u,p)}),Ch=de(function(n,i,u){var a=P|v;if(u.length){var p=Yn(u,si(Ch));a|=z}return An(i,a,n,u,p)});function Eh(n,i,u){i=u?r:i;var a=An(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=An(n,M,r,r,r,r,r,i);return a.placeholder=kh.placeholder,a}function Lh(n,i,u){var a,p,g,S,E,R,D=0,$=!1,j=!1,q=!0;if(typeof n!="function")throw new Vt(c);i=Yt(i)||0,Me(u)&&($=!!u.leading,j="maxWait"in u,g=j?Qe(Yt(u.maxWait)||0,i):g,q="trailing"in u?!!u.trailing:q);function J(je){var sn=a,Bn=p;return a=p=r,D=je,S=n.apply(Bn,sn),S}function ne(je){return D=je,E=al(he,i),$?J(je):S}function fe(je){var sn=je-R,Bn=je-D,Gh=i-sn;return j?ut(Gh,g-Bn):Gh}function re(je){var sn=je-R,Bn=je-D;return R===r||sn>=i||sn<0||j&&Bn>=g}function he(){var je=Zo();if(re(je))return ve(je);E=al(he,fe(je))}function ve(je){return E=r,q&&a?J(je):(a=p=r,S)}function Mt(){E!==r&&Wp(E),D=0,a=R=p=E=r}function gt(){return E===r?S:ve(Zo())}function Bt(){var je=Zo(),sn=re(je);if(a=arguments,p=this,R=je,sn){if(E===r)return ne(R);if(j)return Wp(E),E=al(he,i),J(R)}return E===r&&(E=al(he,i)),S}return Bt.cancel=Mt,Bt.flush=gt,Bt}var $S=de(function(n,i){return gp(n,1,i)}),FS=de(function(n,i,u){return gp(n,Yt(i)||0,u)});function US(n){return An(n,b)}function Xo(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new Vt(c);var u=function(){var a=arguments,p=i?i.apply(this,a):a[0],g=u.cache;if(g.has(p))return g.get(p);var S=n.apply(this,a);return u.cache=g.set(p,S)||g,S};return u.cache=new(Xo.Cache||Rn),u}Xo.Cache=Rn;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&&ue(i[0])?Pe(i[0],Ot(ee())):Pe(nt(i,1),Ot(ee()));var u=i.length;return de(function(a){for(var p=-1,g=ut(a.length,u);++p=i}),Mr=_p(function(){return arguments}())?_p:function(n){return De(n)&&xe.call(n,"callee")&&!op.call(n,"callee")},ue=N.isArray,ix=Ud?Ot(Ud):dy;function St(n){return n!=null&&bo(n.length)&&!Nn(n)}function Ue(n){return De(n)&&St(n)}function lx(n){return n===!0||n===!1||De(n)&&pt(n)==Hi}var tr=yw||Va,ox=jd?Ot(jd):py;function ux(n){return De(n)&&n.nodeType===1&&!cl(n)}function sx(n){if(n==null)return!0;if(St(n)&&(ue(n)||typeof n=="string"||typeof n.splice=="function"||tr(n)||ai(n)||Mr(n)))return!n.length;var i=st(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(!De(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(!Me(n))return!1;var i=pt(n);return i==fo||i==gd||i==Tt||i==Bv}function Rh(n){return typeof n=="number"&&n==ae(n)}function bo(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=F}function Me(n){var i=typeof n;return n!=null&&(i=="object"||i=="function")}function De(n){return n!=null&&typeof n=="object"}var Th=Hd?Ot(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 Ah(n)&&n!=+n}function gx(n){if(Jy(n))throw new oe(s);return Sp(n)}function mx(n){return n===null}function vx(n){return n==null}function Ah(n){return typeof n=="number"||De(n)&&pt(n)==Gi}function cl(n){if(!De(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?Ot(Vd):my;function wx(n){return Rh(n)&&n>=-F&&n<=F}var Oh=Gd?Ot(Gd):vy;function eu(n){return typeof n=="string"||!ue(n)&&De(n)&&pt(n)==qi}function Nt(n){return typeof n=="symbol"||De(n)&&pt(n)==po}var ai=Qd?Ot(Qd):wy;function yx(n){return n===r}function _x(n){return De(n)&&st(n)==Ki}function Sx(n){return De(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=st(n),u=i==nn?Zs:i==rn?yo:ci;return u(n)}function Mn(n){if(!n)return n===0?n:0;if(n=Yt(n),n===pe||n===-pe){var i=n<0?-1:1;return i*V}return n===n?n:0}function ae(n){var i=Mn(n),u=i%1;return i===i?u?i-u:i:0}function Nh(n){return n?Ar(ae(n),0,X):0}function Yt(n){if(typeof n=="number")return n;if(Nt(n))return G;if(Me(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=Me(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?Ar(ae(n),-F,F):n===0?n:0}function Se(n){return n==null?"":Pt(n)}var kx=oi(function(n,i){if(sl(i)||St(i)){wn(i,Xe(i),n);return}for(var u in i)xe.call(i,u)&&nl(n,u,i[u])}),Bh=oi(function(n,i){wn(i,xt(i),n)}),tu=oi(function(n,i,u,a){wn(i,xt(i),n,a)}),Lx=oi(function(n,i,u,a){wn(i,Xe(i),n,a)}),Ix=On(na);function Rx(n,i){var u=li(n);return i==null?u:pp(u,i)}var Tx=de(function(n,i){n=ke(n);var u=-1,a=i.length,p=a>2?i[2]:r;for(p&&ht(i[0],i[1],p)&&(a=1);++u1),g}),wn(n,xa(n),u),a&&(u=Qt(u,w|x|k,Fy));for(var p=i.length;p--;)ha(u,i[p]);return u});function qx(n,i){return zh(n,Jo(ee(i)))}var Kx=On(function(n,i){return n==null?{}:Sy(n,i)});function zh(n,i){if(n==null)return{};var u=Pe(xa(n),function(a){return[a]});return i=ee(i),Rp(n,u,function(a,p){return i(a,p[0])})}function Yx(n,i,u){i=bn(i,n);var a=-1,p=i.length;for(p||(p=1,n=r);++ai){var a=n;n=i,i=a}if(u||n%1||i%1){var p=ap();return ut(n+p*(i-n+z1("1e-"+((p+"").length-1))),i)}return fa(n,i)}var oC=ui(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(I1,"")}function uC(n,i,u){n=Se(n),i=Pt(i);var a=n.length;u=u===r?a:Ar(ae(u),0,a);var p=u;return u-=i.length,u>=0&&n.slice(u,p)==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=ui(function(n,i,u){return n+(u?"-":"")+i.toLowerCase()}),fC=ui(function(n,i,u){return n+(u?" ":"")+i.toLowerCase()}),dC=Vp("toLowerCase");function pC(n,i,u){n=Se(n),i=ae(i);var a=i?ei(n):0;if(!i||a>=i)return n;var p=(i-a)/2;return Ho(Ao(p),u)+n+Ho(To(p),u)}function hC(n,i,u){n=Se(n),i=ae(i);var a=i?ei(n):0;return i&&a>>0,u?(n=Se(n),n&&(typeof i=="string"||i!=null&&!Ba(i))&&(i=Pt(i),!i&&br(n))?er(ln(n),0,u):n.split(i,u)):[]}var SC=ui(function(n,i,u){return n+(u?" ":"")+Da(i)});function xC(n,i,u){return n=Se(n),u=u==null?0:Ar(ae(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 p=tu({},i.imports,a.imports,Xp),g=Xe(p),S=Ys(p,g),E,R,D=0,$=i.interpolate||ho,j="__p += '",q=Xs((i.escape||ho).source+"|"+$.source+"|"+($===yd?n1:ho).source+"|"+(i.evaluate||ho).source+"|$","g"),J="//# sourceURL="+(xe.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++P1+"]")+` `;n.replace(q,function(re,he,ve,Mt,gt,Bt){return ve||(ve=Mt),j+=n.slice(D,Bt).replace(a1,J1),he&&(E=!0,j+=`' + __e(`+he+`) + '`),gt&&(R=!0,j+=`'; `+gt+`; __p += '`),ve&&(j+=`' + ((__t = (`+ve+`)) == null ? '' : __t) + '`),D=Bt+re.length,re}),j+=`'; `;var ne=xe.call(i,"variable")&&i.variable;if(!ne)j=`with (obj) { `+j+` } `;else if(e1.test(ne))throw new oe(f);j=(R?j.replace(Dv,""):j).replace($v,"$1").replace(Fv,"$1;"),j="function("+(ne||"obj")+`) { `+(ne?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(E?", __e = _.escape":"")+(R?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+j+`return __p }`;var fe=Hh(function(){return _e(g,J+"return "+j).apply(r,S)});if(fe.source=j,Ma(fe))throw fe;return fe}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),p=ln(i),g=bd(a,p),S=ep(a,p)+1;return er(a,g,S).join("")}function IC(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),p=ep(a,ln(i))+1;return er(a,0,p).join("")}function RC(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),p=bd(a,ln(i));return er(a,p).join("")}function TC(n,i){var u=Q,a=te;if(Me(i)){var p="separator"in i?i.separator:p;u="length"in i?ae(i.length):u,a="omission"in i?Pt(i.omission):a}n=Se(n);var g=n.length;if(br(n)){var S=ln(n);g=S.length}if(u>=g)return n;var E=u-ei(a);if(E<1)return a;var R=S?er(S,0,E).join(""):n.slice(0,E);if(p===r)return R+a;if(S&&(E+=R.length-E),Ba(p)){if(n.slice(E).search(p)){var D,$=R;for(p.global||(p=Xs(p.source,Se(_d.exec(p))+"g")),p.lastIndex=0;D=p.exec($);)var j=D.index;R=R.slice(0,j===r?E:j)}}else if(n.indexOf(Pt(p),E)!=E){var q=R.lastIndexOf(p);q>-1&&(R=R.slice(0,q))}return R+a}function AC(n){return n=Se(n),n&&Uv.test(n)?n.replace(vd,lw):n}var OC=ui(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=de(function(n,i){try{return At(n,r,i)}catch(u){return Ma(u)?u:new oe(u)}}),PC=On(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=ee();return n=i?Pe(n,function(a){if(typeof a[1]!="function")throw new Vt(c);return[u(a[0]),a[1]]}):[],de(function(a){for(var p=-1;++pF)return[];var u=X,a=ut(n,X);i=ee(i),n-=X;for(var p=Ks(a,i);++u0||i<0)?new ge(u):(n<0?u=u.takeRight(-n):n&&(u=u.drop(n)),i!==r&&(i=ae(i),u=i<0?u.dropRight(-i):u.take(i-n)),u)},ge.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},ge.prototype.toArray=function(){return this.take(X)},vn(ge.prototype,function(n,i){var u=/^(?:filter|find|map|reject)|While$/.test(i),a=/^(?:head|last)$/.test(i),p=h[a?"take"+(i=="last"?"Right":""):i],g=a||/^find/.test(i);p&&(h.prototype[i]=function(){var S=this.__wrapped__,E=a?[1]:arguments,R=S instanceof ge,D=E[0],$=R||ue(S),j=function(he){var ve=p.apply(h,Kn([he],E));return a&&q?ve[0]:ve};$&&u&&typeof D=="function"&&D.length!=1&&(R=$=!1);var q=this.__chain__,J=!!this.__actions__.length,ne=g&&!q,fe=R&&!J;if(!g&&$){S=fe?S:new ge(this);var re=n.apply(S,E);return re.__actions__.push({func:Ko,args:[j],thisArg:r}),new Gt(re,q)}return ne&&fe?n.apply(this,E):(re=this.thru(j),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 p=arguments;if(a&&!this.__chain__){var g=this.value();return i.apply(ue(g)?g:[],p)}return this[u](function(S){return i.apply(ue(S)?S:[],p)})}}),vn(ge.prototype,function(n,i){var u=h[i];if(u){var a=u.name+"";xe.call(ii,a)||(ii[a]=[]),ii[a].push({name:i,func:u})}}),ii[Uo(r,v).name]=[{name:"wrapper",func:r}],ge.prototype.clone=Aw,ge.prototype.reverse=Ow,ge.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},ti=aw();Lr?((Lr.exports=ti)._=ti,Fs._=ti):tt._=ti}).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"},be={};for(const e in yr)be[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:d=!1,effect:m,...y}){Z.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=()=>d?T.jsx("style",{children:Kk}):T.jsx(T.Fragment,{});return T.jsxs("svg",{viewBox:"0 0 100 100",...y,children:[T.jsx(w,{}),T.jsxs("defs",{children:[T.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:T.jsx("path",{d:"M 0 0 L 10 5 L 0 10 Z"})}),T.jsx("clipPath",{id:`main_clip_${r}`,clipPathUnits:"userSpaceOnUse",children:T.jsx("rect",{x:5,y:5,width:90,height:90,rx:11.75})}),T.jsx("clipPath",{id:`clip1_${r}`,clipPathUnits:"userSpaceOnUse",children:T.jsx("path",{d:"M 0 0 L 25 0 L 25 100 L 0 100 Z"})}),T.jsx("clipPath",{id:`clip2_${r}`,clipPathUnits:"userSpaceOnUse",children:T.jsx("path",{d:"M72.5 0 L 97.5 0 L 97.5 100 L 72.5 100 Z"})}),T.jsx("clipPath",{id:`clip3_${r}`,clipPathUnits:"userSpaceOnUse",children:T.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"})}),T.jsx("clipPath",{id:`clip4_${r}`,clipPathUnits:"userSpaceOnUse",children:T.jsx("rect",{x:20,y:70,width:60,height:15,rx:5})})]}),T.jsx("g",{transform:l?void 0:`rotate(${o?"-":""}90)`,x:0,y:0,width:100,height:100,children:T.jsxs("g",{transform:l?void 0:`scale(${s?"1,-1":"1,1"})`,x:0,y:0,width:100,height:100,children:[T.jsx("rect",{width:95,height:95,x:2.5,y:2.5,rx:15,fill:"none",stroke:"none",strokeWidth:5,"data-role":"background"}),T.jsxs("g",{id:"mainarea",clipPath:`url(#main_clip_${r})`,children:[e.map((x,k)=>T.jsx("rect",{fill:"currentColor",rx:5,...x},k)),t.map(x=>T.jsx("path",{d:"M "+(x instanceof Array?x:x.points).map(({x:k,y:O})=>`${k} ${O}`).join(" L "),rx:20,fill:"none",strokeWidth:6,stroke:"currentColor",strokeLinejoin:"round",markerStart:["both","start"].includes(x.marker)?`url(#arrow_${r})`:void 0,markerEnd:["both","end",void 0].includes(x.marker)?`url(#arrow_${r})`:void 0,className:"cBuilderSvg__arrow"},JSON.stringify(x))),c.map(x=>T.jsx("path",{d:"M "+(x instanceof Array?x:x.points).map(({x:k,y:O})=>`${k} ${O}`).join(" L "),rx:20,fill:"none",strokeWidth:6,stroke:"currentColor",strokeLinejoin:"round",className:x.className||void 0},JSON.stringify(x))),f]}),T.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 T.jsx(ur,{blocks:o,rotate:t,...r})}function cn({...e}){return e.className=[e.className||"","cBuilderSvg__image-icon"].join(" ").trim().replace(/\s+/," "),T.jsxs("svg",{...e,viewBox:"0 0 90 90",children:[T.jsx("rect",{x:0,y:0,className:"cBuilderSvg__box--secondaryColoring",width:90,height:90,rx:10,fill:"currentColor"}),T.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"}),T.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,d=[57,31],m,y,w,x,k,O;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,x=e==="table-carousel"?11:15,m=e==="table-carousel"?20:0,y=e==="table-carousel"?1:3;for(let I=0;II.map(P=>({x:P.x,y:P.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,O=88,m=e==="grid-carousel"?7:0,e.startsWith("mini")&&(f=10,c=5),e==="grid-carousel"&&(y=1,k=3),e.endsWith("carousel")&&(O=e.startsWith("mini")?68:54,o.splice(o.length,0,..._l.map(I=>I.map(P=>({x:P.x,y:P.y-5}))))),e==="mini-grid"&&(m=10,O=68),e==="mini-grid-carousel"&&(O=68*2/3,m=5,y=2);for(let I=0;Iv+_,8+c),y:6+88*I/3+c+1.5,width:d[P]-2*c-4,height:88/3-2*c-3,className:"cBuilderSvg__box--outlined"});break;case"image-grid":case"wallpaper":return T.jsxs(ur,{...r,rotate:!0,children:[T.jsx(cn,{x:12,y:12,width:35,height:35}),T.jsx(cn,{x:53,y:12,width:35,height:35}),T.jsx(cn,{x:12,y:53,width:35,height:35}),T.jsx(cn,{x:53,y:53,width:35,height:35})]});case"image-carousel":case"wallpaper-carousel":return o.splice(o.length,0,..._l),T.jsxs(ur,{...r,arrows:o,rotate:!0,children:[T.jsx(cn,{x:17,y:10,height:60,width:66}),T.jsx(cn,{x:-25,y:20,height:40,width:40}),T.jsx(cn,{x:85,y:20,height:40,width:40})]});case"featured":for(let I=0;I<2;I++)l.push({x:12,y:12+41*I,height:35,width:80}),l.push({width:37,height:6,x:51,y:16.5+41*I,className:"cBuilderSvg__box--secondaryColoring"}),l.push({width:18,height:3,x:52,y:26.5+41*I,className:"cBuilderSvg__box--secondaryColoring"}),l.push({width:28,height:3,x:52,y:34.5+41*I,className:"cBuilderSvg__box--secondaryColoring"});return T.jsxs(ur,{...r,blocks:l,rotate:!0,children:[T.jsx(cn,{x:12,y:12,height:35,width:35}),T.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}),T.jsx(ur,{...r,arrows:_l.map(I=>I.map(P=>({y:P.y-5,x:P.x}))),blocks:l,rotate:!0,children:T.jsx(cn,{x:12,y:22.5,height:35,width:35})});case"minimal":case"minimal-carousel":for(let I=20;I<=(e==="minimal"?80:60);I+=20)s.push({points:[{x:20,y:I},{x:80,y:I}],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 T.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 T.jsx(ur,{rotate:t,arrows:l,lines:s,blocks:o,...r,children:T.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 T.jsx(Zk,{...l,behavior:e,horizontal:t,children:r});if(["gap","nogap"].includes(e))return T.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(T.jsx("text",{x:39.5,y:23,height:21,fontSize:23,width:21,fontWeight:800,color:"currentColor",children:"px"})),r.push(T.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(T.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(T.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(T.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(T.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 x=0;x<2;x++)o.blocks.push({x:27.5+x*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,d=50+s*Math.cos(f),m=50-Math.abs(s*Math.sin(f)),y=2;r.push(T.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(T.jsx("path",{d:`M${s+50} 50 A ${s} ${s} 0 1 1 ${d} ${m} L ${d-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(T.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(T.jsx("path",{d:"M15,15 L85,85",fill:"none",stroke:"currentColor",strokeWidth:6,strokeLinecap:"round",className:"cBuilderSvg__path"})),T.jsx(ur,{...l,...o,children:r.map((s,c)=>T.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){Z.useMemo(()=>{t?hf.set(e,()=>r(!1)):hf.delete(e)},[t,r,e])}function bk(e,t){Z.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]=Z.useState(!1),d=Z.useRef(null);Jk(d,c,f),bk(d,c),Z.useImperativeHandle(s,()=>d.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 x=w||e[0];return T.jsxs("div",{className:`cWidgetContainer__menu_dropout cWidgetContainer__menu_dropout--${t} ${r||""}${c?"cWidgetContainer__menu_dropout--open":""}`,...o,hidden:l||!x,ref:d,onClick:k=>{var O,I;(I=(O=k.target)==null?void 0:O.closest)!=null&&I.call(O,".cWidgetContainer__other_children")||setTimeout(()=>f(!c))},children:[y,x,T.jsx("div",{className:"cWidgetContainer__other_children","data-role":`${e.length?"otherChildren":"emptyPlaceholder"}`,style:void 0,children:e})]})}const t3=Z.forwardRef(e3);function n3({list:e=[],field:t,onChange:r,children:l=[],root:o,hideWhenEmpty:s=!1,...c},f){let d={};if(s&&(!l.length&&!e.length||l.length+e.length<=1))return T.jsx(T.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,x={}])=>T.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,...x,children:w},y));return m.splice(0,0,[T.jsx("div",{hidden:!d.title,children:T.jsx("i",{...d,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,[T.jsx("span",{children:o},"menudropout_label"),!1,!0]),l&&!(Symbol.iterator in l)?l=[l]:l||(l=[]),T.jsx(t3,{...c,ref:f,children:[...m,...l]})}const ji=Z.forwardRef(n3);function r3({wrapBehavior:e,onChange:t,allowedBehaviors:r,menuOptions:l,getParent:o,otherOptions:s,widgets:c}){const f=Z.useRef(null),d=Z.useRef(null),m=r.includes(e)?e:r[0],y=m in be&&r.includes(be[m])?be[m]:m,w=()=>{d.current&&f.current&&(f.current.querySelectorAll(`.cWidgetContainer__other_children [data-active][data-value]:not([data-value='${d.current}'])`).forEach(x=>x.removeAttribute("data-active")),f.current.querySelectorAll(`.cWidgetContainer__other_children [data-value='${d.current}']`).forEach(x=>x.setAttribute("data-active","")))};return Z.useEffect(w),T.jsxs(ji,{ref:f,list:r.filter(x=>!(x in be)).map(x=>[x,T.jsxs(T.Fragment,{children:[T.jsx(kn,{icon:x,horizontal:!0}),T.jsx("p",{children:window.ips.getString(`core_pagebuilder_wrap__${x}`)})]}),{"data-active":x===y||y!=null&&y.endsWith("-carousel")&&be[y]===x?"":void 0,"data-value":x}]),root:T.jsx(kn,{icon:y||"wrap",horizontal:!0}),"data-role":"wrapBehavior",field:"wrap",onChange:x=>{let k=x;if(m in be&&x in yr&&r.includes(yr[x])&&(x=yr[x]),d.current=k,x===e){w();return}t({newState:{wrapBehavior:x},reloadWidget:!0})},hidden:!l.has("wrap"),title:window.ips.getString("core_pagebuilder_wrapBehavior"),children:[T.jsx(i3,{wrapBehavior:m,allowedBehaviors:r,onChange:t,getParent:o}),T.jsx(l3,{otherOptions:s,widgets:c,onChange:t,wrapBehavior:e})]})}function i3({wrapBehavior:e,allowedBehaviors:t,onChange:r,getParent:l}){var y;const o=Z.useRef(null),s=((y=l==null?void 0:l())==null?void 0:y.wrapBehavior)==="carousel";Z.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 be?e:yr[e];if((c===void 0||!t.includes(c))&&(c=t.find(w=>w in be)),!c)return o.current=null,T.jsx(T.Fragment,{});let f=!1;const d=()=>{if(f)return;f=!0;let w;t.includes(be[e])?w=be[e]:t.includes(yr[e])?w=yr[e]:e in be?w=t.find(x=>!(x in be))||e:w=c,r({newState:{wrapBehavior:w},reloadWidget:!0})},m=e in be;return T.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&&d()},children:[T.jsx(kn,{icon:c,horizontal:!0}),T.jsx("p",{children:window.ips.getString("core_pagebuilder_wrap__toggle-carousel")}),T.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 T.jsx(T.Fragment,{});const o=!t.showImages,s=!Sv.has(e);return T.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:[T.jsx(kn,{icon:"noimages",horizontal:!0}),T.jsx("p",{children:window.ips.getString("core_pagebuilder_wrap__hide-images")}),T.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:d=1,...m}){const[y,w]=Z.useState(e),x=Z.useMemo(()=>Qn.debounce(t,l),[t,l]),k=async(...O)=>x(...O);return T.jsxs("div",{"data-role":`${s}rangecontainer`,className:"rangecontainer",children:[T.jsx("label",{"data-role":`${s}display`,disabled:m.disabled,children:o instanceof Function?o(y):y}),T.jsx("input",{type:"range",min:c,max:f,step:d,defaultValue:e,onInput:O=>{O.stopPropagation(),w(parseFloat(O.target.value)),r==null||r(parseFloat(O.target.value)),k(parseFloat(O.target.value))},...m})]})}function o3({menuOptions:e,otherOptions:t,onChange:r,areaId:l}){return T.jsxs(ji,{hidden:!e.has("carousel"),"data-role":"area-carousel_interval",title:window.ips.getString("core_pagebuilder_area-carousel_interval"),root:T.jsx(kn,{icon:t.interval?"interval":"nointerval",horizontal:!0}),children:[T.jsxs("div",{children:[T.jsx("label",{htmlFor:`area_option_has_interval${l}`,children:window.ips.getString("core_pagebuilder_area-autoplay")}),T.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}}})})]}),T.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 T.jsx(ji,{hidden:!e.has("gap"),"data-role":"area-gaps",title:window.ips.getString("core_pagebuilder_area-gap_size"),root:T.jsx(kn,{icon:(t.gapSize,"gap"),horizontal:!0}),children:T.jsx(uo,{name:"gap_size",value:t.gapSize||20,formatter:s=>T.jsxs(T.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 T.jsxs(ji,{hidden:!c.has("min_size"),title:window.ips.getString("core_pagebuilder_area-min_size"),"data-role":"area-min_size",root:T.jsx(kn,{icon:"minSize",horizontal:!0}),children:[T.jsxs("div",{hidden:!t.match(/carousel$/i),children:[T.jsx("label",{htmlFor:`area_option_full_width_items${r}`,children:window.ips.getString("core_pagebuilder_area-full_width")}),T.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}}})})]}),T.jsx(uo,{disabled:t.match(/carousel$/i)&&!!e.fullWidthItems,name:"min_size",value:f,onChange:d=>{o({newState:{otherOptions:{minSize:Math.round(d)}}})},formatter:d=>`${d}px`,onInput:d=>{d=Math.round(d),e.minSize=d,l.current instanceof HTMLElement&&(s.length?l.current.style.setProperty("--i-widget--size",`${d}px`):l.current.style.setProperty("--i-block--size",`${d}px`),l.current.dataset.widgetMinSize=`${d}`)},min:250,max:900,step:5})]})}function a3({otherOptions:e,onChange:t,menuOptions:r,areaRef:l,widgets:o}){return T.jsx(ji,{title:window.ips.getString("core_pagebuilder_area-padding_block"),"data-role":"area-padding_block",hidden:!r.has("padding_block"),root:T.jsx(kn,{icon:"paddingBlock",horizontal:!0}),children:T.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 T.jsx(ji,{title:window.ips.getString("core_pagebuilder_area-padding_inline"),"data-role":"area-padding_inline",root:T.jsx(kn,{icon:"paddingInline",horizontal:!0}),hidden:!l.has("padding_inline"),children:T.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 T.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 T.jsxs(T.Fragment,{children:[T.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:T.jsx("i",{className:"fa-solid fa-chevron-up"})}),T.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:T.jsx("i",{className:"fa-solid fa-chevron-down"})})]})}const p3=Z.forwardRef(function(t,r){var B,b,Q,te;let{editing:l,setEditing:o,getParent:s,isLeaf:c=!1,onChange:f,wrapBehavior:d="wrap",otherOptions:m,widgets:y,menuRef:w,depth:x}=t;const k=Z.useRef(l),O=Z.useRef(0),I=({newState:ie,...le})=>{ie.otherOptions&&Object.assign(m,ie.otherOptions),ie.otherOptions={...m},d=ie.wrapBehavior||d,f({newState:ie,...le})},P=Z.useRef();Z.useEffect(()=>{var ie,le,ce,se,Fe,pe,F;if(!l&&m.shouldBeEditing){delete m.shouldBeEditing,document.body.dispatchEvent(new is(r.current)),o(!0);return}if(delete m.shouldBeEditing,P.current&&document.body.removeEventListener("click",P.current),P.current=V=>{l&&!Object.is(V.root,r.current)&&o(!1)},document.body.addEventListener("ips.widgetAreaMenuOpened",P.current),l&&!k.current)O.current=0,(ce=(le=(ie=r.current)==null?void 0:ie.querySelectorAll)==null?void 0:le.call(ie,".cWidgetContainer__menu_dropout"))==null||ce.forEach(V=>{var X,we;(X=V.classList)==null||X.add("dropoutNoShow"),(we=V.querySelector('[data-role="otherChildren"]'))==null||we.setAttribute("hidden","true");const G=Qn.debounce(()=>{var Re,Ee,Ye;O.current++>1&&((Ye=(Ee=(Re=r.current)==null?void 0:Re.querySelectorAll)==null?void 0:Ee.call(Re,".cWidgetContainer__menu_dropout"))==null||Ye.forEach(Ze=>{Ze.removeEventListener("mousemove",G),Ze.classList.remove("dropoutNoShow")}))},50);setTimeout(()=>{var Re;(Re=V.querySelector('[data-role="otherChildren"]'))==null||Re.removeAttribute("hidden"),V.addEventListener("mousemove",G)},750)}),(se=r.current)==null||se.animate(r0,{duration:140,easing:"ease-in-out"});else if(!l&&k.current){const V=(Fe=r.current)==null?void 0:Fe.querySelector(":scope > .cWidgetContainer__menu");V instanceof Element&&((pe=r.current.querySelector(":scope > button"))==null||pe.setAttribute("hidden","true"),V.removeAttribute("hidden"),(F=r.current)==null||F.animate(r0.reverse(),{duration:140}),setTimeout(()=>{var G;k.current||(c&&((G=r.current.querySelector(":scope > button"))==null||G.removeAttribute("hidden")),V.setAttribute("hidden","true"))},100))}k.current=l});const v=((B=t.otherOptions)==null?void 0:B.area)==="sidebar",_=!(v&&!y.length)&&(!y.length||["1","true"].includes((b=xr(y[0].blockID))==null?void 0:b.dataset.widgetCustomizable))&&!(v&&t.depth>1),C=y.length&&hd(y[0].blockID),M=ie=>!(!c&&dd.has(ie)||C!=null&&C.size&&!(C!=null&&C.has(ie))),z=_?[...Object.keys(wr)].filter(M):[],U=h3({allowedBehaviors:z,customizable:_,wrapBehavior:d,widgets:y,isSidebar:v,getParent:s,depth:x}),A={otherOptions:m,wrapBehavior:d,onChange:I,menuOptions:U,widgets:y,getParent:s,areaId:t.areaId,areaRef:t.areaRef,depth:x,moveUp:t.moveUp,moveDown:t.moveDown};return T.jsx("div",{className:"cWidgetContainer__menu_region",ref:r,children:cd.createPortal(T.jsxs("form",{ref:w,"data-current":l?"yes":"no",hidden:!l,"data-role":"widgetAreaConfigForm",className:`cWidgetContainer__menu ${l?"ipsMenu":""} ${U.size?"":"cWidgetContainer__menu--empty"}`,onSubmit:ie=>{ie.preventDefault(),ie.stopPropagation(),window.Debug.warn("Closing a widget area form because it was submitted; these forms should never be submitted"),o(!1)},"data-widget-base":((te=(Q=t.widgets)==null?void 0:Q[0])==null?void 0:te.blockID)||void 0,children:[T.jsx(r3,{...A,allowedBehaviors:z}),T.jsx(o3,{...A}),T.jsx(u3,{...A}),T.jsx(s3,{...A}),T.jsx(a3,{...A}),T.jsx(c3,{...A}),T.jsx(f3,{menuOptions:U}),T.jsx(d3,{...A})]}),document.body,"area_menu")})});function h3({customizable:e,allowedBehaviors:t,wrapBehavior:r,widgets:l,isSidebar:o,getParent:s,depth:c}){var d,m;const f=new Set;return e&&t.length>1&&f.add("wrap"),e&&r.match(/carousel$/)&&((d=s())==null?void 0:d.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"}],Yr=Z.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,d]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])&&d!==void 0&&(e.otherOptions[f]=d));for(const[f,d]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]=d);for(let f=0;f!r.includes(m.areaId)&&(m.children.length||m.widgets.length));d.children.length===1&&!r.includes(d.areaId);)d=d.children[0],d.children=d.children.filter(m=>!r.includes(m.areaId)&&(m.children.length||m.widgets.length));if(r.includes(d.areaId)||d.children.length===0&&d.widgets.length===0)e.children.splice(f--,1);else if(d.children.length===1||d.children.length&&d.orientation===e.orientation){const m=d.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(d,e.orientation,r,l+1,o))}if(l>=fd&&e.children.length){const f=[];for(const d of e.children)f.splice(f.length,0,...d.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 be&&(f.wrapBehavior=be[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 x,k,O,I;const l=kv(e.closest(".cWidgetContainer")),o=Sl(e.getBoundingClientRect()),s=((x=e.lastElementChild)==null?void 0:x.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(),_=l?"x":"y",C=l?"right":"bottom",M=(v[_]+v[C])/2;return{x:t,y:r}[_]>M?1:0}return 0}let d={left:void 0,top:void 0,height:0,width:0},m=0,y,w;for(y=0;y=v?y+1:y}if(d.left!==void 0&&d.top!==void 0&&w&&(l&&(P.left<=w.left||P.top+20>=d.top+d.height)||!l&&(P.top<=w.top+10||P.left+20>=d.left+d.width))){w=void 0,l?d.height=(d.height+Math.max(d.height,P.top-d.top))/2:d.width=(d.width+Math.max(d.width,P.right-d.right))/2;let v=Sl(new DOMRect(d.left,d.top,d.width,d.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,d={left:l?P.left:v.right,top:l?v.bottom:P.top,height:P.height,width:P.width}}(d.left===void 0||P.leftd.left+d.width&&(d.width=P.right-d.left),(d.top===void 0||P.topd.top+d.height&&(d.height=P.bottom-d.top),w=P}if(l&&t<=d.left||!l&&r<=d.top)return m;if(l&&t>=d.left+d.width||!l&&r>=d.top+d.height)return y+1;for(let P=m;P<=y;P++){const v=Sl(f[P].getBoundingClientRect()),_=Sl((I=f[P+1])==null?void 0:I.getBoundingClientRect());if(P===y||!_){const C=(l?v.left+v.right:v.top+v.bottom)/2;return(l?t:r)>C?P+1:P}else if(l&&v.leftt||!l&&v.topr)return l?t>(v.left+v.right)/2?P+1:P:r>(v.top+v.bottom)/2?P+1:P}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 Iv(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]=Iv(e.children[t]);return e}const yu={},di={};function Rv(e,t,r=!0){return new Promise(async l=>{if(yu[t]){if(r){di[t]&&await di[t](!1),di[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(Iv(e)),pageApp:document.body.dataset.pageapp,pageModule:document.body.dataset.pagemodule,pageController:document.body.dataset.pagecontroller,pageArea:t,area:t}}),yu[t]=!1,di[t]){let o=di[t];di[t]=null,Rv(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,d]=Z.useState({}),[m,y]=Z.useState(null),w=Z.useRef(null),x=Z.useRef(null),k=Z.useRef(null),O=Z.useRef(null);r==="editing"&&!O.current&&(O.current=document.createElement("div")),Z.useEffect(()=>()=>{var v;r==="editing"&&((v=O.current)==null||v.remove(),O.current=null)},[r]);const I=_3();Z.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),P(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}),Z.useEffect(()=>{},[I,e]);function P(v,_=!1){var M,z;const C=new Set;if(console.log("hiding stuff"),v.querySelectorAll(".ipsComposeArea_editor").forEach(U=>{let A=U.parentElement;for(;A&&A!==v;)A.querySelectorAll(":scope > *").forEach(B=>{_?(B.ipsShow(),C.add(B)):C.has(B)||B.ipsHide()}),A=A.parentElement;for(A=_?U.parentElement:U,_&&U.ipsHide();A&&A!==v;)C.add(A),A.style.display==="none"&&(A.style.display=""),A.ipsShow(),A=A.parentElement}),_){(M=v.querySelector("#ipsTabs_tabs_form_form_tab_settings_panel"))==null||M.ipsHide(),v.querySelectorAll('[id="form_tab_settings"]').forEach(A=>{A.parentElement.ipsHide()});const U=v.querySelectorAll('#tabs_form > ul[role="tablist"] > li:not([hidden]) a');U[0]&&(U[0].click(),U.length===1&&((z=U[0].closest("#tabs_form"))==null||z.ipsHide()))}else x.current&&!v.querySelector(".tiptap.ProseMirror")&&(c.current.style.height=x.current+"px",v.addEventListener("ips:editorAfterInit",U=>{var A;c.current&&setTimeout(()=>c.current.style.height="",100),k.current=((A=U.detail)==null?void 0:A.instance)||k.current},{once:!0}))}return{toolList:m,blockUsesInlineEditing:I,editForm:f,tiptapRef:k,toolListWrap:O,captureHeight(){x.current=c.current.getBoundingClientRect().height},async setEditing(){if(!(r!=="default"||!I)){if(!f.configId||!f.element){const v=`${window.ips.getSetting("baseURL")}index.php?${Object.entries(so()).map(([U,A])=>`${encodeURIComponent(U)}=${encodeURIComponent(A)}`).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)}`,_=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"}),M=window.ips.uid(),z=document.createElement("div");z.setAttribute("data-ipsconfigform",M),z.innerHTML=C,z.querySelectorAll("form").forEach(U=>U.addEventListener("submit",A=>{var ce;A.preventDefault();const B=[...new FormData(U).entries()],b=Object.fromEntries(B),Q=window.ips.ui.editorv5.getObj(c.current.querySelector("[data-ipseditorv5]")),te=(Q==null?void 0:Q.getInstance())||k.current,ie=b.content||(te==null?void 0:te.getHTML());(ce=te==null?void 0:te.commands)==null||ce.resetStickyAncestorStyles(),Q==null||Q.destruct();try{window.ips.cleanContentsOf(z)}catch(se){window.Debug.warn(se)}k.current=null;const le=ie!==void 0?c.current.querySelector(":scope > .ipsWidget").getBoundingClientRect():c.current.getBoundingClientRect();if(ie!==void 0){c.current.classList.remove("ipsWidget__content--wrap--editing");const se=c.current.querySelector(":scope > .ipsWidget");se&&(se.innerHTML=`
${ie}
`)}else c.current.style.height=`${le.height}px`,c.current.style.width=`${le.width}px`;setTimeout(async()=>{let se;try{se=await window.ips.fetch(U.action,{data:b,method:"post",bypassRedirect:!0})}catch(Fe){window.Debug.error(Fe)}_.hide(),z.remove(),t("default"),d({}),s(se)},100)})),_.addContentProcessor(U=>{var b,Q;const A=(b=z.parentElement)==null?void 0:b.getBoundingClientRect();if(A){const te=z.parentElement;te.style.width=A.width+"px",te.style.height=A.height+"px";const ie=(Q=U.closest(".ipsDialog"))==null?void 0:Q.getAttribute("id");if(ie){const le=(ce,{dialogID:se})=>{ie===se&&(te.style.width="",te.style.height="",te.appendChild(z),P(z),window.$(document).off("hideDialog",le))};window.$(document).on("hideDialog",le)}}let B=z;for(;B;){if(B.parentElement===U)return;B=B.parentElement}U.innerHTML="",U.appendChild(z),P(z,!0)}),d({element:z,configId:M,dialogRef:_})}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:d},m){const[y,w]=Z.useState("default"),x=Z.useRef(null),k=Q=>{y==="default"&&Q==="editing"&&e.startsWith("app_cms_Wysiwyg")&&(_==null||_()),w(Q)};let O=!1;const{area:I}=Z.useContext(Yr),{setEditing:P,editForm:v,captureHeight:_,blockUsesInlineEditing:C,toolList:M,tiptapRef:z,toolListWrap:U}=y3({blockID:e,setState:k,state:y,blockArea:I,title:t,reloadContent:B,contentRaw:f},m);Z.useEffect(()=>{if(y==="default"){const Q=e.split("_");(!Q[3]||s)&&(O=!Q[3],O&&(e+=`_${Math.random().toString(36).slice(2,9)}`),B(),k("loading"))}}),Z.useEffect(()=>{var Q;r&&x.current&&((Q=x.current)==null?void 0:Q.dataset.menuListenerSet)!=="true"&&(x.current.dataset.menuListenerSet="true",window.$(document).trigger("contentChange",[window.$(x.current.parentElement)]),x.current.addEventListener("ipsMenuOpened",async te=>{if(await new Promise(le=>setTimeout(le,1)),C){await d(),b(),await P();return}let ie=`${window.ips.getSetting("baseURL")}index.php?${Object.entries(so()).map(([le,ce])=>`${encodeURIComponent(le)}=${encodeURIComponent(ce)}`).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(I)}&area=${encodeURIComponent(I)}`;try{if(A()==="modal"){b();const le=window.ips.ui.dialog.create({title:t,url:ie,forceReload:!0,destructOnClose:!0,remoteSubmit:!0});le.show(),document.querySelectorAll(`[id="${e}_edit_menu"]`).ipsHide();const ce=Qn.throttle(se=>{se.dialogID===le.dialogID&&(se.stopImmediatePropagation(),se.preventDefault(),B(se.response))},200);document.addEventListener("dialogSubmission",ce,{once:!0})}else te.menu.html(window.$("
").addClass("ipsLoading").css({height:"100px"})),setTimeout(async()=>{const le=await window.ips.fetch(ie),ce=te.menu.get(0);if(ce.id)for(const se of document.querySelectorAll(`[id="${ce.id}"]`))se!==ce&&se.remove();te.menu.html(le).find("form").on("submit",async se=>{var Fe;se.preventDefault();try{const pe=await window.ips.fetch(window.$(se.currentTarget).attr("action"),{data:window.$(se.currentTarget).serialize(),type:"post"});typeof pe=="object"||((Fe=pe==null?void 0:pe.toLowerCase)==null?void 0:Fe.call(pe))==="ok"?(await B(pe),te.menu.trigger("closeMenu")):typeof pe=="string"&&te.menu.html(pe)}catch(pe){window.Debug.warn(pe),window.ips.ui.alert.show({type:"alert",icon:"warn",message:window.ips.getString("sidebarConfigError"),callbacks:{}})}}),te.menu.trigger("contentChange",[te.menu])},10);document.body.dispatchEvent(new is(null))}catch(le){window.Debug.warn(le),window.ips.ui.alert("Something went wrong when loading the configuration settings")}await d()}))});function A(){var Q;return((Q=xr(e))==null?void 0:Q.dataset.menustyle)||"none"}async function B(Q){const te={blockID:e,title:t,config:r,blank:!1,contentRaw:"Error"};(Q==null?void 0:Q.areaClasses)instanceof Array&&(te.areaClasses=Array.from(new Set(Q.areaClasses)));try{const ie=await Tv(e,o,I,O,c().wrapBehavior);te.contentRaw=ie,te.defaultConfiguration=void 0,l==null||l(te),k("default")}catch(ie){l==null||l(te),k("contentLoadError"),window.Debug.log("something went wrong when loading a block's content."),window.Debug.error(ie)}}function b(){document.querySelectorAll(`[id="${e}_edit_menu"]`).ipsHide()}return{reloadContent:B,state:y,setState:k,editForm:v,blockUsesInlineEditing:C,manageBlockRef:x,toolList:M,tiptapRef:z,toolListWrap:U}}function ao(e){return e.split("_").slice(0,3).join("_")}function xr(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=xr(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=xr(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 Il={};document.addEventListener(to.key,e=>{var t;!(e instanceof to)||typeof e.blockID!="string"||typeof e.area!="string"||((t=Il[e.blockID])==null||t.call(Il,e),delete Il[e.blockID])});function C3({remove:e,blockID:t}){const{area:r}=Z.useContext(Yr);t!==ao(t)&&(Il[t]=l=>{l.area!==r&&e({shallow:!0})})}const i0=new Set;let xl;function Av(){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 d=Z.useRef(null),m=Z.useRef(null);Z.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){d.current.setAttribute("hidden","");return}const x=w.getBoundingClientRect();let k=d.current.parentElement;for(;k&&!["relative","absolute","fixed","sticky"].includes(getComputedStyle(k).position.toLowerCase());)k=k.parentElement;const O=(k||document.documentElement).getBoundingClientRect();d.current.style.left=`calc(${x.right-O.left}px + var(--i-hz-offset, 20px))`,d.current.style.top=`${x.top-O.top}px`;let I=!1;const P=d.current.getBoundingClientRect();P.right>window.innerWidth-10&&(d.current.style.left=`calc(${x.left-O.left-P.width}px - var(--i-hz-offset, 20px))`,I=!0);const v=d.current.querySelector('[data-role="toollist-wrap"]');s?(s.parentElement!==v&&(v.innerHTML="",v.appendChild(s)),v.style.top=`calc(${x.height}px + var(--i-hz-offset, 20px))`,v.style.width=`${x.width}px`,I?(v.style.right="revert",v.style.left="calc(100% + var(--i-hz-offset, 20px))"):(v.style.right="",v.style.left="")):v.innerHTML=""};return Z.useEffect(()=>{var U;if(!o||r!=="editing")return;const w=t.current;let x=Date.now();const k=A=>{var B,b,Q;Date.now()-x<100||(x=Date.now(),y((b=(B=A.detail)==null?void 0:B.instance)==null?void 0:b.view.dom),c.current=((Q=A.detail)==null?void 0:Q.instance)||c.current)};w==null||w.addEventListener("ips:editorUpdated",k);let O=0;const I=2e3,P=100,v=setInterval(()=>{if(O>=I){clearInterval(O);return}O+=P,y()},P),_=window._.debounce(()=>{var A,B;d.current.removeAttribute("hidden"),(A=c.current)==null||A.commands.showMenu(),y(((B=c.current)==null?void 0:B.view.dom)||w),document.dispatchEvent(new CustomEvent("ipsAnchorPosition"))},200),C=()=>{var A,B;if(c.current&&!((A=c.current.storage.ipsInlineEditing)!=null&&A.stickyAncestor)){document.removeEventListener("scroll",C);return}(B=c.current)==null||B.commands.hideMenu(),d.current.setAttribute("hidden",""),_()};(!c.current||(U=c.current.storage.ipsInlineEditing)!=null&&U.stickyAncestor)&&document.addEventListener("scroll",C);const M=A=>{var B,b;(b=c.current||((B=A==null?void 0:A.detail)==null?void 0:B.instance))==null||b.commands.hideMenu(),d.current.setAttribute("hidden","")},z=A=>{var B,b,Q,te,ie;(b=c.current||((B=A==null?void 0:A.detail)==null?void 0:B.instance))==null||b.commands.showMenu(),d.current.removeAttribute("hidden"),y((ie=(te=(Q=A==null?void 0:A.detail)==null?void 0:Q.instance)==null?void 0:te.view)==null?void 0:ie.dom)};return w==null||w.addEventListener("ips:editorHidePanes",M),w==null||w.addEventListener("ips:editorShowPanes",z),()=>{w==null||w.removeEventListener("ips:editorUpdated",k),w==null||w.removeEventListener("ips:editorHidePanes",M),w==null||w.removeEventListener("ips:editorShowPanes",z),document.removeEventListener("scroll",C),clearInterval(v)}}),cd.createPortal(T.jsxs("div",{className:"cWidgetContainer__portal-menu",id:`pagebuilder_portal_menu--${l}`,hidden:r!=="editing",ref:d,children:[e,T.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:d,manageBlockRef:m,toolList:y,tiptapRef:w,toolListWrap:x,getArea:k}){const{area:O}=Z.useContext(Yr);return T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"cSidebarBlock_managing",hidden:t==="editing"&&f,id:`elWidgetMenu--${e}`,children:[T.jsx("h4",{className:"cSidebarBlock_managing__heading",hidden:t==="editing",children:r}),T.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="${O}"]`,children:T.jsx("i",{className:"fa-solid fa-pencil"})}),T.jsx("button",{className:"ipsButton ipsButton--icon ipsButton--inherit","data-action":"removeBlock","data-ipstooltip":"",title:window.ips.getString("removeBlock"),onClick:c,children:T.jsx("i",{className:"fa-solid fa-xmark"})}),T.jsx("div",{className:"ipsMenu ipsMenu_wide ipsHide",id:`${e}_edit_menu`})]}),T.jsxs(E3,{parentRef:d,state:t,blockID:e,blockUsesInlineEditing:f,toolList:y,tiptapRef:w,toolListWrap:x,children:[T.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 I;(I=d.current.querySelector(".ipsWidget [data-ipsconfigform] form"))==null||I.dispatchEvent(new Event("submit"))},children:T.jsx("i",{className:"fa-solid fa-save"})}),T.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 I;(I=o.dialogRef)==null||I.show()},children:T.jsx("i",{className:"fa-solid fa-ellipsis"})}),T.jsx("button",{className:"ipsButton ipsButton--icon ipsButton--inherit","data-action":"cancel","data-ipstooltip":"",title:window.ips.getString("cancel"),onClick:()=>{var I;w.current&&(w.current.storage.ipsInlineEditing.applyStickyStyles=!1,w.current.commands.resetStickyAncestorStyles()),(I=o.dialogRef)==null||I.hide(),o.element&&(window.ips.cleanContentsOf(o.element),w.current=null),s("default")},children:T.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:d}=e;const m=Z.useRef(null),{state:y,setState:w,editForm:x,blockUsesInlineEditing:k,manageBlockRef:O,toolList:I,tiptapRef:P,toolListWrap:v}=S3(e,m),{area:_}=Z.useContext(Yr);C3({remove:f,blockID:t});const C=!["loading","editing"].includes(y),M=Qn.debounce(()=>{var z;return(z=eo(m.current.closest(".pageBuilderRoot, body")))==null?void 0:z.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},300);return T.jsxs("div",{ref:m,className:`ipsWidget__content--wrap ${{editing:"ipsWidget__content--wrap--editing",loading:"ipsLoading"}[y]||""}`,draggable:C,onDragStart:async z=>{if(!C||!m.current)return;if(eo(m.current.closest(".pageBuilderRoot, body"))){z.preventDefault(),window.ips.ui.flashMsg.show(window.ips.getString("core_pagebuilder_widget-cannot-drag")),M();return}const U=await Av(),A=d();document.querySelectorAll(".cWidgetContainer__menu_region.ipsMenu").forEach(b=>b.style.display="none");const B={areaDetails:{wrapBehavior:A.wrapBehavior,otherOptions:A.otherOptions},blockID:t,blockTitle:r,config:l,blank:o,contentRaw:s,areaId:c,area:_,pageHash:U};z.dataTransfer.setData("application/x.ipsblock",JSON.stringify(B)),window.ipsSettings.__pageeditor_last_dragged_widget_data__=B,setTimeout(()=>{var b,Q;(Q=(b=m.current)==null?void 0:b.closest("section.cWidgetContainer"))==null||Q.setAttribute("hidden","")},100)},onDragEnd:()=>{delete window.ipsSettings.__pageeditor_last_dragged_widget_data__,setTimeout(()=>{var z,U;document.querySelectorAll(".cWidgetContainer__menu_region.ipsMenu").forEach(A=>A.style.display=""),(U=(z=m.current)==null?void 0:z.closest("section.cWidgetContainer"))==null||U.removeAttribute("hidden")},200)},children:[T.jsx("div",{className:"ipsWidgetBlank",hidden:!o||!!s,children:"This widget is empty"}),T.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}),T.jsx(k3,{...e,editForm:x,setState:w,state:y,parentRef:m,blockUsesInlineEditing:k,manageBlockRef:O,toolList:I,tiptapRef:P,toolListWrap:v,getArea:d})]})}function I3({orientation:e="vertical",children:t=[],wrapBehavior:r,onChange:l=()=>{},otherOptions:o={},widgets:s=[],insertSibling:c=()=>{},areaId:f,getParent:d,depth:m=0},y){r===void 0&&(r=s.length?"table":"wrap");const{area:w}=Z.useContext(Yr);if(m>=fd)return{};const x=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 O,I,P,v,_,C,M,z,U;if(eo(y.current.closest(".pageBuilderRoot"))){k.preventDefault(),k.stopPropagation(),window.ips.ui.flashMsg.show(window.ips.getString("core_pagebuilder_widget-cannot-drag")),x();return}k.stopPropagation(),k.preventDefault();try{let A;const B=JSON.parse(k.dataTransfer.getData("application/x.ipsblock")||"null");for(const le of["blockTitle","blockID","config","blank"])if(!B||typeof B!="object"||!(le in B)){let ce=k.dataTransfer.getData("text/html")||k.dataTransfer.getData("text/plain")||"";k.dataTransfer.types.includes("text/uri-list")&&!ce&&(ce=k.dataTransfer.getData("text/uri-list").split(/\s*\n\s*/).filter(V=>!V.match(/^#/)).map(V=>`${V}`).join(` `)),await window.ips.ui.editorv5.whenLoaded();const se=document.createElement("div");se.setAttribute("hidden",""),document.body.appendChild(se);const[Fe,pe]=await window.ips.utils.tiptap.editorInstance(se,{...window.ips.ui.editorv5.buildConfig({}),content:ce});if(await new Promise(F=>setTimeout(F)),ce=Fe.getHTML(),Fe.destroy(),pe.unmount(),se.remove(),ce){A={orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:"table",otherOptions:{},widgets:[{title:"WYSIWYG Editor",blockID:"app_cms_Wysiwyg",config:!0,blank:!1,contentRaw:ce,defaultConfiguration:{content:ce}}]};break}throw new Error(`The data from the drop event did not include ${le}, so the block could not be inserted in the widget area tree`)}const b=(B==null?void 0:B.blockID)||((O=A==null?void 0:A.widgets)==null?void 0:O[0].blockID),Q=b?xr(b):null;if(new Set(((P=(I=Q==null?void 0:Q.dataset)==null?void 0:I.widgetDisallowedAreas)==null?void 0:P.split(",").map(le=>le.trim()))||[]).has(w)){document.querySelectorAll("section.cWidgetContainer:not([data-controller])").forEach(le=>{le.removeAttribute("hidden"),le.querySelectorAll(":scope > .cWidgetContainer__menu_region").forEach(ce=>ce.style.display="")});return}const ie=y.current;if(ie){if(B.blockID.startsWith("app_cms_Blocks:")){const F=xr(B.blockID),V=F==null?void 0:F.dataset.customblockid;if(!V)throw new Error("The dropped block is a custom block but the block id is invalid");const G=await window.ips.fetch(window.ips.getSetting("baseURL"),{method:"get",data:{app:"cms",module:"pages",controller:"builder",do:"getCustomBlockContent",id:V}});if(typeof G.content!="string"||typeof G.block_key!="string"||typeof((v=G.configuration)==null?void 0:v.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)");B.contentRaw=G.content,B.defaultConfiguration={cms_widget_custom_block:G.block_key},B.blockID=`app_cms_Blocks_${Math.round(Math.random()*Math.pow(16,8)).toString(16)}`,B.blockTitle=G.configuration.blocktitle}const le=Lv(ie,k.clientX,k.clientY),ce=B.areaDetails,se={title:B.blockTitle,blockID:B.blockID,config:B.config,blank:B.blank,contentRaw:B.contentRaw||"
"};B.defaultConfiguration&&(se.defaultConfiguration=se.configuration=B.defaultConfiguration),A=A||{orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:(ce==null?void 0:ce.wrapBehavior)||B.ipsWrapBehavior||((M=(C=(_=hd(B.blockID))==null?void 0:_.values())==null?void 0:C.next())==null?void 0:M.value)||"table",otherOptions:{...ce==null?void 0:ce.otherOptions},widgets:[se]};const Fe=await Av(),pe=[];if(Number.isInteger(B==null?void 0:B.areaId)&&B.area===w&&B.pageHash===Fe&&pe.push(B.areaId),pe.includes(f))return;if(ao(A.widgets[0].blockID)===A.widgets[0].blockID){A.widgets[0].blockID+="_";for(let F=0;F<6;F++)A.widgets[0].blockID+=Math.round(Math.random()*16).toString(16);A.widgets[0].contentRaw=await Tv(A.widgets[0].blockID,A.widgets[0].defaultConfiguration,w,!0,A.wrapBehavior),A.widgets[0].blank=!1}if((z=y==null?void 0:y.current)!=null&&z.closest(".cWidgetContainer--carousel")&&A.wrapBehavior in be&&(A.wrapBehavior=be[A.wrapBehavior],A.widgets.length&&(A.widgets[0].blank=!0,A.widgets[0].contentRaw=`
${A.widgets[0].contentRaw||""}
`)),["before","after"].includes(le))A.orientation=e,c==null||c(A,le==="before",pe);else if(!t.length&&s.length){const F={orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:r,otherOptions:o,widgets:s,areaId:f};l({newState:{children:le===0?[A,F]:[F,A],wrapBehavior:"wrap",widgets:[],otherOptions:{}},toRemove:pe})}else t.splice(le,0,A),l({newState:{children:t},toRemove:pe});(U=y.current)==null||U.dispatchEvent(new to({widget:A.widgets[0],area:w}))}}catch(A){window.Debug.warn(A),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(A=>{A.removeAttribute("hidden"),A.querySelectorAll(":scope > .cWidgetContainer__menu_region").forEach(B=>B.style.display="")})},onDragOver:k=>{k.preventDefault(),k.stopPropagation(),A3({e:k,ref:y,orientation:e,wrapBehavior:r,getParent:d,children:t,clientX:k.clientX,clientY:k.clientY,blockArea:w})}}}function R3(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),A3=Qn.throttle(function({ref:e,orientation:t,wrapBehavior:r,getParent:l,children:o,clientX:s,clientY:c,blockArea:f}){var m,y,w;const d=window.ipsSettings.__pageeditor_last_dragged_widget_data__;if(!(f&&typeof(d==null?void 0:d.blockID)=="string"&&(m=xr(d.blockID).dataset.widgetDisallowedAreas)!=null&&m.split(",").map(k=>k.trim().toLowerCase()).includes(f.toLowerCase()))&&e.current){if(eo(e.current.closest(".pageBuilderRoot")))return;const x=l==null?void 0:l();try{let k,O,I=e.current,P=Lv(I,s,c),v=t;if(["stack","accordion"].includes(r)&&(t="vertical"),["before","after"].includes(P)){v=t==="horizontal"?"vertical":"horizontal";const M=P;if(I=(y=e.current.parentElement)==null?void 0:y.closest(".pageBuilderRoot .cWidgetContainer"),I){let z=I.querySelectorAll(":is(:scope, :scope > .cWidgetContainer__accordionWrapper) > :is(.cWidgetContainer, .ipsWidget)");for(P=0,P=0;P :first-child"))!=null&&w.classList.contains("cWidgetContainer__menu_region")&&(P+=1);let _=1,C=P*_;if(I&&(P>0&&(k=I.querySelector(`:scope > :is(.cWidgetContainer,.ipsWidget, .cWidgetContainer__accordionWrapper):nth-child(${C})`)),O=I.querySelector(`:scope > :is(.cWidgetContainer, .ipsWidget, .cWidgetContainer__accordionWrapper):nth-child(${C+_})`),pi(I,"cWidgetContainer--dragInside"),I.classList.contains("cWidgetContainer--carousel")&&(k?O||pi(I,"cWidgetContainer--dragAfterLast"):pi(I,"cWidgetContainer--dragBeforeFirst"),I.classList.contains("ipsScrolling")||R3(I,s))))return;k&&pi(k,v==="horizontal"?"cWidgetContainer--dragLeft":"cWidgetContainer--dragBelow"),O&&pi(O,v==="horizontal"?"cWidgetContainer--dragRight":"cWidgetContainer--dragAbove")}catch(k){k.message=`An unexpected error occurred when handling the drag over event `+k.message,window.Debug.warn(k)}}},200);function pi(e,t,r=400){var l;rt.has(e)||rt.set(e,new Map);for(const o of t.split(/\s+/).filter(s=>!!s)){rt.get(e).has(o)&&(clearTimeout(rt.get(e).get(o)),rt.get(e).delete(o)),e.classList.add(o),document.querySelectorAll(`.${o}`).forEach(c=>{var f;if(c!==e){c.classList.remove(o);const d=(f=rt.get(c))==null?void 0:f.get(o);d&&(clearTimeout(d),rt.get(c).delete(o))}});const s=setTimeout(()=>{var f;e.classList.remove(o);const c=(f=rt.get(e))==null?void 0:f.get(o);c&&(clearTimeout(c),rt.get(e).delete(o),rt.get(e).size||rt.delete(e))},r);rt.get(e).set(o,s)}(l=rt.get(e))!=null&&l.size||rt.delete(e)}setInterval(()=>{for(const e of rt.keys())if(e.closest("body")!==document.body){for(const t of rt.get(e).values())clearTimeout(t);rt.delete(e)}},5e3);const rt=new Map;function O3({wrapBehavior:e,widgets:t,scrollRef:r}){const l=Z.useRef(null),o=e==="carousel"&&!t.length;Z.useEffect(()=>{if(o&&(d(),r.current)){const y=r.current;os.set(y,d);const w=k=>{var M;const[O,I,P]=c(),v=((M=k==null?void 0:k.detail)==null?void 0:M.direction)||"next",_=v!=="prev"&&(O>=I-1||P[I-1].getBoundingClientRect().right<=y.getBoundingClientRect().right);if(v==="prev"&&O===0||v!=="prev"&&_)return;const C=y.querySelector(`[data-carousel-arrow="${v}"]`);C instanceof HTMLElement&&m({target:C})};y.addEventListener("scrollPanels",w);const x=new ResizeObserver(Qn.debounce(d,100));return x.observe(r.current),()=>{os.delete(y),y.removeEventListener("scrollPanels",w),x.disconnect()}}});function s(){var y;return(y=r.current)!=null&&y.classList.contains("cWidgetContainer--carousel")?r.current:null}function c(){var I;const y=s(),w=y==null?void 0:y.querySelectorAll(":scope > .cWidgetContainer");if(!w)throw new ReferenceError;const x=w.length;if(gf.has(y))return[parseInt(((I=l.current)==null?void 0:I.dataset.actualOffset)||"0"),x,w];const k=y.getBoundingClientRect();let O;for(O=0;O=k.left-1)return[O,x,w];return[x-1,x,w]}function f(){var k,O;const y=(k=r.current)==null?void 0:k.getBoundingClientRect(),w=(O=r.current)==null?void 0:O.querySelectorAll(":scope > .cWidgetContainer");if(!y||!(w!=null&&w.length)||w.length===1)return 1;const x=Math.abs(w[w.length-1].getBoundingClientRect().right-w[0].getBoundingClientRect().left);if(x){let I=Math.ceil(x/y.width);return w.length>2&&w[w.length-1].getBoundingClientRect().right-w[w.length-2].getBoundingClientRect().left>y.width&&I++,I}return 1}function d(){if(!l.current)return;let[y,w]=c();const x=f();y=Math.min(y,x),w=Math.min(w,x),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 x=y.target instanceof HTMLElement&&y.target.dataset.carouselArrow||"next",[k,O,I]=c();if(I.length<=1)return;const P=w.getBoundingClientRect(),v=x!=="prev"&&(k+1>=O||I[O-1].getBoundingClientRect().right<=P.right),_=(x==="prev"&&k===0?O-1:v?0:k+(x==="prev"?-1:1))%O;let C=(_===O-1?I[_].getBoundingClientRect().right:I[_].getBoundingClientRect().left)-P.left;l.current.dataset.actualOffset=`${_}`,gf.add(w),w.scrollTo({left:r.current.scrollLeft+C,behavior:"smooth"}),d()}return{indicatorRef:l,scroll:m}}const gf=new WeakSet,os=new WeakMap;function Ov(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(Ov(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")&&Ov(t,!0)},{capture:!0});function P3({widgets:e,scrollRef:t,wrapBehavior:r}){const{indicatorRef:l,scroll:o}=O3({widgets:e,scrollRef:t,wrapBehavior:r});return T.jsxs("div",{className:"cWidgetContainer__carousel-buttons","data-controller":"core.front.widgets.carouselControls",children:[T.jsx("div",{className:"cWidgetContainer__carousel-indicator",ref:l}),[["prev","left"],["next","right"]].map(([s,c])=>T.jsx("button",{onClick:o,"data-carousel-arrow":s,children:T.jsx("i",{className:`fa-solid fa-chevron-${c}`})},s))]})}function Pv({...e}){var A,B,b,Q,te,ie,le,ce,se,Fe,pe;const{onChange:t=({...F})=>window.Debug.warn({...F,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}=Z.useContext(Yr),s=Z.useRef({});Object.assign(s.current,{children:e.children||[],widgets:e.widgets||[],otherOptions:e.otherOptions||{},wrapBehavior:e.wrapBehavior||"wrap",areaClasses:e.areaClasses});const c=Z.useRef(null),f=(A=e.getParent)==null?void 0:A.call(e),[d,m]=Z.useState(!1),[y,w]=Z.useState(0);s.current.wrapBehavior in wr||(s.current.wrapBehavior=e.wrapBehavior="wrap");const x=Z.useRef(null),k=Z.useRef(null),O=I3(e,x),I=(b=(B=s.current.widgets)==null?void 0:B[0])==null?void 0:b.blockID,P=Z.useMemo(()=>I?xr(I):null,[I]),v=["cWidgetContainer","cWidgetContainer_managing"];(Q=e.getParent)!=null&&Q.call(e)&&!((ie=(te=e.getParent()).getParent)!=null&&ie.call(te))&&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 _=!1;f||(v.push("cWidgetContainer--main"),s.current.widgets.length||(_=!0)),d&&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={},M=s.current.widgets.length?"widget":"block";if((f&&!s.current.widgets.length||f&&((le=P==null?void 0:P.dataset.widgetLayouts)==null?void 0:le.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-${M}--gap`]=(typeof s.current.otherOptions.gapSize=="number"?s.current.otherOptions.gapSize:20)+"px":C[`--i-${M}--gap`]="0px",s.current.otherOptions.fullWidthItems&&s.current.wrapBehavior.match(/carousel$/)?C[`--i-${M}--size`]="100%":(_v.has(s.current.wrapBehavior)?s.current.wrapBehavior in vc&&(C[`--i-${M}--size`]=`${vc[s.current.wrapBehavior]}`):C[`--i-${M}--size`]=`${s.current.otherOptions.minSize||vc[s.current.wrapBehavior]||300}`,(ce=C[`--i-${M}--size`])!=null&&ce.match(/^\d+(?:\.\d*)?$|^\.\d+$/)&&(C[`--i-${M}--size`]+="px")),C[`--i-${M}--size`]==="100%"&&s.current.wrapBehavior.match(/carousel$/)&&(s.current.otherOptions.fullWidthItems=!0,e.otherOptions.fullWidthItems=!0),s.current.widgets.length){const F={paddingBlock:"padding-block",paddingInline:"padding-inline"};for(const V in F)C[`--i-widget--${F[V]}`]=s.current.otherOptions[V]||"0"}const U={"data-widget-layout":s.current.wrapBehavior};for(const F in s.current.otherOptions){const V=F.replaceAll(/([A-Z])/g,(G,X)=>`-${X}`.toLowerCase()).toLowerCase().trim().replaceAll(/[^0-9a-z_]+/g,"-").replaceAll(/^[^0-9a-z_]+|[^0-9a-z_]+$/g,"");U["data-widget-"+V]=((Fe=(se=s.current.otherOptions[F])==null?void 0:se.toString)==null?void 0:Fe.call(se).toLowerCase())||void 0}return _&&!((pe=s.current.children)!=null&&pe.length)&&window.ips.haveString("page_editor_cta")&&(U["data-pageeditor-empty-message"]=window.ips.getString("page_editor_cta")),T.jsxs("section",{"data-depth":l,"data-max-depth":fd,className:v.join(" "),ref:x,...U,"data-widget-area-id":r,"data-widget-area":o,"data-widgetarea":o,style:C,onMouseDown:F=>{var V,G,X,we,Re,Ee;if(c.current&&w3(F.target,c.current)){F.stopPropagation();return}(X=(G=(V=F.currentTarget)==null?void 0:V.closest)==null?void 0:G.call(V,".pageBuilderRoot"))!=null&&X.querySelector("[data-ipsconfigform]")||(!d&&k.current&&(l<=1||e.parentIsEditing||(Re=(we=x.current)==null?void 0:we.parentElement)!=null&&Re.querySelector(".cWidgetContainer--menu_open.cWidgetContainer"))?(F.stopPropagation(),document.body.dispatchEvent(new is(k.current)),setTimeout(()=>m(!0),10)):d&&l!==1&&((Ee=e.setParentEditing)==null||Ee.call(e,!0)))},...O,children:[_?T.jsx(T.Fragment,{}):T.jsx(p3,{...e,areaRef:x,depth:l,editing:d,setEditing:m,setParentEditing:e.setParentEditing,isLeaf:s.current.widgets.length&&!s.current.children.length,ref:k,menuRef:c}),s.current.children.map((F,V)=>Z.createElement(Pv,{...F,key:F.areaId,onChange:({newState:G,toRemove:X=[],removedBlocks:we=[],reloadWidget:Re=!1})=>{var Ye,Ze;let Ee=s.current.children.findIndex(Tt=>Tt.areaId===F.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),Re&&s.current.children[Ee].widgets.length){s.current.children[Ee].widgets[0].blank=!0;const Tt=(Ze=(Ye=document.querySelector(`[data-blockid="${s.current.children[Ee].widgets[0].blockID}"]`))==null?void 0:Ye.getBoundingClientRect)==null?void 0:Ze.call(Ye);Tt instanceof DOMRect&&(s.current.children[Ee].widgets[0].contentRaw=`
`)}t({newState:{children:s.current.children},toRemove:X,removedBlocks:we,reloadWidget:Re})}},insertSibling:(G,X=!1,we=[])=>{let Re=s.current.children.findIndex(Ee=>Ee.areaId===F.areaId&&Ee.areaId);Re||(Re=0),s.current.children.splice(X?Re:Re+1,0,G),t({newState:{children:s.current.children},toRemove:we})},setParentEditing:m,parentIsEditing:!!d,getParent:()=>e,isCurrent:V===y,setCurrent:()=>w(V),depth:l+1,moveUp:V===0?void 0:()=>{const[G,X]=s.current.children.slice(V-1,V+1);X.otherOptions=X.otherOptions||{},X.otherOptions.shouldBeEditing=!0,G.otherOptions.shouldBeEditing&&delete G.otherOptions.shouldBeEditing,s.current.children.splice(V-1,2,X,G),t({newState:{children:s.current.children}})},moveDown:V===s.current.children.length-1?void 0:()=>{const[G,X]=s.current.children.slice(V,V+2);G.otherOptions=G.otherOptions||{},G.otherOptions.shouldBeEditing=!0,X.otherOptions.shouldBeEditing&&delete X.otherOptions.shouldBeEditing,s.current.children.splice(V,2,X,G),t({newState:{children:s.current.children}})}})),s.current.widgets.map((F,V)=>T.jsx(L3,{...F,areaId:r,remove:({shallow:G=!1})=>{var X;s.current.widgets.splice(V,1),t({newState:{widgets:((X=s.current)==null?void 0:X.widgets)||[]},toRemove:G?[r]:[],removedBlocks:G?[]:[F.blockID]})},update:G=>{let X;G.areaClasses instanceof Array&&(X=G.areaClasses),delete G.areaClasses,Object.assign(s.current.widgets[V],G);const we={newState:{widgets:s.current.widgets},toRemove:[]};X&&(s.current.areaClasses=we.newState.areaClasses=X),t(we)},parentOptions:s.current.otherOptions,getArea:()=>({...e,...s.current}),selectArea:()=>new Promise(G=>{document.body.dispatchEvent(new is(k.current)),setTimeout(()=>{m(!0),G()})})},F.blockID+V)),s.current.wrapBehavior==="carousel"?T.jsx(P3,{widgets:s.current.widgets,scrollRef:x,wrapBehavior:s.current.wrapBehavior}):T.jsx(T.Fragment,{})]})}function N3({tree:e,onChange:t,area:r,effect:l}){const[o,s]=Z.useState(e),[c,f]=Z.useState(()=>!!document.querySelector('[data-role="availableBlocks"] [data-blockid]')),{Provider:d}=Yr;return Z.useEffect(()=>l==null?void 0:l()),Z.useEffect(()=>{c||document.addEventListener("ipsWidgetManagerLoaded",()=>f(!0))},[c]),T.jsx(d,{value:{area:r},children:T.jsx(Pv,{...o,onChange:async({newState:m,toRemove:y=[],removedBlocks:w=[],reloadWidget:x=!0})=>{w.length&&await m3(w,r),Object.assign(o,m),m=JSON.parse(JSON.stringify({...ls(o,null,y)})),Rv(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 d,m;const o=ls(Cv(r)),s=((d=r.closest("[data-widget-area]"))==null?void 0:d.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(T.jsx(D2.StrictMode,{children:T.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(T.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()}}))})}}});