[ SYSTEM ]: Linux wordpress 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
astra-addon
/
addons
/
advanced-hooks
/
theme-builder
/
build
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 index.js
1,231,564 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: index.js
(()=>{var e,t,n={3(e,t){t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},9(e,t,n){var r=n(661).Symbol;e.exports=r},53(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},61(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=r(n(156)),i=n(77);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n):n}},64(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},77(e,t){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,l):e.replace(i,l)).replace(r,s))}},97(e,t,n){var r=n(728);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},104(e,t,n){var r=n(9),o=n(595),i=n(126),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},126(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},139(e,t,n){for(var r,o=n(982),i=n(533),a=o.CASE_SENSITIVE_TAG_NAMES,s=i.Comment,l=i.Element,c=i.ProcessingInstruction,u=i.Text,d={},f=0,p=a.length;f<p;f++)r=a[f],d[r.toLowerCase()]=r;function h(e){for(var t,n={},r=0,o=e.length;r<o;r++)n[(t=e[r]).name]=t.value;return n}function m(e){return function(e){return d[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:h,formatDOM:function e(t,n,r){n=n||null;for(var o=[],i=0,a=t.length;i<a;i++){var d,f=t[i];switch(f.nodeType){case 1:(d=new l(m(f.nodeName),h(f.attributes))).children=e(f.childNodes,d);break;case 3:d=new u(f.nodeValue);break;case 8:d=new s(f.nodeValue);break;default:continue}var p=o[i-1]||null;p&&(p.next=d),d.parent=n,d.prev=p,d.next=null,o.push(d)}return r&&((d=new c(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=o[0]||null,d.parent=n,o.unshift(d),o[1]&&(o[1].prev=o[0])),o},isIE:function(){return/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},156(e,t,n){var r=n(940);e.exports=function(e,t){var n,o=null;if(!e||"string"!=typeof e)return o;for(var i,a,s=r(e),l="function"==typeof t,c=0,u=s.length;c<u;c++)i=(n=s[c]).property,a=n.value,l?t(i,a,n):a&&(o||(o={}),o[i]=a);return o}},200(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case g:case m:case l:return e;default:return t}}case o:return t}}}function C(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return C(e)||w(e)===u},t.isConcurrentMode=C,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===v||e.$$typeof===b||e.$$typeof===x||e.$$typeof===y)},t.typeOf=w},272(e,t,n){var r=n(64),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},286(e,t,n){var r=n(472),o=n(850),i=n(97),a=4294967295,s=Math.min;e.exports=function(e,t){if((e=i(e))<1||e>9007199254740991)return[];var n=a,l=s(e,a);t=o(t),e-=a;for(var c=r(l,t);++n<e;)t(n);return c}},350(e,t,n){var r=n(609),o=n(61).default,i={reactCompat:!0},a=r.version.split(".")[0]>=16,s=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var n,r,o="function"==typeof t,i={},a={};for(n in e)r=e[n],o&&(i=t(n,r))&&2===i.length?a[i[0]]=i[1]:"string"==typeof r&&(a[r]=n);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;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}},setStyleProp:function(e,t){if(null!=e)try{t.style=o(e,i)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!s.has(e.name)},elementsWithNoTextChildren:s}},420(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var l=a(n(609)),c=n(665),u=(0,n(489).createAnimation)("ClipLoader","0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}","clip");t.default=function(e){var t=e.loading,n=void 0===t||t,o=e.color,i=void 0===o?"#000000":o,a=e.speedMultiplier,d=void 0===a?1:a,f=e.cssOverride,p=void 0===f?{}:f,h=e.size,m=void 0===h?35:h,g=s(e,["loading","color","speedMultiplier","cssOverride","size"]),y=r({background:"transparent !important",width:(0,c.cssValue)(m),height:(0,c.cssValue)(m),borderRadius:"100%",border:"2px solid",borderTopColor:i,borderBottomColor:"transparent",borderLeftColor:i,borderRightColor:i,display:"inline-block",animation:"".concat(u," ").concat(.75/d,"s 0s infinite linear"),animationFillMode:"both"},p);return n?l.createElement("span",r({style:y},g)):null}},440(e,t,n){var r=n(714),o=n(350);function i(e){return r.possibleStandardNames[e]}e.exports=function(e){var t,n,a,s,l,c={},u=(e=e||{}).type&&{reset:!0,submit:!0}[e.type];for(t in e)if(a=e[t],r.isCustomAttribute(t))c[t]=a;else if(s=i(n=t.toLowerCase()))switch(l=r.getPropertyInfo(s),"checked"!==s&&"value"!==s||u||(s=i("default"+n)),c[s]=a,l&&l.type){case r.BOOLEAN:c[s]=!0;break;case r.OVERLOADED_BOOLEAN:""===a&&(c[s]=!0)}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(c[t]=a);return o.setStyleProp(e.style,c),c}},472(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},478(e,t,n){var r=n(924),o=n(440),i=n(975);i="function"==typeof i.default?i.default:i;var a={lowerCaseAttributeNames:!1};function s(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:r(i(e,(t=t||{}).htmlparser2||a),t)}s.domToReact=r,s.htmlToDOM=i,s.attributesToProps=o,s.Element=n(866).Element,e.exports=s,e.exports.default=s},482(e,t,n){"use strict";var r=n(796),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var y=a[g];if(!(i[y]||r&&r[y]||m&&m[y]||s&&s[y])){var v=f(n,y);try{c(t,y,v)}catch(e){}}}}return t}},485(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},488(e,t,n){var r="html",o="head",i="body",a=/<([a-zA-Z]+[0-9]?)/,s=/<head.*>/i,l=/<body.*>/i,c=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},u=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var d=new window.DOMParser;c=u=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),d.parseFromString(e,"text/html")}}if(document.implementation){var f=n(139).isIE,p=document.implementation.createHTMLDocument(f()?"html-dom-parser":void 0);c=function(e,t){return t?(p.documentElement.getElementsByTagName(t)[0].innerHTML=e,p):(p.documentElement.innerHTML=e,p)}}var h,m=document.createElement("template");m.content&&(h=function(e){return m.innerHTML=e,m.content.childNodes}),e.exports=function(e){var t,n,d,f,p=e.match(a);switch(p&&p[1]&&(t=p[1].toLowerCase()),t){case r:return n=u(e),s.test(e)||(d=n.getElementsByTagName(o)[0])&&d.parentNode.removeChild(d),l.test(e)||(d=n.getElementsByTagName(i)[0])&&d.parentNode.removeChild(d),n.getElementsByTagName(r);case o:case i:return f=c(e).getElementsByTagName(t),l.test(e)&&s.test(e)?f[0].parentNode.childNodes:f;default:return h?h(e):c(e,i).getElementsByTagName(i)[0].childNodes}}},489(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAnimation=void 0,t.createAnimation=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if("undefined"==typeof window||!window.document)return r;var o=document.createElement("style");document.head.appendChild(o);var i=o.sheet,a="\n @keyframes ".concat(r," {\n ").concat(t,"\n }\n ");return i&&i.insertRule(a,0),r}},533(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(53),s=new Map([[a.ElementType.Tag,1],[a.ElementType.Script,1],[a.ElementType.Style,1],[a.ElementType.Directive,1],[a.ElementType.Text,3],[a.ElementType.CDATA,4],[a.ElementType.Comment,8],[a.ElementType.Root,9]]),l=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=s.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),C(this,e)},e}();t.Node=l;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=c;var u=function(e){function t(t){return e.call(this,a.ElementType.Text,t)||this}return o(t,e),t}(c);t.Text=u;var d=function(e){function t(t){return e.call(this,a.ElementType.Comment,t)||this}return o(t,e),t}(c);t.Comment=d;var f=function(e){function t(t,n){var r=e.call(this,a.ElementType.Directive,n)||this;return r.name=t,r}return o(t,e),t}(c);t.ProcessingInstruction=f;var p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=p;var h=function(e){function t(t){return e.call(this,a.ElementType.Root,t)||this}return o(t,e),t}(p);t.Document=h;var m=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,o,r)||this;return i.name=t,i.attribs=n,i}return o(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}})},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,a.isTag)(e)}function y(e){return e.type===a.ElementType.CDATA}function v(e){return e.type===a.ElementType.Text}function b(e){return e.type===a.ElementType.Comment}function x(e){return e.type===a.ElementType.Directive}function w(e){return e.type===a.ElementType.Root}function C(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new u(e.data);else if(b(e))n=new d(e.data);else if(g(e)){var r=t?_(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach(function(e){return e.parent=o}),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(y(e)){r=t?_(e.children):[];var s=new p(a.ElementType.CDATA,r);r.forEach(function(e){return e.parent=s}),n=s}else if(w(e)){r=t?_(e.children):[];var l=new h(r);r.forEach(function(e){return e.parent=l}),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!x(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new f(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _(e){for(var t=e.map(function(e){return C(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=y,t.isText=v,t.isComment=b,t.isDirective=x,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=C},595(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},609(e){"use strict";e.exports=window.React},648(e){e.exports=function(e){return e}},661(e,t,n){var r=n(800),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},665(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cssValue=t.parseLengthAndUnit=void 0;var n={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function r(e){if("number"==typeof e)return{value:e,unit:"px"};var t,r=(e.match(/^[0-9.]*/)||"").toString();t=r.includes(".")?parseFloat(r):parseInt(r,10);var o=(e.match(/[^0-9]*$/)||"").toString();return n[o]?{value:t,unit:o}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}t.parseLengthAndUnit=r,t.cssValue=function(e){var t=r(e);return"".concat(t.value).concat(t.unit)}},714(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}Object.defineProperty(t,"__esModule",{value:!0});var i={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(function(e){i[e]=new o(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t,n,a=(n=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],_n=!0,a=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(e){a=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],l=a[1];i[s]=new o(s,1,!1,l,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){i[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){i[e]=new o(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){i[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){i[e]=new o(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){i[e]=new o(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){i[e]=new o(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){i[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)});var a=/[\-\:]([a-z])/g,s=function(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"].forEach(function(e){var t=e.replace(a,s);i[t]=new o(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(a,s);i[t]=new o(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(a,s);i[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){i[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)}),i.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){i[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)});var l=n(3),c=l.CAMELCASE,u=l.SAME,d=l.possibleStandardNames,f=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(d).reduce(function(e,t){var n=d[t];return n===u?e[t]=t:n===c?e[t.toLowerCase()]=t:e[t]=n,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return i.hasOwnProperty(e)?i[e]:null},t.isCustomAttribute=f,t.possibleStandardNames=p},728(e,t,n){var r=n(902),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},796(e,t,n){"use strict";e.exports=n(200)},800(e){var t="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;e.exports=t},802(e,t,n){var r=n(104),o=n(882);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},850(e,t,n){var r=n(648);e.exports=function(e){return"function"==typeof e?e:r}},866(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(53),a=n(533);o(n(533),t);var s=/\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===i.ElementType.Text)t?n.data=(n.data+e).replace(s," "):n.data+=e,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{t&&(e=e.replace(s," "));var r=new a.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.NodeWithChildren(i.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},882(e){e.exports=function(e){return null!=e&&"object"==typeof e}},902(e,t,n){var r=n(272),o=n(485),i=n(802),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},924(e,t,n){var r=n(609),o=n(440),i=n(350),a=i.setStyleProp,s=i.canTextBeChildOfNode;function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var i,c,u,d,f,p=(n=n||{}).library||r,h=p.cloneElement,m=p.createElement,g=p.isValidElement,y=[],v="function"==typeof n.replace,b=n.trim,x=0,w=t.length;x<w;x++)if(i=t[x],v&&g(u=n.replace(i)))w>1&&(u=h(u,{key:u.key||x})),y.push(u);else if("text"!==i.type){switch(d=i.attribs,l(i)?a(d.style,d):d&&(d=o(d)),f=null,i.type){case"script":case"style":i.children[0]&&(d.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?d.defaultValue=i.children[0].data:i.children&&i.children.length&&(f=e(i.children,n));break;default:continue}w>1&&(d.key=x),y.push(m(i.name,d,f))}else{if((c=!i.data.trim().length)&&i.parent&&!s(i.parent))continue;if(b&&c)continue;y.push(i.data)}return 1===y.length?y[0]:y}},940(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,f=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=l.source}m.prototype.content=e;var g=[];function y(t){var n=new Error(l.source+":"+d+":"+f+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=f,n.source=e,!l.silent)throw n;g.push(n)}function v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){v(r)}function x(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var r=e.slice(2,n-2);return f+=2,p(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}function C(){var e=h(),n=v(o);if(n){if(w(),!v(i))return y("property missing ':'");var r=v(a),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(s),l}}return b(),function(){var e,t=[];for(x(t);e=C();)!1!==e&&(t.push(e),x(t));return t}()}},975(e,t,n){var r=n(488),o=n(139).formatDOM,i=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(i);return n&&n[1]&&(t=n[1]),o(r(e),null,t)}},982(e){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.ReactDOM;var t=o.n(e),n=o(609),r=o.t(n,2),i=o.n(n);const a=window.wp.i18n,s=window.ReactJSXRuntime;var l=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u=Object.defineProperty,d=e=>{throw TypeError(e)},f=(e,t,n)=>((e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),p=(e,t,n)=>t.has(e)||d("Cannot "+n),h=(e,t,n)=>(p(e,t,"read from private field"),n?n.call(e):t.get(e)),m=(e,t,n)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),g=(e,t,n,r)=>(p(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);const y=e=>{const t=w(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),v(n,t)||x(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},v=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),i=o?v(e.slice(1),o):void 0;if(i)return i;if(0===t.validators.length)return;const a=e.join("-");return null==(n=t.validators.find(({validator:e})=>e(a)))?void 0:n.classGroupId},b=/^\[(.+)\]$/,x=e=>{if(b.test(e)){const t=b.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},w=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return S(Object.entries(e.classGroups),n).forEach(([e,n])=>{C(n,r,e,t)}),r},C=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?k(e)?void C(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,o])=>{C(o,_(t,e),n,r)});(""===e?t:_(t,e)).classGroupId=n})},_=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},k=e=>e.isThemeGetter,S=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,j=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},O=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,a=e=>{const n=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){a=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return n?e=>n({className:e,parseClassName:a}):a},E=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},P=/\s+/;function T(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=M(e))&&(r&&(r+=" "),r+=t);return r}const M=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=M(e[r]))&&(n&&(n+=" "),n+=t);return n};function A(e,...t){let n,r,o,i=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:j(e.cacheSize),parseClassName:O(e),...y(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(P);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?" "+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?" "+s:s);continue}f=!1}const h=E(l).join(":"),m=c?h+"!":h,g=m+p;if(i.includes(g))continue;i.push(g);const y=o(p,f);for(let e=0;e<y.length;++e){const t=y[e];i.push(m+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(T.apply(null,arguments))}}const N=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},D=/^\[(?:([a-z-]+):)?(.+)\]$/i,I=/^\d+\/\d+$/,R=new Set(["px","full","screen"]),L=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,B=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,z=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,V=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,H=e=>$(e)||R.has(e)||I.test(e),W=e=>re(e,"length",oe),$=e=>!!e&&!Number.isNaN(Number(e)),U=e=>re(e,"number",$),q=e=>!!e&&Number.isInteger(Number(e)),Y=e=>e.endsWith("%")&&$(e.slice(0,-1)),K=e=>D.test(e),Z=e=>L.test(e),G=new Set(["length","size","percentage"]),X=e=>re(e,G,ie),J=e=>re(e,"position",ie),Q=new Set(["image","url"]),ee=e=>re(e,Q,se),te=e=>re(e,"",ae),ne=()=>!0,re=(e,t,n)=>{const r=D.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},oe=e=>F.test(e)&&!B.test(e),ie=()=>!1,ae=e=>z.test(e),se=e=>V.test(e),le=()=>{const e=N("colors"),t=N("spacing"),n=N("blur"),r=N("brightness"),o=N("borderColor"),i=N("borderRadius"),a=N("borderSpacing"),s=N("borderWidth"),l=N("contrast"),c=N("grayscale"),u=N("hueRotate"),d=N("invert"),f=N("gap"),p=N("gradientColorStops"),h=N("gradientColorStopPositions"),m=N("inset"),g=N("margin"),y=N("opacity"),v=N("padding"),b=N("saturate"),x=N("scale"),w=N("sepia"),C=N("skew"),_=N("space"),k=N("translate"),S=()=>["auto",K,t],j=()=>[K,t],O=()=>["",H,W],E=()=>["auto",$,K],P=()=>["","0",K],T=()=>[$,K];return{cacheSize:500,separator:":",theme:{colors:[ne],spacing:[H,W],blur:["none","",Z,K],brightness:T(),borderColor:[e],borderRadius:["none","","full",Z,K],borderSpacing:j(),borderWidth:O(),contrast:T(),grayscale:P(),hueRotate:T(),invert:P(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[Y,W],inset:S(),margin:S(),opacity:T(),padding:j(),saturate:T(),scale:T(),sepia:P(),skew:T(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[Z]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",K]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",q,K]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",q,K]}],"grid-cols":[{"grid-cols":[ne]}],"col-start-end":[{col:["auto",{span:["full",q,K]},K]}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":[ne]}],"row-start-end":[{row:["auto",{span:[q,K]},K]}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[Z]},Z]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Z,W]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",U]}],"font-family":[{font:[ne]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",K]}],"line-clamp":[{"line-clamp":["none",$,U]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",H,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",H,W]}],"underline-offset":[{"underline-offset":["auto",H,K]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",J]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",X]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ee]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[H,K]}],"outline-w":[{outline:[H,W]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[H,W]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Z,te]}],"shadow-color":[{shadow:[ne]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Z,K]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[q,K]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[H,W,U]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ce=A(le);function ue(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ue(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function de(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ue(e))&&(r&&(r+=" "),r+=t);return r}const fe=(...e)=>ce(de(...e)),pe=(...e)=>(...t)=>e.forEach(e=>null==e?void 0:e(...t)),he=e=>{const t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},me={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},ge=(e,t)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}},ye=e=>{if(typeof window>"u")return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return console.error(e),null}},ve=(0,n.forwardRef)((e,t)=>{const{variant:r="primary",size:o="md",type:i="button",tag:a="button",className:l,children:c,disabled:u=!1,destructive:d=!1,icon:f=null,iconPosition:p="left",loading:h=!1,...m}=e,g=h?"opacity-50 disabled:cursor-not-allowed":"",y={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[r],v=d&&!u?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[r]:"",b={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[o];let x,w=null,C="";return f&&(C="flex items-center justify-center","left"===p?x=f:w=f),(0,s.jsxs)(a,{ref:t,type:i,className:fe(C,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",b,y,v,g,{"cursor-default":u},l),disabled:u,...m,children:[(0,s.jsx)(n.Fragment,{children:x},"left-icon"),c?(0,s.jsx)("span",{className:"px-1",children:c}):null,(0,s.jsx)(n.Fragment,{children:w},"right-icon")]})});ve.displayName="Button";let be=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const xe=(0,n.forwardRef)(({children:e=null,tag:t="label",size:n="sm",className:r="",variant:o="neutral",required:i=!1,...a},l)=>{const c={neutral:"",help:"font-normal",error:"font-normal",disabled:""};if(!e)return null;let u="";return i&&(u="after:content-['*'] after:text-field-required after:ml-0.5"),(0,s.jsx)(t,{ref:l,className:fe("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[n],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[o],u,null==c?void 0:c[o],r),...a,children:e})});xe.displayName="Label";const we=({label:e,switchId:t,disabled:r=!1,children:o,size:i})=>{const a={sm:"text-sm leading-5 font-medium",md:"text-base leading-6 font-medium"},l={sm:"text-sm leading-5 font-normal",md:"text-sm leading-5 font-normal"},c={sm:"space-y-0.5",md:"space-y-1"};if((0,n.isValidElement)(e))return(0,s.jsxs)("div",{className:fe("inline-flex items-center gap-3","items-start"),children:[o,e]});const u=!(null!=e&&e.heading||null!=e&&e.description),d=null!=e&&e.heading&&null!=e&&e.description?"items-start":"items-center";return u?o:(0,s.jsxs)("div",{className:fe("inline-flex",d,"gap-3"),children:[o,(()=>{const{heading:n="",description:o=""}=e||{};return(0,s.jsxs)("div",{className:fe("space-y-0.5",c[i]),children:[n&&(0,s.jsx)(xe,{htmlFor:t,className:fe("m-0",a[i]),...r&&{variant:"disabled"},children:n}),o&&(0,s.jsx)(xe,{tag:"p",variant:"help",className:fe("text-sm font-normal leading-5 m-0",l[i]),...r&&{variant:"disabled"},children:o})]})})()]})},Ce=(0,n.forwardRef)(({id:e,onChange:t,value:r,defaultValue:o=!1,size:i="sm",disabled:a=!1,label:l={heading:"",description:""},name:c,className:u,...d},f)=>{const p="lg"===i?"md":i,h=(0,n.useMemo)(()=>typeof r<"u",[r]),m=(0,n.useMemo)(()=>e||`switch-${be()}`,[]),[g,y]=(0,n.useState)(o),v="primary",b=(0,n.useCallback)(()=>h?r:g,[h,r,g]),x={primary:{input:"bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},w={md:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},sm:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"}};return(0,s.jsx)(we,{label:l,switchId:m,disabled:a,size:p,children:(0,s.jsxs)("div",{className:fe("relative group/switch inline-block cursor-pointer rounded-full shrink-0",w[p].container,u),children:[(0,s.jsx)("input",{ref:f,id:m,type:"checkbox",className:fe("peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",x[v].input,a&&"bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled",!a&&{primary:{input:"group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border"}}[v].input),checked:b(),onChange:e=>{if(a)return;const n=e.target.checked;h||y(n),"function"==typeof t&&t(n)},disabled:a,name:c,...d}),(0,s.jsx)("label",{htmlFor:m,className:fe("peer/toggle-dial bg-white border rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 left-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 before:left-2/4 before:-translate-y-2/4 before:-translate-x-2/4",w[p].toggleDial,x[v].toggleDial,a&&"peer-disabled:cursor-not-allowed",!a&&{md:"group-hover/switch:size-5 group-focus-within/switch:size-5 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5",sm:"group-hover/switch:size-4 group-focus-within/switch:size-4 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5"}[p])})]})})});Ce.displayName="Switch";const _e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ke=(...e)=>e.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ");var Se={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const je=(0,n.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:s,...l},c)=>(0,n.createElement)("svg",{ref:c,...Se,width:t,height:t,stroke:e,strokeWidth:o?24*Number(r)/Number(t):r,className:ke("lucide",i),...l},[...s.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Oe=(e,t)=>{const r=(0,n.forwardRef)(({className:r,...o},i)=>(0,n.createElement)(je,{ref:i,iconNode:t,className:ke(`lucide-${_e(e)}`,r),...o}));return r.displayName=`${e}`,r},Ee=Oe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Pe=Oe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Te=Oe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Me=Oe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Ae=Oe("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Ne=(Oe("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]),Oe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])),De=(Oe("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),Oe("ImageOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]),Oe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])),Ie=Oe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Re=Oe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Le=Oe("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),Fe=Oe("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),Be=Oe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ze=Oe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Ve=Oe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),He=(Oe("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]),Oe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])),We=Oe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),$e=Oe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Ue=Oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),qe=(0,n.forwardRef)(({id:e,label:t,defaultChecked:r=!1,checked:o,onChange:i,indeterminate:a,disabled:l,size:c="md",className:u,...d},f)=>{var p,h;const m=(0,n.useMemo)(()=>e||`checkbox-${be()}`,[e]),g=(0,n.useMemo)(()=>typeof o<"u",[o]),[y,v]=(0,n.useState)(r||!1),b="primary",x={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-sm",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},w={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},C=(0,n.useCallback)(()=>g?o:y,[g,o,y]),_=(0,n.useCallback)(()=>(0,n.isValidElement)(t)?t:null!=t&&t.heading||null!=t&&t.description?(0,s.jsxs)("div",{className:x[c].gap,children:[(null==t?void 0:t.heading)&&(0,s.jsx)(xe,{className:fe("text-text-primary font-medium leading-4 m-0",x[c].text,x[c].gap,l&&"text-text-disabled"),htmlFor:m,children:null==t?void 0:t.heading}),(null==t?void 0:t.description)&&(0,s.jsx)(xe,{tag:"p",className:fe("font-normal leading-5 m-0",x[c].description,l&&"text-text-disabled"),variant:"help",children:null==t?void 0:t.description})]}):null,[t,c,l]);return(0,s.jsxs)("div",{className:fe("inline-flex items-center justify-center gap-2",!!t&&"items-start",l&&"cursor-not-allowed"),children:[(0,s.jsxs)("label",{className:fe("relative flex items-center justify-center rounded-full p-0.5",!l&&"cursor-pointer"),htmlFor:m,children:[(0,s.jsx)("input",{ref:f,id:m,type:"checkbox",className:fe("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",w[b].checkbox,x[c].checkbox,l&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",u),checked:C(),onChange:e=>{if(l)return;const t=e.target.checked;g||v(t),"function"==typeof i&&i(t)},disabled:l,...d}),(0,s.jsx)("span",{className:fe("pointer-events-none inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",w[b].icon,l&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:a?(0,s.jsx)(Re,{className:fe(null==(p=x[c])?void 0:p.icon)}):(0,s.jsx)(Ee,{className:fe(null==(h=x[c])?void 0:h.icon)})})]}),!!t&&_()]})});qe.displayName="Checkbox";const Ye={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},Ke={sm:"text-sm leading-5",md:"text-base leading-6"},Ze={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},Ge={sm:{switch:"mt-1",radio:"mt-0.5"},md:{switch:"mt-0.5",radio:"mt-px"}},Xe={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-1 px-1.5 text-base gap-1 [&>svg]:size-4",md:"py-2 px-2.5 text-base gap-1 [&>svg]:size-5",lg:"py-2.5 px-3 text-base gap-1 [&>svg]:size-6"};function Je(){return typeof window<"u"}function Qe(e){return nt(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tt(e){var t;return null==(t=(nt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function nt(e){return!!Je()&&(e instanceof Node||e instanceof et(e).Node)}function rt(e){return!!Je()&&(e instanceof Element||e instanceof et(e).Element)}function ot(e){return!!Je()&&(e instanceof HTMLElement||e instanceof et(e).HTMLElement)}function it(e){return!(!Je()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof et(e).ShadowRoot)}function at(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function st(e){return["table","td","th"].includes(Qe(e))}function lt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ct(e){const t=ut(),n=rt(e)?ft(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function ut(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function dt(e){return["html","body","#document"].includes(Qe(e))}function ft(e){return et(e).getComputedStyle(e)}function pt(e){return rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if("html"===Qe(e))return e;const t=e.assignedSlot||e.parentNode||it(e)&&e.host||tt(e);return it(t)?t.host:t}function mt(e){const t=ht(e);return dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ot(t)&&at(t)?t:mt(t)}function gt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=mt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=et(o);if(i){const e=yt(a);return t.concat(a,a.visualViewport||[],at(o)?o:[],e&&n?gt(e):[])}return t.concat(o,gt(o,[],n))}function yt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vt(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function bt(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&it(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function xt(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function wt(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function Ct(e){return!(0!==e.mozInputSource||!e.isTrusted)||(St()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function _t(e){return!wt().includes("jsdom/")&&(!St()&&0===e.width&&0===e.height||St()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function kt(){return/apple/i.test(navigator.vendor)}function St(){const e=/android/i;return e.test(xt())||e.test(wt())}function jt(){return xt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Ot(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Et(e){return(null==e?void 0:e.ownerDocument)||document}function Pt(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Tt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Mt(e){return ot(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function At(e){e.preventDefault(),e.stopPropagation()}function Nt(e){return!!e&&"combobox"===e.getAttribute("role")&&Mt(e)}const Dt=Math.min,It=Math.max,Rt=Math.round,Lt=Math.floor,Ft=e=>({x:e,y:e}),Bt={left:"right",right:"left",bottom:"top",top:"bottom"},zt={start:"end",end:"start"};function Vt(e,t,n){return It(e,Dt(t,n))}function Ht(e,t){return"function"==typeof e?e(t):e}function Wt(e){return e.split("-")[0]}function $t(e){return e.split("-")[1]}function Ut(e){return"x"===e?"y":"x"}function qt(e){return"y"===e?"height":"width"}function Yt(e){return["top","bottom"].includes(Wt(e))?"y":"x"}function Kt(e){return Ut(Yt(e))}function Zt(e){return e.replace(/start|end/g,e=>zt[e])}function Gt(e){return e.replace(/left|right|bottom|top/g,e=>Bt[e])}function Xt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Jt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var Qt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),en=typeof Element>"u",tn=en?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,nn=!en&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},rn=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},on=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!rn(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{tn.call(a,Qt)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!rn(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},an=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},sn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!an(e)?0:e.tabIndex},ln=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},cn=function(e){return"INPUT"===e.tagName},un=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},dn=function(e,t){return!(t.disabled||rn(t)||function(e){return cn(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=tn.call(e,"details>summary:first-of-type")?e.parentElement:e;if(tn.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return un(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=nn(e);if(a&&!a.shadowRoot&&!0===r(a))return un(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&nn(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=nn(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!tn.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},fn=function(e,t){return!(function(e){return function(e){return cn(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||nn(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if(typeof window<"u"&&typeof window.CSS<"u"&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||sn(t)<0||!dn(e,t))},pn=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},hn=function e(t){var n=[],r=[];return t.forEach(function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,s=function(e,t){var n=sn(e);return n<0&&t&&!an(e)?0:n}(a,i),l=i?e(t.candidates):a;0===s?i?n.push.apply(n,l):n.push(a):r.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:l})}),r.sort(ln).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},mn=function(e,t){var n;return n=(t=t||{}).getShadowRoot?on([e],t.includeContainer,{filter:fn.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:pn}):function(e,t,n){if(rn(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Qt));return t&&tn.call(e,Qt)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,fn.bind(null,t)),hn(n)};function gn(e,t,n){let{reference:r,floating:o}=e;const i=Yt(t),a=Kt(t),s=qt(a),l=Wt(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch($t(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function yn(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ht(t,e),h=Xt(p),m=s[f?"floating"===d?"reference":"floating":d],g=Jt(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=Jt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-x.top+h.top)/b.y,bottom:(x.bottom-g.bottom+h.bottom)/b.y,left:(g.left-x.left+h.left)/b.x,right:(x.right-g.right+h.right)/b.x}}function vn(e){const t=ft(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ot(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Rt(n)!==i||Rt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function bn(e){return rt(e)?e:e.contextElement}function xn(e){const t=bn(e);if(!ot(t))return Ft(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=vn(t);let a=(i?Rt(n.width):n.width)/r,s=(i?Rt(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const wn=Ft(0);function Cn(e){const t=et(e);return ut()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wn}function kn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=bn(e);let a=Ft(1);t&&(r?rt(r)&&(a=xn(r)):a=xn(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==et(e))&&t}(i,n,r)?Cn(i):Ft(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=et(i),t=r&&rt(r)?et(r):r;let n=e,o=yt(n);for(;o&&r&&t!==n;){const e=xn(o),t=o.getBoundingClientRect(),r=ft(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=et(o),o=yt(n)}}return Jt({width:u,height:d,x:l,y:c})}function Sn(e,t){const n=pt(e).scrollLeft;return t?t.left+n:kn(tt(e)).left+n}function jn(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Sn(e,r)),y:r.top+t.scrollTop}}function On(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=et(e),r=tt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=ut();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=tt(e),n=pt(e),r=e.ownerDocument.body,o=It(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=It(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Sn(e);const s=-n.scrollTop;return"rtl"===ft(r).direction&&(a+=It(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(tt(e));else if(rt(t))r=function(e,t){const n=kn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ot(e)?xn(e):Ft(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Cn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Jt(r)}function En(e,t){const n=ht(e);return!(n===t||!rt(n)||dt(n))&&("fixed"===ft(n).position||En(n,t))}function Pn(e,t){const n=t.get(e);if(n)return n;let r=gt(e,[],!1).filter(e=>rt(e)&&"body"!==Qe(e)),o=null;const i="fixed"===ft(e).position;let a=i?ht(e):e;for(;rt(a)&&!dt(a);){const t=ft(a),n=ct(a);!n&&"fixed"===t.position&&(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||at(a)&&!n&&En(e,a))?r=r.filter(e=>e!==a):o=t,a=ht(a)}return t.set(e,r),r}function Tn(e,t,n){const r=ot(t),o=tt(t),i="fixed"===n,a=kn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ft(0);if(r||!r&&!i)if(("body"!==Qe(t)||at(o))&&(s=pt(t)),r){const e=kn(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Sn(o));const c=!o||r||i?Ft(0):jn(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Mn(e){return"static"===ft(e).position}function An(e,t){if(!ot(e)||"fixed"===ft(e).position)return null;if(t)return t(e);let n=e.offsetParent;return tt(e)===n&&(n=n.ownerDocument.body),n}function Nn(e,t){const n=et(e);if(lt(e))return n;if(!ot(e)){let t=ht(e);for(;t&&!dt(t);){if(rt(t)&&!Mn(t))return t;t=ht(t)}return n}let r=An(e,t);for(;r&&st(r)&&Mn(r);)r=An(r,t);return r&&dt(r)&&Mn(r)&&!ct(r)?n:r||function(e){let t=ht(e);for(;ot(t)&&!dt(t);){if(ct(t))return t;if(lt(t))return null;t=ht(t)}return null}(e)||n}const Dn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=tt(r),s=!!t&<(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ft(1);const u=Ft(0),d=ot(r);if((d||!d&&!i)&&(("body"!==Qe(r)||at(a))&&(l=pt(r)),ot(r))){const e=kn(r);c=xn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?Ft(0):jn(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:tt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?lt(t)?[]:Pn(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((e,n)=>{const r=On(t,n,o);return e.top=It(r.top,e.top),e.right=Dt(r.right,e.right),e.bottom=Dt(r.bottom,e.bottom),e.left=It(r.left,e.left),e},On(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Nn,getElementRects:async function(e){const t=this.getOffsetParent||Nn,n=this.getDimensions,r=await n(e.floating);return{reference:Tn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=vn(e);return{width:t,height:n}},getScale:xn,isElement:rt,isRTL:function(e){return"rtl"===ft(e).direction}};function In(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=bn(e),u=o||i?[...c?gt(c):[],...gt(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=tt(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-Lt(u)+"px "+-Lt(o.clientWidth-(c+d))+"px "+-Lt(o.clientHeight-(u+f))+"px "+-Lt(c)+"px",threshold:It(0,Dt(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout(()=>{a(!1,1e-7)},1e3)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let h,m=l?kn(e):null;return l&&function t(){const r=kn(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const Rn=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Wt(n),s=$t(n),l="y"===Yt(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ht(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Ln=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ht(e,t),c={x:n,y:r},u=await yn(t,l),d=Yt(Wt(o)),f=Ut(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=Vt(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=Vt(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},Fn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Ht(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=Wt(o),v=Yt(s),b=Wt(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[Gt(s)]:function(e){const t=Gt(e);return[Zt(e),t,Zt(t)]}(s)),C="none"!==h;!f&&C&&w.push(...function(e,t,n,r){const o=$t(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(Wt(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Zt)))),i}(s,m,h,x));const _=[s,...w],k=await yn(t,g),S=[];let j=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&S.push(k[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=$t(e),o=Kt(e),i=qt(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Gt(a)),[a,Gt(a)]}(o,a,x);S.push(k[e[0]],k[e[1]])}if(j=[...j,{placement:o,overflows:S}],!S.every(e=>e<=0)){var O,E;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(E=j.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=j.filter(e=>{if(C){const t=Yt(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Bn=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Ht(e,t),u=await yn(t,c),d=Wt(o),f=$t(o),p="y"===Yt(o),{width:h,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,x=Dt(m-u[g],v),w=Dt(h-u[y],b),C=!t.middlewareData.shift;let _=x,k=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(_=v),C&&!f){const e=It(u.left,0),t=It(u.right,0),n=It(u.top,0),r=It(u.bottom,0);p?k=h-2*(0!==e||0!==t?e+t:It(u.left,u.right)):_=m-2*(0!==n||0!==r?n+r:It(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:_});const S=await a.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},zn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ht(e,t)||{};if(null==c)return{};const d=Xt(u),f={x:n,y:r},p=Kt(o),h=qt(p),m=await a.getDimensions(c),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[p]-f[p]-i.floating[h],w=f[p]-i.reference[p],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let _=C?C[b]:0;(!_||!await(null==a.isElement?void 0:a.isElement(C)))&&(_=s.floating[b]||i.floating[h]);const k=x/2-w/2,S=_/2-m[h]/2-1,j=Dt(d[y],S),O=Dt(d[v],S),E=j,P=_-m[h]-O,T=_/2-m[h]/2+k,M=Vt(E,T,P),A=!l.arrow&&null!=$t(o)&&T!==M&&i.reference[h]/2-(T<E?j:O)-m[h]/2<0,N=A?T<E?T-E:T-P:0;return{[p]:f[p]+N,data:{[p]:M,centerOffset:T-M-N,...A&&{alignmentOffset:N}},reset:A}}});var Vn=typeof document<"u"?n.useLayoutEffect:n.useEffect;function Hn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Hn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Hn(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Wn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $n(e,t){const n=Wn(e);return Math.round(t*n)/n}function Un(e){const t=n.useRef(e);return Vn(()=>{t.current=e}),t}const qn=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?zn({element:n.current,padding:r}).fn(t):{}:n?zn({element:n,padding:r}).fn(t):{}}}),Yn=(e,t)=>({...Rn(e),options:[e,t]}),Kn=(e,t)=>({...Ln(e),options:[e,t]}),Zn=(e,t)=>({...Fn(e),options:[e,t]}),Gn=(e,t)=>({...Bn(e),options:[e,t]}),Xn=(e,t)=>({...qn(e),options:[e,t]}),Jn={...r},Qn=Jn.useInsertionEffect||(e=>e());function er(e){const t=n.useRef(()=>{});return Qn(()=>{t.current=e}),n.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}const tr="ArrowUp",nr="ArrowDown",rr="ArrowLeft",or="ArrowRight";function ir(e,t,n){return Math.floor(e/t)!==n}function ar(e,t){return t<0||t>=e.current.length}function sr(e,t){return cr(e,{disabledIndices:t})}function lr(e,t){return cr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function cr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const a=e.current;let s=n;do{s+=r?-i:i}while(s>=0&&s<=a.length-1&&fr(a,s,o));return s}function ur(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function dr(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function fr(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var pr=typeof document<"u"?n.useLayoutEffect:n.useEffect;function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hr.apply(this,arguments)}let mr=!1,gr=0;const yr=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+gr++,vr=Jn.useId||function(){const[e,t]=n.useState(()=>mr?yr():void 0);return pr(()=>{null==e&&t(yr())},[]),n.useEffect(()=>{mr=!0},[]),e},br=n.forwardRef(function(e,t){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...m}={},...g}=e,y=vr(),[v,b]=n.useState(!1);if(pr(()=>{o&&"rtl"===ft(o).direction&&b(!0)},[o]),!o)return null;const[x,w]=r.split("-"),C="top"===x||"bottom"===x;let _=d;(C&&null!=a&&a.x||!C&&null!=a&&a.y)&&(_=null);const k=2*u,S=k/2,j=s/2*(c/-8+1),O=l/2*c/4,E=!!p,P=_&&"end"===w?"bottom":"top";let T=_&&"end"===w?"right":"left";_&&v&&(T="end"===w?"left":"right");const M=null!=(null==i?void 0:i.x)?_||i.x:"",A=null!=(null==i?void 0:i.y)?_||i.y:"",N=p||"M0,0 H"+s+" L"+(s-j)+","+(l-O)+" Q"+s/2+","+l+" "+j+","+(l-O)+" Z",D={top:E?"rotate(180deg)":"",left:E?"rotate(90deg)":"rotate(-90deg)",bottom:E?"":"rotate(180deg)",right:E?"rotate(-90deg)":"rotate(90deg)"}[x];return n.createElement("svg",hr({},g,{"aria-hidden":!0,ref:t,width:E?s:s+k,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[T]:M,[P]:A,[x]:C||E?"100%":"calc(100% - "+k/2+"px)",transform:[D,h].filter(e=>!!e).join(" "),...m}}),k>0&&n.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:N}),n.createElement("path",{stroke:k&&!p?g.fill:"none",d:N}),n.createElement("clipPath",{id:y},n.createElement("rect",{x:-S,y:S*(E?-1:1),width:s+k,height:s})))}),xr=n.createContext(null),wr=n.createContext(null),Cr=()=>{var e;return(null==(e=n.useContext(xr))?void 0:e.id)||null},_r=()=>n.useContext(wr);function kr(e){return"data-floating-ui-"+e}function Sr(e){const t=(0,n.useRef)(e);return pr(()=>{t.current=e}),t}const jr=kr("safe-polygon");function Or(e,t,n){return n&&!Ot(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let Er=0;function Pr(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Er);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Er=requestAnimationFrame(i)}function Tr(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}let Mr=new WeakMap,Ar=new WeakSet,Nr={},Dr=0;const Ir=e=>e&&(e.host||Ir(e.parentNode));function Rr(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=Et(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=((e,t)=>t.map(t=>{if(e.contains(t))return t;const n=Ir(t);return e.contains(n)?n:null}).filter(e=>null!=e))(t,e),s=new Set,l=new Set(a),c=[];Nr[o]||(Nr[o]=new WeakMap);const u=Nr[o];return a.forEach(function e(t){!t||s.has(t)||(s.add(t),t.parentNode&&e(t.parentNode))}),function e(t){!t||l.has(t)||[].forEach.call(t.children,t=>{if("script"!==Qe(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Mr.get(t)||0)+1,a=(u.get(t)||0)+1;Mr.set(t,r),u.set(t,a),c.push(t),1===r&&n&&Ar.add(t),1===a&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}})}(t),s.clear(),Dr++,()=>{c.forEach(e=>{const t=(Mr.get(e)||0)-1,n=(u.get(e)||0)-1;Mr.set(e,t),u.set(e,n),t||(!Ar.has(e)&&i&&e.removeAttribute(i),Ar.delete(e)),n||e.removeAttribute(o)}),Dr--,Dr||(Mr=new WeakMap,Mr=new WeakMap,Ar=new WeakSet,Nr={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Lr=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Fr(e,t){const n=mn(e,Lr());"prev"===t&&n.reverse();const r=n.indexOf(vt(Et(e)));return n.slice(r+1)[0]}function Br(){return Fr(document.body,"next")}function zr(){return Fr(document.body,"prev")}function Vr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function Hr(e){mn(e,Lr()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Wr(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const $r={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Ur(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const qr=n.forwardRef(function(e,t){const[r,o]=n.useState();pr(()=>(kt()&&o("button"),document.addEventListener("keydown",Ur),()=>{document.removeEventListener("keydown",Ur)}),[]);const i={ref:t,tabIndex:0,role:r,"aria-hidden":!r||void 0,[kr("focus-guard")]:"",style:$r};return n.createElement("span",hr({},e,i))}),Yr=n.createContext(null),Kr=kr("portal");function Zr(t){const{children:r,id:o,root:i,preserveTabOrder:a=!0}=t,s=function(e){void 0===e&&(e={});const{id:t,root:r}=e,o=vr(),i=Gr(),[a,s]=n.useState(null),l=n.useRef(null);return pr(()=>()=>{null==a||a.remove(),queueMicrotask(()=>{l.current=null})},[a]),pr(()=>{if(!o||l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=o,n.setAttribute(Kr,""),e.appendChild(n),l.current=n,s(n)},[t,o]),pr(()=>{if(null===r||!o||l.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!rt(e)&&(e=e.current),e=e||document.body;let n=null;t&&(n=document.createElement("div"),n.id=t,e.appendChild(n));const a=document.createElement("div");a.id=o,a.setAttribute(Kr,""),e=n||e,e.appendChild(a),l.current=a,s(a)},[t,r,o,i]),a}({id:o,root:i}),[l,c]=n.useState(null),u=n.useRef(null),d=n.useRef(null),f=n.useRef(null),p=n.useRef(null),h=null==l?void 0:l.modal,m=null==l?void 0:l.open,g=!!l&&!l.modal&&l.open&&a&&!(!i&&!s);return n.useEffect(()=>{if(s&&a&&!h)return s.addEventListener("focusin",e,!0),s.addEventListener("focusout",e,!0),()=>{s.removeEventListener("focusin",e,!0),s.removeEventListener("focusout",e,!0)};function e(e){s&&Vr(e)&&("focusin"===e.type?Wr:Hr)(s)}},[s,a,h]),n.useEffect(()=>{s&&(m||Wr(s))},[m,s]),n.createElement(Yr.Provider,{value:n.useMemo(()=>({preserveTabOrder:a,beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:s,setFocusManagerState:c}),[a,s])},g&&s&&n.createElement(qr,{"data-type":"outside",ref:u,onFocus:e=>{if(Vr(e,s)){var t;null==(t=f.current)||t.focus()}else{const e=zr()||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),g&&s&&n.createElement("span",{"aria-owns":s.id,style:$r}),s&&e.createPortal(r,s),g&&s&&n.createElement(qr,{"data-type":"outside",ref:d,onFocus:e=>{if(Vr(e,s)){var t;null==(t=p.current)||t.focus()}else{const t=Br()||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),null!=l&&l.closeOnFocusOut&&(null==l||l.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const Gr=()=>n.useContext(Yr),Xr="data-floating-ui-focusable";function Jr(e){return e?e.hasAttribute(Xr)?e:e.querySelector("["+Xr+"]")||e:null}let Qr=[];function eo(e){Qr=Qr.filter(e=>e.isConnected);let t=e;if(t&&"body"!==Qe(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==tn.call(e,Qt)&&fn(t,e)}(t,Lr())){const e=mn(t,Lr())[0];e&&(t=e)}Qr.push(t),Qr.length>20&&(Qr=Qr.slice(-20))}}function to(){return Qr.slice().reverse().find(e=>e.isConnected)}const no=n.forwardRef(function(e,t){return n.createElement("button",hr({},e,{type:"button",ref:t,tabIndex:-1,style:$r}))});function ro(e){const{context:t,children:r,disabled:o=!1,order:i=["content"],guards:a=!0,initialFocus:s=0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:f=!0}=e,{open:p,refs:h,nodeId:m,onOpenChange:g,events:y,dataRef:v,floatingId:b,elements:{domReference:x,floating:w}}=t,C="number"==typeof s&&s<0,_=Nt(x)&&C,k=!(typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype)||a,S=Sr(i),j=Sr(s),O=Sr(l),E=_r(),P=Gr(),T=n.useRef(null),M=n.useRef(null),A=n.useRef(!1),N=n.useRef(!1),D=n.useRef(-1),I=null!=P,R=Jr(w),L=er(function(e){return void 0===e&&(e=R),e?mn(e,Lr()):[]}),F=er(e=>{const t=L(e);return S.current.map(e=>x&&"reference"===e?x:R&&"floating"===e?R:t).filter(Boolean).flat()});function B(e){return!o&&d&&u?n.createElement(no,{ref:"start"===e?T:M,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof d?d:"Dismiss"):null}n.useEffect(()=>{if(o||!u)return;function e(e){if("Tab"===e.key){bt(R,vt(Et(R)))&&0===L().length&&!_&&At(e);const t=F(),n=Tt(e);"reference"===S.current[0]&&n===x&&(At(e),e.shiftKey?Pr(t[t.length-1]):Pr(t[1])),"floating"===S.current[1]&&n===R&&e.shiftKey&&(At(e),Pr(t[0]))}}const t=Et(R);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,x,R,u,S,_,L,F]),n.useEffect(()=>{if(!o&&w)return w.addEventListener("focusin",e),()=>{w.removeEventListener("focusin",e)};function e(e){const t=Tt(e),n=L().indexOf(t);-1!==n&&(D.current=n)}},[o,w,L]),n.useEffect(()=>{if(!o&&f)return w&&ot(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),w.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),w.removeEventListener("focusout",t)}):void 0;function e(){N.current=!0,setTimeout(()=>{N.current=!1})}function t(e){const t=e.relatedTarget;queueMicrotask(()=>{const n=!(bt(x,t)||bt(w,t)||bt(t,w)||bt(null==P?void 0:P.portalNode,t)||null!=t&&t.hasAttribute(kr("focus-guard"))||E&&(Tr(E.nodesRef.current,m).find(e=>{var n,r;return bt(null==(n=e.context)?void 0:n.elements.floating,t)||bt(null==(r=e.context)?void 0:r.elements.domReference,t)})||function(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){const t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(E.nodesRef.current,m).find(e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t})));if(c&&n&&vt(Et(R))===Et(R).body){ot(R)&&R.focus();const e=D.current,t=L(),n=t[e]||t[t.length-1]||R;ot(n)&&n.focus()}(_||!u)&&t&&n&&!N.current&&t!==to()&&(A.current=!0,g(!1,e,"focus-out"))})}},[o,x,w,R,u,m,E,P,g,f,c,L,_]),n.useEffect(()=>{var e;if(o)return;const t=Array.from((null==P||null==(e=P.portalNode)?void 0:e.querySelectorAll("["+kr("portal")+"]"))||[]);if(w){const e=[w,...t,T.current,M.current,S.current.includes("reference")||_?x:null].filter(e=>null!=e),n=u||_?Rr(e,k,!k):Rr(e);return()=>{n()}}},[o,x,w,u,S,P,_,k]),pr(()=>{if(o||!ot(R))return;const e=vt(Et(R));queueMicrotask(()=>{const t=F(R),n=j.current,r=("number"==typeof n?t[n]:n.current)||R,o=bt(R,e);!C&&!o&&p&&Pr(r,{preventScroll:r===R})})},[o,p,R,C,F,j]),pr(()=>{if(o||!R)return;let e=!1;const t=Et(R),n=vt(t);let r=v.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:a}=t;n&&(r=i),"escape-key"===o&&h.domReference.current&&eo(h.domReference.current),"hover"===o&&"mouseleave"===i.type&&(A.current=!0),"outside-press"===o&&(a?(A.current=!1,e=!0):A.current=!(Ct(i)||_t(i)))}eo(n),y.on("openchange",i);const a=t.createElement("span");return a.setAttribute("tabindex","-1"),a.setAttribute("aria-hidden","true"),Object.assign(a.style,$r),I&&x&&x.insertAdjacentElement("afterend",a),()=>{y.off("openchange",i);const n=vt(t),o=bt(w,n)||E&&Tr(E.nodesRef.current,m).some(e=>{var t;return bt(null==(t=e.context)?void 0:t.elements.floating,n)});(o||r&&["click","mousedown"].includes(r.type))&&h.domReference.current&&eo(h.domReference.current);const s="boolean"==typeof O.current?to()||a:O.current.current||a;queueMicrotask(()=>{O.current&&!A.current&&ot(s)&&(!(s!==n&&n!==t.body)||o)&&s.focus({preventScroll:e}),a.remove()})}},[o,w,R,O,v,h,y,E,m,I,x]),n.useEffect(()=>{queueMicrotask(()=>{A.current=!1})},[o]),pr(()=>{if(!o&&P)return P.setFocusManagerState({modal:u,closeOnFocusOut:f,open:p,onOpenChange:g,refs:h}),()=>{P.setFocusManagerState(null)}},[o,P,u,p,g,h,f]),pr(()=>{if(o||!R||"function"!=typeof MutationObserver||C)return;const e=()=>{const e=R.getAttribute("tabindex"),t=L(),n=vt(Et(w)),r=t.indexOf(n);-1!==r&&(D.current=r),S.current.includes("floating")||n!==h.domReference.current&&0===t.length?"0"!==e&&R.setAttribute("tabindex","0"):"-1"!==e&&R.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(R,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[o,w,R,h,S,L,C]);const z=!o&&k&&(!u||!_)&&(I||u);return n.createElement(n.Fragment,null,z&&n.createElement(qr,{"data-type":"inside",ref:null==P?void 0:P.beforeInsideRef,onFocus:e=>{if(u){const e=F();Pr("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(A.current=!1,Vr(e,P.portalNode)){const e=Br()||x;null==e||e.focus()}else{var t;null==(t=P.beforeOutsideRef.current)||t.focus()}}}),!_&&B("start"),r,B("end"),z&&n.createElement(qr,{"data-type":"inside",ref:null==P?void 0:P.afterInsideRef,onFocus:e=>{if(u)Pr(F()[0]);else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(f&&(A.current=!0),Vr(e,P.portalNode)){const e=zr()||x;null==e||e.focus()}else{var t;null==(t=P.afterOutsideRef.current)||t.focus()}}}))}function oo(e){return ot(e.target)&&"BUTTON"===e.target.tagName}function io(e){return Mt(e)}function ao(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,dataRef:i,elements:{domReference:a}}=e,{enabled:s=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=t,p=n.useRef(),h=n.useRef(!1),m=n.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==l&&(Ot(t,!0)&&u||(!r||!c||i.current.openEvent&&f&&"mousedown"!==i.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===l&&p.current?p.current=void 0:Ot(t,!0)&&u||(!r||!c||i.current.openEvent&&f&&"click"!==i.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,!e.defaultPrevented&&d&&!oo(e)&&(" "===e.key&&!io(a)&&(e.preventDefault(),h.current=!0),"Enter"===e.key&&o(!(r&&c),e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||oo(e)||io(a)||" "===e.key&&h.current&&(h.current=!1,o(!(r&&c),e.nativeEvent,"click"))}}),[i,a,l,u,d,o,r,f,c]);return n.useMemo(()=>s?{reference:m}:{},[s,m])}const so={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},lo={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},co=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function uo(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,elements:i,dataRef:a}=e,{enabled:s=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:m}=t,g=_r(),y=er("function"==typeof c?c:()=>!1),v="function"==typeof c?y:c,b=n.useRef(!1),x=n.useRef(!1),{escapeKey:w,outsidePress:C}=co(h),{escapeKey:_,outsidePress:k}=co(m),S=n.useRef(!1),j=er(e=>{var t;if(!r||!s||!l||"Escape"!==e.key||S.current)return;const n=null==(t=a.current.floatingContext)?void 0:t.nodeId,i=g?Tr(g.nodesRef.current,n):[];if(!w&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),O=er(e=>{var t;const n=()=>{var t;j(e),null==(t=Tt(e))||t.removeEventListener("keydown",n)};null==(t=Tt(e))||t.addEventListener("keydown",n)}),E=er(e=>{var t;const n=b.current;b.current=!1;const r=x.current;if(x.current=!1,"click"===u&&r||n||"function"==typeof v&&!v(e))return;const s=Tt(e),l="["+kr("inert")+"]",c=Et(i.floating).querySelectorAll(l);let d=rt(s)?s:null;for(;d&&!dt(d);){const e=ht(d);if(dt(e)||!rt(e))break;d=e}if(c.length&&rt(s)&&!function(e){return e.matches("html,body")}(s)&&!bt(s,i.floating)&&Array.from(c).every(e=>!bt(d,e)))return;if(ot(s)&&M){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===ft(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const f=null==(t=a.current.floatingContext)?void 0:t.nodeId,p=g&&Tr(g.nodesRef.current,f).some(t=>{var n;return Pt(e,null==(n=t.context)?void 0:n.elements.floating)});if(Pt(e,i.floating)||Pt(e,i.domReference)||p)return;const h=g?Tr(g.nodesRef.current,f):[];if(h.length>0){let e=!0;if(h.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),P=er(e=>{var t;const n=()=>{var t;E(e),null==(t=Tt(e))||t.removeEventListener(u,n)};null==(t=Tt(e))||t.addEventListener(u,n)});n.useEffect(()=>{if(!r||!s)return;a.current.__escapeKeyBubbles=w,a.current.__outsidePressBubbles=C;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout(()=>{S.current=!1},ut()?5:0)}const d=Et(i.floating);l&&(d.addEventListener("keydown",_?O:j,_),d.addEventListener("compositionstart",n),d.addEventListener("compositionend",c)),v&&d.addEventListener(u,k?P:E,k);let f=[];return p&&(rt(i.domReference)&&(f=gt(i.domReference)),rt(i.floating)&&(f=f.concat(gt(i.floating))),!rt(i.reference)&&i.reference&&i.reference.contextElement&&(f=f.concat(gt(i.reference.contextElement)))),f=f.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),f.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{l&&(d.removeEventListener("keydown",_?O:j,_),d.removeEventListener("compositionstart",n),d.removeEventListener("compositionend",c)),v&&d.removeEventListener(u,k?P:E,k),f.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[a,i,l,v,u,r,o,p,s,w,C,j,_,O,E,k,P]),n.useEffect(()=>{b.current=!1},[v,u]);const T=n.useMemo(()=>({onKeyDown:j,[so[f]]:e=>{d&&o(!1,e.nativeEvent,"reference-press")}}),[j,o,d,f]),M=n.useMemo(()=>({onKeyDown:j,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[lo[u]]:()=>{b.current=!0}}),[j,u]);return n.useMemo(()=>s?{reference:T,floating:M}:{},[s,T,M])}function fo(t){void 0===t&&(t={});const{nodeId:r}=t,o=function(e){const{open:t=!1,onOpenChange:r,elements:o}=e,i=vr(),a=n.useRef({}),[s]=n.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}}()),l=null!=Cr(),[c,u]=n.useState(o.reference),d=er((e,t,n)=>{a.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==r||r(e,t,n)}),f=n.useMemo(()=>({setPositionReference:u}),[]),p=n.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return n.useMemo(()=>({dataRef:a,open:t,onOpenChange:d,elements:p,events:s,floatingId:i,refs:f}),[t,d,p,s,i,f])}({...t,elements:{reference:null,floating:null,...t.elements}}),i=t.rootContext||o,a=i.elements,[s,l]=n.useState(null),[c,u]=n.useState(null),d=(null==a?void 0:a.domReference)||s,f=n.useRef(null),p=_r();pr(()=>{d&&(f.current=d)},[d]);const h=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=t,[f,p]=n.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[h,m]=n.useState(i);Hn(h,i)||m(i);const[g,y]=n.useState(null),[v,b]=n.useState(null),x=n.useCallback(e=>{e!==k.current&&(k.current=e,y(e))},[]),w=n.useCallback(e=>{e!==S.current&&(S.current=e,b(e))},[]),C=s||g,_=l||v,k=n.useRef(null),S=n.useRef(null),j=n.useRef(f),O=null!=u,E=Un(u),P=Un(a),T=Un(d),M=n.useCallback(()=>{if(!k.current||!S.current)return;const t={placement:r,strategy:o,middleware:h};P.current&&(t.platform=P.current),((e,t,n)=>{const r=new Map,o={platform:Dn,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=gn(c,r,l),f=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y,data:v,reset:b}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=g??u,d=y??d,p={...p,[i]:{...p[i],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=gn(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})})(k.current,S.current,t).then(t=>{const n={...t,isPositioned:!1!==T.current};A.current&&!Hn(j.current,n)&&(j.current=n,e.flushSync(()=>{p(n)}))})},[h,r,o,P,T]);Vn(()=>{!1===d&&j.current.isPositioned&&(j.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const A=n.useRef(!1);Vn(()=>(A.current=!0,()=>{A.current=!1}),[]),Vn(()=>{if(C&&(k.current=C),_&&(S.current=_),C&&_){if(E.current)return E.current(C,_,M);M()}},[C,_,M,E,O]);const N=n.useMemo(()=>({reference:k,floating:S,setReference:x,setFloating:w}),[x,w]),D=n.useMemo(()=>({reference:C,floating:_}),[C,_]),I=n.useMemo(()=>{const e={position:o,left:0,top:0};if(!D.floating)return e;const t=$n(D.floating,f.x),n=$n(D.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...Wn(D.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}},[o,c,D.floating,f.x,f.y]);return n.useMemo(()=>({...f,update:M,refs:N,elements:D,floatingStyles:I}),[f,M,N,D,I])}({...t,elements:{...a,...c&&{reference:c}}}),m=n.useCallback(e=>{const t=rt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),h.refs.setReference(t)},[h.refs]),g=n.useCallback(e=>{(rt(e)||null===e)&&(f.current=e,l(e)),(rt(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!rt(e))&&h.refs.setReference(e)},[h.refs]),y=n.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:f}),[h.refs,g,m]),v=n.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=n.useMemo(()=>({...h,...i,refs:y,elements:v,nodeId:r}),[h,y,v,r,i]);return pr(()=>{i.dataRef.current.floatingContext=b;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===r);e&&(e.context=b)}),n.useMemo(()=>({...h,context:b,refs:y,elements:v}),[h,y,v,b])}const po="active",ho="selected";function mo(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[po]:t,[ho]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Xr]:""},...i,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,i]=t;if(!o||![po,ho].includes(n))if(0===n.indexOf("on")){var a;r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})}else e[n]=i}),e),{})}}function go(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),r=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),i=n.useCallback(t=>mo(t,e,"reference"),t),a=n.useCallback(t=>mo(t,e,"floating"),r),s=n.useCallback(t=>mo(t,e,"item"),o);return n.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:s}),[i,a,s])}let yo=!1;function vo(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function bo(e,t){return vo(t,e===tr||e===nr,e===rr||e===or)}function xo(e,t,n){return vo(t,e===nr,n?e===rr:e===or)||"Enter"===e||" "===e||""===e}function wo(e,t,n){return vo(t,n?e===or:e===rr,e===tr)}const Co=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function _o(e,t){var r;void 0===t&&(t={});const{open:o,floatingId:i}=e,{enabled:a=!0,role:s="dialog"}=t,l=null!=(r=Co.get(s))?r:s,c=vr(),u=null!=Cr(),d=n.useMemo(()=>"tooltip"===l||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":o?i:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:c},..."menu"===l&&u&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[l,i,u,o,c,s]),f=n.useMemo(()=>{const e={id:i,...l&&{role:l}};return"tooltip"===l||"label"===s?e:{...e,..."menu"===l&&{"aria-labelledby":c}}},[l,i,c,s]),p=n.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(s){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}},[i,s]);return n.useMemo(()=>a?{reference:d,floating:f,item:p}:{},[a,d,f,p])}const ko=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function So(e,t){return"function"==typeof e?e(t):e}function jo(e,t){void 0===t&&(t={});const{initial:r={opacity:0},open:o,close:i,common:a,duration:s=250}=t,l=e.placement,c=l.split("-")[0],u=n.useMemo(()=>({side:c,placement:l}),[c,l]),d="number"==typeof s,f=(d?s:s.open)||0,p=(d?s:s.close)||0,[h,m]=n.useState(()=>({...So(a,u),...So(r,u)})),{isMounted:g,status:y}=function(e,t){void 0===t&&(t={});const{open:r,elements:{floating:o}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[s,l]=n.useState("unmounted"),c=function(e,t){const[r,o]=n.useState(e);return e&&!r&&o(!0),n.useEffect(()=>{if(!e&&r){const e=setTimeout(()=>o(!1),t);return()=>clearTimeout(e)}},[e,r,t]),r}(r,a);return!c&&"close"===s&&l("unmounted"),pr(()=>{if(o){if(r){l("initial");const e=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(e)}}l("close")}},[r,o]),{isMounted:c,status:s}}(e,{duration:s}),v=Sr(r),b=Sr(o),x=Sr(i),w=Sr(a);return pr(()=>{const e=So(v.current,u),t=So(x.current,u),n=So(w.current,u),r=So(b.current,u)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===y&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===y&&m({transitionProperty:Object.keys(r).map(ko).join(","),transitionDuration:f+"ms",...n,...r}),"close"===y){const r=t||e;m({transitionProperty:Object.keys(r).map(ko).join(","),transitionDuration:p+"ms",...n,...r})}},[p,x,v,b,w,f,y,u]),{isMounted:g,styles:h}}function Oo(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e<i;a=e++){const[i,s]=t[e]||[0,0],[l,c]=t[a]||[0,0];s>=r!=c>=r&&n<=(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}function Eo(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:f,nodeId:p,tree:h}=e;return function(e){function m(){clearTimeout(o),f()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:g,clientY:y}=e,v=[g,y],b=Tt(e),x="mouseleave"===e.type,w=bt(d.floating,b),C=bt(d.domReference,b),_=d.domReference.getBoundingClientRect(),k=d.floating.getBoundingClientRect(),S=u.split("-")[0],j=n>k.right-k.width/2,O=c>k.bottom-k.height/2,E=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(v,_),P=k.width>_.width,T=k.height>_.height,M=(P?_:k).left,A=(P?_:k).right,N=(T?_:k).top,D=(T?_:k).bottom;if(w&&(i=!0,!x))return;if(C&&(i=!1),C&&!x)return void(i=!0);if(x&&rt(e.relatedTarget)&&bt(d.floating,e.relatedTarget)||h&&Tr(h.nodesRef.current,p).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===S&&c>=_.bottom-1||"bottom"===S&&c<=_.top+1||"left"===S&&n>=_.right-1||"right"===S&&n<=_.left+1)return m();let I=[];switch(S){case"top":I=[[M,_.top+1],[M,k.bottom-1],[A,k.bottom-1],[A,_.top+1]];break;case"bottom":I=[[M,k.top+1],[M,_.bottom-1],[A,_.bottom-1],[A,k.top+1]];break;case"left":I=[[k.right-1,D],[k.right-1,N],[_.left+1,N],[_.left+1,D]];break;case"right":I=[[_.right-1,D],[_.right-1,N],[k.left+1,N],[k.left+1,D]]}if(!Oo([g,y],I)){if(i&&!E)return m();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===a||null===s||0===r)return a=e,s=t,l=n,null;const o=e-a,i=t-s,c=Math.sqrt(o*o+i*i)/r;return a=e,s=t,l=n,c}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}Oo([g,y],function(e){let[n,r]=e;switch(S){case"top":return[[P?n+t/2:j?n+4*t:n-4*t,r+t+1],[P?n-t/2:j?n+4*t:n-4*t,r+t+1],[k.left,j||P?k.bottom-t:k.top],[k.right,j?P?k.bottom-t:k.top:k.bottom-t]];case"bottom":return[[P?n+t/2:j?n+4*t:n-4*t,r-t],[P?n-t/2:j?n+4*t:n-4*t,r-t],[k.left,j||P?k.top+t:k.bottom],[k.right,j?P?k.top+t:k.bottom:k.top+t]];case"left":{const e=[n+t+1,T?r+t/2:O?r+4*t:r-4*t],o=[n+t+1,T?r-t/2:O?r+4*t:r-4*t];return[[O||T?k.right-t:k.left,k.top],[O?T?k.right-t:k.left:k.right-t,k.bottom],e,o]}case"right":return[[n-t,T?r+t/2:O?r+4*t:r-4*t],[n-t,T?r-t/2:O?r+4*t:r-4*t],[O||T?k.left+t:k.right,k.top],[O?T?k.left+t:k.right:k.left+t,k.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(m,40)):m()}}};return c.__options={blockPointerEvents:n},c}const Po="light",To="neutral",Mo=({icon:e,theme:t=Po,variant:r=To})=>{var o;const i="[&>svg]:h-5 [&>svg]:w-5",a=(({theme:e=Po,variant:t=To})=>{let n="light"===e?"text-icon-secondary":"text-icon-inverse";return n={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||n,n})({theme:t,variant:r});if(e&&(0,n.isValidElement)(e))return(0,n.cloneElement)(e,{className:fe(i,a,(null==(o=null==e?void 0:e.props)?void 0:o.className)??"")});const l={neutral:(0,s.jsx)(De,{className:fe(i,a)}),info:(0,s.jsx)(De,{className:fe(i,a)}),success:(0,s.jsx)(Ee,{className:fe(i,a)}),warning:(0,s.jsx)(He,{className:fe(i,a)}),error:(0,s.jsx)(Ve,{className:fe(i,a)})};return l[r]||l.neutral},Ao=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=Po})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let i="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===r&&(i="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,s.jsx)(ve,{variant:"outline",size:"xs",onClick:t,className:fe("rounded",o,i,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,s.jsx)(ve,{variant:"link",size:"xs",onClick:t,className:fe(o,i),children:n});default:return null}},No=({theme:e=Po,title:t="",inline:n=!1})=>t?(0,s.jsx)("span",{className:fe("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,Do=({theme:e=Po,content:t="",inline:n=!1})=>t?(0,s.jsx)("span",{className:fe({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal",n?"inline":"block"),children:t}):null,Io=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},Ro=({variant:e="dark",placement:t="bottom",title:r="",content:o,arrow:i=!1,open:a,setOpen:l,children:c,className:u,tooltipPortalRoot:d,tooltipPortalId:f,boundary:p="clippingAncestors",strategy:h="fixed",offset:m=8,triggers:g=["hover","focus"],interactive:y=!1})=>{const v=(0,n.useMemo)(()=>"boolean"==typeof a&&"function"==typeof l,[a,l]),[b,x]=(0,n.useState)(!1),w=(0,n.useRef)(null),{refs:C,floatingStyles:_,context:k}=fo({open:v?a:b,onOpenChange:v?l:x,placement:t,strategy:h,middleware:[Yn(m),Zn({boundary:p}),Kn({boundary:p}),Xn({element:w})],whileElementsMounted:In}),S=ao(k,{enabled:!v&&g.includes("click")}),j=function(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,dataRef:i,events:a,elements:s}=e,{enabled:l=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:p=!0}=t,h=_r(),m=Cr(),g=Sr(u),y=Sr(c),v=Sr(r),b=n.useRef(),x=n.useRef(-1),w=n.useRef(),C=n.useRef(-1),_=n.useRef(!0),k=n.useRef(!1),S=n.useRef(()=>{}),j=n.useRef(!1),O=n.useCallback(()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[i]);n.useEffect(()=>{if(l)return a.on("openchange",e),()=>{a.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(C.current),_.current=!0,j.current=!1)}},[l,a]),n.useEffect(()=>{if(!l||!g.current||!r)return;function e(e){O()&&o(!1,e,"hover")}const t=Et(s.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[s.floating,r,o,l,g,O]);const E=n.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=Or(y.current,"close",b.current);r&&!w.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(clearTimeout(x.current),o(!1,e,n))},[y,o]),P=er(()=>{S.current(),w.current=void 0}),T=er(()=>{if(k.current){const e=Et(s.floating).body;e.style.pointerEvents="",e.removeAttribute(jr),k.current=!1}}),M=er(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));n.useEffect(()=>{if(l&&rt(s.domReference)){var e;const o=s.domReference;return r&&o.addEventListener("mouseleave",a),null==(e=s.floating)||e.addEventListener("mouseleave",a),p&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",n),()=>{var e;r&&o.removeEventListener("mouseleave",a),null==(e=s.floating)||e.removeEventListener("mouseleave",a),p&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",n)}}function t(e){if(clearTimeout(x.current),_.current=!1,d&&!Ot(b.current)||f>0&&!Or(y.current,"open"))return;const t=Or(y.current,"open",b.current);t?x.current=window.setTimeout(()=>{v.current||o(!0,e,"hover")},t):r||o(!0,e,"hover")}function n(e){if(M())return;S.current();const t=Et(s.floating);if(clearTimeout(C.current),j.current=!1,g.current&&i.current.floatingContext){r||clearTimeout(x.current),w.current=g.current({...i.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),P(),M()||E(e,!0,"safe-polygon")}});const n=w.current;return t.addEventListener("mousemove",n),void(S.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==b.current||!bt(s.floating,e.relatedTarget))&&E(e)}function a(e){M()||i.current.floatingContext&&(null==g.current||g.current({...i.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),P(),M()||E(e)}})(e))}},[s,l,e,d,f,p,E,P,T,o,r,v,h,y,g,i,M]),pr(()=>{var e;if(l&&r&&null!=(e=g.current)&&e.__options.blockPointerEvents&&O()){k.current=!0;const e=s.floating;if(rt(s.domReference)&&e){var t;const n=Et(s.floating).body;n.setAttribute(jr,"");const r=s.domReference,o=null==h||null==(t=h.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[l,r,m,s,h,g,O]),pr(()=>{r||(b.current=void 0,j.current=!1,P(),T())},[r,P,T]),n.useEffect(()=>()=>{P(),clearTimeout(x.current),clearTimeout(C.current),T()},[l,s.domReference,P,T]);const A=n.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){!_.current&&!v.current&&o(!0,t,"hover")}d&&!Ot(b.current)||r||0===f||j.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(C.current),"touch"===b.current?n():(j.current=!0,C.current=window.setTimeout(n,f)))}}},[d,o,r,v,f]),N=n.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){M()||E(e.nativeEvent,!1)}}),[E,M]);return n.useMemo(()=>l?{reference:A,floating:N}:{},[l,A,N])}(k,{move:!1,enabled:!v&&g.includes("hover"),...y&&{handleClose:Eo()}}),O=function(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,events:i,dataRef:a,elements:s}=e,{enabled:l=!0,visibleOnly:c=!0}=t,u=n.useRef(!1),d=n.useRef(),f=n.useRef(!0);n.useEffect(()=>{if(!l)return;const e=et(s.domReference);function t(){!r&&ot(s.domReference)&&s.domReference===vt(Et(s.domReference))&&(u.current=!0)}function n(){f.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",n,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",n,!0)}},[s.domReference,r,l]),n.useEffect(()=>{if(l)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:t}=e;("reference-press"===t||"escape-key"===t)&&(u.current=!0)}},[i,l]),n.useEffect(()=>()=>{clearTimeout(d.current)},[]);const p=n.useMemo(()=>({onPointerDown(e){_t(e.nativeEvent)||(f.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=Tt(e.nativeEvent);if(c&&rt(t))try{if(kt()&&jt())throw Error();if(!t.matches(":focus-visible"))return}catch{if(!f.current&&!Mt(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=rt(t)&&t.hasAttribute(kr("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout(()=>{var e;const i=vt(s.domReference?s.domReference.ownerDocument:document);!t&&i===s.domReference||bt(null==(e=a.current.floatingContext)?void 0:e.refs.floating.current,i)||bt(s.domReference,i)||r||o(!1,n,"focus")})}}),[a,s.domReference,o,c]);return n.useMemo(()=>l?{reference:p}:{},[l,p])}(k,{enabled:!v&&g.includes("focus")}),E=uo(k),P=_o(k,{role:"tooltip"}),{getReferenceProps:T,getFloatingProps:M}=go([S,j,O,E,P]),{isMounted:A,styles:N}=jo(k,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),D={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],I="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";return(0,s.jsxs)(n.Fragment,{children:[(0,n.isValidElement)(c)&&(0,s.jsx)(n.Fragment,{children:(0,n.cloneElement)(c,{ref:Io(c.ref,C.setReference),className:fe(c.props.className),...T()})},"tooltip-reference"),(0,s.jsx)(Zr,{id:f,root:d,children:A&&(0,s.jsxs)("div",{className:fe("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",D,"max-w-80 w-fit",u),ref:C.setFloating,style:{..._,...N},...M(),children:[(0,s.jsxs)("div",{children:[!!r&&(0,s.jsx)("span",{className:"font-semibold",children:r},"tooltip-title"),!!o&&(0,s.jsx)("div",{className:"font-normal",children:o},"tooltip-content")]}),i&&(0,s.jsx)(br,{ref:w,context:k,className:fe("fill-current",I)})]})})]})};Ro.displayName="Tooltip";const Lo=(0,n.createContext)({}),Fo=()=>(0,n.useContext)(Lo),Bo=({children:e,name:t,style:r="simple",size:o="md",value:i,defaultValue:a,by:l="id",as:c="div",onChange:u,className:d,disableGroup:f=!1,vertical:p=!1,columns:h=4,multiSelection:m=!1,gapClassName:g="gap-2"})=>{const y=(0,n.useMemo)(()=>typeof i<"u",[i]),v=(0,n.useMemo)(()=>t||`radio-button-group-${be()}`,[t]);let b;b=y?i:m?a??[]:a;const[x,w]=(0,n.useState)(b),C=(0,n.useCallback)(e=>{if(m)w(t=>{let n;return n=Array.isArray(t)&&"string"==typeof e&&t.includes(e)?t.filter(t=>t!==e):[...Array.isArray(t)?t:[],..."string"==typeof e?[e]:[]],"function"==typeof u&&u(n),n});else{if(y||w(e),"function"!=typeof u)return;u(e)}},[u]);d=fe("grid grid-cols-4",me[h],g,"tile"===r&&"gap-0",p&&"grid-cols-1",d);const _=fe("tile"===r?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",d),k=()=>(0,s.jsx)(Lo.Provider,{value:{name:v,value:y?i:x,by:l,onChange:C,isControlled:y,disableAll:f,style:r,columns:h,multiSelection:m,size:o},children:n.Children.map(e,e=>(0,n.isValidElement)(e)?e:null)});return(0,s.jsx)(s.Fragment,{children:"tile"===r?(0,s.jsx)("div",{className:_,children:k()}):(0,s.jsx)(c,{...c===n.Fragment?{}:{className:d},children:k()})})};Bo.displayName="RadioButton.Group";const zo=(0,n.forwardRef)(({id:e,label:t,value:r,children:o,disabled:i,icon:a=null,inlineIcon:l=!1,hideSelection:c=!1,reversePosition:u=!1,borderOn:d=!1,borderOnActive:f=!0,badgeItem:p=null,useSwitch:h=!1,info:m,minWidth:g=!0,...y},v)=>{var b,x;const{buttonWrapperClasses:w,...C}=y,_=Fo(),{name:k,value:S,by:j,onChange:O,disableAll:E,checked:P,multiSelection:T,size:M="md"}=_,A="primary",N=(0,n.useMemo)(()=>e||`radio-button-${be()}`,[e]),D=(0,n.useMemo)(()=>E||i,[E,i]),I=(0,n.useMemo)(()=>T?Array.isArray(S)&&S.includes(r):typeof P<"u"?P:typeof S==typeof r&&("string"==typeof S?S===r:Array.isArray(S)?S.includes(r):S[j]===r[j]),[S,r,P]),R=(0,n.useCallback)(()=>(0,n.isValidElement)(t)?t:null!=t&&t.heading?(0,s.jsxs)("div",{className:fe(!l&&"space-y-1.5 mt-[2px]",u&&(h?"ml-10":"ml-4"),l&&"flex gap-2",l&&!t.description&&"items-center"),children:[a&&(0,s.jsx)(s.Fragment,{children:a}),(0,s.jsxs)("div",{className:fe("space-y-1.5"),children:[(0,s.jsx)("p",{className:fe("text-text-primary font-medium m-0",Ke[M],i&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&(0,s.jsx)("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null,[t]);if("tile"===_.style)return(0,s.jsx)(Vo,{id:e,label:t,value:r,disabled:i,size:M,children:o});const L=()=>{D||(T?h&&O(r,!I):O(r))};return(0,s.jsxs)("label",{className:fe("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",g&&"min-w-[180px]",d&&"border border-border-subtle border-solid rounded-md shadow-sm hover:ring-2 hover:ring-border-interactive",f&&d&&I&&"ring-2 ring-border-interactive","sm"===M?"px-3 py-3":"px-4 py-4","pr-12",D&&"cursor-not-allowed opacity-40",w),htmlFor:N,onClick:L,children:[!!t&&(0,s.jsx)("label",{className:fe("cursor-pointer",D&&"cursor-not-allowed"),htmlFor:N,children:R()}),!!m&&(0,s.jsx)("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:(0,s.jsx)(Ro,{title:null==m?void 0:m.heading,content:null==m?void 0:m.description,children:(0,s.jsx)(De,{className:fe("text-text-primary",null==(b=Ze[M])?void 0:b.info)})})}),(0,s.jsxs)("label",{className:fe("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",u&&"left-0",D&&"cursor-not-allowed",l&&"mr-3",h?Ge[M].switch:Ge[M].radio),onClick:L,children:[!!p&&p,!c&&(h?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Ce,{defaultValue:!1,size:M,onChange:()=>{T?O(r,!I):O(r)},checked:I,...C,"aria-label":(null==t?void 0:t.heading)??"Switch"})}):(0,s.jsxs)("span",{className:"relative p-0.5",children:[(0,s.jsx)("input",{ref:v,id:N,type:T?"checkbox":"radio",className:fe("peer flex relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",!T&&"rounded-full",Ye[A].checkbox,Ze[M].checkbox,D&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed"),name:k,value:r,onChange:e=>O(e.target.value),checked:I,disabled:D,...C}),(0,s.jsx)("span",{className:fe("inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",Ye[A].icon,D&&"peer-disabled:text-border-disabled cursor-not-allowed"),children:T?(0,s.jsx)(Ee,{className:"sm"===M?"size-3":"size-4"}):(0,s.jsx)("div",{className:fe("rounded-full bg-current","sm"===M&&"mt-[0.5px]",null==(x=Ze[M])?void 0:x.icon)})})]}))]})]})});zo.displayName="RadioButton.Button";const Vo=({id:e,children:t,value:r,disabled:o,size:i="md",...a})=>{const l=Fo(),{name:c,value:u,by:d,onChange:f,disableAll:p,checked:h}=l||{},m=(0,n.useMemo)(()=>e||`radio-button-${be()}`,[e]),g=(0,n.useMemo)(()=>p||o,[p,o]),y=(0,n.useMemo)(()=>typeof h<"u"?h:typeof u==typeof r&&("string"==typeof u?u===r:Array.isArray(u)?u.includes(r):!(!u||!d)&&u[d]===r[d]),[u,r,h,d]),v=fe("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",g?"text-text-disabled cursor-not-allowed":"",Xe[i],"border-0 border-r border-border-subtle border-solid");return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("button",{type:"button",id:m,"aria-label":"Radio Button",className:fe(v,"first:rounded-tl first:rounded-bl first:border-0 first:border-r first:border-border-subtle last:rounded-tr last:rounded-br last:border-0",y&&"bg-button-disabled"),onClick:()=>{f&&f(r)},disabled:g,...a,children:[(0,s.jsx)("input",{type:"hidden",value:r,name:c,checked:y,onChange:e=>null==f?void 0:f(e.target.value)}),t]})})},Ho=(Object.assign(zo,{Group:Bo,Button:zo}),(0,n.forwardRef)(({label:e="",size:t="sm",className:n="",type:r="pill",variant:o="neutral",icon:i=null,disabled:a=!1,onClose:l=()=>{},closable:c=!1,onMouseDown:u=()=>{},disableHover:d=!1},f)=>{const p={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let h="",m="group relative justify-center flex items-center cursor-pointer";const g={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(h=p.disabled,m+=" cursor-not-allowed disabled"):h=p[o],e?(0,s.jsxs)("span",{className:fe("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[t],{pill:"rounded-full",rounded:"rounded"}[r],"gap-0.5",h,!d&&{neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"}[o],n),ref:f,children:[i?(0,s.jsx)("span",{className:fe("justify-center flex items-center",g[t]),children:i}):null,(0,s.jsx)("span",{className:"px-1 truncate inline-block",children:e}),c&&(0,s.jsxs)("span",{className:fe(m,g[t]),onMouseDown:u,role:"button",tabIndex:0,...!a&&{onClick:l},children:[(0,s.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,s.jsx)(Ue,{}),(0,s.jsx)("span",{className:"absolute -inset-1"})]})]}):null}));Ho.displayName="Badge";const Wo=(0,n.forwardRef)(({id:e,defaultValue:t="",value:r,size:o="sm",className:i="",disabled:a=!1,onChange:l=()=>{},error:c=!1,onError:u=()=>{},...d},f)=>{const p=(0,n.useMemo)(()=>e||`input-textarea-${be()}`,[e]),h=(0,n.useMemo)(()=>typeof r<"u",[r]),[m,g]=(0,n.useState)(t),y=(0,n.useCallback)(()=>h?r:m,[h,r,m]),v=a?"hover:border-border-disabled":"hover:border-border-strong",b=c?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"";return(0,s.jsx)("textarea",{ref:f,id:p,className:fe("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none",a?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[o],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",v,b,i),disabled:a,onChange:e=>{if(a)return;const t=e.target.value;h||g(t),"function"==typeof l&&l(t)},onInvalid:u,value:y(),...d})});Wo.displayName="TextArea",(0,n.forwardRef)(({variant:e="primary",size:t="md",border:r="subtle",src:o,alt:i,children:a,className:l,...c},u)=>{const[d,f]=(0,n.useState)(!1),p={white:"text-text-primary bg-background-primary",gray:"text-text-primary bg-background-secondary",primary:"text-text-on-color bg-background-brand","primary-light":"text-text-primary bg-brand-background-50",dark:"text-text-on-color bg-button-secondary"}[e],h={xxs:"size-5 [&>svg]:size-3 text-xs",xs:"size-6 [&>svg]:size-4 text-sm",sm:"size-8 [&>svg]:size-5 text-base",md:"size-10 [&>svg]:size-6 text-lg",lg:"size-12 [&>svg]:size-12 text-lg"}[t],m={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"}[o&&"none"===r?"subtle":r],g=o?"object-cover object-center":"",y=!o||d,v=y?"div":"img";return(0,n.useEffect)(()=>{f(!1)},[o]),(0,s.jsx)(v,{ref:u,className:fe("rounded-full overflow-hidden flex items-center justify-center",y&&p,h,m,g,l),...y?{children:(()=>{var e,t,n;if(o&&d){if(i&&"string"==typeof i)return null==(e=null==i?void 0:i[0])?void 0:e.toUpperCase();if(a&&"string"==typeof a)return null==(t=null==a?void 0:a[0])?void 0:t.toUpperCase();if(!a&&!i)return(0,s.jsx)($e,{})}return a?"string"==typeof a?null==(n=null==a?void 0:a[0])?void 0:n.toUpperCase():a:null})()}:{src:o,alt:i,onError:()=>{f(!0)}},...c})});const $o=(0,n.forwardRef)(({id:e,type:t="text",defaultValue:r="",value:o,size:i="sm",className:a="",disabled:l=!1,onChange:c=()=>{},error:u=!1,onError:d=()=>{},prefix:f=null,suffix:p=null,label:h="",...m},g)=>{const y=(0,n.useRef)(null),v=(0,n.useMemo)(()=>e||`input-${t}-${be()}`,[e]),b=(0,n.useMemo)(()=>typeof o<"u",[o]),[x,w]=(0,n.useState)(r),[C,_]=(0,n.useState)(null),k=(0,n.useCallback)(()=>b?o:x,[b,o,x]),S=e=>{if(l)return;let n;"file"===t?(n=e.target.files,n&&n.length>0?_(n[0].name):_(null)):n=e.target.value,!b&&"file"!==t&&w(n),"function"==typeof c&&c(n)},j=()=>{_(null),y.current&&(y.current.value=""),c(null)},O="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",E={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},P={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},T={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},M={sm:f?"pl-8":"",md:f?"pl-9":"",lg:f?"pl-10":""},A={sm:p?"pr-8":"",md:p?"pr-9":"",lg:p?"pr-10":""},N=l?"hover:outline-border-disabled":"hover:outline-border-strong",D="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",I=u?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",R=u?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",L=l?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",F=l?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",B="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",z=l?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",V={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},H=(0,n.useMemo)(()=>h?(0,s.jsx)(xe,{className:fe(P[i]),htmlFor:v,...(null==m?void 0:m.required)&&{required:!0},children:h}):null,[h,i,v]),W=C?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===t?(0,s.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[H,(0,s.jsxs)("div",{className:fe("w-full relative flex focus-within:z-10",a),children:[(0,s.jsx)("input",{ref:Io(y,g),id:v,type:"file",className:fe(O,F,E[i],T[i],D,N,R,W),disabled:l,onChange:S,onInvalid:d,...m}),(0,s.jsx)("div",{className:fe(z,"right-0 pr-3",V[i]),children:(0,s.jsx)(We,{})})]})]}):(0,s.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[H,(0,s.jsxs)("div",{className:fe("w-full relative flex focus-within:z-10",a),children:[f?(0,s.jsx)("div",{className:fe(B,"left-0 pl-3",T[i]),children:f}):null,(0,s.jsx)("input",{ref:Io(y,g),id:v,type:t,className:fe(O,L,E[i],T[i],M[i],A[i],D,N,I),disabled:l,onChange:S,onInvalid:d,value:k(),...m}),"file"===t?C?(0,s.jsx)("div",{className:fe(z,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",V[i]),onClick:j,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&j()},children:(0,s.jsx)(Ue,{})}):(0,s.jsx)("div",{className:fe(z,"right-0 pr-3",V[i]),children:(0,s.jsx)(We,{})}):p?(0,s.jsx)("div",{className:fe(B,"right-0 pr-3",T[i]),children:p}):null]})]})});$o.displayName="Input";const Uo=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const o={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],i={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return(0,s.jsx)("span",{className:fe("flex",i,o,r),children:n||(0,s.jsx)(Ie,{className:"animate-spin shrink-0"})})},qo=(0,n.createContext)({activeItem:null,onChange:()=>{},size:"md",iconPosition:"left"}),Yo=(0,n.forwardRef)(({slug:e,text:t,icon:r,className:o,disabled:i=!1,isFirstChild:a,isLastChild:l,...c},u)=>{const d=n.useContext(qo);if(!d)throw new Error("Button should be used inside Button Group");const{activeItem:f,onChange:p,size:h,iconPosition:m}=d,g=fe("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",i?"text-text-disabled cursor-not-allowed":"",{xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-2 px-2 text-base gap-1 [&>svg]:size-4",md:"py-2.5 px-2.5 text-base gap-1 [&>svg]:size-5"}[h],"border-0 border-r border-border-subtle border-solid",f===e?"bg-button-disabled":"",a?"rounded-tl rounded-bl border-0 border-r border-border-subtle":"",l?"rounded-tr rounded-br border-0":"",o);return(0,s.jsxs)("button",{ref:u,className:g,disabled:i,onClick:n=>{p({event:n,value:{slug:e,text:t}})},...c,children:["left"===m&&r&&(0,s.jsx)("span",{className:"mr-1",children:r}),t,"right"===m&&r&&(0,s.jsx)("span",{className:"ml-1",children:r})]})});function Ko(e){if(typeof Proxy>"u")return e;const t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Zo(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}Yo.displayName="Button";const Go=e=>Array.isArray(e);function Xo(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Jo(e){return"string"==typeof e||Array.isArray(e)}function Qo(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ei(e,t,n,r){if("function"==typeof t){const[o,i]=Qo(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Qo(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function ti(e,t,n){const r=e.getProps();return ei(r,t,void 0!==n?n:r.custom,e)}const ni=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ri=["initial",...ni],oi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ii=new Set(oi),ai=e=>1e3*e,si=e=>e/1e3,li={type:"spring",stiffness:500,damping:25,restSpeed:10},ci={type:"keyframes",duration:.8},ui={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},di=(e,{keyframes:t})=>t.length>2?ci:ii.has(e)?e.startsWith("scale")?(e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}))(t[1]):li:ui;function fi(e,t){return e?e[t]||e.default||e:void 0}const pi=e=>null!==e;function hi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(pi),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const mi=e=>e,gi=["read","resolveKeyframes","update","preRender","render","postRender"];function yi(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=gi.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,o=!1,a=!1)=>{const s=a&&r?t:n;return o&&i.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{a=e,r?o=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=a,p=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:gi.reduce((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(p)),s.schedule(t,i,a)),t},{}),cancel:e=>{for(let t=0;t<gi.length;t++)a[gi[t]].cancel(e)},state:o,steps:a}}const{schedule:vi,cancel:bi,state:xi,steps:wi}=yi(typeof requestAnimationFrame<"u"?requestAnimationFrame:mi,!0),Ci=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function _i(e,t,n,r){if(e===t&&n===r)return mi;return o=>0===o||1===o?o:Ci((t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Ci(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n))(o),t,r)}const ki=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Si=e=>t=>1-e(1-t),ji=_i(.33,1.53,.69,.99),Oi=Si(ji),Ei=ki(Oi),Pi=e=>(e*=2)<1?.5*Oi(e):.5*(2-Math.pow(2,-10*(e-1))),Ti=e=>1-Math.sin(Math.acos(e)),Mi=Si(Ti),Ai=ki(Ti),Ni=e=>/^0[^.\s]+$/u.test(e);function Di(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||Ni(e)}let Ii=mi,Ri=mi;const Li=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Fi=e=>t=>"string"==typeof t&&t.startsWith(e),Bi=Fi("--"),zi=Fi("var(--"),Vi=e=>!!zi(e)&&Hi.test(e.split("/*")[0].trim()),Hi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $i(e,t,n=1){Ri(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=Wi.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return Li(e)?parseFloat(e):e}return Vi(o)?$i(o,t,n+1):o}const Ui=(e,t,n)=>n>t?t:n<e?e:n,qi={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Yi={...qi,transform:e=>Ui(0,1,e)},Ki={...qi,default:1},Zi=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Gi=Zi("deg"),Xi=Zi("%"),Ji=Zi("px"),Qi=Zi("vh"),ea=Zi("vw"),ta={...Xi,parse:e=>Xi.parse(e)/100,transform:e=>Xi.transform(100*e)},na=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ra=e=>e===qi||e===Ji,oa=(e,t)=>parseFloat(e.split(", ")[t]),ia=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return oa(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?oa(t[1],e):0}},aa=new Set(["x","y","z"]),sa=oi.filter(e=>!aa.has(e)),la={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ia(4,13),y:ia(5,14)};la.translateX=la.x,la.translateY=la.y;const ca=e=>t=>t.test(e),ua=[qi,Ji,Xi,Gi,ea,Qi,{test:e=>"auto"===e,parse:e=>e}],da=e=>ua.find(ca(e)),fa=new Set;let pa=!1,ha=!1;function ma(){if(ha){const e=Array.from(fa).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return sa.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}ha=!1,pa=!1,fa.forEach(e=>e.complete()),fa.clear()}function ga(){fa.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ha=!0)})}class ya{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(fa.add(this),pa||(pa=!0,vi.read(ga),vi.resolveKeyframes(ma))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),fa.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,fa.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const va=e=>Math.round(1e5*e)/1e5,ba=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,xa=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,wa=(e,t)=>n=>!!("string"==typeof n&&xa.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ca=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(ba);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},_a={...qi,transform:e=>Math.round((e=>Ui(0,255,e))(e))},ka={test:wa("rgb","red"),parse:Ca("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+_a.transform(e)+", "+_a.transform(t)+", "+_a.transform(n)+", "+va(Yi.transform(r))+")"},Sa={test:wa("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:ka.transform},ja={test:wa("hsl","hue"),parse:Ca("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xi.transform(va(t))+", "+Xi.transform(va(n))+", "+va(Yi.transform(r))+")"},Oa={test:e=>ka.test(e)||Sa.test(e)||ja.test(e),parse:e=>ka.test(e)?ka.parse(e):ja.test(e)?ja.parse(e):Sa.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?ka.transform(e):ja.transform(e)},Ea=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Pa="number",Ta="color",Ma=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Aa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Ma,e=>(Oa.test(e)?(r.color.push(i),o.push(Ta),n.push(Oa.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Pa),n.push(parseFloat(e))),++i,"${}")).split("${}");return{values:n,split:a,indexes:r,types:o}}function Na(e){return Aa(e).values}function Da(e){const{split:t,types:n}=Aa(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Pa?va(e[i]):t===Ta?Oa.transform(e[i]):e[i]}return o}}const Ia=e=>"number"==typeof e?0:e,Ra={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(ba))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Ea))||void 0===n?void 0:n.length)||0)>0},parse:Na,createTransformer:Da,getAnimatableNone:function(e){const t=Na(e);return Da(e)(t.map(Ia))}},La=new Set(["brightness","contrast","saturate","opacity"]);function Fa(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ba)||[];if(!r)return e;const o=n.replace(r,"");let i=La.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Ba=/\b([a-z-]*)\(.*?\)/gu,za={...Ra,getAnimatableNone:e=>{const t=e.match(Ba);return t?t.map(Fa).join(" "):e}},Va={borderWidth:Ji,borderTopWidth:Ji,borderRightWidth:Ji,borderBottomWidth:Ji,borderLeftWidth:Ji,borderRadius:Ji,radius:Ji,borderTopLeftRadius:Ji,borderTopRightRadius:Ji,borderBottomRightRadius:Ji,borderBottomLeftRadius:Ji,width:Ji,maxWidth:Ji,height:Ji,maxHeight:Ji,top:Ji,right:Ji,bottom:Ji,left:Ji,padding:Ji,paddingTop:Ji,paddingRight:Ji,paddingBottom:Ji,paddingLeft:Ji,margin:Ji,marginTop:Ji,marginRight:Ji,marginBottom:Ji,marginLeft:Ji,backgroundPositionX:Ji,backgroundPositionY:Ji},Ha={rotate:Gi,rotateX:Gi,rotateY:Gi,rotateZ:Gi,scale:Ki,scaleX:Ki,scaleY:Ki,scaleZ:Ki,skew:Gi,skewX:Gi,skewY:Gi,distance:Ji,translateX:Ji,translateY:Ji,translateZ:Ji,x:Ji,y:Ji,z:Ji,perspective:Ji,transformPerspective:Ji,opacity:Yi,originX:ta,originY:ta,originZ:Ji},Wa={...qi,transform:Math.round},$a={...Va,...Ha,zIndex:Wa,size:Ji,fillOpacity:Yi,strokeOpacity:Yi,numOctaves:Wa},Ua={...$a,color:Oa,backgroundColor:Oa,outlineColor:Oa,fill:Oa,stroke:Oa,borderColor:Oa,borderTopColor:Oa,borderRightColor:Oa,borderBottomColor:Oa,borderLeftColor:Oa,filter:za,WebkitFilter:za},qa=e=>Ua[e];function Ya(e,t){let n=qa(e);return n!==za&&(n=Ra),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ka=new Set(["auto","none","0"]);class Za extends ya{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),Vi(r))){const o=$i(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!na.has(n)||2!==e.length)return;const[r,o]=e,i=da(r),a=da(o);if(i!==a)if(ra(i)&&ra(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)Di(e[t])&&n.push(t);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Ka.has(t)&&Aa(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=Ya(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=la[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=la[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),!(null===(e=this.removedTransforms)||void 0===e)&&e.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}function Ga(e){return"function"==typeof e}let Xa;function Ja(){Xa=void 0}const Qa={now:()=>(void 0===Xa&&Qa.set(xi.isProcessing?xi.timestamp:performance.now()),Xa),set:e=>{Xa=e,queueMicrotask(Ja)}},es=(e,t)=>"zIndex"!==t&&!("number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Ra.test(e)&&"0"!==e||e.startsWith("url(")));class ts{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Qa.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&(ga(),ma()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Qa.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=es(o,t),s=es(i,t);return Ii(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Ga(n))&&r)}(e,n,r,o)){if(!i)return null==s||s(hi(e,this.options,t)),null==a||a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function ns(e,t){return t?e*(1e3/t):0}function rs(e,t,n){const r=Math.max(t-5,0);return ns(n-e(r),t-r)}const os=.001;const is=12;function as(e,t){return e*Math.sqrt(1-t*t)}const ss=["duration","bounce"],ls=["stiffness","damping","mass"];function cs(e,t){return t.some(t=>void 0!==e[t])}function us({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!cs(e,ls)&&cs(e,ss)){const n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Ii(e<=ai(10),"Spring duration must be 10 seconds or less");let a=1-t;a=Ui(.05,1,a),e=Ui(.01,10,si(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=as(t,a),l=Math.exp(-o);return os-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=as(Math.pow(t,2),a);return(-o(t)+os>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-os,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<is;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=ai(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-si(r.velocity||0)}),p=d||0,h=l/(2*Math.sqrt(s*c)),m=i-o,g=si(Math.sqrt(s/c)),y=Math.abs(m)<5;let v;if(n||(n=y?.01:2),t||(t=y?.005:.5),h<1){const e=as(g,h);v=t=>{const n=Math.exp(-h*g*t);return i-n*((p+h*g*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)v=e=>i-Math.exp(-g*e)*(m+(p+g*m)*e);else{const e=g*Math.sqrt(h*h-1);v=t=>{const n=Math.exp(-h*g*t),r=Math.min(e*t,300);return i-n*((p+h*g*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:f&&u||null,next:e=>{const r=v(e);if(f)a.done=e>=u;else{let o=0;h<1&&(o=0===e?ai(p):rs(v,e,r));const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function ds({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,g=void 0===a?m:a(m);g!==m&&(h=g-d);const y=e=>-h*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let x,w;const C=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(f.value)&&(x=e,w=us({keyframes:[f.value,p(f.value)],velocity:rs(v,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!w&&void 0===x&&(t=!0,b(e),C(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}const fs=_i(.42,0,1,1),ps=_i(0,0,.58,1),hs=_i(.42,0,.58,1),ms=e=>Array.isArray(e)&&"number"==typeof e[0],gs={linear:mi,easeIn:fs,easeInOut:hs,easeOut:ps,circIn:Ti,circInOut:Ai,circOut:Mi,backIn:Oi,backInOut:Ei,backOut:ji,anticipate:Pi},ys=e=>{if(ms(e)){Ri(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return _i(t,n,r,o)}return"string"==typeof e?(Ri(void 0!==gs[e],`Invalid easing type '${e}'`),gs[e]):e},vs=(e,t)=>n=>t(e(n)),bs=(...e)=>e.reduce(vs),xs=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},ws=(e,t,n)=>e+(t-e)*n;function Cs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _s(e,t){return n=>n>0?t:e}const ks=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Ss=[Sa,ka,ja];function js(e){const t=(e=>Ss.find(t=>t.test(e)))(e);if(Ii(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ja&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=Cs(s,r,e+1/3),i=Cs(s,r,e),a=Cs(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const Os=(e,t)=>{const n=js(e),r=js(t);if(!n||!r)return _s(e,t);const o={...n};return e=>(o.red=ks(n.red,r.red,e),o.green=ks(n.green,r.green,e),o.blue=ks(n.blue,r.blue,e),o.alpha=ws(n.alpha,r.alpha,e),ka.transform(o))},Es=new Set(["none","hidden"]);function Ps(e,t){return n=>ws(e,t,n)}function Ts(e){return"number"==typeof e?Ps:"string"==typeof e?Vi(e)?_s:Oa.test(e)?Os:Ns:Array.isArray(e)?Ms:"object"==typeof e?Oa.test(e)?Os:As:_s}function Ms(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>Ts(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function As(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Ts(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Ns=(e,t)=>{const n=Ra.createTransformer(t),r=Aa(e),o=Aa(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Es.has(e)&&!o.values.length||Es.has(t)&&!r.values.length?function(e,t){return Es.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):bs(Ms(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(Ii(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),_s(e,t))};function Ds(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?ws(e,t,n):Ts(e)(e,t)}function Is(e,t){return e.map(()=>t||hs).splice(0,e.length-1)}function Rs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(ys):ys(r),i={done:!1,value:t[0]},a=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=xs(0,t,r);e.push(ws(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ri(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||Ds,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||mi:t;i=bs(e,i)}r.push(i)}return r}(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=xs(e[n],e[n+1],t);return a[n](r)};return n?t=>l(Ui(e[0],e[i-1],t)):l}(a,t,{ease:Array.isArray(o)?o:Is(t,o)});return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const Ls=e=>{const t=({timestamp:t})=>e(t);return{start:()=>vi.update(t,!0),stop:()=>bi(t),now:()=>xi.isProcessing?xi.timestamp:Qa.now()}},Fs={decay:ds,inertia:ds,tween:Rs,keyframes:Rs,spring:us},Bs=e=>e/100;class zs extends ts{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||ya;this.resolver=new i(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=Ga(t)?t:Fs[t]||Rs;let s,l;a!==Rs&&"number"!=typeof e[0]&&(s=bs(Bs,Ds(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:f,repeatType:p,repeatDelay:h,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=o;if(f){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,f+1),!!(t%2)&&("reverse"===p?(n=1-n,h&&(n-=h/u)):"mirror"===p&&(b=i)),v=Ui(0,1,n)*u}const x=y?{done:!1,value:s[0]}:b.next(v);a&&(x.value=a(x.value));let{done:w}=x;!y&&null!==l&&(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const C=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return C&&void 0!==r&&(x.value=hi(s,this.options,r)),m&&m(x.value),C&&this.finish(),x}get duration(){const{resolved:e}=this;return e?si(e.calculatedDuration):0}get time(){return si(this.currentTime)}set time(e){e=ai(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=si(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=Ls,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=n??this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Vs=new Set(["opacity","clipPath","filter","transform"]);function Hs(e){let t;return()=>(void 0===t&&(t=e()),t)}const Ws={linearEasing:void 0};function $s(e,t){const n=Hs(e);return()=>{var e;return null!==(e=Ws[t])&&void 0!==e?e:n()}}const Us=$s(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function qs(e){return!!("function"==typeof e&&Us()||!e||"string"==typeof e&&(e in Ks||Us())||ms(e)||Array.isArray(e)&&e.every(qs))}const Ys=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ks={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ys([0,.65,.55,1]),circOut:Ys([.55,0,1,.45]),backIn:Ys([.31,.01,.66,-.59]),backOut:Ys([.33,1.53,.69,.99])};function Zs(e,t){if(e)return"function"==typeof e&&Us()?((e,t)=>{let n="";const r=Math.max(Math.round(t/10),2);for(let t=0;t<r;t++)n+=e(xs(0,r-1,t))+", ";return`linear(${n.substring(0,n.length-2)})`})(e,t):ms(e)?Ys(e):Array.isArray(e)?e.map(e=>Zs(e,t)||Ks.easeOut):Ks[e]}function Gs(e,t){e.timeline=t,e.onfinish=null}const Xs=Hs(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Js={anticipate:Pi,backInOut:Ei,circInOut:Ai};class Qs extends ts{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Za(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(null===(n=s.owner)||void 0===n||!n.current)return!1;if("string"==typeof i&&Us()&&i in Js&&(i=Js[i]),function(e){return Ga(e.type)||"spring"===e.type||!qs(e.ease)}(this.options)){const{onComplete:t,onUpdate:n,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new zs({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),r=u.duration,o=u.times,i=u.ease,a="keyframes"}const u=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Zs(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(s.owner.current,l,e,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Gs(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(hi(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return si(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return si(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=ai(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return mi;const{animation:n}=t;Gs(n,e)}else this.pendingTimeline=e;return mi}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new zs({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=ai(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;return Xs()&&n&&Vs.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const el=Hs(()=>void 0!==window.ScrollTimeline);class tl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map(n=>el()&&n.attachTimeline?n.attachTimeline(e):t(n));return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const nl=(e,t,n,r={},o,i)=>a=>{const s=fi(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=ai(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||(u={...u,...di(e,u)}),u.duration&&(u.duration=ai(u.duration)),u.repeatDelay&&(u.repeatDelay=ai(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=hi(u.keyframes,s);if(void 0!==e)return vi.update(()=>{u.onUpdate(e),u.onComplete()}),new tl([])}return!i&&Qs.supports(u)?new Qs(u):new zs(u)},rl=e=>Go(e)?e[e.length-1]||0:e;function ol(e,t){-1===e.indexOf(t)&&e.push(t)}function il(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class al{constructor(){this.subscriptions=[]}add(e){return ol(this.subscriptions,e),()=>il(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class sl{constructor(e,t={}){this.version="11.11.17",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Qa.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Qa.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new al);const n=this.events[e].add(t);return"change"===e?()=>{n(),vi.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Qa.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ns(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ll(e,t){return new sl(e,t)}function cl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ll(n))}const ul=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dl="data-"+ul("framerAppearId");function fl(e){return e.props[dl]}const pl=e=>!(!e||!e.getVelocity);function hl(e,t){const n=e.getValue("willChange");if(function(e){return!(!pl(e)||!e.add)}(n))return n.add(t)}function ml({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function gl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&ml(u,t))continue;const s={delay:n,...fi(a||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=fl(e);if(n){const e=window.MotionHandoffAnimation(n,t,vi);null!==e&&(s.startTime=e,d=!0)}}hl(e,t),r.start(nl(t,r,o,e.shouldReduceMotion&&ii.has(t)?{type:!1}:s,e,d));const f=r.animation;f&&c.push(f)}return s&&Promise.all(c).then(()=>{vi.update(()=>{s&&function(e,t){const n=ti(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)cl(e,t,rl(i[t]))}(e,s)})}),c}function yl(e,t,n={}){var r;const o=ti(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(gl(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(vl).forEach((e,r)=>{e.notify("AnimationStart",t),a.push(yl(e,t,{...i,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then(()=>t())}return Promise.all([a(),s(n.delay)])}function vl(e,t){return e.sortNodePosition(t)}const bl=ri.length;function xl(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&xl(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<bl;n++){const r=ri[n],o=e.props[r];(Jo(o)||!1===o)&&(t[r]=o)}return t}const wl=[...ni].reverse(),Cl=ni.length;function _l(e){let t=function(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>yl(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=yl(e,t,n);else{const o="function"==typeof t?ti(e,t,n.custom):t;r=Promise.all(gl(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=jl(),r=!0;const o=t=>(n,r)=>{var o;const i=ti(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:a}=e,s=xl(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Cl;t++){const f=wl[t],p=n[f],h=void 0!==a[f]?a[f]:s[f],m=Jo(h),g=f===i?p.isActive:null;!1===g&&(d=t);let y=h===s[f]&&h!==a[f]&&m;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...u},!p.isActive&&null===g||!h&&!p.prevProp||Zo(h)||"boolean"==typeof h)continue;const v=kl(p.prevProp,h);let b=v||f===i&&p.isActive&&!y&&m||t>d&&m,x=!1;const w=Array.isArray(h)?h:[h];let C=w.reduce(o(f),{});!1===g&&(C={});const{prevResolvedValues:_={}}=p,k={..._,...C},S=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in k){const t=C[e],n=_[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Go(t)&&Go(n)?!Xo(t,n):t!==n,r?null!=t?S(e):c.add(e):void 0!==t&&c.has(e)?S(e):p.protectedKeys[e]=!0}p.prevProp=h,p.prevResolvedValues=C,p.isActive&&(u={...u,...C}),r&&e.blockInitialAnimation&&(b=!1),b&&(!y||!v||x)&&l.push(...w.map(e=>({animation:e,options:{type:f}})))}if(c.size){const t={};c.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let f=!!l.length;return r&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=jl(),r=!0}}}function kl(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Xo(t,e)}function Sl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jl(){return{animate:Sl(!0),whileInView:Sl(),whileHover:Sl(),whileTap:Sl(),whileDrag:Sl(),whileFocus:Sl(),exit:Sl()}}class Ol{constructor(e){this.isMounted=!1,this.node=e}update(){}}let El=0;const Pl={animation:{Feature:class extends Ol{constructor(e){super(e),e.animationState||(e.animationState=_l(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Zo(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Ol{constructor(){super(...arguments),this.id=El++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Tl=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Ml(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function Al(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Nl(e,t,n,r){return Al(e,t,(e=>t=>Tl(t)&&e(t,Ml(t)))(n),r)}const Dl=(e,t)=>Math.abs(e-t);class Il{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Fl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Dl(e.x,t.x),r=Dl(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=xi;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Rl(t,this.transformPagePoint),vi.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=Fl("pointercancel"===e.type?this.lastMoveEventInfo:Rl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Tl(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Rl(Ml(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=xi;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,Fl(i,this.history)),this.removeListeners=bs(Nl(this.contextWindow,"pointermove",this.handlePointerMove),Nl(this.contextWindow,"pointerup",this.handlePointerUp),Nl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bi(this.updatePoint)}}function Rl(e,t){return t?{point:t(e.point)}:e}function Ll(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fl({point:e},t){return{point:e,delta:Ll(e,zl(t)),offset:Ll(e,Bl(t)),velocity:Vl(t,.1)}}function Bl(e){return e[0]}function zl(e){return e[e.length-1]}function Vl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=zl(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ai(t)));)n--;if(!r)return{x:0,y:0};const i=si(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Hl(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}const Wl=Hl("dragHorizontal"),$l=Hl("dragVertical");function Ul(e){let t=!1;if("y"===e)t=$l();else if("x"===e)t=Wl();else{const e=Wl(),n=$l();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function ql(){const e=Ul(!0);return!e||(e(),!1)}function Yl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Kl(e){return e.max-e.min}function Zl(e,t,n,r=.5){e.origin=r,e.originPoint=ws(t.min,t.max,e.origin),e.scale=Kl(n)/Kl(t),e.translate=ws(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Gl(e,t,n,r){Zl(e.x,t.x,n.x,r?r.originX:void 0),Zl(e.y,t.y,n.y,r?r.originY:void 0)}function Xl(e,t,n){e.min=n.min+t.min,e.max=e.min+Kl(t)}function Jl(e,t,n){e.min=t.min-n.min,e.max=e.min+Kl(t)}function Ql(e,t,n){Jl(e.x,t.x,n.x),Jl(e.y,t.y,n.y)}function ec(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function tc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const nc=.35;function rc(e,t,n){return{min:oc(e,t),max:oc(e,n)}}function oc(e,t){return"number"==typeof e?e:e[t]||0}const ic=()=>({x:{min:0,max:0},y:{min:0,max:0}});function ac(e){return[e("x"),e("y")]}function sc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function lc(e){return void 0===e||1===e}function cc({scale:e,scaleX:t,scaleY:n}){return!lc(e)||!lc(t)||!lc(n)}function uc(e){return cc(e)||dc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dc(e){return fc(e.x)||fc(e.y)}function fc(e){return e&&"0%"!==e}function pc(e,t,n){return n+t*(e-n)}function hc(e,t,n,r,o){return void 0!==o&&(e=pc(e,o,r)),pc(e,n,r)+t}function mc(e,t=0,n=1,r,o){e.min=hc(e.min,t,n,r,o),e.max=hc(e.max,t,n,r,o)}function gc(e,{x:t,y:n}){mc(e.x,t.translate,t.scale,t.originPoint),mc(e.y,n.translate,n.scale,n.originPoint)}const yc=.999999999999,vc=1.0000000000001;function bc(e,t){e.min=e.min+t,e.max=e.max+t}function xc(e,t,n,r,o=.5){mc(e,t,n,ws(e.min,e.max,o),r)}function wc(e,t){xc(e.x,t.x,t.scaleX,t.scale,t.originX),xc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Cc(e,t){return sc(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const _c=({current:e})=>e?e.ownerDocument.defaultView:null,kc=new WeakMap;class Sc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Il(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Ml(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ul(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ac(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Xi.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Kl(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),o&&vi.postRender(()=>o(e,t)),hl(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>ac(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:_c(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&vi.postRender(()=>o(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!jc(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?ws(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?ws(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&Yl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:ec(e.x,n,o),y:ec(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=nc){return!1===e?e=0:!0===e&&(e=nc),{x:rc(e,"left","right"),y:rc(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ac(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Yl(e))return!1;const n=e.current;Ri(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Cc(e,n),{scroll:o}=t;return o&&(bc(r.x,o.offset.x),bc(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:tc(e.x,t.x),y:tc(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=sc(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=ac(a=>{if(!jc(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return hl(this.visualElement,e),n.start(nl(e,n,0,t,this.visualElement,!1))}stopAnimation(){ac(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){ac(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){ac(t=>{const{drag:n}=this.getProps();if(!jc(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-ws(n,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Yl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ac(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Kl(e),o=Kl(t);return o>r?n=xs(t.min,t.max-r,e.min):r>o&&(n=xs(e.min,e.max-o,t.min)),Ui(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ac(t=>{if(!jc(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(ws(o,i,r[t]))})}addListeners(){if(!this.visualElement.current)return;kc.set(this.visualElement,this);const e=Nl(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();Yl(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),vi.read(t);const o=Al(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ac(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=nc,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function jc(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Oc=e=>(t,n)=>{e&&vi.postRender(()=>e(t,n))},Ec=(0,n.createContext)(null),Pc=(0,n.createContext)({}),Tc=(0,n.createContext)({}),Mc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ac(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nc={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Ji.test(e))return e;e=parseFloat(e)}return`${Ac(e,t.target.x)}% ${Ac(e,t.target.y)}%`}},Dc={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ra.parse(e);if(o.length>5)return r;const i=Ra.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=ws(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},Ic={},{schedule:Rc,cancel:Lc}=yi(queueMicrotask,!1);class Fc extends n.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=zc,Object.assign(Ic,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Mc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i&&(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||vi.postRender(()=>{const e=i.getStack();(!e||!e.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Rc.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Bc(e){const[t,r]=function(){const e=(0,n.useContext)(Ec);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:r,register:o}=e,i=(0,n.useId)();(0,n.useEffect)(()=>o(i),[]);const a=(0,n.useCallback)(()=>r&&r(i),[i,r]);return!t&&r?[!1,a]:[!0]}(),o=(0,n.useContext)(Pc);return(0,s.jsx)(Fc,{...e,layoutGroup:o,switchLayoutGroup:(0,n.useContext)(Tc),isPresent:t,safeToRemove:r})}const zc={borderRadius:{...Nc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nc,borderTopRightRadius:Nc,borderBottomLeftRadius:Nc,borderBottomRightRadius:Nc,boxShadow:Dc},Vc=["TopLeft","TopRight","BottomLeft","BottomRight"],Hc=Vc.length,Wc=e=>"string"==typeof e?parseFloat(e):e,$c=e=>"number"==typeof e||Ji.test(e);function Uc(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const qc=Kc(0,.5,Mi),Yc=Kc(.5,.95,mi);function Kc(e,t,n){return r=>r<e?0:r>t?1:n(xs(e,t,r))}function Zc(e,t){e.min=t.min,e.max=t.max}function Gc(e,t){Zc(e.x,t.x),Zc(e.y,t.y)}function Xc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Jc(e,t,n,r,o){return e=pc(e-=t,1/n,r),void 0!==o&&(e=pc(e,1/o,r)),e}function Qc(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(Xi.test(t)&&(t=parseFloat(t),t=ws(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=ws(i.min,i.max,r);e===i&&(s-=t),e.min=Jc(e.min,t,n,s,o),e.max=Jc(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const eu=["x","scaleX","originX"],tu=["y","scaleY","originY"];function nu(e,t,n,r){Qc(e.x,t,eu,n?n.x:void 0,r?r.x:void 0),Qc(e.y,t,tu,n?n.y:void 0,r?r.y:void 0)}function ru(e){return 0===e.translate&&1===e.scale}function ou(e){return ru(e.x)&&ru(e.y)}function iu(e,t){return e.min===t.min&&e.max===t.max}function au(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function su(e,t){return au(e.x,t.x)&&au(e.y,t.y)}function lu(e){return Kl(e.x)/Kl(e.y)}function cu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class uu{constructor(){this.members=[]}add(e){ol(this.members,e),e.scheduleRender()}remove(e){if(il(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const du=(e,t)=>e.depth-t.depth;class fu{constructor(){this.children=[],this.isDirty=!1}add(e){ol(this.children,e),this.isDirty=!0}remove(e){il(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(du),this.isDirty=!1,this.children.forEach(e)}}function pu(e){const t=pl(e)?e.get():e;return(e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const hu={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},mu=typeof window<"u"&&void 0!==window.MotionDebug,gu=["","X","Y","Z"],yu={visibility:"hidden"};let vu=0;function bu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function xu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",vi,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&xu(r)}function wu({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=vu++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,mu&&(hu.totalNodes=hu.resolvedTargetDeltas=hu.recalculatedProjection=0),this.nodes.forEach(ku),this.nodes.forEach(Mu),this.nodes.forEach(Au),this.nodes.forEach(Su),mu&&window.MotionDebug.record(hu)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new fu)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new al),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=function(e){return e instanceof SVGElement&&"svg"!==e.tagName}(t),this.instance=t;const{layoutId:r,layout:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e){const t=Qa.now(),n=({timestamp:r})=>{const o=r-t;o>=250&&(bi(n),e(o-250))};return vi.read(n,!0),()=>bi(n)}(r),Mc.hasAnimatedSinceResize&&(Mc.hasAnimatedSinceResize=!1,this.nodes.forEach(Tu))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&i&&(r||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||i.getDefaultTransition()||Fu,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!su(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...fi(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Tu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,bi(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Nu),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&xu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ou);this.isUpdating||this.nodes.forEach(Eu),this.isUpdating=!1,this.nodes.forEach(Pu),this.nodes.forEach(Cu),this.nodes.forEach(_u),this.clearAllSnapshots();const e=Qa.now();xi.delta=Ui(0,1e3/60,e-xi.timestamp),xi.timestamp=e,xi.isProcessing=!0,wi.update.process(xi),wi.preRender.process(xi),wi.render.process(xi),xi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Rc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ju),this.sharedNodes.forEach(Du)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,vi.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){vi.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!(!this.options.layoutScroll||!this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!ou(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||uc(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),function(e){Vu(e.x),Vu(e.y)}(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Wu)){const{scroll:e}=this.root;e&&(bc(n.x,e.offset.x),bc(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Gc(n,e),null!==(t=this.scroll)&&void 0!==t&&t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&Gc(n,e),bc(n.x,o.offset.x),bc(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Gc(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&wc(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),uc(r.latestValues)&&wc(n,r.latestValues)}return uc(this.latestValues)&&wc(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Gc(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance||!uc(n.latestValues))continue;cc(n.latestValues)&&n.updateSnapshot();const r=ic();Gc(r,n.measurePageBox()),nu(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return uc(this.latestValues)&&nu(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=!!this.resumingFrom||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||null!==(t=this.parent)&&void 0!==t&&t.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=xi.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ql(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Gc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),function(e,t,n){Xl(e.x,t.x,n.x),Xl(e.y,t.y,n.y)}(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Gc(this.target,this.layout.layoutBox),gc(this.target,this.targetDelta)):Gc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ql(this.relativeTargetOrigin,this.target,e.target),Gc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}mu&&hu.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!cc(this.parent.latestValues)&&!dc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!(!(this.relativeTarget||this.targetDelta||this.options.layoutRoot)||!this.layout)}calcProjection(){var e;const t=this.getLead(),n=!!this.resumingFrom||this!==t;let r=!0;if((this.isProjectionDirty||!(null===(e=this.parent)||void 0===e)&&e.isProjectionDirty)&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===xi.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;Gc(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;(function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&wc(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,gc(e,a)),r&&uc(i.latestValues)&&wc(e,i.latestValues))}t.x<vc&&t.x>yc&&(t.x=1),t.y<vc&&t.y>yc&&(t.y=1)})(this.layoutCorrected,this.treeScale,this.path,n),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Xc(this.prevProjectionDelta.x,this.projectionDelta.x),Xc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Gl(this.projectionDelta,this.layoutCorrected,l,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==s||!cu(this.projectionDelta.x,this.prevProjectionDelta.x)||!cu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),mu&&hu.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=!(!s||c||!0!==this.options.crossfade||this.path.some(Lu));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Iu(i.x,e.x,n),Iu(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ql(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Ru(e.x,t.x,n.x,r),Ru(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return iu(e.x,t.x)&&iu(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Gc(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=ws(0,void 0!==n.opacity?n.opacity:1,qc(r)),e.opacityExit=ws(void 0!==t.opacity?t.opacity:1,0,Yc(r))):i&&(e.opacity=ws(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Hc;o++){const i=`border${Vc[o]}Radius`;let a=Uc(t,i),s=Uc(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||$c(a)===$c(s)?(e[i]=Math.max(ws(Wc(a),Wc(s),r),0),(Xi.test(s)||Xi.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=ws(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(bi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=vi.update(()=>{Mc.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=pl(0)?0:ll(0);return r.start(nl("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Hu(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Kl(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Kl(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Gc(t,n),wc(t,o),Gl(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new uu),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&bu("z",e,r,this.animationValues);for(let t=0;t<gu.length;t++)bu(`rotate${gu[t]}`,e,r,this.animationValues),bu(`skew${gu[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return yu;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=pu(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=pu(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!uc(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==s||1!==l)&&(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in Ic){if(void 0===a[e])continue;const{correct:t,applyTo:n}=Ic[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?pu(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(Ou),this.root.sharedNodes.clear()}}}function Cu(e){e.updateLayout()}function _u(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?ac(e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Kl(r);r.min=t[e].min,r.max=r.min+o}):Hu(o,n.layoutBox,t)&&ac(r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=Kl(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Gl(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?Gl(s,e.applyTransform(r,!0),n.measuredBox):Gl(s,t,n.layoutBox);const l=!ou(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};Ql(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};Ql(s,t,i.layoutBox),su(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function ku(e){mu&&hu.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Su(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ju(e){e.clearSnapshot()}function Ou(e){e.clearMeasurements()}function Eu(e){e.isLayoutDirty=!1}function Pu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Tu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Mu(e){e.resolveTargetDelta()}function Au(e){e.calcProjection()}function Nu(e){e.resetSkewAndRotation()}function Du(e){e.removeLeadSnapshot()}function Iu(e,t,n){e.translate=ws(t.translate,0,n),e.scale=ws(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ru(e,t,n,r){e.min=ws(t.min,n.min,r),e.max=ws(t.max,n.max,r)}function Lu(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Fu={duration:.45,ease:[.4,0,.1,1]},Bu=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),zu=Bu("applewebkit/")&&!Bu("chrome/")?Math.round:mi;function Vu(e){e.min=zu(e.min),e.max=zu(e.max)}function Hu(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t){return Math.abs(e-t)<=.2}(lu(t),lu(n))}function Wu(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const $u=wu({attachResizeListener:(e,t)=>Al(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Uu={current:void 0},qu=wu({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Uu.current){const e=new $u({});e.mount(window),e.setOptions({layoutScroll:!0}),Uu.current=e}return Uu.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position}),Yu={pan:{Feature:class extends Ol{constructor(){super(...arguments),this.removePointerDownListener=mi}onPointerDown(e){this.session=new Il(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_c(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Oc(e),onStart:Oc(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&vi.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Nl(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Ol{constructor(e){super(e),this.removeGroupControls=mi,this.removeListeners=mi,this.controls=new Sc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mi}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:qu,MeasureLayout:Bc}};function Ku(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Nl(e.current,n,(n,o)=>{if("touch"===n.pointerType||ql())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const a=i[r];a&&vi.postRender(()=>a(n,o))},{passive:!e.getProps()[r]})}const Zu=(e,t)=>!!t&&(e===t||Zu(e,t.parentElement));function Gu(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ml(n))}const Xu=new WeakMap,Ju=new WeakMap,Qu=e=>{const t=Xu.get(e.target);t&&t(e)},ed=e=>{e.forEach(Qu)};const td={some:0,all:1},nd={inView:{Feature:class extends Ol{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:td[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;Ju.has(n)||Ju.set(n,{});const r=Ju.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(ed,{root:e,...t})),r[o]}(t);return Xu.set(e,n),r.observe(e),()=>{Xu.delete(e),r.unobserve(e)}}(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Ol{constructor(){super(...arguments),this.removeStartListeners=mi,this.removeEndListeners=mi,this.removeAccessibleListeners=mi,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Nl(window,"pointerup",(e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:o}=this.node.getProps(),i=o||Zu(this.node.current,e.target)?n:r;i&&vi.update(()=>i(e,t))},{passive:!(n.onTap||n.onPointerUp)}),o=Nl(window,"pointercancel",(e,t)=>this.cancelPress(e,t),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=bs(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Al(this.node.current,"keydown",e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=Al(this.node.current,"keyup",e=>{"Enter"!==e.key||!this.checkPressEnd()||Gu("up",(e,t)=>{const{onTap:n}=this.node.getProps();n&&vi.postRender(()=>n(e,t))})}),Gu("down",(e,t)=>{this.startPress(e,t)}))}),t=Al(this.node.current,"blur",()=>{this.isPressing&&Gu("cancel",(e,t)=>this.cancelPress(e,t))});this.removeAccessibleListeners=bs(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&vi.postRender(()=>n(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ql()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&vi.postRender(()=>n(e,t))}mount(){const e=this.node.getProps(),t=Nl(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Al(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=bs(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Ol{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bs(Al(this.node.current,"focus",()=>this.onFocus()),Al(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Ol{mount(){this.unmount=bs(Ku(this.node,!0),Ku(this.node,!1))}unmount(){}}}},rd={layout:{ProjectionNode:qu,MeasureLayout:Bc}},od=(0,n.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),id=(0,n.createContext)({}),ad=typeof window<"u",sd=ad?n.useLayoutEffect:n.useEffect,ld=(0,n.createContext)({strict:!1});function cd(e,t,r,o,i){var a,s;const{visualElement:l}=(0,n.useContext)(id),c=(0,n.useContext)(ld),u=(0,n.useContext)(Ec),d=(0,n.useContext)(od).reducedMotion,f=(0,n.useRef)();o=o||c.renderer,!f.current&&o&&(f.current=o(e,{visualState:t,parent:l,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const p=f.current,h=(0,n.useContext)(Tc);p&&!p.projection&&i&&("html"===p.type||"svg"===p.type)&&function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ud(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&Yl(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(f.current,r,i,h);const m=(0,n.useRef)(!1);(0,n.useInsertionEffect)(()=>{p&&m.current&&p.update(r,u)});const g=r[dl],y=(0,n.useRef)(!!g&&!(null!==(a=window.MotionHandoffIsComplete)&&void 0!==a&&a.call(window,g))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,g)));return sd(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Rc.render(p.render),y.current&&p.animationState&&p.animationState.animateChanges())}),(0,n.useEffect)(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)}),y.current=!1))}),p}function ud(e){if(e)return!1!==e.options.allowProjection?e.projection:ud(e.parent)}function dd(e,t,r){return(0,n.useCallback)(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):Yl(r)&&(r.current=n))},[t])}function fd(e){return Zo(e.animate)||ri.some(t=>Jo(e[t]))}function pd(e){return!(!fd(e)&&!e.variants)}function hd(e){return Array.isArray(e)?e.join(" "):e}const md={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},gd={};for(const e in md)gd[e]={isEnabled:t=>md[e].some(e=>!!t[e])};const yd=Symbol.for("motionComponentSymbol");function vd({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:o,Component:i}){e&&function(e){for(const t in e)gd[t]={...gd[t],...e[t]}}(e);const a=(0,n.forwardRef)(function(e,a){let l;const c={...(0,n.useContext)(od),...e,layoutId:bd(e)},{isStatic:u}=c,d=function(e){const{initial:t,animate:r}=function(e,t){if(fd(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Jo(t)?t:void 0,animate:Jo(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,n.useContext)(id));return(0,n.useMemo)(()=>({initial:t,animate:r}),[hd(t),hd(r)])}(e),f=o(e,u);if(!u&&ad){(0,n.useContext)(ld).strict;const e=function(e){const{drag:t,layout:n}=gd;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:null!=t&&t.isEnabled(e)||null!=n&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(c);l=e.MeasureLayout,d.visualElement=cd(i,f,c,t,e.ProjectionNode)}return(0,s.jsxs)(id.Provider,{value:d,children:[l&&d.visualElement?(0,s.jsx)(l,{visualElement:d.visualElement,...c}):null,r(i,e,dd(f,d.visualElement,a),f,u,d.visualElement)]})});return a[yd]=i,a}function bd({layoutId:e}){const t=(0,n.useContext)(Pc).id;return t&&void 0!==e?t+"-"+e:e}const xd=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function wd(e){return"string"==typeof e&&!e.includes("-")&&!!(xd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Cd(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const _d=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function kd(e,t,n,r){Cd(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(_d.has(n)?n:ul(n),t.attrs[n])}function Sd(e,{layout:t,layoutId:n}){return ii.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ic[e]||"opacity"===e)}function jd(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(pl(o[a])||t.style&&pl(t.style[a])||Sd(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return i}function Od(e,t,n){const r=jd(e,t,n);for(const n in e)(pl(e[n])||pl(t[n]))&&(r[-1!==oi.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}function Ed(e){const t=(0,n.useRef)(null);return null===t.current&&(t.current=e()),t.current}const Pd=e=>(t,r)=>{const o=(0,n.useContext)(id),i=(0,n.useContext)(Ec),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:Td(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,o,i);return r?a():Ed(a)};function Td(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=pu(i[e]);let{initial:a,animate:s}=e;const l=fd(e),c=pd(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Zo(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=ei(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const Md=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Ad={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nd=oi.length;function Dd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(ii.has(e))a=!0;else if(Bi(e))o[e]=n;else{const t=Md(n,$a[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<Nd;i++){const a=oi[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=Md(s,$a[a]);l||(o=!1,r+=`${Ad[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}function Id(e,t,n){return"string"==typeof e?e:Ji.transform(t+n*e)}const Rd={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ld={offset:"strokeDashoffset",array:"strokeDasharray"};function Fd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Dd(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Id(t,e.x,e.width)} ${Id(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Rd:Ld;e[i.offset]=Ji.transform(-r);const a=Ji.transform(t),s=Ji.transform(n);e[i.array]=`${a} ${s}`}(f,a,s,l,!1)}const Bd=e=>"string"==typeof e&&"svg"===e.toLowerCase(),zd={useVisualState:Pd({scrapeMotionValuesFromProps:Od,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onMount:(e,t,{renderState:n,latestValues:r})=>{vi.read(()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),vi.render(()=>{Fd(n,r,Bd(t.tagName),e.transformTemplate),kd(t,n)})}})},Vd={useVisualState:Pd({scrapeMotionValuesFromProps:jd,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function Hd(e,t,n){for(const r in t)!pl(t[r])&&!Sd(r,n)&&(e[r]=t[r])}function Wd(e,t){const r={},o=function(e,t){const r={};return Hd(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t){return(0,n.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Dd(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const $d=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ud(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||$d.has(e)}let qd=e=>!Ud(e);try{(Yd=require("@emotion/is-prop-valid").default)&&(qd=e=>e.startsWith("on")?!Ud(e):Yd(e))}catch{}var Yd;function Kd(e,t,r,o){const i=(0,n.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Fd(n,t,Bd(o),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Hd(t,e.style,e),i.style={...t,...i.style}}return i}function Zd(e=!1){return(t,r,o,{latestValues:i},a)=>{const s=(wd(t)?Kd:Wd)(r,i,a,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(qd(o)||!0===n&&Ud(o)||!t&&!Ud(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof t,e),c=t!==n.Fragment?{...l,...s,ref:o}:{},{children:u}=r,d=(0,n.useMemo)(()=>pl(u)?u.get():u,[u]);return(0,n.createElement)(t,{...c,children:d})}}function Gd(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return vd({...wd(n)?zd:Vd,preloadedFeatures:e,useRender:Zd(r),createVisualElement:t,Component:n})}}const Xd={current:null},Jd={current:!1},Qd=new WeakMap,ef=[...ua,Oa,Ra],tf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class nf{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ya,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Qa.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,vi.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=fd(t),this.isVariantNode=pd(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!(!e||!e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==s[e]&&pl(t)&&t.set(s[e],!1)}}mount(e){this.current=e,Qd.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),Jd.current||function(){if(Jd.current=!0,ad)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xd.current=e.matches;e.addListener(t),t()}else Xd.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Xd.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Qd.delete(this.current),this.projection&&this.projection.unmount(),bi(this.notifyUpdate),bi(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=ii.has(e),r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&vi.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in gd){const t=gd[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tf.length;t++){const n=tf[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(pl(o))e.addValue(r,o);else if(pl(i))e.addValue(r,ll(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,ll(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=ll(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Li(r)||Ni(r))?r=parseFloat(r):!(e=>ef.find(ca(e)))(r)&&Ra.test(t)&&(r=Ya(e,t)),this.setBaseTarget(e,pl(r)?r.get():r)),pl(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=ei(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||pl(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new al),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class rf extends nf{constructor(){super(...arguments),this.KeyframeResolver=Za}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class of extends rf{constructor(){super(...arguments),this.type="html",this.renderInstance=Cd}readValueFromInstance(e,t){if(ii.has(t)){const e=qa(t);return e&&e.default||0}{const n=function(e){return window.getComputedStyle(e)}(e),r=(Bi(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Cc(e,t)}build(e,t,n){Dd(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return jd(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;pl(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class af extends rf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ic}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ii.has(t)){const e=qa(t);return e&&e.default||0}return t=_d.has(t)?t:ul(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Od(e,t,n)}build(e,t,n){Fd(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){kd(e,t,0,r)}mount(e){this.isSVGTag=Bd(e.tagName),super.mount(e)}}const sf=(e,t)=>wd(e)?new af(t):new of(t,{allowProjection:e!==n.Fragment}),lf=Ko(Gd({...Pl,...nd,...Yu,...rd},sf));class cf extends n.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function uf({children:e,isPresent:t}){const r=(0,n.useId)(),o=(0,n.useRef)(null),i=(0,n.useRef)({width:0,height:0,top:0,left:0}),{nonce:a}=(0,n.useContext)(od);return(0,n.useInsertionEffect)(()=>{const{width:e,height:n,top:s,left:l}=i.current;if(t||!o.current||!e||!n)return;o.current.dataset.motionPopId=r;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${n}px !important;\n top: ${s}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}},[t]),(0,s.jsx)(cf,{isPresent:t,childRef:o,sizeRef:i,children:n.cloneElement(e,{ref:o})})}const df=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:l})=>{const c=Ed(ff),u=(0,n.useId)(),d=(0,n.useCallback)(e=>{c.set(e,!0);for(const e of c.values())if(!e)return;o&&o()},[c,o]),f=(0,n.useMemo)(()=>({id:u,initial:t,isPresent:r,custom:i,onExitComplete:d,register:e=>(c.set(e,!1),()=>c.delete(e))}),a?[Math.random(),d]:[r,d]);return(0,n.useMemo)(()=>{c.forEach((e,t)=>c.set(t,!1))},[r]),n.useEffect(()=>{!r&&!c.size&&o&&o()},[r]),"popLayout"===l&&(e=(0,s.jsx)(uf,{isPresent:r,children:e})),(0,s.jsx)(Ec.Provider,{value:f,children:e})};function ff(){return new Map}const pf=e=>e.key||"";function hf(e){const t=[];return n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&t.push(e)}),t}const mf=({children:e,exitBeforeEnter:t,custom:r,initial:o=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:l="sync"})=>{Ri(!t,"Replace exitBeforeEnter with mode='wait'");const c=(0,n.useMemo)(()=>hf(e),[e]),u=c.map(pf),d=(0,n.useRef)(!0),f=(0,n.useRef)(c),p=Ed(()=>new Map),[h,m]=(0,n.useState)(c),[g,y]=(0,n.useState)(c);sd(()=>{d.current=!1,f.current=c;for(let e=0;e<g.length;e++){const t=pf(g[e]);u.includes(t)?p.delete(t):!0!==p.get(t)&&p.set(t,!1)}},[g,u.length,u.join("-")]);const v=[];if(c!==h){let e=[...c];for(let t=0;t<g.length;t++){const n=g[t],r=pf(n);u.includes(r)||(e.splice(t,0,n),v.push(n))}return"wait"===l&&v.length&&(e=v),y(hf(e)),void m(c)}const{forceRender:b}=(0,n.useContext)(Pc);return(0,s.jsx)(s.Fragment,{children:g.map(e=>{const t=pf(e),n=c===g||u.includes(t);return(0,s.jsx)(df,{isPresent:n,initial:!(d.current&&!o)&&void 0,custom:n?void 0:r,presenceAffectsLayout:a,mode:l,onExitComplete:n?void 0:()=>{if(!p.has(t))return;p.set(t,!0);let e=!0;p.forEach(t=>{t||(e=!1)}),e&&(null==b||b(),y(f.current),i&&i())},children:e},t)})})},gf=(0,n.createContext)(null);const yf=e=>!e.isLayoutDirty&&e.willUpdate(!1);function vf(){const e=new Set,t=new WeakMap,n=()=>e.forEach(yf);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const bf=e=>!0===e,xf=({children:e,id:t,inherit:r=!0})=>{const o=(0,n.useContext)(Pc),i=(0,n.useContext)(gf),[a,l]=function(){const e=function(){const e=(0,n.useRef)(!1);return sd(()=>(e.current=!0,()=>{e.current=!1}),[]),e}(),[t,r]=(0,n.useState)(0),o=(0,n.useCallback)(()=>{e.current&&r(t+1)},[t]);return[(0,n.useCallback)(()=>vi.postRender(o),[o]),t]}(),c=(0,n.useRef)(null),u=o.id||i;null===c.current&&((e=>bf(!0===e)||"id"===e)(r)&&u&&(t=t?u+"-"+t:u),c.current={id:t,group:bf(r)&&o.group||vf()});const d=(0,n.useMemo)(()=>({...c.current,forceRender:a}),[l]);return(0,s.jsx)(Pc.Provider,{value:d,children:e})},wf=(0,n.createContext)({}),Cf=()=>(0,n.useContext)(wf),_f=(0,n.createContext)(null),kf=({children:e,activeItem:t=null,onChange:r,className:o,size:i="sm",orientation:a="horizontal",variant:l="pill",iconPosition:c="left",width:u="full"})=>{const d=be(),f=Cf(),p=(null==f?void 0:f.activeItem)||t,h=(0,n.useCallback)((e,t)=>{r&&r({event:e,value:t})},[r]);let m,g="rounded-full",y="p-1",v="ring-1 ring-tab-border";"vertical"===a?m="gap-0.5":("rounded"===l||"pill"===l)&&("xs"===i||"sm"===i?m="gap-0.5":("md"===i||"lg"===i)&&(m="gap-1")),"rounded"===l||"vertical"===a?g="rounded-md":"underline"===l&&(g="rounded-none",y="p-0",v="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===i?m="gap-0":"sm"===i?m="gap-2.5":("md"===i||"lg"===i)&&(m="gap-3"));const b=fe(`box-border [&>*]:box-border flex items-center ${"full"===u?"w-full":""} ${"vertical"===a?"flex-col":""}`,g,y,m,v,"underline"!==l?"bg-tab-background":"",o);return(0,s.jsx)("div",{className:b,children:(0,s.jsx)(_f.Provider,{value:{activeItem:p,onChange:h,size:i,variant:l,orientation:a,iconPosition:c,width:u},children:(0,s.jsx)(xf,{id:d,children:n.Children.map(e,e=>(0,n.isValidElement)(e)?n.cloneElement(e):null)})})})};kf.displayName="Tabs.Group";const Sf=(0,n.forwardRef)(({slug:e,text:t,icon:r,className:o,disabled:i=!1,badge:a=null,...l},c)=>{const u=(0,n.useContext)(_f);if(!u)throw new Error("Tab should be used inside Tabs Group");const{activeItem:d,onChange:f,size:p,variant:h,orientation:m,iconPosition:g,width:y}=u,v={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===h?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===h?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===h?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[p],b=fe("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===y?"flex-1":"","vertical"===m?"w-full justify-between":"");let x="rounded-full";"rounded"===h?x="rounded-md":"underline"===h&&(x="rounded-none");const w=fe(b,"border-none",x,"hover:text-text-primary group","focus:outline-none",v,d===e?"bg-background-primary text-text-primary shadow-sm":"",i?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",o),C=fe("flex items-center gap-1 group-hover:text-text-primary",i&&"group-hover:text-text-disabled");return(0,s.jsxs)(lf.button,{ref:c,className:w,disabled:i,onClick:n=>{f(n,{slug:e,text:t})},...l,layoutRoot:!0,children:[d===e&&"underline"===h&&(0,s.jsx)(lf.span,{layoutId:"underline",layoutDependency:d,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),(0,s.jsxs)("span",{className:C,children:["left"===g&&r&&(0,s.jsx)("span",{className:"mr-1 contents center-center transition duration-150",children:r}),t,"right"===g&&r&&(0,s.jsx)("span",{className:"ml-1 contents center-center transition duration-150",children:r})]}),a&&(0,n.isValidElement)(a)&&a]})});Sf.displayName="Tabs.Tab";const jf=({activeItem:e,children:t})=>(0,s.jsx)(wf.Provider,{value:{activeItem:e},children:t}),Of=({slug:e,children:t})=>{const n=Cf();if(!n)throw new Error("TabPanel should be used inside Tabs");return e===n.activeItem?(0,s.jsx)(s.Fragment,{children:t}):null};Of.displayName="Tabs.Panel",jf.Group=kf,jf.Tab=Sf,jf.Panel=Of;const Ef={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-sm font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-sm font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-xs font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-base font-medium"}},Pf="group-disabled:text-field-color-disabled",Tf={sm:"w-[calc(100%+0.75rem)] translate-x-[-0.375rem]",md:"w-[calc(100%+1rem)] translate-x-[-0.5rem]",lg:"w-[calc(100%+1rem)] translate-x-[-0.5rem]"},Mf=e=>{var t;return"string"==typeof e?e:"object"==typeof e&&"textContent"in e?(null==(t=e.textContent)?void 0:t.toString().toLowerCase())||"":"object"==typeof e&&"children"in e?Mf(e.children):""},Af=(0,n.createContext)({}),Nf=()=>(0,n.useContext)(Af);function Df({children:e,icon:t=null,placeholder:r="Select an option",optionIcon:o=null,render:i,label:a,className:l,...c}){var u,d;const{sizeValue:f,getReferenceProps:p,getValues:h,selectId:m,refs:g,isOpen:y,multiple:v,combobox:b,setSelected:x,onChange:w,isControlled:C,disabled:_,by:k}=Nf(),S={sm:"xs",md:"sm",lg:"md"}[f],j=(0,n.useCallback)(()=>{if(t)return t;const e="text-field-placeholder group-disabled:text-icon-disabled";return b?(0,s.jsx)(Ae,{className:e}):(0,s.jsx)(Pe,{className:e})},[t]),O=(0,n.useCallback)(()=>{const t=h();if(!t)return null;if(v)return t.map((e,t)=>(0,s.jsx)(Ho,{className:"cursor-default",icon:o,type:"rounded",size:S,onMouseDown:E(e),label:"function"==typeof i?i(e):e.toString(),closable:!0,disabled:_},t));let r="string"==typeof t?t:"";if("function"==typeof i&&(r=i(t)),"function"==typeof e&&"function"!=typeof i){const n={value:t,...v?{onClose:E(t)}:{}};r=e(n)}return((0,n.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof i&&(r=e),(0,s.jsx)("span",{className:fe("truncate",Ef[f].displaySelected,Pf),children:r})},[h,_]),E=e=>t=>{null==t||t.preventDefault(),null==t||t.stopPropagation();const n=[...h()??[]],r=n.findIndex(t=>null!==t&&null!==e&&"object"==typeof t?t[k]===e[k]:t===e);-1!==r&&(n.splice(r,1),C||x(n),"function"==typeof w&&w(n))};return(0,s.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!a&&(0,s.jsx)("label",{className:fe(null==(u=Ef[f])?void 0:u.label,"text-field-label"),htmlFor:m,children:a}),(0,s.jsxs)("button",{id:m,ref:g.setReference,className:fe("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!y&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",Ef[f].selectButton,v&&Ef[f].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",l),tabIndex:0,disabled:_,...c,...p(),children:[(0,s.jsxs)("div",{className:fe("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",h()&&"flex flex-wrap"),children:[O(),(v?!(null!=(d=h())&&d.length):!h())&&(0,s.jsx)("div",{className:fe("[grid-area:1/1/2/3] text-field-input px-1",Ef[f].displaySelected,Pf),children:r})]}),(0,s.jsx)("div",{className:fe("flex items-center [&>svg]:shrink-0",Ef[f].icon),children:j()})]})]})}function If({label:e,children:t,className:r,...o}){const{index:i,totalGroups:a}=o,{sizeValue:l}=Nf();return(0,s.jsxs)(n.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,s.jsx)("div",{className:fe("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[l],r),id:`group-${null==e?void 0:e.toLowerCase().replace(/\s+/g,"-")}`,children:e}),(0,s.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${null==e?void 0:e.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),i<a&&!!(t&&n.Children.count(t)>0)&&(0,s.jsx)("hr",{className:fe("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",Tf[l])})]})}function Rf({children:e,className:t}){const{isOpen:r,context:o,refs:i,combobox:a,floatingStyles:l,getFloatingProps:c,sizeValue:u,setSearchKeyword:d,setActiveIndex:f,setSelectedIndex:p,value:h,selected:m,getValues:g,searchKeyword:y,listContentRef:v,by:b,searchPlaceholder:x,activeIndex:w,searchFn:C,debounceDelay:_}=Nf(),k=(0,n.useMemo)(()=>{const t=g();let r=-1;if(t){let o=n.Children.toArray(e);o.length>0&&(0,n.isValidElement)(o[0])&&o[0].type===If&&(o=n.Children.toArray(e).map(e=>(0,n.isValidElement)(e)?n.Children.toArray(e.props.children):[]).flat()),r=o.findIndex(e=>{if(!(0,n.isValidElement)(e))return!1;const r=e.props.value;return"object"==typeof r&&"object"==typeof t?r[b]===t[b]:r===t})}return r},[h,m,e,b]);(0,n.useLayoutEffect)(()=>{r||(f(k),p(k))},[k,r]),(0,n.useLayoutEffect)(()=>{r&&(a&&[-1,null].includes(w)||f(-1))},[y,r]);const S=(0,n.useMemo)(()=>{let t=0,r=0;n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&e.type===If&&n.Children.toArray(e.props.children).some(e=>{var t;if(!(0,n.isValidElement)(e))return!1;if(y&&!C){const n=null==(t=Mf(e.props.children))?void 0:t.toLowerCase(),r=y.toLowerCase();return n.includes(r)}return!0})&&t++}),r=Math.max(0,t-1);let o=0,i=0;const a=e=>{var t,s;if(!(0,n.isValidElement)(e))return null;if(e.type===If){const t=n.Children.map(e.props.children,a);if(!(null==t?void 0:t.some(e=>null!==e)))return null;const o={...e.props,children:t,index:i,totalGroups:r};return i++,(0,n.cloneElement)(e,o)}if(y&&!C){const n=null==(s=Mf(null==(t=e.props)?void 0:t.children))?void 0:s.toLowerCase(),r=y.toLowerCase();if(!(null==n?void 0:n.includes(r)))return null}return(0,n.cloneElement)(e,{...e.props,index:o++})};return n.Children.map(e,a)},[y,h,m,e,C]),j=n.Children.count(S);(0,n.useEffect)(()=>{v.current=[];let t=n.Children.toArray(e);t&&(0,n.isValidElement)(t[0])&&t[0].type===If&&(t=n.Children.toArray(t).map(e=>(0,n.isValidElement)(e)?e.props.children:null).filter(Boolean)),n.Children.forEach(t,e=>{var t,r;if(!(0,n.isValidElement)(e))return;const o=null==(r=Mf(null==(t=e.props)?void 0:t.children))?void 0:r.toLowerCase();if(y&&!C){const e=y.toLowerCase();if(!(null==o?void 0:o.includes(e)))return}v.current.push(o)})},[y,C]);const[O,E]=(0,n.useState)(!1),P=((e,t=500)=>{const r=(0,n.useRef)(null);return(0,n.useCallback)((...n)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>e(...n),t)},[e,t])})((0,n.useCallback)(async()=>{if(C&&"function"==typeof C&&!O){E(!0);try{await C(y)}catch(e){console.error(e)}finally{E(!1)}}},[y]),_);return(0,n.useEffect)(()=>{"function"==typeof C&&P()},[P]),(0,s.jsx)(s.Fragment,{children:r&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(ro,{context:o,modal:!1,children:(0,s.jsxs)("div",{ref:i.setFloating,className:fe("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",a&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",Ef[u].dropdown,!a&&"h-auto",a?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...l},...c(),children:[a&&(0,s.jsxs)("div",{className:fe(Ef[u].searchbarWrapper),children:[O?(0,s.jsx)(Uo,{className:Ef[u].searchbarIcon}):(0,s.jsx)(ze,{className:fe("text-icon-secondary shrink-0",Ef[u].searchbarIcon)}),(0,s.jsx)("input",{className:fe("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",Ef[u].searchbar),type:"search",name:"keyword",placeholder:x,onChange:e=>d(e.target.value),value:y,autoComplete:"off"})]}),(0,s.jsxs)("div",{className:fe("overflow-y-auto overflow-x-hidden",!a&&"w-full h-full",Ef[u].dropdownItemsWrapper),children:[!!j&&S,!j&&(0,s.jsx)("div",{className:"p-2 text-center text-base font-medium text-field-placeholder",children:"No items found"})]})]})})})})}function Lf({children:e,root:t,id:n}){return(0,s.jsx)(Zr,{id:n,root:t,children:e})}function Ff({value:e,selected:t,children:r,className:o,...i}){const{sizeValue:a,getItemProps:l,onKeyDownItem:c,onClickItem:u,activeIndex:d,selectedIndex:f,updateListRef:p,getValues:h,by:m,multiple:g}=Nf(),{index:y}=i,v=(0,n.useRef)(y),b=(0,n.useMemo)(()=>{if(!g)return!1;const t=h();return!!t&&t.some(t=>null!==t&&null!==e&&"object"==typeof t?t[m]===e[m]:t===e)},[e,h]),x=(0,n.useMemo)(()=>"boolean"==typeof t?t:g?b:y===f,[b,f,t]);return(0,s.jsxs)("div",{className:fe("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",{sm:"py-1.5 px-2 text-sm font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"}[a],y===d&&"bg-button-tertiary-hover",o),ref:e=>{p(y,e)},role:"option",tabIndex:y===d?0:-1,"aria-selected":x&&y===d,...l({onClick(){u(v.current,e)},onKeyDown(t){c(t,v.current,e)}}),children:[(0,s.jsx)("span",{className:"w-full truncate",children:r}),x&&(0,s.jsx)(Ee,{className:fe("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[a])})]})}const Bf=({id:e,size:t="md",value:r,defaultValue:o,onChange:i,by:a="id",children:l,multiple:c=!1,combobox:u=!1,disabled:d=!1,searchPlaceholder:f="Search...",searchFn:p,debounceDelay:h=500})=>{const m=(0,n.useMemo)(()=>e||`select-${be()}`,[e]),g=(0,n.useMemo)(()=>typeof r<"u",[r]),[y,v]=(0,n.useState)(o),[b,x]=(0,n.useState)(""),w=(0,n.useCallback)(()=>g?r:y,[g,r,y]),[C,_]=(0,n.useState)(!1),[k,S]=(0,n.useState)(null),[j,O]=(0,n.useState)(null),E={sm:u?256:172,md:u?256:216,lg:u?256:216},{refs:P,floatingStyles:T,context:M}=fo({placement:"bottom-start",open:C,onOpenChange:_,whileElementsMounted:In,middleware:[Yn(5),Zn({padding:10}),Gn({apply({rects:e,elements:n,availableHeight:r}){Object.assign(n.floating.style,{maxHeight:`min(${r}px, ${E[t]}px)`,maxWidth:`${e.reference.width}px`})},padding:10})]}),A=(0,n.useRef)([]),N=(0,n.useRef)([]),D=(0,n.useRef)(!1),I=ao(M,{event:"mousedown"}),R=uo(M),L=_o(M,{role:"listbox"}),F=function(e,t){const{open:r,onOpenChange:o,elements:i}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b,orientation:x="vertical",cols:w=1,scrollItemIntoView:C=!0,virtualItemRef:_,itemSizes:k,dense:S=!1}=t,j=Sr(Jr(i.floating)),O=Cr(),E=_r(),P=er(l),T=Nt(i.domReference),M=n.useRef(g),A=n.useRef(u??-1),N=n.useRef(null),D=n.useRef(!0),I=n.useRef(P),R=n.useRef(!!i.floating),L=n.useRef(r),F=n.useRef(!1),B=n.useRef(!1),z=Sr(b),V=Sr(r),H=Sr(C),W=Sr(u),[$,U]=n.useState(),[q,Y]=n.useState(),K=er(function(e,t,n){function r(e){m?(U(e.id),null==E||E.events.emit("virtualfocus",e),_&&(_.current=e)):Pr(e,{preventScroll:!0,sync:!(!jt()||!kt())&&(yo||F.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame(()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const a=H.current;a&&G&&(n||!D.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof a?{block:"nearest",inline:"nearest"}:a))})});pr(()=>{document.createElement("div").focus({get preventScroll(){return yo=!0,!1}})},[]),pr(()=>{c&&(r&&i.floating?M.current&&null!=u&&(B.current=!0,A.current=u,P(u)):R.current&&(A.current=-1,I.current(null)))},[c,r,i.floating,u,P]),pr(()=>{if(c&&r&&i.floating)if(null==s){if(F.current=!1,null!=W.current)return;if(R.current&&(A.current=-1,K(a,A)),(!L.current||!R.current)&&M.current&&(null!=N.current||!0===M.current&&null==N.current)){let e=0;const t=()=>{null==a.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(A.current=null==N.current||xo(N.current,x,h)||p?sr(a,z.current):lr(a,z.current),N.current=null,P(A.current))};t()}}else ar(a,s)||(A.current=s,K(a,A,B.current),B.current=!1)},[c,r,i.floating,s,W,p,a,x,h,P,K,z]),pr(()=>{var e;if(!c||i.floating||!E||m||!R.current)return;const t=E.nodesRef.current,n=null==(e=t.find(e=>e.id===O))||null==(e=e.context)?void 0:e.elements.floating,r=vt(Et(i.floating)),o=t.some(e=>e.context&&bt(e.context.elements.floating,r));n&&!o&&D.current&&n.focus({preventScroll:!0})},[c,i.floating,E,O,m]),pr(()=>{if(c&&E&&m&&!O)return E.events.on("virtualfocus",e),()=>{E.events.off("virtualfocus",e)};function e(e){Y(e.id),_&&(_.current=e)}},[c,E,m,O,_]),pr(()=>{I.current=P,R.current=!!i.floating}),pr(()=>{r||(N.current=null)},[r]),pr(()=>{L.current=r},[r]);const Z=null!=s,G=n.useMemo(()=>{function e(e){if(!r)return;const t=a.current.indexOf(e);-1!==t&&P(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...y&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;!D.current||"touch"===t||(A.current=-1,K(a,A),P(null),m||Pr(j.current,{preventScroll:!0}))}}}},[r,j,K,y,a,P,m]),X=er(e=>{if(D.current=!1,F.current=!0,229===e.which||!V.current&&e.currentTarget===j.current)return;if(p&&wo(e.key,x,h))return At(e),o(!1,e.nativeEvent,"list-navigation"),void(ot(i.domReference)&&(m?null==E||E.events.emit("virtualfocus",i.domReference):i.domReference.focus()));const t=A.current,n=sr(a,b),s=lr(a,b);if(T||("Home"===e.key&&(At(e),A.current=n,P(A.current)),"End"===e.key&&(At(e),A.current=s,P(A.current))),w>1){const t=k||Array.from({length:a.current.length},()=>({width:1,height:1})),r=function(e,t,n){const r=[];let o=0;return e.forEach((e,i)=>{let{width:a,height:s}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<a;n++)for(let r=0;r<s;r++)e.push(o+n+r*t);o%t+a<=t&&e.every(e=>null==r[e])?(e.forEach(e=>{r[e]=i}),l=!0):o++}}),[...r]}(t,w,S),o=r.findIndex(e=>null!=e&&!fr(a.current,e,b)),i=r.reduce((e,t,n)=>null==t||fr(a.current,t,b)?e:n,-1),l=r[function(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===tr){if(d&&At(n),-1===u)f=c;else if(f=cr(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||f<0)){const e=u%a,t=c%a,n=c-(t-e);f=t===e?c:t>e?n:n-a}ar(e,f)&&(f=u)}if(n.key===nr&&(d&&At(n),-1===u?f=l:(f=cr(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(f=cr(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),ar(e,f)&&(f=u)),"both"===r){const t=Lt(u/a);n.key===(i?rr:or)&&(d&&At(n),u%a!==a-1?(f=cr(e,{startingIndex:u,disabledIndices:s}),o&&ir(f,a,t)&&(f=cr(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(f=cr(e,{startingIndex:u-u%a-1,disabledIndices:s})),ir(f,a,t)&&(f=u)),n.key===(i?or:rr)&&(d&&At(n),u%a!==0?(f=cr(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&ir(f,a,t)&&(f=cr(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(f=cr(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),ir(f,a,t)&&(f=u));const r=Lt(c/a)===t;ar(e,f)&&(f=o&&r?n.key===(i?or:rr)?c:cr(e,{startingIndex:u-u%a-1,disabledIndices:s}):u)}return f}({current:r.map(e=>null!=e?a.current[e]:null)},{event:e,orientation:x,loop:f,rtl:h,cols:w,disabledIndices:dr([...b||a.current.map((e,t)=>fr(a.current,t)?t:void 0),void 0],r),minIndex:o,maxIndex:i,prevIndex:ur(A.current>s?n:A.current,t,r,w,e.key===nr?"bl":e.key===(h?rr:or)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(A.current=l,P(A.current)),"both"===x)return}if(bo(e.key,x)){if(At(e),r&&!m&&vt(e.currentTarget.ownerDocument)===e.currentTarget)return A.current=xo(e.key,x,h)?n:s,void P(A.current);xo(e.key,x,h)?A.current=f?t>=s?d&&t!==a.current.length?-1:n:cr(a,{startingIndex:t,disabledIndices:b}):Math.min(s,cr(a,{startingIndex:t,disabledIndices:b})):A.current=f?t<=n?d&&-1!==t?a.current.length:s:cr(a,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(n,cr(a,{startingIndex:t,decrement:!0,disabledIndices:b})),ar(a,A.current)?P(null):P(A.current)}}),J=n.useMemo(()=>m&&r&&Z&&{"aria-activedescendant":q||$},[m,r,Z,q,$]),Q=n.useMemo(()=>({"aria-orientation":"both"===x?void 0:x,...!Nt(i.domReference)&&J,onKeyDown:X,onPointerMove(){D.current=!0}}),[J,X,i.domReference,x]),ee=n.useMemo(()=>{function e(e){"auto"===g&&Ct(e.nativeEvent)&&(M.current=!0)}return{...J,onKeyDown(e){D.current=!1;const t=e.key.startsWith("Arrow"),n=["Home","End"].includes(e.key),i=t||n,s=function(e,t,n){return vo(t,n?e===rr:e===or,e===nr)}(e.key,x,h),l=wo(e.key,x,h),c=bo(e.key,x),d=(p?s:c)||"Enter"===e.key||""===e.key.trim();if(m&&r){const t=null==E?void 0:E.nodesRef.current.find(e=>null==e.parentId),r=E&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),Tr(e,o).forEach(e=>{t(e.id,i+1)})}(t,0),e.find(e=>e.id===n)}(E.nodesRef.current,t.id):null;if(i&&r&&_){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(s||l){var f,g;const n=(null==(f=r.context)?void 0:f.elements.domReference)===e.currentTarget,o=l&&!n?null==(g=r.context)?void 0:g.elements.domReference:s?a.current.find(e=>(null==e?void 0:e.id)===$):null;o&&(At(e),o.dispatchEvent(t),Y(void 0))}var y;if((c||n)&&r.context&&r.context.open&&r.parentId&&e.currentTarget!==r.context.elements.domReference)return At(e),void(null==(y=r.context.elements.domReference)||y.dispatchEvent(t))}return X(e)}if(r||v||!t){if(d&&(N.current=p&&c?null:e.key),p)return void(s&&(At(e),r?(A.current=sr(a,z.current),P(A.current)):o(!0,e.nativeEvent,"list-navigation")));c&&(null!=u&&(A.current=u),At(e),!r&&v?o(!0,e.nativeEvent,"list-navigation"):X(e),r&&P(A.current))}},onFocus(){r&&!m&&P(null)},onPointerDown:function(e){M.current=g,"auto"===g&&_t(e.nativeEvent)&&(M.current=!0)},onMouseDown:e,onClick:e}},[$,J,X,z,g,a,p,P,o,r,v,x,h,u,E,m,_]);return n.useMemo(()=>c?{reference:ee,floating:Q,item:G}:{},[c,ee,Q,G])}(M,{listRef:A,activeIndex:k,selectedIndex:j,onNavigate:S,loop:!0}),B=function(e,t){var r;const{open:o,dataRef:i}=e,{listRef:a,activeIndex:s,onMatch:l,onTypingChange:c,enabled:u=!0,findMatch:d=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:h=null}=t,m=n.useRef(),g=n.useRef(""),y=n.useRef(null!=(r=h??s)?r:-1),v=n.useRef(null),b=er(l),x=er(c),w=Sr(d),C=Sr(p);pr(()=>{o&&(clearTimeout(m.current),v.current=null,g.current="")},[o]),pr(()=>{var e;o&&""===g.current&&(y.current=null!=(e=h??s)?e:-1)},[o,h,s]);const _=er(e=>{e?i.current.typing||(i.current.typing=e,x(e)):i.current.typing&&(i.current.typing=e,x(e))}),k=er(e=>{function t(e,t,n){const r=w.current?w.current(t,n):t.find(e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase())));return r?e.indexOf(r):-1}const n=a.current;if(g.current.length>0&&" "!==g.current[0]&&(-1===t(n,n,g.current)?_(!1):" "===e.key&&At(e)),null==n||C.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;o&&" "!==e.key&&(At(e),_(!0)),n.every(e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())})&&g.current===e.key&&(g.current="",y.current=v.current),g.current+=e.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",y.current=v.current,_(!1)},f);const r=y.current,i=t(n,[...n.slice((r||0)+1),...n.slice(0,(r||0)+1)],g.current);-1!==i?(b(i),v.current=i):" "!==e.key&&(g.current="",_(!1))}),S=n.useMemo(()=>({onKeyDown:k}),[k]),j=n.useMemo(()=>({onKeyDown:k,onKeyUp(e){" "===e.key&&_(!1)}}),[k,_]);return n.useMemo(()=>u?{reference:S,floating:j}:{},[u,S,j])}(M,{listRef:N,activeIndex:k,selectedIndex:j,onMatch:C?S:O,onTypingChange(e){D.current=e}}),{getReferenceProps:z,getFloatingProps:V,getItemProps:H}=go([R,L,F,I,...u?[]:[B]]),W=(e,t)=>{if(c)return((e,t)=>{const n=[...w()??[]];-1===n.findIndex(e=>null!==e&&null!==t&&"object"==typeof e?e[a]===t[a]:e===t)&&(n.push(t),g||v(n),O(e),P.reference.current.focus(),_(!1),x(""),"function"==typeof i&&i(n))})(e,t);O(e),g||v(t),P.reference.current.focus(),_(!1),x(""),"function"==typeof i&&i(t)},$=(0,n.useCallback)((e,t)=>{A.current[e]=t},[]);return(0,s.jsx)(Af.Provider,{value:{selectedIndex:j,setSelectedIndex:O,activeIndex:k,setActiveIndex:S,selected:y,setSelected:v,handleSelect:W,combobox:u,sizeValue:t,multiple:c,onChange:i,isTypingRef:D,getItemProps:H,onClickItem:(e,t)=>{W(e,t)},onKeyDownItem:(e,t,n)=>{"Enter"===e.key&&(e.preventDefault(),W(t,n))," "===e.key&&!D.current&&(e.preventDefault(),W(t,n))},getValues:w,selectId:m,getReferenceProps:z,isOpen:C,value:r,updateListRef:$,refs:P,listContentRef:N,by:a,getFloatingProps:V,floatingStyles:T,context:M,searchKeyword:b,setSearchKeyword:x,disabled:d,isControlled:g,searchPlaceholder:f,searchFn:p,debounceDelay:h},children:l})};Bf.displayName="Select",Object.assign((0,n.memo)(Bf),{Portal:(0,n.memo)(Lf),Button:(0,n.memo)(Df),Options:(0,n.memo)(Rf),Option:(0,n.memo)(Ff),OptionGroup:(0,n.memo)(If)}),Lf.displayName="Select.Portal",Df.displayName="Select.Button",Rf.displayName="Select.Options",Ff.displayName="Select.Option",If.displayName="Select.OptionGroup";let zf=1;var Vf,Hf;Vf=new WeakMap,Hf=new WeakMap;const Wf=new class{constructor(){m(this,Vf),m(this,Hf),g(this,Vf,[]),g(this,Hf,[])}subscribe(e){return h(this,Hf).push(e),()=>{g(this,Hf,h(this,Hf).filter(t=>t!==e))}}publish(e){h(this,Hf).forEach(t=>t(e))}add(e){h(this,Vf).push(e),this.publish(e)}remove(e){return g(this,Vf,h(this,Vf).filter(t=>t.id!==e)),e}create(e){const{id:t,message:n="",jsx:r,...o}=e;if(!n&&"function"!=typeof r)return;const i="number"==typeof t?t:zf++;return h(this,Vf).find(e=>e.id===i)&&g(this,Vf,h(this,Vf).map(e=>e.id===i?(this.publish({...e,title:n,jsx:r,...o}),{...e,title:n,jsx:r,...o}):e)),this.add({id:i,title:n,jsx:r,...o}),i}update(e,t){const{render:n}=t;let r=t;switch(typeof n){case"function":r={jsx:n,...t};break;case"string":r={title:n,...t}}g(this,Vf,h(this,Vf).map(t=>t.id===e?(this.publish({...t,...r}),{...t,...r}):t))}dismiss(e){return e||h(this,Vf).forEach(e=>h(this,Hf).forEach(t=>t({id:e.id,dismiss:!0}))),h(this,Hf).forEach(t=>t({id:e,dismiss:!0})),e}history(){return h(this,Vf)}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}};Object.seal(Object.assign((e,t)=>Wf.default(e,t),{success:Wf.success.bind(Wf),error:Wf.error.bind(Wf),warning:Wf.warning.bind(Wf),info:Wf.info.bind(Wf),custom:Wf.custom.bind(Wf),dismiss:Wf.dismiss.bind(Wf),update:Wf.update.bind(Wf)},{getHistory:Wf.history.bind(Wf)}));let $f=!1;const Uf={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},qf={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},Yf="bg-background-inverse border-background-inverse",Kf={light:"text-icon-secondary",dark:"text-icon-inverse"},Zf=({toastItem:e,title:t="",content:r="",autoDismiss:o=!0,dismissAfter:i=5e3,theme:a="light",design:l="stack",icon:c,variant:u="neutral",removeToast:d})=>{var f,p,h,m,g,y,v;const b=(0,n.useRef)(0),x=(0,n.useRef)(0),w=(0,n.useRef)(),C=(e,t=i)=>{if(o&&!(i<0))return b.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof d&&d(e.id)},t)};(0,n.useEffect)(()=>{const t=i;return w.current=C(e,t),()=>{clearTimeout(w.current)}},[]),(0,n.useEffect)(()=>{null==e||!e.dismiss||"function"!=typeof d||d(e.id)},[e]);const _=()=>{var t,n;"function"==typeof d&&(null==(n=null==(t=null==e?void 0:e.action)?void 0:t.onClick)||n.call(t,()=>d(e.id)))};let k=null;return"stack"===l&&(k=(0,s.jsx)("div",{className:fe("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?Yf:null==(f=qf)?void 0:f[u],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(w.current),x.current=(new Date).getTime()},onMouseLeave:()=>{w.current=C(e,i-(x.current-b.current))},children:"custom"!==e.type?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Mo({variant:u,icon:c,theme:a})}),(0,s.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[No({title:t,theme:a}),Do({content:r,theme:a}),(null==(p=null==e?void 0:e.action)?void 0:p.label)&&"function"==typeof(null==(h=null==e?void 0:e.action)?void 0:h.onClick)&&(0,s.jsx)("div",{className:"mt-2.5",children:Ao({actionLabel:null==(m=null==e?void 0:e.action)?void 0:m.label,actionType:(null==(g=null==e?void 0:e.action)?void 0:g.type)??"button",onAction:_,theme:a})})]}),(0,s.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,s.jsx)("button",{className:fe("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Kf[a]??Kf.light),onClick:()=>{"function"==typeof d&&d(e.id)},children:(0,s.jsx)(Ue,{})})})]}):null==(y=null==e?void 0:e.jsx)?void 0:y.call(e,{close:()=>d(e.id),action:null!=e&&e.action?{...null==e?void 0:e.action,onClick:_}:null})})),"inline"===l&&(k=(0,s.jsxs)("div",{className:fe("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?Yf:null==(v=qf)?void 0:v[u],"lg:w-[47.5rem] w-full"),children:[(0,s.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Mo({variant:u,icon:c,theme:a})}),(0,s.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[No({title:t,theme:a}),Do({content:r,theme:a})]}),(0,s.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,s.jsx)("button",{className:fe("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Kf[a]??Kf.light),onClick:()=>d(e.id),children:(0,s.jsx)(Ue,{})})})]})),k},Gf=((e=>{(0,n.memo)(t=>{const n=t.singleTon;return $f&&n?null:($f=!0,(0,s.jsx)(e,{...t}))})})(({position:t="top-right",design:r="stack",theme:o="light",className:i="",autoDismiss:a=!0,dismissAfter:l=5e3})=>{const[c,u]=(0,n.useState)([]);(0,n.useEffect)(()=>{Wf.subscribe(t=>{null!=t&&t.dismiss?u(e=>e.map(e=>e.id===t.id?{...e,dismiss:!0}:e)):setTimeout(()=>{(0,e.flushSync)(()=>u(e=>-1!==e.findIndex(e=>e.id===t.id)?e.map(e=>e.id===t.id?{...e,...t}:e):[...e,t]))})})},[]);const d=e=>{u(t=>t.filter(t=>t.id!==e))};return(0,s.jsx)("ul",{className:fe("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",Uf[t]??Uf["top-right"],i),children:(0,s.jsx)(mf,{initial:!1,children:c.map(e=>(0,s.jsx)(lf.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,s.jsx)(Zf,{toastItem:e,title:e.title,content:null==e?void 0:e.description,icon:(null==e?void 0:e.icon)??void 0,design:(null==e?void 0:e.design)??r,autoDismiss:(null==e?void 0:e.autoDismiss)??a,dismissAfter:(null==e?void 0:e.dismissAfter)??l,removeToast:d,variant:e.type,theme:(null==e?void 0:e.theme)??o})},e.id))})})}),{sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}}),Xf={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},Jf={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},Qf={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},ep={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},tp={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},np={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},rp={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},op={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},ip={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},ap={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},sp={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},lp={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},cp={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},up={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},dp={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},fp={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},pp=(e,t,n,r="sm")=>{var o,i,a,s,l;const c=[];switch(typeof e){case"object":for(const[r,a]of Object.entries(e))t[r]&&c.push((null==(o=null==t?void 0:t[r])?void 0:o[a])??(null==(i=null==t?void 0:t[r])?void 0:i[null==n?void 0:n[r]])??"");break;case"string":case"number":const u=r;c.push((null==(a=null==t?void 0:t[u])?void 0:a[e])??(null==(s=null==t?void 0:t[u])?void 0:s[null==n?void 0:n[u]])??"");break;default:if(void 0===e)break;c.push((null==(l=null==t?void 0:t[r])?void 0:l[n])??"")}return c.join(" ")},hp=({className:e,cols:t,gap:n,gapX:r,gapY:o,align:i,justify:a,gridFlow:l,colsSubGrid:c=!1,rowsSubGrid:u=!1,autoRows:d=!1,autoCols:f=!1,children:p,...h})=>{const m=pp(t,Gf,1),g=pp(n,Xf,"sm"),y=pp(r,Jf,""),v=pp(o,Qf,""),b=pp(i,op,""),x=pp(a,rp,""),w=pp(l,np,"");return(0,s.jsx)("div",{className:fe("grid",{"grid-cols-subgrid":c,"grid-rows-subgrid":u,"auto-cols-auto":f,"auto-rows-auto":d},m,g,y,v,b,x,w,e),...h,children:p})};hp.Item=({className:e,children:t,colSpan:n,colStart:r,alignSelf:o,justifySelf:i,...a})=>{const l=pp(n,ep,0),c=pp(r,tp,0),u=pp(o,ip,""),d=pp(i,ap,"");return(0,s.jsx)("div",{className:fe(l,c,u,d,e),...a,children:t})};const mp=(0,n.createContext)({}),gp=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:o,justify:i,align:a,wrap:l,cols:c,className:u,children:d,...f})=>{if("grid"===e)return(0,s.jsx)(mp.Provider,{value:{containerType:e},children:(0,s.jsx)(hp,{className:u,gap:t,gapX:n,gapY:r,cols:c,children:d,align:a,justify:i,...f})});const p=pp(l,lp,""),h=pp(t,Xf,"sm"),m=pp(n,Jf,""),g=pp(r,Qf,""),y=pp(o,sp,""),v=pp(i,rp,""),b=pp(a,op,""),x=fe("flex",p,h,m,g,y,v,b,u);return(0,s.jsx)(mp.Provider,{value:{containerType:e,cols:c},children:"flex"===e?(0,s.jsx)("div",{className:x,children:d}):(0,s.jsx)(hp,{className:u,gap:t,gapX:n,gapY:r,cols:c,children:d,align:a,justify:i,...f})})},yp=({grow:e,shrink:t,order:r,alignSelf:o,justifySelf:i,className:a,children:l,...c})=>{const{containerType:u,cols:d}=(0,n.useContext)(mp);if("grid"===u)return(0,s.jsx)(hp.Item,{className:a,alignSelf:o,justifySelf:i,children:l,...c});const f=pp(o,ip,""),p=pp(i,ap,""),h=pp(e,dp,0),m=pp(t,fp,0),g=pp(r,up,0),y=pp(d,cp,1);return(0,s.jsx)("div",{className:fe("box-border",h,m,g,f,p,y,a),children:l})};gp.Item=yp,gp.displayName="Container",yp.displayName="Container.Item";var vp=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const bp=(0,n.createContext)(null);function xp(){const e=(0,n.useContext)(bp);return null==e&&vp(8),e}function Cp({defaultSelection:e}){const[t]=xp();return(0,n.useEffect)(()=>{t.focus(()=>{const e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})},{defaultSelection:e})},[e,t]),null}const _p={},kp={},Sp={},jp={},Op={},Ep={},Pp={},Tp={},Mp={},Ap={},Np={},Dp={},Ip={},Rp={},Lp={},Fp={},Bp={},zp={},Vp={},Hp={},Wp={},$p={},Up={},qp={},Yp={},Kp={},Zp={},Gp={},Xp={},Jp={},Qp={},eh={},th={},nh={},rh={},oh={},ih={},ah={},sh={},lh={},ch=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,uh=ch&&"documentMode"in document?document.documentMode:null,dh=ch&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),fh=ch&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ph=!(!ch||!("InputEvent"in window)||uh)&&"getTargetRanges"in new window.InputEvent("input"),hh=ch&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),mh=ch&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,gh=ch&&/Android/.test(navigator.userAgent),yh=ch&&/^(?=.*Chrome).*/i.test(navigator.userAgent),vh=ch&&gh&&yh,bh=ch&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!yh,xh=0,wh=1,Ch=2,_h=1,kh=2,Sh=3,jh=4,Oh=5,Eh=6,Ph=hh||mh||bh?" ":"",Th="\n\n",Mh=fh?" ":Ph,Ah="֑-߿יִ-﷽ﹰ-ﻼ",Nh="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Dh=new RegExp("^[^"+Nh+"]*["+Ah+"]"),Ih=new RegExp("^[^"+Ah+"]*["+Nh+"]"),Rh={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},Lh={directionless:1,unmergeable:2},Fh={center:2,end:6,justify:4,left:1,right:3,start:5},Bh={[kh]:"center",[Eh]:"end",[jh]:"justify",[_h]:"left",[Sh]:"right",[Oh]:"start"},zh={normal:0,segmented:2,token:1},Vh={[xh]:"normal",[Ch]:"segmented",[wh]:"token"};var Hh=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function Wh(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}let $h=!1,Uh=0;function qh(e){Uh=e.timeStamp}function Yh(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function Kh(e,t,n){const r=rg(n._window);let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const a=e.nodeValue;null!==a&&Nm(t,a,o,i,!1)}function Zh(e,t,n){if(Ky(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return 3===t.nodeType&&n.isAttached()}function Gh(e,t,n){$h=!0;const r=performance.now()-Uh>100;try{Rv(e,()=>{const o=sv()||e.getEditorState().read(()=>{const e=sv();return null!==e?e.clone():null}),i=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const d=t[n],f=d.type,p=d.target;let h=xm(p,s);if(!(null===h&&p!==a||Vv(h)))if("characterData"===f)r&&Fy(h)&&Zh(o,p,h)&&Kh(p,h,e);else if("childList"===f){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=bm(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&("BR"!==r.nodeName||!Yh(r,i,e))){if(fh){const e=r.innerText||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];("BR"===r.nodeName&&Yh(r,p,e)||l===r)&&(p.appendChild(r),t++)}r!==t&&(p===a&&(h=km(s)),i.set(p,h))}}}if(i.size>0)for(const[t,n]of i)if(Fv(n)){const r=n.getChildrenKeys();let o=t.firstChild;for(let n=0;n<r.length;n++){const i=r[n],a=e.getElementByKey(i);null!==a&&(null==o?(t.appendChild(a),o=a):o!==a&&t.replaceChild(a,o),o=o.nextSibling)}}else Fy(n)&&n.markDirty();const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||Yh(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&(o.dirty=!0,Sm(o)),fh&&Um(e)&&o.insertRawText(u))})}finally{$h=!1}}function Xh(e){const t=e._observer;null!==t&&Gh(e,t.takeRecords(),t)}function Jh(e){0===Uh&&Xm(e).addEventListener("textInput",qh,!0),e._observer=new MutationObserver((t,n)=>{Gh(e,t,n)})}function Qh(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,a=t.__format,s=t.__style;return!(null!==n&&n!==i||null!==r&&r!==a||null!==o&&o!==s)}function em(e,t){const n=e.mergeWithSibling(t),r=Sv()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function tm(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&Fy(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(Qh(t,r)){r=em(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&Fy(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(Qh(r,n)){r=em(r,n);break}break}n.remove()}}else r.remove()}function nm(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),Fy(r)){e.set(r.__key,o?r.getTextContentSize():0,"text");break}if(!Fv(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element")}}let rm=1;const om="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function im(e){const t=document.activeElement;if(null===t)return!1;const n=t.nodeName;return Vv(xm(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==cm(t))}function am(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!im(t)&&lm(t)===e}catch{return!1}}function sm(e){return e instanceof Jv}function lm(e){let t=e;for(;null!=t;){const e=cm(t);if(sm(e))return e;t=Zm(t)}return null}function cm(e){return e?e.__lexicalEditor:null}function um(e){return e.isToken()||e.isSegmented()}function dm(e){return 3===e.nodeType}function fm(e){let t=e;for(;null!=t;){if(dm(t))return t;t=t.firstChild}return null}function pm(e,t,n){const r=Rh[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~Rh.superscript:"superscript"===t&&(o&=~Rh.subscript),o}function hm(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling();if(null===o)if(null!==i){const e=i.getWritable();r.__first=i.__key,e.__prev=null}else r.__first=null;else{const e=o.getWritable();if(null!==i){const t=i.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;n.__prev=null}if(null===i)if(null!==o){const e=o.getWritable();r.__last=o.__key,e.__next=null}else r.__last=null;else{const e=i.getWritable();if(null!==o){const t=o.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function mm(e){_v();const t=e.getLatest(),n=t.__parent,r=kv(),o=Sv(),i=r._nodeMap,a=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,a);const s=t.__key;o._dirtyType=1,Fv(e)?a.set(s,!0):o._dirtyLeaves.add(s)}function gm(e){Cv();const t=Sv(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=vm(n);null!==e&&e.getWritable()}if(null!==e){const t=vm(e);null!==t&&t.getWritable()}}}function ym(){return wv()?null:Sv()._compositionKey}function vm(e,t){const n=(t||kv())._nodeMap.get(e);return void 0===n?null:n}function bm(e,t){const n=e[`__lexicalKey_${Sv()._key}`];return void 0!==n?vm(n,t):null}function xm(e,t){let n=e;for(;null!=n;){const e=bm(n,t);if(null!==e)return e;n=Zm(n)}return null}function wm(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Cm(e){return e.read(()=>_m().getTextContent())}function _m(){return km(kv())}function km(e){return e._nodeMap.get("root")}function Sm(e){Cv();const t=kv();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function jm(e){const t=Sv(),n=function(e,t){let n=e;for(;null!=n;){const e=n[`__lexicalKey_${t._key}`];if(void 0!==e)return e;n=Zm(n)}return null}(e,t);return null===n?e===t.getRootElement()?vm("root"):null:vm(n)}function Om(e,t){return t?e.getTextContentSize():0}function Em(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Pm(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function Tm(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Mm(e){return 3===e.nodeType?e.nodeValue:null}function Am(e,t,n){const r=rg(t._window);if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:a}=r;if(null!==o){let t=Mm(o);const r=xm(o);if(null!==t&&Fy(r)){if(t===Ph&&n){const e=n.length;t=n,i=e,a=e}null!==t&&Nm(r,t,i,a,e)}}}function Nm(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const a=i.isComposing();let s=t;(a||o)&&t[t.length-1]===Ph&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(gm(null),hh||mh||bh)i.remove();else{const e=Sv();setTimeout(()=>{e.update(()=>{i.isAttached()&&i.remove()})},20)}return}const t=i.getParent(),o=lv(),l=i.getTextContentSize(),c=ym(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!a||Ky(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!a||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const d=sv();if(!Ky(d)||null===n||null===r)return void i.setTextContent(s);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=Ly(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function Dm(e){return"ArrowLeft"===e}function Im(e){return"ArrowRight"===e}function Rm(e,t){return dh?e:t}function Lm(e){return"Enter"===e}function Fm(e){return"Backspace"===e}function Bm(e){return"Delete"===e}function zm(e,t,n){return"a"===e.toLowerCase()&&Rm(t,n)}function Vm(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=Wh(o);return n[t]=e,e}return o}function Hm(e,t,n,r,o){if(0===n.size)return;const i=r.__type,a=r.__key,s=t.get(i);void 0===s&&Hh(33,i);const l=s.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(a),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(a,d?"updated":o)}function Wm(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function $m(e,t){const n=e.offset;if("element"===e.type)return Wm(e.getNode(),t,n);{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?Wm(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function Um(e){const t=Xm(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function qm(e,t,n){return Nv(e,t,n)}function Ym(e){return!Wv(e)&&!e.isLastChild()&&!e.isInline()}function Km(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&Hh(75,t),n}function Zm(e){const t=e.assignedSlot||e.parentElement;return null!==t&&11===t.nodeType?t.host:t}function Gm(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function Xm(e){const t=e._window;return null===t&&Hh(78),t}function Jm(e){return Wv(e)||Fv(e)&&e.isShadowRoot()}function Qm(e){const t=Sv(),n=e.constructor.getType(),r=t._nodes.get(n);void 0===r&&Hh(97);const o=r.replace;if(null!==o){const t=o(e);return t instanceof e.constructor||Hh(98),t}return e}function eg(e,t){!Wv(e.getParent())||Fv(t)||Vv(t)||Hh(99)}function tg(e){return(Vv(e)||Fv(e)&&!e.canBeEmpty())&&!e.isInline()}function ng(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function rg(e){return ch?(e||window).getSelection():null}function og(e){return 1===e.nodeType}function ig(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function ag(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function sg(e){if(Wv(e)||Vv(e)&&!e.isInline())return!0;if(!Fv(e)||Jm(e))return!1;const t=e.getFirstChild(),n=null===t||xy(t)||Fy(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function lg(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const cg=new WeakMap,ug=new Map;function dg(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function fg(e,t,n,r,o,i){let a=e.getFirstChild();for(;null!==a;){const e=a.__key;a.__parent===t&&(Fv(a)&&fg(a,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),a=a.getNextSibling()}}let pg,hg,mg,gg,yg,vg,bg,xg,wg,Cg,_g="",kg="",Sg=null,jg="",Og="",Eg=!1,Pg=!1,Tg=null;function Mg(e,t){const n=bg.get(e);if(null!==t){const n=qg(e);n.parentNode===t&&t.removeChild(n)}if(xg.has(e)||hg._keyToDOMMap.delete(e),Fv(n)){const e=Hg(n,bg);Ag(e,0,e.length-1,null)}void 0!==n&&Hm(Cg,mg,gg,n,"destroyed")}function Ag(e,t,n,r){let o=t;for(;o<=n;++o){const t=e[o];void 0!==t&&Mg(t,r)}}function Ng(e,t){e.setProperty("text-align",t)}const Dg="40px";function Ig(e,t){const n=pg.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||Dg;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function Rg(e,t){const n=e.style;0===t?Ng(n,""):1===t?Ng(n,"left"):2===t?Ng(n,"center"):3===t?Ng(n,"right"):4===t?Ng(n,"justify"):5===t?Ng(n,"start"):6===t&&Ng(n,"end")}function Lg(e,t,n){const r=xg.get(e);void 0===r&&Hh(60);const o=r.createDOM(pg,hg);if(function(e,t,n){const r=n._keyToDOMMap;t["__lexicalKey_"+n._key]=e,r.set(e,t)}(e,o,hg),Fy(r)?o.setAttribute("data-lexical-text","true"):Vv(r)&&o.setAttribute("data-lexical-decorator","true"),Fv(r)){const e=r.__indent,t=r.__size;if(0!==e&&Ig(o,e),0!==t){const e=t-1;!function(e,t,n,r){const o=kg;kg="",Fg(e,n,0,t,r,null),Vg(n,r),kg=o}(Hg(r,xg),e,r,o)}const n=r.__format;0!==n&&Rg(o,n),r.isInline()||zg(null,r,o),Ym(r)&&(_g+=Th,Og+=Th)}else{const t=r.getTextContent();if(Vv(r)){const t=r.decorate(hg,pg);null!==t&&$g(e,t),o.contentEditable="false"}else Fy(r)&&(r.isDirectionless()||(kg+=t));_g+=t,Og+=t}if(null!==t)if(null!=n)t.insertBefore(o,n);else{const e=t.__lexicalLineBreak;null!=e?t.insertBefore(o,e):t.appendChild(o)}return Hm(Cg,mg,gg,r,"created"),o}function Fg(e,t,n,r,o,i){const a=_g;_g="";let s=n;for(;s<=r;++s){Lg(e[s],o,i);const t=xg.get(e[s]);null!==t&&Fy(t)&&(null===Sg&&(Sg=t.getFormat()),""===jg&&(jg=t.getStyle()))}Ym(t)&&(_g+=Th),o.__lexicalTextContent=_g,_g=a+_g}function Bg(e,t){const n=t.get(e);return xy(n)||Vv(n)&&n.isInline()}function zg(e,t,n){const r=null!==e&&(0===e.__size||Bg(e.__last,bg)),o=0===t.__size||Bg(t.__last,xg);if(r){if(!o){const e=n.__lexicalLineBreak;if(null!=e)try{n.removeChild(e)}catch(t){if("object"==typeof t&&null!=t){const r=`${t.toString()} Parent: ${n.tagName}, child: ${e.tagName}.`;throw new Error(r)}throw t}n.__lexicalLineBreak=null}}else if(o){const e=document.createElement("br");n.__lexicalLineBreak=e,n.appendChild(e)}}function Vg(e,t){const n=t.__lexicalDirTextContent,r=t.__lexicalDir;if(n!==kg||r!==Tg){const n=""===kg,i=n?Tg:(o=kg,Dh.test(o)?"rtl":Ih.test(o)?"ltr":null);if(i!==r){const o=t.classList,a=pg.theme;let s=null!==r?a[r]:void 0,l=null!==i?a[i]:void 0;if(void 0!==s){if("string"==typeof s){const e=Wh(s);s=a[r]=e}o.remove(...s)}if(null===i||n&&"ltr"===i)t.removeAttribute("dir");else{if(void 0!==l){if("string"==typeof l){const e=Wh(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}Pg||(e.getWritable().__dir=i)}Tg=i,t.__lexicalDirTextContent=kg,t.__lexicalDir=i}var o}function Hg(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&Hh(101),n.push(r),r=e.__next}return n}function Wg(e,t){const n=bg.get(e);let r=xg.get(e);void 0!==n&&void 0!==r||Hh(61);const o=Eg||vg.has(e)||yg.has(e),i=Km(hg,e);if(n===r&&!o){if(Fv(n)){const e=i.__lexicalTextContent;void 0!==e&&(_g+=e,Og+=e);const t=i.__lexicalDirTextContent;void 0!==t&&(kg+=t)}else{const e=n.getTextContent();Fy(n)&&!n.isDirectionless()&&(kg+=e),Og+=e,_g+=e}return i}if(n!==r&&o&&Hm(Cg,mg,gg,r,"updated"),r.updateDOM(n,i,pg)){const n=Lg(e,null,null);return null===t&&Hh(62),t.replaceChild(n,i),Mg(e,null),n}if(Fv(n)&&Fv(r)){const e=r.__indent;e!==n.__indent&&Ig(i,e);const t=r.__format;t!==n.__format&&Rg(i,t),o&&(function(e,t,n){const r=kg;var o,i;kg="",Sg=null,jg="",function(e,t,n){const r=_g,o=e.__size,i=t.__size;if(_g="",1===o&&1===i){const r=e.__first,o=t.__first;if(r===o)Wg(r,n);else{const e=qg(r),t=Lg(o,null,null);try{n.replaceChild(t,e)}catch(i){if("object"==typeof i&&null!=i){const a=`${i.toString()} Parent: ${n.tagName}, new child: {tag: ${t.tagName} key: ${o}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw new Error(a)}throw i}Mg(r,null)}const i=xg.get(o);Fy(i)&&(null===Sg&&(Sg=i.getFormat()),""===jg&&(jg=i.getStyle()))}else{const r=Hg(e,bg),a=Hg(t,xg);if(0===o)0!==i&&Fg(a,t,0,i-1,n,null);else if(0===i){if(0!==o){const e=null==n.__lexicalLineBreak;Ag(r,0,o-1,e?null:n),e&&(n.textContent="")}}else!function(e,t,n,r,o,i){const a=r-1,s=o-1;let l,c,u=i.firstChild,d=0,f=0;for(;d<=a&&f<=s;){const e=t[d],r=n[f];if(e===r)u=Ug(Wg(r,i)),d++,f++;else{void 0===l&&(l=new Set(t)),void 0===c&&(c=new Set(n));const o=c.has(e),a=l.has(r);if(o)if(a){const e=Km(hg,r);e===u?u=Ug(Wg(r,i)):(null!=u?i.insertBefore(e,u):i.appendChild(e),Wg(r,i)),d++,f++}else Lg(r,i,u),f++;else u=Ug(qg(e)),Mg(e,i),d++}const o=xg.get(r);null!==o&&Fy(o)&&(null===Sg&&(Sg=o.getFormat()),""===jg&&(jg=o.getStyle()))}const p=d>a,h=f>s;if(p&&!h){const t=n[s+1];Fg(n,e,f,s,i,void 0===t?null:hg.getElementByKey(t))}else h&&!p&&Ag(t,d,a,i)}(t,r,a,o,i,n)}Ym(t)&&(_g+=Th),n.__lexicalTextContent=_g,_g=r+_g}(e,t,n),Vg(t,n),Gv(o=t)&&null!=Sg&&Sg!==o.__textFormat&&!Pg&&(o.setTextFormat(Sg),o.setTextStyle(jg)),Gv(i=t)&&""!==jg&&jg!==i.__textStyle&&!Pg&&i.setTextStyle(jg),kg=r}(n,r,i),Wv(r)||r.isInline()||zg(n,r,i)),Ym(r)&&(_g+=Th,Og+=Th)}else{const t=r.getTextContent();if(Vv(r)){const t=r.decorate(hg,pg);null!==t&&$g(e,t)}else Fy(r)&&!r.isDirectionless()&&(kg+=t);_g+=t,Og+=t}if(!Pg&&Wv(r)&&r.__cachedText!==Og){const e=r.getWritable();e.__cachedText=Og,r=e}return i}function $g(e,t){let n=hg._pendingDecorators;const r=hg._decorators;if(null===n){if(r[e]===t)return;n=wm(hg)}n[e]=t}function Ug(e){let t=e.nextSibling;return null!==t&&t===hg._blockCursorElement&&(t=t.nextSibling),t}function qg(e){const t=wg.get(e);return void 0===t&&Hh(75,e),t}const Yg=Object.freeze({}),Kg=[["keydown",function(e,t){if(Zg=e.timeStamp,Gg=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;qm(t,Rp,e)||null!=n&&(function(e,t,n,r){return Im(e)&&!t&&!r&&!n}(n,o,a,i)?qm(t,Lp,e):function(e,t,n,r,o){return Im(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?qm(t,Fp,e):function(e,t,n,r){return Dm(e)&&!t&&!r&&!n}(n,o,a,i)?qm(t,Bp,e):function(e,t,n,r,o){return Dm(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?qm(t,zp,e):function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i)?qm(t,Vp,e):function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i)?qm(t,Hp,e):function(e,t){return Lm(e)&&t}(n,r)?(ny=!0,qm(t,Wp,e)):function(e){return" "===e}(n)?qm(t,$p,e):function(e,t){return dh&&t&&"o"===e.toLowerCase()}(n,o)?(e.preventDefault(),ny=!0,qm(t,jp,!0)):function(e,t){return Lm(e)&&!t}(n,r)?(ny=!1,qm(t,Wp,e)):function(e,t,n,r){return dh?!t&&!n&&(Fm(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&Fm(e)}(n,a,i,o)?Fm(n)?qm(t,Up,e):(e.preventDefault(),qm(t,Sp,!0)):function(e){return"Escape"===e}(n)?qm(t,qp,e):function(e,t,n,r,o){return dh?!(n||r||o)&&(Bm(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&Bm(e)}(n,o,r,a,i)?Bm(n)?qm(t,Yp,e):(e.preventDefault(),qm(t,Sp,!1)):function(e,t,n){return Fm(e)&&(dh?t:n)}(n,a,o)?(e.preventDefault(),qm(t,Mp,!0)):function(e,t,n){return Bm(e)&&(dh?t:n)}(n,a,o)?(e.preventDefault(),qm(t,Mp,!1)):function(e,t){return dh&&t&&Fm(e)}(n,i)?(e.preventDefault(),qm(t,Ap,!0)):function(e,t){return dh&&t&&Bm(e)}(n,i)?(e.preventDefault(),qm(t,Ap,!1)):function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&Rm(n,r)}(n,a,i,o)?(e.preventDefault(),qm(t,Np,"bold")):function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&Rm(n,r)}(n,a,i,o)?(e.preventDefault(),qm(t,Np,"underline")):function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&Rm(n,r)}(n,a,i,o)?(e.preventDefault(),qm(t,Np,"italic")):function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i)?qm(t,Kp,e):function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&Rm(n,r)}(n,r,i,o)?(e.preventDefault(),qm(t,Dp,void 0)):function(e,t,n,r){return dh?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o)?(e.preventDefault(),qm(t,Ip,void 0)):Gy(t._editorState._selection)?function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(dh?n:r)}(n,r,i,o)?(e.preventDefault(),qm(t,Qp,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(dh?n:r)}(n,r,i,o)?(e.preventDefault(),qm(t,eh,e)):zm(n,i,o)&&(e.preventDefault(),qm(t,th,e)):!fh&&zm(n,i,o)&&(e.preventDefault(),qm(t,th,e)),function(e,t,n,r){return e||t||n||r}(o,r,a,i)&&qm(t,lh,e))}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;n instanceof Node&&"touch"!==r&&Rv(t,()=>{Vv(xm(n))||(ty=!0)})}],["compositionstart",function(e,t){Rv(t,()=>{const n=sv();if(Ky(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();gm(r.key),(e.timeStamp<Zg+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||Fy(o)&&o.getStyle()!==n.style)&&qm(t,Ep,Mh)}})}],["compositionend",function(e,t){fh?ry=!0:Rv(t,()=>{cy(t,e.data)})}],["input",function(e,t){e.stopPropagation(),Rv(t,()=>{const n=sv(),r=e.data,o=ly(e);if(null!=r&&Ky(n)&&iy(n,o,r,e.timeStamp,!1)){ry&&(cy(t,r),ry=!1);const o=n.anchor.getNode(),i=rg(t._window);if(null===i)return;const a=n.isBackward(),s=a?n.anchor.offset:n.focus.offset,l=a?n.focus.offset:n.anchor.offset;ph&&!n.isCollapsed()&&Fy(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===Mm(i.anchorNode)||qm(t,Ep,r);const c=r.length;fh&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),hh||mh||bh||!t.isComposing()||(Zg=0,gm(null))}else Am(!1,t,null!==r?r:void 0),ry&&(cy(t,r||void 0),ry=!1);Cv(),Xh(Sv())}),Jg=null}],["click",function(e,t){Rv(t,()=>{const n=sv(),r=rg(t._window),o=lv();if(r)if(Ky(n)){const t=n.anchor,i=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!Wv(i)&&1===_m().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):3===e.detail&&!n.isCollapsed()&&i!==n.focus.getNode()&&(Fv(i)?i.select(0):i.getParentOrThrow().select(0))}else if("touch"===e.pointerType){const n=r.anchorNode;if(null!==n){const i=n.nodeType;(1===i||3===i)&&Sm(av(o,r,t,e))}}qm(t,kp,e)})}],["cut",Yg],["copy",Yg],["dragstart",Yg],["dragover",Yg],["dragend",Yg],["paste",Yg],["focus",Yg],["blur",Yg],["drop",Yg]];ph&&Kg.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=ly(e);"deleteCompositionText"===n||fh&&Um(t)||"insertCompositionText"!==n&&Rv(t,()=>{const o=sv();if("deleteContentBackward"===n){if(null===o){const e=lv();if(!Ky(e))return;Sm(e.clone())}if(Ky(o)){const n=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===Gg&&i<Zg+30&&t.isComposing()&&n){if(gm(null),Zg=0,setTimeout(()=>{Rv(t,()=>{gm(null)})},30),Ky(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),Fy(e)||Hh(142),o.style=e.getStyle()}}else{gm(null),e.preventDefault();const r=o.anchor.getNode().getTextContent(),i=0===o.anchor.offset&&o.focus.offset===r.length;vh&&n&&!i||qm(t,Sp,!0)}return}}var i;if(!Ky(o))return;const a=e.data;null!==Jg&&Am(!1,t,Jg),o.dirty&&null===Jg||!o.isCollapsed()||Wv(o.anchor.getNode())||null===r||o.applyDOMRange(r),Jg=null;const s=o.anchor,l=o.focus,c=s.getNode(),u=l.getNode();if("insertText"!==n&&"insertTranspose"!==n)switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":qm(t,Ep,e);break;case"insertFromComposition":gm(null),qm(t,Ep,e);break;case"insertLineBreak":gm(null),qm(t,jp,!1);break;case"insertParagraph":gm(null),ny&&!mh?(ny=!1,qm(t,jp,!1)):qm(t,Op,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":qm(t,Pp,e);break;case"deleteByComposition":((d=c)!==(f=u)||Fv(d)||Fv(f)||!d.isToken()||!f.isToken())&&qm(t,Tp,e);break;case"deleteByDrag":case"deleteByCut":qm(t,Tp,e);break;case"deleteContent":qm(t,Sp,!1);break;case"deleteWordBackward":qm(t,Mp,!0);break;case"deleteWordForward":qm(t,Mp,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":qm(t,Ap,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":qm(t,Ap,!1);break;case"formatStrikeThrough":qm(t,Np,"strikethrough");break;case"formatBold":qm(t,Np,"bold");break;case"formatItalic":qm(t,Np,"italic");break;case"formatUnderline":qm(t,Np,"underline");break;case"historyUndo":qm(t,Dp,void 0);break;case"historyRedo":qm(t,Ip,void 0)}else{if("\n"===a)e.preventDefault(),qm(t,jp,!1);else if(a===Th)e.preventDefault(),qm(t,Op,void 0);else if(null==a&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=a&&iy(o,r,a,e.timeStamp,!0)?(e.preventDefault(),qm(t,Ep,a)):Jg=a;Xg=e.timeStamp}var d,f})}(e,t)]);let Zg=0,Gg=null,Xg=0,Jg=null;const Qg=new WeakMap;let ey=!1,ty=!1,ny=!1,ry=!1,oy=[0,"",0,"root",0];function iy(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=Sv(),c=rg(l._window),u=null!==c?c.anchorNode:null,d=i.key,f=l.getElementByKey(d),p=n.length;return d!==a.key||!Fy(s)||(!o&&(!ph||Xg<r+50)||s.isDirty()&&p<2||Em(n))&&i.offset!==a.offset&&!s.isComposing()||um(s)||s.isDirty()&&p>1||(o||!ph)&&null!==f&&!s.isComposing()&&u!==fm(f)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=t.isToken();return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(Fy(t)||Fv(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function ay(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function sy(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}=e;ey&&(ey=!1,ay(r,o)&&ay(i,a))||Rv(t,()=>{if(!n)return void Sm(null);if(!am(t,r,i))return;const s=sv();if(Ky(s)){const n=s.anchor,r=n.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);const o=Xm(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,d]=oy,f=_m(),p=!1===t.isComposing()&&""===f.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)s.format=a,s.style=l;else if("text"===n.type)Fy(r)||Hh(141),s.format=r.getFormat(),s.style=r.getStyle();else if("element"===n.type&&!p){const e=n.getNode();s.style="",e instanceof Yv&&0===e.getChildrenSize()?(s.format=e.getTextFormat(),s.style=e.getTextStyle()):s.format=0}}else{const e=n.key,t=s.focus.key,r=s.getNodes(),i=r.length,l=s.isBackward(),c=l?a:o,u=l?o:a,d=l?t:e,f=l?e:t;let p=255,h=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(Fy(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===f&&0===u)&&(h=!0,p&=t.getFormat(),0===p))break}s.format=h?p:0}}qm(t,_p,void 0)})}function ly(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function cy(e,t){const n=e._compositionKey;if(gm(null),null!==n&&null!=t){if(""===t){const t=vm(n),r=fm(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&Fy(t)&&Nm(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=sv();if(Ky(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void qm(e,Wp,null)}}}Am(!0,e,t)}function uy(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const dy=new Map;function fy(e){const t=e.target,n=rg(null==t?null:9===t.nodeType?t.defaultView:t.ownerDocument.defaultView);if(null===n)return;const r=lm(n.anchorNode);if(null===r)return;ty&&(ty=!1,Rv(r,()=>{const t=lv(),o=n.anchorNode;if(null===o)return;const i=o.nodeType;1!==i&&3!==i||Sm(av(t,n,r,e))}));const o=Pm(r),i=o[o.length-1],a=i._key,s=dy.get(a),l=s||i;l!==r&&sy(n,l,!1),sy(n,r,!0),r!==i?dy.set(a,r):s&&dy.delete(a)}function py(e){e._lexicalHandled=!0}function hy(e){return!0===e._lexicalHandled}function my(e,t,n){Cv();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=sv();if(!Ky(t)||!Fv(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();return Gm(o,e)&&n.set(e.__key,0,"element"),Gm(i,e)&&r.set(e.__key,0,"element"),t}(e);let a=!1;if(Ky(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(dv(t,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(dv(n,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else Gy(i)&&t&&e.isSelected()&&e.selectPrevious();if(Ky(i)&&t&&!a){const t=e.getIndexWithinParent();hm(e),cv(i,o,t,-1)}else hm(e);n||Jm(o)||o.canBeEmpty()||!o.isEmpty()||my(o,t),t&&Wv(o)&&o.isEmpty()&&o.selectEnd()}class gy{static getType(){Hh(64,this.name)}static clone(e){Hh(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,function(e,t){if(null!=t)return void(e.__key=t);Cv(),_v();const n=Sv(),r=kv(),o=""+rm++;r._nodeMap.set(o,e),Fv(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType=1,e.__key=o}(this,e)}getType(){return this.__type}isInline(){Hh(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=vm(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||sv();if(null==t)return!1;const n=t.getNodes().some(e=>e.__key===this.__key);if(Fy(this))return n;if(Ky(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(Vv(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor,r=n.getNode();if(n.offset===r.getChildrenSize()&&r.is(e)&&r.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:vm(e)}getParentOrThrow(){const e=this.getParent();return null===e&&Hh(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(Jm(t))return Fv(e)||e===this&&Vv(e)||Hh(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&Hh(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:vm(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:vm(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),n=e.getParents();Fv(this)&&t.unshift(this),Fv(e)&&n.unshift(e);const r=t.length,o=n.length;if(0===r||0===o||t[r-1]!==n[o-1])return null;const i=new Set(n);for(let e=0;e<r;e++){const n=t[e];if(i.has(n))return n}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let n=0,r=0,o=this;for(;;){const e=o.getParentOrThrow();if(e===t){n=o.getIndexWithinParent();break}o=e}for(o=e;;){const e=o.getParentOrThrow();if(e===t){r=o.getIndexWithinParent();break}o=e}return n<r}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let n=e;for(;null!==n;){if(n.__key===t)return!0;n=n.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const a=Fv(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}const s=t?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&Hh(68),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=Sv()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){const e=vm(this.__key);return null===e&&Hh(113),e}getWritable(){Cv();const e=kv(),t=Sv(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,a=sv();if(null!==a&&a.setCachedNodes(null),i.has(r))return mm(o),o;const s=dg(o);return i.add(r),mm(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){Hh(70)}updateDOM(e,t,n){Hh(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){Hh(72)}static importJSON(e){Hh(18,this.name)}static transform(){return null}remove(e){my(this,!0,e)}replace(e,t){Cv();let n=sv();null!==n&&(n=n.clone()),eg(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),l=s.__size;hm(a);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,f=r.__next,p=r.__parent;if(my(r,!1,!0),null===c?s.__first=i:c.getWritable().__next=i,a.__prev=d,null===u?s.__last=i:u.getWritable().__prev=i,a.__next=f,a.__parent=p,s.__size=l,t&&(Fv(this)&&Fv(a)||Hh(139),this.getChildren().forEach(e=>{a.append(e)})),Ky(n)){Sm(n);const e=n.anchor,t=n.focus;e.key===o&&Uy(e,a),t.key===o&&Uy(t,a)}return ym()===o&&gm(i),a}insertAfter(e,t=!0){Cv(),eg(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=sv();let a=!1,s=!1;if(null!==o){const t=e.getIndexWithinParent();if(hm(r),Ky(i)){const e=o.__key,n=i.anchor,r=i.focus;a="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l?c.__last=u:l.getWritable().__prev=u,c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&Ky(i)){const e=this.getIndexWithinParent();cv(i,c,e+1);const t=c.__key;a&&i.anchor.set(t,e+2,"element"),s&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){Cv(),eg(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;hm(r);const i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;const c=sv();return t&&Ky(c)&&cv(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return Zv()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Cv();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(Fv(n))return n.select();if(!Fy(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){Cv();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(Fv(n))return n.select(0,0);if(!Fy(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}}class yy extends gy{static getType(){return"linebreak"}static clone(e){return new yy(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&ag(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&wy(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&wy(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&ag(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&wy(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&wy(r))return!0}return!1}(e)?null:{conversion:vy,priority:0}}}static importJSON(e){return by()}exportJSON(){return{type:"linebreak",version:1}}}function vy(e){return{node:by()}}function by(){return Qm(new yy)}function xy(e){return e instanceof yy}function wy(e){return 3===e.nodeType&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function Cy(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function _y(e,t){return 1&t?"strong":2&t?"em":"span"}function ky(e,t,n,r,o){const i=r.classList;let a=Vm(o,"base");void 0!==a&&i.add(...a),a=Vm(o,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;void 0!==a&&(8&n&&4&n?(s=!0,l||i.add(...a)):l&&i.remove(...a));for(const e in Rh){const r=Rh[e];if(a=Vm(o,e),void 0!==a)if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...a);continue}t&r&&(!l||"underline"!==e)&&"strikethrough"!==e||i.add(...a)}else t&r&&i.remove(...a)}}function Sy(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?Ph:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||fh){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function jy(e,t,n,r,o,i){Sy(o,e,t);const a=i.theme.text;void 0!==a&&ky(0,0,r,e,a)}function Oy(e,t){const n=document.createElement(t);return n.appendChild(e),n}class Ey extends gy{static getType(){return"text"}static clone(e){return new Ey(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return Vh[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===ym()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=Rh[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return pm(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const n=this.__format,r=Cy(0,n),o=_y(0,n),i=null===r?o:r,a=document.createElement(i);let s=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(o),a.appendChild(s)),jy(s,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,a=Cy(0,o),s=Cy(0,i),l=_y(0,o),c=_y(0,i);if((null===a?l:a)!==(null===s?c:s))return!0;if(a===s&&l!==c){const e=t.firstChild;null==e&&Hh(48);const o=document.createElement(c);return jy(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==s&&null!==a&&(u=t.firstChild,null==u&&Hh(49)),Sy(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&ky(0,o,i,u,d);const f=e.__style,p=this.__style;return f!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:Ny,priority:0}),b:()=>({conversion:Ty,priority:0}),code:()=>({conversion:Ry,priority:0}),em:()=>({conversion:Ry,priority:0}),i:()=>({conversion:Ry,priority:0}),s:()=>({conversion:Ry,priority:0}),span:()=>({conversion:Py,priority:0}),strong:()=>({conversion:Ry,priority:0}),sub:()=>({conversion:Ry,priority:0}),sup:()=>({conversion:Ry,priority:0}),u:()=>({conversion:Ry,priority:0})}}static importJSON(e){const t=Ly(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){let{element:t}=super.exportDOM(e);return null!==t&&og(t)||Hh(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=Oy(t,"b")),this.hasFormat("italic")&&(t=Oy(t,"i")),this.hasFormat("strikethrough")&&(t=Oy(t,"s")),this.hasFormat("underline")&&(t=Oy(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?Rh[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?Lh[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=pm(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=zh[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){Cv();let n=e,r=t;const o=sv(),i=this.getTextContent(),a=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!Ky(o))return ov(a,n,a,r,"text","text");{const e=ym();e!==o.anchor.key&&e!==o.focus.key||gm(a),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,a=n.length;let s=e;s<0&&(s=a+s,s<0&&(s=0));const l=sv();if(r&&Ky(l)){const t=e+a;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,s)+n+i.slice(s+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Cv();const t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=ym(),i=new Set(e),a=[],s=n.length;let l="";for(let e=0;e<s;e++)""!==l&&i.has(e)&&(a.push(l),l=""),l+=n[e];""!==l&&a.push(l);const c=a.length;if(0===c)return[];if(a[0]===n)return[t];const u=a[0],d=t.getParent();let f;const p=t.getFormat(),h=t.getStyle(),m=t.__detail;let g=!1;t.isSegmented()?(f=Ly(u),f.__format=p,f.__style=h,f.__detail=m,g=!0):(f=t.getWritable(),f.__text=u);const y=sv(),v=[f];let b=u.length;for(let e=1;e<c;e++){const t=a[e],n=t.length,i=Ly(t).getWritable();i.__format=p,i.__style=h,i.__detail=m;const s=i.__key,l=b+n;if(Ky(y)){const e=y.anchor,t=y.focus;e.key===r&&"text"===e.type&&e.offset>b&&e.offset<=l&&(e.key=s,e.offset-=b,y.dirty=!0),t.key===r&&"text"===t.type&&t.offset>b&&t.offset<=l&&(t.key=s,t.offset-=b,y.dirty=!0)}o===r&&gm(s),b=l,v.push(i)}if(null!==d){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&mm(t),null!==n&&mm(n)}(this);const e=d.getWritable(),t=this.getIndexWithinParent();g?(e.splice(t,0,v),this.remove()):e.splice(t,1,v),Ky(y)&&cv(y,d,t,c-1)}return v}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||Hh(50);const n=this.__key,r=e.__key,o=this.__text,i=o.length;ym()===r&&gm(n);const a=sv();if(Ky(a)){const o=a.anchor,s=a.focus;null!==o&&o.key===r&&(fv(o,t,n,e,i),a.dirty=!0),null!==s&&s.key===r&&(fv(s,t,n,e,i),a.dirty=!0)}const s=e.__text,l=t?s+o:o+s;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function Py(e){return{forChild:By(e.style),node:null}}function Ty(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:By(t.style,n?void 0:"bold"),node:null}}const My=new WeakMap;function Ay(e){return"PRE"===e.nodeName||1===e.nodeType&&void 0!==e.style&&void 0!==e.style.whiteSpace&&e.style.whiteSpace.startsWith("pre")}function Ny(e){const t=e;null===e.parentElement&&Hh(129);let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=My.get(n))&&!Ay(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)My.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(by()):"\t"===r?t.push(Vy()):""!==r&&t.push(Ly(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=Dy(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=Dy(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Ly(n)}}function Dy(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,1===n.nodeType){const e=n.style.display;if(""===e&&!ig(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(3===n.nodeType)return n;if("BR"===n.nodeName)return null}}const Iy={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ry(e){const t=Iy[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:By(e.style,t),node:null}}function Ly(e=""){return Qm(new Ey(e))}function Fy(e){return e instanceof Ey}function By(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),a="italic"===e.fontStyle,s=r.includes("underline"),l=e.verticalAlign;return e=>(Fy(e)&&(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}class zy extends Ey{static getType(){return"tab"}static clone(e){return new zy(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){const t=Vy();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){Hh(126)}setDetail(e){Hh(127)}setMode(e){Hh(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Vy(){return Qm(new zy)}class Hy{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode();const r=this.offset,o=e.offset;if(Fv(t)){const e=t.getDescendantByIndex(r);t=e??t}if(Fv(n)){const e=n.getDescendantByIndex(o);n=e??n}return t===n?r<o:t.isBefore(n)}getNode(){const e=vm(this.key);return null===e&&Hh(20),e}set(e,t,n){const r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,wv()||(ym()===o&&gm(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function Wy(e,t,n){return new Hy(e,t,n)}function $y(e,t){let n=t.__key,r=e.offset,o="element";if(Fy(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!Fv(t)){const e=t.getNextSibling();if(Fy(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function Uy(e,t){if(Fv(t)){const n=t.getLastDescendant();Fv(n)||Fy(n)?$y(e,n):$y(e,t)}else $y(e,t)}function qy(e,t,n,r){e.key=t,e.offset=n,e.type=r}let Yy=class e{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Gy(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(Fy(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=vm(e);null!==t&&n.push(t)}return wv()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}};function Ky(e){return e instanceof Zy}class Zy{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Ky(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this.anchor,n=this.focus,r=t.isBefore(n),o=r?t:n,i=r?n:t;let a=o.getNode(),s=i.getNode();const l=o.offset,c=i.offset;if(Fv(a)){const e=a.getDescendantByIndex(l);a=e??a}if(Fv(s)){let e=s.getDescendantByIndex(c);null!==e&&e!==a&&s.getChildAtIndex(c)===e&&(e=e.getPreviousSibling()),s=e??s}let u;return u=a.is(s)?Fv(a)&&a.getChildrenSize()>0?[]:[a]:a.getNodesBetween(s),wv()||(this._cachedNodes=u),u}setTextNodeRange(e,t,n,r){qy(this.anchor,e.__key,t,"text"),qy(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,s]=Jy(this);let l="",c=!0;for(let u=0;u<e.length;u++){const d=e[u];if(Fv(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,Fy(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=i?e.slice(a):e.slice(s):d===n&&(e=i?e.slice(0,s):e.slice(0,a)),l+=e}else!Vv(d)&&!xy(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=Sv(),n=t.getEditorState()._selection,r=rv(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;qy(this.anchor,o.key,o.offset,o.type),qy(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new Zy(Wy(e.key,e.offset,e.type),Wy(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=pm(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=Rh[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(by()):"\t"===r?n.push(Vy()):n.push(Ly(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,a=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,a=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),a=Ly(),s=Wv(o)?Zv().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(s):i.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(i,a,r,o);const s=i.offset;let l=a.offset;const c=this.getNodes(),u=c.length;let d=c[0];Fy(d)||Hh(26);const f=d.getTextContent().length,p=d.getParentOrThrow();let h=c[u-1];if(1===u&&"element"===a.type&&(l=f,a.set(i.key,l,"text")),this.isCollapsed()&&s===f&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(Fy(t)&&t.canInsertTextBefore()&&!um(t)||(t=Ly(),t.setFormat(r),t.setStyle(o),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(Fy(t)&&!um(t)||(t=Ly(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&s!==f){const e=Ly(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=h.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||Fv(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),nv(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(d.isToken()){const t=Ly(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(s!==l||t===r&&n===o){if(function(e){return e instanceof zy}(d)){const t=Ly(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=Ly(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===s)d.insertBefore(t,!1);else{const[e]=d.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-s;d=d.spliceText(s,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...h.getParentKeys()]),n=Fv(d)?d:d.getParentOrThrow();let r=Fv(h)?h:h.getParentOrThrow(),o=h;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===a.type&&(0!==l||""===h.getTextContent())||"element"===a.type&&h.getIndexWithinParent()<l)if(Fy(h)&&!h.isToken()&&l!==h.getTextContentSize()){if(h.isSegmented()){const e=Ly(h.getTextContent());h.replace(e),h=e}Wv(a.getNode())||"text"!==a.type||(h=h.spliceText(0,l,"")),t.add(h.__key)}else{const e=h.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?h.remove():e.remove()}else t.add(h.__key);const i=r.getChildren(),p=new Set(c),m=n.is(r),g=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||Fv(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(o)?m||g.insertAfter(t,!1):t.remove())}if(!m){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(d.isToken())if(s===f)d.select();else{const t=Ly(e);t.select(),d.replace(t)}else d=d.spliceText(s,f-s,e,!0),""===d.getTextContent()?d.remove():d.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())return this.toggleFormat(e),void gm(null);const t=this.getNodes(),n=[];for(const e of t)Fy(e)&&n.push(e);const r=n.length;if(0===r)return this.toggleFormat(e),void gm(null);const o=this.anchor,i=this.focus,a=this.isBackward(),s=a?i:o,l=a?o:i;let c=0,u=n[0],d="element"===s.type?0:s.offset;if("text"===s.type&&d===u.getTextContentSize()&&(c=1,u=n[1],d=0),null==u)return;const f=u.getFormatFlags(e,null),p=r-1;let h=n[p];const m="text"===l.type?l.offset:h.getTextContentSize();if(u.is(h)){if(d===m)return;if(um(u)||0===d&&m===u.getTextContentSize())u.setFormat(f);else{const e=u.splitText(d,m),t=0===d?e[0]:e[1];t.setFormat(f),"text"===s.type&&s.set(t.__key,0,"text"),"text"===l.type&&l.set(t.__key,m-d,"text")}return void(this.format=f)}0===d||um(u)||([,u]=u.splitText(d),d=0),u.setFormat(f);const g=h.getFormatFlags(e,f);m>0&&(m===h.getTextContentSize()||um(h)||([h]=h.splitText(m)),h.setFormat(g));for(let t=c+1;t<p;t++){const r=n[t],o=r.getFormatFlags(e,g);r.setFormat(o)}"text"===s.type&&s.set(u.__key,d,"text"),"text"===l.type&&l.set(h.__key,m,"text"),this.format=f|g}insertNodes(e){if(0===e.length)return;if("root"===this.anchor.key){this.insertParagraph();const t=sv();return Ky(t)||Hh(134),t.insertNodes(e)}const t=lg((this.isBackward()?this.focus:this.anchor).getNode(),sg),n=e[e.length-1];if("__language"in t&&Fv(t)){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const r=pv(this);t.splice(r,0,e),n.selectEnd()}return}if(!e.some(e=>(Fv(e)||Vv(e))&&!e.isInline())){Fv(t)||Hh(135);const r=pv(this);return t.splice(r,0,e),void n.selectEnd()}const r=function(e){const t=Zv();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=xy(o);if(i||Vv(o)&&o.isInline()||Fv(o)&&o.isInline()||Fy(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),o=r.getLastDescendant(),i=r.getChildren(),a=Fv(t)&&t.isEmpty()?null:this.insertParagraph(),s=i[i.length-1];let l=i[0];var c;Fv(c=l)&&sg(c)&&!c.isEmpty()&&Fv(t)&&(!t.isEmpty()||t.canMergeWhenEmpty())&&(Fv(t)||Hh(135),t.append(...l.getChildren()),l=i[1]),l&&function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||Hh(140),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(t,l);const u=lg(o,sg);a&&Fv(u)&&(a.canMergeWhenEmpty()||sg(s))&&(u.append(...a.getChildren()),a.remove()),Fv(t)&&t.isEmpty()&&t.remove(),o.selectEnd();const d=Fv(t)?t.getLastChild():null;xy(d)&&u!==t&&d.remove()}insertParagraph(){if("root"===this.anchor.key){const e=Zv();return _m().splice(this.anchor.offset,0,[e]),e.select(),e}const e=pv(this),t=lg(this.anchor.getNode(),sg);Fv(t)||Hh(136);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=by();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,o=this.focus;let i=e[0],a=e[n];const[s,l]=Jy(this);if(0===t)return[];if(1===t){if(Fy(i)&&!this.isCollapsed()){const e=s>l?l:s,t=s>l?s:l,n=i.splitText(e,t),r=0===e?n[0]:n[1];return null!=r?[r]:[]}return[i]}const c=r.isBefore(o);if(Fy(i)){const t=c?s:l;t===i.getTextContentSize()?e.shift():0!==t&&([,i]=i.splitText(t),e[0]=i)}if(Fy(a)){const t=a.getTextContent().length,r=c?l:s;0===r?e.pop():r!==t&&([a]=a.splitText(r),e[n]=a)}return e}modify(e,t,n){const r=this.focus,o=this.anchor,i="move"===e,a=$m(r,t);if(Vv(a)&&!a.isIsolated()){if(i&&a.isKeyboardSelectable()){const e=iv();return e.add(a.__key),void Sm(e)}const e=t?a.getPreviousSibling():a.getNextSibling();if(Fy(e)){const n=e.__key,a=t?e.getTextContent().length:0;return r.set(n,a,"text"),void(i&&o.set(n,a,"text"))}{const n=a.getParentOrThrow();let s,l;return Fv(e)?(l=e.__key,s=t?e.getChildrenSize():0):(s=a.getIndexWithinParent(),l=n.__key,t||s++),r.set(l,s,"element"),void(i&&o.set(l,s,"element"))}}const s=Sv(),l=rg(s._window);if(!l)return;const c=s._blockCursorElement,u=s._rootElement;if(null===u||null===c||!Fv(a)||a.isInline()||a.canBeEmpty()||ng(c,s,u),d=e,f=t?"backward":"forward",p=n,l.modify(d,f,p),l.rangeCount>0){const e=l.getRangeAt(0),n=this.anchor.getNode(),r=Wv(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(Jm(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){const n=this.getNodes(),o=[];let i=!1;for(let e=0;e<n.length;e++){const t=n[e];Gm(t,r)?o.push(t):i=!0}if(i&&o.length>0)if(t){const e=o[0];Fv(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=o[o.length-1];Fv(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;qy(n,t.key,t.offset,t.type),qy(t,r,o,i),e._cachedNodes=null}(this)}}var d,f,p}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&Fv(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(Fv(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=this.focus,o=$m(r,e);if(Vv(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&Fv(n)&&0===n.getChildrenSize()){n.remove();const e=iv();e.add(o.__key),Sm(e)}else o.remove(),Sv().dispatchCommand(_p,void 0);return}if(!e&&Fv(o)&&Fv(n)&&n.isEmpty())return n.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==o&&o.isSegmented()){const t=r.offset,i=o.getTextContentSize();if(o.is(n)||e&&t!==i||!e&&0!==t)return void Qy(o,e,t)}else if(null!==n&&n.isSegmented()){const r=t.offset,i=n.getTextContentSize();if(n.is(o)||e&&0!==r||!e&&r!==i)return void Qy(n,e,r)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode();if(o===r.getNode()&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,a=e<i,s=a?e:i,l=a?i:e,c=l-1;s!==c&&(Em(o.getTextContent().slice(s,l))||(t?r.offset=c:n.offset=c))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&Wv(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t="element"===this.anchor.type;if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character"),t){const t=e?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Gy(e){return e instanceof Yy}function Xy(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Jy(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[Xy(n),Xy(r)]}function Qy(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let a=0,s=0;for(let e=0;e<i;e++){const r=e===i-1;if(s=a,a+=o[e].length,t&&a===n||a>n||r){o.splice(e,1),r&&(s=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(s,s))}function ev(e,t,n,r){let o,i=t;if(1===e.nodeType){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;i===l&&(a=!0,i=l-1);let u=s[i],d=!1;if(u===c)u=s[i+1],d=!0;else if(null!==c){const n=c.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,c)&&i--}if(o=jm(u),Fy(o))i=Om(o,a);else{let r=jm(e);if(null===r)return null;if(Fv(r)){i=Math.min(r.getChildrenSize(),i);let e=r.getChildAtIndex(i);if(Fv(e)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(e,0,n)){const t=a?e.getLastDescendant():e.getFirstDescendant();null===t?r=e:(e=t,r=Fv(e)?e:e.getParentOrThrow()),i=0}Fy(e)?(o=e,r=null,i=Om(e,a)):e!==r&&a&&!d&&i++}else{const n=r.getIndexWithinParent();i=0===t&&Vv(r)&&jm(e)===r?n:n+1,r=r.getParentOrThrow()}if(Fv(r))return Wy(r.__key,i,"element")}}else o=jm(e);return Fy(o)?Wy(o.__key,i,"text"):null}function tv(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&Fv(i)&&i.isInline()){const t=i.getPreviousSibling();Fy(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)}}else Fv(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Fy(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&Fv(r)&&r.isInline())e.key=r.__key,e.offset=0,e.type="element";else if((n||t)&&null===r&&Fv(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();Fy(t)&&(e.key=t.__key,e.offset=0)}}}function nv(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);tv(e,r,o),tv(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const i=Sv();if(i.isComposing()&&i._compositionKey!==e.key&&Ky(n)){const r=n.anchor,o=n.focus;qy(e,r.key,r.offset,r.type),qy(t,o.key,o.offset,o.type)}}}function rv(e,t,n,r,o,i){if(null===e||null===n||!am(o,e,n))return null;const a=ev(e,t,Ky(i)?i.anchor:null,o);if(null===a)return null;const s=ev(n,r,Ky(i)?i.focus:null,o);if(null===s)return null;if("element"===a.type&&"element"===s.type){const t=jm(e),r=jm(n);if(Vv(t)&&Vv(r))return null}return nv(a,s,i),[a,s]}function ov(e,t,n,r,o,i){const a=kv(),s=new Zy(Wy(e,t,o),Wy(n,r,i),0,"");return s.dirty=!0,a._selection=s,s}function iv(){return new Yy(new Set)}function av(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,a=i?i.type:void 0,s="selectionchange"===a,l=!$h&&(s||"beforeinput"===a||"compositionstart"===a||"compositionend"===a||"click"===a&&i&&3===i.detail||"drop"===a||void 0===a);let c,u,d,f;if(Ky(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,s&&Ky(e)&&!am(n,c,u))return e.clone();const p=rv(c,d,u,f,n,e);if(null===p)return null;const[h,m]=p;return new Zy(h,m,Ky(e)?e.format:0,Ky(e)?e.style:"")}function sv(){return kv()._selection}function lv(){return Sv()._editorState._selection}function cv(e,t,n,r=1){const o=e.anchor,i=e.focus,a=o.getNode(),s=i.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),uv(e)}}else{const a=e.isBackward(),s=a?i:o,c=s.getNode(),u=a?o:i,d=u.getNode();if(t.is(c)){const e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}uv(e)}function uv(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!Fv(i))return;const e=i.getChildrenSize(),o=n>=e,a=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Fy(a)){let e=0;o&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}}else{if(Fv(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Fy(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(Fv(a)){const e=a.getChildrenSize(),t=o>=e,n=t?a.getChildAtIndex(e-1):a.getChildAtIndex(o);if(Fy(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function dv(e,t,n,r,o){let i=null,a=0,s=null;null!==r?(i=r.__key,Fy(r)?(a=r.getTextContentSize(),s="text"):Fv(r)&&(a=r.getChildrenSize(),s="element")):null!==o&&(i=o.__key,Fy(o)?s="text":Fv(o)&&(s="element")),null!==i&&null!==s?e.set(i,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function fv(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function pv(e){let t=e;e.isCollapsed()||t.removeText();const n=sv();Ky(n)&&(t=n),Ky(t)||Hh(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!sg(o);)[o,i]=hv(o,i);return i}function hv(e,t){const n=e.getParent();if(!n){const e=Zv();return _m().append(e),e.select(),[_m(),0]}if(Fy(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!Fv(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new Zy(Wy(e.__key,t,"element"),Wy(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let mv=null,gv=null,yv=!1,vv=!1,bv=0;const xv={characterData:!0,childList:!0,subtree:!0};function wv(){return yv||null!==mv&&mv._readOnly}function Cv(){yv&&Hh(13)}function _v(){bv>99&&Hh(14)}function kv(){return null===mv&&Hh(195,jv()),mv}function Sv(){return null===gv&&Hh(196,jv()),gv}function jv(){let e=0;const t=new Set,n=Jv.version;if(typeof window<"u")for(const r of document.querySelectorAll("[contenteditable]")){const o=cm(r);if(sm(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function Ov(e,t,n){const r=t.__type,o=function(e,t){const n=e._nodes.get(t);return void 0===n&&Hh(30,t),n}(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const a=i.length;for(let e=0;e<a&&(i[e](t),t.isAttached());e++);}function Ev(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function Pv(e,t){const n=e.type,r=t.get(n);void 0===r&&Hh(17,n);const o=r.klass;e.type!==o.getType()&&Hh(18,o.name);const i=o.importJSON(e),a=e.children;if(Fv(i)&&Array.isArray(a))for(let e=0;e<a.length;e++){const n=Pv(a[e],t);i.append(n)}return i}function Tv(e,t,n){const r=mv,o=yv,i=gv;mv=t,yv=!0,gv=e;try{return n()}finally{mv=r,yv=o,gv=i}}function Mv(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,a=i._selection,s=n._selection,l=0!==e._dirtyType,c=mv,u=yv,d=gv,f=e._updating,p=e._observer;let h=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==p){gv=e,mv=n,yv=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;p.disconnect(),h=function(e,t,n,r,o,i){_g="",Og="",kg="",Eg=2===r,Tg=null,hg=n,pg=n._config,mg=n._nodes,gg=hg._listeners.mutation,yg=o,vg=i,bg=e._nodeMap,xg=t._nodeMap,Pg=t._readOnly,wg=new Map(n._keyToDOMMap);const a=new Map;return Cg=a,Wg("root",null),hg=void 0,mg=void 0,yg=void 0,vg=void 0,bg=void 0,xg=void 0,pg=void 0,wg=void 0,Cg=void 0,a}(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),vv)throw t;return Xv(e,null,r,n),Jh(e),e._dirtyType=2,vv=!0,Mv(e,i),void(vv=!1)}finally{p.observe(r,xv),e._updating=f,mv=c,yv=u,gv=d}}n._readOnly||(n._readOnly=!0);const m=e._dirtyLeaves,g=e._dirtyElements,y=e._normalizedNodes,v=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=wm(e)),delete r[i])}(e,n);const x=o?null:rg(e._window);if(e._editable&&null!==x&&(l||null===s||s.dirty)){gv=e,mv=n;try{if(null!==p&&p.disconnect(),l||null===s||s.dirty){const t=e._blockCursorElement;null!==t&&ng(t,e,r),function(e,t,n,r,o,i){const a=r.anchorNode,s=r.focusNode,l=r.anchorOffset,c=r.focusOffset,u=document.activeElement;if(o.has("collaboration")&&u!==i||null!==u&&im(u))return;if(!Ky(t))return void(null!==e&&am(n,a,s)&&r.removeAllRanges());const d=t.anchor,f=t.focus,p=d.key,h=f.key,m=Km(n,p),g=Km(n,h),y=d.offset,v=f.offset,b=t.format,x=t.style,w=t.isCollapsed();let C=m,_=g,k=!1;if("text"===d.type){C=fm(m);const e=d.getNode();k=e.getFormat()!==b||e.getStyle()!==x}else Ky(e)&&"text"===e.anchor.type&&(k=!0);var S,j,O,E,P;if("text"===f.type&&(_=fm(g)),null!==C&&null!==_&&(w&&(null===e||k||Ky(e)&&(e.format!==b||e.style!==x))&&(S=b,j=x,O=y,E=p,P=performance.now(),oy=[S,j,O,E,P]),l!==y||c!==v||a!==C||s!==_||"Range"===r.type&&w||(null!==u&&i.contains(u)||i.focus({preventScroll:!0}),"element"===d.type))){try{r.setBaseAndExtent(C,y,_,v)}catch{}if(!o.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=t instanceof Zy&&"element"===t.anchor.type?C.childNodes[y]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=n.ownerDocument,o=r.defaultView;if(null===o)return;let{top:i,bottom:a}=t,s=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)s=0,l=Xm(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(i<s?n=-(s-i):a>l&&(n=a-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,a-=t}if(t)break;c=Zm(c)}}(n,t,i)}}ey=!0}}(a,s,e,x,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(Ky(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),a=o.offset;let s=!1,l=null;if(a===i.getChildrenSize())tg(i.getChildAtIndex(a-1))&&(s=!0);else{const t=i.getChildAtIndex(a);if(tg(t)){const n=t.getPreviousSibling();(null===n||tg(n))&&(s=!0,l=e.getElementByKey(t.__key))}}if(s){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=Wh(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&ng(r,e,t)})(e,r,s),null!==p&&p.observe(r,xv)}finally{gv=d,mv=c}}null!==h&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e<a;e++){const[a,s]=i[e],l=t.get(s);void 0!==l&&a(l,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}(e,h,v,m,i),Ky(s)||null===s||null!==a&&a.is(s)||e.dispatchCommand(_p,void 0);const w=e._pendingDecorators;null!==w&&(e._decorators=w,e._pendingDecorators=null,Av("decorator",e,!0,w)),function(e,t,n){const r=Cm(t),o=Cm(n);r!==o&&Av("textcontent",e,!0,o)}(e,t||i,n),Av("update",e,!0,{dirtyElements:g,dirtyLeaves:m,editorState:n,normalizedNodes:y,prevEditorState:t||i,tags:v}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,b),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;Iv(e,t,r)}}}(e)}function Av(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Nv(e,t,n){if(!1===e._updating||gv!==e){let r=!1;return e.update(()=>{r=Nv(e,t,n)}),r}const r=Pm(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const a=r[i]._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;for(let t=0;t<o;t++)if(!0===r[t](n,e))return!0}}}return!1}function Dv(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t;let i,a;if(void 0!==o){if(i=o.onUpdate,a=o.tag,o.skipTransforms&&(r=!0),o.discrete){const t=e._pendingEditorState;null===t&&Hh(191),t._flushSync=!0}i&&e._deferred.push(i),a&&e._updateTags.add(a)}n()}}return r}function Iv(e,t,n){const r=e._updateTags;let o,i,a=!1,s=!1;void 0!==n&&(o=n.onUpdate,i=n.tag,null!=i&&r.add(i),a=n.skipTransforms||!1,s=n.discrete||!1),o&&e._deferred.push(o);const l=e._editorState;let c=e._pendingEditorState,u=!1;(null===c||c._readOnly)&&(c=e._pendingEditorState=new Uv(new Map((c||l)._nodeMap)),u=!0),c._flushSync=s;const d=mv,f=yv,p=gv,h=e._updating;mv=c,yv=!1,e._updating=!0,gv=e;try{u&&(e._headless?null!==l._selection&&(c._selection=l._selection.clone()):c._selection=function(e){const t=e.getEditorState()._selection,n=rg(e._window);return Ky(t)||null==t?av(t,n,e,null):t.clone()}(e));const n=e._compositionKey;t(),a=Dv(e,a),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(Ky(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(c,e),0!==e._dirtyType&&(a?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);Fy(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&tm(t)}}(c,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=ym(),a=new Map;let s=n,l=s.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of s){const r=o.get(e);Fy(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&tm(r),void 0!==r&&Ev(r,i)&&Ov(t,r,a),n.add(e)}if(s=t._dirtyLeaves,l=s.size,l>0){bv++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(const e of c){const n=e[0],s=e[1];if("root"!==n&&!s)continue;const l=o.get(n);void 0!==l&&Ev(l,i)&&Ov(t,l,a),r.set(n,s)}s=t._dirtyLeaves,l=s.size,c=t._dirtyElements,u=c.size,bv++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Dv(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,a=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(Fv(t)&&fg(t,e,o,i,a,r),o.has(e)||r.delete(e),a.push(e)))}for(const e of a)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(l,c,e._dirtyLeaves,e._dirtyElements)),n!==e._compositionKey&&(c._flushSync=!0);const r=c._selection;if(Ky(r)){const e=c._nodeMap,t=r.anchor.key,n=r.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||Hh(19)}else Gy(r)&&0===r._nodes.size&&(c._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=l,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Mv(e)}finally{mv=d,yv=f,gv=p,e._updating=h,bv=0}0!==e._dirtyType||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,Mv(e)):u&&om(()=>{Mv(e)}):(c._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Rv(e,t,n){e._updating?e._updates.push([t,n]):Iv(e,t,n)}class Lv extends gy{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return Bh[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){const e=Sv()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(Fy(t)&&e.push(t),Fv(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;Fv(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;Fv(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return Fv(e)&&e.getLastDescendant()||e||null}const r=t[e];return Fv(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:vm(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&Hh(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:vm(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&Hh(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),Fv(o)&&r!==n-1&&!o.isInline()&&(e+=Th)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),Fv(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(""!==e){const t=Fh[e];return!!(this.getFormat()&t)}return!1}select(e,t){Cv();const n=sv();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(Fy(e)||Fv(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(Fy(e)||Fv(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const a=this.__key;return Ky(n)?(n.anchor.set(a,r,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):ov(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Fh[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){const r=n.length,o=this.getChildrenSize(),i=this.getWritable(),a=i.__key,s=[],l=[],c=this.getChildAtIndex(e+t);let u=null,d=o-t+r;if(0!==e)if(e===o)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(t>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let n=0;n<t;n++){null===e&&Hh(100);const t=e.getNextSibling(),n=e.__key;hm(e.getWritable()),l.push(n),e=t}}let f=u;for(let e=0;e<r;e++){const t=n[e];null!==f&&t.is(f)&&(u=f=f.getPreviousSibling());const r=t.getWritable();r.__parent===a&&d--,hm(r);const o=t.__key;if(null===f)i.__first=o,r.__prev=null;else{const e=f.getWritable();e.__next=o,r.__prev=e.__key}t.__key===a&&Hh(76),r.__parent=a,s.push(o),f=t}if(e+t===o)null!==f&&(f.getWritable().__next=null,i.__last=f.__key);else if(null!==c){const e=c.getWritable();if(null!==f){const t=f.getWritable();e.__prev=f.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=d,l.length){const e=sv();if(Ky(e)){const t=new Set(l),n=new Set(s),{anchor:r,focus:o}=e;Bv(r,t,n)&&dv(r,r.getNode(),this,u,c),Bv(o,t,n)&&dv(o,o.getNode(),this,u,c),0!==d||this.canBeEmpty()||Jm(this)||this.remove()}}return i}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}}function Fv(e){return e instanceof Lv}function Bv(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class zv extends gy{constructor(e){super(e)}decorate(e,t){Hh(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Vv(e){return e instanceof zv}class Hv extends Lv{static getType(){return"root"}static clone(){return new Hv}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Hh(51)}getTextContent(){const e=this.__cachedText;return!wv()&&0!==Sv()._dirtyType||null===e?super.getTextContent():e}remove(){Hh(52)}replace(e){Hh(53)}insertBefore(e){Hh(54)}insertAfter(e){Hh(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];Fv(n)||Vv(n)||Hh(56)}return super.append(...e)}static importJSON(e){const t=_m();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Wv(e){return e instanceof Hv}function __(){return new Uv(new Map([["root",new Hv]]))}function $v(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&Hh(130,n.name),Fv(e)){const r=t.children;Array.isArray(r)||Hh(59,n.name);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=$v(o[e]);r.push(t)}}return t}class Uv{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return Tv(t&&t.editor||null,this,e)}clone(e){const t=new Uv(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return Tv(null,this,()=>({root:$v(_m())}))}}class qv extends Lv{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Yv extends Lv{constructor(e){super(e),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}hasTextFormat(e){const t=Rh[e];return!!(this.getTextFormat()&t)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}static clone(e){return new Yv(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}createDOM(e){const t=document.createElement("p"),n=Vm(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:Kv,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(t&&og(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n);const r=this.getIndent();r>0&&(t.style.textIndent=20*r+"px")}return{element:t}}static importJSON(e){const t=Zv();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t.setTextFormat(e.textFormat),t}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,t){const n=Zv();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getTextStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||Fy(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Kv(e){const t=Zv();if(e.style){t.setFormat(e.style.textAlign);const n=parseInt(e.style.textIndent,10)/20;n>0&&t.setIndent(n)}return{node:t}}function Zv(){return Qm(new Yv)}function Gv(e){return e instanceof Yv}function Xv(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=__(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}class Jv{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Tm(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&Hh(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&Hh(36,String(e));const i=o[n];return i.add(t),()=>{i.delete(t),o.every(e=>0===e.size)&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,r);const i=n&&n.skipInitialization;return void 0===i||i||this.initializeMutationListener(t,r),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&Hh(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=function(e){if(!e._readOnly&&e.isEmpty())return ug;e._readOnly||Hh(192);let t=cg.get(e);if(!t){t=new Map,cg.set(e,t);for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}}return t}(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}var i;return i=e.getType(),Rv(this,()=>{const e=kv();if(e.isEmpty())return;if("root"===i)return void _m().markDirty();const t=e._nodeMap;for(const[,e]of t)e.markDirty()},null===this._pendingEditorState?{tag:"history-merge"}:void 0),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return qm(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=Vm(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,Xv(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){const t=e.ownerDocument,n=Qg.get(t);void 0===n&&Hh(162);const r=n-1;r>=0||Hh(164),Qg.set(t,r),0===r&&t.removeEventListener("selectionchange",fy);const o=cm(e);sm(o)?(function(e){if(null!==e._parentEditor){const t=Pm(e),n=t[t.length-1]._key;dy.get(n)===e&&dy.delete(n)}else dy.delete(e._key)}(o),e.__lexicalEditor=null):o&&Hh(198);const i=uy(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){const t=function(e){const t=e.ownerDocument;return t&&t.defaultView||null}(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,Jh(this),this._updateTags.add("history-merge"),Mv(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument,r=Qg.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",fy),Qg.set(n,(r||0)+1),e.__lexicalEditor=t;const o=uy(e);for(let n=0;n<Kg.length;n++){const[r,i]=Kg[n],a="function"==typeof i?e=>{hy(e)||(py(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(hy(e))return;py(e);const n=t.isEditable();switch(r){case"cut":return n&&qm(t,eh,e);case"copy":return qm(t,Qp,e);case"paste":return n&&qm(t,Pp,e);case"dragstart":return n&&qm(t,Gp,e);case"dragover":return n&&qm(t,Xp,e);case"dragend":return n&&qm(t,Jp,e);case"focus":return n&&qm(t,ah,e);case"blur":return n&&qm(t,sh,e);case"drop":return n&&qm(t,Zp,e)}};e.addEventListener(r,a),o.push(()=>{e.removeEventListener(r,a)})}}(e,this),null!=n&&e.classList.add(...n)}else this._editorState=r,this._pendingEditorState=null,this._window=null;Av("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&Hh(38),Xh(this);const n=this._pendingEditorState,r=this._updateTags,o=void 0!==t?t.tag:null;null===n||n.isEmpty()||(null!=o&&r.add(o),Mv(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=o&&r.add(o),Mv(this)}parseEditorState(e,t){return function(e,t,n){const r=__(),o=mv,i=yv,a=gv,s=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,mv=r,yv=!1,gv=t;try{const o=t._nodes;Pv(e.root,o),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,mv=o,yv=i,gv=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return Mv(this),this.getEditorState().read(e,{editor:this})}update(e,t){Rv(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Rv(this,()=>{const e=sv(),n=_m();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())},{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=rg(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Av("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Jv.version="0.17.1+prod.esm";const Qv=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,eb=Qv?n.useLayoutEffect:n.useEffect,tb={tag:"history-merge"};function nb({initialConfig:e,children:t}){const r=(0,n.useMemo)(()=>{const{theme:t,namespace:n,nodes:r,onError:o,editorState:i,html:a}=e,s=function(e,t){return{getTheme:function(){return t??null}}}(0,t),l=function(e){const t=e||{},n=gv,r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=__(),s=t.namespace||(null!==o?o._config.namespace:Tm()),l=t.editorState,c=[Hv,Ey,yy,zy,Yv,qv,...t.nodes||[]],{onError:u,html:d}=t,f=void 0===t.editable||t.editable;let p;if(void 0===e&&null!==n)p=n._nodes;else{p=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}const o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),p.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,transforms:a})}}const h=new Jv(a,o,p,{disableEvents:i,namespace:s,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)}),t&&o(t),n}(p,d?d.import:void 0),f);return void 0!==l&&(h._pendingEditorState=l,h._dirtyType=2),h}({editable:e.editable,html:a,namespace:n,nodes:r,onError:e=>o(e,l),theme:t});return function(e,t){if(null!==t)if(void 0===t)e.update(()=>{const t=_m();if(t.isEmpty()){const n=Zv();t.append(n);const r=Qv?document.activeElement:null;(null!==sv()||null!==r&&r===e.getRootElement())&&n.select()}},tb);else if(null!==t)switch(typeof t){case"string":{const n=e.parseEditorState(t);e.setEditorState(n,tb);break}case"object":e.setEditorState(t,tb);break;case"function":e.update(()=>{_m().isEmpty()&&t(e)},tb)}}(l,i),[l,s]},[]);return eb(()=>{const t=e.editable,[n]=r;n.setEditable(void 0===t||t)},[]),(0,s.jsx)(bp.Provider,{value:r,children:t})}const rb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect;function ob(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function ib(e){return()=>function(e){if(!function(e,t=!0){if(e)return!1;let n=_m().getTextContent();return t&&(n=n.trim()),""===n}(e,!1))return!1;const t=_m().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){const n=t[e];if(Vv(n))return!1;if(Fv(n)){if(!Gv(n)||0!==n.__indent)return!1;const t=n.getChildren(),r=t.length;for(let n=0;n<r;n++)if(!Fy(t[e]))return!1}}return!0}(e)}function ab(e,t){const n=$m(e.focus,t);return Vv(n)&&!n.isIsolated()||Fv(n)&&!n.isInline()&&!n.canBeEmpty()}function sb(e,t,n){const r=function(e){const t=e.anchor.getNode();return"rtl"===(Wv(t)?t:t.getParentOrThrow()).getDirection()}(e);!function(e,t,n){e.modify(t?"extend":"move",n,"character")}(e,t,n?!r:r)}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}(function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}(function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}(function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const lb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,cb=lb&&"documentMode"in document?document.documentMode:null;function ub(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function db(e,t,n,r=null){let o=null===r||t.isSelected(r);const i=Fv(t)&&t.excludeFromCopy("html");let a=t;if(null!==r){let e=dg(t);e=Fy(e)&&null!==r?function(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[r,o]=n,i=e.isBackward(),a=r.getNode(),s=o.getNode(),l=t.is(a),c=t.is(s);if(l||c){const[n,r]=Jy(e),o=a.is(s),l=t.is(i?s:a),c=t.is(i?a:s);let u,d=0;return o?(d=n>r?r:n,u=n>r?n:r):l?(d=i?r:n,u=void 0):c&&(d=0,u=i?n:r),t.__text=t.__text.slice(d,u),t}}return t}(r,e):e,a=e}const s=Fv(a)?a.getChildren():[],l=e._nodes.get(a.getType());let c;c=l&&void 0!==l.exportDOM?l.exportDOM(e,a):a.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let n=0;n<s.length;n++){const i=s[n],a=db(e,i,f,r);!o&&Fv(t)&&a&&t.extractWithChild(i,r,"html")&&(o=!0)}if(o&&!i){if(og(u)&&u.append(f),n.append(u),d){const e=d.call(a,u);e&&u.replaceWith(e)}}else n.append(f);return o}lb&&"InputEvent"in window&&!cb&&new window.InputEvent("input");var fb=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function pb(e,t){const n=e.getData("text/plain")||e.getData("text/uri-list");null!=n&&t.insertRawText(n)}const hb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,mb=hb&&"documentMode"in document?document.documentMode:null,gb=!(!hb||!("InputEvent"in window)||mb)&&"getTargetRanges"in new window.InputEvent("input"),yb=hb&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),vb=hb&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,bb=hb&&/^(?=.*Chrome).*/i.test(navigator.userAgent),xb=hb&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!bb;function wb(e,t){t.update(()=>{if(null!==e){const n=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}(e,KeyboardEvent)?null:e.clipboardData,r=sv();if(null!==r&&null!=n){e.preventDefault();const o=function(e,t=sv()){return null==t&&fb(166),Ky(t)&&t.isCollapsed()||0===t.getNodes().length?"":function(e,t){if(typeof document>"u"||typeof window>"u"&&void 0===globalThis.window)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=_m().getChildren();for(let o=0;o<r.length;o++)db(e,r[o],n,t);return n.innerHTML}(e,t)}(t);null!==o&&n.setData("text/html",o),n.setData("text/plain",r.getTextContent())}}})}const Cb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect;function _b(e){return e.getEditorState().read(ib(e.isComposing()))}function kb({contentEditable:t,placeholder:r=null,ErrorBoundary:o}){const[i]=xp(),a=function(t,r){const[o,i]=(0,n.useState)(()=>t.getDecorators());return Cb(()=>t.registerDecoratorListener(t=>{(0,e.flushSync)(()=>{i(t)})}),[t]),(0,n.useEffect)(()=>{i(t.getDecorators())},[t]),(0,n.useMemo)(()=>{const i=[],a=Object.keys(o);for(let l=0;l<a.length;l++){const c=a[l],u=(0,s.jsx)(r,{onError:e=>t._onError(e),children:(0,s.jsx)(n.Suspense,{fallback:null,children:o[c]})}),d=t.getElementByKey(c);null!==d&&i.push((0,e.createPortal)(u,d,c))}return i},[r,o,t])}(i,o);return Cb(()=>ub(function(e){return ub(e.registerCommand(Sp,e=>{const t=sv();return!!Ky(t)&&(t.deleteCharacter(e),!0)},0),e.registerCommand(Mp,e=>{const t=sv();return!!Ky(t)&&(t.deleteWord(e),!0)},0),e.registerCommand(Ap,e=>{const t=sv();return!!Ky(t)&&(t.deleteLine(e),!0)},0),e.registerCommand(Ep,e=>{const t=sv();if(!Ky(t))return!1;if("string"==typeof e)t.insertText(e);else{const n=e.dataTransfer;if(null!=n)pb(n,t);else{const n=e.data;n&&t.insertText(n)}}return!0},0),e.registerCommand(Tp,()=>{const e=sv();return!!Ky(e)&&(e.removeText(),!0)},0),e.registerCommand(jp,e=>{const t=sv();return!!Ky(t)&&(t.insertLineBreak(e),!0)},0),e.registerCommand(Op,()=>{const e=sv();return!!Ky(e)&&(e.insertLineBreak(),!0)},0),e.registerCommand(Bp,e=>{const t=sv();if(!Ky(t))return!1;const n=e,r=n.shiftKey;return!!ab(t,!0)&&(n.preventDefault(),sb(t,r,!0),!0)},0),e.registerCommand(Lp,e=>{const t=sv();if(!Ky(t))return!1;const n=e,r=n.shiftKey;return!!ab(t,!1)&&(n.preventDefault(),sb(t,r,!1),!0)},0),e.registerCommand(Up,t=>!!Ky(sv())&&(t.preventDefault(),e.dispatchCommand(Sp,!0)),0),e.registerCommand(Yp,t=>!!Ky(sv())&&(t.preventDefault(),e.dispatchCommand(Sp,!1)),0),e.registerCommand(Wp,t=>{if(!Ky(sv()))return!1;if(null!==t){if((vb||yb||xb)&&gb)return!1;t.preventDefault()}return e.dispatchCommand(jp,!1)},0),e.registerCommand(th,()=>(function(){const e=_m();Sm(function(e){return nm(e.anchor),nm(e.focus),e}(e.select(0,e.getChildrenSize())))}(),!0),0),e.registerCommand(Qp,t=>!!Ky(sv())&&(wb(t,e),!0),0),e.registerCommand(eh,t=>!!Ky(sv())&&(function(e,t){wb(e,t),t.update(()=>{const e=sv();Ky(e)&&e.removeText()})}(t,e),!0),0),e.registerCommand(Pp,t=>!!Ky(sv())&&(function(e,t){e.preventDefault(),t.update(()=>{const t=sv(),{clipboardData:n}=e;null!=n&&Ky(t)&&pb(n,t)},{tag:"paste"})}(t,e),!0),0),e.registerCommand(Zp,e=>!!Ky(sv())&&(e.preventDefault(),!0),0),e.registerCommand(Gp,e=>!!Ky(sv())&&(e.preventDefault(),!0),0))}(l),function(e){const t=window.location.origin,n=n=>{if(n.origin!==t)return;const r=e.getRootElement();if(document.activeElement!==r)return;const o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch{return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){const r=t.payload;if(r&&"makeChanges"===r.functionId){const t=r.args;if(t){const[r,o,i,a,s,l]=t;e.update(()=>{const e=sv();if(Ky(e)){const t=e.anchor;let l=t.getNode(),c=0,u=0;if(Fy(l)&&r>=0&&o>=0&&(c=r,u=r+o,e.setTextNodeRange(l,c,l,u)),c===u&&""===i||(e.insertRawText(i),l=t.getNode()),Fy(l)){c=a,u=a+s;const t=l.getTextContentSize();c=c>t?t:c,u=u>t?t:u,e.setTextNodeRange(l,c,l,u)}n.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(l)),[l=i]),(0,s.jsxs)(s.Fragment,{children:[t,(0,s.jsx)(Sb,{content:r}),a]});var l}function Sb({content:e}){const[t]=xp(),r=function(e){const[t,r]=(0,n.useState)(()=>_b(e));return Cb(()=>{function t(){const t=_b(e);r(t)}return t(),ub(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),o=function(e){const[t]=xp(),r=(0,n.useMemo)(()=>e(t),[t,e]),o=(0,n.useRef)(r.initialValueFn()),[i,a]=(0,n.useState)(o.current);return rb(()=>{const{initialValueFn:e,subscribe:t}=r,n=e();return o.current!==n&&(o.current=n,a(n)),t(e=>{o.current=e,a(e)})},[r,e]),i}(ob);return r?"function"==typeof e?e(o):e:null}const jb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect,Ob=(0,n.forwardRef)(function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:r,ariaControls:o,ariaDescribedBy:i,ariaExpanded:a,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:d,ariaRequired:f,autoCapitalize:p,className:h,id:m,role:g="textbox",spellCheck:y=!0,style:v,tabIndex:b,"data-testid":x,...w},C){const[_,k]=(0,n.useState)(e.isEditable()),S=(0,n.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),j=(0,n.useMemo)(()=>function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}(C,S),[S,C]);return jb(()=>(k(e.isEditable()),e.registerEditableListener(e=>{k(e)})),[e]),(0,s.jsx)("div",{...w,"aria-activedescendant":_?t:void 0,"aria-autocomplete":_?r:"none","aria-controls":_?o:void 0,"aria-describedby":i,"aria-expanded":_&&"combobox"===g?!!a:void 0,"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":_?d:void 0,"aria-readonly":!_||void 0,"aria-required":f,autoCapitalize:p,className:h,contentEditable:_,"data-testid":x,id:m,ref:j,role:_?g:void 0,spellCheck:y,style:v,tabIndex:b})});function Eb(e){return e.getEditorState().read(ib(e.isComposing()))}const Pb=(0,n.forwardRef)(function(e,t){const{placeholder:n,...r}=e,[o]=xp();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ob,{editor:o,...r,ref:t}),null!=n&&(0,s.jsx)(Tb,{editor:o,content:n})]})});function Tb({content:e,editor:t}){const r=function(e){const[t,r]=(0,n.useState)(()=>Eb(e));return jb(()=>{function t(){const t=Eb(e);r(t)}return t(),ub(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[o,i]=(0,n.useState)(t.isEditable());if((0,n.useLayoutEffect)(()=>(i(t.isEditable()),t.registerEditableListener(e=>{i(e)})),[t]),!r)return null;let a=null;return"function"==typeof e?a=e(o):null!==e&&(a=e),null===a?null:(0,s.jsx)("div",{"aria-hidden":!0,children:a})}function Mb(e){e.undoStack=[],e.redoStack=[],e.current=null}function Ab({delay:e,externalHistoryState:t}){const[r]=xp();return function(e,t,r=1e3){const o=(0,n.useMemo)(()=>t||{current:null,redoStack:[],undoStack:[]},[t]);(0,n.useEffect)(()=>function(e,t,n){const r=function(e,t){let n=Date.now(),r=0;return(o,i,a,s,l,c)=>{const u=Date.now();if(c.has("historic"))return r=0,n=u,2;const d=function(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;const i=t._selection,a=e._selection;if(o)return 1;if(!(Ky(i)&&Ky(a)&&a.isCollapsed()&&i.isCollapsed()))return 0;const s=function(e,t,n){const r=e._nodeMap,o=[];for(const e of t){const t=r.get(e);void 0!==t&&o.push(t)}for(const[e,t]of n){if(!t)continue;const n=r.get(e);void 0===n||Wv(n)||o.push(n)}return o}(t,n,r);if(0===s.length)return 0;if(s.length>1){const n=t._nodeMap,r=n.get(i.anchor.key),o=n.get(a.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&Fy(r)&&1===r.__text.length&&1===i.anchor.offset?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!Fy(c)||!Fy(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=i.anchor,p=a.anchor;if(f.key!==p.key||"text"!==f.type)return 0;const h=f.offset,m=p.offset,g=d.length-u.length;return 1===g&&m===h-1?2:-1===g&&m===h+1?3:-1===g&&m===h?4:0}(o,i,s,l,e.isComposing()),f=(()=>{const f=null===a||a.editor===e,p=c.has("history-push");if(!p&&f&&c.has("history-merge"))return 0;if(null===o)return 1;const h=i._selection;return s.size>0||l.size>0?!1===p&&0!==d&&d===r&&u<n+t&&f||1===s.size&&function(e,t,n){const r=t._nodeMap.get(e),o=n._nodeMap.get(e),i=t._selection,a=n._selection;return!(Ky(i)&&Ky(a)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===a.anchor.type&&"text"===a.focus.type||!Fy(r)||!Fy(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>o.exportJSON()))}(Array.from(s)[0],o,i)?0:1:null!==h?0:2})();return n=u,r=d,f}}(e,n);return ub(e.registerCommand(Dp,()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==r.length){const o=t.current,i=r.pop();null!==o&&(n.push(o),e.dispatchCommand(oh,!0)),0===r.length&&e.dispatchCommand(ih,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0),0),e.registerCommand(Ip,()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==n.length){const o=t.current;null!==o&&(r.push(o),e.dispatchCommand(ih,!0));const i=n.pop();0===n.length&&e.dispatchCommand(oh,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0),0),e.registerCommand(nh,()=>(Mb(t),!1),0),e.registerCommand(rh,()=>(Mb(t),e.dispatchCommand(oh,!1),e.dispatchCommand(ih,!1),!0),0),e.registerUpdateListener(({editorState:n,prevEditorState:o,dirtyLeaves:i,dirtyElements:a,tags:s})=>{const l=t.current,c=t.redoStack,u=t.undoStack,d=null===l?null:l.editorState;if(null!==l&&n===d)return;const f=r(o,n,l,i,a,s);if(1===f)0!==c.length&&(t.redoStack=[],e.dispatchCommand(oh,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(ih,!0));else if(2===f)return;t.current={editor:e,editorState:n}}))}(e,o,r),[r,e,o])}(r,t,e),null}function Nb(e,t){return(Nb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Db={error:null},Ib=function(e){var t,r;function o(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=Db,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,Nb(t,r),o.getDerivedStateFromError=function(e){return{error:e}};var i=o.prototype;return i.reset=function(){this.setState(Db)},i.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},i.componentDidUpdate=function(e,t){var n,r,o,i,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(o=e.resetKeys)&&(o=[]),void 0===(i=s)&&(i=[]),o.length!==i.length||o.some(function(e,t){return!Object.is(e,i[t])}))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,s),this.reset())},i.render=function(){var e=this.state.error,t=this.props,r=t.fallbackRender,o=t.FallbackComponent,i=t.fallback;if(null!==e){var a={error:e,resetErrorBoundary:this.resetErrorBoundary};if(n.isValidElement(i))return i;if("function"==typeof r)return r(a);if(o)return n.createElement(o,a);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},o}(n.Component);function Rb({children:e,onError:t}){return(0,s.jsx)(Ib,{fallback:(0,s.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const Lb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect;function Fb({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=xp();return Lb(()=>{if(n)return r.registerUpdateListener(({editorState:o,dirtyElements:i,dirtyLeaves:a,prevEditorState:s,tags:l})=>{t&&0===i.size&&0===a.size||e&&l.has("history-merge")||s.isEmpty()||n(o,r,l)})},[r,e,t,n]),null}function Bb({editorRef:e}){const[t]=xp();return n.useEffect(()=>{"function"==typeof e?e(t):"object"==typeof e&&(e.current=t)},[t]),null}const zb={sm:"px-3 py-1.5 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-5",md:"px-3.5 py-2 rounded-md [&_.editor-content>p]:text-sm [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-sm [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-6",lg:"px-4 py-2.5 rounded-md [&_.editor-content>p]:text-base [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-base [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-7"},Vb={sm:"p-1.5 rounded-md max-h-[10.75rem]",md:"p-2 rounded-lg max-h-[13.5rem]",lg:"p-2 rounded-lg max-h-[13.5rem]"},Hb={sm:"p-1.5 rounded text-xs leading-5 font-normal",md:"p-2 rounded-md text-sm leading-6 font-normal",lg:"p-2 rounded-md text-base leading-6 font-normal"},Wb="startTransition",$b=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect,Ub=e=>{const t=document.getElementById("typeahead-menu");if(!t)return;const n=t.getBoundingClientRect();n.top+n.height>window.innerHeight&&t.scrollIntoView({block:"center"}),n.top<0&&t.scrollIntoView({block:"center"}),e.scrollIntoView({block:"nearest"})};function qb(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>r.top&&n.top<r.bottom}const Yb={};function Kb({close:e,editor:t,anchorElementRef:r,resolution:o,options:i,menuRenderFn:a,onSelectOption:s,shouldSplitNodeWithQuery:l=!1,commandPriority:c=1}){const[u,d]=(0,n.useState)(null),f=o.match&&o.match.matchingString;(0,n.useEffect)(()=>{d(0)},[f]);const p=(0,n.useCallback)(n=>{t.update(()=>{const t=null!=o.match&&l?function(e){const t=sv();if(!Ky(t)||!t.isCollapsed())return null;const n=t.anchor;if("text"!==n.type)return null;const r=n.getNode();if(!r.isSimpleText())return null;const o=n.offset,i=r.getTextContent().slice(0,o),a=e.replaceableString.length,s=o-function(e,t,n){let r=n;for(let n=r;n<=t.length;n++)e.substr(-n)===t.substr(0,n)&&(r=n);return r}(i,e.matchingString,a);if(s<0)return null;let l;return 0===s?[l]=r.splitText(o):[,l]=r.splitText(s,o),l}(o.match):null;s(n,t,e,o.match?o.match.matchingString:"")})},[t,l,o.match,s,e]),h=(0,n.useCallback)(e=>{const n=t.getRootElement();null!==n&&(n.setAttribute("aria-activedescendant","typeahead-item-"+e),d(e))},[t]);return(0,n.useEffect)(()=>()=>{const e=t.getRootElement();null!==e&&e.removeAttribute("aria-activedescendant")},[t]),$b(()=>{null===i?d(null):null===u&&h(0)},[i,u,h]),(0,n.useEffect)(()=>ub(t.registerCommand(Yb,({option:e})=>!(!e.ref||null==e.ref.current||(Ub(e.ref.current),0)),c)),[t,h,c]),(0,n.useEffect)(()=>ub(t.registerCommand(Hp,e=>{const n=e;if(null!==i&&i.length&&null!==u){const e=u!==i.length-1?u+1:0;h(e);const r=i[e];null!=r.ref&&r.ref.current&&t.dispatchCommand(Yb,{index:e,option:r}),n.preventDefault(),n.stopImmediatePropagation()}return!0},c),t.registerCommand(Vp,e=>{const t=e;if(null!==i&&i.length&&null!==u){const e=0!==u?u-1:i.length-1;h(e);const n=i[e];null!=n.ref&&n.ref.current&&Ub(n.ref.current),t.preventDefault(),t.stopImmediatePropagation()}return!0},c),t.registerCommand(qp,t=>{const n=t;return n.preventDefault(),n.stopImmediatePropagation(),e(),!0},c),t.registerCommand(Kp,e=>{const t=e;return null!==i&&null!==u&&null!=i[u]&&(t.preventDefault(),t.stopImmediatePropagation(),p(i[u]),!0)},c),t.registerCommand(Wp,e=>null!==i&&null!==u&&null!=i[u]&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),p(i[u]),!0),c)),[p,e,t,i,u,h,c]),a(r,(0,n.useMemo)(()=>({options:i,selectOptionAndCleanUp:p,selectedIndex:u,setHighlightedIndex:d}),[p,u,i]),o.match?o.match.matchingString:"")}function Zb({options:e,onQueryChange:t,onSelectOption:r,onOpen:o,onClose:i,menuRenderFn:a,triggerFn:l,anchorClassName:c,commandPriority:u=1,parent:d}){const[f]=xp(),[p,h]=(0,n.useState)(null),m=function(e,t,r,o=document.body){const[i]=xp(),a=(0,n.useRef)(document.createElement("div")),s=(0,n.useCallback)(()=>{a.current.style.top=a.current.style.bottom;const t=i.getRootElement(),n=a.current,s=n.firstChild;if(null!==t&&null!==e){const{left:i,top:l,width:c,height:u}=e.getRect(),d=a.current.offsetHeight;if(n.style.top=`${l+window.pageYOffset+d+3}px`,n.style.left=`${i+window.pageXOffset}px`,n.style.height=`${u}px`,n.style.width=`${c}px`,null!==s){s.style.top=`${l}`;const e=s.getBoundingClientRect(),r=e.height,o=e.width,a=t.getBoundingClientRect();i+o>a.right&&(n.style.left=`${a.right-o+window.pageXOffset}px`),(l+r>window.innerHeight||l+r>a.bottom)&&l-a.top>r+u&&(n.style.top=l-r+window.pageYOffset-u+"px")}n.isConnected||(null!=r&&(n.className=r),n.setAttribute("aria-label","Typeahead menu"),n.setAttribute("id","typeahead-menu"),n.setAttribute("role","listbox"),n.style.display="block",n.style.position="absolute",o.append(n)),a.current=n,t.setAttribute("aria-controls","typeahead-menu")}},[i,e,r,o]);(0,n.useEffect)(()=>{const t=i.getRootElement();if(null!==e)return s(),()=>{null!==t&&t.removeAttribute("aria-controls");const e=a.current;null!==e&&e.isConnected&&e.remove()}},[i,s,e]);const l=(0,n.useCallback)(n=>{null!==e&&(n||t(null))},[e,t]);return function(e,t,r,o){const[i]=xp();(0,n.useEffect)(()=>{if(null!=t&&null!=e){const e=i.getRootElement(),n=null!=e?function(e){let t=getComputedStyle(e);const n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(let o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.body}(e):document.body;let a=!1,s=qb(t,n);const l=function(){a||(window.requestAnimationFrame(function(){r(),a=!1}),a=!0);const e=qb(t,n);e!==s&&(s=e,null!=o&&o(e))},c=new ResizeObserver(r);return window.addEventListener("resize",r),document.addEventListener("scroll",l,{capture:!0,passive:!0}),c.observe(t),()=>{c.unobserve(t),window.removeEventListener("resize",r),document.removeEventListener("scroll",l,!0)}}},[t,i,o,r,e])}(e,a.current,s,l),a}(p,h,c,d),g=(0,n.useCallback)(()=>{h(null),null!=i&&null!==p&&i()},[i,p]),y=(0,n.useCallback)(e=>{h(e),null!=o&&null===p&&o(e)},[o,p]);return(0,n.useEffect)(()=>{const e=f.registerUpdateListener(()=>{f.getEditorState().read(()=>{const e=f._window||window,r=e.document.createRange(),o=sv(),i=function(e){let t=null;return e.getEditorState().read(()=>{const e=sv();Ky(e)&&(t=function(e){const t=e.anchor;if("text"!==t.type)return null;const n=t.getNode();if(!n.isSimpleText())return null;const r=t.offset;return n.getTextContent().slice(0,r)}(e))}),t}(f);if(!Ky(o)||!o.isCollapsed()||null===i||null===r)return void g();const a=l(i,f);if(t(a?a.matchingString:null),null!==a&&(s=f,0!==a.leadOffset||!s.getEditorState().read(()=>{const e=sv();if(Ky(e)){const t=e.anchor.getNode().getPreviousSibling();return Fy(t)&&t.isTextEntity()}return!1}))&&null!==function(e,t,n){const r=n.getSelection();if(null===r||!r.isCollapsed)return!1;const o=r.anchorNode,i=e,a=r.anchorOffset;if(null==o||null==a)return!1;try{t.setStart(o,i),t.setEnd(o,a)}catch{return!1}return!0}(a.leadOffset,r,e))return c=()=>y({getRect:()=>r.getBoundingClientRect(),match:a}),void(Wb in n?n[Wb](c):c());var s,c;g()})});return()=>{e()}},[f,l,t,p,g,y]),null===p||null===f?null:(0,s.jsx)(Kb,{close:g,resolution:p,editor:f,anchorElementRef:m,options:e,menuRenderFn:a,shouldSplitNodeWithQuery:!0,onSelectOption:r,commandPriority:u})}const Gb=e=>{switch(e){case"sm":return"xs";case"md":default:return"sm";case"lg":return"md"}},Xb=({data:e,by:t,size:r,nodeKey:o})=>{const[i]=xp(),a=!i.isEditable();let l=e;"object"==typeof e&&(l=e[t]);const c=(0,n.useCallback)(e=>{const t=vm(o);if(!t||!t.isSelected())return!1;let n=!1;const r=t.getPreviousSibling();return Fv(r)&&(r.selectEnd(),n=!0),Fy(r)&&(r.select(),n=!0),Vv(r)&&(r.selectNext(),n=!0),null===r&&(t.selectPrevious(),n=!0),n&&e.preventDefault(),n},[o]),u=(0,n.useCallback)(e=>{const t=vm(o);if(!t||!t.isSelected())return!1;let n=!1;const r=t.getNextSibling();return Fv(r)&&(r.selectStart(),n=!0),Fy(r)&&(r.select(0,0),n=!0),Vv(r)&&(r.selectPrevious(),n=!0),null===r&&(t.selectNext(),n=!0),n&&e.preventDefault(),n},[o]);return(0,n.useEffect)(()=>{const e=ub(i.registerCommand(Bp,c,1),i.registerCommand(Lp,u,1));return()=>{e()}},[i,c,u]),(0,s.jsx)(Ho,{className:"inline-flex mr-0.5",type:"rounded",size:Gb(r),label:l,icon:null,closable:!0,onClose:e=>{e.stopPropagation(),e.preventDefault(),!a&&i.update(()=>{const e=vm(o);e&&e.remove()})},disabled:a})};class Jb extends zv{constructor(e,t,n,r){super(r),f(this,"__data"),f(this,"__by"),f(this,"__size"),this.__data=e,this.__by=t,this.__size=n}static getType(){return"mention"}static clone(e){return new Jb(e.__data,e.__by,e.__size,e.__key)}static importJSON(e){return Qb(e.data,e.by,e.size)}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:document.createElement("span")}}exportJSON(){return{type:Jb.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}decorate(){return(0,s.jsx)(Xb,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}const Qb=(e,t,n)=>new Jb(e,t,n);class ex{constructor(e){f(this,"data"),f(this,"key"),f(this,"ref"),f(this,"setRefElement"),this.initData=e,this.key="",this.data=e,this.ref={current:null},this.setRefElement=e=>{this.ref.current=e}}}const tx=new Map,nx={search(e,t,n,r){setTimeout(()=>{if(!Array.isArray(e))return[];const o=e.filter(e=>{var n;if("string"==typeof e)return e.toLowerCase().includes(t.toLowerCase());const o=null==(n=null==e?void 0:e[r])?void 0:n.toString();return!!o&&o.toLowerCase().includes(t.toLowerCase())});n(o)},500)}},rx=({size:e,className:t,children:n})=>(0,s.jsx)("ul",{role:"menu",className:fe("absolute inset-x-0 top-full mt-2 mx-0 mb-0 w-full h-auto overflow-y-auto overflow-x-hidden z-10 bg-background-primary border border-solid border-border-subtle shadow-lg",Vb[e],t),children:n});rx.displayName="EditorCombobox";const ox=(0,n.forwardRef)(({size:e,children:t,selected:n=!1,className:r,...o},i)=>(0,s.jsx)("li",{role:"option",ref:i,className:fe("m-0 text-text-primary cursor-pointer",Hb[e],n&&"bg-button-tertiary-hover",r),...o,children:t}));ox.displayName="EditorCombobox.Item",rx.Item=ox;const ix=({optionsArray:e,by:t="name",size:r="md",trigger:o="@",menuComponent:i=rx,menuItemComponent:a=rx.Item,autoSpace:l=!0})=>{const c=(0,n.useRef)(!1),u="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",d=[o].join(""),f="[^"+d+u+"\\s]",p=new RegExp(`(^|\\s|\\()([${d}]((?:${f}${"(?:\\.[ |$]| |["+u+"]|)"}){0,75}))$`),h=new RegExp(`(^|\\s|\\()([${d}]((?:${f}){0,50}))$`),[m]=xp(),[g,y]=(0,n.useState)(null),v=function(e,t,r="name"){const[o,i]=(0,n.useState)([]);return(0,n.useEffect)(()=>{if(null===t)return void i([]);const n=tx.get(t);if(null!==n){if(void 0!==n)return void i(n);tx.set(t,null),nx.search(e,t,e=>{tx.set(t,e),i(e)},r)}},[t]),o}(e,g,t),b=(0,n.useCallback)((e,n,o)=>{m.update(()=>{const i=Qb(e.data,t,r);n&&n.replace(i),o()})},[m]),x=(0,n.useMemo)(()=>v.map(e=>new ex(e)),[m,v]),w=(0,n.useCallback)(e=>{if(!l)return!1;const{key:t,ctrlKey:n,metaKey:r}=e;if(n||r||" "===t||t.length>1||c.current)return c.current&&(c.current=!1),!1;const o=sv(),{focus:i,anchor:a}=o,[s]=o.getNodes();if(!a||!i||(null==a?void 0:a.key)!==(null==i?void 0:i.key)||(null==a?void 0:a.offset)!==(null==i?void 0:i.offset)||!s)return!1;if((e=>e instanceof Jb)(s)){const e=Ly(" ");return s.insertAfter(e),!0}return!1},[m,o,l]),C=(0,n.useCallback)(e=>{const{key:t}=e;return"Backspace"===t&&(c.current=!0,!0)},[c]);return(0,n.useEffect)(()=>{if(m)return ub(m.registerCommand(Rp,w,1),m.registerCommand(Up,C,1))},[m,w]),(0,s.jsx)(Zb,{onQueryChange:y,onSelectOption:b,triggerFn:e=>{let t=p.exec(e);if(null===t&&(t=h.exec(e)),null!==t){const e=t[1],n=t[3];if(n.length>=0)return{leadOffset:t.index+e.length,matchingString:n,replaceableString:t[2]}}return null},options:x,menuRenderFn:(e,{selectedIndex:n,selectOptionAndCleanUp:o,setHighlightedIndex:l})=>e.current&&null!=x&&x.length?(0,s.jsx)(i,{size:r,children:x.map((e,i)=>{var c;return(0,s.jsx)(a,{ref:e.ref,size:r,selected:i===n,onMouseEnter:()=>{l(i)},onClick:()=>o(e),children:"string"==typeof e.data?e.data:null==(c=e.data)?void 0:c[t]},i)})}):null})},ax={ltr:"ltr",rtl:"rtl",paragraph:"editor-paragraph",quote:"editor-quote",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5",h6:"editor-heading-h6"},list:{nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul",listitem:"editor-listItem",listitemChecked:"editor-listItemChecked",listitemUnchecked:"editor-listItemUnchecked"},hashtag:"editor-hashtag",image:"editor-image",link:"editor-link",text:{bold:"editor-textBold",code:"editor-textCode",italic:"editor-textItalic",strikethrough:"editor-textStrikethrough",subscript:"editor-textSubscript",superscript:"editor-textSuperscript",underline:"editor-textUnderline",underlineStrikethrough:"editor-textUnderlineStrikethrough"},code:"editor-code",codeHighlight:{atrule:"editor-tokenAttr",attr:"editor-tokenAttr",boolean:"editor-tokenProperty",builtin:"editor-tokenSelector",cdata:"editor-tokenComment",char:"editor-tokenSelector",class:"editor-tokenFunction","class-name":"editor-tokenFunction",comment:"editor-tokenComment",constant:"editor-tokenProperty",deleted:"editor-tokenProperty",doctype:"editor-tokenComment",entity:"editor-tokenOperator",function:"editor-tokenFunction",important:"editor-tokenVariable",inserted:"editor-tokenSelector",keyword:"editor-tokenAttr",namespace:"editor-tokenVariable",number:"editor-tokenProperty",operator:"editor-tokenOperator",prolog:"editor-tokenComment",property:"editor-tokenProperty",punctuation:"editor-tokenPunctuation",regex:"editor-tokenVariable",selector:"editor-tokenSelector",string:"editor-tokenSelector",symbol:"editor-tokenProperty",tag:"editor-tokenProperty",url:"editor-tokenOperator",variable:"editor-tokenVariable"}},sx=({content:e})=>(0,s.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder w-full",children:(0,s.jsx)("span",{className:"truncate",children:e})});function lx(e){console.error(e)}const cx=(0,n.forwardRef)(({defaultValue:e="",placeholder:t="Press @ to view variable suggestions",onChange:r,size:o="md",autoFocus:i=!1,options:a,by:l="name",trigger:c="@",menuComponent:u,menuItemComponent:d,className:f,wrapperClassName:p,disabled:h=!1,autoSpaceAfterMention:m=!1},g)=>{const y={namespace:"Editor",editorTheme:ax,onError:lx,nodes:[Jb],editorState:e||'{\n "root": {\n "children": [\n {\n "children": [],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "paragraph",\n "version": 1,\n "textFormat": 0,\n "textStyle": ""\n }\n ],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "root",\n "version": 1\n }\n}',editable:!h};let v,b;return(0,n.isValidElement)(u)&&(v=u),(0,n.isValidElement)(d)&&(b=d),(0,s.jsx)("div",{className:fe("relative w-full","focus-within:ring-2 focus-within:ring-offset-2 hover:outline-border-strong hover:focus-within:outline-focus-border focus-within:outline-focus-border focus-within:ring-focus transition-[color,outline,box-shadow] duration-150 ease-in-out outline outline-1 outline-field-border",zb[o],h&&"bg-field-secondary-background outline-field-border-disabled hover:outline-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",p),children:(0,s.jsxs)(nb,{initialConfig:y,children:[(0,s.jsx)("div",{className:"relative w-full [&_p]:m-0",children:(0,s.jsx)(kb,{contentEditable:(0,s.jsx)(Pb,{className:fe("editor-content focus-visible:outline-none outline-none","w-full [&>p]:w-full [&>p]:m-0",f)}),placeholder:(0,s.jsx)(sx,{content:t}),ErrorBoundary:Rb})}),(0,s.jsx)(Ab,{}),(0,s.jsx)(ix,{menuComponent:v,menuItemComponent:b,size:o,by:l,optionsArray:a,trigger:c,autoSpace:m}),(0,s.jsx)(Fb,{onChange:(e,t)=>{"function"==typeof r&&r(e,t)},ignoreSelectionChange:!0}),g&&(0,s.jsx)(Bb,{editorRef:g}),i&&(0,s.jsx)(Cp,{})]})})});cx.displayName="EditorInput";const ux=(0,n.createContext)({}),dx=()=>(0,n.useContext)(ux),fx=({size:e="md",children:t,className:n})=>(0,s.jsx)(ux.Provider,{value:{size:e},children:(0,s.jsx)("div",{className:fe("flex flex-col bg-background-primary p-2",n),children:t})});fx.displayName="Menu";const px=({heading:e,arrow:t=!1,showArrowOnHover:r=!1,open:o=!0,onClick:i,children:a,className:l})=>{const[c,u]=(0,n.useState)(o),[d,f]=(0,n.useState)(!1),{size:p}=dx(),h={sm:"text-xs",md:"text-sm"}[p??"md"],m={sm:"size-4",md:"size-5"}[p??"md"],g=()=>{u(!c),i&&i(!c)};return(0,s.jsxs)("div",{children:[!!e&&(0,s.jsxs)("div",{role:"button",tabIndex:0,onClick:g,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&g()},onMouseEnter:()=>r&&f(!0),onMouseLeave:()=>r&&f(!1),className:fe("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",h,e?"p-1":"p-0",l),"aria-expanded":c,children:[(0,s.jsx)("span",{className:"text-text-tertiary",children:e}),t&&(0,s.jsx)(lf.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:r?c||d?"visible":"hidden":"visible",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15},children:(0,s.jsx)(lf.span,{className:"inline-flex p-1",variants:{open:{rotate:180},closed:{rotate:0}},animate:c?"open":"closed",transition:{duration:.15},children:(0,s.jsx)(Pe,{className:fe("shrink-0",m)})})})]}),(0,s.jsx)(mf,{initial:!1,children:c&&(0,s.jsx)(lf.ul,{role:"menu",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0",children:a})})]})};px.displayName="Menu.List";const hx=({disabled:e=!1,active:t,onClick:n,children:r,className:o})=>{const{size:i}=dx(),a={sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"}[i??"md"];return(0,s.jsx)("li",{role:"menuitem",tabIndex:0,onClick:n,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(null==n||n())},className:fe("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",a,"hover:bg-background-secondary hover:text-text-primary",e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"","transition-colors duration-300 ease-in-out",o),children:r})};hx.displayName="Menu.Item";const mx=({variant:e="solid",className:t})=>{const n={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"}[e];return(0,s.jsx)("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:(0,s.jsx)("hr",{className:fe("w-full border-0 border-t border-border-subtle",n,t)})})};mx.displayName="Menu.Separator",fx.List=px,fx.Item=hx,fx.Separator=mx;const gx=(0,n.createContext)({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),yx=({children:e,className:t,onCollapseChange:r,collapsible:o=!0,borderOn:i=!0,...a})=>{const l=(0,n.useRef)(null),[c,u]=(0,n.useState)(()=>{const e=ye("sidebar-collapsed"),t=window.innerWidth<1280;return e||t});return(0,n.useEffect)(()=>{r&&r(c)},[c,r]),(0,n.useEffect)(()=>{const e=()=>{const e=window.innerWidth<1280;if(o)if(e)u(!0),ge("sidebar-collapsed",!0);else{const e=ye("sidebar-collapsed");u(e||!1)}else u(!1),(e=>{if(!(typeof window>"u"))try{localStorage.removeItem(e)}catch(e){console.error(e)}})("sidebar-collapsed")};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[o]),(0,s.jsx)(gx.Provider,{value:{isCollapsed:c,setIsCollapsed:u,collapsible:o},children:(0,s.jsx)("div",{ref:l,className:fe("h-full overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",i&&"border-0 border-r border-solid border-border-subtle","transition-all duration-200",c&&"w-16 px-2",t),...a,children:e})})};yx.displayName="Sidebar";const vx=({children:e})=>(0,s.jsx)("div",{className:"space-y-2",children:e});vx.displayName="Sidebar.Header";const bx=({children:e})=>(0,s.jsx)("div",{className:fe("space-y-4 grow items-start"),children:e});bx.displayName="Sidebar.Body";const xx=({children:e})=>{const{isCollapsed:t,setIsCollapsed:r,collapsible:o}=(0,n.useContext)(gx);return(0,s.jsxs)("div",{className:"space-y-4",children:[e,o&&(0,s.jsx)("button",{className:fe("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",t&&"justify-center"),onClick:()=>{r(!t),ge("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Ro,{title:"Expand",children:(0,s.jsx)(Fe,{className:"size-5"})})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Le,{className:"size-5"})," Collapse"]})})]})};xx.displayName="Sidebar.Footer";const wx=({children:e,className:t})=>(0,s.jsx)("div",{className:fe("w-full",t),children:e});wx.displayName="Sidebar.Item";const Cx=Object.assign(yx,{Header:vx,Body:bx,Footer:xx,Item:wx}),kx={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},Sx=(0,n.createContext)({sizes:kx.sm}),jx=({children:e,size:t="sm"})=>{const n=kx[t]||kx.sm;return(0,s.jsx)(Sx.Provider,{value:{sizes:n},children:(0,s.jsx)("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:(0,s.jsx)("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})})};jx.displayName="Breadcrumb";const Ox=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});Ox.displayName="Breadcrumb.List";const Ex=({children:e})=>(0,s.jsx)("li",{className:"m-0 inline-flex items-center gap-2",children:e});Ex.displayName="Breadcrumb.Item";const Px=({href:e,children:t,className:r,as:o="a",...i})=>{const{sizes:a}=(0,n.useContext)(Sx);return(0,s.jsx)(o,{href:e,className:fe(a.text,"px-1 font-medium no-underline text-text-tertiary hover:text-text-primary hover:underline","focus:outline-none focus:ring-1 focus:ring-border-interactive focus:border-border-interactive focus:rounded-sm","transition-all duration-200",r),...i,children:t})};Px.displayName="Breadcrumb.Link";const Tx=({type:e})=>{const{sizes:t}=(0,n.useContext)(Sx),r={slash:(0,s.jsx)("span",{className:fe("mx-1",t.separator),children:"/"}),arrow:(0,s.jsx)(Me,{size:t.separatorIconSize})};return(0,s.jsx)("li",{role:"separator",className:"flex items-center text-text-tertiary mx-2 p-0 list-none","aria-hidden":"true",children:r[e]||r.arrow})};Tx.displayName="Breadcrumb.Separator";const Mx=()=>{const{sizes:e}=(0,n.useContext)(Sx);return(0,s.jsx)(Ne,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};Mx.displayName="Breadcrumb.Ellipsis";const Ax=({children:e})=>{const{sizes:t}=(0,n.useContext)(Sx);return(0,s.jsx)("span",{className:fe(t.text,"font-medium text-text-primary"),children:e})};Ax.displayName="Breadcrumb.Page",jx.List=Ox,jx.Item=Ex,jx.Link=Px,jx.Separator=Tx,jx.Ellipsis=Mx,jx.Page=Ax;const Nx=(0,n.createContext)({}),Dx=()=>(0,n.useContext)(Nx),Ix={open:{opacity:1},exit:{opacity:0}},Rx={duration:.2},Lx=({open:e,setOpen:t,children:r,trigger:o=null,className:i,exitOnClickOutside:a=!1,exitOnEsc:l=!0,design:c="simple",scrollLock:u=!0})=>{const d=void 0!==e&&void 0!==t,[f,p]=(0,n.useState)(!1),h=(0,n.useRef)(null),m=(0,n.useRef)(null),g=(0,n.useMemo)(()=>d?e:f,[e,f]),y=(0,n.useMemo)(()=>d?t:p,[p,p]),v=()=>{g||y(!0)},b=()=>{g&&y(!1)},x=(0,n.useCallback)(()=>{var e;return(0,n.isValidElement)(o)?(0,n.cloneElement)(o,{onClick:pe(v,null==(e=null==o?void 0:o.props)?void 0:e.onClick)}):"function"==typeof o?o({onClick:v}):null},[o,v,b]),w=e=>{"Escape"===e.key&&l&&b()},C=e=>{a&&h.current&&!h.current.contains(e.target)&&b()};return(0,n.useEffect)(()=>(window.addEventListener("keydown",w),document.addEventListener("mousedown",C),()=>{window.removeEventListener("keydown",w),document.removeEventListener("mousedown",C)}),[g]),(0,n.useEffect)(()=>{if(!u)return;const e=document.querySelector("html");return g&&e&&(e.style.overflow="hidden"),()=>{e&&(e.style.overflow="")}},[g]),(0,s.jsxs)(s.Fragment,{children:[x(),(0,s.jsx)(Nx.Provider,{value:{open:g,setOpen:y,handleClose:b,design:c,dialogContainerRef:m,dialogRef:h},children:(0,s.jsx)("div",{ref:m,className:fe("fixed z-999999 w-0 h-0 overflow-visible",i),children:r})})]})};Lx.displayName="Dialog";const Fx=({children:e,className:t})=>{const{open:n,handleClose:r,dialogRef:o}=Dx();return(0,s.jsx)(mf,{children:n&&(0,s.jsx)(lf.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:Ix,role:"dialog",transition:Rx,children:(0,s.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,s.jsx)("div",{ref:o,className:fe("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:r}):e})})})})};Fx.displayName="Dialog.Panel";const Bx=({className:t,...n})=>{const{open:r,dialogContainerRef:o}=Dx();return null!=o&&o.current?(0,s.jsx)(s.Fragment,{children:(0,e.createPortal)((0,s.jsx)(mf,{children:r&&(0,s.jsx)(lf.div,{className:fe("fixed inset-0 -z-10 bg-background-inverse/90",t),...n,initial:"exit",animate:"open",exit:"exit",variants:Ix,transition:Rx})}),o.current)}):null};Bx.displayName="Dialog.Backdrop";const zx=({children:e,className:t,...n})=>(0,s.jsx)("div",{className:fe("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});zx.displayName="Dialog.Header";const Vx=({children:e,as:t="h3",className:n,...r})=>(0,s.jsx)(t,{className:fe("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});Vx.displayName="Dialog.Title";const Hx=({children:e,as:t="p",className:n,...r})=>(0,s.jsx)(t,{className:fe("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});Hx.displayName="Dialog.Description";const Wx=({className:e,...t})=>(0,s.jsx)("button",{className:fe("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,s.jsx)(Ue,{className:"size-4 text-text-primary shrink-0"})}),$x=({children:e,as:t=n.Fragment,...r})=>{const{handleClose:o}=Dx();return e?t===n.Fragment?"function"==typeof e?e({close:o}):(0,n.cloneElement)(e,{onClick:o}):(0,s.jsx)(t,{...r,onClick:o,children:e}):(0,s.jsx)(Wx,{onClick:o,...r})};$x.displayName="Dialog.CloseButton";const Ux=({children:e,className:t,...n})=>(0,s.jsx)("div",{className:fe("px-5",t),...n,children:e});Ux.displayName="Dialog.Body";const qx=({children:e,className:t})=>{const{design:n,handleClose:r}=Dx();return(0,s.jsx)("div",{className:fe("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};qx.displayName="Dialog.Footer",Lx.Panel=Fx,Lx.Title=Vx,Lx.Description=Hx,Lx.CloseButton=$x,Lx.Header=zx,Lx.Body=Ux,Lx.Footer=qx,Lx.Backdrop=Bx;const Yx=({children:e,gap:t="lg",className:n,...r})=>(0,s.jsx)("div",{className:fe("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",he(t),n),...r,children:e});Yx.displayName="Topbar";const Kx=({gap:e="sm",children:t,className:n})=>(0,s.jsx)("div",{className:fe("flex items-center",he(e),n),children:t});Kx.displayName="Topbar.Left";const Zx=({gap:e="md",children:t,align:n="center",className:r})=>{const o={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,s.jsx)("div",{className:fe("flex items-center grow",he(e),o,r),children:t})};Zx.displayName="Topbar.Middle";const Gx=({gap:e="sm",children:t,className:n})=>(0,s.jsx)("div",{className:fe("flex items-center",he(e),n),children:t});Gx.displayName="Topbar.Right";const Xx=({children:e,className:t})=>(0,s.jsx)("div",{className:fe("flex items-center [&>svg]:block h-full",t),children:e});Xx.displayName="Topbar.Item",Yx.Left=Kx,Yx.Middle=Zx,Yx.Right=Gx,Yx.Item=Xx;const Jx=(0,n.createContext)({}),Qx=Jx.Provider,ew=()=>(0,n.useContext)(Jx),tw=(e,t,n)=>{if(!e||!t)return{open:()=>({}),closed:()=>({})};const r=null==e?void 0:e.getBoundingClientRect(),o=null==t?void 0:t.getBoundingClientRect(),i=n?(null==r?void 0:r.x)-(null==o?void 0:o.x)+(null==r?void 0:r.width)/2:(null==o?void 0:o.width)-((null==o?void 0:o.right)-(null==r?void 0:r.x))+(null==r?void 0:r.width)/2,a=(null==r?void 0:r.y)-(null==o?void 0:o.y)+(null==r?void 0:r.height)/2;return{open:(e=1e3)=>({clipPath:`circle(${2*e+200}px at ${i}px ${a}px)`,background:"rgb(255, 255, 255, 1)",transition:{type:"spring",stiffness:20,restDelta:2,background:{duration:0}}}),closed:{clipPath:`circle(${(null==r?void 0:r.width)/2}px at ${i}px ${a}px)`,background:"rgb(255, 255, 255, 0)",transition:{delay:.5,type:"spring",stiffness:400,damping:40,background:{duration:0,delay:1e3}}}}},nw=e=>(0,s.jsx)(lf.path,{className:"stroke-icon-primary",fill:"transparent",strokeWidth:"3",strokeLinecap:"round",...e}),rw=({className:e})=>{const{toggleOpen:t,setTriggerRef:n}=ew();return(0,s.jsx)(ve,{ref:n,className:fe("relative z-[1] rounded-full hover:shadow-sm focus:[box-shadow:none] pointer-events-auto bg-background-primary",e),variant:"ghost",size:"xs",onClick:t,"aria-label":"Toggle menu",icon:(0,s.jsxs)(lf.svg,{className:"shrink-0 stroke-icon-primary",width:"23",height:"23",variants:{open:{viewBox:"0 0 20 20"},closed:{viewBox:"0 0 23 18"}},children:[(0,s.jsx)(nw,{variants:{closed:{d:"M 2 2.5 L 20 2.5"},open:{d:"M 3 16.5 L 17 2.5"}}}),(0,s.jsx)(nw,{d:"M 2 9.423 L 20 9.423",variants:{closed:{opacity:1},open:{opacity:0}},transition:{duration:.1}}),(0,s.jsx)(nw,{variants:{closed:{d:"M 2 16.346 L 20 16.346"},open:{d:"M 3 2.5 L 17 16.346"}}})]})})},ow={open:{transition:{staggerChildren:.07,delayChildren:.2}},closed:{transition:{staggerChildren:.05,staggerDirection:-1}}},iw=({tag:e="a",active:t,icon:r,iconPosition:o="left",className:i,children:a,...l})=>{var c;let u=null,d=null;const f=r&&(0,n.isValidElement)(r)?(0,n.cloneElement)(r,{key:"left-icon",className:fe("size-5",t?"text-brand-800":"text-icon-secondary",(null==(c=r.props)?void 0:c.className)??"")}):null;switch(o){case"left":u=f;break;case"right":d=f;break;default:u=null,d=null}return(0,s.jsx)(sw,{children:(0,s.jsxs)(e,{className:fe("w-full no-underline hover:no-underline text-text-primary text-lg font-medium flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-background-secondary hover:text-text-primary focus:outline-none focus:shadow-none transition ease-in-out duration-150",t?"text-text-primary bg-background-secondary":"text-text-secondary",i),...l,children:[!!u&&u,(0,s.jsx)("span",{className:"contents",children:a}),!!d&&d]})})},aw={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},sw=({children:e})=>(0,s.jsx)(lf.li,{className:"m-0 p-0 flex items-center justify-start w-full",variants:aw,whileHover:{scale:1.05},whileTap:{scale:.95},children:e}),lw=({children:e,className:t})=>{const{triggerRef:r,triggerOnRight:o,triggerOnLeft:i}=ew(),[a,l]=(0,n.useState)(null);return r?(0,s.jsxs)(lf.div,{ref:l,className:fe("absolute top-0 bottom-0 w-80 h-screen",o?"right-0":"left-0",t),children:[a&&(0,s.jsx)(lf.div,{className:fe("bg-background-primary shadow-lg absolute top-0 bottom-0 w-80 border-y-0 border-l-0 border-r border-solid border-border-subtle",o?"right-0":"left-0"),variants:tw(r,a,i??!1)}),(0,s.jsx)(lf.ul,{variants:ow,className:fe("relative mt-14 mb-0 w-full px-5 pb-5 pt-2 flex flex-col items-start justify-start gap-0.5",t),children:e})]}):null},cw=({className:e,children:t})=>{const[r,o]=function(...e){const t=(0,n.useRef)(0),[r,o]=(0,n.useState)(e[t.current]),i=(0,n.useCallback)(n=>{t.current="number"!=typeof n?((e,t,n)=>{const r=t-0;return((n-0)%r+r)%r+0})(0,e.length,t.current+1):n,o(e[t.current])},[e.length,...e]);return[r,i]}(!1,!0),[i,a]=(0,n.useState)(null),l=(0,n.useRef)(null),{height:c}=(e=>{const t=(0,n.useRef)({width:0,height:0});return(0,n.useEffect)(()=>{e.current&&(t.current.width=e.current.offsetWidth,t.current.height=e.current.offsetHeight)},[]),t.current})(l),{isRight:u=!1,isLeft:d=!0}=(e=>{if(!e)return{error:"Element not found."};const t=e.getBoundingClientRect(),n=window.innerWidth,r=n/2,o=t.right<r,i=t.left>r;return{isLeft:o,isRight:i,isCenter:!o&&!i,elementRect:{left:t.left,right:t.right,width:t.width},viewport:{width:n,center:r}}})(i);return(0,s.jsx)(Qx,{value:{isOpen:r,toggleOpen:o,setTriggerRef:e=>{(0,n.startTransition)(()=>{a(e)})},triggerRef:i,triggerOnRight:u,triggerOnLeft:d},children:(0,s.jsx)("div",{className:fe("size-6 z-[1]",e),children:(0,s.jsx)(lf.nav,{className:"h-full",initial:!1,animate:r?"open":"closed",custom:c,variants:{open:{pointerEvents:"auto"},closed:{pointerEvents:"none"}},ref:l,children:t})})})};cw.displayName="HamburgerMenu",rw.displayName="HamburgerMenu.Toggle",lw.displayName="HamburgerMenu.Options",iw.displayName="HamburgerMenu.Option",cw.Options=lw,cw.Option=iw,cw.Toggle=rw;var uw={exports:{}};!function(e,t){(function(){var n,r="Expected a function",o="__lodash_hash_undefined__",i="__lodash_placeholder__",a=32,s=128,c=1/0,u=9007199254740991,d=NaN,f=4294967295,p=f-1,h=f>>>1,m=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",256]],g="[object Arguments]",y="[object Array]",v="[object Boolean]",b="[object Date]",x="[object Error]",w="[object Function]",C="[object GeneratorFunction]",_="[object Map]",k="[object Number]",S="[object Object]",j="[object Promise]",O="[object RegExp]",E="[object Set]",P="[object String]",T="[object Symbol]",M="[object WeakMap]",A="[object ArrayBuffer]",N="[object DataView]",D="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",L="[object Int16Array]",F="[object Int32Array]",B="[object Uint8Array]",z="[object Uint8ClampedArray]",V="[object Uint16Array]",H="[object Uint32Array]",W=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,K=RegExp(q.source),Z=RegExp(Y.source),G=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,re=RegExp(ne.source),oe=/^\s+/,ie=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,we=/['\n\r\u2028\u2029\\]/g,Ce="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",je="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Pe="["+Ce+"]",Te="["+Ee+"]",Me="["+_e+"]",Ae="\\d+",Ne="["+ke+"]",De="["+Se+"]",Ie="[^"+Ce+Ee+Ae+ke+Se+je+"]",Re="\\ud83c[\\udffb-\\udfff]",Le="[^"+Ce+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+je+"]",Ve="\\u200d",He="(?:"+De+"|"+Ie+")",We="(?:"+ze+"|"+Ie+")",$e="(?:['’](?:d|ll|m|re|s|t|ve))?",Ue="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Me+"|"+Re+")?",Ye="["+Oe+"]?",Ke=Ye+qe+"(?:"+Ve+"(?:"+[Le,Fe,Be].join("|")+")"+Ye+qe+")*",Ze="(?:"+[Ne,Fe,Be].join("|")+")"+Ke,Ge="(?:"+[Le+Me+"?",Me,Fe,Be,Pe].join("|")+")",Xe=RegExp("['’]","g"),Je=RegExp(Me,"g"),Qe=RegExp(Re+"(?="+Re+")|"+Ge+Ke,"g"),et=RegExp([ze+"?"+De+"+"+$e+"(?="+[Te,ze,"$"].join("|")+")",We+"+"+Ue+"(?="+[Te,ze+He,"$"].join("|")+")",ze+"?"+He+"+"+$e,ze+"+"+Ue,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae,Ze].join("|"),"g"),tt=RegExp("["+Ve+Ce+_e+Oe+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["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"],ot=-1,it={};it[D]=it[I]=it[R]=it[L]=it[F]=it[B]=it[z]=it[V]=it[H]=!0,it[g]=it[y]=it[A]=it[v]=it[N]=it[b]=it[x]=it[w]=it[_]=it[k]=it[S]=it[O]=it[E]=it[P]=it[M]=!1;var at={};at[g]=at[y]=at[A]=at[N]=at[v]=at[b]=at[D]=at[I]=at[R]=at[L]=at[F]=at[_]=at[k]=at[S]=at[O]=at[E]=at[P]=at[T]=at[B]=at[z]=at[V]=at[H]=!0,at[x]=at[w]=at[M]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ct=parseInt,ut="object"==typeof l&&l&&l.Object===Object&&l,dt="object"==typeof self&&self&&self.Object===Object&&self,ft=ut||dt||Function("return this")(),pt=t&&!t.nodeType&&t,ht=pt&&e&&!e.nodeType&&e,mt=ht&&ht.exports===pt,gt=mt&&ut.process,yt=function(){try{return ht&&ht.require&&ht.require("util").types||gt&>.binding&>.binding("util")}catch{}}(),vt=yt&&yt.isArrayBuffer,bt=yt&&yt.isDate,xt=yt&&yt.isMap,wt=yt&&yt.isRegExp,Ct=yt&&yt.isSet,_t=yt&&yt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Tt(e,t){return!(null==e||!e.length)&&zt(e,t,0)>-1}function Mt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function At(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Nt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Dt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function It(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Lt=$t("length");function Ft(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function Bt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function zt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Bt(e,Ht,n)}function Vt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Ht(e){return e!=e}function Wt(e,t){var n=null==e?0:e.length;return n?Yt(e,t)/n:d}function $t(e){return function(t){return null==t?n:t[e]}}function Ut(e){return function(t){return null==e?n:e[t]}}function qt(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Yt(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);a!==n&&(r=r===n?a:r+a)}return r}function Kt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Zt(e){return e&&e.slice(0,fn(e)+1).replace(oe,"")}function Gt(e){return function(t){return e(t)}}function Xt(e,t){return At(t,function(t){return e[t]})}function Jt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}var tn=Ut({À:"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"}),nn=Ut({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(e){return"\\"+st[e]}function on(e){return tt.test(e)}function an(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function sn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var s=e[n];(s===t||s===i)&&(e[n]=i,a[o++]=n)}return a}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function un(e){return on(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):Lt(e)}function dn(e){return on(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var pn=Ut({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hn=function e(t){var l,ie=(t=null==t?ft:hn.defaults(ft.Object(),t,hn.pick(ft,rt))).Array,Ce=t.Date,_e=t.Error,ke=t.Function,Se=t.Math,je=t.Object,Oe=t.RegExp,Ee=t.String,Pe=t.TypeError,Te=ie.prototype,Me=ke.prototype,Ae=je.prototype,Ne=t["__core-js_shared__"],De=Me.toString,Ie=Ae.hasOwnProperty,Re=0,Le=(l=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+l:"",Fe=Ae.toString,Be=De.call(je),ze=ft._,Ve=Oe("^"+De.call(Ie).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=mt?t.Buffer:n,We=t.Symbol,$e=t.Uint8Array,Ue=He?He.allocUnsafe:n,qe=sn(je.getPrototypeOf,je),Ye=je.create,Ke=Ae.propertyIsEnumerable,Ze=Te.splice,Ge=We?We.isConcatSpreadable:n,Qe=We?We.iterator:n,tt=We?We.toStringTag:n,st=function(){try{var e=di(je,"defineProperty");return e({},"",{}),e}catch{}}(),ut=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,dt=Ce&&Ce.now!==ft.Date.now&&Ce.now,pt=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Se.ceil,gt=Se.floor,yt=je.getOwnPropertySymbols,Lt=He?He.isBuffer:n,Ut=t.isFinite,mn=Te.join,gn=sn(je.keys,je),yn=Se.max,vn=Se.min,bn=Ce.now,xn=t.parseInt,wn=Se.random,Cn=Te.reverse,kn=di(t,"DataView"),Sn=di(t,"Map"),jn=di(t,"Promise"),On=di(t,"Set"),En=di(t,"WeakMap"),Pn=di(je,"create"),Tn=En&&new En,Mn={},An=Bi(kn),Nn=Bi(Sn),Dn=Bi(jn),In=Bi(On),Rn=Bi(En),Ln=We?We.prototype:n,Fn=Ln?Ln.valueOf:n,Bn=Ln?Ln.toString:n;function zn(e){if(ns(e)&&!Ua(e)&&!(e instanceof $n)){if(e instanceof Wn)return e;if(Ie.call(e,"__wrapped__"))return zi(e)}return new Wn(e)}var Vn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ye)return Ye(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Hn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function $n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Yn;++t<n;)this.add(e[t])}function Zn(e){var t=this.__data__=new qn(e);this.size=t.size}function Gn(e,t){var n=Ua(e),r=!n&&$a(e),o=!n&&!r&&Za(e),i=!n&&!r&&!o&&us(e),a=n||r||o||i,s=a?Kt(e.length,Ee):[],l=s.length;for(var c in e)(t||Ie.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vi(c,l)))&&s.push(c);return s}function Xn(e){var t=e.length;return t?e[Yr(0,t-1)]:n}function Jn(e,t){return Di(Po(e),sr(t,0,e.length))}function Qn(e){return Di(Po(e))}function er(e,t,r){(r!==n&&!Va(e[t],r)||r===n&&!(t in e))&&ir(e,t,r)}function tr(e,t,r){var o=e[t];(!Ie.call(e,t)||!Va(o,r)||r===n&&!(t in e))&&ir(e,t,r)}function nr(e,t){for(var n=e.length;n--;)if(Va(e[n][0],t))return n;return-1}function rr(e,t,n,r){return fr(e,function(e,o,i){t(r,e,n(e),i)}),r}function or(e,t){return e&&To(t,As(t),e)}function ir(e,t,n){"__proto__"==t&&st?st(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,i=ie(o),a=null==e;++r<o;)i[r]=a?n:Os(e,t[r]);return i}function sr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function lr(e,t,r,o,i,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=i?r(e,o,i,a):r(e)),s!==n)return s;if(!ts(e))return e;var d=Ua(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Po(e,s)}else{var f=hi(e),p=f==w||f==C;if(Za(e))return _o(e,l);if(f==S||f==g||p&&!i){if(s=c||p?{}:gi(e),!l)return c?function(e,t){return To(e,pi(e),t)}(e,function(e,t){return e&&To(t,Ns(t),e)}(s,e)):function(e,t){return To(e,fi(e),t)}(e,or(s,e))}else{if(!at[f])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case A:return ko(e);case v:case b:return new r(+e);case N:return function(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case I:case R:case L:case F:case B:case z:case V:case H:return So(e,n);case _:return new r;case k:case P:return new r(e);case O:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new r;case T:return function(e){return Fn?je(Fn.call(e)):{}}(e)}}(e,f,l)}}a||(a=new Zn);var h=a.get(e);if(h)return h;a.set(e,s),ss(e)?e.forEach(function(n){s.add(lr(n,t,r,n,e,a))}):rs(e)&&e.forEach(function(n,o){s.set(o,lr(n,t,r,o,e,a))});var m=d?n:(u?c?oi:ri:c?Ns:As)(e);return jt(m||e,function(n,o){m&&(n=e[o=n]),tr(s,o,lr(n,t,r,o,e,a))}),s}function cr(e,t,r){var o=r.length;if(null==e)return!o;for(e=je(e);o--;){var i=r[o],a=t[i],s=e[i];if(s===n&&!(i in e)||!a(s))return!1}return!0}function ur(e,t,o){if("function"!=typeof e)throw new Pe(r);return Ti(function(){e.apply(n,o)},t)}function dr(e,t,n,r){var o=-1,i=Tt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=At(t,Gt(n))),r?(i=Mt,a=!1):t.length>=200&&(i=Jt,a=!1,t=new Kn(t));e:for(;++o<s;){var u=e[o],d=null==n?u:n(u);if(u=r||0!==u?u:0,a&&d==d){for(var f=c;f--;)if(t[f]===d)continue e;l.push(u)}else i(t,d,r)||l.push(u)}return l}zn.templateSettings={escape:G,evaluate:X,interpolate:J,variable:"",imports:{_:zn}},zn.prototype=Hn.prototype,zn.prototype.constructor=zn,Wn.prototype=Vn(Hn.prototype),Wn.prototype.constructor=Wn,$n.prototype=Vn(Hn.prototype),$n.prototype.constructor=$n,Un.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(Pn){var r=t[e];return r===o?n:r}return Ie.call(t,e)?t[e]:n},Un.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==n:Ie.call(t,e)},Un.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pn&&t===n?o:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0||(n==t.length-1?t.pop():Ze.call(t,n,1),--this.size,0))},qn.prototype.get=function(e){var t=this.__data__,r=nr(t,e);return r<0?n:t[r][1]},qn.prototype.has=function(e){return nr(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(Sn||qn),string:new Un}},Yn.prototype.delete=function(e){var t=ci(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return ci(this,e).get(e)},Yn.prototype.has=function(e){return ci(this,e).has(e)},Yn.prototype.set=function(e,t){var n=ci(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,o),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new qn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(e,t),this.size=n.size,this};var fr=No(xr),pr=No(wr,!0);function hr(e,t){var n=!0;return fr(e,function(e,r,o){return n=!!t(e,r,o)}),n}function mr(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(l===n?s==s&&!cs(s):r(s,l)))var l=s,c=a}return c}function gr(e,t){var n=[];return fr(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function yr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=yi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?yr(s,t-1,n,r,o):Nt(o,s):r||(o[o.length]=s)}return o}var vr=Do(),br=Do(!0);function xr(e,t){return e&&vr(e,t,As)}function wr(e,t){return e&&br(e,t,As)}function Cr(e,t){return Pt(t,function(t){return Ja(e[t])})}function _r(e,t){for(var r=0,o=(t=bo(t,e)).length;null!=e&&r<o;)e=e[Fi(t[r++])];return r&&r==o?e:n}function kr(e,t,n){var r=t(e);return Ua(e)?r:Nt(r,n(e))}function Sr(e){return null==e?e===n?"[object Undefined]":"[object Null]":tt&&tt in je(e)?function(e){var t=Ie.call(e,tt),r=e[tt];try{e[tt]=n;var o=!0}catch{}var i=Fe.call(e);return o&&(t?e[tt]=r:delete e[tt]),i}(e):function(e){return Fe.call(e)}(e)}function jr(e,t){return e>t}function Or(e,t){return null!=e&&Ie.call(e,t)}function Er(e,t){return null!=e&&t in je(e)}function Pr(e,t,r){for(var o=r?Mt:Tt,i=e[0].length,a=e.length,s=a,l=ie(a),c=1/0,u=[];s--;){var d=e[s];s&&t&&(d=At(d,Gt(t))),c=vn(d.length,c),l[s]=!r&&(t||i>=120&&d.length>=120)?new Kn(s&&d):n}d=e[0];var f=-1,p=l[0];e:for(;++f<i&&u.length<c;){var h=d[f],m=t?t(h):h;if(h=r||0!==h?h:0,!(p?Jt(p,m):o(u,m,r))){for(s=a;--s;){var g=l[s];if(!(g?Jt(g,m):o(e[s],m,r)))continue e}p&&p.push(m),u.push(h)}}return u}function Tr(e,t,r){var o=null==(e=Oi(e,t=bo(t,e)))?e:e[Fi(Xi(t))];return null==o?n:kt(o,e,r)}function Mr(e){return ns(e)&&Sr(e)==g}function Ar(e,t,r,o,i){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,r,o,i,a){var s=Ua(e),l=Ua(t),c=s?y:hi(e),u=l?y:hi(t),d=(c=c==g?S:c)==S,f=(u=u==g?S:u)==S,p=c==u;if(p&&Za(e)){if(!Za(t))return!1;s=!0,d=!1}if(p&&!d)return a||(a=new Zn),s||us(e)?ti(e,t,r,o,i,a):function(e,t,n,r,o,i,a){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case A:return!(e.byteLength!=t.byteLength||!i(new $e(e),new $e(t)));case v:case b:case k:return Va(+e,+t);case x:return e.name==t.name&&e.message==t.message;case O:case P:return e==t+"";case _:var s=an;case E:var l=1&r;if(s||(s=cn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=ti(s(e),s(t),r,o,i,a);return a.delete(e),u;case T:if(Fn)return Fn.call(e)==Fn.call(t)}return!1}(e,t,c,r,o,i,a);if(!(1&r)){var h=d&&Ie.call(e,"__wrapped__"),m=f&&Ie.call(t,"__wrapped__");if(h||m){var w=h?e.value():e,C=m?t.value():t;return a||(a=new Zn),i(w,C,r,o,a)}}return!!p&&(a||(a=new Zn),function(e,t,r,o,i,a){var s=1&r,l=ri(e),c=l.length;if(c!=ri(t).length&&!s)return!1;for(var u=c;u--;){var d=l[u];if(!(s?d in t:Ie.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var h=!0;a.set(e,t),a.set(t,e);for(var m=s;++u<c;){var g=e[d=l[u]],y=t[d];if(o)var v=s?o(y,g,d,t,e,a):o(g,y,d,e,t,a);if(!(v===n?g===y||i(g,y,r,o,a):v)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var b=e.constructor,x=t.constructor;b!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(h=!1)}return a.delete(e),a.delete(t),h}(e,t,r,o,i,a))}(e,t,r,o,Ar,i))}function Nr(e,t,r,o){var i=r.length,a=i,s=!o;if(null==e)return!a;for(e=je(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){var c=(l=r[i])[0],u=e[c],d=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var f=new Zn;if(o)var p=o(u,d,c,e,t,f);if(!(p===n?Ar(d,u,3,o,f):p))return!1}}return!0}function Dr(e){return!(!ts(e)||function(e){return!!Le&&Le in e}(e))&&(Ja(e)?Ve:ge).test(Bi(e))}function Ir(e){return"function"==typeof e?e:null==e?ol:"object"==typeof e?Ua(e)?zr(e[0],e[1]):Br(e):pl(e)}function Rr(e){if(!_i(e))return gn(e);var t=[];for(var n in je(e))Ie.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Lr(e,t){return e<t}function Fr(e,t){var n=-1,r=Ya(e)?ie(e.length):[];return fr(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Br(e){var t=ui(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function zr(e,t){return xi(e)&&ki(t)?Si(Fi(e),t):function(r){var o=Os(r,e);return o===n&&o===t?Es(r,e):Ar(t,o,3)}}function Vr(e,t,r,o,i){e!==t&&vr(t,function(a,s){if(i||(i=new Zn),ts(a))!function(e,t,r,o,i,a,s){var l=Ei(e,r),c=Ei(t,r),u=s.get(c);if(u)er(e,r,u);else{var d=a?a(l,c,r+"",e,t,s):n,f=d===n;if(f){var p=Ua(c),h=!p&&Za(c),m=!p&&!h&&us(c);d=c,p||h||m?Ua(l)?d=l:Ka(l)?d=Po(l):h?(f=!1,d=_o(c,!0)):m?(f=!1,d=So(c,!0)):d=[]:is(c)||$a(c)?(d=l,$a(l)?d=vs(l):(!ts(l)||Ja(l))&&(d=gi(c))):f=!1}f&&(s.set(c,d),i(d,c,o,a,s),s.delete(c)),er(e,r,d)}}(e,t,s,r,Vr,o,i);else{var l=o?o(Ei(e,s),a,s+"",e,t,i):n;l===n&&(l=a),er(e,s,l)}},Ns)}function Hr(e,t){var r=e.length;if(r)return vi(t+=t<0?r:0,r)?e[t]:n}function Wr(e,t,n){t=t.length?At(t,function(e){return Ua(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e}):[ol];var r=-1;return t=At(t,Gt(li())),function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=jo(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(Fr(e,function(e,n,o){return{criteria:At(t,function(t){return t(e)}),index:++r,value:e}}))}function $r(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=_r(e,a);n(s,a)&&Jr(i,bo(a,e),s)}return i}function Ur(e,t,n,r){var o=r?Vt:zt,i=-1,a=t.length,s=e;for(e===t&&(t=Po(t)),n&&(s=At(e,Gt(n)));++i<a;)for(var l=0,c=t[i],u=n?n(c):c;(l=o(s,u,l,r))>-1;)s!==e&&Ze.call(s,l,1),Ze.call(e,l,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;vi(o)?Ze.call(e,o,1):uo(e,o)}}return e}function Yr(e,t){return e+gt(wn()*(t-e+1))}function Kr(e,t){var n="";if(!e||t<1||t>u)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return Mi(ji(e,t,ol),e+"")}function Gr(e){return Xn(Vs(e))}function Xr(e,t){var n=Vs(e);return Di(n,sr(t,0,n.length))}function Jr(e,t,r,o){if(!ts(e))return e;for(var i=-1,a=(t=bo(t,e)).length,s=a-1,l=e;null!=l&&++i<a;){var c=Fi(t[i]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var d=l[c];(u=o?o(d,c,l):n)===n&&(u=ts(d)?d:vi(t[i+1])?[]:{})}tr(l,c,u),l=l[c]}return e}var Qr=Tn?function(e,t){return Tn.set(e,t),e}:ol,eo=st?function(e,t){return st(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:ol;function to(e){return Di(Vs(e))}function no(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ie(o);++r<o;)i[r]=e[r+t];return i}function ro(e,t){var n;return fr(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function oo(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=h){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return io(e,t,ol,n)}function io(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=cs(t),u=t===n;i<a;){var d=gt((i+a)/2),f=r(e[d]),h=f!==n,m=null===f,g=f==f,y=cs(f);if(s)var v=o||g;else v=u?g&&(o||h):l?g&&h&&(o||!m):c?g&&h&&!m&&(o||!y):!m&&!y&&(o?f<=t:f<t);v?i=d+1:a=d}return vn(a,p)}function ao(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Va(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function so(e){return"number"==typeof e?e:cs(e)?d:+e}function lo(e){if("string"==typeof e)return e;if(Ua(e))return At(e,lo)+"";if(cs(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-c?"-0":t}function co(e,t,n){var r=-1,o=Tt,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=Mt;else if(i>=200){var c=t?null:Zo(e);if(c)return cn(c);a=!1,o=Jt,l=new Kn}else l=t?[]:s;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}function uo(e,t){return null==(e=Oi(e,t=bo(t,e)))||delete e[Fi(Xi(t))]}function fo(e,t,n,r){return Jr(e,t,n(_r(e,t)),r)}function po(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?no(e,r?0:i,r?i+1:o):no(e,r?i+1:0,r?o:i)}function ho(e,t){var n=e;return n instanceof $n&&(n=n.value()),Dt(t,function(e,t){return t.func.apply(t.thisArg,Nt([e],t.args))},n)}function mo(e,t,n){var r=e.length;if(r<2)return r?co(e[0]):[];for(var o=-1,i=ie(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=dr(i[o]||a,e[s],t,n));return co(yr(i,1),t,n)}function go(e,t,r){for(var o=-1,i=e.length,a=t.length,s={};++o<i;){var l=o<a?t[o]:n;r(s,e[o],l)}return s}function yo(e){return Ka(e)?e:[]}function vo(e){return"function"==typeof e?e:ol}function bo(e,t){return Ua(e)?e:xi(e,t)?[e]:Li(bs(e))}var xo=Zr;function wo(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:no(e,t,r)}var Co=ut||function(e){return ft.clearTimeout(e)};function _o(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function ko(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function So(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function jo(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=cs(e),s=t!==n,l=null===t,c=t==t,u=cs(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||o&&s&&c||!r&&c||!i)return 1;if(!o&&!a&&!u&&e<t||u&&r&&i&&!o&&!a||l&&r&&i||!s&&i||!c)return-1}return 0}function Oo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,c=yn(i-a,0),u=ie(l+c),d=!r;++s<l;)u[s]=t[s];for(;++o<a;)(d||o<i)&&(u[n[o]]=e[o]);for(;c--;)u[s++]=e[o++];return u}function Eo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,c=t.length,u=yn(i-s,0),d=ie(u+c),f=!r;++o<u;)d[o]=e[o];for(var p=o;++l<c;)d[p+l]=t[l];for(;++a<s;)(f||o<i)&&(d[p+n[a]]=e[o++]);return d}function Po(e,t){var n=-1,r=e.length;for(t||(t=ie(r));++n<r;)t[n]=e[n];return t}function To(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=o?o(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),i?ir(r,l,c):tr(r,l,c)}return r}function Mo(e,t){return function(n,r){var o=Ua(n)?St:rr,i=t?t():{};return o(n,e,li(r,2),i)}}function Ao(e){return Zr(function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,s=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,s&&bi(r[0],r[1],s)&&(a=i<3?n:a,i=1),t=je(t);++o<i;){var l=r[o];l&&e(t,l,o,a)}return t})}function No(e,t){return function(n,r){if(null==n)return n;if(!Ya(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=je(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Do(e){return function(t,n,r){for(var o=-1,i=je(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}function Io(e){return function(t){var r=on(t=bs(t))?dn(t):n,o=r?r[0]:t.charAt(0),i=r?wo(r,1).join(""):t.slice(1);return o[e]()+i}}function Ro(e){return function(t){return Dt(Js($s(t).replace(Xe,"")),e,"")}}function Lo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Vn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function Fo(e){return function(t,r,o){var i=je(t);if(!Ya(t)){var a=li(r,3);t=As(t),r=function(e){return a(i[e],e,i)}}var s=e(t,r,o);return s>-1?i[a?t[s]:s]:n}}function Bo(e){return ni(function(t){var o=t.length,i=o,a=Wn.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new Pe(r);if(a&&!l&&"wrapper"==ai(s))var l=new Wn([],!0)}for(i=l?i:o;++i<o;){var c=ai(s=t[i]),u="wrapper"==c?ii(s):n;l=u&&wi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[ai(u[0])].apply(l,u[3]):1==s.length&&wi(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Ua(n))return l.plant(n).value();for(var r=0,i=o?t[r].apply(this,e):n;++r<o;)i=t[r].call(this,i);return i}})}function zo(e,t,r,o,i,a,l,c,u,d){var f=t&s,p=1&t,h=2&t,m=24&t,g=512&t,y=h?n:Lo(e);return function s(){for(var v=arguments.length,b=ie(v),x=v;x--;)b[x]=arguments[x];if(m)var w=si(s),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,w);if(o&&(b=Oo(b,o,i,m)),a&&(b=Eo(b,a,l,m)),v-=C,m&&v<d){var _=ln(b,w);return Yo(e,t,zo,s.placeholder,r,b,_,c,u,d-v)}var k=p?r:this,S=h?k[e]:e;return v=b.length,c?b=function(e,t){for(var r=e.length,o=vn(t.length,r),i=Po(e);o--;){var a=t[o];e[o]=vi(a,r)?i[a]:n}return e}(b,c):g&&v>1&&b.reverse(),f&&u<v&&(b.length=u),this&&this!==ft&&this instanceof s&&(S=y||Lo(S)),S.apply(k,b)}}function Vo(e,t){return function(n,r){return function(e,t,n,r){return xr(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}function Ho(e,t){return function(r,o){var i;if(r===n&&o===n)return t;if(r!==n&&(i=r),o!==n){if(i===n)return o;"string"==typeof r||"string"==typeof o?(r=lo(r),o=lo(o)):(r=so(r),o=so(o)),i=e(r,o)}return i}}function Wo(e){return ni(function(t){return t=At(t,Gt(li())),Zr(function(n){var r=this;return e(t,function(e){return kt(e,r,n)})})})}function $o(e,t){var r=(t=t===n?" ":lo(t)).length;if(r<2)return r?Kr(t,e):t;var o=Kr(t,ht(e/un(t)));return on(t)?wo(dn(o),0,e).join(""):o.slice(0,e)}function Uo(e){return function(t,r,o){return o&&"number"!=typeof o&&bi(t,r,o)&&(r=o=n),t=hs(t),r===n?(r=t,t=0):r=hs(r),function(e,t,n,r){for(var o=-1,i=yn(ht((t-e)/(n||1)),0),a=ie(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,r,o=o===n?t<r?1:-1:hs(o),e)}}function qo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Yo(e,t,r,o,i,s,l,c,u,d){var f=8&t;t|=f?a:64,4&(t&=~(f?64:a))||(t&=-4);var p=[e,t,i,f?s:n,f?l:n,f?n:s,f?n:l,c,u,d],h=r.apply(n,p);return wi(e)&&Pi(h,p),h.placeholder=o,Ai(h,e,t)}function Ko(e){var t=Se[e];return function(e,n){if(e=ys(e),(n=null==n?0:vn(ms(n),292))&&Ut(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Zo=On&&1/cn(new On([,-0]))[1]==c?function(e){return new On(e)}:cl;function Go(e){return function(t){var n=hi(t);return n==_?an(t):n==E?function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}(t):function(e,t){return At(t,function(t){return[t,e[t]]})}(t,e(t))}}function Xo(e,t,o,l,c,u,d,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Pe(r);var h=l?l.length:0;if(h||(t&=-97,l=c=n),d=d===n?d:yn(ms(d),0),f=f===n?f:ms(f),h-=c?c.length:0,64&t){var m=l,g=c;l=c=n}var y=p?n:ii(e),v=[e,t,o,l,c,m,g,u,d,f];if(y&&function(e,t){var n=e[1],r=t[1],o=n|r,a=o<131,l=r==s&&8==n||r==s&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!l)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?Oo(u,c,t[4]):c,e[4]=u?ln(e[3],i):t[4]}(c=t[5])&&(u=e[5],e[5]=u?Eo(u,c,t[6]):c,e[6]=u?ln(e[5],i):t[6]),(c=t[7])&&(e[7]=c),r&s&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(v,y),e=v[0],t=v[1],o=v[2],l=v[3],c=v[4],!(f=v[9]=v[9]===n?p?0:e.length:yn(v[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,r){var o=Lo(e);return function i(){for(var a=arguments.length,s=ie(a),l=a,c=si(i);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:ln(s,c);return(a-=u.length)<r?Yo(e,t,zo,i.placeholder,n,s,u,n,n,r-a):kt(this&&this!==ft&&this instanceof i?o:e,this,s)}}(e,t,f):t!=a&&33!=t||c.length?zo.apply(n,v):function(e,t,n,r){var o=1&t,i=Lo(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=ie(c+s),d=this&&this!==ft&&this instanceof t?i:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return kt(d,o?n:this,u)}}(e,t,o,l);else var b=function(e,t,n){var r=1&t,o=Lo(e);return function t(){return(this&&this!==ft&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,o);return Ai((y?Qr:Pi)(b,v),e,t)}function Jo(e,t,r,o){return e===n||Va(e,Ae[r])&&!Ie.call(o,r)?t:e}function Qo(e,t,r,o,i,a){return ts(e)&&ts(t)&&(a.set(t,e),Vr(e,t,n,Qo,a),a.delete(t)),e}function ei(e){return is(e)?n:e}function ti(e,t,r,o,i,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,h=2&r?new Kn:n;for(a.set(e,t),a.set(t,e);++f<l;){var m=e[f],g=t[f];if(o)var y=s?o(g,m,f,t,e,a):o(m,g,f,e,t,a);if(y!==n){if(y)continue;p=!1;break}if(h){if(!Rt(t,function(e,t){if(!Jt(h,t)&&(m===e||i(m,e,r,o,a)))return h.push(t)})){p=!1;break}}else if(m!==g&&!i(m,g,r,o,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ni(e){return Mi(ji(e,n,qi),e+"")}function ri(e){return kr(e,As,fi)}function oi(e){return kr(e,Ns,pi)}var ii=Tn?function(e){return Tn.get(e)}:cl;function ai(e){for(var t=e.name+"",n=Mn[t],r=Ie.call(Mn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function si(e){return(Ie.call(zn,"placeholder")?zn:e).placeholder}function li(){var e=zn.iteratee||il;return e=e===il?Ir:e,arguments.length?e(arguments[0],arguments[1]):e}function ci(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ui(e){for(var t=As(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ki(o)]}return t}function di(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Dr(r)?r:n}var fi=yt?function(e){return null==e?[]:(e=je(e),Pt(yt(e),function(t){return Ke.call(e,t)}))}:gl,pi=yt?function(e){for(var t=[];e;)Nt(t,fi(e)),e=qe(e);return t}:gl,hi=Sr;function mi(e,t,n){for(var r=-1,o=(t=bo(t,e)).length,i=!1;++r<o;){var a=Fi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&es(o)&&vi(a,o)&&(Ua(e)||$a(e))}function gi(e){return"function"!=typeof e.constructor||_i(e)?{}:Vn(qe(e))}function yi(e){return Ua(e)||$a(e)||!!(Ge&&e&&e[Ge])}function vi(e,t){var n=typeof e;return!!(t=t??u)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function bi(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?Ya(n)&&vi(t,n.length):"string"==r&&t in n)&&Va(n[t],e)}function xi(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||ee.test(e)||!Q.test(e)||null!=t&&e in je(t)}function wi(e){var t=ai(e),n=zn[t];if("function"!=typeof n||!(t in $n.prototype))return!1;if(e===n)return!0;var r=ii(n);return!!r&&e===r[0]}(kn&&hi(new kn(new ArrayBuffer(1)))!=N||Sn&&hi(new Sn)!=_||jn&&hi(jn.resolve())!=j||On&&hi(new On)!=E||En&&hi(new En)!=M)&&(hi=function(e){var t=Sr(e),r=t==S?e.constructor:n,o=r?Bi(r):"";if(o)switch(o){case An:return N;case Nn:return _;case Dn:return j;case In:return E;case Rn:return M}return t});var Ci=Ne?Ja:yl;function _i(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function ki(e){return e==e&&!ts(e)}function Si(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in je(r))}}function ji(e,t,r){return t=yn(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=yn(n.length-t,0),a=ie(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=ie(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),kt(e,this,s)}}function Oi(e,t){return t.length<2?e:_r(e,no(t,0,-1))}function Ei(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Pi=Ni(Qr),Ti=pt||function(e,t){return ft.setTimeout(e,t)},Mi=Ni(eo);function Ai(e,t,n){var r=t+"";return Mi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return jt(m,function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(le):[]}(r),n)))}function Ni(e){var t=0,r=0;return function(){var o=bn(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Di(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r<t;){var a=Yr(r,i),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Ii,Ri,Li=(Ii=Ia(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,function(e,n,r,o){t.push(r?o.replace(de,"$1"):n||e)}),t},function(e){return 500===Ri.size&&Ri.clear(),e}),Ri=Ii.cache,Ii);function Fi(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-c?"-0":t}function Bi(e){if(null!=e){try{return De.call(e)}catch{}try{return e+""}catch{}}return""}function zi(e){if(e instanceof $n)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Po(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vi=Zr(function(e,t){return Ka(e)?dr(e,yr(t,1,Ka,!0)):[]}),Hi=Zr(function(e,t){var r=Xi(t);return Ka(r)&&(r=n),Ka(e)?dr(e,yr(t,1,Ka,!0),li(r,2)):[]}),Wi=Zr(function(e,t){var r=Xi(t);return Ka(r)&&(r=n),Ka(e)?dr(e,yr(t,1,Ka,!0),n,r):[]});function $i(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ms(n);return o<0&&(o=yn(r+o,0)),Bt(e,li(t,3),o)}function Ui(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==n&&(i=ms(r),i=r<0?yn(o+i,0):vn(i,o-1)),Bt(e,li(t,3),i,!0)}function qi(e){return null!=e&&e.length?yr(e,1):[]}function Yi(e){return e&&e.length?e[0]:n}var Ki=Zr(function(e){var t=At(e,yo);return t.length&&t[0]===e[0]?Pr(t):[]}),Zi=Zr(function(e){var t=Xi(e),r=At(e,yo);return t===Xi(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Pr(r,li(t,2)):[]}),Gi=Zr(function(e){var t=Xi(e),r=At(e,yo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Pr(r,n,t):[]});function Xi(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Ji=Zr(Qi);function Qi(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var ea=ni(function(e,t){var n=null==e?0:e.length,r=ar(e,t);return qr(e,At(t,function(e){return vi(e,n)?+e:e}).sort(jo)),r});function ta(e){return null==e?e:Cn.call(e)}var na=Zr(function(e){return co(yr(e,1,Ka,!0))}),ra=Zr(function(e){var t=Xi(e);return Ka(t)&&(t=n),co(yr(e,1,Ka,!0),li(t,2))}),oa=Zr(function(e){var t=Xi(e);return t="function"==typeof t?t:n,co(yr(e,1,Ka,!0),n,t)});function ia(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,function(e){if(Ka(e))return t=yn(e.length,t),!0}),Kt(t,function(t){return At(e,$t(t))})}function aa(e,t){if(!e||!e.length)return[];var r=ia(e);return null==t?r:At(r,function(e){return kt(t,n,e)})}var sa=Zr(function(e,t){return Ka(e)?dr(e,t):[]}),la=Zr(function(e){return mo(Pt(e,Ka))}),ca=Zr(function(e){var t=Xi(e);return Ka(t)&&(t=n),mo(Pt(e,Ka),li(t,2))}),ua=Zr(function(e){var t=Xi(e);return t="function"==typeof t?t:n,mo(Pt(e,Ka),n,t)}),da=Zr(ia),fa=Zr(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,aa(e,r)});function pa(e){var t=zn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ma=ni(function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&o instanceof $n&&vi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:n}),new Wn(o,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(i)}),ga=Mo(function(e,t,n){Ie.call(e,n)?++e[n]:ir(e,n,1)}),ya=Fo($i),va=Fo(Ui);function ba(e,t){return(Ua(e)?jt:fr)(e,li(t,3))}function xa(e,t){return(Ua(e)?Ot:pr)(e,li(t,3))}var wa=Mo(function(e,t,n){Ie.call(e,n)?e[n].push(t):ir(e,n,[t])}),Ca=Zr(function(e,t,n){var r=-1,o="function"==typeof t,i=Ya(e)?ie(e.length):[];return fr(e,function(e){i[++r]=o?kt(t,e,n):Tr(e,t,n)}),i}),_a=Mo(function(e,t,n){ir(e,n,t)});function ka(e,t){return(Ua(e)?At:Fr)(e,li(t,3))}var Sa=Mo(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ja=Zr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&bi(e,t[0],t[1])?t=[]:n>2&&bi(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,yr(t,1),[])}),Oa=dt||function(){return ft.Date.now()};function Ea(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Xo(e,s,n,n,n,n,t)}function Pa(e,t){var o;if("function"!=typeof t)throw new Pe(r);return e=ms(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Ta=Zr(function(e,t,n){var r=1;if(n.length){var o=ln(n,si(Ta));r|=a}return Xo(e,r,t,n,o)}),Ma=Zr(function(e,t,n){var r=3;if(n.length){var o=ln(n,si(Ma));r|=a}return Xo(t,r,e,n,o)});function Aa(e,t,o){var i,a,s,l,c,u,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Pe(r);function m(t){var r=i,o=a;return i=a=n,d=t,l=e.apply(o,r)}function g(e){var r=e-u;return u===n||r>=t||r<0||p&&e-d>=s}function y(){var e=Oa();if(g(e))return v(e);c=Ti(y,function(e){var n=t-(e-u);return p?vn(n,s-(e-d)):n}(e))}function v(e){return c=n,h&&i?m(e):(i=a=n,l)}function b(){var e=Oa(),r=g(e);if(i=arguments,a=this,u=e,r){if(c===n)return function(e){return d=e,c=Ti(y,t),f?m(e):l}(u);if(p)return Co(c),c=Ti(y,t),m(u)}return c===n&&(c=Ti(y,t)),l}return t=ys(t)||0,ts(o)&&(f=!!o.leading,s=(p="maxWait"in o)?yn(ys(o.maxWait)||0,t):s,h="trailing"in o?!!o.trailing:h),b.cancel=function(){c!==n&&Co(c),d=0,i=u=a=c=n},b.flush=function(){return c===n?l:v(Oa())},b}var Na=Zr(function(e,t){return ur(e,1,t)}),Da=Zr(function(e,t,n){return ur(e,ys(t)||0,n)});function Ia(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ia.Cache||Yn),n}function Ra(e){if("function"!=typeof e)throw new Pe(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ia.Cache=Yn;var La=xo(function(e,t){var n=(t=1==t.length&&Ua(t[0])?At(t[0],Gt(li())):At(yr(t,1),Gt(li()))).length;return Zr(function(r){for(var o=-1,i=vn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return kt(e,this,r)})}),Fa=Zr(function(e,t){var r=ln(t,si(Fa));return Xo(e,a,n,t,r)}),Ba=Zr(function(e,t){var r=ln(t,si(Ba));return Xo(e,64,n,t,r)}),za=ni(function(e,t){return Xo(e,256,n,n,n,t)});function Va(e,t){return e===t||e!=e&&t!=t}var Ha=qo(jr),Wa=qo(function(e,t){return e>=t}),$a=Mr(function(){return arguments}())?Mr:function(e){return ns(e)&&Ie.call(e,"callee")&&!Ke.call(e,"callee")},Ua=ie.isArray,qa=vt?Gt(vt):function(e){return ns(e)&&Sr(e)==A};function Ya(e){return null!=e&&es(e.length)&&!Ja(e)}function Ka(e){return ns(e)&&Ya(e)}var Za=Lt||yl,Ga=bt?Gt(bt):function(e){return ns(e)&&Sr(e)==b};function Xa(e){if(!ns(e))return!1;var t=Sr(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Ja(e){if(!ts(e))return!1;var t=Sr(e);return t==w||t==C||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qa(e){return"number"==typeof e&&e==ms(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=xt?Gt(xt):function(e){return ns(e)&&hi(e)==_};function os(e){return"number"==typeof e||ns(e)&&Sr(e)==k}function is(e){if(!ns(e)||Sr(e)!=S)return!1;var t=qe(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==Be}var as=wt?Gt(wt):function(e){return ns(e)&&Sr(e)==O},ss=Ct?Gt(Ct):function(e){return ns(e)&&hi(e)==E};function ls(e){return"string"==typeof e||!Ua(e)&&ns(e)&&Sr(e)==P}function cs(e){return"symbol"==typeof e||ns(e)&&Sr(e)==T}var us=_t?Gt(_t):function(e){return ns(e)&&es(e.length)&&!!it[Sr(e)]},ds=qo(Lr),fs=qo(function(e,t){return e<=t});function ps(e){if(!e)return[];if(Ya(e))return ls(e)?dn(e):Po(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=hi(e);return(t==_?an:t==E?cn:Vs)(e)}function hs(e){return e?(e=ys(e))===c||e===-c?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ms(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?sr(ms(e),0,f):0}function ys(e){if("number"==typeof e)return e;if(cs(e))return d;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var n=me.test(e);return n||ye.test(e)?ct(e.slice(2),n?2:8):he.test(e)?d:+e}function vs(e){return To(e,Ns(e))}function bs(e){return null==e?"":lo(e)}var xs=Ao(function(e,t){if(_i(t)||Ya(t))To(t,As(t),e);else for(var n in t)Ie.call(t,n)&&tr(e,n,t[n])}),ws=Ao(function(e,t){To(t,Ns(t),e)}),Cs=Ao(function(e,t,n,r){To(t,Ns(t),e,r)}),_s=Ao(function(e,t,n,r){To(t,As(t),e,r)}),ks=ni(ar),Ss=Zr(function(e,t){e=je(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&bi(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],s=Ns(a),l=-1,c=s.length;++l<c;){var u=s[l],d=e[u];(d===n||Va(d,Ae[u])&&!Ie.call(e,u))&&(e[u]=a[u])}return e}),js=Zr(function(e){return e.push(n,Qo),kt(Is,n,e)});function Os(e,t,r){var o=null==e?n:_r(e,t);return o===n?r:o}function Es(e,t){return null!=e&&mi(e,t,Er)}var Ps=Vo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n},tl(ol)),Ts=Vo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ie.call(e,t)?e[t].push(n):e[t]=[n]},li),Ms=Zr(Tr);function As(e){return Ya(e)?Gn(e):Rr(e)}function Ns(e){return Ya(e)?Gn(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in je(e))t.push(n);return t}(e);var t=_i(e),n=[];for(var r in e)"constructor"==r&&(t||!Ie.call(e,r))||n.push(r);return n}(e)}var Ds=Ao(function(e,t,n){Vr(e,t,n)}),Is=Ao(function(e,t,n,r){Vr(e,t,n,r)}),Rs=ni(function(e,t){var n={};if(null==e)return n;var r=!1;t=At(t,function(t){return t=bo(t,e),r||(r=t.length>1),t}),To(e,oi(e),n),r&&(n=lr(n,7,ei));for(var o=t.length;o--;)uo(n,t[o]);return n}),Ls=ni(function(e,t){return null==e?{}:function(e,t){return $r(e,t,function(t,n){return Es(e,n)})}(e,t)});function Fs(e,t){if(null==e)return{};var n=At(oi(e),function(e){return[e]});return t=li(t),$r(e,n,function(e,n){return t(e,n[0])})}var Bs=Go(As),zs=Go(Ns);function Vs(e){return null==e?[]:Xt(e,As(e))}var Hs=Ro(function(e,t,n){return t=t.toLowerCase(),e+(n?Ws(t):t)});function Ws(e){return Xs(bs(e).toLowerCase())}function $s(e){return(e=bs(e))&&e.replace(be,tn).replace(Je,"")}var Us=Ro(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),qs=Ro(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Ys=Io("toLowerCase"),Ks=Ro(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Zs=Ro(function(e,t,n){return e+(n?" ":"")+Xs(t)}),Gs=Ro(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Xs=Io("toUpperCase");function Js(e,t,r){return e=bs(e),(t=r?n:t)===n?function(e){return nt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Qs=Zr(function(e,t){try{return kt(e,n,t)}catch(e){return Xa(e)?e:new _e(e)}}),el=ni(function(e,t){return jt(t,function(t){t=Fi(t),ir(e,t,Ta(e[t],e))}),e});function tl(e){return function(){return e}}var nl=Bo(),rl=Bo(!0);function ol(e){return e}function il(e){return Ir("function"==typeof e?e:lr(e,1))}var al=Zr(function(e,t){return function(n){return Tr(n,e,t)}}),sl=Zr(function(e,t){return function(n){return Tr(e,n,t)}});function ll(e,t,n){var r=As(t),o=Cr(t,r);null==n&&(!ts(t)||!o.length&&r.length)&&(n=t,t=e,e=this,o=Cr(t,As(t)));var i=!(ts(n)&&"chain"in n&&!n.chain),a=Ja(e);return jt(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Po(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Nt([this.value()],arguments))})}),e}function cl(){}var ul=Wo(At),dl=Wo(Et),fl=Wo(Rt);function pl(e){return xi(e)?$t(Fi(e)):function(e){return function(t){return _r(t,e)}}(e)}var hl=Uo(),ml=Uo(!0);function gl(){return[]}function yl(){return!1}var vl=Ho(function(e,t){return e+t},0),bl=Ko("ceil"),xl=Ho(function(e,t){return e/t},1),wl=Ko("floor"),Cl=Ho(function(e,t){return e*t},1),_l=Ko("round"),kl=Ho(function(e,t){return e-t},0);return zn.after=function(e,t){if("function"!=typeof t)throw new Pe(r);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=Ea,zn.assign=xs,zn.assignIn=ws,zn.assignInWith=Cs,zn.assignWith=_s,zn.at=ks,zn.before=Pa,zn.bind=Ta,zn.bindAll=el,zn.bindKey=Ma,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},zn.chain=pa,zn.chunk=function(e,t,r){t=(r?bi(e,t,r):t===n)?1:yn(ms(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=ie(ht(o/t));i<o;)s[a++]=no(e,i,i+=t);return s},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ie(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Nt(Ua(n)?Po(n):[n],yr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=li();return e=t?At(e,function(e){if("function"!=typeof e[1])throw new Pe(r);return[n(e[0]),e[1]]}):[],Zr(function(n){for(var r=-1;++r<t;){var o=e[r];if(kt(o[0],this,n))return kt(o[1],this,n)}})},zn.conforms=function(e){return function(e){var t=As(e);return function(n){return cr(n,e,t)}}(lr(e,1))},zn.constant=tl,zn.countBy=ga,zn.create=function(e,t){var n=Vn(e);return null==t?n:or(n,t)},zn.curry=function e(t,r,o){var i=Xo(t,8,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},zn.curryRight=function e(t,r,o){var i=Xo(t,16,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},zn.debounce=Aa,zn.defaults=Ss,zn.defaultsDeep=js,zn.defer=Na,zn.delay=Da,zn.difference=Vi,zn.differenceBy=Hi,zn.differenceWith=Wi,zn.drop=function(e,t,r){var o=null==e?0:e.length;return o?no(e,(t=r||t===n?1:ms(t))<0?0:t,o):[]},zn.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?no(e,0,(t=o-(t=r||t===n?1:ms(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?po(e,li(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?po(e,li(t,3),!0):[]},zn.fill=function(e,t,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&bi(e,t,r)&&(r=0,o=i),function(e,t,r,o){var i=e.length;for((r=ms(r))<0&&(r=-r>i?0:i+r),(o=o===n||o>i?i:ms(o))<0&&(o+=i),o=r>o?0:gs(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},zn.filter=function(e,t){return(Ua(e)?Pt:gr)(e,li(t,3))},zn.flatMap=function(e,t){return yr(ka(e,t),1)},zn.flatMapDeep=function(e,t){return yr(ka(e,t),c)},zn.flatMapDepth=function(e,t,r){return r=r===n?1:ms(r),yr(ka(e,t),r)},zn.flatten=qi,zn.flattenDeep=function(e){return null!=e&&e.length?yr(e,c):[]},zn.flattenDepth=function(e,t){return null!=e&&e.length?yr(e,t=t===n?1:ms(t)):[]},zn.flip=function(e){return Xo(e,512)},zn.flow=nl,zn.flowRight=rl,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},zn.functions=function(e){return null==e?[]:Cr(e,As(e))},zn.functionsIn=function(e){return null==e?[]:Cr(e,Ns(e))},zn.groupBy=wa,zn.initial=function(e){return null!=e&&e.length?no(e,0,-1):[]},zn.intersection=Ki,zn.intersectionBy=Zi,zn.intersectionWith=Gi,zn.invert=Ps,zn.invertBy=Ts,zn.invokeMap=Ca,zn.iteratee=il,zn.keyBy=_a,zn.keys=As,zn.keysIn=Ns,zn.map=ka,zn.mapKeys=function(e,t){var n={};return t=li(t,3),xr(e,function(e,r,o){ir(n,t(e,r,o),e)}),n},zn.mapValues=function(e,t){var n={};return t=li(t,3),xr(e,function(e,r,o){ir(n,r,t(e,r,o))}),n},zn.matches=function(e){return Br(lr(e,1))},zn.matchesProperty=function(e,t){return zr(e,lr(t,1))},zn.memoize=Ia,zn.merge=Ds,zn.mergeWith=Is,zn.method=al,zn.methodOf=sl,zn.mixin=ll,zn.negate=Ra,zn.nthArg=function(e){return e=ms(e),Zr(function(t){return Hr(t,e)})},zn.omit=Rs,zn.omitBy=function(e,t){return Fs(e,Ra(li(t)))},zn.once=function(e){return Pa(2,e)},zn.orderBy=function(e,t,r,o){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(r=o?n:r)||(r=null==r?[]:[r]),Wr(e,t,r))},zn.over=ul,zn.overArgs=La,zn.overEvery=dl,zn.overSome=fl,zn.partial=Fa,zn.partialRight=Ba,zn.partition=Sa,zn.pick=Ls,zn.pickBy=Fs,zn.property=pl,zn.propertyOf=function(e){return function(t){return null==e?n:_r(e,t)}},zn.pull=Ji,zn.pullAll=Qi,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,li(n,2)):e},zn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Ur(e,t,n,r):e},zn.pullAt=ea,zn.range=hl,zn.rangeRight=ml,zn.rearg=za,zn.reject=function(e,t){return(Ua(e)?Pt:gr)(e,Ra(li(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=li(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return qr(e,o),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Pe(r);return Zr(e,t=t===n?t:ms(t))},zn.reverse=ta,zn.sampleSize=function(e,t,r){return t=(r?bi(e,t,r):t===n)?1:ms(t),(Ua(e)?Jn:Xr)(e,t)},zn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},zn.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:Jr(e,t,r,o)},zn.shuffle=function(e){return(Ua(e)?Qn:to)(e)},zn.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&bi(e,t,r)?(t=0,r=o):(t=null==t?0:ms(t),r=r===n?o:ms(r)),no(e,t,r)):[]},zn.sortBy=ja,zn.sortedUniq=function(e){return e&&e.length?ao(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?ao(e,li(t,2)):[]},zn.split=function(e,t,r){return r&&"number"!=typeof r&&bi(e,t,r)&&(t=r=n),(r=r===n?f:r>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=lo(t))&&on(e)?wo(dn(e),0,r):e.split(t,r):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Pe(r);return t=null==t?0:yn(ms(t),0),Zr(function(n){var r=n[t],o=wo(n,0,t);return r&&Nt(o,r),kt(e,this,o)})},zn.tail=function(e){var t=null==e?0:e.length;return t?no(e,1,t):[]},zn.take=function(e,t,r){return e&&e.length?no(e,0,(t=r||t===n?1:ms(t))<0?0:t):[]},zn.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?no(e,(t=o-(t=r||t===n?1:ms(t)))<0?0:t,o):[]},zn.takeRightWhile=function(e,t){return e&&e.length?po(e,li(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?po(e,li(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new Pe(r);return ts(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),Aa(e,t,{leading:o,maxWait:t,trailing:i})},zn.thru=ha,zn.toArray=ps,zn.toPairs=Bs,zn.toPairsIn=zs,zn.toPath=function(e){return Ua(e)?At(e,Fi):cs(e)?[e]:Po(Li(bs(e)))},zn.toPlainObject=vs,zn.transform=function(e,t,n){var r=Ua(e),o=r||Za(e)||us(e);if(t=li(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ts(e)&&Ja(i)?Vn(qe(e)):{}}return(o?jt:xr)(e,function(e,r,o){return t(n,e,r,o)}),n},zn.unary=function(e){return Ea(e,1)},zn.union=na,zn.unionBy=ra,zn.unionWith=oa,zn.uniq=function(e){return e&&e.length?co(e):[]},zn.uniqBy=function(e,t){return e&&e.length?co(e,li(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?co(e,n,t):[]},zn.unset=function(e,t){return null==e||uo(e,t)},zn.unzip=ia,zn.unzipWith=aa,zn.update=function(e,t,n){return null==e?e:fo(e,t,vo(n))},zn.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:fo(e,t,vo(r),o)},zn.values=Vs,zn.valuesIn=function(e){return null==e?[]:Xt(e,Ns(e))},zn.without=sa,zn.words=Js,zn.wrap=function(e,t){return Fa(vo(t),e)},zn.xor=la,zn.xorBy=ca,zn.xorWith=ua,zn.zip=da,zn.zipObject=function(e,t){return go(e||[],t||[],tr)},zn.zipObjectDeep=function(e,t){return go(e||[],t||[],Jr)},zn.zipWith=fa,zn.entries=Bs,zn.entriesIn=zs,zn.extend=ws,zn.extendWith=Cs,ll(zn,zn),zn.add=vl,zn.attempt=Qs,zn.camelCase=Hs,zn.capitalize=Ws,zn.ceil=bl,zn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ys(r))==r?r:0),t!==n&&(t=(t=ys(t))==t?t:0),sr(ys(e),t,r)},zn.clone=function(e){return lr(e,4)},zn.cloneDeep=function(e){return lr(e,5)},zn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:n)},zn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:n)},zn.conformsTo=function(e,t){return null==t||cr(e,t,As(t))},zn.deburr=$s,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=xl,zn.endsWith=function(e,t,r){e=bs(e),t=lo(t);var o=e.length,i=r=r===n?o:sr(ms(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},zn.eq=Va,zn.escape=function(e){return(e=bs(e))&&Z.test(e)?e.replace(Y,nn):e},zn.escapeRegExp=function(e){return(e=bs(e))&&re.test(e)?e.replace(ne,"\\$&"):e},zn.every=function(e,t,r){var o=Ua(e)?Et:hr;return r&&bi(e,t,r)&&(t=n),o(e,li(t,3))},zn.find=ya,zn.findIndex=$i,zn.findKey=function(e,t){return Ft(e,li(t,3),xr)},zn.findLast=va,zn.findLastIndex=Ui,zn.findLastKey=function(e,t){return Ft(e,li(t,3),wr)},zn.floor=wl,zn.forEach=ba,zn.forEachRight=xa,zn.forIn=function(e,t){return null==e?e:vr(e,li(t,3),Ns)},zn.forInRight=function(e,t){return null==e?e:br(e,li(t,3),Ns)},zn.forOwn=function(e,t){return e&&xr(e,li(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,li(t,3))},zn.get=Os,zn.gt=Ha,zn.gte=Wa,zn.has=function(e,t){return null!=e&&mi(e,t,Or)},zn.hasIn=Es,zn.head=Yi,zn.identity=ol,zn.includes=function(e,t,n,r){e=Ya(e)?e:Vs(e),n=n&&!r?ms(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),ls(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&zt(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ms(n);return o<0&&(o=yn(r+o,0)),zt(e,t,o)},zn.inRange=function(e,t,r){return t=hs(t),r===n?(r=t,t=0):r=hs(r),function(e,t,n){return e>=vn(t,n)&&e<yn(t,n)}(e=ys(e),t,r)},zn.invoke=Ms,zn.isArguments=$a,zn.isArray=Ua,zn.isArrayBuffer=qa,zn.isArrayLike=Ya,zn.isArrayLikeObject=Ka,zn.isBoolean=function(e){return!0===e||!1===e||ns(e)&&Sr(e)==v},zn.isBuffer=Za,zn.isDate=Ga,zn.isElement=function(e){return ns(e)&&1===e.nodeType&&!is(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||Za(e)||us(e)||$a(e)))return!e.length;var t=hi(e);if(t==_||t==E)return!e.size;if(_i(e))return!Rr(e).length;for(var n in e)if(Ie.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Ar(e,t)},zn.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Ar(e,t,n,r):!!o},zn.isError=Xa,zn.isFinite=function(e){return"number"==typeof e&&Ut(e)},zn.isFunction=Ja,zn.isInteger=Qa,zn.isLength=es,zn.isMap=rs,zn.isMatch=function(e,t){return e===t||Nr(e,t,ui(t))},zn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Nr(e,t,ui(t),r)},zn.isNaN=function(e){return os(e)&&e!=+e},zn.isNative=function(e){if(Ci(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=os,zn.isObject=ts,zn.isObjectLike=ns,zn.isPlainObject=is,zn.isRegExp=as,zn.isSafeInteger=function(e){return Qa(e)&&e>=-u&&e<=u},zn.isSet=ss,zn.isString=ls,zn.isSymbol=cs,zn.isTypedArray=us,zn.isUndefined=function(e){return e===n},zn.isWeakMap=function(e){return ns(e)&&hi(e)==M},zn.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Sr(e)},zn.join=function(e,t){return null==e?"":mn.call(e,t)},zn.kebabCase=Us,zn.last=Xi,zn.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=ms(r))<0?yn(o+i,0):vn(i,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Bt(e,Ht,i,!0)},zn.lowerCase=qs,zn.lowerFirst=Ys,zn.lt=ds,zn.lte=fs,zn.max=function(e){return e&&e.length?mr(e,ol,jr):n},zn.maxBy=function(e,t){return e&&e.length?mr(e,li(t,2),jr):n},zn.mean=function(e){return Wt(e,ol)},zn.meanBy=function(e,t){return Wt(e,li(t,2))},zn.min=function(e){return e&&e.length?mr(e,ol,Lr):n},zn.minBy=function(e,t){return e&&e.length?mr(e,li(t,2),Lr):n},zn.stubArray=gl,zn.stubFalse=yl,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=Cl,zn.nth=function(e,t){return e&&e.length?Hr(e,ms(t)):n},zn.noConflict=function(){return ft._===this&&(ft._=ze),this},zn.noop=cl,zn.now=Oa,zn.pad=function(e,t,n){e=bs(e);var r=(t=ms(t))?un(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return $o(gt(o),n)+e+$o(ht(o),n)},zn.padEnd=function(e,t,n){e=bs(e);var r=(t=ms(t))?un(e):0;return t&&r<t?e+$o(t-r,n):e},zn.padStart=function(e,t,n){e=bs(e);var r=(t=ms(t))?un(e):0;return t&&r<t?$o(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),xn(bs(e).replace(oe,""),t||0)},zn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bi(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=hs(e),t===n?(t=e,e=0):t=hs(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=wn();return vn(e+i*(t-e+lt("1e-"+((i+"").length-1))),t)}return Yr(e,t)},zn.reduce=function(e,t,n){var r=Ua(e)?Dt:qt,o=arguments.length<3;return r(e,li(t,4),n,o,fr)},zn.reduceRight=function(e,t,n){var r=Ua(e)?It:qt,o=arguments.length<3;return r(e,li(t,4),n,o,pr)},zn.repeat=function(e,t,r){return t=(r?bi(e,t,r):t===n)?1:ms(t),Kr(bs(e),t)},zn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,r){var o=-1,i=(t=bo(t,e)).length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[Fi(t[o])];a===n&&(o=i,a=r),e=Ja(a)?a.call(e):a}return e},zn.round=_l,zn.runInContext=e,zn.sample=function(e){return(Ua(e)?Xn:Gr)(e)},zn.size=function(e){if(null==e)return 0;if(Ya(e))return ls(e)?un(e):e.length;var t=hi(e);return t==_||t==E?e.size:Rr(e).length},zn.snakeCase=Ks,zn.some=function(e,t,r){var o=Ua(e)?Rt:ro;return r&&bi(e,t,r)&&(t=n),o(e,li(t,3))},zn.sortedIndex=function(e,t){return oo(e,t)},zn.sortedIndexBy=function(e,t,n){return io(e,t,li(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oo(e,t);if(r<n&&Va(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return oo(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return io(e,t,li(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=oo(e,t,!0)-1;if(Va(e[n],t))return n}return-1},zn.startCase=Zs,zn.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:sr(ms(n),0,e.length),t=lo(t),e.slice(n,n+t.length)==t},zn.subtract=kl,zn.sum=function(e){return e&&e.length?Yt(e,ol):0},zn.sumBy=function(e,t){return e&&e.length?Yt(e,li(t,2)):0},zn.template=function(e,t,r){var o=zn.templateSettings;r&&bi(e,t,r)&&(t=n),e=bs(e),t=Cs({},t,o,Jo);var i,a,s=Cs({},t.imports,o.imports,Jo),l=As(s),c=Xt(s,l),u=0,d=t.interpolate||xe,f="__p += '",p=Oe((t.escape||xe).source+"|"+d.source+"|"+(d===J?fe:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),h="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(p,function(t,n,r,o,s,l){return r||(r=o),f+=e.slice(u,l).replace(we,rn),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),f+="';\n";var m=Ie.call(t,"variable")&&t.variable;if(m){if(ue.test(m))throw new _e("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(W,""):f).replace($,"$1").replace(U,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=Qs(function(){return ke(l,h+"return "+f).apply(n,c)});if(g.source=f,Xa(g))throw g;return g},zn.times=function(e,t){if((e=ms(e))<1||e>u)return[];var n=f,r=vn(e,f);t=li(t),e-=f;for(var o=Kt(r,t);++n<e;)t(n);return o},zn.toFinite=hs,zn.toInteger=ms,zn.toLength=gs,zn.toLower=function(e){return bs(e).toLowerCase()},zn.toNumber=ys,zn.toSafeInteger=function(e){return e?sr(ms(e),-u,u):0===e?e:0},zn.toString=bs,zn.toUpper=function(e){return bs(e).toUpperCase()},zn.trim=function(e,t,r){if((e=bs(e))&&(r||t===n))return Zt(e);if(!e||!(t=lo(t)))return e;var o=dn(e),i=dn(t);return wo(o,Qt(o,i),en(o,i)+1).join("")},zn.trimEnd=function(e,t,r){if((e=bs(e))&&(r||t===n))return e.slice(0,fn(e)+1);if(!e||!(t=lo(t)))return e;var o=dn(e);return wo(o,0,en(o,dn(t))+1).join("")},zn.trimStart=function(e,t,r){if((e=bs(e))&&(r||t===n))return e.replace(oe,"");if(!e||!(t=lo(t)))return e;var o=dn(e);return wo(o,Qt(o,dn(t))).join("")},zn.truncate=function(e,t){var r=30,o="...";if(ts(t)){var i="separator"in t?t.separator:i;r="length"in t?ms(t.length):r,o="omission"in t?lo(t.omission):o}var a=(e=bs(e)).length;if(on(e)){var s=dn(e);a=s.length}if(r>=a)return e;var l=r-un(o);if(l<1)return o;var c=s?wo(s,0,l).join(""):e.slice(0,l);if(i===n)return c+o;if(s&&(l+=c.length-l),as(i)){if(e.slice(l).search(i)){var u,d=c;for(i.global||(i=Oe(i.source,bs(pe.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;c=c.slice(0,f===n?l:f)}}else if(e.indexOf(lo(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+o},zn.unescape=function(e){return(e=bs(e))&&K.test(e)?e.replace(q,pn):e},zn.uniqueId=function(e){var t=++Re;return bs(e)+t},zn.upperCase=Gs,zn.upperFirst=Xs,zn.each=ba,zn.eachRight=xa,zn.first=Yi,ll(zn,function(){var e={};return xr(zn,function(t,n){Ie.call(zn.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),zn.VERSION="4.17.21",jt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){zn[e].placeholder=zn}),jt(["drop","take"],function(e,t){$n.prototype[e]=function(r){r=r===n?1:yn(ms(r),0);var o=this.__filtered__&&!t?new $n(this):this.clone();return o.__filtered__?o.__takeCount__=vn(r,o.__takeCount__):o.__views__.push({size:vn(r,f),type:e+(o.__dir__<0?"Right":"")}),o},$n.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),jt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;$n.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:li(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),jt(["head","last"],function(e,t){var n="take"+(t?"Right":"");$n.prototype[e]=function(){return this[n](1).value()[0]}}),jt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");$n.prototype[e]=function(){return this.__filtered__?new $n(this):this[n](1)}}),$n.prototype.compact=function(){return this.filter(ol)},$n.prototype.find=function(e){return this.filter(e).head()},$n.prototype.findLast=function(e){return this.reverse().find(e)},$n.prototype.invokeMap=Zr(function(e,t){return"function"==typeof e?new $n(this):this.map(function(n){return Tr(n,e,t)})}),$n.prototype.reject=function(e){return this.filter(Ra(li(e)))},$n.prototype.slice=function(e,t){e=ms(e);var r=this;return r.__filtered__&&(e>0||t<0)?new $n(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ms(t))<0?r.dropRight(-t):r.take(t-e)),r)},$n.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$n.prototype.toArray=function(){return this.take(f)},xr($n.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=zn[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(zn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,l=t instanceof $n,c=s[0],u=l||Ua(t),d=function(e){var t=i.apply(zn,Nt([e],s));return o&&f?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,m=l&&!p;if(!a&&u){t=m?t:new $n(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[d],thisArg:n}),new Wn(g,f)}return h&&m?e.apply(this,s):(g=this.thru(d),h?o?g.value()[0]:g.value():g)})}),jt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ua(o)?o:[],e)}return this[n](function(n){return t.apply(Ua(n)?n:[],e)})}}),xr($n.prototype,function(e,t){var n=zn[t];if(n){var r=n.name+"";Ie.call(Mn,r)||(Mn[r]=[]),Mn[r].push({name:t,func:n})}}),Mn[zo(n,2).name]=[{name:"wrapper",func:n}],$n.prototype.clone=function(){var e=new $n(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},$n.prototype.reverse=function(){if(this.__filtered__){var e=new $n(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$n.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=vn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,d=u.length,f=0,p=vn(l,this.__takeCount__);if(!n||!r&&o==l&&p==l)return ho(e,this.__actions__);var h=[];e:for(;l--&&f<p;){for(var m=-1,g=e[c+=t];++m<d;){var y=u[m],v=y.iteratee,b=y.type,x=v(g);if(2==b)g=x;else if(!x){if(1==b)continue e;break e}}h[f++]=g}return h},zn.prototype.at=ma,zn.prototype.chain=function(){return pa(this)},zn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===n&&(this.__values__=ps(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,r=this;r instanceof Hn;){var o=zi(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $n){var t=e;return this.__actions__.length&&(t=new $n(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:n}),new Wn(t,this.__chain__)}return this.thru(ta)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return ho(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Qe&&(zn.prototype[Qe]=function(){return this}),zn}();ht?((ht.exports=hn)._=hn,pt._=hn):ft._=hn}).call(l)}(uw,uw.exports);var dw=uw.exports;const fw={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},pw={input:{sm:"py-1.5 px-2 rounded",md:"p-2.5 rounded-md",lg:"p-3 rounded-md"},content:{sm:"p-1.5",md:"p-1.5",lg:"p-2"},title:{sm:"p-2 text-xs",md:"p-2 text-sm",lg:"p-2 text-sm"},item:{sm:"text-sm text-text-secondary rounded",md:"text-base text-text-secondary rounded-md",lg:"text-base text-text-secondary rounded-md"},icon:{sm:"p-1 text-sm [&>svg]:size-4 text-icon-secondary",md:"p-2 text-base [&>svg]:size-5 text-icon-secondary",lg:"p-2 text-base [&>svg]:size-5 text-icon-secondary"},dialog:{sm:"mt-1 rounded-md",md:"mt-1.5 rounded-lg",lg:"mt-1.5 rounded-lg"},slashIcon:{sm:"px-2 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1"}},hw={primary:"bg-field-primary-background outline outline-1 outline-field-border hover:outline-border-strong",secondary:"bg-field-secondary-background outline outline-1 outline-field-border hover:outline-border-strong",ghost:"bg-field-secondary-background outline outline-1 outline-transparent"},mw={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"border-border-disabled hover:border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"border-border-disabled hover:border-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"},gw=(0,n.createContext)({}),yw=()=>(0,n.useContext)(gw),vw=(0,n.forwardRef)(({className:e,size:t="sm",open:r=!1,onOpenChange:o=()=>{},loading:i=!1,...a},l)=>{const[c,u]=(0,n.useState)(""),[d,f]=(0,n.useState)(i??!1),{refs:p,floatingStyles:h,context:m}=fo({open:r,onOpenChange:o,placement:"bottom-start",whileElementsMounted:In,middleware:[Yn("sm"===t?4:6),Zn({padding:10}),Gn({apply({rects:e,elements:t,availableHeight:n}){t.floating.style.maxHeight=`${n}px`,t.floating.style.width=`${e.reference.width}px`,t.floating.style.fontFamily=window.getComputedStyle(t.reference).fontFamily}})]}),g=uo(m),{getReferenceProps:y,getFloatingProps:v}=go([g]);return(0,n.useEffect)(()=>{const e=(()=>{var e,t;const n=(null==(t=null==(e=window.navigator)?void 0:e.userAgentData)?void 0:t.platform)||window.navigator.platform;let r="null";return["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(n)?r="Mac OS":["Win32","Win64","Windows","WinCE"].includes(n)&&(r="Windows"),r})(),t=t=>{const n="Mac OS"===e?t.metaKey:t.ctrlKey;if("/"===t.key&&n&&(t.preventDefault(),p.reference&&p.reference.current)){const e=p.reference.current instanceof HTMLElement?p.reference.current.querySelector("input"):null;e&&e.focus()}};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[p.reference]),(0,s.jsx)(gw.Provider,{value:{size:t,open:r,onOpenChange:o,refs:p,floatingStyles:h,context:m,getReferenceProps:y,getFloatingProps:v,searchTerm:c,setSearchTerm:u,isLoading:d,setIsLoading:f},children:(0,s.jsx)("div",{className:fe("searchbox-wrapper box-border relative w-full",e),...a,ref:l})})});vw.displayName="SearchBox";const bw=(0,n.forwardRef)(({className:e,type:t="text",placeholder:n="Search...",variant:r="primary",disabled:o=!1,onChange:i=()=>{},...a},l)=>{const{size:c,onOpenChange:u,refs:d,getReferenceProps:f,searchTerm:p,setSearchTerm:h}=yw(),m="lg"===c?"sm":"xs";return(0,s.jsxs)("div",{ref:d.setReference,className:fe("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-colors ease-in-out duration-150",hw[r],pw.input[c],o?mw[r]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border"),...f,children:[(0,s.jsx)("span",{className:fe(fw[c],o?"text-icon-disabled":"text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary","flex justify-center items-center"),children:(0,s.jsx)(ze,{})}),(0,s.jsx)("input",{type:t,ref:l,className:fe(fw[c],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 py-0",o?mw[r]:["text-field-placeholder focus-within:text-field-input group-hover:text-field-input","placeholder:text-field-placeholder"],e),disabled:o,value:p,onChange:e=>{const t=e.target.value;h(t),i(t),"function"==typeof u&&(t.trim()?u(!0):u(!1))},placeholder:n,...dw.omit(a,["size","open","onOpenChange","loading"])}),(0,s.jsx)(Ho,{label:"⌘/",size:m,type:"rounded",variant:"neutral"})]})});bw.displayName="SearchBox.Input";const xw=({className:e,dropdownPortalRoot:t=null,dropdownPortalId:n="",children:r,...o})=>{const{size:i,open:a,refs:l,floatingStyles:c,getFloatingProps:u}=yw();return a?(0,s.jsx)(Zr,{id:n,root:t,children:(0,s.jsx)("div",{ref:l.setFloating,style:{...c},className:fe("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap",pw.dialog[i],e),...u(),...o,children:r})}):null};xw.displayName="SearchBox.Content";const ww=({filter:e=!0,children:t})=>{const{searchTerm:r,isLoading:o}=yw();if(!e)return(0,s.jsx)("div",{children:t});const i=n.Children.toArray(t).map(e=>{if(n.isValidElement(e)&&e.type===_w){const t=n.Children.toArray(e.props.children).filter(e=>n.isValidElement(e)&&"string"==typeof e.props.children&&e.props.children.toLowerCase().includes(r.toLowerCase()));return t.length>0?(0,n.cloneElement)(e,{children:t}):null}return e}).filter(Boolean);return o?(0,s.jsx)(Sw,{}):(0,s.jsx)("div",{children:i.some(e=>n.isValidElement(e)&&e.type!==jw)?i:(0,s.jsx)(Cw,{})})};ww.displayName="SearchBox.List";const Cw=({children:e="No results found."})=>{const{size:t}=yw();return(0,s.jsx)("div",{className:fe("flex justify-center items-center",pw.item[t],"text-text-tertiary p-4"),children:e})};Cw.displayName="SearchBox.Empty";const _w=({heading:e,children:t})=>{const{size:n}=yw();return(0,s.jsxs)("div",{className:fe(pw.content[n],pw.item[n]),children:[e&&(0,s.jsx)("div",{className:fe(pw.title[n],"text-text-secondary"),children:e}),t]})};_w.displayName="SearchBox.Group";const kw=(0,n.forwardRef)(({className:e,icon:t,children:n,...r},o)=>{const{size:i}=yw();return(0,s.jsxs)("div",{ref:o,className:fe("flex items-center justify-start gap-1 p-1 hover:bg-background-secondary focus:bg-background-secondary cursor-pointer",pw.item[i]),...r,children:[t&&(0,s.jsx)("span",{className:fe(pw.icon[i],"flex items-center justify-center"),children:t}),(0,s.jsx)("span",{className:fe("flex-grow p-1 font-normal cursor-pointer",pw.item[i],e),children:n})]})});kw.displayName="SearchBox.Item";const Sw=({loadingIcon:e=(0,s.jsx)(Uo,{})})=>{const{size:t}=yw(),r=n.isValidElement(e)?(0,n.cloneElement)(e,{size:t}):e;return(0,s.jsx)("div",{className:fe("flex justify-center p-4",fw[t],pw.item[t]),children:r})};Sw.displayName="SearchBox.Loading";const jw=(0,n.forwardRef)(({className:e,...t},n)=>(0,s.jsx)("hr",{ref:n,className:fe("border-0 border-t border-border-subtle border-solid m-0",e),...t}));jw.displayName="SearchBox.Separator",vw.Input=bw,vw.Loading=Sw,vw.Separator=jw,vw.Content=xw,vw.List=ww,vw.Empty=Cw,vw.Group=_w,vw.Item=kw;const Ow=(0,n.createContext)({}),Ew=()=>(0,n.useContext)(Ow),Pw=({placement:e="bottom",offset:t=10,boundary:r="clippingAncestors",children:o,className:i})=>{const[a,l]=(0,n.useState)(!1),{refs:c,floatingStyles:u,context:d}=fo({open:a,onOpenChange:l,placement:e,strategy:"absolute",middleware:[Yn(t),Zn({boundary:r}),Kn({boundary:r})],whileElementsMounted:In}),f=ao(d),p=uo(d),h=_o(d,{role:"menu"}),{getReferenceProps:m,getFloatingProps:g}=go([f,p,h]),{isMounted:y,styles:v}=jo(d,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),b=()=>l(e=>!e);return(0,s.jsx)(Ow.Provider,{value:{refs:c,handleClose:()=>l(!1),isMounted:y,styles:v,floatingStyles:u,getFloatingProps:g},children:(0,s.jsxs)("div",{className:fe("relative inline-block",i),children:[n.Children.map(o,e=>{var t;return n.isValidElement(e)&&"DropdownMenu.Trigger"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)?(0,n.cloneElement)(e,{ref:c.setReference,onClick:b,...m()}):null}),n.Children.map(o,e=>{var t;return n.isValidElement(e)&&"DropdownMenu.Portal"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)?e:null})]})})};Pw.displayName="DropdownMenu";const Tw=({children:e,className:t,root:r,id:o})=>{const{refs:i,floatingStyles:a,getFloatingProps:l,isMounted:c,styles:u}=Ew();return c&&(0,s.jsx)(Zr,{id:o,root:r,children:(0,s.jsx)("div",{ref:i.setFloating,className:t,style:{...a,...u},...l(),children:n.Children.map(e,e=>{var t;return"DropdownMenu.Content"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)?e:null})})})};Tw.displayName="DropdownMenu.Portal";const Mw=n.forwardRef(({children:e,className:t,...r},o)=>(0,n.isValidElement)(e)?n.cloneElement(e,{className:fe(t,e.props.className),ref:o,...r}):(0,s.jsx)("div",{ref:o,className:fe("cursor-pointer",t),role:"button",tabIndex:0,...r,children:e}));Mw.displayName="DropdownMenu.Trigger";const Aw=({children:e,className:t,...n})=>(0,s.jsx)("div",{className:fe("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:(0,s.jsx)(fx,{...n,children:e})});Aw.displayName="DropdownMenu.Content";const Nw=e=>(0,s.jsx)(fx.List,{...e});Nw.displayName="DropdownMenu.List";const Dw=({children:e,as:t=fx.Item,...r})=>{var o;const{handleClose:i}=Ew();return e?t===n.Fragment&&(0,n.isValidElement)(e)?(0,n.cloneElement)(e,{onClick:pe(null==(o=e.props)?void 0:o.onClick,i)}):(0,s.jsx)(t,{...r,className:fe("px-2",r.className),onClick:pe(r.onClick,i),children:e}):null};Dw.displayName="DropdownMenu.Item";const Iw=e=>(0,s.jsx)(fx.Separator,{...e});Iw.displayName="DropdownMenu.Separator",Pw.Trigger=Mw,Pw.Content=Aw,Pw.List=Nw,Pw.Item=Dw,Pw.Separator=Iw,Pw.Portal=Tw;const Rw={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},Lw=({children:e,className:t})=>{const{open:n,position:r,handleClose:o,drawerRef:i,transitionDuration:a}=Kw();return(0,s.jsx)(mf,{children:n&&(0,s.jsx)("div",{className:"fixed inset-0",children:(0,s.jsx)("div",{className:fe("flex items-center justify-center h-full",{"justify-start":"left"===r,"justify-end":"right"===r}),children:(0,s.jsx)(lf.div,{ref:i,className:fe("flex flex-col w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden",t),initial:"exit",animate:"open",exit:"exit",variants:Rw[r],transition:a,children:"function"==typeof e?e({close:o}):e})})})})};Lw.displayName="Drawer.Panel";const Fw=({children:e,className:t,...n})=>(0,s.jsx)("div",{className:fe("space-y-2 px-5 pt-5 pb-4",t),...n,children:e});Fw.displayName="Drawer.Header";const Bw=({children:e,as:t="h3",className:n,...r})=>(0,s.jsx)(t,{className:fe("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});Bw.displayName="Drawer.Title";const zw=({children:e,as:t="p",className:n,...r})=>(0,s.jsx)(t,{className:fe("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});zw.displayName="Drawer.Description";const Vw=({children:e,className:t,...n})=>(0,s.jsx)("div",{className:fe("px-5 pb-4 pt-2 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...n,children:e});Vw.displayName="Drawer.Body";const Hw=({children:e,className:t})=>{const{design:n,handleClose:r}=Kw();return(0,s.jsx)("div",{className:fe("px-5 py-4 flex justify-end gap-3 mt-auto",{"bg-background-secondary":"footer-divided"===n,"border-t border-b-0 border-x-0 border-solid border-border-subtle":"footer-bordered"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};Hw.displayName="Drawer.Footer";const Ww=({className:e,...t})=>(0,s.jsx)("button",{className:fe("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close drawer",...t,children:(0,s.jsx)(Ue,{className:"size-4 text-text-primary shrink-0"})}),$w=({children:e,as:t=n.Fragment,...r})=>{const{handleClose:o}=Kw();return e?t===n.Fragment?"function"==typeof e?e({close:o}):(0,n.isValidElement)(e)?(0,n.cloneElement)(e,{onClick:o}):(0,s.jsx)(Ww,{onClick:o,...r}):(0,s.jsx)(t,{...r,onClick:o,children:e}):(0,s.jsx)(Ww,{onClick:o,...r})};$w.displayName="Drawer.CloseButton";const Uw={open:{opacity:1},exit:{opacity:0}},qw=({className:t,...n})=>{const{open:r,drawerContainerRef:o,transitionDuration:i}=Kw();return null!=o&&o.current?!!o.current&&(0,e.createPortal)((0,s.jsx)(mf,{children:r&&(0,s.jsx)(lf.div,{className:fe("fixed inset-0 -z-10 bg-background-inverse/90",t),...n,initial:"exit",animate:"open",exit:"exit",variants:Uw,transition:i})}),o.current):null};qw.displayName="Drawer.Backdrop";const Yw=(0,n.createContext)({}),Kw=()=>(0,n.useContext)(Yw),Zw=({open:e,setOpen:t,children:r,trigger:o,className:i,exitOnClickOutside:a=!1,exitOnEsc:l=!0,design:c="simple",position:u="right",transitionDuration:d=.2,scrollLock:f=!0})=>{const p=void 0!==e&&void 0!==t,[h,m]=(0,n.useState)(!1),g=(0,n.useRef)(null),y=(0,n.useRef)(null),v=(0,n.useMemo)(()=>p?e:h,[e,h]),b=(0,n.useMemo)(()=>p?t:m,[m,m]),x=()=>{v||b(!0)},w=()=>{v&&b(!1)},C=(0,n.useCallback)(()=>(0,n.isValidElement)(o)?(0,n.cloneElement)(o,{onClick:pe(x,o.props.onClick)}):"function"==typeof o?o({onClick:x}):null,[o,x,w]),_=e=>{"Escape"===e.key&&l&&w()},k=e=>{a&&g.current&&!g.current.contains(e.target)&&w()};return(0,n.useEffect)(()=>(window.addEventListener("keydown",_),document.addEventListener("mousedown",k),()=>{window.removeEventListener("keydown",_),document.removeEventListener("mousedown",k)}),[v]),(0,n.useEffect)(()=>{if(!f)return;const e=document.querySelector("html");return v&&e&&(e.style.overflow="hidden"),()=>{e&&(e.style.overflow="")}},[v]),(0,s.jsxs)(s.Fragment,{children:[C(),(0,s.jsx)(Yw.Provider,{value:{open:v,setOpen:b,handleClose:w,design:c,position:u,drawerContainerRef:y,drawerRef:g,transitionDuration:{duration:d}},children:(0,s.jsx)("div",{className:fe("fixed z-auto w-0 h-0 overflow-visible",i),ref:y,role:"dialog","aria-modal":"true","aria-label":"drawer",children:r})})]})};Zw.displayName="Drawer",Zw.Panel=Lw,Zw.Header=Fw,Zw.Title=Bw,Zw.Description=zw,Zw.Body=Vw,Zw.CloseButton=$w,Zw.Footer=Hw,Zw.Backdrop=qw;const Gw={xs:{general:"text-xs min-w-6 h-6",ellipse:"text-xs min-w-6",icon:"size-4"},sm:{general:"text-xs min-w-8 h-8",ellipse:"text-xs min-w-8",icon:"size-4"},md:{general:"text-sm min-w-10 h-10",ellipse:"text-sm min-w-10",icon:"size-5"},lg:{general:"text-base min-w-12 h-12",ellipse:"text-base min-w-12",icon:"size-6"}},Xw="group disabled:border-field-border-disabled opacity-50",Jw=(0,n.createContext)({size:"sm",disabled:!1}),Qw=()=>(0,n.useContext)(Jw),eC=({size:e="sm",disabled:t=!1,children:n,className:r,...o})=>(0,s.jsx)(Jw.Provider,{value:{size:e,disabled:t},children:(0,s.jsx)("nav",{role:"navigation","aria-label":"pagination",className:fe("flex w-full justify-center box-border m-0",r),...o,children:n})});eC.displayName="Pagination";const tC=(0,n.forwardRef)(({className:e,...t},n)=>(0,s.jsx)("ul",{ref:n,className:fe("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t}));tC.displayName="Pagination.Content";const nC=(0,n.forwardRef)(({isActive:e=!1,className:t,children:n,...r},o)=>{const{disabled:i}=Qw();return(0,s.jsx)("li",{ref:o,className:fe("flex",i&&Xw),children:(0,s.jsx)(rC,{isActive:e,disabled:i,className:t,...r,children:n})})});nC.displayName="Pagination.Item";const rC=({isActive:e=!1,tag:t="a",children:n,className:r,...o})=>{const{size:i,disabled:a}=Qw(),l=e=>e.preventDefault();return(0,s.jsx)(ve,{tag:t,size:i,variant:"ghost",className:fe("no-underline bg-transparent p-0 m-0 border-none","flex justify-center items-center rounded text-button-secondary","focus:outline focus:outline-1 focus:outline-border-subtle focus:bg-button-tertiary-hover",Gw[i].general,!a&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",a&&[Xw,"group-disabled:text-field-color-disabled","focus:ring-transparent cursor-not-allowed"],r),disabled:a,...o,onClick:e=>pe(o.onClick||(()=>{}),a?l:()=>{})(e),children:(0,s.jsx)("span",{className:"px-1 flex",children:n})})},oC=e=>{const{size:t,disabled:n}=Qw();return(0,s.jsx)("li",{className:fe("flex",n&&Xw),"aria-label":"Go to previous page",children:(0,s.jsx)(rC,{className:fe("[&>span]:flex [&>span]:items-center"),...e,children:(0,s.jsx)(Te,{className:fe(Gw[t].icon)})})})};oC.displayName="Pagination.Previous";const iC=e=>{const{size:t,disabled:n}=Qw();return(0,s.jsx)("li",{className:fe("flex",n&&Xw),"aria-label":"Go to next page",children:(0,s.jsx)(rC,{className:fe("[&>span]:flex [&>span]:items-center"),...e,children:(0,s.jsx)(Me,{className:fe(Gw[t].icon)})})})};iC.displayName="Pagination.Next";const aC=e=>{const{size:t,disabled:n}=Qw();return(0,s.jsx)("li",{className:fe("flex",n&&Xw),children:(0,s.jsx)("span",{className:fe("flex justify-center",Gw[t].ellipse,n&&Xw),...e,children:"•••"})})};var sC,lC,cC;aC.displayName="Pagination.Ellipsis",eC.Content=tC,eC.Item=nC,eC.Previous=oC,eC.Next=iC,eC.Ellipsis=aC,function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(sC||(sC={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(lC||(lC={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(cC||(cC={}));const uC=6048e5,dC=Symbol.for("constructDateFrom");function fC(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&dC in e?e[dC](t):e instanceof Date?new e.constructor(t):new Date(t)}function pC(e,t){return fC(t||e,e)}function hC(e,t,n){const r=pC(e,null==n?void 0:n.in);return isNaN(t)?fC(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function mC(e,t,n){const r=pC(e,null==n?void 0:n.in);if(isNaN(t))return fC(e,NaN);if(!t)return r;const o=r.getDate(),i=fC(e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}let gC={};function yC(){return gC}function vC(e,t){var n,r,o,i;const a=yC(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(i=null==(o=a.locale)?void 0:o.options)?void 0:i.weekStartsOn)??0,l=pC(e,null==t?void 0:t.in),c=l.getDay(),u=(c<s?7:0)+c-s;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}function bC(e,t){return vC(e,{...t,weekStartsOn:1})}function xC(e,t){const n=pC(e,null==t?void 0:t.in),r=n.getFullYear(),o=fC(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=bC(o),a=fC(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=bC(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function wC(e){const t=pC(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function CC(e,...t){const n=fC.bind(null,t.find(e=>"object"==typeof e));return t.map(n)}function _C(e,t){const n=pC(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}function kC(e,t,n){const[r,o]=CC(null==n||n.in,e,t),i=_C(r),a=_C(o),s=+i-wC(i),l=+a-wC(a);return Math.round((s-l)/864e5)}function SC(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function jC(e,t){const n=pC(e,null==t?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function OC(e,t){var n,r,o,i;const a=yC(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(i=null==(o=a.locale)?void 0:o.options)?void 0:i.weekStartsOn)??0,l=pC(e,null==t?void 0:t.in),c=l.getDay(),u=6+(c<s?-7:0)-(c-s);return l.setDate(l.getDate()+u),l.setHours(23,59,59,999),l}const EC={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function PC(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const TC={date:PC({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:PC({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:PC({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},MC={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function AC(e){return(t,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const NC={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:AC({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:AC({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:AC({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:AC({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:AC({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function DC(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(a)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(a));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const IC={ordinalNumber:function(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];return a=n.valueCallback?n.valueCallback(a):a,{value:a,rest:t.slice(o.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:DC({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:DC({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:DC({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:DC({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:DC({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},RC={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=EC[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:TC,formatRelative:(e,t,n,r)=>MC[e],localize:NC,match:IC,options:{weekStartsOn:0,firstWeekContainsDate:1}};function LC(e,t){const n=pC(e,null==t?void 0:t.in),r=+bC(n)-+function(e){const t=xC(e,void 0),n=fC(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),bC(n)}(n);return Math.round(r/uC)+1}function FC(e,t){var n,r,o,i;const a=pC(e,null==t?void 0:t.in),s=a.getFullYear(),l=yC(),c=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(i=null==(o=l.locale)?void 0:o.options)?void 0:i.firstWeekContainsDate)??1,u=fC((null==t?void 0:t.in)||e,0);u.setFullYear(s+1,0,c),u.setHours(0,0,0,0);const d=vC(u,t),f=fC((null==t?void 0:t.in)||e,0);f.setFullYear(s,0,c),f.setHours(0,0,0,0);const p=vC(f,t);return+a>=+d?s+1:+a>=+p?s:s-1}function BC(e,t){const n=pC(e,null==t?void 0:t.in),r=+vC(n,t)-+function(e,t){var n,r,o,i;const a=yC(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??(null==(i=null==(o=a.locale)?void 0:o.options)?void 0:i.firstWeekContainsDate)??1,l=FC(e,t),c=fC((null==t?void 0:t.in)||e,0);return c.setFullYear(l,0,s),c.setHours(0,0,0,0),vC(c,t)}(n,t);return Math.round(r/uC)+1}function zC(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const VC={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return zC("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):zC(n+1,2)},d:(e,t)=>zC(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>zC(e.getHours()%12||12,t.length),H:(e,t)=>zC(e.getHours(),t.length),m:(e,t)=>zC(e.getMinutes(),t.length),s:(e,t)=>zC(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return zC(Math.trunc(r*Math.pow(10,n-3)),t.length)}},HC={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return VC.y(e,t)},Y:function(e,t,n,r){const o=FC(e,r),i=o>0?o:1-o;return"YY"===t?zC(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):zC(i,t.length)},R:function(e,t){return zC(xC(e),t.length)},u:function(e,t){return zC(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return zC(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return zC(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return VC.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return zC(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=BC(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):zC(o,t.length)},I:function(e,t,n){const r=LC(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):zC(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):VC.d(e,t)},D:function(e,t,n){const r=function(e){const t=pC(e,void 0);return kC(t,jC(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):zC(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return zC(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return zC(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return zC(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return VC.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):VC.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):zC(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):zC(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):VC.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):VC.s(e,t)},S:function(e,t){return VC.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return $C(r);case"XXXX":case"XX":return UC(r);default:return UC(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $C(r);case"xxxx":case"xx":return UC(r);default:return UC(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+WC(r,":");default:return"GMT"+UC(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+WC(r,":");default:return"GMT"+UC(r,":")}},t:function(e,t,n){return zC(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return zC(+e,t.length)}};function WC(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+zC(i,2)}function $C(e,t){return e%60==0?(e>0?"-":"+")+zC(Math.abs(e)/60,2):UC(e,t)}function UC(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+zC(Math.trunc(r/60),2)+t+zC(r%60,2)}const qC=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},YC=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},KC={p:YC,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return qC(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",qC(r,t)).replace("{{time}}",YC(o,t))}},ZC=/^D+$/,GC=/^Y+$/,XC=["D","DD","YY","YYYY"],JC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e_=/^'([^]*?)'?$/,t_=/''/g,n_=/[a-zA-Z]/;function r_(e){const t=e.match(e_);return t?t[1].replace(t_,"'"):e}class o_{constructor(e,t){this.Date=Date,this.addDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addDays?this.overrides.addDays(e,t):hC(e,t)},this.addMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addMonths?this.overrides.addMonths(e,t):mC(e,t)},this.addWeeks=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addWeeks?this.overrides.addWeeks(e,t):function(e,t){return hC(e,7*t,void 0)}(e,t)},this.addYears=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addYears?this.overrides.addYears(e,t):function(e,t){return mC(e,12*t,void 0)}(e,t)},this.differenceInCalendarDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):kC(e,t)},this.differenceInCalendarMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t){const[n,r]=CC(0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(e,t)},this.endOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e){return OC(e,{weekStartsOn:1})}(e)},this.endOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const n=pC(e,null==t?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e)},this.endOfWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfWeek?this.overrides.endOfWeek(e,this.options):OC(e,this.options)},this.endOfYear=e=>{var t;return null!=(t=this.overrides)&&t.endOfYear?this.overrides.endOfYear(e):function(e){const t=pC(e,void 0),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}(e)},this.format=(e,t)=>{var n;return null!=(n=this.overrides)&&n.format?this.overrides.format(e,t,this.options):function(e,t,n){var r,o,i,a,s,l,c,u;const d=yC(),f=(null==n?void 0:n.locale)??d.locale??RC,p=(null==n?void 0:n.firstWeekContainsDate)??(null==(o=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:o.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(a=null==(i=d.locale)?void 0:i.options)?void 0:a.firstWeekContainsDate)??1,h=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(s=null==n?void 0:n.locale)?void 0:s.options)?void 0:l.weekStartsOn)??d.weekStartsOn??(null==(u=null==(c=d.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=pC(e,null==n?void 0:n.in);if(!function(e){return!(!SC(e)&&"number"!=typeof e||isNaN(+pC(e)))}(m))throw new RangeError("Invalid time value");let g=t.match(QC).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,KC[t])(e,f.formatLong):e}).join("").match(JC).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:r_(e)};if(HC[t])return{isToken:!0,value:e};if(t.match(n_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});f.localize.preprocessor&&(g=f.localize.preprocessor(m,g));const y={firstWeekContainsDate:p,weekStartsOn:h,locale:f};return g.map(r=>{if(!r.isToken)return r.value;const o=r.value;return((null==n||!n.useAdditionalWeekYearTokens)&&function(e){return GC.test(e)}(o)||(null==n||!n.useAdditionalDayOfYearTokens)&&function(e){return ZC.test(e)}(o))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),XC.includes(e))throw new RangeError(r)}(o,t,String(e)),(0,HC[o[0]])(m,o,f.localize,y)}).join("")}(e,t,this.options)},this.getISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.getISOWeek?this.overrides.getISOWeek(e):LC(e)},this.getWeek=e=>{var t;return null!=(t=this.overrides)&&t.getWeek?this.overrides.getWeek(e,this.options):BC(e,this.options)},this.isAfter=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isAfter?this.overrides.isAfter(e,t):function(e,t){return+pC(e)>+pC(t)}(e,t)},this.isBefore=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isBefore?this.overrides.isBefore(e,t):function(e,t){return+pC(e)<+pC(t)}(e,t)},this.isDate=e=>{var t;return null!=(t=this.overrides)&&t.isDate?this.overrides.isDate(e):SC(e)},this.isSameDay=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[n,r]=CC(0,e,t);return+_C(n)==+_C(r)}(e,t)},this.isSameMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[n,r]=CC(0,e,t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}(e,t)},this.isSameYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameYear?this.overrides.isSameYear(e,t):function(e,t){const[n,r]=CC(0,e,t);return n.getFullYear()===r.getFullYear()}(e,t)},this.max=e=>{var t;return null!=(t=this.overrides)&&t.max?this.overrides.max(e):function(e){let t,n;return e.forEach(e=>{!n&&"object"==typeof e&&(n=fC.bind(null,e));const r=pC(e,n);(!t||t<r||isNaN(+r))&&(t=r)}),fC(n,t||NaN)}(e)},this.min=e=>{var t;return null!=(t=this.overrides)&&t.min?this.overrides.min(e):function(e){let t,n;return e.forEach(e=>{!n&&"object"==typeof e&&(n=fC.bind(null,e));const r=pC(e,n);(!t||t>r||isNaN(+r))&&(t=r)}),fC(n,t||NaN)}(e)},this.setMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setMonth?this.overrides.setMonth(e,t):function(e,t,n){const r=pC(e,null==n?void 0:n.in),o=r.getFullYear(),i=r.getDate(),a=fC(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=function(e){const t=pC(e,void 0),n=t.getFullYear(),r=t.getMonth(),o=fC(t,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return r.setMonth(t,Math.min(i,s)),r}(e,t)},this.setYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setYear?this.overrides.setYear(e,t):function(e,t){const n=pC(e,void 0);return isNaN(+n)?fC(e,NaN):(n.setFullYear(t),n)}(e,t)},this.startOfDay=e=>{var t;return null!=(t=this.overrides)&&t.startOfDay?this.overrides.startOfDay(e):_C(e)},this.startOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.startOfISOWeek?this.overrides.startOfISOWeek(e):bC(e)},this.startOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const n=pC(e,null==t?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e)},this.startOfWeek=e=>{var t;return null!=(t=this.overrides)&&t.startOfWeek?this.overrides.startOfWeek(e,this.options):vC(e,this.options)},this.startOfYear=e=>{var t;return null!=(t=this.overrides)&&t.startOfYear?this.overrides.startOfYear(e):jC(e)},this.options={locale:RC,...e},this.overrides=t}}new o_;(0,n.createContext)(void 0);Symbol.toStringTag;Symbol.toStringTag;const i_={},a_={};function s_(e,t){try{const n=(i_[e]||(i_[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return n in a_?a_[n]:c_(n,n.split(":"))}catch{if(e in a_)return a_[e];const t=null==e?void 0:e.match(l_);return t?c_(e,t.slice(1)):NaN}}const l_=/([+-]\d\d):?(\d\d)?/;function c_(e,t){const n=+t[0],r=+(t[1]||0);return a_[e]=n>0?60*n+r:60*n-r}class u_ extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(s_(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),p_(this),f_(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new u_(...t,e):new u_(Date.now(),e)}withTimeZone(e){return new u_(+this,e)}getTimezoneOffset(){return-s_(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),f_(this),+this}[Symbol.for("constructDateFrom")](e){return new u_(+new Date(e),this.timeZone)}}const d_=/^(get|set)(?!UTC)/;function f_(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function p_(e){const t=s_(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=r- -new Date(+n).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const s=s_(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-s-a;if(s!==t&&l){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const t=s-s_(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!d_.test(e))return;const t=e.replace(d_,"$1UTC");u_.prototype[t]&&(e.startsWith("get")?u_.prototype[e]=function(){return this.internal[t]()}:(u_.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),p_(e)}(this),+this},u_.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),f_(this),+this}))}),Symbol.for("constructDateFrom");Symbol.toStringTag;const h_=({type:e="simple",defaultValue:t=[],autoClose:r=!1,disabled:o=!1,children:i,className:a})=>{const[l,c]=(0,n.useState)(Array.isArray(t)?t:[t]);return(0,s.jsx)("div",{className:fe("boxed"===e?"space-y-3":"",a),children:n.Children.map(i,t=>n.isValidElement(t)&&"value"in t.props?n.cloneElement(t,{isOpen:l.includes(t.props.value),onToggle:()=>(e=>{c(t=>r?t.includes(e)?[]:[e]:t.includes(e)?t.filter(t=>t!==e):[...t,e])})(t.props.value),type:e,disabled:o||t.props.disabled}):t)})};h_.displayName="Accordion";const m_=({isOpen:e,onToggle:t,type:r="simple",disabled:o=!1,children:i,className:a})=>{const l={simple:"border-0",separator:"border-0 border-b border-solid border-border-subtle",boxed:"border border-solid border-border-subtle rounded-md"}[r];return(0,s.jsx)("div",{className:fe(l,a),children:n.Children.map(i,i=>n.isValidElement(i)?n.cloneElement(i,{isOpen:e,onToggle:t,type:r,disabled:o}):i)})};m_.displayName="Accordion.Item";const g_=({onToggle:e,isOpen:t,iconType:n="arrow",disabled:r=!1,tag:o="h3",type:i="simple",children:a,className:l,...c})=>{const u={simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[i];return(0,s.jsx)(o,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:(0,s.jsxs)("button",{className:fe("flex w-full items-center justify-between text-sm font-medium transition-all appearance-none bg-transparent border-0 cursor-pointer gap-3",u,r&&"cursor-not-allowed opacity-40",l),onClick:r?()=>{}:e,"aria-expanded":t,disabled:r,...c,children:[(0,s.jsx)("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:a}),"arrow"===n?(0,s.jsx)(Pe,{className:fe("flex-shrink-0 text-icon-secondary size-5 transition-transform duration-300 ease-in-out",t?"rotate-180":"rotate-0")}):"plus-minus"===n?(0,s.jsx)(lf.span,{initial:{opacity:0,rotate:t?-180:0},animate:{opacity:1,rotate:t?0:180},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"flex items-center flex-shrink-0 text-icon-secondary",children:t?(0,s.jsx)(Re,{}):(0,s.jsx)(Be,{})},t?"minus":"plus"):null]})})};g_.displayName="Accordion.Trigger";const y_=({isOpen:e,disabled:t=!1,type:n="simple",children:r,className:o})=>{const i={simple:"px-2 pb-3",separator:"px-2 pb-4",boxed:"px-3 pb-4"}[n];return(0,s.jsx)(mf,{initial:!1,children:e&&(0,s.jsx)(lf.div,{variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:fe("overflow-hidden text-text-secondary w-full text-sm transition-[height, opacity, transform] ease-in box-border",t&&"opacity-40",o),"aria-hidden":!e,children:(0,s.jsx)("div",{className:fe(i),children:r})},"content")})};y_.displayName="Accordion.Content",Object.assign(h_,{Item:m_,Trigger:g_,Content:y_});var v_=Array.isArray,b_="object"==typeof l&&l&&l.Object===Object&&l,x_=b_,w_="object"==typeof self&&self&&self.Object===Object&&self,C_=x_||w_||Function("return this")(),k_=C_.Symbol,S_=k_,j_=Object.prototype,O_=j_.hasOwnProperty,E_=j_.toString,P_=S_?S_.toStringTag:void 0,T_=Object.prototype.toString,M_=function(e){var t=O_.call(e,P_),n=e[P_];try{e[P_]=void 0;var r=!0}catch{}var o=E_.call(e);return r&&(t?e[P_]=n:delete e[P_]),o},A_=function(e){return T_.call(e)},N_=k_?k_.toStringTag:void 0,D_=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":N_&&N_ in Object(e)?M_(e):A_(e)},I_=function(e){return null!=e&&"object"==typeof e},R_=D_,L_=I_,F_=function(e){return"symbol"==typeof e||L_(e)&&"[object Symbol]"==R_(e)},B_=v_,z_=F_,V_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H_=/^\w*$/,W_=function(e,t){if(B_(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!z_(e))||H_.test(e)||!V_.test(e)||null!=t&&e in Object(t)},$_=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const U_=c($_);var q_=D_,Y_=$_,K_=function(e){if(!Y_(e))return!1;var t=q_(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const Z_=c(K_);var G_=C_["__core-js_shared__"],X_=function(){var e=/[^.]+$/.exec(G_&&G_.keys&&G_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J_=Function.prototype.toString,Q_=function(e){if(null!=e){try{return J_.call(e)}catch{}try{return e+""}catch{}}return""},ek=K_,tk=function(e){return!!X_&&X_ in e},nk=$_,rk=Q_,ok=/^\[object .+?Constructor\]$/,ik=Function.prototype,ak=Object.prototype,sk=ik.toString,lk=ak.hasOwnProperty,ck=RegExp("^"+sk.call(lk).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),uk=function(e){return!(!nk(e)||tk(e))&&(ek(e)?ck:ok).test(rk(e))},dk=function(e,t){return null==e?void 0:e[t]},fk=function(e,t){var n=dk(e,t);return uk(n)?n:void 0},pk=fk(Object,"create"),hk=pk,mk=pk,gk=Object.prototype.hasOwnProperty,yk=pk,vk=Object.prototype.hasOwnProperty,bk=pk,xk=function(){this.__data__=hk?hk(null):{},this.size=0},wk=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ck=function(e){var t=this.__data__;if(mk){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return gk.call(t,e)?t[e]:void 0},_k=function(e){var t=this.__data__;return yk?void 0!==t[e]:vk.call(t,e)},kk=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bk&&void 0===t?"__lodash_hash_undefined__":t,this};function Sk(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Sk.prototype.clear=xk,Sk.prototype.delete=wk,Sk.prototype.get=Ck,Sk.prototype.has=_k,Sk.prototype.set=kk;var jk=Sk,Ok=function(e,t){return e===t||e!=e&&t!=t},Ek=Ok,Pk=function(e,t){for(var n=e.length;n--;)if(Ek(e[n][0],t))return n;return-1},Tk=Pk,Mk=Array.prototype.splice,Ak=Pk,Nk=Pk,Dk=Pk,Ik=function(){this.__data__=[],this.size=0},Rk=function(e){var t=this.__data__,n=Tk(t,e);return!(n<0||(n==t.length-1?t.pop():Mk.call(t,n,1),--this.size,0))},Lk=function(e){var t=this.__data__,n=Ak(t,e);return n<0?void 0:t[n][1]},Fk=function(e){return Nk(this.__data__,e)>-1},Bk=function(e,t){var n=this.__data__,r=Dk(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function zk(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}zk.prototype.clear=Ik,zk.prototype.delete=Rk,zk.prototype.get=Lk,zk.prototype.has=Fk,zk.prototype.set=Bk;var Vk=zk,Hk=fk(C_,"Map"),Wk=jk,$k=Vk,Uk=Hk,qk=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},Yk=function(e,t){var n=e.__data__;return qk(t)?n["string"==typeof t?"string":"hash"]:n.map},Kk=Yk,Zk=Yk,Gk=Yk,Xk=Yk,Jk=function(e){var t=Kk(this,e).delete(e);return this.size-=t?1:0,t},Qk=function(e){return Zk(this,e).get(e)},eS=function(e){return Gk(this,e).has(e)},tS=function(e,t){var n=Xk(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function nS(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nS.prototype.clear=function(){this.size=0,this.__data__={hash:new Wk,map:new(Uk||$k),string:new Wk}},nS.prototype.delete=Jk,nS.prototype.get=Qk,nS.prototype.has=eS,nS.prototype.set=tS;var rS=nS,oS=rS;function iS(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(iS.Cache||oS),n}iS.Cache=oS;var aS=iS;const sS=c(aS);var lS=aS,cS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,uS=/\\(\\)?/g,dS=function(e){var t=lS(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(cS,function(e,n,r,o){t.push(r?o.replace(uS,"$1"):n||e)}),t}),fS=dS,pS=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},hS=pS,mS=v_,gS=F_,yS=k_?k_.prototype:void 0,vS=yS?yS.toString:void 0,bS=function e(t){if("string"==typeof t)return t;if(mS(t))return hS(t,e)+"";if(gS(t))return vS?vS.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},xS=function(e){return null==e?"":bS(e)},wS=v_,CS=W_,_S=fS,kS=xS,SS=function(e,t){return wS(e)?e:CS(e,t)?[e]:_S(kS(e))},jS=F_,OS=function(e){if("string"==typeof e||jS(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},ES=SS,PS=OS,TS=function(e,t){for(var n=0,r=(t=ES(t,e)).length;null!=e&&n<r;)e=e[PS(t[n++])];return n&&n==r?e:void 0},MS=TS,AS=function(e,t,n){var r=null==e?void 0:MS(e,t);return void 0===r?n:r};const NS=c(AS);var DS=function(e){return null==e};const IS=c(DS);var RS=D_,LS=v_,FS=I_,BS=function(e){return"string"==typeof e||!LS(e)&&FS(e)&&"[object String]"==RS(e)};const zS=c(BS);var VS,HS={exports:{}},WS={};HS.exports=function(){if(VS)return WS;VS=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case i:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case c:case p:case f:case a:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),WS.ContextConsumer=s,WS.ContextProvider=a,WS.Element=t,WS.ForwardRef=c,WS.Fragment=r,WS.Lazy=p,WS.Memo=f,WS.Portal=n,WS.Profiler=i,WS.StrictMode=o,WS.Suspense=u,WS.SuspenseList=d,WS.isAsyncMode=function(){return!1},WS.isConcurrentMode=function(){return!1},WS.isContextConsumer=function(e){return m(e)===s},WS.isContextProvider=function(e){return m(e)===a},WS.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},WS.isForwardRef=function(e){return m(e)===c},WS.isFragment=function(e){return m(e)===r},WS.isLazy=function(e){return m(e)===p},WS.isMemo=function(e){return m(e)===f},WS.isPortal=function(e){return m(e)===n},WS.isProfiler=function(e){return m(e)===i},WS.isStrictMode=function(e){return m(e)===o},WS.isSuspense=function(e){return m(e)===u},WS.isSuspenseList=function(e){return m(e)===d},WS.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===u||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},WS.typeOf=m,WS}();var $S=HS.exports,US=D_,qS=I_,YS=function(e){return"number"==typeof e||qS(e)&&"[object Number]"==US(e)};const KS=c(YS);var ZS=YS,GS=function(e){return ZS(e)&&e!=+e};const XS=c(GS);var JS=function(e){return 0===e?0:e>0?1:-1},QS=function(e){return zS(e)&&e.indexOf("%")===e.length-1},ej=function(e){return KS(e)&&!XS(e)},tj=function(e){return ej(e)||zS(e)},nj=0,rj=function(e){var t=++nj;return"".concat(e||"").concat(t)},oj=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!ej(e)&&!zS(e))return r;if(QS(e)){var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return XS(n)&&(n=r),o&&n>t&&(n=t),n},ij=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},_n=function(e,t){return ej(e)&&ej(t)?function(n){return e+n*(t-e)}:function(){return t}};function aj(e,t,n){return e&&e.length?e.find(function(e){return e&&("function"==typeof t?t(e):NS(e,t))===n}):null}function sj(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function lj(e){return(lj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var cj=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],uj=["points","pathLength"],dj={svg:["viewBox","children"],polygon:uj,polyline:uj},fj=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],pj=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,n.isValidElement)(e)&&(r=e.props),!U_(r))return null;var o={};return Object.keys(r).forEach(function(e){fj.includes(e)&&(o[e]=t||function(t){return r[e](r,t)})}),o},hj=function(e,t,n){if(!U_(e)||"object"!==lj(e))return null;var r=null;return Object.keys(e).forEach(function(o){var i=e[o];fj.includes(o)&&"function"==typeof i&&(r||(r={}),r[o]=function(e,t,n){return function(r){return e(t,n,r),null}}(i,t,n))}),r},mj=["children"],gj=["children"];function yj(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function vj(e){return(vj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var bj={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},xj=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},wj=null,Cj=null,_j=function e(t){if(t===wj&&Array.isArray(Cj))return Cj;var r=[];return n.Children.forEach(t,function(t){IS(t)||($S.isFragment(t)?r=r.concat(e(t.props.children)):r.push(t))}),Cj=r,wj=t,r};function kj(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return xj(e)}):[xj(t)],_j(e).forEach(function(e){var t=NS(e,"type.displayName")||NS(e,"type.name");-1!==r.indexOf(t)&&n.push(e)}),n}function Sj(e,t){var n=kj(e,t);return n&&n[0]}var jj=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!ej(n)||n<=0||!ej(r)||r<=0)},Oj=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Ej=function(e){return e&&"object"===vj(e)&&"clipDot"in e},Pj=function(e,t,r){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var o=e;if((0,n.isValidElement)(e)&&(o=e.props),!U_(o))return null;var i={};return Object.keys(o).forEach(function(e){var n;(function(e,t,n,r){var o,i=null!==(o=null==dj?void 0:dj[r])&&void 0!==o?o:[];return!Z_(e)&&(r&&i.includes(t)||cj.includes(t))||n&&fj.includes(t)})(null===(n=o)||void 0===n?void 0:n[e],e,t,r)&&(i[e]=o[e])}),i},Tj=function e(t,r){if(t===r)return!0;var o=n.Children.count(t);if(o!==n.Children.count(r))return!1;if(0===o)return!0;if(1===o)return Mj(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<o;i++){var a=t[i],s=r[i];if(Array.isArray(a)||Array.isArray(s)){if(!e(a,s))return!1}else if(!Mj(a,s))return!1}return!0},Mj=function(e,t){if(IS(e)&&IS(t))return!0;if(!IS(e)&&!IS(t)){var n=e.props||{},r=n.children,o=yj(n,mj),i=t.props||{},a=i.children,s=yj(i,gj);return r&&a?sj(o,s)&&Tj(r,a):!r&&!a&&sj(o,s)}return!1},Aj=function(e,t){var n=[],r={};return _j(e).forEach(function(e,o){if(function(e){return e&&e.type&&zS(e.type)&&Oj.indexOf(e.type)>=0}(e))n.push(e);else if(e){var i=xj(e.type),a=t[i]||{},s=a.handler,l=a.once;if(s&&(!l||!r[i])){var c=s(e,i,o);n.push(c),r[i]=!0}}}),n},Nj=function(e,t){return _j(t).indexOf(e)},Dj=["children","width","height","viewBox","className","style","title","desc"];function Ij(){return Ij=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ij.apply(this,arguments)}function Rj(e){var t=e.children,r=e.width,o=e.height,i=e.viewBox,a=e.className,s=e.style,l=e.title,c=e.desc,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Dj),d=i||{width:r,height:o,x:0,y:0},f=de("recharts-surface",a);return n.createElement("svg",Ij({},Pj(u,!0,"svg"),{className:f,width:r,height:o,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),n.createElement("title",null,l),n.createElement("desc",null,c),t)}var Lj=["children","className"];function Fj(){return Fj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fj.apply(this,arguments)}var Bj=n.forwardRef(function(e,t){var r=e.children,o=e.className,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Lj),a=de("recharts-layer",o);return n.createElement("g",Fj({className:a},Pj(i,!0),{ref:t}),r)}),zj=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]},Vj=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i},Hj=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Wj=function(e){return Hj.test(e)},$j="\\ud800-\\udfff",Uj="["+$j+"]",_x="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",qj="\\ud83c[\\udffb-\\udfff]",Yj="[^"+$j+"]",Kj="(?:\\ud83c[\\udde6-\\uddff]){2}",Zj="[\\ud800-\\udbff][\\udc00-\\udfff]",Gj="(?:"+_x+"|"+qj+")?",Xj="[\\ufe0e\\ufe0f]?",Jj=Xj+Gj+"(?:\\u200d(?:"+[Yj,Kj,Zj].join("|")+")"+Xj+Gj+")*",Qj="(?:"+[Yj+_x+"?",_x,Kj,Zj,Uj].join("|")+")",eO=RegExp(qj+"(?="+qj+")|"+Qj+Jj,"g"),tO=function(e){return e.split("")},nO=Wj,rO=function(e){return e.match(eO)||[]},oO=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Vj(e,t,n)},iO=Wj,aO=function(e){return nO(e)?rO(e):tO(e)},sO=xS;const lO=c(function(e){return function(t){t=sO(t);var n=iO(t)?aO(t):void 0,r=n?n[0]:t.charAt(0),o=n?oO(n,1).join(""):t.slice(1);return r[e]()+o}}("toUpperCase"));function cO(e){return function(){return e}}const uO=Math.cos,dO=Math.sin,fO=Math.sqrt,pO=Math.PI,hO=2*pO,mO=Math.PI,gO=2*mO,yO=1e-6,vO=gO-yO;function bO(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class xO{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?bO:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return bO;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>yO)if(Math.abs(u*s-l*c)>yO&&o){let f=n-i,p=r-a,h=s*s+l*l,m=f*f+p*p,g=Math.sqrt(h),y=Math.sqrt(d),v=o*Math.tan((mO-Math.acos((h+d-m)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>yO&&this._append`L${e+b*c},${t+b*u}`,this._append`A${o},${o},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^i,d=i?r-o:o-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>yO||Math.abs(this._y1-c)>yO)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%gO+gO),d>vO?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>yO&&this._append`A${n},${n},0,${+(d>=mO)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function wO(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new xO(t)}function CO(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function _O(e){this._context=e}function kO(e){return new _O(e)}function SO(e){return e[0]}function jO(e){return e[1]}function OO(e,t){var n=cO(!0),r=null,o=kO,i=null,a=wO(s);function s(s){var l,c,u,d=(s=CO(s)).length,f=!1;for(null==r&&(i=o(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,l,s),+t(c,l,s));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?SO:cO(e),t="function"==typeof t?t:void 0===t?jO:cO(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:cO(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:cO(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:cO(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),s):r},s}function EO(e,t,n){var r=null,o=cO(!0),i=null,a=kO,s=null,l=wO(c);function c(c){var u,d,f,p,h,m=(c=CO(c)).length,g=!1,y=new Array(m),v=new Array(m);for(null==i&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&o(p=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(y[f],v[f]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+e(p,u,c),v[u]=+t(p,u,c),s.point(r?+r(p,u,c):y[u],n?+n(p,u,c):v[u]))}if(h)return s=null,h+""||null}function u(){return OO().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?SO:cO(+e),t="function"==typeof t?t:cO(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?jO:cO(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:cO(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:cO(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:cO(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:cO(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:cO(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:cO(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:cO(!!e),c):o},c.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),c):a},c.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),c):i},c}_O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class PO{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}const TO={draw(e,t){const n=fO(t/pO);e.moveTo(n,0),e.arc(0,0,n,0,hO)}},MO={draw(e,t){const n=fO(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},AO=fO(1/3),NO=2*AO,DO={draw(e,t){const n=fO(t/NO),r=n*AO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},IO={draw(e,t){const n=fO(t),r=-n/2;e.rect(r,r,n,n)}},RO=dO(pO/10)/dO(7*pO/10),LO=dO(hO/10)*RO,FO=-uO(hO/10)*RO,BO={draw(e,t){const n=fO(.8908130915292852*t),r=LO*n,o=FO*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const i=hO*t/5,a=uO(i),s=dO(i);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*o,s*r+a*o)}e.closePath()}},zO=fO(3),VO={draw(e,t){const n=-fO(t/(3*zO));e.moveTo(0,2*n),e.lineTo(-zO*n,-n),e.lineTo(zO*n,-n),e.closePath()}},HO=-.5,WO=fO(3)/2,$O=1/fO(12),UO=3*($O/2+1),qO={draw(e,t){const n=fO(t/UO),r=n/2,o=n*$O,i=r,a=n*$O+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(HO*r-WO*o,WO*r+HO*o),e.lineTo(HO*i-WO*a,WO*i+HO*a),e.lineTo(HO*s-WO*l,WO*s+HO*l),e.lineTo(HO*r+WO*o,HO*o-WO*r),e.lineTo(HO*i+WO*a,HO*a-WO*i),e.lineTo(HO*s+WO*l,HO*l-WO*s),e.closePath()}};function YO(){}function KO(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ZO(e){this._context=e}function GO(e){this._context=e}function XO(e){this._context=e}function JO(e){this._context=e}function QO(e){return e<0?-1:1}function eE(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(QO(i)+QO(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function tE(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function nE(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function rE(e){this._context=e}function oE(e){this._context=new iE(e)}function iE(e){this._context=e}function aE(e){this._context=e}function sE(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function lE(e,t){this._context=e,this._t=t}function cE(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function uE(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function dE(e,t){return e[t]}function fE(e){const t=[];return t.key=e,t}function pE(e){return(pE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}ZO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:KO(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:KO(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},GO.prototype={areaStart:YO,areaEnd:YO,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:KO(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},XO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:KO(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},JO.prototype={areaStart:YO,areaEnd:YO,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},rE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nE(this,this._t0,tE(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,nE(this,tE(this,n=eE(this,e,t)),n);break;default:nE(this,this._t0,n=eE(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(oE.prototype=Object.create(rE.prototype)).point=function(e,t){rE.prototype.point.call(this,t,e)},iE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},aE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=sE(e),o=sE(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},lE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var hE=["type","size","sizeType"];function mE(){return mE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mE.apply(this,arguments)}function gE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gE(Object(n),!0).forEach(function(t){vE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vE(e,t,n){return t=function(e){var t=function(e){if("object"!=pE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pE(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bE={symbolCircle:TO,symbolCross:MO,symbolDiamond:DO,symbolSquare:IO,symbolStar:BO,symbolTriangle:VO,symbolWye:qO},xE=Math.PI/180,wE=function(e){var t,r,o=e.type,i=void 0===o?"circle":o,a=e.size,s=void 0===a?64:a,l=e.sizeType,c=void 0===l?"area":l,u=yE(yE({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,hE)),{},{type:i,size:s,sizeType:c}),d=u.className,f=u.cx,p=u.cy,h=Pj(u,!0);return f===+f&&p===+p&&s===+s?n.createElement("path",mE({},h,{className:de("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(p,")"),d:(t=function(e){var t="symbol".concat(lO(e));return bE[t]||TO}(i),r=function(e,t){let n=null,r=wO(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:cO(e||TO),t="function"==typeof t?t:cO(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:cO(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:cO(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}().type(t).size(function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*xE;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(s,c,i)),r())})):null};function CE(e){return(CE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _E(){return _E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_E.apply(this,arguments)}function kE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SE=function(){return!!e})()}function jE(e){return(jE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function OE(e,t){return OE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OE(e,t)}function EE(e,t,n){return(t=PE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PE(e){var t=function(e){if("object"!=CE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=CE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==CE(t)?t:t+""}wE.registerSymbol=function(e,t){bE["symbol".concat(lO(e))]=t};var TE=32,ME=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=jE(t),function(e,t){if(t&&("object"===CE(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,SE()?Reflect.construct(t,n||[],jE(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OE(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PE(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,r=16,o=TE/6,i=TE/3,a=e.inactive?t:e.color;if("plainline"===e.type)return n.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:r,x2:TE,y2:r,className:"recharts-legend-icon"});if("line"===e.type)return n.createElement("path",{strokeWidth:4,fill:"none",stroke:a,d:"M0,".concat(r,"h").concat(i,"\n A").concat(o,",").concat(o,",0,1,1,").concat(2*i,",").concat(r,"\n H").concat(TE,"M").concat(2*i,",").concat(r,"\n A").concat(o,",").concat(o,",0,1,1,").concat(i,",").concat(r),className:"recharts-legend-icon"});if("rect"===e.type)return n.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(4,"h").concat(TE,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(n.isValidElement(e.legendIcon)){var s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kE(Object(n),!0).forEach(function(t){EE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);return delete s.legendIcon,n.cloneElement(e.legendIcon,s)}return n.createElement(wE,{fill:a,cx:r,cy:r,size:TE,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,r=t.payload,o=t.iconSize,i=t.layout,a=t.formatter,s=t.inactiveColor,l={x:0,y:0,width:TE,height:TE},c={display:"horizontal"===i?"inline-block":"block",marginRight:10},u={display:"inline-block",verticalAlign:"middle",marginRight:4};return r.map(function(t,r){var i=t.formatter||a,d=de(EE(EE({"recharts-legend-item":!0},"legend-item-".concat(r),!0),"inactive",t.inactive));if("none"===t.type)return null;var f=Z_(t.value)?null:t.value;zj(!Z_(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var p=t.inactive?s:t.color;return n.createElement("li",_E({className:d,style:c,key:"legend-item-".concat(r)},hj(e.props,t,r)),n.createElement(Rj,{width:o,height:o,viewBox:l,style:u},e.renderIcon(t)),n.createElement("span",{className:"recharts-legend-item-text",style:{color:p}},i?i(f,t,r):f))})}},{key:"render",value:function(){var e=this.props,t=e.payload,r=e.layout,o=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===r?o:"left"};return n.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}])}(n.PureComponent);EE(ME,"displayName","Legend"),EE(ME,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var AE=Vk,NE=Vk,DE=Hk,IE=rS,RE=Vk,LE=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},FE=function(e){return this.__data__.get(e)},BE=function(e){return this.__data__.has(e)},zE=function(e,t){var n=this.__data__;if(n instanceof NE){var r=n.__data__;if(!DE||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new IE(r)}return n.set(e,t),this.size=n.size,this};function VE(e){var t=this.__data__=new RE(e);this.size=t.size}VE.prototype.clear=function(){this.__data__=new AE,this.size=0},VE.prototype.delete=LE,VE.prototype.get=FE,VE.prototype.has=BE,VE.prototype.set=zE;var HE=VE,WE=rS,$E=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},UE=function(e){return this.__data__.has(e)};function qE(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new WE;++t<n;)this.add(e[t])}qE.prototype.add=qE.prototype.push=$E,qE.prototype.has=UE;var YE=qE,KE=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},ZE=function(e,t){return e.has(t)},GE=YE,XE=KE,JE=ZE,QE=function(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=2&n?new GE:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var g=a?r(m,h,d,t,e,i):r(h,m,d,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!XE(t,function(e,t){if(!JE(p,t)&&(h===e||o(h,e,n,r,i)))return p.push(t)})){f=!1;break}}else if(h!==m&&!o(h,m,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f},eP=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},tP=C_.Uint8Array,nP=Ok,rP=QE,oP=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},iP=eP,aP=k_?k_.prototype:void 0,sP=aP?aP.valueOf:void 0,lP=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},cP=lP,uP=v_,dP=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},fP=Object.prototype.propertyIsEnumerable,pP=Object.getOwnPropertySymbols,hP=pP?function(e){return null==e?[]:(e=Object(e),dP(pP(e),function(t){return fP.call(e,t)}))}:function(){return[]},mP=hP,gP=D_,yP=I_,vP=function(e){return yP(e)&&"[object Arguments]"==gP(e)},bP=I_,xP=Object.prototype,wP=xP.hasOwnProperty,CP=xP.propertyIsEnumerable,_P=vP(function(){return arguments}())?vP:function(e){return bP(e)&&wP.call(e,"callee")&&!CP.call(e,"callee")},kP=_P,SP={exports:{}},jP=function(){return!1};!function(e,t){var n=C_,r=jP,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(SP,SP.exports);var OP=SP.exports,EP=/^(?:0|[1-9]\d*)$/,PP=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&EP.test(e))&&e>-1&&e%1==0&&e<t},TP=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},MP=D_,AP=TP,NP=I_,DP={};DP["[object Float32Array]"]=DP["[object Float64Array]"]=DP["[object Int8Array]"]=DP["[object Int16Array]"]=DP["[object Int32Array]"]=DP["[object Uint8Array]"]=DP["[object Uint8ClampedArray]"]=DP["[object Uint16Array]"]=DP["[object Uint32Array]"]=!0,DP["[object Arguments]"]=DP["[object Array]"]=DP["[object ArrayBuffer]"]=DP["[object Boolean]"]=DP["[object DataView]"]=DP["[object Date]"]=DP["[object Error]"]=DP["[object Function]"]=DP["[object Map]"]=DP["[object Number]"]=DP["[object Object]"]=DP["[object RegExp]"]=DP["[object Set]"]=DP["[object String]"]=DP["[object WeakMap]"]=!1;var IP=function(e){return function(t){return e(t)}},RP={exports:{}};!function(e,t){var n=b_,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch{}}();e.exports=a}(RP,RP.exports);var LP=RP.exports,FP=function(e){return NP(e)&&AP(e.length)&&!!DP[MP(e)]},BP=IP,zP=LP&&LP.isTypedArray,VP=zP?BP(zP):FP,HP=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},WP=kP,$P=v_,UP=OP,qP=PP,YP=VP,KP=Object.prototype.hasOwnProperty,ZP=Object.prototype,GP=function(e,t){return function(n){return e(t(n))}},XP=GP(Object.keys,Object),JP=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ZP)},QP=XP,eT=Object.prototype.hasOwnProperty,tT=K_,nT=TP,rT=function(e){return null!=e&&nT(e.length)&&!tT(e)},oT=function(e,t){var n=$P(e),r=!n&&WP(e),o=!n&&!r&&UP(e),i=!n&&!r&&!o&&YP(e),a=n||r||o||i,s=a?HP(e.length,String):[],l=s.length;for(var c in e)(t||KP.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||qP(c,l)))&&s.push(c);return s},iT=function(e){if(!JP(e))return QP(e);var t=[];for(var n in Object(e))eT.call(e,n)&&"constructor"!=n&&t.push(n);return t},aT=rT,sT=function(e){return aT(e)?oT(e):iT(e)},lT=function(e,t,n){var r=t(e);return uP(e)?r:cP(r,n(e))},cT=mP,uT=sT,dT=function(e){return lT(e,uT,cT)},fT=Object.prototype.hasOwnProperty,pT=fk(C_,"DataView"),hT=fk(C_,"Promise"),mT=fk(C_,"Set"),gT=pT,yT=Hk,vT=hT,bT=mT,xT=fk(C_,"WeakMap"),wT=D_,CT=Q_,_T="[object Map]",kT="[object Promise]",ST="[object Set]",jT="[object WeakMap]",OT="[object DataView]",ET=CT(gT),PT=CT(yT),TT=CT(vT),MT=CT(bT),AT=CT(xT),NT=wT;(gT&&NT(new gT(new ArrayBuffer(1)))!=OT||yT&&NT(new yT)!=_T||vT&&NT(vT.resolve())!=kT||bT&&NT(new bT)!=ST||xT&&NT(new xT)!=jT)&&(NT=function(e){var t=wT(e),n="[object Object]"==t?e.constructor:void 0,r=n?CT(n):"";if(r)switch(r){case ET:return OT;case PT:return _T;case TT:return kT;case MT:return ST;case AT:return jT}return t});var DT=HE,IT=QE,RT=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new tP(e),new tP(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return nP(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=oP;case"[object Set]":var l=1&r;if(s||(s=iP),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=rP(s(e),s(t),r,o,i,a);return a.delete(e),u;case"[object Symbol]":if(sP)return sP.call(e)==sP.call(t)}return!1},LT=function(e,t,n,r,o,i){var a=1&n,s=dT(e),l=s.length;if(l!=dT(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:fT.call(t,u)))return!1}var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var y=a?r(g,m,u,t,e,i):r(m,g,u,e,t,i);if(!(void 0===y?m===g||o(m,g,n,r,i):y)){p=!1;break}h||(h="constructor"==u)}if(p&&!h){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(e),i.delete(t),p},FT=NT,BT=v_,zT=OP,VT=VP,HT="[object Arguments]",WT="[object Array]",$T="[object Object]",UT=Object.prototype.hasOwnProperty,qT=function(e,t,n,r,o,i){var a=BT(e),s=BT(t),l=a?WT:FT(e),c=s?WT:FT(t),u=(l=l==HT?$T:l)==$T,d=(c=c==HT?$T:c)==$T,f=l==c;if(f&&zT(e)){if(!zT(t))return!1;a=!0,u=!1}if(f&&!u)return i||(i=new DT),a||VT(e)?IT(e,t,n,r,o,i):RT(e,t,l,n,r,o,i);if(!(1&n)){var p=u&&UT.call(e,"__wrapped__"),h=d&&UT.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return i||(i=new DT),o(m,g,n,r,i)}}return!!f&&(i||(i=new DT),LT(e,t,n,r,o,i))},YT=I_,KT=function e(t,n,r,o,i){return t===n||(null==t||null==n||!YT(t)&&!YT(n)?t!=t&&n!=n:qT(t,n,r,o,e,i))},ZT=HE,GT=KT,XT=$_,JT=function(e){return e==e&&!XT(e)},QT=JT,eM=sT,tM=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},nM=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new ZT;if(r)var f=r(c,u,l,e,t,d);if(!(void 0===f?GT(u,c,3,r,d):f))return!1}}return!0},rM=function(e){for(var t=eM(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,QT(o)]}return t},oM=tM,iM=SS,aM=kP,sM=v_,lM=PP,cM=TP,uM=OS,dM=function(e,t){return null!=e&&t in Object(e)},fM=function(e,t,n){for(var r=-1,o=(t=iM(t,e)).length,i=!1;++r<o;){var a=uM(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&cM(o)&&lM(a,o)&&(sM(e)||aM(e))},pM=KT,hM=AS,mM=function(e,t){return null!=e&&fM(e,t,dM)},gM=W_,yM=JT,vM=tM,bM=OS,xM=function(e){return e},wM=TS,CM=function(e){return function(t){return null==t?void 0:t[e]}},_M=function(e){return function(t){return wM(t,e)}},kM=W_,SM=OS,jM=function(e){var t=rM(e);return 1==t.length&&t[0][2]?oM(t[0][0],t[0][1]):function(n){return n===e||nM(n,e,t)}},OM=function(e,t){return gM(e)&&yM(t)?vM(bM(e),t):function(n){var r=hM(n,e);return void 0===r&&r===t?mM(n,e):pM(t,r,3)}},EM=xM,PM=v_,TM=function(e){return kM(e)?CM(SM(e)):_M(e)},MM=function(e){return"function"==typeof e?e:null==e?EM:"object"==typeof e?PM(e)?OM(e[0],e[1]):jM(e):TM(e)},AM=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1},NM=AM,DM=function(e){return e!=e},IM=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1},RM=function(e,t,n){return t==t?IM(e,t,n):NM(e,DM,n)},LM=mT,FM=LM&&1/eP(new LM([,-0]))[1]==1/0?function(e){return new LM(e)}:function(){},BM=YE,zM=function(e,t){return!(null==e||!e.length)&&RM(e,t,0)>-1},VM=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},HM=ZE,WM=FM,$M=eP,UM=MM,qM=function(e,t,n){var r=-1,o=zM,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=VM;else if(i>=200){var c=t?null:WM(e);if(c)return $M(c);a=!1,o=HM,l=new BM}else l=t?[]:s;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s},YM=function(e,t){return e&&e.length?qM(e,UM(t)):[]};const KM=c(YM);function ZM(e,t,n){return!0===t?KM(e,n):Z_(t)?KM(e,t):e}function GM(e){return(GM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var XM=["ref"];function JM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JM(Object(n),!0).forEach(function(t){oA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iA(r.key),r)}}function tA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tA=function(){return!!e})()}function nA(e){return(nA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rA(e,t){return rA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rA(e,t)}function oA(e,t,n){return(t=iA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iA(e){var t=function(e){if("object"!=GM(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=GM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==GM(t)?t:t+""}function aA(e){return e.value}var sA=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return oA(e=function(e,t,n){return t=nA(t),function(e,t){if(t&&("object"===GM(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tA()?Reflect.construct(t,n||[],nA(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rA(e,t)}(t,e),function(e,t,n){return t&&eA(e.prototype,t),n&&eA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?QM({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,i=r.align,a=r.verticalAlign,s=r.margin,l=r.chartWidth,c=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===i&&"vertical"===o?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===i?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===a?{top:((c||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),QM(QM({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,r=t.content,o=t.width,i=t.height,a=t.wrapperStyle,s=t.payloadUniqBy,l=t.payload,c=QM(QM({position:"absolute",width:o||"auto",height:i||"auto"},this.getDefaultPosition(a)),a);return n.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(t){e.wrapperNode=t}},function(e,t){if(n.isValidElement(e))return n.cloneElement(e,t);if("function"==typeof e)return n.createElement(e,t);t.ref;var r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,XM);return n.createElement(ME,r)}(r,QM(QM({},this.props),{},{payload:ZM(l,s,aA)})))}}],[{key:"getWithHeight",value:function(e,t){var n=QM(QM({},this.defaultProps),e.props).layout;return"vertical"===n&&ej(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}(n.PureComponent);oA(sA,"displayName","Legend"),oA(sA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var lA=kP,cA=v_,uA=k_?k_.isConcatSpreadable:void 0,dA=lP,fA=function(e){return cA(e)||lA(e)||!!(uA&&e&&e[uA])},pA=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=fA),i||(i=[]);++a<s;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,o,i):dA(i,l):o||(i[i.length]=l)}return i},hA=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}(),mA=sT,gA=function(e,t){return e&&hA(e,t,mA)},yA=rT,vA=function(e,t){return function(n,r){if(null==n)return n;if(!yA(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}(gA),bA=vA,xA=rT,wA=function(e,t){var n=-1,r=xA(e)?Array(e.length):[];return bA(e,function(e,o,i){r[++n]=t(e,o,i)}),r},CA=F_,_A=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=CA(e),a=void 0!==t,s=null===t,l=t==t,c=CA(t);if(!s&&!c&&!i&&e>t||i&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&e<t||c&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!l)return-1}return 0},kA=pS,SA=TS,jA=MM,OA=wA,EA=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e},PA=IP,TA=function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=_A(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index},MA=xM,AA=v_,NA=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},DA=Math.max,IA=fk,RA=function(){try{var e=IA(Object,"defineProperty");return e({},"",{}),e}catch{}}(),LA=RA,FA=function(e){return function(){return e}},BA=LA,zA=BA?function(e,t){return BA(e,"toString",{configurable:!0,enumerable:!1,value:FA(t),writable:!0})}:xM,VA=zA,HA=Date.now,WA=function(e){var t=0,n=0;return function(){var r=HA(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(VA),$A=xM,UA=function(e,t,n){return t=DA(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=DA(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),NA(e,this,s)}},qA=WA,YA=Ok,KA=rT,ZA=PP,GA=$_,XA=function(e,t,n){if(!GA(n))return!1;var r=typeof t;return!!("number"==r?KA(n)&&ZA(t,n.length):"string"==r&&t in n)&&YA(n[t],e)},JA=pA,QA=function(e,t,n){t=t.length?kA(t,function(e){return AA(e)?function(t){return SA(t,1===e.length?e[0]:e)}:e}):[MA];var r=-1;t=kA(t,PA(jA));var o=OA(e,function(e,n,o){return{criteria:kA(t,function(t){return t(e)}),index:++r,value:e}});return EA(o,function(e,t){return TA(e,t,n)})},eN=XA,tN=function(e,t){return qA(UA(e,t,$A),e+"")}(function(e,t){if(null==e)return[];var n=t.length;return n>1&&eN(e,t[0],t[1])?t=[]:n>2&&eN(t[0],t[1],t[2])&&(t=[t[0]]),QA(e,JA(t,1),[])});const nN=c(tN);function rN(e){return(rN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oN(){return oN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oN.apply(this,arguments)}function iN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aN(Object(n),!0).forEach(function(t){lN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lN(e,t,n){return t=function(e){var t=function(e){if("object"!=rN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rN(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cN(e){return Array.isArray(e)&&tj(e[0])&&tj(e[1])?e.join(" ~ "):e}var uN=function(e){var t=e.separator,r=void 0===t?" : ":t,o=e.contentStyle,i=void 0===o?{}:o,a=e.itemStyle,s=void 0===a?{}:a,l=e.labelStyle,c=void 0===l?{}:l,u=e.payload,d=e.formatter,f=e.itemSorter,p=e.wrapperClassName,h=e.labelClassName,m=e.label,g=e.labelFormatter,y=e.accessibilityLayer,v=void 0!==y&&y,b=sN({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),x=sN({margin:0},c),w=!IS(m),C=w?m:"",_=de("recharts-default-tooltip",p),k=de("recharts-tooltip-label",h);w&&g&&null!=u&&(C=g(m,u));var S=v?{role:"status","aria-live":"assertive"}:{};return n.createElement("div",oN({className:_,style:b},S),n.createElement("p",{className:k,style:x},n.isValidElement(C)?C:"".concat(C)),function(){if(u&&u.length){var e=(f?nN(u,f):u).map(function(e,t){if("none"===e.type)return null;var o=sN({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},s),i=e.formatter||d||cN,a=e.value,l=e.name,c=a,f=l;if(i&&null!=c&&null!=f){var p=i(a,l,e,t,u);if(Array.isArray(p)){var h=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return iN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iN(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(p,2);c=h[0],f=h[1]}else c=p}return n.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:o},tj(f)?n.createElement("span",{className:"recharts-tooltip-item-name"},f):null,tj(f)?n.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,n.createElement("span",{className:"recharts-tooltip-item-value"},c),n.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return n.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function dN(e){return(dN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fN(e,t,n){return t=function(e){var t=function(e){if("object"!=dN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dN(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pN="recharts-tooltip-wrapper",hN={visibility:"hidden"};function mN(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return de(pN,fN(fN(fN(fN({},"".concat(pN,"-right"),ej(n)&&t&&ej(t.x)&&n>=t.x),"".concat(pN,"-left"),ej(n)&&t&&ej(t.x)&&n<t.x),"".concat(pN,"-bottom"),ej(r)&&t&&ej(t.y)&&r>=t.y),"".concat(pN,"-top"),ej(r)&&t&&ej(t.y)&&r<t.y))}function gN(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(i&&ej(i[r]))return i[r];var u=n[r]-s-o,d=n[r]+o;return t[r]?a[r]?u:d:a[r]?u<l[r]?Math.max(d,l[r]):Math.max(u,l[r]):d+s>l[r]+c?Math.max(u,l[r]):Math.max(d,l[r])}function yN(e){return(yN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vN(Object(n),!0).forEach(function(t){_N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xN=function(){return!!e})()}function wN(e){return(wN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function CN(e,t){return CN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},CN(e,t)}function _N(e,t,n){return(t=kN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kN(e){var t=function(e){if("object"!=yN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yN(t)?t:t+""}var SN=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return _N(e=function(e,t,n){return t=wN(t),function(e,t){if(t&&("object"===yN(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xN()?Reflect.construct(t,n||[],wN(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),_N(e,"handleKeyDown",function(t){var n,r,o,i;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=e.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&CN(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kN(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>1||Math.abs(e.height-this.state.lastBoundingBox.height)>1)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e=this,t=this.props,r=t.active,o=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,s=t.children,l=t.coordinate,c=t.hasPayload,u=t.isAnimationActive,d=t.offset,f=t.position,p=t.reverseDirection,h=t.useTranslate3d,m=t.viewBox,g=t.wrapperStyle,y=function(e){var t,n,r,o=e.allowEscapeViewBox,i=e.coordinate,a=e.offsetTopLeft,s=e.position,l=e.reverseDirection,c=e.tooltipBox,u=e.useTranslate3d,d=e.viewBox;return t=c.height>0&&c.width>0&&i?function(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=gN({allowEscapeViewBox:o,coordinate:i,key:"x",offsetTopLeft:a,position:s,reverseDirection:l,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=gN({allowEscapeViewBox:o,coordinate:i,key:"y",offsetTopLeft:a,position:s,reverseDirection:l,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:u}):hN,{cssProperties:t,cssClasses:mN({translateX:n,translateY:r,coordinate:i})}}({allowEscapeViewBox:o,coordinate:l,offsetTopLeft:d,position:f,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:h,viewBox:m}),v=y.cssClasses,b=y.cssProperties,x=bN(bN({transition:u&&r?"transform ".concat(i,"ms ").concat(a):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&r&&c?"visible":"hidden",position:"absolute",top:0,left:0},g);return n.createElement("div",{tabIndex:-1,className:v,style:x,ref:function(t){e.wrapperNode=t}},s)}}])}(n.PureComponent),jN={isSsr:!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return jN[e]},set:function(e,t){if("string"==typeof e)jN[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){jN[t]=e[t]})}}};function ON(e){return(ON="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function EN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EN(Object(n),!0).forEach(function(t){NN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TN=function(){return!!e})()}function MN(e){return(MN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function AN(e,t){return AN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},AN(e,t)}function NN(e,t,n){return(t=DN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DN(e){var t=function(e){if("object"!=ON(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ON(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ON(t)?t:t+""}function IN(e){return e.dataKey}var RN=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=MN(t),function(e,t){if(t&&("object"===ON(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,TN()?Reflect.construct(t,n||[],MN(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AN(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,DN(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this,t=this.props,r=t.active,o=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,s=t.content,l=t.coordinate,c=t.filterNull,u=t.isAnimationActive,d=t.offset,f=t.payload,p=t.payloadUniqBy,h=t.position,m=t.reverseDirection,g=t.useTranslate3d,y=t.viewBox,v=t.wrapperStyle,b=f??[];c&&b.length&&(b=ZM(f.filter(function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)}),p,IN));var x=b.length>0;return n.createElement(SN,{allowEscapeViewBox:o,animationDuration:i,animationEasing:a,isAnimationActive:u,active:r,coordinate:l,hasPayload:x,offset:d,position:h,reverseDirection:m,useTranslate3d:g,viewBox:y,wrapperStyle:v},function(e,t){return n.isValidElement(e)?n.cloneElement(e,t):"function"==typeof e?n.createElement(e,t):n.createElement(uN,t)}(s,PN(PN({},this.props),{},{payload:b})))}}])}(n.PureComponent);NN(RN,"displayName","Tooltip"),NN(RN,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!jN.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var LN=C_,FN=/\s/,BN=function(e){for(var t=e.length;t--&&FN.test(e.charAt(t)););return t},zN=/^\s+/,VN=function(e){return e&&e.slice(0,BN(e)+1).replace(zN,"")},HN=$_,WN=F_,$N=/^[-+]0x[0-9a-f]+$/i,UN=/^0b[01]+$/i,qN=/^0o[0-7]+$/i,YN=parseInt,KN=function(e){if("number"==typeof e)return e;if(WN(e))return NaN;if(HN(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=HN(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=VN(e);var n=UN.test(e);return n||qN.test(e)?YN(e.slice(2),n?2:8):$N.test(e)?NaN:+e},ZN=$_,GN=function(){return LN.Date.now()},XN=KN,JN=Math.max,QN=Math.min,eD=function(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function h(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function m(){var e=GN();if(h(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?QN(n,i-(e-c)):n}(e))}function g(e){return s=void 0,f&&r?p(e):(r=o=void 0,a)}function y(){var e=GN(),n=h(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?p(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),p(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=XN(t)||0,ZN(n)&&(u=!!n.leading,i=(d="maxWait"in n)?JN(XN(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},y.flush=function(){return void 0===s?a:g(GN())},y},tD=$_,nD=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return tD(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),eD(e,t,{leading:r,maxWait:t,trailing:o})};const rD=c(nD);var oD=function(e){return null};function iD(e){return(iD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aD(Object(n),!0).forEach(function(t){lD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lD(e,t,n){return t=function(e){var t=function(e){if("object"!=iD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=iD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==iD(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}oD.displayName="Cell";var cD={widthCache:{},cacheCount:0},uD={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},dD="recharts_measurement_span",fD=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||jN.isSsr)return{width:0,height:0};var n=function(e){var t=sD({},e);return Object.keys(t).forEach(function(e){t[e]||delete t[e]}),t}(t),r=JSON.stringify({text:e,copyStyle:n});if(cD.widthCache[r])return cD.widthCache[r];try{var o=document.getElementById(dD);o||((o=document.createElement("span")).setAttribute("id",dD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var i=sD(sD({},uD),n);Object.assign(o.style,i),o.textContent="".concat(e);var a=o.getBoundingClientRect(),s={width:a.width,height:a.height};return cD.widthCache[r]=s,++cD.cacheCount>2e3&&(cD.cacheCount=0,cD.widthCache={}),s}catch{return{width:0,height:0}}};function pD(e){return(pD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return mD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mD(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yD(r.key),r)}}function yD(e){var t=function(e){if("object"!=pD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pD(t)?t:t+""}var vD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,bD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xD=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,wD=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,CD={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},_D=Object.keys(CD),kD="NaN",SD=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),""!==n&&!xD.test(n)&&(this.num=NaN,this.unit=""),_D.includes(n)&&(this.num=function(e,t){return e*CD[t]}(t,n),this.unit="px")}return function(e,t,n){return t&&gD(e.prototype,t),n&&gD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(t){var n,r=hD(null!==(n=wD.exec(t))&&void 0!==n?n:[],3),o=r[1],i=r[2];return new e(parseFloat(o),i??"")}}])}();function jD(e){if(e.includes(kD))return kD;for(var t=e;t.includes("*")||t.includes("/");){var n,r=hD(null!==(n=vD.exec(t))&&void 0!==n?n:[],4),o=r[1],i=r[2],a=r[3],s=SD.parse(o??""),l=SD.parse(a??""),c="*"===i?s.multiply(l):s.divide(l);if(c.isNaN())return kD;t=t.replace(vD,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,d=hD(null!==(u=bD.exec(t))&&void 0!==u?u:[],4),f=d[1],p=d[2],h=d[3],m=SD.parse(f??""),g=SD.parse(h??""),y="+"===p?m.add(g):m.subtract(g);if(y.isNaN())return kD;t=t.replace(bD,y.toString())}return t}var OD=/\(([^()]*)\)/;function ED(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var n=hD(OD.exec(t),2)[1];t=t.replace(OD,jD(n))}return t}(t),jD(t)}(e)}catch{return kD}}(e.slice(5,-1));return t===kD?"":t}var PD=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],TD=["dx","dy","angle","className","breakAll"];function MD(){return MD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MD.apply(this,arguments)}function AD(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ND(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return DD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DD(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ID=/[ \f\n\r\t\v\u2028\u2029]+/,RD=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var o=[];IS(t)||(o=n?t.toString().split(""):t.toString().split(ID));var i=o.map(function(e){return{word:e,width:fD(e,r).width}});return{wordsWithComputedWidth:i,spaceWidth:n?0:fD(" ",r).width}}catch{return null}},LD=function(e){return[{words:IS(e)?[]:e.toString().split(ID)}]},FD="#808080",BD=function(e){var t=e.x,r=void 0===t?0:t,o=e.y,i=void 0===o?0:o,a=e.lineHeight,s=void 0===a?"1em":a,l=e.capHeight,c=void 0===l?"0.71em":l,u=e.scaleToFit,d=void 0!==u&&u,f=e.textAnchor,p=void 0===f?"start":f,h=e.verticalAnchor,m=void 0===h?"end":h,g=e.fill,y=void 0===g?FD:g,v=AD(e,PD),b=(0,n.useMemo)(function(){return function(e){var t=e.width,n=e.scaleToFit,r=e.children,o=e.style,i=e.breakAll,a=e.maxLines;if((t||n)&&!jN.isSsr){var s=RD({breakAll:i,children:r,style:o});return s?function(e,t,n,r,o){var i=e.maxLines,a=e.children,s=e.style,l=e.breakAll,c=ej(i),u=a,d=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t){var i=t.word,a=t.width,s=e[e.length-1];if(s&&(null==r||o||s.width+a+n<Number(r)))s.words.push(i),s.width+=a+n;else{var l={words:[i],width:a};e.push(l)}return e},[])},f=d(t);if(!c)return f;for(var p,h=function(e){var t=u.slice(0,e),n=RD({breakAll:l,style:s,children:t+"…"}).wordsWithComputedWidth,o=d(n),a=o.length>i||function(e){return e.reduce(function(e,t){return e.width>t.width?e:t})}(o).width>Number(r);return[a,o]},m=0,g=u.length-1,y=0;m<=g&&y<=u.length-1;){var v=Math.floor((m+g)/2),b=ND(h(v-1),2),x=b[0],w=b[1],C=ND(h(v),1)[0];if(!x&&!C&&(m=v+1),x&&C&&(g=v-1),!x&&C){p=w;break}y++}return p||f}({breakAll:i,children:r,maxLines:a,style:o},s.wordsWithComputedWidth,s.spaceWidth,t,n):LD(r)}return LD(r)}({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),x=v.dx,w=v.dy,C=v.angle,_=v.className,k=v.breakAll,S=AD(v,TD);if(!tj(r)||!tj(i))return null;var j,O=r+(ej(x)?x:0),E=i+(ej(w)?w:0);switch(m){case"start":j=ED("calc(".concat(c,")"));break;case"middle":j=ED("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:j=ED("calc(".concat(b.length-1," * -").concat(s,")"))}var P=[];if(d){var T=b[0].width,M=v.width;P.push("scale(".concat((ej(M)?M/T:1)/T,")"))}return C&&P.push("rotate(".concat(C,", ").concat(O,", ").concat(E,")")),P.length&&(S.transform=P.join(" ")),n.createElement("text",MD({},Pj(S,!0),{x:O,y:E,className:de("recharts-text",_),textAnchor:p,fill:y.includes("url")?FD:y}),b.map(function(e,t){var r=e.words.join(k?"":" ");return n.createElement("tspan",{x:O,dy:0===t?j:s,key:"".concat(r,"-").concat(t)},r)}))};function zD(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function VD(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function HD(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=zD,n=(t,n)=>zD(e(t),n),r=(t,n)=>e(t)-n):(t=e===zD||e===VD?e:WD,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function WD(){return 0}function $D(e){return null===e?NaN:+e}const UD=HD(zD).right;HD($D).center;class qD extends Map{constructor(e,t=KD){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(YD(this,e))}has(e){return super.has(YD(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function YD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function KD(e){return null!==e&&"object"==typeof e?e.valueOf():e}function ZD(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const GD=Math.sqrt(50),XD=Math.sqrt(10),JD=Math.sqrt(2);function QD(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=GD?10:i>=XD?5:i>=JD?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?QD(e,t,2*n):[s,l,c]}function eI(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,i,a]=r?QD(t,e,n):QD(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}function tI(e,t,n){return QD(e=+e,t=+t,n=+n)[2]}function nI(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?tI(t,e,n):tI(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function rI(e,t){let n;for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);return n}function oI(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}function iI(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=void 0===o?ZD:function(e=zD){if(e===zD)return ZD;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(o);r>n;){if(r-n>600){const i=r-n+1,a=t-n+1,s=Math.log(i),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(i-l)/i)*(a-i/2<0?-1:1);iI(e,t,Math.max(n,Math.floor(t-a*l/i+c)),Math.min(r,Math.floor(t+(i-a)*l/i+c)),o)}const i=e[t];let a=n,s=r;for(aI(e,n,t),o(e[r],i)>0&&aI(e,n,r);a<s;){for(aI(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}0===o(e[n],i)?aI(e,n,s):(++s,aI(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function aI(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function sI(e,t,n=$D){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e);return a+(+n(e[i+1],i+1,e)-a)*(o-i)}}function lI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function cI(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const uI=Symbol("implicit");function dI(){var e=new qD,t=[],n=[],r=uI;function o(o){let i=e.get(o);if(void 0===i){if(r!==uI)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new qD;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return dI(t,n).unknown(r)},lI.apply(o,arguments),o}function fI(){var e,t,n=dI().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<i,f=d?a:i,p=d?i:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map(function(t){return f+e*t});return o(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return fI(r(),[i,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},lI.apply(d(),arguments)}function pI(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return pI(t())},e}function hI(){return pI(fI.apply(null,arguments).paddingInner(1))}function mI(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gI(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yI(){}var vI=.7,bI=1/vI,xI="\\s*([+-]?\\d+)\\s*",wI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",CI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_I=/^#([0-9a-f]{3,8})$/,kI=new RegExp(`^rgb\\(${xI},${xI},${xI}\\)$`),SI=new RegExp(`^rgb\\(${CI},${CI},${CI}\\)$`),jI=new RegExp(`^rgba\\(${xI},${xI},${xI},${wI}\\)$`),OI=new RegExp(`^rgba\\(${CI},${CI},${CI},${wI}\\)$`),EI=new RegExp(`^hsl\\(${wI},${CI},${CI}\\)$`),PI=new RegExp(`^hsla\\(${wI},${CI},${CI},${wI}\\)$`),TI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function MI(){return this.rgb().formatHex()}function AI(){return this.rgb().formatRgb()}function NI(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=_I.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?DI(t):3===n?new LI(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?II(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?II(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=kI.exec(e))?new LI(t[1],t[2],t[3],1):(t=SI.exec(e))?new LI(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=jI.exec(e))?II(t[1],t[2],t[3],t[4]):(t=OI.exec(e))?II(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=EI.exec(e))?WI(t[1],t[2]/100,t[3]/100,1):(t=PI.exec(e))?WI(t[1],t[2]/100,t[3]/100,t[4]):TI.hasOwnProperty(e)?DI(TI[e]):"transparent"===e?new LI(NaN,NaN,NaN,0):null}function DI(e){return new LI(e>>16&255,e>>8&255,255&e,1)}function II(e,t,n,r){return r<=0&&(e=t=n=NaN),new LI(e,t,n,r)}function RI(e,t,n,r){return 1===arguments.length?function(e){return e instanceof yI||(e=NI(e)),e?new LI((e=e.rgb()).r,e.g,e.b,e.opacity):new LI}(e):new LI(e,t,n,r??1)}function LI(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function FI(){return`#${HI(this.r)}${HI(this.g)}${HI(this.b)}`}function BI(){const e=zI(this.opacity);return`${1===e?"rgb(":"rgba("}${VI(this.r)}, ${VI(this.g)}, ${VI(this.b)}${1===e?")":`, ${e})`}`}function zI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function VI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function HI(e){return((e=VI(e))<16?"0":"")+e.toString(16)}function WI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new UI(e,t,n,r)}function $I(e){if(e instanceof UI)return new UI(e.h,e.s,e.l,e.opacity);if(e instanceof yI||(e=NI(e)),!e)return new UI;if(e instanceof UI)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new UI(a,s,l,e.opacity)}function UI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function qI(e){return(e=(e||0)%360)<0?e+360:e}function YI(e){return Math.max(0,Math.min(1,e||0))}function KI(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}mI(yI,NI,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:MI,formatHex:MI,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $I(this).formatHsl()},formatRgb:AI,toString:AI}),mI(LI,RI,gI(yI,{brighter(e){return e=null==e?bI:Math.pow(bI,e),new LI(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?vI:Math.pow(vI,e),new LI(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new LI(VI(this.r),VI(this.g),VI(this.b),zI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FI,formatHex:FI,formatHex8:function(){return`#${HI(this.r)}${HI(this.g)}${HI(this.b)}${HI(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:BI,toString:BI})),mI(UI,function(e,t,n,r){return 1===arguments.length?$I(e):new UI(e,t,n,r??1)},gI(yI,{brighter(e){return e=null==e?bI:Math.pow(bI,e),new UI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?vI:Math.pow(vI,e),new UI(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new LI(KI(e>=240?e-240:e+120,o,r),KI(e,o,r),KI(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new UI(qI(this.h),YI(this.s),YI(this.l),zI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=zI(this.opacity);return`${1===e?"hsl(":"hsla("}${qI(this.h)}, ${100*YI(this.s)}%, ${100*YI(this.l)}%${1===e?")":`, ${e})`}`}}));const ZI=e=>()=>e;function GI(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ZI(isNaN(e)?t:e)}const XI=function e(t){var n=function(e){return 1==(e=+e)?GI:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):ZI(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=RI(e)).r,(t=RI(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=GI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function JI(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function QI(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=aR(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function eR(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function tR(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function nR(e,t){var n,r={},o={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=aR(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var rR=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oR=new RegExp(rR.source,"g");function iR(e,t){var n,r,o,i=rR.lastIndex=oR.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=rR.exec(e))&&(r=oR.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:tR(n,r)})),i=oR.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function aR(e,t){var n,r=typeof t;return null==t||"boolean"===r?ZI(t):("number"===r?tR:"string"===r?(n=NI(t))?(t=n,XI):iR:t instanceof NI?XI:t instanceof Date?eR:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?JI:Array.isArray(t)?QI:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?nR:tR)(e,t)}function sR(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function lR(e){return+e}var cR=[0,1];function uR(e){return e}function dR(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function fR(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=dR(o,r),i=n(a,i)):(r=dR(r,o),i=n(i,a)),function(e){return i(r(e))}}function pR(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=dR(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=UD(e,t,1,r)-1;return i[n](o[n](t))}}function hR(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mR(){var e,t,n,r,o,i,a=cR,s=cR,l=aR,c=uR;function u(){var e=Math.min(a.length,s.length);return c!==uR&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?pR:fR,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),tR)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,lR),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=sR,u()},d.clamp=function(e){return arguments.length?(c=!!e||uR,u()):c!==uR},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function gR(){return mR()(uR,uR)}function yR(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function vR(e){return(e=yR(Math.abs(e)))?e[1]:NaN}var bR,xR=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wR(e){if(!(t=xR.exec(e)))throw new Error("invalid format: "+e);var t;return new CR({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function CR(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function _R(e,t){var n=yR(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}wR.prototype=CR.prototype,CR.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const kR={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>_R(100*e,t),r:_R,s:function(e,t){var n=yR(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(bR=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+yR(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function SR(e){return e}var jR,OR,ER,PR=Array.prototype.map,TR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MR(e,t,n,r){var o,i=nI(e,t,n);switch((r=wR(r??",f")).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null==r.precision&&!isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vR(t)/3)))-vR(Math.abs(e)))}(i,a))&&(r.precision=o),ER(r,a);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vR(t)-vR(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(o=function(e){return Math.max(0,-vR(Math.abs(e)))}(i))&&(r.precision=o-2*("%"===r.type))}return OR(r)}function AR(e){var t=e.domain;return e.ticks=function(e){var n=t();return eI(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return MR(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],c=i[s],u=10;for(c<l&&(o=l,l=c,c=o,o=a,a=s,s=o);u-- >0;){if((o=tI(l,c,n))===r)return i[a]=l,i[s]=c,t(i);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function NR(){var e=gR();return e.copy=function(){return hR(e,NR())},lI.apply(e,arguments),AR(e)}function DR(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function IR(e){return Math.log(e)}function RR(e){return Math.exp(e)}function LR(e){return-Math.log(-e)}function FR(e){return-Math.exp(-e)}function BR(e){return isFinite(e)?+("1e"+e):e<0?0:e}function zR(e){return(t,n)=>-e(-t,n)}function VR(e){const t=e(IR,RR),n=t.domain;let r,o,i=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function(e){return 10===e?BR:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=zR(r),o=zR(o),e(LR,FR)):e(IR,RR),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),f=r(s);const p=null==e?10:+e;let h=[];if(!(i%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(c=1;c<i;++c)if(u=d<0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(c=i-1;c>=1;--c)if(u=d>0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=eI(a,s,p))}else h=eI(d,f,Math.min(f-d,p)).map(o);return l?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(!(i%1)&&null==(n=wR(n)).precision&&(n.trim=!0),n=OR(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(DR(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function HR(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function WR(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $R(e){var t=1,n=e(HR(t),WR(t));return n.constant=function(n){return arguments.length?e(HR(t=+n),WR(t)):t},AR(n)}function UR(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qR(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function YR(e){return e<0?-e*e:e*e}function KR(e){var t=e(uR,uR),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(uR,uR):.5===n?e(qR,YR):e(UR(n),UR(1/n)):n},AR(t)}function ZR(){var e=KR(mR());return e.copy=function(){return hR(e,ZR()).exponent(e.exponent())},lI.apply(e,arguments),e}function GR(e){return Math.sign(e)*e*e}jR=function(e){var t=void 0===e.grouping||void 0===e.thousands?SR:function(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}(PR.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",i=void 0===e.numerals?SR:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(PR.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=wR(e)).fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,h=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):kR[v]||(void 0===g&&(g=12),y=!0,v="g"),(p||"0"===c&&"="===u)&&(p=!0,c="0",u="=");var b="$"===f?n:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?r:/[%p]/.test(v)?a:"",w=kR[v],C=/[defgprs%]/.test(v);function _(e){var n,r,a,f=b,_=x;if("c"===v)_=w(e)+_,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,_=("s"===v?TR[8+bR/3]:"")+_+(k&&"("===d?")":""),C)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){_=(46===a?o+e.slice(n+1):e.slice(n))+_,e=e.slice(0,n);break}}m&&!p&&(e=t(e,1/0));var S=f.length+e.length+_.length,j=S<h?new Array(h-S+1).join(c):"";switch(m&&p&&(e=t(j+e,j.length?h-_.length:1/0),j=""),u){case"<":e=f+e+_+j;break;case"=":e=f+j+e+_;break;case"^":e=j.slice(0,S=j.length>>1)+f+e+_+j.slice(S);break;default:e=j+f+e+_}return i(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),_.toString=function(){return e+""},_}return{format:c,formatPrefix:function(e,t){var n=c(((e=wR(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(vR(t)/3))),o=Math.pow(10,-r),i=TR[8+r/3];return function(e){return n(o*e)+i}}}}({thousands:",",grouping:[3],currency:["$",""]}),OR=jR.format,ER=jR.formatPrefix;const XR=new Date,JR=new Date;function QR(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>QR(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(o.count=(t,r)=>(XR.setTime(+t),JR.setTime(+r),e(XR),e(JR),Math.floor(n(XR,JR))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e===0:t=>o.count(0,t)%e===0):o:null)),o}const eL=QR(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);eL.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?QR(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):eL:null),eL.range;const tL=1e3,nL=6e4,rL=60*nL,oL=24*rL,iL=7*oL,aL=30*oL,sL=365*oL,lL=QR(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*tL)},(e,t)=>(t-e)/tL,e=>e.getUTCSeconds());lL.range;const cL=QR(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tL)},(e,t)=>{e.setTime(+e+t*nL)},(e,t)=>(t-e)/nL,e=>e.getMinutes());cL.range;const uL=QR(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*nL)},(e,t)=>(t-e)/nL,e=>e.getUTCMinutes());uL.range;const dL=QR(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tL-e.getMinutes()*nL)},(e,t)=>{e.setTime(+e+t*rL)},(e,t)=>(t-e)/rL,e=>e.getHours());dL.range;const fL=QR(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*rL)},(e,t)=>(t-e)/rL,e=>e.getUTCHours());fL.range;const pL=QR(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*nL)/oL,e=>e.getDate()-1);pL.range;const hL=QR(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/oL,e=>e.getUTCDate()-1);hL.range;const mL=QR(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/oL,e=>Math.floor(e/oL));function gL(e){return QR(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*nL)/iL)}mL.range;const yL=gL(0),vL=gL(1),bL=gL(2),xL=gL(3),wL=gL(4),CL=gL(5),_L=gL(6);function kL(e){return QR(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/iL)}yL.range,vL.range,bL.range,xL.range,wL.range,CL.range,_L.range;const SL=kL(0),jL=kL(1),OL=kL(2),EL=kL(3),PL=kL(4),TL=kL(5),ML=kL(6);SL.range,jL.range,OL.range,EL.range,PL.range,TL.range,ML.range;const AL=QR(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());AL.range;const NL=QR(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());NL.range;const DL=QR(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());DL.every=e=>isFinite(e=Math.floor(e))&&e>0?QR(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,DL.range;const IL=QR(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function RL(e,t,n,r,o,i){const a=[[lL,1,tL],[lL,5,5e3],[lL,15,15e3],[lL,30,3e4],[i,1,nL],[i,5,5*nL],[i,15,15*nL],[i,30,30*nL],[o,1,rL],[o,3,3*rL],[o,6,6*rL],[o,12,12*rL],[r,1,oL],[r,2,2*oL],[n,1,iL],[t,1,aL],[t,3,3*aL],[e,1,sL]];function s(t,n,r){const o=Math.abs(n-t)/r,i=HD(([,,e])=>e).right(a,o);if(i===a.length)return e.every(nI(t/sL,n/sL,r));if(0===i)return eL.every(Math.max(nI(t,n,r),1));const[s,l]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},s]}IL.every=e=>isFinite(e=Math.floor(e))&&e>0?QR(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,IL.range;const[LL,FL]=RL(IL,NL,SL,mL,fL,uL),[BL,zL]=RL(DL,AL,yL,pL,dL,cL);function VL(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function HL(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function WL(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var $L,UL,qL,YL={"-":"",_:" ",0:"0"},KL=/^\s*\d+/,ZL=/^%/,GL=/[\\^$*+?|[\]().{}]/g;function XL(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function JL(e){return e.replace(GL,"\\$&")}function QL(e){return new RegExp("^(?:"+e.map(JL).join("|")+")","i")}function eF(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function tF(e,t,n){var r=KL.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function nF(e,t,n){var r=KL.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function rF(e,t,n){var r=KL.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function oF(e,t,n){var r=KL.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function iF(e,t,n){var r=KL.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function aF(e,t,n){var r=KL.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function sF(e,t,n){var r=KL.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function lF(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cF(e,t,n){var r=KL.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function uF(e,t,n){var r=KL.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function dF(e,t,n){var r=KL.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function fF(e,t,n){var r=KL.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function pF(e,t,n){var r=KL.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function hF(e,t,n){var r=KL.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function mF(e,t,n){var r=KL.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function gF(e,t,n){var r=KL.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function yF(e,t,n){var r=KL.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vF(e,t,n){var r=ZL.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function bF(e,t,n){var r=KL.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function xF(e,t,n){var r=KL.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function wF(e,t){return XL(e.getDate(),t,2)}function CF(e,t){return XL(e.getHours(),t,2)}function _F(e,t){return XL(e.getHours()%12||12,t,2)}function kF(e,t){return XL(1+pL.count(DL(e),e),t,3)}function SF(e,t){return XL(e.getMilliseconds(),t,3)}function jF(e,t){return SF(e,t)+"000"}function OF(e,t){return XL(e.getMonth()+1,t,2)}function EF(e,t){return XL(e.getMinutes(),t,2)}function PF(e,t){return XL(e.getSeconds(),t,2)}function TF(e){var t=e.getDay();return 0===t?7:t}function MF(e,t){return XL(yL.count(DL(e)-1,e),t,2)}function AF(e){var t=e.getDay();return t>=4||0===t?wL(e):wL.ceil(e)}function NF(e,t){return e=AF(e),XL(wL.count(DL(e),e)+(4===DL(e).getDay()),t,2)}function DF(e){return e.getDay()}function IF(e,t){return XL(vL.count(DL(e)-1,e),t,2)}function RF(e,t){return XL(e.getFullYear()%100,t,2)}function LF(e,t){return XL((e=AF(e)).getFullYear()%100,t,2)}function FF(e,t){return XL(e.getFullYear()%1e4,t,4)}function BF(e,t){var n=e.getDay();return XL((e=n>=4||0===n?wL(e):wL.ceil(e)).getFullYear()%1e4,t,4)}function zF(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+XL(t/60|0,"0",2)+XL(t%60,"0",2)}function VF(e,t){return XL(e.getUTCDate(),t,2)}function HF(e,t){return XL(e.getUTCHours(),t,2)}function WF(e,t){return XL(e.getUTCHours()%12||12,t,2)}function $F(e,t){return XL(1+hL.count(IL(e),e),t,3)}function UF(e,t){return XL(e.getUTCMilliseconds(),t,3)}function qF(e,t){return UF(e,t)+"000"}function YF(e,t){return XL(e.getUTCMonth()+1,t,2)}function KF(e,t){return XL(e.getUTCMinutes(),t,2)}function ZF(e,t){return XL(e.getUTCSeconds(),t,2)}function GF(e){var t=e.getUTCDay();return 0===t?7:t}function XF(e,t){return XL(SL.count(IL(e)-1,e),t,2)}function JF(e){var t=e.getUTCDay();return t>=4||0===t?PL(e):PL.ceil(e)}function QF(e,t){return e=JF(e),XL(PL.count(IL(e),e)+(4===IL(e).getUTCDay()),t,2)}function eB(e){return e.getUTCDay()}function tB(e,t){return XL(jL.count(IL(e)-1,e),t,2)}function nB(e,t){return XL(e.getUTCFullYear()%100,t,2)}function rB(e,t){return XL((e=JF(e)).getUTCFullYear()%100,t,2)}function oB(e,t){return XL(e.getUTCFullYear()%1e4,t,4)}function iB(e,t){var n=e.getUTCDay();return XL((e=n>=4||0===n?PL(e):PL.ceil(e)).getUTCFullYear()%1e4,t,4)}function aB(){return"+0000"}function sB(){return"%"}function lB(e){return+e}function cB(e){return Math.floor(+e/1e3)}function uB(e){return new Date(e)}function dB(e){return e instanceof Date?+e:+new Date(+e)}function fB(e,t,n,r,o,i,a,s,l,c){var u=gR(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),v=c("%b %d"),b=c("%B"),x=c("%Y");function w(e){return(l(e)<e?p:s(e)<e?h:a(e)<e?m:i(e)<e?g:r(e)<e?o(e)<e?y:v:n(e)<e?b:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,dB)):f().map(uB)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=f();return(!e||"function"!=typeof e.range)&&(e=t(n[0],n[n.length-1],e??10)),e?f(DR(n,e)):u},u.copy=function(){return hR(u,fB(e,t,n,r,o,i,a,s,l,c))},u}function pB(){var e,t,n,r,o,i=0,a=1,s=uR,l=!1;function c(t){return null==t||isNaN(t=+t)?o:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),c):[i,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(aR),c.rangeRound=u(sR),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),c}}function hB(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function mB(){var e=KR(pB());return e.copy=function(){return hB(e,mB()).exponent(e.exponent())},cI.apply(e,arguments)}function gB(){var e,t,n,r,o,i,a,s=0,l=.5,c=1,u=1,d=uR,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=function(e,t){void 0===t&&(t=e,e=aR);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,l,c]=a,e=i(s=+s),t=i(l=+l),n=i(c=+c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(aR),p.rangeRound=h(sR),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return i=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function yB(){var e=KR(gB());return e.copy=function(){return hB(e,yB()).exponent(e.exponent())},cI.apply(e,arguments)}$L=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=QL(o),u=eF(o),d=QL(i),f=eF(i),p=QL(a),h=eF(a),m=QL(s),g=eF(s),y=QL(l),v=eF(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:wF,e:wF,f:jF,g:LF,G:BF,H:CF,I:_F,j:kF,L:SF,m:OF,M:EF,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:lB,s:cB,S:PF,u:TF,U:MF,V:NF,w:DF,W:IF,x:null,X:null,y:RF,Y:FF,Z:zF,"%":sB},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:VF,e:VF,f:qF,g:rB,G:iB,H:HF,I:WF,j:$F,L:UF,m:YF,M:KF,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:lB,s:cB,S:ZF,u:GF,U:XF,V:QF,w:eB,W:tB,x:null,X:null,y:nB,Y:oB,Z:aB,"%":sB},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:dF,e:dF,f:yF,g:sF,G:aF,H:pF,I:pF,j:fF,L:gF,m:uF,M:hF,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:cF,Q:bF,s:xF,S:mF,u:nF,U:rF,V:oF,w:tF,W:iF,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:sF,Y:aF,Z:lF,"%":vF};function C(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=YL[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function _(e,t){return function(n){var r,o,i=WL(1900,void 0,1);if(k(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=HL(WL(i.y,0,1))).getUTCDay(),r=o>4||0===o?jL.ceil(r):jL(r),r=hL.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=VL(WL(i.y,0,1))).getDay(),r=o>4||0===o?vL.ceil(r):vL(r),r=pL.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?HL(WL(i.y,0,1)).getUTCDay():VL(WL(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,HL(i)):VL(i)}}function k(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in YL?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=C(n,b),b.X=C(r,b),b.c=C(t,b),x.x=C(n,x),x.X=C(r,x),x.c=C(t,x),{format:function(e){var t=C(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=_(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=C(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=_(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),UL=$L.format,$L.parse,qL=$L.utcFormat,$L.utcParse;const vB=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:fI,scaleDiverging:function e(){var t=AR(gB()(uR));return t.copy=function(){return hB(t,e())},cI.apply(t,arguments)},scaleDivergingLog:function e(){var t=VR(gB()).domain([.1,1,10]);return t.copy=function(){return hB(t,e()).base(t.base())},cI.apply(t,arguments)},scaleDivergingPow:yB,scaleDivergingSqrt:function(){return yB.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=$R(gB());return t.copy=function(){return hB(t,e()).constant(t.constant())},cI.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,lR),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,lR):[0,1],AR(r)},scaleImplicit:uI,scaleLinear:NR,scaleLog:function e(){const t=VR(mR()).domain([1,10]);return t.copy=()=>hR(t,e()).base(t.base()),lI.apply(t,arguments),t},scaleOrdinal:dI,scalePoint:hI,scalePow:ZR,scaleQuantile:function e(){var t,n=[],r=[],o=[];function i(){var e=0,t=Math.max(1,r.length);for(o=new Array(t-1);++e<t;)o[e-1]=sI(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[UD(o,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?o[t-1]:n[0],t<o.length?o[t]:n[n.length-1]]},a.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null!=t&&!isNaN(t=+t)&&n.push(t);return n.sort(zD),i()},a.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return o.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},lI.apply(a,arguments)},scaleQuantize:function e(){var t,n=0,r=1,o=1,i=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[UD(i,e,0,o)]:t}function l(){var e=-1;for(i=new Array(o);++e<o;)i[e]=((e+1)*r-(e-o)*n)/(o+1);return s}return s.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},s.range=function(e){return arguments.length?(o=(a=Array.from(e)).length-1,l()):a.slice()},s.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,i[0]]:t>=o?[i[o-1],r]:[i[t-1],i[t]]},s.unknown=function(e){return arguments.length&&(t=e),s},s.thresholds=function(){return i.slice()},s.copy=function(){return e().domain([n,r]).range(a).unknown(t)},lI.apply(AR(s),arguments)},scaleRadial:function e(){var t,n=gR(),r=[0,1],o=!1;function i(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:o?Math.round(r):r}return i.invert=function(e){return n.invert(GR(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,lR)).map(GR)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(o=!!e,i):o},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(o).clamp(n.clamp()).unknown(t)},lI.apply(i,arguments),AR(i)},scaleSequential:function e(){var t=AR(pB()(uR));return t.copy=function(){return hB(t,e())},cI.apply(t,arguments)},scaleSequentialLog:function e(){var t=VR(pB()).domain([1,10]);return t.copy=function(){return hB(t,e()).base(t.base())},cI.apply(t,arguments)},scaleSequentialPow:mB,scaleSequentialQuantile:function e(){var t=[],n=uR;function r(e){if(null!=e&&!isNaN(e=+e))return n((UD(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null!=n&&!isNaN(n=+n)&&t.push(n);return t.sort(zD),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map((e,r)=>n(r/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(n,r)=>function(e,t){if(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e)),(n=e.length)&&!isNaN(t=+t)){if(t<=0||n<2)return oI(e);if(t>=1)return rI(e);var n,r=(n-1)*t,o=Math.floor(r),i=rI(iI(e,o).subarray(0,o+1));return i+(oI(e.subarray(o+1))-i)*(r-o)}}(t,r/e))},r.copy=function(){return e(n).domain(t)},cI.apply(r,arguments)},scaleSequentialSqrt:function(){return mB.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=$R(pB());return t.copy=function(){return hB(t,e()).constant(t.constant())},cI.apply(t,arguments)},scaleSqrt:function(){return ZR.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=$R(mR());return t.copy=function(){return hR(t,e()).constant(t.constant())},lI.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],o=1;function i(e){return null!=e&&e<=e?r[UD(n,e,0,o)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),o=Math.min(n.length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),o=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},lI.apply(i,arguments)},scaleTime:function(){return lI.apply(fB(BL,zL,DL,AL,yL,pL,dL,cL,lL,UL).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return lI.apply(fB(LL,FL,IL,NL,SL,hL,fL,uL,lL,qL).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:MR},Symbol.toStringTag,{value:"Module"}));var bB=F_,xB=function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!bB(a):n(a,s)))var s=a,l=i}return l},wB=function(e,t){return e>t},CB=xB,_B=wB,kB=xM,SB=function(e){return e&&e.length?CB(e,kB,_B):void 0};const jB=c(SB);var OB=function(e,t){return e<t},EB=xB,PB=OB,TB=xM,MB=function(e){return e&&e.length?EB(e,TB,PB):void 0};const AB=c(MB);var NB=pS,DB=MM,IB=wA,RB=v_,LB=pA,FB=function(e,t){return(RB(e)?NB:IB)(e,DB(t))},BB=function(e,t){return LB(FB(e,t),1)};const zB=c(BB);var VB=KT,HB=function(e,t){return VB(e,t)};const WB=c(HB);var $B,UB=1e9,qB=!0,YB="[DecimalError] ",KB=YB+"Invalid argument: ",ZB=YB+"Exponent out of range: ",GB=Math.floor,XB=Math.pow,JB=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,QB=1e7,ez=9007199254740991,tz=GB(ez/7),nz={};function rz(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),qB?pz(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),i>(s=(a=Math.ceil(d/7))>s?a+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=l.length)-(i=c.length)<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/QB|0,l[i]%=QB;for(n&&(l.unshift(n),++o),s=l.length;0==l[--s];)l.pop();return t.d=l,t.e=o,qB?pz(t,d):t}function oz(e,t,n){if(e!==~~e||e<t||e>n)throw Error(KB+e)}function iz(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)(n=7-(r=e[t]+"").length)&&(i+=uz(n)),i+=r;(n=7-(r=(a=e[t])+"").length)&&(i+=uz(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}nz.absoluteValue=nz.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},nz.comparedTo=nz.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(o=e.d.length)?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1},nz.decimalPlaces=nz.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},nz.dividedBy=nz.div=function(e){return az(this,new this.constructor(e))},nz.dividedToIntegerBy=nz.idiv=function(e){var t=this.constructor;return pz(az(this,new t(e),0,1),t.precision)},nz.equals=nz.eq=function(e){return!this.cmp(e)},nz.exponent=function(){return lz(this)},nz.greaterThan=nz.gt=function(e){return this.cmp(e)>0},nz.greaterThanOrEqualTo=nz.gte=function(e){return this.cmp(e)>=0},nz.isInteger=nz.isint=function(){return this.e>this.d.length-2},nz.isNegative=nz.isneg=function(){return this.s<0},nz.isPositive=nz.ispos=function(){return this.s>0},nz.isZero=function(){return 0===this.s},nz.lessThan=nz.lt=function(e){return this.cmp(e)<0},nz.lessThanOrEqualTo=nz.lte=function(e){return this.cmp(e)<1},nz.logarithm=nz.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq($B))throw Error(YB+"NaN");if(n.s<1)throw Error(YB+(n.s?"NaN":"-Infinity"));return n.eq($B)?new r(0):(qB=!1,t=az(dz(n,i),dz(e,i),i),qB=!0,pz(t,o))},nz.minus=nz.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hz(t,e):rz(t,(e.s=-e.s,e))},nz.modulo=nz.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(YB+"NaN");return n.s?(qB=!1,t=az(n,e,0,1).times(e),qB=!0,n.minus(t)):pz(new r(n),o)},nz.naturalExponential=nz.exp=function(){return sz(this)},nz.naturalLogarithm=nz.ln=function(){return dz(this)},nz.negated=nz.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},nz.plus=nz.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rz(t,e):hz(t,(e.s=-e.s,e))},nz.precision=nz.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(KB+e);if(t=lz(o)+1,n=7*(r=o.d.length-1)+1,r=o.d[r]){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},nz.squareRoot=nz.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(YB+"NaN")}for(e=lz(s),qB=!1,0==(o=Math.sqrt(+s))||o==1/0?(((t=iz(s.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=GB((e+1)/2)-(e<0||e%2),r=new l(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(o.toString()),o=a=(n=l.precision)+3;;)if(r=(i=r).plus(az(s,i,a+2)).times(.5),iz(i.d).slice(0,a)===(t=iz(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&"4999"==t){if(pz(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if("9999"!=t)break;a+=4}return qB=!0,pz(r,n)},nz.times=nz.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,(l=f.length)<(c=p.length)&&(i=f,f=p,p=i,a=l,l=c,c=a),i=[],r=a=l+c;r--;)i.push(0);for(r=c;--r>=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%QB|0,t=s/QB|0;i[o]=(i[o]+t)%QB|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,qB?pz(e,d.precision):e},nz.toDecimalPlaces=nz.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(oz(e,0,UB),void 0===t?t=r.rounding:oz(t,0,8),pz(n,e+lz(n)+1,t))},nz.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=mz(r,!0):(oz(e,0,UB),void 0===t?t=o.rounding:oz(t,0,8),n=mz(r=pz(new o(r),e+1,t),!0,e+1)),n},nz.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?mz(o):(oz(e,0,UB),void 0===t?t=i.rounding:oz(t,0,8),n=mz((r=pz(new i(o),e+lz(o)+1,t)).abs(),!1,e+lz(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)},nz.toInteger=nz.toint=function(){var e=this,t=e.constructor;return pz(new t(e),lz(e)+1,t.rounding)},nz.toNumber=function(){return+this},nz.toPower=nz.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=+(e=new l(e));if(!e.s)return new l($B);if(!(s=new l(s)).s){if(e.s<1)throw Error(YB+"Infinity");return s}if(s.eq($B))return s;if(r=l.precision,e.eq($B))return pz(s,r);if(a=(t=e.e)>=(n=e.d.length-1),i=s.s,a){if((n=c<0?-c:c)<=ez){for(o=new l($B),t=Math.ceil(r/7+4),qB=!1;n%2&&gz((o=o.times(s)).d,t),0!==(n=GB(n/2));)gz((s=s.times(s)).d,t);return qB=!0,e.s<0?new l($B).div(o):pz(o,r)}}else if(i<0)throw Error(YB+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,qB=!1,o=e.times(dz(s,r+12)),qB=!0,(o=sz(o)).s=i,o},nz.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?r=mz(o,(n=lz(o))<=i.toExpNeg||n>=i.toExpPos):(oz(e,1,UB),void 0===t?t=i.rounding:oz(t,0,8),r=mz(o=pz(new i(o),e,t),e<=(n=lz(o))||n<=i.toExpNeg,e)),r},nz.toSignificantDigits=nz.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(oz(e,1,UB),void 0===t?t=n.rounding:oz(t,0,8)),pz(new n(this),e,t)},nz.toString=nz.valueOf=nz.val=nz.toJSON=nz[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=lz(e),n=e.constructor;return mz(e,t<=n.toExpNeg||t>=n.toExpPos)};var az=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%QB|0,r=n/QB|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*QB+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,i,a){var s,l,c,u,d,f,p,h,m,g,y,v,b,x,w,C,_,k,S=r.constructor,j=r.s==o.s?1:-1,O=r.d,E=o.d;if(!r.s)return new S(r);if(!o.s)throw Error(YB+"Division by zero");for(l=r.e-o.e,_=E.length,w=O.length,h=(p=new S(j)).d=[],c=0;E[c]==(O[c]||0);)++c;if(E[c]>(O[c]||0)&&--l,(v=null==i?i=S.precision:a?i+(lz(r)-lz(o))+1:i)<0)return new S(0);if(v=v/7+2|0,c=0,1==_)for(u=0,E=E[0],v++;(c<w||u)&&v--;c++)b=u*QB+(O[c]||0),h[c]=b/E|0,u=b%E|0;else{for((u=QB/(E[0]+1)|0)>1&&(E=e(E,u),O=e(O,u),_=E.length,w=O.length),x=_,g=(m=O.slice(0,_)).length;g<_;)m[g++]=0;(k=E.slice()).unshift(0),C=E[0],E[1]>=QB/2&&++C;do{u=0,(s=t(E,m,_,g))<0?(y=m[0],_!=g&&(y=y*QB+(m[1]||0)),(u=y/C|0)>1?(u>=QB&&(u=QB-1),1==(s=t(d=e(E,u),m,f=d.length,g=m.length))&&(u--,n(d,_<f?k:E,f))):(0==u&&(s=u=1),d=E.slice()),(f=d.length)<g&&d.unshift(0),n(m,d,g),-1==s&&(s=t(E,m,_,g=m.length))<1&&(u++,n(m,_<g?k:E,g)),g=m.length):0===s&&(u++,m=[0]),h[c++]=u,s&&m[0]?m[g++]=O[x]||0:(m=[O[x]],g=1)}while((x++<w||void 0!==m[0])&&v--)}return h[0]||h.shift(),p.e=l,pz(p,a?i+lz(p)+1:i)}}();function sz(e,t){var n,r,o,i,a,s=0,l=0,c=e.constructor,u=c.precision;if(lz(e)>16)throw Error(ZB+lz(e));if(!e.s)return new c($B);for(null==t?(qB=!1,a=u):a=t,i=new c(.03125);e.abs().gte(.1);)e=e.times(i),l+=5;for(a+=Math.log(XB(2,l))/Math.LN10*2+5|0,n=r=o=new c($B),c.precision=a;;){if(r=pz(r.times(e),a),n=n.times(++s),iz((i=o.plus(az(r,n,a))).d).slice(0,a)===iz(o.d).slice(0,a)){for(;l--;)o=pz(o.times(o),a);return c.precision=u,null==t?(qB=!0,pz(o,u)):o}o=i}}function lz(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function cz(e,t,n){if(t>e.LN10.sd())throw qB=!0,n&&(e.precision=n),Error(YB+"LN10 precision limit exceeded");return pz(new e(e.LN10),t)}function uz(e){for(var t="";e--;)t+="0";return t}function dz(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=e,p=f.d,h=f.constructor,m=h.precision;if(f.s<1)throw Error(YB+(f.s?"NaN":"-Infinity"));if(f.eq($B))return new h(0);if(null==t?(qB=!1,c=m):c=t,f.eq(10))return null==t&&(qB=!0),cz(h,c);if(c+=10,h.precision=c,r=(n=iz(p)).charAt(0),i=lz(f),!(Math.abs(i)<15e14))return l=cz(h,c+2,m).times(i+""),f=dz(new h(r+"."+n.slice(1)),c-10).plus(l),h.precision=m,null==t?(qB=!0,pz(f,m)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=iz((f=f.times(e)).d)).charAt(0),d++;for(i=lz(f),r>1?(f=new h("0."+n),i++):f=new h(r+"."+n.slice(1)),s=a=f=az(f.minus($B),f.plus($B),c),u=pz(f.times(f),c),o=3;;){if(a=pz(a.times(u),c),iz((l=s.plus(az(a,new h(o),c))).d).slice(0,c)===iz(s.d).slice(0,c))return s=s.times(2),0!==i&&(s=s.plus(cz(h,c+2,m).times(i+""))),s=az(s,new h(d),c),h.precision=m,null==t?(qB=!0,pz(s,m)):s;s=l,o+=2}}function fz(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=GB(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=7;r<o;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),qB&&(e.e>tz||e.e<-tz))throw Error(ZB+n)}else e.s=0,e.e=0,e.d=[0];return e}function pz(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if((r=t-a)<0)r+=7,o=t,c=d[u=0];else{if((u=Math.ceil((r+1)/7))>=(i=d.length))return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;o=(r%=7)-7+a}if(void 0!==n&&(s=c/(i=XB(10,a-o-1))%10|0,l=t<0||void 0!==d[u+1]||c%i,l=n<4?(s||l)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||l||6==n&&(r>0?o>0?c/XB(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=lz(e),d.length=1,t=t-i-1,d[0]=XB(10,(7-t%7)%7),e.e=GB(-t/7)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(0==r?(d.length=u,i=1,u--):(d.length=u+1,i=XB(10,7-r),d[u]=o>0?(c/XB(10,a-o)%XB(10,o)|0)*i:0),l)for(;;){if(0==u){(d[0]+=i)==QB&&(d[0]=1,++e.e);break}if(d[u]+=i,d[u]!=QB)break;d[u--]=0,i=1}for(r=d.length;0===d[--r];)d.pop();if(qB&&(e.e>tz||e.e<-tz))throw Error(ZB+lz(e));return e}function hz(e,t){var n,r,o,i,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),qB?pz(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r){for((u=a<0)?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),a>(o=Math.max(Math.ceil(p/7),s)+2)&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for((u=(o=l.length)<(s=d.length))&&(s=o),o=0;o<s;o++)if(l[o]!=d[o]){u=l[o]<d[o];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,o=d.length-s;o>0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]<d[o]){for(i=o;i&&0===l[--i];)l[i]=QB-1;--l[i],l[o]+=QB}l[o]-=d[o]}for(;0===l[--s];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,qB?pz(t,p):t):new f(0)}function mz(e,t,n){var r,o=lz(e),i=iz(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+uz(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+uz(-o-1)+i,n&&(r=n-a)>0&&(i+=uz(r))):o>=a?(i+=uz(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+uz(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=uz(r))),e.s<0?"-"+i:i}function gz(e,t){if(e.length>t)return e.length=t,!0}function yz(e){if(!e||"object"!=typeof e)throw Error(YB+"Object expected");var t,n,r,o=["precision",1,UB,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if(void 0!==(r=e[n=o[t]])){if(!(GB(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(KB+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(KB+n+": "+r);this[n]=new this(r)}return this}var vz=function e(t){var n,r,o;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(KB+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):fz(t,e.toString())}if("string"!=typeof e)throw Error(KB+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!JB.test(e))throw Error(KB+e);fz(t,e)}if(i.prototype=nz,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=yz,void 0===t&&(t={}),t)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});$B=new vz(1);const bz=vz;function xz(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wz=function(e){return e},Cz={"@@functional/placeholder":!0},_z=function(e){return e===Cz},kz=function(e){return function t(){return 0===arguments.length||1===arguments.length&&_z(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},Sz=function e(t,n){return 1===t?n:kz(function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o.filter(function(e){return e!==Cz}).length;return a>=t?n.apply(void 0,o):e(t-a,kz(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=o.map(function(e){return _z(e)?t.shift():e});return n.apply(void 0,function(e){return function(e){if(Array.isArray(e))return xz(e)}(e)||function(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return xz(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xz(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i).concat(t))}))})},jz=function(e){return Sz(e.length,e)},Oz=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},Ez=jz(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),Pz=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},Tz=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return t&&o.every(function(e,n){return e===t[n]})||(t=o,n=e.apply(void 0,o)),n}};jz(function(e,t,n){var r=+e;return r+n*(+t-r)}),jz(function(e,t,n){var r=t-+e;return(n-e)/(r||1/0)}),jz(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Mz=function(e,t,n){for(var r=new bz(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i},Az=function(e){return 0===e?1:Math.floor(new bz(e).abs().log(10).toNumber())+1};function Nz(e){return function(e){if(Array.isArray(e))return Rz(e)}(e)||function(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Iz(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dz(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&null!=s.return&&s.return()}finally{if(o)throw i}}return n}}(e,t)||Iz(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Iz(e,t){if(e){if("string"==typeof e)return Rz(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rz(e,t)}}function Rz(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lz(e){var t=Dz(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function Fz(e,t,n){if(e.lte(0))return new bz(0);var r=Az(e.toNumber()),o=new bz(10).pow(r),i=e.div(o),a=1!==r?.05:.1,s=new bz(Math.ceil(i.div(a).toNumber())).add(n).mul(a).mul(o);return t?s:new bz(Math.ceil(s))}function Bz(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new bz(0),tickMin:new bz(0),tickMax:new bz(0)};var i,a=Fz(new bz(t).sub(e).div(n-1),r,o);i=e<=0&&t>=0?new bz(0):(i=new bz(e).add(t).div(2)).sub(new bz(i).mod(a));var s=Math.ceil(i.sub(e).div(a).toNumber()),l=Math.ceil(new bz(t).sub(i).div(a).toNumber()),c=s+l+1;return c>n?Bz(e,t,n,r,o+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:a,tickMin:i.sub(new bz(s).mul(a)),tickMax:i.add(new bz(l).mul(a))})}var zz=Tz(function(e){var t=Dz(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(o,2),s=Dz(Lz([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var u=c===1/0?[l].concat(Nz(Oz(0,o-1).map(function(){return 1/0}))):[].concat(Nz(Oz(0,o-1).map(function(){return-1/0})),[c]);return n>r?Pz(u):u}if(l===c)return function(e,t,n){var r=1,o=new bz(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new bz(10).pow(Az(e)-1),o=new bz(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new bz(Math.floor(e)))}else 0===e?o=new bz(Math.floor((t-1)/2)):n||(o=new bz(Math.floor(e)));var a=Math.floor((t-1)/2),s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return wz;var r=t.reverse(),o=r[0],i=r.slice(1);return function(){return i.reduce(function(e,t){return t(e)},o.apply(void 0,arguments))}}(Ez(function(e){return o.add(new bz(e-a).mul(r)).toNumber()}),Oz);return s(0,t)}(l,o,i);var d=Bz(l,c,a,i),f=d.step,p=d.tickMin,h=d.tickMax,m=Mz(p,h.add(new bz(.1).mul(f)),f);return n>r?Pz(m):m}),Vz=Tz(function(e,t){var n=Dz(e,2),r=n[0],o=n[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Dz(Lz([r,o]),2),s=a[0],l=a[1];if(s===-1/0||l===1/0)return[r,o];if(s===l)return[s];var c=Math.max(t,2),u=Fz(new bz(l).sub(s).div(c-1),i,0),d=[].concat(Nz(Mz(new bz(s),new bz(l).sub(new bz(.99).mul(u)),u)),[l]);return r>o?Pz(d):d});function Hz(e,t){throw new Error("Invariant failed")}var Wz=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function $z(e){return($z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Uz(){return Uz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uz.apply(this,arguments)}function qz(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yz=function(){return!!e})()}function Kz(e){return(Kz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zz(e,t){return Zz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zz(e,t)}function Gz(e,t,n){return(t=Xz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xz(e){var t=function(e){if("object"!=$z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$z(t)?t:t+""}var Jz=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Kz(t),function(e,t){if(t&&("object"===$z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yz()?Reflect.construct(t,n||[],Kz(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zz(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xz(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,t=e.offset,r=e.layout,o=e.width,i=e.dataKey,a=e.data,s=e.dataPointFormatter,l=e.xAxis,c=e.yAxis,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Wz),d=Pj(u,!1);"x"===this.props.direction&&"number"!==l.type&&Hz();var f=a.map(function(e){var a=s(e,i),u=a.x,f=a.y,p=a.value,h=a.errorVal;if(!h)return null;var m,g,y=[];if(Array.isArray(h)){var v=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qz(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qz(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(h,2);m=v[0],g=v[1]}else m=g=h;if("vertical"===r){var b=l.scale,x=f+t,w=x+o,C=x-o,_=b(p-m),k=b(p+g);y.push({x1:k,y1:w,x2:k,y2:C}),y.push({x1:_,y1:x,x2:k,y2:x}),y.push({x1:_,y1:w,x2:_,y2:C})}else if("horizontal"===r){var S=c.scale,j=u+t,O=j-o,E=j+o,P=S(p-m),T=S(p+g);y.push({x1:O,y1:T,x2:E,y2:T}),y.push({x1:j,y1:P,x2:j,y2:T}),y.push({x1:O,y1:P,x2:E,y2:P})}return n.createElement(Bj,Uz({className:"recharts-errorBar",key:"bar-".concat(y.map(function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))},d),y.map(function(e){return n.createElement("line",Uz({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))}))});return n.createElement(Bj,{className:"recharts-errorBars"},f)}}])}(n.Component);function Qz(e){return(Qz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eV(Object(n),!0).forEach(function(t){nV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nV(e,t,n){return t=function(e){var t=function(e){if("object"!=Qz(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qz(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qz(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Gz(Jz,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),Gz(Jz,"displayName","ErrorBar");var rV=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,o=e.legendContent,i=Sj(t,sA);if(!i)return null;var a,s=sA.defaultProps,l=void 0!==s?tV(tV({},s),i.props):{};return a=i.props&&i.props.payload?i.props&&i.props.payload:"children"===o?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,o=r.sectors||r.data||[];return e.concat(o.map(function(e){return{type:i.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.type.defaultProps,r=void 0!==n?tV(tV({},n),t.props):{},o=r.dataKey,i=r.name,a=r.legendType;return{inactive:r.hide,dataKey:o,type:l.iconType||a||"square",color:fV(t),value:i||o,payload:r}}),tV(tV(tV({},l),sA.getWithHeight(i,r)),{},{payload:a,item:i})};function oV(e){return(oV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function iV(e){return function(e){if(Array.isArray(e))return aV(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return aV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aV(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sV(Object(n),!0).forEach(function(t){cV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cV(e,t,n){return t=function(e){var t=function(e){if("object"!=oV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uV(e,t,n){return IS(e)||IS(t)?n:tj(t)?NS(e,t,n):Z_(t)?t(e):n}function dV(e,t,n,r){var o=zB(e,function(e){return uV(e,t)});if("number"===n){var i=o.filter(function(e){return ej(e)||parseFloat(e)});return i.length?[AB(i),jB(i)]:[1/0,-1/0]}return(r?o.filter(function(e){return!IS(e)}):o).map(function(e){return tj(e)||e instanceof Date?e:""})}var fV=function(e){var t,n,r=e.type.displayName,o=null!==(t=e.type)&&void 0!==t&&t.defaultProps?lV(lV({},e.type.defaultProps),e.props):e.props,i=o.stroke,a=o.fill;switch(r){case"Line":n=i;break;case"Area":case"Radar":n=i&&"none"!==i?i:a;break;default:n=a}return n},pV=function(e,t,n,r,o){var i=kj(t.props.children,Jz).filter(function(e){return function(e,t,n){return!!IS(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===n?"xAxis"===t:"y"!==n||"yAxis"===t)}(r,o,e.props.direction)});if(i&&i.length){var a=i.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=uV(t,n);if(IS(r))return e;var o=Array.isArray(r)?[AB(r),jB(r)]:[r,r],i=a.reduce(function(e,n){var r=uV(t,n,0),i=o[0]-Math.abs(Array.isArray(r)?r[0]:r),a=o[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(a,e[1])]},[1/0,-1/0]);return[Math.min(i[0],e[0]),Math.max(i[1],e[1])]},[1/0,-1/0])}return null},hV=function(e,t,n,r,o){var i=t.map(function(t){var i=t.props.dataKey;return"number"===n&&i&&pV(e,t,i,r)||dV(e,i,n,o)});if("number"===n)return i.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var a={};return i.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)a[t[n]]||(a[t[n]]=!0,e.push(t[n]));return e},[])},mV=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},gV=function(e,t,n){if(!e)return null;var r=e.scale,o=e.duplicateDomain,i=e.type,a=e.range,s="scaleBand"===e.realScaleType?r.bandwidth()/2:2,l=(t||n)&&"category"===i&&r.bandwidth?r.bandwidth()/s:0;return l="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*JS(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){var t=o?o.indexOf(e):e;return{coordinate:r(t)+l,value:e,offset:l}}).filter(function(e){return!XS(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+l,value:e,index:t,offset:l}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+l,value:e,offset:l}}):r.domain().map(function(e,t){return{coordinate:r(e)+l,value:o?o[e]:e,index:t,offset:l}})},yV=new WeakMap,vV=function(e,t){if("function"!=typeof t)return e;yV.has(e)||yV.set(e,new WeakMap);var n=yV.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},bV=function(e,t,n){var r=e.scale,o=e.type,i=e.layout,a=e.axisType;if("auto"===r)return"radial"===i&&"radiusAxis"===a?{scale:fI(),realScaleType:"band"}:"radial"===i&&"angleAxis"===a?{scale:NR(),realScaleType:"linear"}:"category"===o&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:hI(),realScaleType:"point"}:"category"===o?{scale:fI(),realScaleType:"band"}:{scale:NR(),realScaleType:"linear"};if(zS(r)){var s="scale".concat(lO(r));return{scale:(vB[s]||hI)(),realScaleType:vB[s]?s:"point"}}return Z_(r)?{scale:r}:{scale:hI(),realScaleType:"point"}},xV=1e-4,wV=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),o=Math.min(r[0],r[1])-xV,i=Math.max(r[0],r[1])+xV,a=e(t[0]),s=e(t[n-1]);(a<o||a>i||s<o||s>i)&&e.domain([t[0],t[n-1]])}},CV={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0,a=0;a<t;++a){var s=XS(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1]):(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}cE(e,t)}},none:cE,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}cE(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=c/l)}n[a-1][1]+=n[a-1][0]=i,cE(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0;i<t;++i){var a=XS(e[i][n][1])?e[i][n][0]:e[i][n][1];a>=0?(e[i][n][0]=o,e[i][n][1]=o+a,o=e[i][n][1]):(e[i][n][0]=0,e[i][n][1]=0)}}},_V=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),o=CV[n],i=function(){var e=cO([]),t=uE,n=cE,r=dE;function o(o){var i,a,s=Array.from(e.apply(this,arguments),fE),l=s.length,c=-1;for(const e of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+r(e,s[i].key,c,o)]).data=e;for(i=0,a=CO(t(s));i<l;++i)s[a[i]].index=i;return n(s,a),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:cO(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:cO(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?uE:"function"==typeof e?e:cO(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=e??cE,o):n},o}().keys(r).value(function(e,t){return+uV(e,t,0)}).order(uE).offset(o);return i(e)},kV=function(e,t){var n=t.realScaleType,r=t.type,o=t.tickCount,i=t.originalDomain,a=t.allowDecimals,s=n||t.scale;if("auto"!==s&&"linear"!==s)return null;if(o&&"number"===r&&i&&("auto"===i[0]||"auto"===i[1])){var l=e.domain();if(!l.length)return null;var c=zz(l,o,a);return e.domain([AB(c),jB(c)]),{niceTicks:c}}if(o&&"number"===r){var u=e.domain();return{niceTicks:Vz(u,o,a)}}return null};function SV(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!IS(o[t.dataKey])){var s=aj(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=uV(o,IS(a)?t.dataKey:a);return IS(l)?null:t.scale(l)}var jV=function(e){var t=e.axis,n=e.ticks,r=e.offset,o=e.bandSize,i=e.entry,a=e.index;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var s=uV(i,t.dataKey,t.domain[a]);return IS(s)?null:t.scale(s)-o/2+r},OV=function(e,t,n){return Object.keys(e).reduce(function(r,o){var i=e[o].stackedData.reduce(function(e,r){var o=function(e){return e.reduce(function(e,t){return[AB(t.concat([e[0]]).filter(ej)),jB(t.concat([e[1]]).filter(ej))]},[1/0,-1/0])}(r.slice(t,n+1));return[Math.min(e[0],o[0]),Math.max(e[1],o[1])]},[1/0,-1/0]);return[Math.min(i[0],r[0]),Math.max(i[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},EV=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PV=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,TV=function(e,t,n){if(Z_(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(ej(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(EV.test(e[0])){var o=+EV.exec(e[0])[1];r[0]=t[0]-o}else Z_(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(ej(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(PV.test(e[1])){var i=+PV.exec(e[1])[1];r[1]=t[1]+i}else Z_(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},MV=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=nN(t,function(e){return e.coordinate}),i=1/0,a=1,s=o.length;a<s;a++){var l=o[a],c=o[a-1];i=Math.min((l.coordinate||0)-(c.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0},AV=function(e,t,n){return e&&e.length&&!WB(e,NS(n,"type.defaultProps.domain"))?e:t},NV=function(e,t){var n=e.type.defaultProps?lV(lV({},e.type.defaultProps),e.props):e.props,r=n.dataKey,o=n.name,i=n.unit,a=n.formatter,s=n.tooltipType,l=n.chartType,c=n.hide;return lV(lV({},Pj(e,!1)),{},{dataKey:r,unit:i,formatter:a,name:o||r,color:fV(e),value:uV(t,r),type:s,payload:t,chartType:l,hide:c})};function DV(e){return(DV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IV(Object(n),!0).forEach(function(t){LV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LV(e,t,n){return t=function(e){var t=function(e){if("object"!=DV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=DV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==DV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var BV=Math.PI/180,zV=function(e){return 180*e/Math.PI},VV=function(e,t,n,r){return{x:e+Math.cos(-BV*r)*n,y:t+Math.sin(-BV*r)*n}},HV=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},WV=function(e,t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(o,i)},$V=function(e,t){var n=function(e,t){var n=e.x,r=e.y,o=t.cx,i=t.cy,a=function(e,t){var n=e.x,r=e.y,o=t.x,i=t.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(r-i,2))}({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a};var s=(n-o)/a,l=Math.acos(s);return r>i&&(l=2*Math.PI-l),{radius:a,angle:zV(l),angleInRadian:l}}({x:e.x,y:e.y},t),r=n.radius,o=n.angle,i=t.innerRadius,a=t.outerRadius;if(r<i||r>a)return!1;if(0===r)return!0;var s,l=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),o=Math.floor(n/360),i=Math.min(r,o);return{startAngle:t-360*i,endAngle:n-360*i}}(t),c=l.startAngle,u=l.endAngle,d=o;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;s=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;s=d>=u&&d<=c}return s?RV(RV({},t),{},{radius:r,angle:WV(d,t)}):null},UV=function(e){return(0,n.isValidElement)(e)||Z_(e)||"boolean"==typeof e?"":e.className};function qV(e){return(qV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var YV=["offset"];function KV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZV(Object(n),!0).forEach(function(t){XV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XV(e,t,n){return t=function(e){var t=function(e){if("object"!=qV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JV(){return JV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JV.apply(this,arguments)}function QV(e){var t,r=e.offset,o=GV({offset:void 0===r?5:r},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,YV)),i=o.viewBox,a=o.position,s=o.value,l=o.children,c=o.content,u=o.className,d=void 0===u?"":u,f=o.textBreakAll;if(!i||IS(s)&&IS(l)&&!(0,n.isValidElement)(c)&&!Z_(c))return null;if((0,n.isValidElement)(c))return(0,n.cloneElement)(c,o);if(Z_(c)){if(t=(0,n.createElement)(c,o),(0,n.isValidElement)(t))return t}else t=function(e){var t=e.value,n=e.formatter,r=IS(e.children)?t:e.children;return Z_(n)?n(r):r}(o);var p=function(e){return"cx"in e&&ej(e.cx)}(i),h=Pj(o,!0);if(p&&("insideStart"===a||"insideEnd"===a||"end"===a))return function(e,t,r){var o,i,a=e.position,s=e.viewBox,l=e.offset,c=e.className,u=s,d=u.cx,f=u.cy,p=u.innerRadius,h=u.outerRadius,m=u.startAngle,g=u.endAngle,y=u.clockWise,v=(p+h)/2,b=function(e,t){return JS(t-e)*Math.min(Math.abs(t-e),360)}(m,g),x=b>=0?1:-1;"insideStart"===a?(o=m+x*l,i=y):"insideEnd"===a?(o=g-x*l,i=!y):"end"===a&&(o=g+x*l,i=y),i=b<=0?i:!i;var w=VV(d,f,v,o),C=VV(d,f,v,o+359*(i?1:-1)),_="M".concat(w.x,",").concat(w.y,"\n A").concat(v,",").concat(v,",0,1,").concat(i?0:1,",\n ").concat(C.x,",").concat(C.y),k=IS(e.id)?rj("recharts-radial-line-"):e.id;return n.createElement("text",JV({},r,{dominantBaseline:"central",className:de("recharts-radial-bar-label",c)}),n.createElement("defs",null,n.createElement("path",{id:k,d:_})),n.createElement("textPath",{xlinkHref:"#".concat(k)},t))}(o,t,h);var m=p?function(e){var t=e.viewBox,n=e.offset,r=e.position,o=t,i=o.cx,a=o.cy,s=o.innerRadius,l=o.outerRadius,c=(o.startAngle+o.endAngle)/2;if("outside"===r){var u=VV(i,a,l+n,c),d=u.x;return{x:d,y:u.y,textAnchor:d>=i?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"end"};var f=VV(i,a,(s+l)/2,c);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}}(o):function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,o=e.position,i=t,a=i.x,s=i.y,l=i.width,c=i.height,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",p=u>0?"start":"end",h=l>=0?1:-1,m=h*r,g=h>0?"end":"start",y=h>0?"start":"end";if("top"===o)return GV(GV({},{x:a+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:f}),n?{height:Math.max(s-n.y,0),width:l}:{});if("bottom"===o)return GV(GV({},{x:a+l/2,y:s+c+d,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(s+c),0),width:l}:{});if("left"===o){var v={x:a-m,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return GV(GV({},v),n?{width:Math.max(v.x-n.x,0),height:c}:{})}if("right"===o){var b={x:a+l+m,y:s+c/2,textAnchor:y,verticalAnchor:"middle"};return GV(GV({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:c}:{})}var x=n?{width:l,height:c}:{};return"insideLeft"===o?GV({x:a+m,y:s+c/2,textAnchor:y,verticalAnchor:"middle"},x):"insideRight"===o?GV({x:a+l-m,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},x):"insideTop"===o?GV({x:a+l/2,y:s+d,textAnchor:"middle",verticalAnchor:p},x):"insideBottom"===o?GV({x:a+l/2,y:s+c-d,textAnchor:"middle",verticalAnchor:f},x):"insideTopLeft"===o?GV({x:a+m,y:s+d,textAnchor:y,verticalAnchor:p},x):"insideTopRight"===o?GV({x:a+l-m,y:s+d,textAnchor:g,verticalAnchor:p},x):"insideBottomLeft"===o?GV({x:a+m,y:s+c-d,textAnchor:y,verticalAnchor:f},x):"insideBottomRight"===o?GV({x:a+l-m,y:s+c-d,textAnchor:g,verticalAnchor:f},x):U_(o)&&(ej(o.x)||QS(o.x))&&(ej(o.y)||QS(o.y))?GV({x:a+oj(o.x,l),y:s+oj(o.y,c),textAnchor:"end",verticalAnchor:"end"},x):GV({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},x)}(o);return n.createElement(BD,JV({className:de("recharts-label",d)},h,m,{breakAll:f}),t)}QV.displayName="Label";var eH=function(e){var t=e.cx,n=e.cy,r=e.angle,o=e.startAngle,i=e.endAngle,a=e.r,s=e.radius,l=e.innerRadius,c=e.outerRadius,u=e.x,d=e.y,f=e.top,p=e.left,h=e.width,m=e.height,g=e.clockWise,y=e.labelViewBox;if(y)return y;if(ej(h)&&ej(m)){if(ej(u)&&ej(d))return{x:u,y:d,width:h,height:m};if(ej(f)&&ej(p))return{x:f,y:p,width:h,height:m}}return ej(u)&&ej(d)?{x:u,y:d,width:0,height:0}:ej(t)&&ej(n)?{cx:t,cy:n,startAngle:o||r||0,endAngle:i||r||0,innerRadius:l||0,outerRadius:c||s||a||0,clockWise:g}:e.viewBox?e.viewBox:{}};QV.parseViewBox=eH,QV.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var o=e.children,i=eH(e),a=kj(o,QV).map(function(e,r){return(0,n.cloneElement)(e,{viewBox:t||i,key:"label-".concat(r)})});if(!r)return a;var s=function(e,t){return e?!0===e?n.createElement(QV,{key:"label-implicit",viewBox:t}):tj(e)?n.createElement(QV,{key:"label-implicit",viewBox:t,value:e}):(0,n.isValidElement)(e)?e.type===QV?(0,n.cloneElement)(e,{key:"label-implicit",viewBox:t}):n.createElement(QV,{key:"label-implicit",content:e,viewBox:t}):Z_(e)?n.createElement(QV,{key:"label-implicit",content:e,viewBox:t}):U_(e)?n.createElement(QV,JV({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||i);return[s].concat(function(e){return function(e){if(Array.isArray(e))return KV(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return KV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KV(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a))};var tH=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const nH=c(tH);function rH(e){return(rH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var oH=["valueAccessor"],iH=["data","dataKey","clockWise","id","textBreakAll"];function aH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sH(){return sH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sH.apply(this,arguments)}function lH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lH(Object(n),!0).forEach(function(t){uH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uH(e,t,n){return t=function(e){var t=function(e){if("object"!=rH(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rH(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rH(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dH(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fH=function(e){return Array.isArray(e.value)?nH(e.value):e.value};function pH(e){var t=e.valueAccessor,r=void 0===t?fH:t,o=dH(e,oH),i=o.data,a=o.dataKey,s=o.clockWise,l=o.id,c=o.textBreakAll,u=dH(o,iH);return i&&i.length?n.createElement(Bj,{className:"recharts-label-list"},i.map(function(e,t){var o=IS(a)?r(e,t):uV(e&&e.payload,a),i=IS(l)?{}:{id:"".concat(l,"-").concat(t)};return n.createElement(QV,sH({},Pj(e,!0),u,i,{parentViewBox:e.parentViewBox,value:o,textBreakAll:c,viewBox:QV.parseViewBox(IS(s)?e:cH(cH({},e),{},{clockWise:s})),key:"label-".concat(t),index:t}))})):null}function hH(e){return(hH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mH(){return mH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mH.apply(this,arguments)}function gH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gH(Object(n),!0).forEach(function(t){vH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vH(e,t,n){return t=function(e){var t=function(e){if("object"!=hH(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hH(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hH(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}pH.displayName="LabelList",pH.renderCallByParent=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&r&&!e.label)return null;var o=kj(e.children,pH).map(function(e,r){return(0,n.cloneElement)(e,{data:t,key:"labelList-".concat(r)})});if(!r)return o;var i=function(e,t){return e?!0===e?n.createElement(pH,{key:"labelList-implicit",data:t}):n.isValidElement(e)||Z_(e)?n.createElement(pH,{key:"labelList-implicit",data:t,content:e}):U_(e)?n.createElement(pH,sH({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t);return[i].concat(function(e){return function(e){if(Array.isArray(e))return aH(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return aH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aH(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o))};var bH=function(e){var t=e.cx,n=e.cy,r=e.radius,o=e.angle,i=e.sign,a=e.isExternal,s=e.cornerRadius,l=e.cornerIsExternal,c=s*(a?1:-1)+r,u=Math.asin(s/c)/BV,d=l?o:o+i*u,f=l?o-i*u:o;return{center:VV(t,n,c,d),circleTangency:VV(t,n,r,d),lineTangency:VV(t,n,c*Math.cos(u*BV),f),theta:u}},xH=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.startAngle,a=function(e,t){return JS(t-e)*Math.min(Math.abs(t-e),359.999)}(i,e.endAngle),s=i+a,l=VV(t,n,o,i),c=VV(t,n,o,s),u="M ".concat(l.x,",").concat(l.y,"\n A ").concat(o,",").concat(o,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(i>s),",\n ").concat(c.x,",").concat(c.y,"\n ");if(r>0){var d=VV(t,n,r,i),f=VV(t,n,r,s);u+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(i<=s),",\n ").concat(d.x,",").concat(d.y," Z")}else u+="L ".concat(t,",").concat(n," Z");return u},wH={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},CH=function(e){var t=yH(yH({},wH),e),r=t.cx,o=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=t.className;if(a<i||u===d)return null;var p,h=de("recharts-sector",f),m=a-i,g=oj(s,m,0,!0);return p=g>0&&Math.abs(u-d)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.cornerRadius,a=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,u=JS(c-l),d=bH({cx:t,cy:n,radius:o,angle:l,sign:u,cornerRadius:i,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,h=d.theta,m=bH({cx:t,cy:n,radius:o,angle:c,sign:-u,cornerRadius:i,cornerIsExternal:s}),g=m.circleTangency,y=m.lineTangency,v=m.theta,b=s?Math.abs(l-c):Math.abs(l-c)-h-v;if(b<0)return a?"M ".concat(p.x,",").concat(p.y,"\n a").concat(i,",").concat(i,",0,0,1,").concat(2*i,",0\n a").concat(i,",").concat(i,",0,0,1,").concat(2*-i,",0\n "):xH({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:c});var x="M ".concat(p.x,",").concat(p.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(f.x,",").concat(f.y,"\n A").concat(o,",").concat(o,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(g.x,",").concat(g.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(y.x,",").concat(y.y,"\n ");if(r>0){var w=bH({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),C=w.circleTangency,_=w.lineTangency,k=w.theta,S=bH({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),j=S.circleTangency,O=S.lineTangency,E=S.theta,P=s?Math.abs(l-c):Math.abs(l-c)-k-E;if(P<0&&0===i)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+="L".concat(O.x,",").concat(O.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(j.x,",").concat(j.y,"\n A").concat(r,",").concat(r,",0,").concat(+(P>180),",").concat(+(u>0),",").concat(C.x,",").concat(C.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(_.x,",").concat(_.y,"Z")}else x+="L".concat(t,",").concat(n,"Z");return x}({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):xH({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),n.createElement("path",mH({},Pj(t,!0),{className:h,d:p,role:"img"}))};function _H(e){return(_H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kH(){return kH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kH.apply(this,arguments)}function SH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SH(Object(n),!0).forEach(function(t){OH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function OH(e,t,n){return t=function(e){var t=function(e){if("object"!=_H(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_H(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_H(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var EH,PH,TH,MH,AH={curveBasisClosed:function(e){return new GO(e)},curveBasisOpen:function(e){return new XO(e)},curveBasis:function(e){return new ZO(e)},curveBumpX:function(e){return new PO(e,!0)},curveBumpY:function(e){return new PO(e,!1)},curveLinearClosed:function(e){return new JO(e)},curveLinear:kO,curveMonotoneX:function(e){return new rE(e)},curveMonotoneY:function(e){return new oE(e)},curveNatural:function(e){return new aE(e)},curveStep:function(e){return new lE(e,.5)},curveStepAfter:function(e){return new lE(e,1)},curveStepBefore:function(e){return new lE(e,0)}},NH=function(e){return e.x===+e.x&&e.y===+e.y},DH=function(e){return e.x},IH=function(e){return e.y},RH=function(e){var t=e.className,r=e.points,o=e.path,i=e.pathRef;if(!(r&&r.length||o))return null;var a=r&&r.length?function(e){var t,n=e.type,r=void 0===n?"linear":n,o=e.points,i=void 0===o?[]:o,a=e.baseLine,s=e.layout,l=e.connectNulls,c=void 0!==l&&l,u=function(e,t){if(Z_(e))return e;var n="curve".concat(lO(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?AH[n]||kO:AH["".concat(n).concat("vertical"===t?"Y":"X")]}(r,s),d=c?i.filter(function(e){return NH(e)}):i;if(Array.isArray(a)){var f=c?a.filter(function(e){return NH(e)}):a,p=d.map(function(e,t){return jH(jH({},e),{},{base:f[t]})});return(t="vertical"===s?EO().y(IH).x1(DH).x0(function(e){return e.base.x}):EO().x(DH).y1(IH).y0(function(e){return e.base.y})).defined(NH).curve(u),t(p)}return(t="vertical"===s&&ej(a)?EO().y(IH).x1(DH).x0(a):ej(a)?EO().x(DH).y1(IH).y0(a):OO().x(DH).y(IH)).defined(NH).curve(u),t(d)}(e):o;return n.createElement("path",kH({},Pj(e,!1),pj(e),{className:de("recharts-curve",t),d:a,ref:i}))},LH={exports:{}};LH.exports=function(){if(MH)return TH;MH=1;var e=PH?EH:(PH=1,EH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,TH=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},TH}()();const FH=c(LH.exports);var BH=Object.getOwnPropertyNames,zH=Object.getOwnPropertySymbols,VH=Object.prototype.hasOwnProperty;function HH(e,t){return function(n,r,o){return e(n,r,o)&&t(n,r,o)}}function WH(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);var o=r.cache,i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var s=e(t,n,r);return o.delete(t),o.delete(n),s}}function $H(e){return BH(e).concat(zH(e))}var UH=Object.hasOwn||function(e,t){return VH.call(e,t)};function qH(e,t){return e||t?e===t:e===t||e!=e&&t!=t}var YH="_owner",KH=Object.getOwnPropertyDescriptor,ZH=Object.keys;function GH(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function XH(e,t){return qH(e.getTime(),t.getTime())}function JH(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.entries(),s=0;(r=a.next())&&!r.done;){for(var l=t.entries(),c=!1,u=0;(o=l.next())&&!o.done;){var d=r.value,f=d[0],p=d[1],h=o.value,m=h[0],g=h[1];!c&&!i[u]&&(c=n.equals(f,m,s,u,e,t,n)&&n.equals(p,g,f,m,e,t,n))&&(i[u]=!0),u++}if(!c)return!1;s++}return!0}function QH(e,t,n){var r,o=ZH(e),i=o.length;if(ZH(t).length!==i)return!1;for(;i-- >0;)if((r=o[i])===YH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!UH(t,r)||!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function eW(e,t,n){var r,o,i,a=$H(e),s=a.length;if($H(t).length!==s)return!1;for(;s-- >0;)if((r=a[s])===YH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!UH(t,r)||!n.equals(e[r],t[r],r,r,e,t,n)||(o=KH(e,r),i=KH(t,r),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable)))return!1;return!0}function tW(e,t){return qH(e.valueOf(),t.valueOf())}function nW(e,t){return e.source===t.source&&e.flags===t.flags}function rW(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.values();(r=a.next())&&!r.done;){for(var s=t.values(),l=!1,c=0;(o=s.next())&&!o.done;)!l&&!i[c]&&(l=n.equals(r.value,o.value,r.value,o.value,e,t,n))&&(i[c]=!0),c++;if(!l)return!1}return!0}function oW(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var iW=Array.isArray,aW="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,sW=Object.assign,lW=Object.prototype.toString.call.bind(Object.prototype.toString),cW=uW();function uW(e){void 0===e&&(e={});var t=e.circular,n=void 0!==t&&t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=void 0!==i&&i,s=function(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?eW:GH,areDatesEqual:XH,areMapsEqual:r?HH(JH,eW):JH,areObjectsEqual:r?eW:QH,arePrimitiveWrappersEqual:tW,areRegExpsEqual:nW,areSetsEqual:r?HH(rW,eW):rW,areTypedArraysEqual:r?eW:oW};if(n&&(o=sW({},o,n(o))),t){var i=WH(o.areArraysEqual),a=WH(o.areMapsEqual),s=WH(o.areObjectsEqual),l=WH(o.areSetsEqual);o=sW({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}(e),l=function(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(e,c,u){if(e===c)return!0;if(null==e||null==c||"object"!=typeof e||"object"!=typeof c)return e!=e&&c!=c;var d=e.constructor;if(d!==c.constructor)return!1;if(d===Object)return o(e,c,u);if(iW(e))return t(e,c,u);if(null!=aW&&aW(e))return l(e,c,u);if(d===Date)return n(e,c,u);if(d===RegExp)return a(e,c,u);if(d===Map)return r(e,c,u);if(d===Set)return s(e,c,u);var f=lW(e);return"[object Date]"===f?n(e,c,u):"[object RegExp]"===f?a(e,c,u):"[object Map]"===f?r(e,c,u):"[object Set]"===f?s(e,c,u):"[object Object]"===f?"function"!=typeof e.then&&"function"!=typeof c.then&&o(e,c,u):"[object Arguments]"===f?o(e,c,u):("[object Boolean]"===f||"[object Number]"===f||"[object String]"===f)&&i(e,c,u)}}(s),c=r?r(l):function(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}(l);return function(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(e,a){var s=r(),l=s.cache,c=void 0===l?t?new WeakMap:void 0:l,u=s.meta;return n(e,a,{cache:c,equals:o,meta:u,strict:i})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(e,t){return n(e,t,a)}}({circular:n,comparator:l,createState:o,equals:c,strict:a})}function dW(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame(function r(o){n<0&&(n=o),o-n>t?(e(o),n=-1):function(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}(r)})}function fW(e){return(fW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hW(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var o=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pW(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r),i=o[0],a=o.slice(1);return"number"==typeof i?void dW(n.bind(null,a),i):(n(i),void dW(n.bind(null,a)))}"object"===fW(r)&&e(r),"function"==typeof r&&r()}};return{stop:function(){t=!0},start:function(e){t=!1,n(e)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}function mW(e){return(mW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gW(Object(n),!0).forEach(function(t){vW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vW(e,t,n){return t=function(e){var t=function(e){if("object"!==mW(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==mW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===mW(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}uW({strict:!0}),uW({circular:!0}),uW({circular:!0,strict:!0}),uW({createInternalComparator:function(){return qH}}),uW({strict:!0,createInternalComparator:function(){return qH}}),uW({circular:!0,createInternalComparator:function(){return qH}}),uW({circular:!0,createInternalComparator:function(){return qH},strict:!0});var bW=function(e){return e},xW=function(e,t){return Object.keys(t).reduce(function(n,r){return yW(yW({},n),{},vW({},r,e(r,t[r])))},{})},wW=function(e,t,n){return e.map(function(e){return"".concat(function(e){return e.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())})}(e)," ").concat(t,"ms ").concat(n)}).join(",")};function CW(e,t){if(e){if("string"==typeof e)return _W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _W(e,t)}}function _W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kW=1e-4,SW=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},jW=function(e,t){return e.map(function(e,n){return e*Math.pow(t,n)}).reduce(function(e,t){return e+t})},OW=function(e,t){return function(n){var r=SW(e,t);return jW(r,n)}},EW=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,o=0,i=1,a=1;break;case"ease":r=.25,o=.1,i=.25,a=1;break;case"ease-in":r=.42,o=0,i=1,a=1;break;case"ease-out":r=.42,o=0,i=.58,a=1;break;case"ease-in-out":r=0,o=0,i=.58,a=1;break;default:var s=t[0].split("(");if("cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length){var l=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||CW(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(s[1].split(")")[0].split(",").map(function(e){return parseFloat(e)}),4);r=l[0],o=l[1],i=l[2],a=l[3]}}[r,i,o,a].every(function(e){return"number"==typeof e&&e>=0&&e<=1});var c=OW(r,i),u=OW(o,a),d=function(e,t){return function(n){var r=SW(e,t),o=[].concat(function(e){return function(e){if(Array.isArray(e))return _W(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||CW(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r.map(function(e,t){return e*t}).slice(1)),[0]);return jW(o,n)}}(r,i),f=function(e){return e>1?1:e<0?0:e},p=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o=c(n)-t,i=d(n);if(Math.abs(o-t)<kW||i<kW)return u(n);n=f(n-o/i)}return u(n)};return p.isStepper=!1,p};function PW(e){return(PW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function TW(e){return function(e){if(Array.isArray(e))return IW(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||DW(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MW(Object(n),!0).forEach(function(t){NW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NW(e,t,n){return t=function(e){var t=function(e){if("object"!==PW(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==PW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===PW(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DW(e,t){if(e){if("string"==typeof e)return IW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IW(e,t)}}function IW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var RW=function(e,t,n){return e+(t-e)*n},LW=function(e){return e.from!==e.to},FW=function e(t,n,r){var o=xW(function(e,n){if(LW(n)){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||DW(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t(n.from,n.to,n.velocity),2),o=r[0],i=r[1];return AW(AW({},n),{},{from:o,velocity:i})}return n},n);return r<1?xW(function(e,t){return LW(t)?AW(AW({},t),{},{velocity:RW(t.velocity,o[e].velocity,r),from:RW(t.from,o[e].from,r)}):t},n):e(t,o,r-1)};function BW(e){return(BW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var zW=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function VW(e){return function(e){if(Array.isArray(e))return HW(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return HW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HW(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WW(Object(n),!0).forEach(function(t){UW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UW(e,t,n){return(t=qW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qW(e){var t=function(e){if("object"!==BW(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==BW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===BW(t)?t:String(t)}function YW(e,t){return YW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},YW(e,t)}function KW(e,t){if(t&&("object"===BW(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ZW(e)}function ZW(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GW(e){return(GW=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var XW=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YW(e,t)}(r,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=GW(e);if(t){var o=GW(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return KW(this,n)}}(r);function r(e,n){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var i=(o=t.call(this,e,n)).props,a=i.isActive,s=i.attributeName,l=i.from,c=i.to,u=i.steps,d=i.children,f=i.duration;if(o.handleStyleChange=o.handleStyleChange.bind(ZW(o)),o.changeStyle=o.changeStyle.bind(ZW(o)),!a||f<=0)return o.state={style:{}},"function"==typeof d&&(o.state={style:c}),KW(o);if(u&&u.length)o.state={style:u[0].style};else if(l){if("function"==typeof d)return o.state={style:l},KW(o);o.state={style:s?UW({},s,l):l}}else o.state={style:{}};return o}return function(e,t){t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qW(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,o=t.attributeName,i=t.shouldReAnimate,a=t.to,s=t.from,l=this.state.style;if(r){if(!n){var c={style:o?UW({},o,a):a};return void(this.state&&l&&(o&&l[o]!==a||!o&&l!==a)&&this.setState(c))}if(!(cW(e.to,a)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=u||i?s:e.to;if(this.state&&l){var f={style:o?UW({},o,d):d};(o&&l[o]!==d||!o&&l!==d)&&this.setState(f)}this.runAnimation($W($W({},this.props),{},{from:d,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,o=e.duration,i=e.easing,a=e.begin,s=e.onAnimationEnd,l=e.onAnimationStart,c=function(e,t,n,r,o){var i,a,s=function(e,t){return[Object.keys(e),Object.keys(t)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})}(e,t),l=s.reduce(function(n,r){return AW(AW({},n),{},NW({},r,[e[r],t[r]]))},{}),c=s.reduce(function(n,r){return AW(AW({},n),{},NW({},r,{from:e[r],velocity:0,to:t[r]}))},{}),u=-1,d=function(){return null};return d=n.isStepper?function(r){i||(i=r);var a=(r-i)/n.dt;c=FW(n,c,a),o(AW(AW(AW({},e),t),xW(function(e,t){return t.from},c))),i=r,!Object.values(c).filter(LW).length||(u=requestAnimationFrame(d))}:function(i){a||(a=i);var s=(i-a)/r,c=xW(function(e,t){return RW.apply(void 0,TW(t).concat([n(s)]))},l);if(o(AW(AW(AW({},e),t),c)),s<1)u=requestAnimationFrame(d);else{var f=xW(function(e,t){return RW.apply(void 0,TW(t).concat([n(1)]))},l);o(AW(AW(AW({},e),t),f))}},function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(u)}}}(n,r,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"==typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return EW(r);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,i=e.dt,a=void 0===i?17:i,s=function(e,t,r){var i=r+(-(e-t)*n-r*o)*a/1e3,s=r*a/1e3+e;return Math.abs(s-t)<kW&&Math.abs(i)<kW?[t,0]:[s,i]};return s.isStepper=!0,s.dt=a,s}();default:if("cubic-bezier"===r.split("(")[0])return EW(r)}return"function"==typeof r?r:null}(i),o,this.changeStyle);this.manager.start([l,a,function(){t.stopJSAnimation=c()},o,s])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,o=e.onAnimationStart,i=n[0],a=i.style,s=i.duration,l=void 0===s?0:s;return this.manager.start([o].concat(VW(n.reduce(function(e,r,o){if(0===o)return e;var i=r.duration,a=r.easing,s=void 0===a?"ease":a,l=r.style,c=r.properties,u=r.onAnimationEnd,d=o>0?n[o-1]:r,f=c||Object.keys(l);if("function"==typeof s||"spring"===s)return[].concat(VW(e),[t.runJSAnimation.bind(t,{from:d.style,to:l,duration:i,easing:s}),i]);var p=wW(f,i,s),h=$W($W($W({},d.style),l),{},{transition:p});return[].concat(VW(e),[h,i,u]).filter(bW)},[a,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=hW());var t=e.begin,n=e.duration,r=e.attributeName,o=e.to,i=e.easing,a=e.onAnimationStart,s=e.onAnimationEnd,l=e.steps,c=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),"function"!=typeof i&&"function"!=typeof c&&"spring"!==i)if(l.length>1)this.runStepAnimation(e);else{var d=r?UW({},r,o):o,f=wW(Object.keys(d),n,i);u.start([a,t,$W($W({},d),{},{transition:f}),n,s])}else this.runJSAnimation(e)}},{key:"render",value:function(){var e=this.props,t=e.children;e.begin;var r=e.duration;e.attributeName,e.easing;var o=e.isActive;e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart;var i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,zW),a=n.Children.count(t),s=this.state.style;if("function"==typeof t)return t(s);if(!o||0===a||r<=0)return t;var l=function(e){var t=e.props,r=t.style,o=void 0===r?{}:r,a=t.className;return(0,n.cloneElement)(e,$W($W({},i),{},{style:$W($W({},o),s),className:a}))};return 1===a?l(n.Children.only(t)):n.createElement("div",null,n.Children.map(t,function(e){return l(e)}))}}]),r}(n.PureComponent);function JW(e){return(JW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QW(){return QW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QW.apply(this,arguments)}function e$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t$(Object(n),!0).forEach(function(t){r$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r$(e,t,n){return t=function(e){var t=function(e){if("object"!=JW(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=JW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==JW(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}XW.displayName="Animate",XW.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},XW.propTypes={from:FH.oneOfType([FH.object,FH.string]),to:FH.oneOfType([FH.object,FH.string]),attributeName:FH.string,duration:FH.number,begin:FH.number,easing:FH.oneOfType([FH.string,FH.func]),steps:FH.arrayOf(FH.shape({duration:FH.number.isRequired,style:FH.object.isRequired,easing:FH.oneOfType([FH.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),FH.func]),properties:FH.arrayOf("string"),onAnimationEnd:FH.func})),children:FH.oneOfType([FH.node,FH.func]),isActive:FH.bool,canBegin:FH.bool,onAnimationEnd:FH.func,shouldReAnimate:FH.bool,onAnimationStart:FH.func,onAnimationReStart:FH.func},FH.object,FH.object,FH.object,FH.element,FH.object,FH.object,FH.object,FH.oneOfType([FH.array,FH.element]),FH.any;var o$=function(e,t,n,r,o){var i,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&o instanceof Array){for(var u=[0,0,0,0],d=0;d<4;d++)u[d]=o[d]>a?a:o[d];i="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(i+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),i+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(i+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+s*u[1])),i+="L ".concat(e+n,",").concat(t+r-s*u[2]),u[2]>0&&(i+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),i+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(i+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-s*u[3])),i+="Z"}else if(a>0&&o===+o&&o>0){var f=Math.min(a,o);i="M ".concat(e,",").concat(t+s*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+l*f,",").concat(t,"\n L ").concat(e+n-l*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*f,"\n L ").concat(e+n,",").concat(t+r-s*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+n-l*f,",").concat(t+r,"\n L ").concat(e+l*f,",").concat(t+r,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*f," Z")}else i="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return i},i$=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,o=t.x,i=t.y,a=t.width,s=t.height;if(Math.abs(a)>0&&Math.abs(s)>0){var l=Math.min(o,o+a),c=Math.max(o,o+a),u=Math.min(i,i+s),d=Math.max(i,i+s);return n>=l&&n<=c&&r>=u&&r<=d}return!1},a$={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},s$=function(e){var t=n$(n$({},a$),e),r=(0,n.useRef)(),o=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return e$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e$(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,n.useState)(-1),2),i=o[0],a=o[1];(0,n.useEffect)(function(){if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&a(e)}catch{}},[]);var s=t.x,l=t.y,c=t.width,u=t.height,d=t.radius,f=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,g=t.isAnimationActive,y=t.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||u!==+u||0===c||0===u)return null;var v=de("recharts-rectangle",f);return y?n.createElement(XW,{canBegin:i>0,from:{width:c,height:u,x:s,y:l},to:{width:c,height:u,x:s,y:l},duration:h,animationEasing:p,isActive:y},function(e){var o=e.width,a=e.height,s=e.x,l=e.y;return n.createElement(XW,{canBegin:i>0,from:"0px ".concat(-1===i?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,isActive:g,easing:p},n.createElement("path",QW({},Pj(t,!0),{className:v,d:o$(s,l,o,a,d),ref:r})))}):n.createElement("path",QW({},Pj(t,!0),{className:v,d:o$(s,l,c,u,d)}))},l$=["points","className","baseLinePoints","connectNulls"];function c$(){return c$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c$.apply(this,arguments)}function u$(e){return function(e){if(Array.isArray(e))return d$(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d$(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f$=function(e){return e&&e.x===+e.x&&e.y===+e.y},p$=function(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach(function(e){f$(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),f$(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t}(e);t&&(n=[n.reduce(function(e,t){return[].concat(u$(e),u$(t))},[])]);var r=n.map(function(e){return e.reduce(function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)},"")}).join("");return 1===n.length?"".concat(r,"Z"):r},h$=function(e){var t=e.points,r=e.className,o=e.baseLinePoints,i=e.connectNulls,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,l$);if(!t||!t.length)return null;var s=de("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&"none"!==a.stroke,c=function(e,t,n){var r=p$(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(p$(t.reverse(),n).slice(1))}(t,o,i);return n.createElement("g",{className:s},n.createElement("path",c$({},Pj(a,!0),{fill:"Z"===c.slice(-1)?a.fill:"none",stroke:"none",d:c})),l?n.createElement("path",c$({},Pj(a,!0),{fill:"none",d:p$(t,i)})):null,l?n.createElement("path",c$({},Pj(a,!0),{fill:"none",d:p$(o,i)})):null)}var u=p$(t,i);return n.createElement("path",c$({},Pj(a,!0),{fill:"Z"===u.slice(-1)?a.fill:"none",className:s,d:u}))};function m$(){return m$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m$.apply(this,arguments)}var g$=function(e){var t=e.cx,r=e.cy,o=e.r,i=de("recharts-dot",e.className);return t===+t&&r===+r&&o===+o?n.createElement("circle",m$({},Pj(e,!1),pj(e),{className:i,cx:t,cy:r,r:o})):null};function y$(e){return(y$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var v$=["x","y","top","left","width","height","className"];function b$(){return b$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b$.apply(this,arguments)}function x$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function w$(e,t,n){return t=function(e){var t=function(e){if("object"!=y$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y$(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C$=function(e,t,n,r,o,i){return"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n)},_$=function(e){var t=e.x,r=void 0===t?0:t,o=e.y,i=void 0===o?0:o,a=e.top,s=void 0===a?0:a,l=e.left,c=void 0===l?0:l,u=e.width,d=void 0===u?0:u,f=e.height,p=void 0===f?0:f,h=e.className,m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x$(Object(n),!0).forEach(function(t){w$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:r,y:i,top:s,left:c,width:d,height:p},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,v$));return ej(r)&&ej(i)&&ej(d)&&ej(p)&&ej(s)&&ej(c)?n.createElement("path",b$({},Pj(m,!0),{className:de("recharts-cross",h),d:C$(r,i,d,p,s,c)})):null},k$=xB,S$=wB,j$=MM,O$=function(e,t){return e&&e.length?k$(e,j$(t),S$):void 0};const E$=c(O$);var P$=xB,T$=MM,M$=OB,A$=function(e,t){return e&&e.length?P$(e,T$(t),M$):void 0};const N$=c(A$);var D$=["cx","cy","angle","ticks","axisLine"],I$=["ticks","tick","angle","tickFormatter","stroke"];function R$(e){return(R$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L$(){return L$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L$.apply(this,arguments)}function F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F$(Object(n),!0).forEach(function(t){U$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function z$(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function V$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,q$(r.key),r)}}function H$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H$=function(){return!!e})()}function W$(e){return(W$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $$(e,t){return $$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$$(e,t)}function U$(e,t,n){return(t=q$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q$(e){var t=function(e){if("object"!=R$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=R$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==R$(t)?t:t+""}var Y$=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=W$(t),function(e,t){if(t&&("object"===R$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,H$()?Reflect.construct(t,n||[],W$(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$$(e,t)}(t,e),function(e,t,n){return t&&V$(e.prototype,t),n&&V$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,o=n.cx,i=n.cy;return VV(o,i,t,r)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,i=E$(o,function(e){return e.coordinate||0});return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:N$(o,function(e){return e.coordinate||0}).coordinate||0,outerRadius:i.coordinate||0}}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,r=e.cy,o=e.angle,i=e.ticks,a=e.axisLine,s=z$(e,D$),l=i.reduce(function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]},[1/0,-1/0]),c=VV(t,r,l[0],o),u=VV(t,r,l[1],o),d=B$(B$(B$({},Pj(s,!1)),{},{fill:"none"},Pj(a,!1)),{},{x1:c.x,y1:c.y,x2:u.x,y2:u.y});return n.createElement("line",L$({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var e=this,r=this.props,o=r.ticks,i=r.tick,a=r.angle,s=r.tickFormatter,l=r.stroke,c=z$(r,I$),u=this.getTickTextAnchor(),d=Pj(c,!1),f=Pj(i,!1),p=o.map(function(r,o){var c=e.getTickValueCoord(r),p=B$(B$(B$(B$({textAnchor:u,transform:"rotate(".concat(90-a,", ").concat(c.x,", ").concat(c.y,")")},d),{},{stroke:"none",fill:l},f),{},{index:o},c),{},{payload:r});return n.createElement(Bj,L$({className:de("recharts-polar-radius-axis-tick",UV(i)),key:"tick-".concat(r.coordinate)},hj(e.props,r,o)),t.renderTickItem(i,p,s?s(r.value,o):r.value))});return n.createElement(Bj,{className:"recharts-polar-radius-axis-ticks"},p)}},{key:"render",value:function(){var e=this.props,t=e.ticks,r=e.axisLine,o=e.tick;return t&&t.length?n.createElement(Bj,{className:de("recharts-polar-radius-axis",this.props.className)},r&&this.renderAxisLine(),o&&this.renderTicks(),QV.renderCallByParent(this.props,this.getViewBox())):null}}],[{key:"renderTickItem",value:function(e,t,r){return n.isValidElement(e)?n.cloneElement(e,t):Z_(e)?e(t):n.createElement(BD,L$({},t,{className:"recharts-polar-radius-axis-tick-value"}),r)}}])}(n.PureComponent);function K$(e){return(K$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z$(){return Z$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z$.apply(this,arguments)}function G$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function X$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G$(Object(n),!0).forEach(function(t){nU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function J$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rU(r.key),r)}}function Q$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q$=function(){return!!e})()}function eU(e){return(eU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tU(e,t){return tU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tU(e,t)}function nU(e,t,n){return(t=rU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rU(e){var t=function(e){if("object"!=K$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=K$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==K$(t)?t:t+""}U$(Y$,"displayName","PolarRadiusAxis"),U$(Y$,"axisType","radiusAxis"),U$(Y$,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var oU=Math.PI/180,iU=1e-5,aU=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=eU(t),function(e,t){if(t&&("object"===K$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Q$()?Reflect.construct(t,n||[],eU(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tU(e,t)}(t,e),function(e,t,n){return t&&J$(e.prototype,t),n&&J$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,o=t.radius,i=t.orientation,a=t.tickSize||8,s=VV(n,r,o,e.coordinate),l=VV(n,r,o+("inner"===i?-1:1)*a,e.coordinate);return{x1:s.x,y1:s.y,x2:l.x,y2:l.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*oU);return n>iU?"outer"===t?"start":"end":n<-iU?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,r=e.cy,o=e.radius,i=e.axisLine,a=e.axisLineType,s=X$(X$({},Pj(this.props,!1)),{},{fill:"none"},Pj(i,!1));if("circle"===a)return n.createElement(g$,Z$({className:"recharts-polar-angle-axis-line"},s,{cx:t,cy:r,r:o}));var l=this.props.ticks.map(function(e){return VV(t,r,o,e.coordinate)});return n.createElement(h$,Z$({className:"recharts-polar-angle-axis-line"},s,{points:l}))}},{key:"renderTicks",value:function(){var e=this,r=this.props,o=r.ticks,i=r.tick,a=r.tickLine,s=r.tickFormatter,l=r.stroke,c=Pj(this.props,!1),u=Pj(i,!1),d=X$(X$({},c),{},{fill:"none"},Pj(a,!1)),f=o.map(function(r,o){var f=e.getTickLineCoord(r),p=X$(X$(X$({textAnchor:e.getTickTextAnchor(r)},c),{},{stroke:"none",fill:l},u),{},{index:o,payload:r,x:f.x2,y:f.y2});return n.createElement(Bj,Z$({className:de("recharts-polar-angle-axis-tick",UV(i)),key:"tick-".concat(r.coordinate)},hj(e.props,r,o)),a&&n.createElement("line",Z$({className:"recharts-polar-angle-axis-tick-line"},d,f)),i&&t.renderTickItem(i,p,s?s(r.value,o):r.value))});return n.createElement(Bj,{className:"recharts-polar-angle-axis-ticks"},f)}},{key:"render",value:function(){var e=this.props,t=e.ticks,r=e.radius,o=e.axisLine;return r<=0||!t||!t.length?null:n.createElement(Bj,{className:de("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(e,t,r){return n.isValidElement(e)?n.cloneElement(e,t):Z_(e)?e(t):n.createElement(BD,Z$({},t,{className:"recharts-polar-angle-axis-tick-value"}),r)}}])}(n.PureComponent);nU(aU,"displayName","PolarAngleAxis"),nU(aU,"axisType","angleAxis"),nU(aU,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var sU=GP(Object.getPrototypeOf,Object),lU=D_,cU=sU,uU=I_,dU=Function.prototype,fU=Object.prototype,pU=dU.toString,hU=fU.hasOwnProperty,mU=pU.call(Object),gU=function(e){if(!uU(e)||"[object Object]"!=lU(e))return!1;var t=cU(e);if(null===t)return!0;var n=hU.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&pU.call(n)==mU};const yU=c(gU);var vU=D_,bU=I_,xU=function(e){return!0===e||!1===e||bU(e)&&"[object Boolean]"==vU(e)};const wU=c(xU);function CU(e){return(CU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _U(){return _U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_U.apply(this,arguments)}function kU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function SU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SU(Object(n),!0).forEach(function(t){OU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function OU(e,t,n){return t=function(e){var t=function(e){if("object"!=CU(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=CU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==CU(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var EU,PU=function(e,t,n,r,o){var i,a=n-r;return i="M ".concat(e,",").concat(t),i+="L ".concat(e+n,",").concat(t),i+="L ".concat(e+n-a/2,",").concat(t+o),(i+="L ".concat(e+n-a/2-r,",").concat(t+o))+"L ".concat(e,",").concat(t," Z")},TU={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},MU=function(e){var t=jU(jU({},TU),e),r=(0,n.useRef)(),o=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kU(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,n.useState)(-1),2),i=o[0],a=o[1];(0,n.useEffect)(function(){if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&a(e)}catch{}},[]);var s=t.x,l=t.y,c=t.upperWidth,u=t.lowerWidth,d=t.height,f=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,g=t.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||u!==+u||d!==+d||0===c&&0===u||0===d)return null;var y=de("recharts-trapezoid",f);return g?n.createElement(XW,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:d,x:s,y:l},to:{upperWidth:c,lowerWidth:u,height:d,x:s,y:l},duration:h,animationEasing:p,isActive:g},function(e){var o=e.upperWidth,a=e.lowerWidth,s=e.height,l=e.x,c=e.y;return n.createElement(XW,{canBegin:i>0,from:"0px ".concat(-1===i?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,easing:p},n.createElement("path",_U({},Pj(t,!0),{className:y,d:PU(l,c,o,a,s),ref:r})))}):n.createElement("g",null,n.createElement("path",_U({},Pj(t,!0),{className:y,d:PU(s,l,c,u,d)})))},AU=["option","shapeType","propTransformer","activeClassName","isActive"];function NU(e){return(NU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DU(Object(n),!0).forEach(function(t){RU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function RU(e,t,n){return t=function(e){var t=function(e){if("object"!=NU(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=NU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==NU(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LU(e,t){return IU(IU({},t),e)}function FU(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return n.createElement(s$,r);case"trapezoid":return n.createElement(MU,r);case"sector":return n.createElement(CH,r);case"symbols":if(function(e){return"symbols"===e}(t))return n.createElement(wE,r);break;default:return null}}function BU(e){var t,r=e.option,o=e.shapeType,i=e.propTransformer,a=void 0===i?LU:i,s=e.activeClassName,l=void 0===s?"recharts-active-shape":s,c=e.isActive,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,AU);if((0,n.isValidElement)(r))t=(0,n.cloneElement)(r,IU(IU({},u),function(e){return(0,n.isValidElement)(e)?e.props:e}(r)));else if(Z_(r))t=r(u);else if(yU(r)&&!wU(r)){var d=a(r,u);t=n.createElement(FU,{shapeType:o,elementProps:d})}else{var f=u;t=n.createElement(FU,{shapeType:o,elementProps:f})}return c?n.createElement(Bj,{className:l},t):t}function zU(e,t){return null!=t&&"trapezoids"in e.props}function VU(e,t){return null!=t&&"sectors"in e.props}function HU(e,t){return null!=t&&"points"in e.props}function WU(e,t){var n,r,o=e.x===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,i=e.y===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return o&&i}function $U(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function UU(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function qU(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=function(e,t){var n;return zU(e,t)?n="trapezoids":VU(e,t)?n="sectors":HU(e,t)&&(n="points"),n}(n,t),i=function(e,t){var n,r;return zU(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:VU(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:HU(e,t)?t.payload:{}}(n,t),a=r.filter(function(e,r){var a=WB(i,e),s=n.props[o].filter(function(e){var r=function(e,t){var n;return zU(e,t)?n=WU:VU(e,t)?n=$U:HU(e,t)&&(n=UU),n}(n,t);return r(e,t)}),l=n.props[o].indexOf(s[s.length-1]);return a&&r===l});return r.indexOf(a[a.length-1])}function YU(e){return(YU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KU(){return KU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KU.apply(this,arguments)}function ZU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZU(Object(n),!0).forEach(function(t){tq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nq(r.key),r)}}function JU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JU=function(){return!!e})()}function QU(e){return(QU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eq(e,t){return eq=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eq(e,t)}function tq(e,t,n){return(t=nq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nq(e){var t=function(e){if("object"!=YU(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=YU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==YU(t)?t:t+""}var rq=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),tq(n=function(e,t,n){return t=QU(t),function(e,t){if(t&&("object"===YU(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,JU()?Reflect.construct(t,n||[],QU(e).constructor):t.apply(e,n))}(this,t,[e]),"pieRef",null),tq(n,"sectorRefs",[]),tq(n,"id",rj("recharts-pie-")),tq(n,"handleAnimationEnd",function(){var e=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Z_(e)&&e()}),tq(n,"handleAnimationStart",function(){var e=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Z_(e)&&e()}),n.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eq(e,t)}(t,e),function(e,t,n){return t&&XU(e.prototype,t),n&&XU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.label,i=r.labelLine,a=r.dataKey,s=r.valueKey,l=Pj(this.props,!1),c=Pj(o,!1),u=Pj(i,!1),d=o&&o.offsetRadius||20,f=e.map(function(e,r){var f=(e.startAngle+e.endAngle)/2,p=VV(e.cx,e.cy,e.outerRadius+d,f),h=GU(GU(GU(GU({},l),e),{},{stroke:"none"},c),{},{index:r,textAnchor:t.getTextAnchor(p.x,e.cx)},p),m=GU(GU(GU(GU({},l),e),{},{fill:"none",stroke:e.fill},u),{},{index:r,points:[VV(e.cx,e.cy,e.outerRadius,f),p]}),g=a;return IS(a)&&IS(s)?g="value":IS(a)&&(g=s),n.createElement(Bj,{key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(r)},i&&t.renderLabelLineItem(i,m,"line"),t.renderLabelItem(o,h,uV(e,g)))});return n.createElement(Bj,{className:"recharts-pie-labels"},f)}},{key:"renderSectorsStatically",value:function(e){var t=this,r=this.props,o=r.activeShape,i=r.blendStroke,a=r.inactiveShape;return e.map(function(r,s){if(0===(null==r?void 0:r.startAngle)&&0===(null==r?void 0:r.endAngle)&&1!==e.length)return null;var l=t.isActiveIndex(s),c=a&&t.hasActiveIndex()?a:null,u=l?o:c,d=GU(GU({},r),{},{stroke:i?r.fill:r.stroke,tabIndex:-1});return n.createElement(Bj,KU({ref:function(e){e&&!t.sectorRefs.includes(e)&&t.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},hj(t.props,r,s),{key:"sector-".concat(null==r?void 0:r.startAngle,"-").concat(null==r?void 0:r.endAngle,"-").concat(r.midAngle,"-").concat(s)}),n.createElement(BU,KU({option:u,isActive:l,shapeType:"sector"},d)))})}},{key:"renderSectorsWithAnimation",value:function(){var e=this,t=this.props,r=t.sectors,o=t.isAnimationActive,i=t.animationBegin,a=t.animationDuration,s=t.animationEasing,l=t.animationId,c=this.state,u=c.prevSectors,d=c.prevIsAnimationActive;return n.createElement(XW,{begin:i,duration:a,isActive:o,easing:s,from:{t:0},to:{t:1},key:"pie-".concat(l,"-").concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(t){var o=t.t,i=[],a=(r&&r[0]).startAngle;return r.forEach(function(e,t){var n=u&&u[t],r=t>0?NS(e,"paddingAngle",0):0;if(n){var s=_n(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=GU(GU({},e),{},{startAngle:a+r,endAngle:a+s(o)+r});i.push(l),a=l.endAngle}else{var c=e.endAngle,d=e.startAngle,f=_n(0,c-d)(o),p=GU(GU({},e),{},{startAngle:a+r,endAngle:a+f+r});i.push(p),a=p.endAngle}}),n.createElement(Bj,null,e.renderSectorsStatically(i))})}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&WB(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var e=this,t=this.props,r=t.hide,o=t.sectors,i=t.className,a=t.label,s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.isAnimationActive,f=this.state.isAnimationFinished;if(r||!o||!o.length||!ej(s)||!ej(l)||!ej(c)||!ej(u))return null;var p=de("recharts-pie",i);return n.createElement(Bj,{tabIndex:this.props.rootTabIndex,className:p,ref:function(t){e.pieRef=t}},this.renderSectors(),a&&this.renderLabels(o),QV.renderCallByParent(this.props,null,!1),(!d||f)&&pH.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(e,t,r){if(n.isValidElement(e))return n.cloneElement(e,t);if(Z_(e))return e(t);var o=de("recharts-pie-label-line","boolean"!=typeof e?e.className:"");return n.createElement(RH,KU({},t,{key:r,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(e,t,r){if(n.isValidElement(e))return n.cloneElement(e,t);var o=r;if(Z_(e)&&(o=e(t),n.isValidElement(o)))return o;var i=de("recharts-pie-label-text","boolean"==typeof e||Z_(e)?"":e.className);return n.createElement(BD,KU({},t,{alignmentBaseline:"middle",className:i}),o)}}])}(n.PureComponent);EU=rq,tq(rq,"displayName","Pie"),tq(rq,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!jN.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),tq(rq,"parseDeltaAngle",function(e,t){return JS(t-e)*Math.min(Math.abs(t-e),360)}),tq(rq,"getRealPieData",function(e){var t=e.data,n=e.children,r=Pj(e,!1),o=kj(n,oD);return t&&t.length?t.map(function(e,t){return GU(GU(GU({payload:e},r),e),o&&o[t]&&o[t].props)}):o&&o.length?o.map(function(e){return GU(GU({},r),e.props)}):[]}),tq(rq,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,o=t.width,i=t.height,a=HV(o,i);return{cx:r+oj(e.cx,o,o/2),cy:n+oj(e.cy,i,i/2),innerRadius:oj(e.innerRadius,a,0),outerRadius:oj(e.outerRadius,a,.8*a),maxRadius:e.maxRadius||Math.sqrt(o*o+i*i)/2}}),tq(rq,"getComposedData",function(e){var t=e.item,n=e.offset,r=void 0!==t.type.defaultProps?GU(GU({},t.type.defaultProps),t.props):t.props,o=EU.getRealPieData(r);if(!o||!o.length)return null;var i=r.cornerRadius,a=r.startAngle,s=r.endAngle,l=r.paddingAngle,c=r.dataKey,u=r.nameKey,d=r.valueKey,f=r.tooltipType,p=Math.abs(r.minAngle),h=EU.parseCoordinateOfPie(r,n),m=EU.parseDeltaAngle(a,s),g=Math.abs(m),y=c;IS(c)&&IS(d)?(zj(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),y="value"):IS(c)&&(zj(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),y=d);var v,b,x=o.filter(function(e){return 0!==uV(e,y,0)}).length,w=g-x*p-(g>=360?x:x-1)*l,C=o.reduce(function(e,t){var n=uV(t,y,0);return e+(ej(n)?n:0)},0);return C>0&&(v=o.map(function(e,t){var n,r=uV(e,y,0),o=uV(e,u,t),s=(ej(r)?r:0)/C,c=(n=t?b.endAngle+JS(m)*l*(0!==r?1:0):a)+JS(m)*((0!==r?p:0)+s*w),d=(n+c)/2,g=(h.innerRadius+h.outerRadius)/2,v=[{name:o,value:r,payload:e,dataKey:y,type:f}],x=VV(h.cx,h.cy,g,d);return b=GU(GU(GU({percent:s,cornerRadius:i,name:o,tooltipPayload:v,midAngle:d,middleRadius:g,tooltipPosition:x},e),h),{},{value:uV(e,y),startAngle:n,endAngle:c,payload:e,paddingAngle:JS(m)*l})})),GU(GU({},h),{},{sectors:v,data:o})});var oq=Math.ceil,iq=Math.max,aq=KN,sq=1/0,lq=function(e){return e?(e=aq(e))===sq||e===-sq?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},cq=function(e,t,n,r){for(var o=-1,i=iq(oq((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a},uq=XA,dq=lq;const fq=c(function(e){return function(t,n,r){return r&&"number"!=typeof r&&uq(t,n,r)&&(n=r=void 0),t=dq(t),void 0===n?(n=t,t=0):n=dq(n),r=void 0===r?t<n?1:-1:dq(r),cq(t,n,r,e)}}());function pq(e){return(pq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hq(Object(n),!0).forEach(function(t){gq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gq(e,t,n){return t=function(e){var t=function(e){if("object"!=pq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pq(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yq=["Webkit","Moz","O","ms"];function vq(e){return(vq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bq(){return bq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bq.apply(this,arguments)}function xq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xq(Object(n),!0).forEach(function(t){jq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oq(r.key),r)}}function _q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_q=function(){return!!e})()}function kq(e){return(kq=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Sq(e,t){return Sq=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sq(e,t)}function jq(e,t,n){return(t=Oq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oq(e){var t=function(e){if("object"!=vq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vq(t)?t:t+""}var Eq=function(e){return e.changedTouches&&!!e.changedTouches.length},Pq=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),jq(n=function(e,t,n){return t=kq(t),function(e,t){if(t&&("object"===vq(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_q()?Reflect.construct(t,n||[],kq(e).constructor):t.apply(e,n))}(this,t,[e]),"handleDrag",function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),jq(n,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),jq(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:t,startIndex:o})}),n.detachDragEndListener()}),jq(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),jq(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),jq(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),jq(n,"handleSlideDragStart",function(e){var t=Eq(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sq(e,t)}(t,e),function(e,t,n){return t&&Cq(e.prototype,t),n&&Cq(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var n=e.startX,r=e.endX,o=this.state.scaleValues,i=this.props,a=i.gap,s=i.data.length-1,l=Math.min(n,r),c=Math.max(n,r),u=t.getIndexInRange(o,l),d=t.getIndexInRange(o,c);return{startIndex:u-u%a,endIndex:d===s?s:d-d%a}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,i=uV(n[e],o,e);return Z_(r)?r(i,e):i}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,i=this.props,a=i.x,s=i.width,l=i.travellerWidth,c=i.startIndex,u=i.endIndex,d=i.onChange,f=e.pageX-n;f>0?f=Math.min(f,a+s-l-o,a+s-l-r):f<0&&(f=Math.max(f,a-r,a-o));var p=this.getIndex({startX:r+f,endX:o+f});(p.startIndex!==c||p.endIndex!==u)&&d&&d(p),this.setState({startX:r+f,endX:o+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=Eq(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,o=t.endX,i=t.startX,a=this.state[r],s=this.props,l=s.x,c=s.width,u=s.travellerWidth,d=s.onChange,f=s.gap,p=s.data,h={startX:this.state.startX,endX:this.state.endX},m=e.pageX-n;m>0?m=Math.min(m,l+c-u-a):m<0&&(m=Math.max(m,l-a)),h[r]=a+m;var g=this.getIndex(h),y=g.startIndex,v=g.endIndex;this.setState(jq(jq({},r,a+m),"brushMoveStartX",e.pageX),function(){var e;d&&(e=p.length-1,"startX"===r&&(o>i?y%f===0:v%f===0)||o<i&&v===e||"endX"===r&&(o>i?v%f===0:y%f===0)||o>i&&v===e)&&d(g)})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,i=r.startX,a=r.endX,s=this.state[t],l=o.indexOf(s);if(-1!==l){var c=l+e;if(!(-1===c||c>=o.length)){var u=o[c];"startX"===t&&u>=a||"endX"===t&&u<=i||this.setState(jq({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,r=e.y,o=e.width,i=e.height,a=e.fill,s=e.stroke;return n.createElement("rect",{stroke:s,fill:a,x:t,y:r,width:o,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,r=e.y,o=e.width,i=e.height,a=e.data,s=e.children,l=e.padding,c=n.Children.only(s);return c?n.cloneElement(c,{x:t,y:r,width:o,height:i,margin:l,compact:!0,data:a}):null}},{key:"renderTravellerLayer",value:function(e,r){var o,i,a=this,s=this.props,l=s.y,c=s.travellerWidth,u=s.height,d=s.traveller,f=s.ariaLabel,p=s.data,h=s.startIndex,m=s.endIndex,g=Math.max(e,this.props.x),y=wq(wq({},Pj(this.props,!1)),{},{x:g,y:l,width:c,height:u}),v=f||"Min value: ".concat(null===(o=p[h])||void 0===o?void 0:o.name,", Max value: ").concat(null===(i=p[m])||void 0===i?void 0:i.name);return n.createElement(Bj,{tabIndex:0,role:"slider","aria-label":v,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),a.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,r))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,y))}},{key:"renderSlide",value:function(e,t){var r=this.props,o=r.y,i=r.height,a=r.stroke,s=r.travellerWidth,l=Math.min(e,t)+s,c=Math.max(Math.abs(t-e)-s,0);return n.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:a,fillOpacity:.2,x:l,y:o,width:c,height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,r=e.endIndex,o=e.y,i=e.height,a=e.travellerWidth,s=e.stroke,l=this.state,c=l.startX,u=l.endX,d={pointerEvents:"none",fill:s};return n.createElement(Bj,{className:"recharts-brush-texts"},n.createElement(BD,bq({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,u)-5,y:o+i/2},d),this.getTextOfTick(t)),n.createElement(BD,bq({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,u)+a+5,y:o+i/2},d),this.getTextOfTick(r)))}},{key:"render",value:function(){var e=this.props,t=e.data,r=e.className,o=e.children,i=e.x,a=e.y,s=e.width,l=e.height,c=e.alwaysShowText,u=this.state,d=u.startX,f=u.endX,p=u.isTextActive,h=u.isSlideMoving,m=u.isTravellerMoving,g=u.isTravellerFocused;if(!t||!t.length||!ej(i)||!ej(a)||!ej(s)||!ej(l)||s<=0||l<=0)return null;var y=de("recharts-brush",r),v=1===n.Children.count(o),b=function(e,t){var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=yq.reduce(function(e,r){return mq(mq({},e),{},gq({},r+n,t))},{});return r[e]=t,r}("userSelect","none");return n.createElement(Bj,{className:y,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),v&&this.renderPanorama(),this.renderSlide(d,f),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(f,"endX"),(p||h||m||g||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(e){var t=e.x,r=e.y,o=e.width,i=e.height,a=e.stroke,s=Math.floor(r+i/2)-1;return n.createElement(n.Fragment,null,n.createElement("rect",{x:t,y:r,width:o,height:i,fill:a,stroke:"none"}),n.createElement("line",{x1:t+1,y1:s,x2:t+o-1,y2:s,fill:"none",stroke:"#fff"}),n.createElement("line",{x1:t+1,y1:s+2,x2:t+o-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,r){return n.isValidElement(e)?n.cloneElement(e,r):Z_(e)?e(r):t.renderDefaultTraveller(r)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,i=e.travellerWidth,a=e.updateId,s=e.startIndex,l=e.endIndex;if(n!==t.prevData||a!==t.prevUpdateId)return wq({prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,o=e.x,i=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,l=hI().domain(fq(0,s)).range([o,o+i-a]),c=l.domain().map(function(e){return l(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(r),scale:l,scaleValues:c}}({data:n,width:r,x:o,travellerWidth:i,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||i!==t.prevTravellerWidth)){t.scale.range([o,o+r-i]);var c=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var o=Math.floor((n+r)/2);e[o]>t?r=o:n=o}return t>=e[r]?r:n}}])}(n.PureComponent);jq(Pq,"displayName","Brush"),jq(Pq,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Tq=vA,Mq=KE,Aq=MM,Nq=function(e,t){var n;return Tq(e,function(e,r,o){return!(n=t(e,r,o))}),!!n},Dq=v_,Iq=XA,Rq=function(e,t,n){var r=Dq(e)?Mq:Nq;return n&&Iq(e,t,n)&&(t=void 0),r(e,Aq(t))};const Lq=c(Rq);var Fq=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},Bq=LA,zq=function(e,t,n){"__proto__"==t&&Bq?Bq(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Vq=gA,Hq=MM,Wq=function(e,t){var n={};return t=Hq(t),Vq(e,function(e,r,o){zq(n,r,t(e,r,o))}),n};const $q=c(Wq);var Uq=vA,qq=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},Yq=function(e,t){var n=!0;return Uq(e,function(e,r,o){return n=!!t(e,r,o)}),n},Kq=MM,Zq=v_,Gq=XA,Xq=function(e,t,n){var r=Zq(e)?qq:Yq;return n&&Gq(e,t,n)&&(t=void 0),r(e,Kq(t))};const Jq=c(Xq);var Qq=["x","y"];function eY(e){return(eY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tY(){return tY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tY.apply(this,arguments)}function nY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nY(Object(n),!0).forEach(function(t){oY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oY(e,t,n){return t=function(e){var t=function(e){if("object"!=eY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=eY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eY(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iY(e,t){var n=e.x,r=e.y,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Qq),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),f=parseInt(d,10);return rY(rY(rY(rY(rY({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function aY(e){return n.createElement(BU,tY({shapeType:"rectangle",propTransformer:iY,activeClassName:"recharts-active-bar"},e))}var sY,lY=["value","background"];function cY(e){return(cY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uY(){return uY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uY.apply(this,arguments)}function dY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dY(Object(n),!0).forEach(function(t){yY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vY(r.key),r)}}function hY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hY=function(){return!!e})()}function mY(e){return(mY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gY(e,t){return gY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gY(e,t)}function yY(e,t,n){return(t=vY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vY(e){var t=function(e){if("object"!=cY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cY(t)?t:t+""}var bY=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return yY(e=function(e,t,n){return t=mY(t),function(e,t){if(t&&("object"===cY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hY()?Reflect.construct(t,n||[],mY(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!1}),yY(e,"id",rj("recharts-bar-")),yY(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),yY(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gY(e,t)}(t,e),function(e,t,n){return t&&pY(e.prototype,t),n&&pY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderRectanglesStatically",value:function(e){var t=this,r=this.props,o=r.shape,i=r.dataKey,a=r.activeIndex,s=r.activeBar,l=Pj(this.props,!1);return e&&e.map(function(e,r){var c=r===a,u=c?s:o,d=fY(fY(fY({},l),e),{},{isActive:c,option:u,index:r,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return n.createElement(Bj,uY({className:"recharts-bar-rectangle"},hj(t.props,e,r),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value)}),n.createElement(aY,d))})}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,r=t.data,o=t.layout,i=t.isAnimationActive,a=t.animationBegin,s=t.animationDuration,l=t.animationEasing,c=t.animationId,u=this.state.prevData;return n.createElement(XW,{begin:a,duration:s,isActive:i,easing:l,from:{t:0},to:{t:1},key:"bar-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,a=r.map(function(e,t){var n=u&&u[t];if(n){var r=_n(n.x,e.x),a=_n(n.y,e.y),s=_n(n.width,e.width),l=_n(n.height,e.height);return fY(fY({},e),{},{x:r(i),y:a(i),width:s(i),height:l(i)})}if("horizontal"===o){var c=_n(0,e.height)(i);return fY(fY({},e),{},{y:e.y+e.height-c,height:c})}var d=_n(0,e.width)(i);return fY(fY({},e),{},{width:d})});return n.createElement(Bj,null,e.renderRectanglesStatically(a))})}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&WB(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,r=t.data,o=t.dataKey,i=t.activeIndex,a=Pj(this.props.background,!1);return r.map(function(t,r){t.value;var s=t.background,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,lY);if(!s)return null;var c=fY(fY(fY(fY(fY({},l),{},{fill:"#eee"},s),a),hj(e.props,t,r)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:o,index:r,className:"recharts-bar-background-rectangle"});return n.createElement(aY,uY({key:"background-bar-".concat(r),option:e.props.background,isActive:r===i},c))})}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.data,i=r.xAxis,a=r.yAxis,s=r.layout,l=kj(r.children,Jz);if(!l)return null;var c="vertical"===s?o[0].height/2:o[0].width/2,u=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:uV(e,t)}},d={clipPath:e?"url(#clipPath-".concat(t,")"):null};return n.createElement(Bj,d,l.map(function(e){return n.cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:o,xAxis:i,yAxis:a,layout:s,offset:c,dataPointFormatter:u})}))}},{key:"render",value:function(){var e=this.props,t=e.hide,r=e.data,o=e.className,i=e.xAxis,a=e.yAxis,s=e.left,l=e.top,c=e.width,u=e.height,d=e.isAnimationActive,f=e.background,p=e.id;if(t||!r||!r.length)return null;var h=this.state.isAnimationFinished,m=de("recharts-bar",o),g=i&&i.allowDataOverflow,y=a&&a.allowDataOverflow,v=g||y,b=IS(p)?this.id:p;return n.createElement(Bj,{className:m},g||y?n.createElement("defs",null,n.createElement("clipPath",{id:"clipPath-".concat(b)},n.createElement("rect",{x:g?s:s-c/2,y:y?l:l-u/2,width:g?c:2*c,height:y?u:2*u}))):null,n.createElement(Bj,{className:"recharts-bar-rectangles",clipPath:v?"url(#clipPath-".concat(b,")"):null},f?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(v,b),(!d||h)&&pH.renderCallByParent(this.props,r))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}])}(n.PureComponent);function xY(e){return(xY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SY(r.key),r)}}function CY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CY(Object(n),!0).forEach(function(t){kY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kY(e,t,n){return(t=SY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SY(e){var t=function(e){if("object"!=xY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xY(t)?t:t+""}sY=bY,yY(bY,"displayName","Bar"),yY(bY,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!jN.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),yY(bY,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,i=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null}(r,n);if(!p)return null;var h=t.layout,m=n.type.defaultProps,g=void 0!==m?fY(fY({},m),n.props):n.props,y=g.dataKey,v=g.children,b=g.minPointSize,x="horizontal"===h?a:i,w=c?x.scale.domain():null,C=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]}({numericAxis:x}),_=kj(v,oD),k=d.map(function(e,t){var r,d,f,m,g,v;c?r=function(e,t){if(!t||2!==t.length||!ej(t[0])||!ej(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!ej(e[0])||e[0]<n)&&(o[0]=n),(!ej(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o}(c[u+t],w):(r=uV(e,y),Array.isArray(r)||(r=[C,r]));var x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n,r){if("number"==typeof e)return e;var o="number"==typeof n;return o?e(n,r):(o||Hz(),t)}}(b,sY.defaultProps.minPointSize)(r[1],t);if("horizontal"===h){var k,S=[a.scale(r[0]),a.scale(r[1])],j=S[0],O=S[1];d=jV({axis:i,ticks:s,bandSize:o,offset:p.offset,entry:e,index:t}),f=null!==(k=O??j)&&void 0!==k?k:void 0,m=p.size;var E=j-O;if(g=Number.isNaN(E)?0:E,v={x:d,y:a.y,width:m,height:a.height},Math.abs(x)>0&&Math.abs(g)<Math.abs(x)){var P=JS(g||x)*(Math.abs(x)-Math.abs(g));f-=P,g+=P}}else{var T=[i.scale(r[0]),i.scale(r[1])],M=T[0],A=T[1];d=M,f=jV({axis:a,ticks:l,bandSize:o,offset:p.offset,entry:e,index:t}),m=A-M,g=p.size,v={x:i.x,y:f,width:i.width,height:g},Math.abs(x)>0&&Math.abs(m)<Math.abs(x)&&(m+=JS(m||x)*(Math.abs(x)-Math.abs(m)))}return fY(fY(fY({},e),{},{x:d,y:f,width:m,height:g,value:c?r:r[1],payload:e,background:v},_&&_[t]&&_[t].props),{},{tooltipPayload:[NV(n,e)],tooltipPosition:{x:d+m/2,y:f+g/2}})});return fY({data:k,layout:h},f)});var jY=function(e,t,n,r,o){var i=e.width,a=e.height,s=e.layout,l=e.children,c=Object.keys(t),u={left:n.left,leftMirror:n.left,right:i-n.right,rightMirror:i-n.right,top:n.top,topMirror:n.top,bottom:a-n.bottom,bottomMirror:a-n.bottom},d=!!Sj(l,bY);return c.reduce(function(i,a){var l,c,f,p,h,m=t[a],g=m.orientation,y=m.domain,v=m.padding,b=void 0===v?{}:v,x=m.mirror,w=m.reversed,C="".concat(g).concat(x?"Mirror":"");if("number"===m.type&&("gap"===m.padding||"no-gap"===m.padding)){var _=y[1]-y[0],k=1/0,S=m.categoricalDomain.sort();if(S.forEach(function(e,t){t>0&&(k=Math.min((e||0)-(S[t-1]||0),k))}),Number.isFinite(k)){var j=k/_,O="vertical"===m.layout?n.height:n.width;if("gap"===m.padding&&(l=j*O/2),"no-gap"===m.padding){var E=oj(e.barCategoryGap,j*O),P=j*O/2;l=P-E-(P-E)/O*E}}}c="xAxis"===r?[n.left+(b.left||0)+(l||0),n.left+n.width-(b.right||0)-(l||0)]:"yAxis"===r?"horizontal"===s?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(l||0),n.top+n.height-(b.bottom||0)-(l||0)]:m.range,w&&(c=[c[1],c[0]]);var T=bV(m,o,d),M=T.scale,A=T.realScaleType;M.domain(y).range(c),wV(M);var N=kV(M,_Y(_Y({},m),{},{realScaleType:A}));"xAxis"===r?(h="top"===g&&!x||"bottom"===g&&x,f=n.left,p=u[C]-h*m.height):"yAxis"===r&&(h="left"===g&&!x||"right"===g&&x,f=u[C]-h*m.width,p=n.top);var D=_Y(_Y(_Y({},m),N),{},{realScaleType:A,x:f,y:p,scale:M,width:"xAxis"===r?n.width:m.width,height:"yAxis"===r?n.height:m.height});return D.bandSize=MV(D,N),m.hide||"xAxis"!==r?m.hide||(u[C]+=(h?-1:1)*D.width):u[C]+=(h?-1:1)*D.height,_Y(_Y({},i),{},kY({},a,D))},{})},OY=function(e,t){var n=e.x,r=e.y,o=t.x,i=t.y;return{x:Math.min(n,o),y:Math.min(r,i),width:Math.abs(o-n),height:Math.abs(i-r)}},EY=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.scale=t}return function(e,t,n){return t&&wY(e.prototype,t),n&&wY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],[{key:"create",value:function(t){return new e(t)}}])}();kY(EY,"EPS",1e-4);var PY=function(e){var t=Object.keys(e).reduce(function(t,n){return _Y(_Y({},t),{},kY({},n,EY.create(e[n])))},{});return _Y(_Y({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,o=n.position;return $q(e,function(e,n){return t[n].apply(e,{bandAware:r,position:o})})},isInRange:function(e){return Jq(e,function(e,n){return t[n].isInRange(e)})}})},TY=MM,MY=rT,AY=sT,NY=lq,DY=AM,IY=MM,RY=function(e){var t=NY(e),n=t%1;return t==t?n?t-n:t:0},LY=Math.max;var FY=sS(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),BY=(0,n.createContext)(void 0),zY=(0,n.createContext)(void 0),VY=(0,n.createContext)(void 0),HY=(0,n.createContext)({}),WY=(0,n.createContext)(void 0),$Y=(0,n.createContext)(0),UY=(0,n.createContext)(0),qY=function(e){var t=e.state,r=t.xAxisMap,o=t.yAxisMap,i=t.offset,a=e.clipPathId,s=e.children,l=e.width,c=e.height,u=FY(i);return n.createElement(BY.Provider,{value:r},n.createElement(zY.Provider,{value:o},n.createElement(HY.Provider,{value:i},n.createElement(VY.Provider,{value:u},n.createElement(WY.Provider,{value:a},n.createElement($Y.Provider,{value:c},n.createElement(UY.Provider,{value:l},s)))))))},YY=function(e){var t=(0,n.useContext)(BY);null==t&&Hz();var r=t[e];return null==r&&Hz(),r},KY=function(e){var t=(0,n.useContext)(zY);null==t&&Hz();var r=t[e];return null==r&&Hz(),r},ZY=function(){return(0,n.useContext)(UY)},GY=function(){return(0,n.useContext)($Y)};function XY(e){return(XY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JY=function(){return!!e})()}function QY(e){return(QY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eK(e,t){return eK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eK(e,t)}function tK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tK(Object(n),!0).forEach(function(t){rK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rK(e,t,n){return(t=oK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oK(e){var t=function(e){if("object"!=XY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=XY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==XY(t)?t:t+""}function iK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aK(){return aK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aK.apply(this,arguments)}function sK(e){var t=e.x,r=e.y,o=e.segment,i=e.xAxisId,a=e.yAxisId,s=e.shape,l=e.className,c=e.alwaysShow,u=(0,n.useContext)(WY),d=YY(i),f=KY(a),p=(0,n.useContext)(VY);if(!u||!p)return null;zj(void 0===c,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=function(e,t,n,r,o,i,a,s,l){var c=o.x,u=o.y,d=o.width,f=o.height;if(n){var p=l.y,h=e.y.apply(p,{position:i});if(Fq(l,"discard")&&!e.y.isInRange(h))return null;var m=[{x:c+d,y:h},{x:c,y:h}];return"left"===s?m.reverse():m}if(t){var g=l.x,y=e.x.apply(g,{position:i});if(Fq(l,"discard")&&!e.x.isInRange(y))return null;var v=[{x:y,y:u+f},{x:y,y:u}];return"top"===a?v.reverse():v}if(r){var b=l.segment.map(function(t){return e.apply(t,{position:i})});return Fq(l,"discard")&&Lq(b,function(t){return!e.isInRange(t)})?null:b}return null}(PY({x:d.scale,y:f.scale}),tj(t),tj(r),o&&2===o.length,p,e.position,d.orientation,f.orientation,e);if(!h)return null;var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return iK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iK(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(h,2),g=m[0],y=g.x,v=g.y,b=m[1],x=b.x,w=b.y,C=nK(nK({clipPath:Fq(e,"hidden")?"url(#".concat(u,")"):void 0},Pj(e,!0)),{},{x1:y,y1:v,x2:x,y2:w});return n.createElement(Bj,{className:de("recharts-reference-line",l)},function(e,t){return n.isValidElement(e)?n.cloneElement(e,t):Z_(e)?e(t):n.createElement("line",aK({},t,{className:"recharts-reference-line-line"}))}(s,C),QV.renderCallByParent(e,function(e){return OY({x:e.x1,y:e.y1},{x:e.x2,y:e.y2})}({x1:y,y1:v,x2:x,y2:w})))}var lK=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=QY(t),function(e,t){if(t&&("object"===XY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,JY()?Reflect.construct(t,n||[],QY(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eK(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oK(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return n.createElement(sK,this.props)}}])}(n.Component);function cK(){return cK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cK.apply(this,arguments)}function uK(e){return(uK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dK(Object(n),!0).forEach(function(t){gK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pK=function(){return!!e})()}function hK(e){return(hK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mK(e,t){return mK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mK(e,t)}function gK(e,t,n){return(t=yK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yK(e){var t=function(e){if("object"!=uK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=uK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==uK(t)?t:t+""}rK(lK,"displayName","ReferenceLine"),rK(lK,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var vK=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=hK(t),function(e,t){if(t&&("object"===uK(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pK()?Reflect.construct(t,n||[],hK(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mK(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yK(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,r=e.x,o=e.y,i=e.r,a=e.alwaysShow,s=e.clipPathId,l=tj(r),c=tj(o);if(zj(void 0===a,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!l||!c)return null;var u=function(e){var t=e.x,n=e.y,r=e.xAxis,o=e.yAxis,i=PY({x:r.scale,y:o.scale}),a=i.apply({x:t,y:n},{bandAware:!0});return Fq(e,"discard")&&!i.isInRange(a)?null:a}(this.props);if(!u)return null;var d=u.x,f=u.y,p=this.props,h=p.shape,m=p.className,g=fK(fK({clipPath:Fq(this.props,"hidden")?"url(#".concat(s,")"):void 0},Pj(this.props,!0)),{},{cx:d,cy:f});return n.createElement(Bj,{className:de("recharts-reference-dot",m)},t.renderDot(h,g),QV.renderCallByParent(this.props,{x:d-i,y:f-i,width:2*i,height:2*i}))}}])}(n.Component);function bK(){return bK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bK.apply(this,arguments)}function xK(e){return(xK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wK(Object(n),!0).forEach(function(t){jK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_K=function(){return!!e})()}function kK(e){return(kK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function SK(e,t){return SK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},SK(e,t)}function jK(e,t,n){return(t=OK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OK(e){var t=function(e){if("object"!=xK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xK(t)?t:t+""}gK(vK,"displayName","ReferenceDot"),gK(vK,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),gK(vK,"renderDot",function(e,t){return n.isValidElement(e)?n.cloneElement(e,t):Z_(e)?e(t):n.createElement(g$,cK({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))});var EK=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=kK(t),function(e,t){if(t&&("object"===xK(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_K()?Reflect.construct(t,n||[],kK(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SK(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OK(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,r=e.x1,o=e.x2,i=e.y1,a=e.y2,s=e.className,l=e.alwaysShow,c=e.clipPathId;zj(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=tj(r),d=tj(o),f=tj(i),p=tj(a),h=this.props.shape;if(!(u||d||f||p||h))return null;var m=function(e,t,n,r,o){var i=o.x1,a=o.x2,s=o.y1,l=o.y2,c=o.xAxis,u=o.yAxis;if(!c||!u)return null;var d=PY({x:c.scale,y:u.scale}),f={x:e?d.x.apply(i,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(s,{position:"start"}):d.y.rangeMin},p={x:t?d.x.apply(a,{position:"end"}):d.x.rangeMax,y:r?d.y.apply(l,{position:"end"}):d.y.rangeMax};return!Fq(o,"discard")||d.isInRange(f)&&d.isInRange(p)?OY(f,p):null}(u,d,f,p,this.props);if(!m&&!h)return null;var g=Fq(this.props,"hidden")?"url(#".concat(c,")"):void 0;return n.createElement(Bj,{className:de("recharts-reference-area",s)},t.renderRect(h,CK(CK({clipPath:g},Pj(this.props,!0)),m)),QV.renderCallByParent(this.props,m))}}])}(n.Component);function PK(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],o=0;o<e.length;o+=t)r.push(e[o]);return r}function TK(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function MK(e){return(MK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AK(Object(n),!0).forEach(function(t){DK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DK(e,t,n){return t=function(e){var t=function(e){if("object"!=MK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=MK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==MK(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IK(e,t,n){var r=e.tick,o=e.ticks,i=e.viewBox,a=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,d=e.angle;if(!o||!o.length||!r)return[];if(ej(l)||jN.isSsr)return function(e,t){return PK(e,t+1)}(o,"number"==typeof l&&ej(l)?l:0);var f=[],p="top"===s||"bottom"===s?"width":"height",h=u&&"width"===p?fD(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(e,r){var o=Z_(c)?c(e.value,r):e.value;return"width"===p?function(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=r*Math.PI/180,i=Math.atan(n/t),a=o>i&&o<Math.PI-i?n/Math.sin(o):t/Math.cos(o);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}(fD(o,{fontSize:t,letterSpacing:n}),h,d):fD(o,{fontSize:t,letterSpacing:n})[p]},g=o.length>=2?JS(o[1].coordinate-o[0].coordinate):1,y=function(e,t,n){var r="width"===n,o=e.x,i=e.y,a=e.width,s=e.height;return 1===t?{start:r?o:i,end:r?o+a:i+s}:{start:r?o+a:i+s,end:r?o:i}}(i,g,p);return"equidistantPreserveStart"===l?function(e,t,n,r,o){for(var i,a=(r||[]).slice(),s=t.start,l=t.end,c=0,u=1,d=s,f=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:PK(r,u)};var i,a=c,f=function(){return void 0===i&&(i=n(t,a)),i},p=t.coordinate,h=0===c||TK(e,p,f,d,l);h||(c=0,d=s,u+=1),h&&(d=p+e*(f()/2+o),c+=u)};u<=a.length;)if(i=f())return i.v;return[]}(g,y,m,o,a):(f="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=NK(NK({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),TK(e,u.tickCoord,function(){return d},l,c)&&(c=u.tickCoord-e*(d/2+o),a[s-1]=NK(NK({},u),{},{isShow:!0}))}for(var p=i?s-1:s,h=function(t){var r,i=a[t],s=function(){return void 0===r&&(r=n(i,t)),r};if(0===t){var u=e*(i.coordinate-e*s()/2-l);a[t]=i=NK(NK({},i),{},{tickCoord:u<0?i.coordinate-u*e:i.coordinate})}else a[t]=i=NK(NK({},i),{},{tickCoord:i.coordinate});TK(e,i.tickCoord,s,l,c)&&(l=i.tickCoord+e*(s()/2+o),a[t]=NK(NK({},i),{},{isShow:!0}))},m=0;m<p;m++)h(m);return a}(g,y,m,o,a,"preserveStartEnd"===l):function(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,s=t.start,l=t.end,c=function(t){var r,c=i[t],u=function(){return void 0===r&&(r=n(c,t)),r};if(t===a-1){var d=e*(c.coordinate+e*u()/2-l);i[t]=c=NK(NK({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate})}else i[t]=c=NK(NK({},c),{},{tickCoord:c.coordinate});TK(e,c.tickCoord,u,s,l)&&(l=c.tickCoord-e*(u()/2+o),i[t]=NK(NK({},c),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}(g,y,m,o,a),f.filter(function(e){return e.isShow}))}jK(EK,"displayName","ReferenceArea"),jK(EK,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),jK(EK,"renderRect",function(e,t){return n.isValidElement(e)?n.cloneElement(e,t):Z_(e)?e(t):n.createElement(s$,bK({},t,{className:"recharts-reference-area-rect"}))});var RK=["viewBox"],LK=["viewBox"],FK=["ticks"];function BK(e){return(BK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zK(){return zK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zK.apply(this,arguments)}function VK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VK(Object(n),!0).forEach(function(t){KK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WK(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function $K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ZK(r.key),r)}}function UK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UK=function(){return!!e})()}function qK(e){return(qK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function YK(e,t){return YK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},YK(e,t)}function KK(e,t,n){return(t=ZK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZK(e){var t=function(e){if("object"!=BK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=BK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==BK(t)?t:t+""}var GK=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=qK(t),function(e,t){if(t&&("object"===BK(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,UK()?Reflect.construct(t,n||[],qK(e).constructor):t.apply(e,n))}(this,t,[e])).state={fontSize:"",letterSpacing:""},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YK(e,t)}(t,e),function(e,t,n){return t&&$K(e.prototype,t),n&&$K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=WK(e,RK),o=this.props,i=o.viewBox,a=WK(o,LK);return!sj(n,i)||!sj(r,a)||!sj(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,o,i,a,s=this.props,l=s.x,c=s.y,u=s.width,d=s.height,f=s.orientation,p=s.tickSize,h=s.mirror,m=s.tickMargin,g=h?-1:1,y=e.tickSize||p,v=ej(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=n=e.coordinate,a=(r=(o=c+ +!h*d)-g*y)-g*m,i=v;break;case"left":r=o=e.coordinate,i=(t=(n=l+ +!h*u)-g*y)-g*m,a=v;break;case"right":r=o=e.coordinate,i=(t=(n=l+ +h*u)+g*y)+g*m,a=v;break;default:t=n=e.coordinate,a=(r=(o=c+ +h*d)+g*y)+g*m,i=v}return{line:{x1:t,y1:r,x2:n,y2:o},tick:{x:i,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,r=e.y,o=e.width,i=e.height,a=e.orientation,s=e.mirror,l=e.axisLine,c=HK(HK(HK({},Pj(this.props,!1)),Pj(l,!1)),{},{fill:"none"});if("top"===a||"bottom"===a){var u=+("top"===a&&!s||"bottom"===a&&s);c=HK(HK({},c),{},{x1:t,y1:r+u*i,x2:t+o,y2:r+u*i})}else{var d=+("left"===a&&!s||"right"===a&&s);c=HK(HK({},c),{},{x1:t+d*o,y1:r,x2:t+d*o,y2:r+i})}return n.createElement("line",zK({},c,{className:de("recharts-cartesian-axis-line",NS(l,"className"))}))}},{key:"renderTicks",value:function(e,r,o){var i=this,a=this.props,s=a.tickLine,l=a.stroke,c=a.tick,u=a.tickFormatter,d=a.unit,f=IK(HK(HK({},this.props),{},{ticks:e}),r,o),p=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),m=Pj(this.props,!1),g=Pj(c,!1),y=HK(HK({},m),{},{fill:"none"},Pj(s,!1)),v=f.map(function(e,r){var o=i.getTickLineCoord(e),a=o.line,v=o.tick,b=HK(HK(HK(HK({textAnchor:p,verticalAnchor:h},m),{},{stroke:"none",fill:l},g),v),{},{index:r,payload:e,visibleTicksCount:f.length,tickFormatter:u});return n.createElement(Bj,zK({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},hj(i.props,e,r)),s&&n.createElement("line",zK({},y,a,{className:de("recharts-cartesian-axis-tick-line",NS(s,"className"))})),c&&t.renderTickItem(c,b,"".concat(Z_(u)?u(e.value,r):e.value).concat(d||"")))});return n.createElement("g",{className:"recharts-cartesian-axis-ticks"},v)}},{key:"render",value:function(){var e=this,t=this.props,r=t.axisLine,o=t.width,i=t.height,a=t.ticksGenerator,s=t.className;if(t.hide)return null;var l=this.props,c=l.ticks,u=WK(l,FK),d=c;return Z_(a)&&(d=c&&c.length>0?a(this.props):a(u)),o<=0||i<=0||!d||!d.length?null:n.createElement(Bj,{className:de("recharts-cartesian-axis",s),ref:function(t){e.layerReference=t}},r&&this.renderAxisLine(),this.renderTicks(d,this.state.fontSize,this.state.letterSpacing),QV.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(e,t,r){return n.isValidElement(e)?n.cloneElement(e,t):Z_(e)?e(t):n.createElement(BD,zK({},t,{className:"recharts-cartesian-axis-tick-value"}),r)}}])}(n.Component);KK(GK,"displayName","CartesianAxis"),KK(GK,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var XK=["type","layout","connectNulls","ref"],JK=["key"];function QK(e){return(QK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eZ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tZ(){return tZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tZ.apply(this,arguments)}function nZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nZ(Object(n),!0).forEach(function(t){uZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oZ(e){return function(e){if(Array.isArray(e))return iZ(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return iZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iZ(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dZ(r.key),r)}}function sZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sZ=function(){return!!e})()}function lZ(e){return(lZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cZ(e,t){return cZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cZ(e,t)}function uZ(e,t,n){return(t=dZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dZ(e){var t=function(e){if("object"!=QK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=QK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==QK(t)?t:t+""}var fZ=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return uZ(e=function(e,t,n){return t=lZ(t),function(e,t){if(t&&("object"===QK(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sZ()?Reflect.construct(t,n||[],lZ(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!0,totalLength:0}),uZ(e,"generateSimpleStrokeDasharray",function(e,t){return"".concat(t,"px ").concat(e-t,"px")}),uZ(e,"getStrokeDasharray",function(n,r,o){var i=o.reduce(function(e,t){return e+t});if(!i)return e.generateSimpleStrokeDasharray(r,n);for(var a=Math.floor(n/i),s=n%i,l=r-n,c=[],u=0,d=0;u<o.length;d+=o[u],++u)if(d+o[u]>s){c=[].concat(oZ(o.slice(0,u)),[s-d]);break}var f=c.length%2==0?[0,l]:[l];return[].concat(oZ(t.repeat(o,a)),oZ(c),f).map(function(e){return"".concat(e,"px")}).join(", ")}),uZ(e,"id",rj("recharts-line-")),uZ(e,"pathRef",function(t){e.mainCurve=t}),uZ(e,"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),uZ(e,"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cZ(e,t)}(t,e),function(e,t,n){return t&&aZ(e.prototype,t),n&&aZ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.points,i=r.xAxis,a=r.yAxis,s=r.layout,l=kj(r.children,Jz);if(!l)return null;var c=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:uV(e.payload,t)}},u={clipPath:e?"url(#clipPath-".concat(t,")"):null};return n.createElement(Bj,u,l.map(function(e){return n.cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:o,xAxis:i,yAxis:a,layout:s,dataPointFormatter:c})}))}},{key:"renderDots",value:function(e,r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.dot,s=i.points,l=i.dataKey,c=Pj(this.props,!1),u=Pj(a,!0),d=s.map(function(e,n){var r=rZ(rZ(rZ({key:"dot-".concat(n),r:3},c),u),{},{value:e.value,dataKey:l,cx:e.x,cy:e.y,index:n,payload:e.payload});return t.renderDotItem(a,r)}),f={clipPath:e?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return n.createElement(Bj,tZ({className:"recharts-line-dots",key:"dots"},f),d)}},{key:"renderCurveStatically",value:function(e,t,r,o){var i=this.props,a=i.type,s=i.layout,l=i.connectNulls;i.ref;var c=eZ(i,XK),u=rZ(rZ(rZ({},Pj(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(r,")"):null,points:e},o),{},{type:a,layout:s,connectNulls:l});return n.createElement(RH,tZ({},u,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var r=this,o=this.props,i=o.points,a=o.strokeDasharray,s=o.isAnimationActive,l=o.animationBegin,c=o.animationDuration,u=o.animationEasing,d=o.animationId,f=o.animateNewValues,p=o.width,h=o.height,m=this.state,g=m.prevPoints,y=m.totalLength;return n.createElement(XW,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(n){var o=n.t;if(g){var s=g.length/i.length,l=i.map(function(e,t){var n=Math.floor(t*s);if(g[n]){var r=g[n],i=_n(r.x,e.x),a=_n(r.y,e.y);return rZ(rZ({},e),{},{x:i(o),y:a(o)})}if(f){var l=_n(2*p,e.x),c=_n(h/2,e.y);return rZ(rZ({},e),{},{x:l(o),y:c(o)})}return rZ(rZ({},e),{},{x:e.x,y:e.y})});return r.renderCurveStatically(l,e,t)}var c,u=_n(0,y)(o);if(a){var d="".concat(a).split(/[,\s]+/gim).map(function(e){return parseFloat(e)});c=r.getStrokeDasharray(u,y,d)}else c=r.generateSimpleStrokeDasharray(y,u);return r.renderCurveStatically(i,e,t,{strokeDasharray:c})})}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,o=n.isAnimationActive,i=this.state,a=i.prevPoints,s=i.totalLength;return o&&r&&r.length&&(!a&&s>0||!WB(a,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,o=t.dot,i=t.points,a=t.className,s=t.xAxis,l=t.yAxis,c=t.top,u=t.left,d=t.width,f=t.height,p=t.isAnimationActive,h=t.id;if(r||!i||!i.length)return null;var m=this.state.isAnimationFinished,g=1===i.length,y=de("recharts-line",a),v=s&&s.allowDataOverflow,b=l&&l.allowDataOverflow,x=v||b,w=IS(h)?this.id:h,C=null!==(e=Pj(o,!1))&&void 0!==e?e:{r:3,strokeWidth:2},_=C.r,k=void 0===_?3:_,S=C.strokeWidth,j=void 0===S?2:S,O=(Ej(o)?o:{}).clipDot,E=void 0===O||O,P=2*k+j;return n.createElement(Bj,{className:y},v||b?n.createElement("defs",null,n.createElement("clipPath",{id:"clipPath-".concat(w)},n.createElement("rect",{x:v?u:u-d/2,y:b?c:c-f/2,width:v?d:2*d,height:b?f:2*f})),!E&&n.createElement("clipPath",{id:"clipPath-dots-".concat(w)},n.createElement("rect",{x:u-P/2,y:c-P/2,width:d+P,height:f+P}))):null,!g&&this.renderCurve(x,w),this.renderErrorBar(x,w),(g||o)&&this.renderDots(x,E,w),(!p||m)&&pH.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(oZ(e),[0]):e,r=[],o=0;o<t;++o)r=[].concat(oZ(r),oZ(n));return r}},{key:"renderDotItem",value:function(e,t){var r;if(n.isValidElement(e))r=n.cloneElement(e,t);else if(Z_(e))r=e(t);else{var o=t.key,i=eZ(t,JK),a=de("recharts-line-dot","boolean"!=typeof e?e.className:"");r=n.createElement(g$,tZ({key:o},i,{className:a}))}return r}}])}(n.PureComponent);uZ(fZ,"displayName","Line"),uZ(fZ,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!jN.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),uZ(fZ,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,a=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout;return rZ({points:l.map(function(e,t){var l=uV(e,a);return"horizontal"===u?{x:SV({axis:n,ticks:o,bandSize:s,entry:e,index:t}),y:IS(l)?null:r.scale(l),value:l,payload:e}:{x:IS(l)?null:n.scale(l),y:SV({axis:r,ticks:i,bandSize:s,entry:e,index:t}),value:l,payload:e}}),layout:u},c)});var pZ,hZ=["layout","type","stroke","connectNulls","isRange","ref"],mZ=["key"];function gZ(e){return(gZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yZ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function vZ(){return vZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vZ.apply(this,arguments)}function bZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bZ(Object(n),!0).forEach(function(t){SZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jZ(r.key),r)}}function CZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CZ=function(){return!!e})()}function _Z(e){return(_Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kZ(e,t){return kZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kZ(e,t)}function SZ(e,t,n){return(t=jZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jZ(e){var t=function(e){if("object"!=gZ(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gZ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gZ(t)?t:t+""}var OZ=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return SZ(e=function(e,t,n){return t=_Z(t),function(e,t){if(t&&("object"===gZ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,CZ()?Reflect.construct(t,n||[],_Z(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!0}),SZ(e,"id",rj("recharts-area-")),SZ(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),Z_(t)&&t()}),SZ(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),Z_(t)&&t()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kZ(e,t)}(t,e),function(e,t,n){return t&&wZ(e.prototype,t),n&&wZ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderDots",value:function(e,r,o){var i=this.props.isAnimationActive,a=this.state.isAnimationFinished;if(i&&!a)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=Pj(this.props,!1),f=Pj(l,!0),p=c.map(function(e,n){var r=xZ(xZ(xZ({key:"dot-".concat(n),r:3},d),f),{},{index:n,cx:e.x,cy:e.y,dataKey:u,value:e.value,payload:e.payload,points:c});return t.renderDotItem(l,r)}),h={clipPath:e?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return n.createElement(Bj,vZ({className:"recharts-area-dots"},h),p)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,r=t.baseLine,o=t.points,i=t.strokeWidth,a=o[0].x,s=o[o.length-1].x,l=e*Math.abs(a-s),c=jB(o.map(function(e){return e.y||0}));return ej(r)&&"number"==typeof r?c=Math.max(r,c):r&&Array.isArray(r)&&r.length&&(c=Math.max(jB(r.map(function(e){return e.y||0})),c)),ej(c)?n.createElement("rect",{x:a<s?a:a-l,y:0,width:l,height:Math.floor(c+(i?parseInt("".concat(i),10):1))}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,r=t.baseLine,o=t.points,i=t.strokeWidth,a=o[0].y,s=o[o.length-1].y,l=e*Math.abs(a-s),c=jB(o.map(function(e){return e.x||0}));return ej(r)&&"number"==typeof r?c=Math.max(r,c):r&&Array.isArray(r)&&r.length&&(c=Math.max(jB(r.map(function(e){return e.x||0})),c)),ej(c)?n.createElement("rect",{x:0,y:a<s?a:a-l,width:c+(i?parseInt("".concat(i),10):1),height:Math.floor(l)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,r,o){var i=this.props,a=i.layout,s=i.type,l=i.stroke,c=i.connectNulls,u=i.isRange;i.ref;var d=yZ(i,hZ);return n.createElement(Bj,{clipPath:r?"url(#clipPath-".concat(o,")"):null},n.createElement(RH,vZ({},Pj(d,!0),{points:e,connectNulls:c,type:s,baseLine:t,layout:a,stroke:"none",className:"recharts-area-area"})),"none"!==l&&n.createElement(RH,vZ({},Pj(this.props,!1),{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:e})),"none"!==l&&u&&n.createElement(RH,vZ({},Pj(this.props,!1),{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var r=this,o=this.props,i=o.points,a=o.baseLine,s=o.isAnimationActive,l=o.animationBegin,c=o.animationDuration,u=o.animationEasing,d=o.animationId,f=this.state,p=f.prevPoints,h=f.prevBaseLine;return n.createElement(XW,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"area-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(o){var s=o.t;if(p){var l,c=p.length/i.length,u=i.map(function(e,t){var n=Math.floor(t*c);if(p[n]){var r=p[n],o=_n(r.x,e.x),i=_n(r.y,e.y);return xZ(xZ({},e),{},{x:o(s),y:i(s)})}return e});return l=ej(a)&&"number"==typeof a?_n(h,a)(s):IS(a)||XS(a)?_n(h,0)(s):a.map(function(e,t){var n=Math.floor(t*c);if(h[n]){var r=h[n],o=_n(r.x,e.x),i=_n(r.y,e.y);return xZ(xZ({},e),{},{x:o(s),y:i(s)})}return e}),r.renderAreaStatically(u,l,e,t)}return n.createElement(Bj,null,n.createElement("defs",null,n.createElement("clipPath",{id:"animationClipPath-".concat(t)},r.renderClipRect(s))),n.createElement(Bj,{clipPath:"url(#animationClipPath-".concat(t,")")},r.renderAreaStatically(i,a,e,t)))})}},{key:"renderArea",value:function(e,t){var n=this.props,r=n.points,o=n.baseLine,i=n.isAnimationActive,a=this.state,s=a.prevPoints,l=a.prevBaseLine,c=a.totalLength;return i&&r&&r.length&&(!s&&c>0||!WB(s,r)||!WB(l,o))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,o,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,o=t.dot,i=t.points,a=t.className,s=t.top,l=t.left,c=t.xAxis,u=t.yAxis,d=t.width,f=t.height,p=t.isAnimationActive,h=t.id;if(r||!i||!i.length)return null;var m=this.state.isAnimationFinished,g=1===i.length,y=de("recharts-area",a),v=c&&c.allowDataOverflow,b=u&&u.allowDataOverflow,x=v||b,w=IS(h)?this.id:h,C=null!==(e=Pj(o,!1))&&void 0!==e?e:{r:3,strokeWidth:2},_=C.r,k=void 0===_?3:_,S=C.strokeWidth,j=void 0===S?2:S,O=(Ej(o)?o:{}).clipDot,E=void 0===O||O,P=2*k+j;return n.createElement(Bj,{className:y},v||b?n.createElement("defs",null,n.createElement("clipPath",{id:"clipPath-".concat(w)},n.createElement("rect",{x:v?l:l-d/2,y:b?s:s-f/2,width:v?d:2*d,height:b?f:2*f})),!E&&n.createElement("clipPath",{id:"clipPath-dots-".concat(w)},n.createElement("rect",{x:l-P/2,y:s-P/2,width:d+P,height:f+P}))):null,g?null:this.renderArea(x,w),(o||g)&&this.renderDots(x,E,w),(!p||m)&&pH.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}])}(n.PureComponent);function EZ(e){return(EZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PZ=function(){return!!e})()}function TZ(e){return(TZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function MZ(e,t){return MZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},MZ(e,t)}function AZ(e,t,n){return(t=NZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NZ(e){var t=function(e){if("object"!=EZ(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=EZ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==EZ(t)?t:t+""}function DZ(){return DZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DZ.apply(this,arguments)}function IZ(e){var t=e.xAxisId,r=ZY(),o=GY(),i=YY(t);return null==i?null:n.createElement(GK,DZ({},i,{className:de("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:o},ticksGenerator:function(e){return gV(e,!0)}}))}pZ=OZ,SZ(OZ,"displayName","Area"),SZ(OZ,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!jN.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),SZ(OZ,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue??i;if(ej(a)&&"number"==typeof a)return a;var s="horizontal"===o?r:n,l=s.scale.domain();if("number"===s.type){var c=Math.max(l[0],l[1]),u=Math.min(l[0],l[1]);return"dataMin"===a?u:"dataMax"===a||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return"dataMin"===a?l[0]:"dataMax"===a?l[1]:l[0]}),SZ(OZ,"getComposedData",function(e){var t,n=e.props,r=e.item,o=e.xAxis,i=e.yAxis,a=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,h=n.layout,m=u&&u.length,g=pZ.getBaseValue(n,r,o,i),y="horizontal"===h,v=!1,b=f.map(function(e,t){var n;m?n=u[d+t]:(n=uV(e,c),Array.isArray(n)?v=!0:n=[g,n]);var r=null==n[1]||m&&null==uV(e,c);return y?{x:SV({axis:o,ticks:a,bandSize:l,entry:e,index:t}),y:r?null:i.scale(n[1]),value:n,payload:e}:{x:r?null:o.scale(n[1]),y:SV({axis:i,ticks:s,bandSize:l,entry:e,index:t}),value:n,payload:e}});return t=m||v?b.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return y?{x:e.x,y:null!=t&&null!=e.y?i.scale(t):null}:{x:null!=t?o.scale(t):null,y:e.y}}):y?i.scale(g):o.scale(g),xZ({points:b,baseLine:t,layout:h,isRange:v},p)}),SZ(OZ,"renderDotItem",function(e,t){var r;if(n.isValidElement(e))r=n.cloneElement(e,t);else if(Z_(e))r=e(t);else{var o=de("recharts-area-dot","boolean"!=typeof e?e.className:""),i=t.key,a=yZ(t,mZ);r=n.createElement(g$,vZ({},a,{key:i,className:o}))}return r});var RZ=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=TZ(t),function(e,t){if(t&&("object"===EZ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,PZ()?Reflect.construct(t,n||[],TZ(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MZ(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NZ(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return n.createElement(IZ,this.props)}}])}(n.Component);function LZ(e){return(LZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FZ=function(){return!!e})()}function BZ(e){return(BZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zZ(e,t){return zZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zZ(e,t)}function VZ(e,t,n){return(t=HZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HZ(e){var t=function(e){if("object"!=LZ(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=LZ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==LZ(t)?t:t+""}function WZ(){return WZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WZ.apply(this,arguments)}AZ(RZ,"displayName","XAxis"),AZ(RZ,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var $Z=function(e){var t=e.yAxisId,r=ZY(),o=GY(),i=KY(t);return null==i?null:n.createElement(GK,WZ({},i,{className:de("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:o},ticksGenerator:function(e){return gV(e,!0)}}))},UZ=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=BZ(t),function(e,t){if(t&&("object"===LZ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,FZ()?Reflect.construct(t,n||[],BZ(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zZ(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,HZ(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return n.createElement($Z,this.props)}}])}(n.Component);function qZ(e){return function(e){if(Array.isArray(e))return YZ(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return YZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YZ(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}VZ(UZ,"displayName","YAxis"),VZ(UZ,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var KZ=function(e,t,n,r,o){var i=kj(e,lK),a=kj(e,vK),s=[].concat(qZ(i),qZ(a)),l=kj(e,EK),c="".concat(r,"Id"),u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[c]===n&&Fq(t.props,"extendDomain")&&ej(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),l.length){var f="".concat(u,"1"),p="".concat(u,"2");d=l.reduce(function(e,t){if(t.props[c]===n&&Fq(t.props,"extendDomain")&&ej(t.props[f])&&ej(t.props[p])){var r=t.props[f],o=t.props[p];return[Math.min(e[0],r,o),Math.max(e[1],r,o)]}return e},d)}return o&&o.length&&(d=o.reduce(function(e,t){return ej(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},ZZ={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,i),!0;case 6:return u.fn.call(u.context,t,r,o,i,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,o);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn===t&&(!o||s.once)&&(!r||s.context===r)&&a(this,i);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(ZZ);var GZ=new(c(ZZ.exports)),XZ="recharts.syncMouseEvents";function JZ(e){return(JZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QZ(e,t,n){return(t=eG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eG(e){var t=function(e){if("object"!=JZ(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=JZ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==JZ(t)?t:t+""}var tG=function(){return function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eG(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),QZ(this,"activeIndex",0),QZ(this,"coordinateList",[]),QZ(this,"layout","horizontal")},[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,o=e.container,i=void 0===o?null:o,a=e.layout,s=void 0===a?null:a,l=e.offset,c=void 0===l?null:l,u=e.mouseHandlerCallback,d=void 0===u?null:u;this.coordinateList=null!==(t=r??this.coordinateList)&&void 0!==t?t:[],this.container=i??this.container,this.layout=s??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=d??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var n=this.container.getBoundingClientRect(),r=n.x,o=n.y,i=n.height,a=this.coordinateList[this.activeIndex].coordinate,s=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,c=r+a+s,u=o+this.offset.top+i/2+l;this.mouseHandlerCallback({pageX:c,pageY:u})}}}])}();function nG(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle;return{points:[VV(t,n,r,o),VV(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function rG(e,t,n){var r,o,i,a;if("horizontal"===e)i=r=t.x,o=n.top,a=n.top+n.height;else if("vertical"===e)a=o=t.y,r=n.left,i=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return nG(t);var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.angle,f=VV(s,l,c,d),p=VV(s,l,u,d);r=f.x,o=f.y,i=p.x,a=p.y}return[{x:r,y:o},{x:i,y:a}]}function oG(e){return(oG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function iG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iG(Object(n),!0).forEach(function(t){sG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sG(e,t,n){return t=function(e){var t=function(e){if("object"!=oG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oG(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lG(e){var t,r,o=e.element,i=e.tooltipEventType,a=e.isActive,s=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,h=null!==(t=o.props.cursor)&&void 0!==t?t:null===(r=o.type.defaultProps)||void 0===r?void 0:r.cursor;if(!o||!h||!a||!s||"ScatterChart"!==p&&"axis"!==i)return null;var m,g=RH;if("ScatterChart"===p)m=s,g=_$;else if("BarChart"===p)m=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(f,s,c,d),g=s$;else if("radial"===f){var y=nG(s),v=y.cx,b=y.cy,x=y.radius;m={cx:v,cy:b,startAngle:y.startAngle,endAngle:y.endAngle,innerRadius:x,outerRadius:x},g=CH}else m={points:rG(f,s,c)},g=RH;var w=aG(aG(aG(aG({stroke:"#ccc",pointerEvents:"none"},c),m),Pj(h,!1)),{},{payload:l,payloadIndex:u,className:de("recharts-tooltip-cursor",h.className)});return(0,n.isValidElement)(h)?(0,n.cloneElement)(h,w):(0,n.createElement)(g,w)}var cG=["item"],uG=["children","className","width","height","style","compact","title","desc"];function dG(e){return(dG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fG(){return fG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fG.apply(this,arguments)}function pG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||bG(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hG(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function mG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mG=function(){return!!e})()}function gG(e){return(gG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yG(e,t){return yG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yG(e,t)}function vG(e){return function(e){if(Array.isArray(e))return xG(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||bG(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bG(e,t){if(e){if("string"==typeof e)return xG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xG(e,t)}}function xG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wG(Object(n),!0).forEach(function(t){_G(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _G(e,t,n){return(t=kG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kG(e){var t=function(e){if("object"!=dG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dG(t)?t:t+""}var SG={xAxis:["bottom","top"],yAxis:["left","right"]},jG={width:"100%",height:"100%"},OG={x:0,y:0};function EG(e){return e}var PG=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,o=t.dataEndIndex,i=(n??[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(vG(e),vG(n)):e},[]);return i.length>0?i:e&&e.length&&ej(r)&&ej(o)?e.slice(r,o+1):[]};function TG(e){return"number"===e?[0,"auto"]:void 0}var MG=function(e,t,n,r){var o=e.graphicalItems,i=e.tooltipAxis,a=PG(t,e);return n<0||!o||!o.length||n>=a.length?null:o.reduce(function(o,s){var l,c,u=null!==(l=s.props.data)&&void 0!==l?l:t;return u&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),(c=i.dataKey&&!i.allowDuplicatedCategory?aj(void 0===u?a:u,i.dataKey,r):u&&u[n]||a[n])?[].concat(vG(o),[NV(s,c)]):o},[])},AG=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},i=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(o,n),a=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=-1,a=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(a<=1)return 0;if(o&&"angleAxis"===o.axisType&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l<a;l++){var c=l>0?r[l-1].coordinate:r[a-1].coordinate,u=r[l].coordinate,d=l>=a-1?r[0].coordinate:r[l+1].coordinate,f=void 0;if(JS(u-c)!==JS(d-u)){var p=[];if(JS(d-u)===JS(s[1]-s[0])){f=d;var h=u+s[1]-s[0];p[0]=Math.min(h,(h+c)/2),p[1]=Math.max(h,(h+c)/2)}else{f=c;var m=d+s[1]-s[0];p[0]=Math.min(u,(m+u)/2),p[1]=Math.max(u,(m+u)/2)}var g=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>g[0]&&e<=g[1]||e>=p[0]&&e<=p[1]){i=r[l].index;break}}else{var y=Math.min(c,d),v=Math.max(c,d);if(e>(y+u)/2&&e<=(v+u)/2){i=r[l].index;break}}}else for(var b=0;b<a;b++)if(0===b&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b>0&&b<a-1&&e>(n[b].coordinate+n[b-1].coordinate)/2&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b===a-1&&e>(n[b].coordinate+n[b-1].coordinate)/2){i=n[b].index;break}return i}(i,a,l,s);if(c>=0&&l){var u=l[c]&&l[c].value,d=MG(e,t,c,u),f=function(e,t,n,r){var o=t.find(function(e){return e&&e.index===n});if(o){if("horizontal"===e)return{x:o.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:o.coordinate};if("centric"===e){var i=o.coordinate,a=r.radius;return CG(CG(CG({},r),VV(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,l=r.angle;return CG(CG(CG({},r),VV(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return OG}(n,a,c,o);return{activeTooltipIndex:c,activeLabel:u,activePayload:d,activeCoordinate:f}}return null},NG=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,i=t.graphicalItems,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,u="".concat(r,"Id"),d=kj(c,o),f={};return d&&d.length?f=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=e.stackOffset,f=mV(c,o);return n.reduce(function(t,n){var p,h=void 0!==n.type.defaultProps?CG(CG({},n.type.defaultProps),n.props):n.props,m=h.type,g=h.dataKey,y=h.allowDataOverflow,v=h.allowDuplicatedCategory,b=h.scale,x=h.ticks,w=h.includeHidden,C=h[i];if(t[C])return t;var _,k,S,j=PG(e.data,{graphicalItems:r.filter(function(e){var t;return(i in e.props?e.props[i]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[i])===C}),dataStartIndex:s,dataEndIndex:l}),O=j.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&ej(r)&&ej(o))return!0}return!1})(h.domain,y,m)&&(_=TV(h.domain,null,y),f&&("number"===m||"auto"!==b)&&(S=dV(j,g,"category")));var E=TG(m);if(!_||0===_.length){var P,T=null!==(P=h.domain)&&void 0!==P?P:E;if(g){if(_=dV(j,g,m),"category"===m&&f){var M=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(_);v&&M?(k=_,_=fq(0,O)):v||(_=AV(T,_,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(vG(e),[t])},[]))}else if("category"===m)_=v?_.filter(function(e){return""!==e&&!IS(e)}):AV(T,_,n).reduce(function(e,t){return e.indexOf(t)>=0||""===t||IS(t)?e:[].concat(vG(e),[t])},[]);else if("number"===m){var A=function(e,t,n,r,o){var i=t.map(function(t){return pV(e,t,n,o,r)}).filter(function(e){return!IS(e)});return i&&i.length?i.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null}(j,r.filter(function(e){var t,n,r=i in e.props?e.props[i]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[i],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===C&&(w||!o)}),g,o,c);A&&(_=A)}f&&("number"===m||"auto"!==b)&&(S=dV(j,g,"category"))}else _=f?fq(0,O):a&&a[C]&&a[C].hasStack&&"number"===m?"expand"===d?[0,1]:OV(a[C].stackGroups,s,l):hV(j,r.filter(function(e){var t=i in e.props?e.props[i]:e.type.defaultProps[i],n="hide"in e.props?e.props.hide:e.type.defaultProps.hide;return t===C&&(w||!n)}),m,c,!0);if("number"===m)_=KZ(u,_,C,o,x),T&&(_=TV(T,_,y));else if("category"===m&&T){var N=T;_.every(function(e){return N.indexOf(e)>=0})&&(_=N)}}return CG(CG({},t),{},_G({},C,CG(CG({},h),{},{axisType:o,domain:_,categoricalDomain:S,duplicateDomain:k,originalDomain:null!==(p=h.domain)&&void 0!==p?p:E,isCategorical:f,layout:c})))},{})}(e,{axes:d,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:s,dataEndIndex:l}):i&&i.length&&(f=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=PG(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),f=d.length,p=mV(c,o),h=-1;return n.reduce(function(e,t){var m,g=(void 0!==t.type.defaultProps?CG(CG({},t.type.defaultProps),t.props):t.props)[i],y=TG("number");return e[g]?e:(h++,p?m=fq(0,f):a&&a[g]&&a[g].hasStack?(m=OV(a[g].stackGroups,s,l),m=KZ(u,m,g,o)):(m=TV(y,hV(d,n.filter(function(e){var t,n,r=i in e.props?e.props[i]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[i],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===g&&!o}),"number",c),r.defaultProps.allowDataOverflow),m=KZ(u,m,g,o)),CG(CG({},e),{},_G({},g,CG(CG({axisType:o},r.defaultProps),{},{hide:!0,orientation:NS(SG,"".concat(o,".").concat(h%2),null),domain:m,originalDomain:y,isCategorical:p,layout:c}))))},{})}(e,{Axis:o,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:s,dataEndIndex:l})),f},DG=function(e){var t=e.children,n=e.defaultShowTooltip,r=Sj(t,Pq),o=0,i=0;return e.data&&0!==e.data.length&&(i=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(i=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!n}},IG=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},RG=function(e,t){return"xAxis"===t?e[t].width:"yAxis"===t?e[t].height:void 0},LG=function(e){var t=e.chartName,r=e.GraphicalChild,o=e.defaultTooltipEventType,i=void 0===o?"axis":o,a=e.validateTooltipEventTypes,s=void 0===a?["axis"]:a,l=e.axisComponents,c=e.legendContent,u=e.formatAxisMap,d=e.defaultProps,f=function(e,n){var o=e.props,i=e.dataStartIndex,a=e.dataEndIndex,s=e.updateId;if(!jj({props:o}))return null;var c=o.children,d=o.layout,f=o.stackOffset,p=o.data,h=o.reverseStackOrder,m=IG(d),g=m.numericAxisName,y=m.cateAxisName,v=kj(c,r),b=function(e,t,n,r,o,i){if(!e)return null;var a=(i?t.reverse():t).reduce(function(e,t){var o,i=null!==(o=t.type)&&void 0!==o&&o.defaultProps?lV(lV({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(i.hide)return e;var s=i[n],l=e[s]||{hasStack:!1,stackGroups:{}};if(tj(a)){var c=l.stackGroups[a]||{numericAxisId:n,cateAxisId:r,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[a]=c}else l.stackGroups[rj("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return lV(lV({},e),{},cV({},s,l))},{});return Object.keys(a).reduce(function(t,i){var s=a[i];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,i){var a=s.stackGroups[i];return lV(lV({},t),{},cV({},i,{numericAxisId:n,cateAxisId:r,items:a.items,stackedData:_V(e,a.items,o)}))},{})),lV(lV({},t),{},cV({},i,s))},{})}(p,v,"".concat(g,"Id"),"".concat(y,"Id"),f,h),x=l.reduce(function(e,t){var n="".concat(t.axisType,"Map");return CG(CG({},e),{},_G({},n,NG(o,CG(CG({},t),{},{graphicalItems:v,stackGroups:t.axisType===g&&b,dataStartIndex:i,dataEndIndex:a}))))},{}),w=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),o=void 0===r?{}:r,i=e.yAxisMap,a=void 0===i?{}:i,s=n.width,l=n.height,c=n.children,u=n.margin||{},d=Sj(c,Pq),f=Sj(c,sA),p=Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:CG(CG({},e),{},_G({},r,e[r]+n.width))},{left:u.left||0,right:u.right||0}),h=Object.keys(o).reduce(function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:CG(CG({},e),{},_G({},r,NS(e,"".concat(r))+n.height))},{top:u.top||0,bottom:u.bottom||0}),m=CG(CG({},h),p),g=m.bottom;d&&(m.bottom+=d.props.height||Pq.defaultProps.height),f&&t&&(m=function(e,t,n,r){var o=n.children,i=n.width,a=n.margin,s=i-(a.left||0)-(a.right||0),l=rV({children:o,legendWidth:s});if(l){var c=r||{},u=c.width,d=c.height,f=l.align,p=l.verticalAlign,h=l.layout;if(("vertical"===h||"horizontal"===h&&"middle"===p)&&"center"!==f&&ej(e[f]))return lV(lV({},e),{},cV({},f,e[f]+(u||0)));if(("horizontal"===h||"vertical"===h&&"center"===f)&&"middle"!==p&&ej(e[p]))return lV(lV({},e),{},cV({},p,e[p]+(d||0)))}return e}(m,0,n,t));var y=s-m.left-m.right,v=l-m.top-m.bottom;return CG(CG({brushBottom:g},m),{},{width:Math.max(y,0),height:Math.max(v,0)})}(CG(CG({},x),{},{props:o,graphicalItems:v}),null==n?void 0:n.legendBBox);Object.keys(x).forEach(function(e){x[e]=u(o,x[e],w,e.replace("Map",""),t)});var C=function(e){var t=ij(e),n=gV(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:nN(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:MV(t,n)}}(x["".concat(y,"Map")]),_=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,i=t.updateId,a=t.dataStartIndex,s=t.dataEndIndex,c=e.barSize,u=e.layout,d=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,h=IG(u),m=h.numericAxisName,g=h.cateAxisName,y=function(e){return!(!e||!e.length)&&e.some(function(e){var t=xj(e&&e.type);return t&&t.indexOf("Bar")>=0})}(n),v=[];return n.forEach(function(n,h){var b=PG(e.data,{graphicalItems:[n],dataStartIndex:a,dataEndIndex:s}),x=void 0!==n.type.defaultProps?CG(CG({},n.type.defaultProps),n.props):n.props,w=x.dataKey,C=x.maxBarSize,_=x["".concat(m,"Id")],k=x["".concat(g,"Id")],S=l.reduce(function(e,n){var r=t["".concat(n.axisType,"Map")],o=x["".concat(n.axisType,"Id")];r&&r[o]||"zAxis"===n.axisType||Hz();var i=r[o];return CG(CG({},e),{},_G(_G({},n.axisType,i),"".concat(n.axisType,"Ticks"),gV(i)))},{}),j=S[g],O=S["".concat(g,"Ticks")],E=r&&r[_]&&r[_].hasStack&&function(e,t){var n,r=(null!==(n=e.type)&&void 0!==n&&n.defaultProps?lV(lV({},e.type.defaultProps),e.props):e.props).stackId;if(tj(r)){var o=t[r];if(o){var i=o.items.indexOf(e);return i>=0?o.stackedData[i]:null}}return null}(n,r[_].stackGroups),P=xj(n.type).indexOf("Bar")>=0,T=MV(j,O),M=[],A=y&&function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,o=void 0===r?{}:r;if(!o)return{};for(var i={},a=Object.keys(o),s=0,l=a.length;s<l;s++)for(var c=o[a[s]].stackGroups,u=Object.keys(c),d=0,f=u.length;d<f;d++){var p=c[u[d]],h=p.items,m=p.cateAxisId,g=h.filter(function(e){return xj(e.type).indexOf("Bar")>=0});if(g&&g.length){var y=g[0].type.defaultProps,v=void 0!==y?lV(lV({},y),g[0].props):g[0].props,b=v.barSize,x=v[m];i[x]||(i[x]=[]);var w=IS(b)?t:b;i[x].push({item:g[0],stackList:g.slice(1),barSize:IS(w)?void 0:oj(w,n,0)})}}return i}({barSize:c,stackGroups:r,totalSize:RG(S,g)});if(P){var N,D,I=IS(C)?p:C,R=null!==(N=null!==(D=MV(j,O,!0))&&void 0!==D?D:I)&&void 0!==N?N:0;M=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,o=e.sizeList,i=void 0===o?[]:o,a=e.maxBarSize,s=i.length;if(s<1)return null;var l,c=oj(t,r,0,!0),u=[];if(i[0].barSize===+i[0].barSize){var d=!1,f=r/s,p=i.reduce(function(e,t){return e+t.barSize||0},0);(p+=(s-1)*c)>=r&&(p-=(s-1)*c,c=0),p>=r&&f>0&&(d=!0,p=s*(f*=.9));var h={offset:((r-p)/2|0)-c,size:0};l=i.reduce(function(e,t){var n={item:t.item,position:{offset:h.offset+h.size+c,size:d?f:t.barSize}},r=[].concat(iV(e),[n]);return h=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:h})}),r},u)}else{var m=oj(n,r,0,!0);r-2*m-(s-1)*c<=0&&(c=0);var g=(r-2*m-(s-1)*c)/s;g>1&&(g>>=0);var y=a===+a?Math.min(g,a):g;l=i.reduce(function(e,t,n){var r=[].concat(iV(e),[{item:t.item,position:{offset:m+(g+c)*n+(g-y)/2,size:y}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return l}({barGap:d,barCategoryGap:f,bandSize:R!==T?R:T,sizeList:A[k],maxBarSize:I}),R!==T&&(M=M.map(function(e){return CG(CG({},e),{},{position:CG(CG({},e.position),{},{offset:e.position.offset-R/2})})}))}var L=n&&n.type&&n.type.getComposedData;L&&v.push({props:CG(CG({},L(CG(CG({},S),{},{displayedData:b,props:e,dataKey:w,item:n,bandSize:T,barPosition:M,offset:o,stackedData:E,layout:u,dataStartIndex:a,dataEndIndex:s}))),{},_G(_G(_G({key:n.key||"item-".concat(h)},m,S[m]),g,S[g]),"animationId",i)),childIndex:Nj(n,e.children),item:n})}),v}(o,CG(CG({},x),{},{dataStartIndex:i,dataEndIndex:a,updateId:s,graphicalItems:v,stackGroups:b,offset:w}));return CG(CG({formattedGraphicalItems:_,graphicalItems:v,offset:w,stackGroups:b},C),x)},p=function(e){function r(e){var o,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),_G(a=function(e,t,n){return t=gG(t),function(e,t){if(t&&("object"===dG(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mG()?Reflect.construct(t,n||[],gG(e).constructor):t.apply(e,n))}(this,r,[e]),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_G(a,"accessibilityManager",new tG),_G(a,"handleLegendBBoxUpdate",function(e){if(e){var t=a.state,n=t.dataStartIndex,r=t.dataEndIndex,o=t.updateId;a.setState(CG({legendBBox:e},f({props:a.props,dataStartIndex:n,dataEndIndex:r,updateId:o},CG(CG({},a.state),{},{legendBBox:e}))))}}),_G(a,"handleReceiveSyncEvent",function(e,t,n){if(a.props.syncId===e){if(n===a.eventEmitterSymbol&&"function"!=typeof a.props.syncMethod)return;a.applySyncEvent(t)}}),_G(a,"handleBrushChange",function(e){var t=e.startIndex,n=e.endIndex;if(t!==a.state.dataStartIndex||n!==a.state.dataEndIndex){var r=a.state.updateId;a.setState(function(){return CG({dataStartIndex:t,dataEndIndex:n},f({props:a.props,dataStartIndex:t,dataEndIndex:n,updateId:r},a.state))}),a.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),_G(a,"handleMouseEnter",function(e){var t=a.getMouseInfo(e);if(t){var n=CG(CG({},t),{},{isTooltipActive:!0});a.setState(n),a.triggerSyncEvent(n);var r=a.props.onMouseEnter;Z_(r)&&r(n,e)}}),_G(a,"triggeredAfterMouseMove",function(e){var t=a.getMouseInfo(e),n=t?CG(CG({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};a.setState(n),a.triggerSyncEvent(n);var r=a.props.onMouseMove;Z_(r)&&r(n,e)}),_G(a,"handleItemMouseEnter",function(e){a.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),_G(a,"handleItemMouseLeave",function(){a.setState(function(){return{isTooltipActive:!1}})}),_G(a,"handleMouseMove",function(e){e.persist(),a.throttleTriggeredAfterMouseMove(e)}),_G(a,"handleMouseLeave",function(e){a.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};a.setState(t),a.triggerSyncEvent(t);var n=a.props.onMouseLeave;Z_(n)&&n(t,e)}),_G(a,"handleOuterEvent",function(e){var t,n=function(e){var t=e&&e.type;return t&&bj[t]?bj[t]:null}(e),r=NS(a.props,"".concat(n));n&&Z_(r)&&r(null!==(t=/.*touch.*/i.test(n)?a.getMouseInfo(e.changedTouches[0]):a.getMouseInfo(e))&&void 0!==t?t:{},e)}),_G(a,"handleClick",function(e){var t=a.getMouseInfo(e);if(t){var n=CG(CG({},t),{},{isTooltipActive:!0});a.setState(n),a.triggerSyncEvent(n);var r=a.props.onClick;Z_(r)&&r(n,e)}}),_G(a,"handleMouseDown",function(e){var t=a.props.onMouseDown;Z_(t)&&t(a.getMouseInfo(e),e)}),_G(a,"handleMouseUp",function(e){var t=a.props.onMouseUp;Z_(t)&&t(a.getMouseInfo(e),e)}),_G(a,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&a.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),_G(a,"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&a.handleMouseDown(e.changedTouches[0])}),_G(a,"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&a.handleMouseUp(e.changedTouches[0])}),_G(a,"triggerSyncEvent",function(e){void 0!==a.props.syncId&&GZ.emit(XZ,a.props.syncId,e,a.eventEmitterSymbol)}),_G(a,"applySyncEvent",function(e){var t=a.props,n=t.layout,r=t.syncMethod,o=a.state.updateId,i=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)a.setState(CG({dataStartIndex:i,dataEndIndex:s},f({props:a.props,dataStartIndex:i,dataEndIndex:s,updateId:o},a.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,u=e.activeTooltipIndex,d=a.state,p=d.offset,h=d.tooltipTicks;if(!p)return;if("function"==typeof r)u=r(h,e);else if("value"===r){u=-1;for(var m=0;m<h.length;m++)if(h[m].value===e.activeLabel){u=m;break}}var g=CG(CG({},p),{},{x:p.left,y:p.top}),y=Math.min(l,g.x+g.width),v=Math.min(c,g.y+g.height),b=h[u]&&h[u].value,x=MG(a.state,a.props.data,u),w=h[u]?{x:"horizontal"===n?h[u].coordinate:y,y:"horizontal"===n?v:h[u].coordinate}:OG;a.setState(CG(CG({},e),{},{activeLabel:b,activeCoordinate:w,activePayload:x,activeTooltipIndex:u}))}else a.setState(e)}),_G(a,"renderCursor",function(e){var r,o=a.state,i=o.isTooltipActive,s=o.activeCoordinate,l=o.activePayload,c=o.offset,u=o.activeTooltipIndex,d=o.tooltipAxisBandSize,f=a.getTooltipEventType(),p=null!==(r=e.props.active)&&void 0!==r?r:i,h=a.props.layout,m=e.key||"_recharts-cursor";return n.createElement(lG,{key:m,activeCoordinate:s,activePayload:l,activeTooltipIndex:u,chartName:t,element:e,isActive:p,layout:h,offset:c,tooltipAxisBandSize:d,tooltipEventType:f})}),_G(a,"renderPolarAxis",function(e,t,r){var o=NS(e,"type.axisType"),i=NS(a.state,"".concat(o,"Map")),s=e.type.defaultProps,l=void 0!==s?CG(CG({},s),e.props):e.props,c=i&&i[l["".concat(o,"Id")]];return(0,n.cloneElement)(e,CG(CG({},c),{},{className:de(o,c.className),key:e.key||"".concat(t,"-").concat(r),ticks:gV(c,!0)}))}),_G(a,"renderPolarGrid",function(e){var t=e.props,r=t.radialLines,o=t.polarAngles,i=t.polarRadius,s=a.state,l=s.radiusAxisMap,c=s.angleAxisMap,u=ij(l),d=ij(c),f=d.cx,p=d.cy,h=d.innerRadius,m=d.outerRadius;return(0,n.cloneElement)(e,{polarAngles:Array.isArray(o)?o:gV(d,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(i)?i:gV(u,!0).map(function(e){return e.coordinate}),cx:f,cy:p,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:r})}),_G(a,"renderLegend",function(){var e=a.state.formattedGraphicalItems,t=a.props,r=t.children,o=t.width,i=t.height,s=a.props.margin||{},l=o-(s.left||0)-(s.right||0),u=rV({children:r,formattedGraphicalItems:e,legendWidth:l,legendContent:c});if(!u)return null;var d=u.item,f=hG(u,cG);return(0,n.cloneElement)(d,CG(CG({},f),{},{chartWidth:o,chartHeight:i,margin:s,onBBoxUpdate:a.handleLegendBBoxUpdate}))}),_G(a,"renderTooltip",function(){var e,t=a.props,r=t.children,o=t.accessibilityLayer,i=Sj(r,RN);if(!i)return null;var s=a.state,l=s.isTooltipActive,c=s.activeCoordinate,u=s.activePayload,d=s.activeLabel,f=s.offset,p=null!==(e=i.props.active)&&void 0!==e?e:l;return(0,n.cloneElement)(i,{viewBox:CG(CG({},f),{},{x:f.left,y:f.top}),active:p,label:d,payload:p?u:[],coordinate:c,accessibilityLayer:o})}),_G(a,"renderBrush",function(e){var t=a.props,r=t.margin,o=t.data,i=a.state,s=i.offset,l=i.dataStartIndex,c=i.dataEndIndex,u=i.updateId;return(0,n.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:vV(a.handleBrushChange,e.props.onChange),data:o,x:ej(e.props.x)?e.props.x:s.left,y:ej(e.props.y)?e.props.y:s.top+s.height+s.brushBottom-(r.bottom||0),width:ej(e.props.width)?e.props.width:s.width,startIndex:l,endIndex:c,updateId:"brush-".concat(u)})}),_G(a,"renderReferenceElement",function(e,t,r){if(!e)return null;var o=a.clipPathId,i=a.state,s=i.xAxisMap,l=i.yAxisMap,c=i.offset,u=e.type.defaultProps||{},d=e.props,f=d.xAxisId,p=void 0===f?u.xAxisId:f,h=d.yAxisId,m=void 0===h?u.yAxisId:h;return(0,n.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(r),xAxis:s[p],yAxis:l[m],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:o})}),_G(a,"renderActivePoints",function(e){var t=e.item,n=e.activePoint,o=e.basePoint,i=e.childIndex,a=e.isRange,s=[],l=t.props.key,c=void 0!==t.item.type.defaultProps?CG(CG({},t.item.type.defaultProps),t.item.props):t.item.props,u=c.activeDot,d=CG(CG({index:i,dataKey:c.dataKey,cx:n.x,cy:n.y,r:4,fill:fV(t.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value},Pj(u,!1)),pj(u));return s.push(r.renderActiveDot(u,d,"".concat(l,"-activePoint-").concat(i))),o?s.push(r.renderActiveDot(u,CG(CG({},d),{},{cx:o.x,cy:o.y}),"".concat(l,"-basePoint-").concat(i))):a&&s.push(null),s}),_G(a,"renderGraphicChild",function(e,t,r){var o=a.filterFormatItem(e,t,r);if(!o)return null;var i=a.getTooltipEventType(),s=a.state,l=s.isTooltipActive,c=s.tooltipAxis,u=s.activeTooltipIndex,d=s.activeLabel,f=Sj(a.props.children,RN),p=o.props,h=p.points,m=p.isRange,g=p.baseLine,y=void 0!==o.item.type.defaultProps?CG(CG({},o.item.type.defaultProps),o.item.props):o.item.props,v=y.activeDot,b=y.hide,x=y.activeBar,w=y.activeShape,C=!(b||!l||!f||!(v||x||w)),_={};"axis"!==i&&f&&"click"===f.props.trigger?_={onClick:vV(a.handleItemMouseEnter,e.props.onClick)}:"axis"!==i&&(_={onMouseLeave:vV(a.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:vV(a.handleItemMouseEnter,e.props.onMouseEnter)});var k=(0,n.cloneElement)(e,CG(CG({},o.props),_));if(C){if(!(u>=0)){var S,j=(null!==(S=a.getItemByXY(a.state.activeCoordinate))&&void 0!==S?S:{graphicalItem:k}).graphicalItem,O=j.item,E=void 0===O?e:O,P=j.childIndex,T=CG(CG(CG({},o.props),_),{},{activeIndex:P});return[(0,n.cloneElement)(E,T),null,null]}var M,A;if(c.dataKey&&!c.allowDuplicatedCategory){var N="function"==typeof c.dataKey?function(e){return"function"==typeof c.dataKey?c.dataKey(e.payload):null}:"payload.".concat(c.dataKey.toString());M=aj(h,N,d),A=m&&g&&aj(g,N,d)}else M=null==h?void 0:h[u],A=m&&g&&g[u];if(w||x){var D=void 0!==e.props.activeIndex?e.props.activeIndex:u;return[(0,n.cloneElement)(e,CG(CG(CG({},o.props),_),{},{activeIndex:D})),null,null]}if(!IS(M))return[k].concat(vG(a.renderActivePoints({item:o,activePoint:M,basePoint:A,childIndex:u,isRange:m})))}return m?[k,null,null]:[k,null]}),_G(a,"renderCustomized",function(e,t,r){return(0,n.cloneElement)(e,CG(CG({key:"recharts-customized-".concat(r)},a.props),a.state))}),_G(a,"renderMap",{CartesianGrid:{handler:EG,once:!0},ReferenceArea:{handler:a.renderReferenceElement},ReferenceLine:{handler:EG},ReferenceDot:{handler:a.renderReferenceElement},XAxis:{handler:EG},YAxis:{handler:EG},Brush:{handler:a.renderBrush,once:!0},Bar:{handler:a.renderGraphicChild},Line:{handler:a.renderGraphicChild},Area:{handler:a.renderGraphicChild},Radar:{handler:a.renderGraphicChild},RadialBar:{handler:a.renderGraphicChild},Scatter:{handler:a.renderGraphicChild},Pie:{handler:a.renderGraphicChild},Funnel:{handler:a.renderGraphicChild},Tooltip:{handler:a.renderCursor,once:!0},PolarGrid:{handler:a.renderPolarGrid,once:!0},PolarAngleAxis:{handler:a.renderPolarAxis},PolarRadiusAxis:{handler:a.renderPolarAxis},Customized:{handler:a.renderCustomized}}),a.clipPathId="".concat(null!==(o=e.id)&&void 0!==o?o:rj("recharts"),"-clip"),a.throttleTriggeredAfterMouseMove=rD(a.triggeredAfterMouseMove,null!==(i=e.throttleDelay)&&void 0!==i?i:1e3/60),a.state={},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yG(e,t)}(r,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kG(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(r,[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,i=Sj(t,RN);if(i){var a=i.props.defaultIndex;if(!("number"!=typeof a||a<0||a>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,l=MG(this.state,n,a,s),c=this.state.tooltipTicks[a].coordinate,u=(this.state.offset.top+r)/2,d="horizontal"===o?{x:c,y:u}:{y:c,x:u},f=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});f&&(d=CG(CG({},d),f.props.points[a].tooltipPosition),l=f.props.points[a].tooltipPayload);var p={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:d};this.setState(p),this.renderCursor(i),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}}),null):null;var n,r}},{key:"componentDidUpdate",value:function(e){Tj([Sj(e.children,RN)],[Sj(this.props.children,RN)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=Sj(this.props.children,RN);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return s.indexOf(t)>=0?t:i}return i}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}}(n),o={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},i=n.width/t.offsetWidth||1,a=this.inRange(o.chartX,o.chartY,i);if(!a)return null;var s=this.state,l=s.xAxisMap,c=s.yAxisMap;if("axis"!==this.getTooltipEventType()&&l&&c){var u=ij(l).scale,d=ij(c).scale,f=u&&u.invert?u.invert(o.chartX):null,p=d&&d.invert?d.invert(o.chartY):null;return CG(CG({},o),{},{xValue:f,yValue:p})}var h=AG(this.state,this.props.data,this.props.layout,a);return h?CG(CG({},o),h):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,i=t/n;if("horizontal"===r||"vertical"===r){var a=this.state.offset;return o>=a.left&&o<=a.left+a.width&&i>=a.top&&i<=a.top+a.height?{x:o,y:i}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;if(l&&c){var u=ij(l);return $V({x:o,y:i},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=Sj(e,RN),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),CG(CG({},pj(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){GZ.on(XZ,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){GZ.removeListener(XZ,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,i=r.length;o<i;o++){var a=r[o];if(a.item===e||a.props.key===e.key||t===xj(a.item.type)&&n===a.childIndex)return a}return null}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,r=t.left,o=t.top,i=t.height,a=t.width;return n.createElement("defs",null,n.createElement("clipPath",{id:e},n.createElement("rect",{x:r,y:o,height:i,width:a})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=pG(t,2),r=n[0],o=n[1];return CG(CG({},e),{},_G({},r,o.scale))},{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=pG(t,2),r=n[0],o=n[1];return CG(CG({},e),{},_G({},r,o.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var o=0,i=n.length;o<i;o++){var a=n[o],s=a.props,l=a.item,c=void 0!==l.type.defaultProps?CG(CG({},l.type.defaultProps),l.props):l.props,u=xj(l.type);if("Bar"===u){var d=(s.data||[]).find(function(t){return i$(e,t)});if(d)return{graphicalItem:a,payload:d}}else if("RadialBar"===u){var f=(s.data||[]).find(function(t){return $V(e,t)});if(f)return{graphicalItem:a,payload:f}}else if(zU(a,r)||VU(a,r)||HU(a,r)){var p=qU({graphicalItem:a,activeTooltipItem:r,itemData:c.data}),h=void 0===c.activeIndex?p:c.activeIndex;return{graphicalItem:CG(CG({},a),{},{childIndex:h}),payload:HU(a,r)?c.data[p]:a.props.data[p]}}}return null}},{key:"render",value:function(){var e=this;if(!jj(this))return null;var t,r,o=this.props,i=o.children,a=o.className,s=o.width,l=o.height,c=o.style,u=o.compact,d=o.title,f=o.desc,p=hG(o,uG),h=Pj(p,!1);if(u)return n.createElement(qY,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},n.createElement(Rj,fG({},h,{width:s,height:l,title:d,desc:f}),this.renderClipPath(),Aj(i,this.renderMap)));this.props.accessibilityLayer&&(h.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,h.role=null!==(r=this.props.role)&&void 0!==r?r:"application",h.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},h.onFocus=function(){e.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return n.createElement(qY,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},n.createElement("div",fG({className:de("recharts-wrapper",a),style:CG({position:"relative",cursor:"default",width:s,height:l},c)},m,{ref:function(t){e.container=t}}),n.createElement(Rj,fG({},h,{width:s,height:l,title:d,desc:f,style:jG}),this.renderClipPath(),Aj(i,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(n.Component);_G(p,"displayName",t),_G(p,"defaultProps",CG({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),_G(p,"getDerivedStateFromProps",function(e,t){var n=e.dataKey,r=e.data,o=e.children,i=e.width,a=e.height,s=e.layout,l=e.stackOffset,c=e.margin,u=t.dataStartIndex,d=t.dataEndIndex;if(void 0===t.updateId){var p=DG(e);return CG(CG(CG({},p),{},{updateId:0},f(CG(CG({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:i,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(n!==t.prevDataKey||r!==t.prevData||i!==t.prevWidth||a!==t.prevHeight||s!==t.prevLayout||l!==t.prevStackOffset||!sj(c,t.prevMargin)){var h=DG(e),m={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=CG(CG({},AG(t,r,s)),{},{updateId:t.updateId+1}),y=CG(CG(CG({},h),m),g);return CG(CG(CG({},y),f(CG({props:e},y),t)),{},{prevDataKey:n,prevData:r,prevWidth:i,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(!Tj(o,t.prevChildren)){var v,b,x,w,C=Sj(o,Pq),_=C&&null!==(v=null===(b=C.props)||void 0===b?void 0:b.startIndex)&&void 0!==v?v:u,k=C&&null!==(x=null===(w=C.props)||void 0===w?void 0:w.endIndex)&&void 0!==x?x:d,S=_!==u||k!==d,j=IS(r)||S?t.updateId+1:t.updateId;return CG(CG({updateId:j},f(CG(CG({props:e},t),{},{updateId:j,dataStartIndex:_,dataEndIndex:k}),t)),{},{prevChildren:o,dataStartIndex:_,dataEndIndex:k})}return null}),_G(p,"renderActiveDot",function(e,t,r){var o;return o=(0,n.isValidElement)(e)?(0,n.cloneElement)(e,t):Z_(e)?e(t):n.createElement(g$,t),n.createElement(Bj,{className:"recharts-active-dot",key:r},o)});var h=(0,n.forwardRef)(function(e,t){return n.createElement(p,fG({},e,{ref:t}))});return h.displayName=p.displayName,h};LG({chartName:"LineChart",GraphicalChild:fZ,axisComponents:[{axisType:"xAxis",AxisComp:RZ},{axisType:"yAxis",AxisComp:UZ}],formatAxisMap:jY}),LG({chartName:"BarChart",GraphicalChild:bY,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:RZ},{axisType:"yAxis",AxisComp:UZ}],formatAxisMap:jY}),LG({chartName:"PieChart",GraphicalChild:rq,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:aU},{axisType:"radiusAxis",AxisComp:Y$}],formatAxisMap:function(e,t,n,r,o){var i=e.width,a=e.height,s=e.startAngle,l=e.endAngle,c=oj(e.cx,i,i/2),u=oj(e.cy,a,a/2),d=HV(i,a,n),f=oj(e.innerRadius,d,0),p=oj(e.outerRadius,d,.8*d);return Object.keys(t).reduce(function(e,n){var i,a=t[n],d=a.domain,h=a.reversed;if(IS(a.range))"angleAxis"===r?i=[s,l]:"radiusAxis"===r&&(i=[f,p]),h&&(i=[i[1],i[0]]);else{var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return FV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FV(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i=a.range,2);s=m[0],l=m[1]}var g=bV(a,o),y=g.realScaleType,v=g.scale;v.domain(d).range(i),wV(v);var b=kV(v,RV(RV({},a),{},{realScaleType:y})),x=RV(RV(RV({},a),b),{},{range:i,radius:p,realScaleType:y,scale:v,cx:c,cy:u,innerRadius:f,outerRadius:p,startAngle:s,endAngle:l});return RV(RV({},e),{},LV({},n,x))},{})},defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),LG({chartName:"AreaChart",GraphicalChild:OZ,axisComponents:[{axisType:"xAxis",AxisComp:RZ},{axisType:"yAxis",AxisComp:UZ}],formatAxisMap:jY});const FG=n.forwardRef(({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:o="value",fontSizeVariant:i},a)=>n.length?(0,s.jsx)("div",{ref:a,className:fe("flex items-center justify-center gap-4","top"===r?"pb-3":"pt-3",e),children:n.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[!t&&(0,s.jsx)("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,s.jsx)("span",{className:"capitalize",style:{fontSize:i},children:e[o]})]},e.value))}):null);FG.displayName="ChartLegendContent";const BG=n.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:l,labelClassName:c,formatter:u,color:d,nameKey:f="name",labelKey:p},h)=>{if(!e||null==t||!t.length)return null;const m=1===t.length&&"dot"!==r;return(0,s.jsxs)("div",{ref:h,className:fe("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[m?null:(()=>{if(o||null==t||!t.length)return null;const[e]=t,n=l?l(a||""):e[p]||a;return n?(0,s.jsx)("div",{className:fe("font-medium",c),children:n}):null})(),(0,s.jsx)("div",{className:"grid gap-1.5",children:t.map((e,t)=>{const n=d||e.color||"#000";return(0,s.jsxs)("div",{className:fe("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,s.jsx)("div",{className:fe({"size-2.5":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?n:"",borderColor:"dashed"===r?n:""}}),(0,s.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,s.jsx)("span",{children:e[f]||e.dataKey}),(0,s.jsx)("span",{className:"font-mono font-medium",children:u?u(e.value??""):e.value??""})]})]},e.dataKey||t)})})]})});BG.displayName="ChartTooltipContent";const zG=n.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:l,labelClassName:c,formatter:u,color:d,nameKey:f="name",labelKey:p},h)=>{if(!e||null==t||!t.length)return null;const m=1===t.length&&"dot"!==r;return(0,s.jsxs)("div",{ref:h,className:fe("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[m?null:(()=>{if(o||null==t||!t.length)return null;const[e]=t,n=l?l(a||""):e[p]||a;return n?(0,s.jsx)("div",{className:fe("font-medium",c),children:n}):null})(),(0,s.jsx)("div",{className:"grid gap-1.5",children:t.map((e,t)=>{const n=d||e.color||"#000";return(0,s.jsxs)("div",{className:fe("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,s.jsx)("div",{className:fe({"size-2.5 ":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?n:"",borderColor:"dashed"===r?n:""}}),(0,s.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,s.jsx)("span",{children:e[f]||e.dataKey}),(0,s.jsx)("span",{className:"font-mono font-medium",children:u?u(e.value??""):e.value??""})]})]},e.dataKey||t)})})]})});zG.displayName="ChartTooltipContent";const VG=n.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:l,labelClassName:c,formatter:u,color:d,nameKey:f="name",labelKey:p},h)=>{if(!e||null==t||!t.length)return null;const m=1===t.length&&"dot"!==r;return(0,s.jsxs)("div",{ref:h,className:fe("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[m?null:(()=>{if(o||null==t||!t.length)return null;const[e]=t,n=l?l(a||""):e[p]||a;return n?(0,s.jsx)("div",{className:fe("font-medium",c),children:n}):null})(),(0,s.jsx)("div",{className:"grid gap-1.5",children:t.map((e,t)=>{var n;const o=e.color||(null==(n=e.payload)?void 0:n.fill)||d||"#000";return(0,s.jsxs)("div",{className:fe("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,s.jsx)("div",{className:fe({"h-2.5 w-2.5 ":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?o:"",borderColor:"dashed"===r?o:""}}),(0,s.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,s.jsx)("span",{children:e[f]||e.dataKey}),(0,s.jsx)("span",{className:"font-mono font-medium",children:u?u(e.value??""):e.value??""})]})]},e.dataKey||t)})})]})});VG.displayName="ChartTooltipContent";const HG=n.forwardRef(({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:o="value"},i)=>n.length?(0,s.jsx)("div",{ref:i,className:fe("flex items-center justify-center gap-4","top"===r?"pb-3":"pt-3",e),children:n.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[!t&&(0,s.jsx)("div",{className:"h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,s.jsx)("span",{className:"capitalize",children:e[o]})]},e.value))}):null);HG.displayName="ChartLegendContent";const WG=n.forwardRef(({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:o="value",fontSizeVariant:i},a)=>n.length?(0,s.jsx)("div",{ref:a,className:fe("flex items-center justify-center gap-4","top"===r?"pb-3":"pt-3",e),children:n.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[!t&&(0,s.jsx)("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,s.jsx)("span",{className:"capitalize",style:{fontSize:i},children:e[o]})]},e.value))}):null);WG.displayName="ChartLegendContent";const $G=(0,n.forwardRef)(({active:e,payload:t,className:r,indicator:o,hideLabel:i=!1,hideIndicator:a=!1,label:l,labelFormatter:c,labelClassName:u,formatter:d,color:f,nameKey:p="name",labelKey:h},m)=>{const g=(0,n.useMemo)(()=>{if(i||null==t||!t.length)return null;const[e]=t,n=c?c(l||""):e[h]||l;return n?(0,s.jsx)("div",{className:fe("font-medium",u),children:n}):null},[l,c,t,i,u,h]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==o;return(0,s.jsxs)("div",{ref:m,className:fe("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",r),children:[y?null:g,(0,s.jsx)("div",{className:"grid gap-1.5",children:t.map((e,t)=>{const n=f||e.color||"#000";return(0,s.jsxs)("div",{className:fe("flex w-full items-stretch gap-2","dot"===o&&"items-center"),children:[!a&&(0,s.jsx)("div",{className:fe({"size-2.5":"dot"===o,"w-1 h-full":"line"===o,"w-0 border-[0.5px] border-dashed":"dashed"===o}),style:{backgroundColor:"dot"===o||"line"===o?n:"",borderColor:"dashed"===o?n:""}}),(0,s.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,s.jsx)("span",{children:e[p]||e.dataKey}),(0,s.jsx)("span",{className:"font-mono font-medium",children:d?d(e.value??""):e.value??""})]})]},e.dataKey||t)})})]})});$G.displayName="ChartTooltipContent",(0,n.createContext)(null);const UG=(0,n.createContext)(void 0),qG=()=>{const e=(0,n.useContext)(UG);if(!e)throw new Error("Table components must be used within Table component");return e},YG=({children:e,className:t,checkboxSelection:r=!1,...o})=>{const i={checkboxSelection:r},a=n.Children.toArray(e).find(e=>n.isValidElement(e)&&e.type===QG),l=n.Children.toArray(e).filter(e=>n.isValidElement(e)&&e.type!==QG);return(0,s.jsx)(UG.Provider,{value:i,children:(0,s.jsxs)("div",{className:"flow-root border-0.5 border-solid border-border-subtle rounded-md divide-y-0.5 divide-x-0 divide-solid divide-border-subtle overflow-hidden",children:[(0,s.jsx)("div",{className:"overflow-x-auto w-full",children:(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)("table",{className:fe("table-fixed min-w-full border-collapse border-spacing-0",t),...o,children:l})})}),a]})})},KG=({children:e,className:t,selected:n,onChangeSelection:r,indeterminate:o,disabled:i,...a})=>{const{checkboxSelection:l}=qG();return(0,s.jsx)("thead",{className:fe("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...a,children:(0,s.jsxs)("tr",{children:[l&&(0,s.jsx)("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:(0,s.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,s.jsx)(qe,{size:"sm",checked:n,indeterminate:o,disabled:i,onChange:e=>{"function"==typeof r&&r(e)},"aria-label":n?"Deselect all":"Select all"})})}),e]})})},ZG=({children:e,className:t,...n})=>(0,s.jsx)("th",{scope:"col",className:fe("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...n,children:e}),GG=({children:e,className:t,...n})=>(0,s.jsx)("tbody",{className:fe("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...n,children:e}),XG=({children:e,selected:t,value:n,className:r,onChangeSelection:o,...i})=>{const{checkboxSelection:a}=qG();return(0,s.jsxs)("tr",{className:fe("hover:bg-background-secondary",t&&"bg-background-secondary",r),...i,children:[a&&(0,s.jsx)("td",{className:"relative px-5.5 w-11 overflow-hidden",children:(0,s.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,s.jsx)(qe,{size:"sm",checked:t,onChange:e=>{"function"==typeof o&&o(e,n)},"aria-label":"Select row"})})}),e]})},JG=({children:e,className:t,...n})=>(0,s.jsx)("td",{className:fe("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...n,children:e}),QG=({children:e,className:t,...n})=>{const{checkboxSelection:r}=qG();return(0,s.jsx)("div",{className:fe("px-3 py-3",r&&"px-4",t),...n,children:e})};YG.displayName="Table",KG.displayName="Table.Head",ZG.displayName="Table.HeadCell",GG.displayName="Table.Body",XG.displayName="Table.Row",JG.displayName="Table.Cell",QG.displayName="Table.Footer",YG.Head=KG,YG.HeadCell=ZG,YG.Body=GG,YG.Row=XG,YG.Cell=JG,YG.Footer=QG;const eX=e=>(0,s.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,s.jsx)("rect",{width:"40",height:"40",rx:"20",fill:"url(#paint0_linear_6786_60902)"}),(0,s.jsx)("path",{d:"M19.7688 8.00063C19.7679 7.99979 19.7688 7.99979 19.7688 8.00063C16.5122 14.6651 13.2557 21.333 10 27.9975C11.3949 27.9975 12.7907 27.9975 14.1865 27.9975C16.8208 22.8376 19.4568 17.6759 22.0919 12.5126L19.7688 8.00063Z",fill:"white"}),(0,s.jsx)("path",{d:"M24.1092 16.2694C22.7652 18.976 21.4213 21.6833 20.0774 24.3899L19.9996 24.5408H20.0774C21.3695 24.5408 22.6615 24.5408 23.9536 24.5408C24.4704 25.6933 24.9873 26.8475 25.5041 28C27.0027 28 28.5014 28 30 28C28.0364 24.0881 26.0719 20.1788 24.1092 16.2694Z",fill:"white"}),(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:"paint0_linear_6786_60902",x1:"-5.96046e-07",y1:"40",x2:"47.0588",y2:"28.2353",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{stopColor:"#492CDD"}),(0,s.jsx)("stop",{offset:"1",stopColor:"#AD38E2"})]})})]}),tX=e=>(0,s.jsxs)("svg",{width:"162",height:"151",viewBox:"0 0 162 151",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsxs)("g",{"clip-path":"url(#clip0_17122_11411)",children:[(0,s.jsx)("path",{d:"M131.215 50.0158C132.339 51.7125 130.178 54.0676 128.79 55.3205C127.555 56.4346 125.24 57.8616 124.106 57.645C123.854 57.5967 123.69 57.4709 123.575 57.2365C123.121 56.3177 124.979 54.8814 126.472 53.7274C127.083 53.2556 127.659 52.8103 128.145 52.3669C128.373 52.1587 128.39 51.8043 128.182 51.5761C127.975 51.3475 127.621 51.3311 127.393 51.5389C126.94 51.9518 126.381 52.3837 125.789 52.8413C124.198 54.0707 122.437 55.437 122.386 56.8653C122.089 56.3527 121.698 55.903 121.204 55.5575C123.032 54.5035 126.912 52.055 127.419 50.0193C127.515 49.9569 127.694 49.8413 127.772 49.7987C128.177 49.5799 130.251 48.5609 131.215 50.0167V50.0158Z",fill:"white"}),(0,s.jsx)("path",{d:"M137.53 73.2838C137.316 73.2838 137.111 73.1593 137.019 72.9497C136.377 71.4927 135.585 69.8792 134.819 68.3189C134.048 66.7462 133.249 65.1199 132.598 63.6398C132.474 63.3571 132.601 63.0266 132.884 62.9017C133.166 62.7781 133.497 62.9053 133.622 63.1888C134.263 64.6472 135.056 66.2624 135.823 67.8249C136.594 69.3954 137.392 71.02 138.042 72.4979C138.167 72.7809 138.039 73.1114 137.756 73.2359C137.683 73.2683 137.606 73.2838 137.531 73.2838H137.53Z",fill:"black"}),(0,s.jsx)("path",{d:"M89.1113 18.135C88.2645 16.7005 87.2661 15.3923 86.2132 14.1377C79.6309 6.29409 64.0875 4.16496 58.467 18.0575C56.651 22.5461 56.9536 27.2407 57.7118 31.1991C57.9388 31.0777 58.175 30.9692 58.4285 30.8854C59.9503 30.3853 61.7566 30.6458 63.4832 31.5942C65.6018 31.3493 67.7328 31.0064 69.7683 30.1775C76.5572 27.4126 80.398 24.9809 81.1425 18.1594C82.0047 19.4007 82.6059 20.1011 83.7774 20.9978C84.9493 21.8944 86.7573 22.9479 88.1663 22.4859C88.8193 22.2719 89.4572 21.8129 89.7054 21.1227C90.0598 20.1374 89.6231 19.0011 89.1113 18.1341V18.135Z",fill:"black"}),(0,s.jsx)("path",{d:"M159.755 105.339L143.232 70.1783L119.245 80.4656C119.245 80.4656 115.289 71.8135 113.988 68.4621C111.633 62.3981 105.376 59.2943 92.8062 60.7315L37.9084 61.8514C20.6433 61.8514 6.00022 74.9274 4.56821 92.4721L0.5 150.312L111.257 149.936C111.257 149.936 111.878 132.382 113.134 115.601L117.231 124.434C121.745 134.532 133.598 139.031 143.662 134.465L149.783 131.688C159.783 127.151 164.24 115.373 159.755 105.339V105.339Z",fill:"#E8CAF5"}),(0,s.jsx)("path",{d:"M83.0418 49.2079L82.991 49.2314C81.0719 50.1223 78.871 50.3916 76.7918 49.9907C76.4856 49.9313 76.195 50.1307 76.137 50.4342C76.0786 50.7376 76.2768 51.0318 76.5799 51.0898C77.2775 51.2245 77.9875 51.291 78.6976 51.291C80.3357 51.291 81.9743 50.9365 83.4608 50.2472L83.5112 50.2237C84.0943 49.9539 84.6424 49.6438 85.1635 49.3018C84.9516 53.1383 84.6902 57.8742 84.3973 63.1797C79.5363 75.0295 66.3182 72.9238 62.7941 63.6599C62.895 61.8343 62.9923 60.0768 63.0843 58.4173L63.9988 41.8277C64.0195 41.4476 64.0426 41.0161 63.5475 40.9346C63.4927 40.9253 63.4356 40.9248 63.3803 40.9324C60.9657 41.2682 58.8219 40.523 57.5005 38.891C56.3852 37.5127 56.0672 35.7234 56.6498 34.1042C57.0386 33.0241 57.7743 32.279 58.7781 31.9489C60.1606 31.4922 61.9531 31.8714 63.5741 32.9577C63.8311 33.13 64.1779 33.0613 64.3496 32.8044C64.5212 32.5474 64.4531 32.1997 64.1965 32.0278C63.9607 31.8696 63.7223 31.7252 63.4825 31.5936C63.4825 31.5936 63.4834 31.5936 63.4834 31.5941C65.602 31.3491 67.733 31.0062 69.7684 30.1773C76.5573 27.4124 80.3981 24.9807 81.1427 18.1592C82.0049 19.4005 82.6061 20.1009 83.7775 20.9976C84.9494 21.8942 86.7575 22.9477 88.1665 22.4857C88.5075 22.374 88.8424 22.1937 89.1216 21.9509C93.1079 40.2555 88.0576 46.8861 83.0418 49.2075V49.2079Z",fill:"white"}),(0,s.jsx)("path",{d:"M66.616 11.447C62.6535 6.78072 57.1993 3.46033 51.3106 1.80256C45.422 0.144799 39.121 0.119547 33.1483 1.44195C32.0579 1.68339 30.9099 1.9368 30.0503 2.65094C28.6988 3.77354 28.6386 5.6661 29.2151 6.62434C30.6188 8.95859 34.4667 9.25895 36.8896 9.44546C41.3051 9.78525 47.2477 8.43982 54.917 8.86024C59.1334 9.09149 63.371 10.223 66.616 11.4474V11.447Z",fill:"black"}),(0,s.jsx)("path",{d:"M147.964 76.7808C147.357 76.7808 146.747 76.5699 146.253 76.1398L110.538 45.0423C109.451 44.0956 109.336 42.4454 110.281 41.3565C111.226 40.2675 112.875 40.1523 113.962 41.0991L149.677 72.1965C150.764 73.1432 150.879 74.7934 149.934 75.8824C149.418 76.4765 148.693 76.7808 147.964 76.7808Z",fill:"black"}),(0,s.jsx)("path",{d:"M120.175 80.0671C119.448 78.4443 118.077 75.3835 117.647 74.4306L117.6 74.3269C115.95 70.6765 112.878 63.882 113.946 58.6384C114.402 56.3977 115.982 54.2282 118.641 52.1912C121.805 49.7675 125.851 48.7486 126.245 49.2292C126.359 49.3679 126.39 49.5132 126.347 49.7148C126.016 51.2963 121.821 54.0337 119.755 55.0815C119.553 55.1834 119.432 55.3978 119.45 55.6237C119.467 55.8496 119.619 56.0428 119.834 56.1132C121.606 56.6905 122.185 58.7802 121.973 60.5943C121.751 62.4927 120.927 63.7677 119.032 65.141C118.782 65.3222 118.726 65.6726 118.907 65.9229C119.088 66.1728 119.438 66.229 119.688 66.0479C121.841 64.4876 122.825 62.9454 123.084 60.7246C123.18 59.9094 123.137 59.0478 122.934 58.241C123.19 58.4989 123.514 58.6708 123.896 58.7439C124.041 58.7718 124.192 58.7846 124.347 58.7846C124.363 58.7846 124.38 58.782 124.397 58.7815C124.189 59.2852 124.127 59.8784 124.525 60.4512C124.877 60.9581 125.402 61.2673 126.042 61.3444C126.151 61.3577 126.262 61.3639 126.375 61.3639C126.47 61.3639 126.566 61.3568 126.663 61.3484C126.435 61.9748 126.437 62.6424 126.82 63.159C127.188 63.6551 127.722 63.9475 128.364 64.0051C128.444 64.0122 128.524 64.0157 128.606 64.0157C128.713 64.0157 128.822 64.0087 128.932 63.9971C128.743 64.597 128.772 65.2247 129.146 65.7063C129.517 66.1825 130.045 66.4559 130.673 66.4971C130.729 66.5006 130.786 66.5024 130.844 66.5024C131.682 66.5024 132.628 66.1139 133.501 65.6009C133.928 66.5002 134.376 67.4172 134.819 68.3192C135.57 69.848 136.344 71.4265 136.978 72.8601L120.174 80.0666L120.175 80.0671Z",fill:"white"}),(0,s.jsx)("path",{d:"M78.6976 51.2912C77.9875 51.2912 77.2775 51.2243 76.5799 51.0901C76.2768 51.0316 76.0782 50.7379 76.137 50.4344C76.1954 50.131 76.4856 49.9316 76.7918 49.991C78.871 50.3919 81.0719 50.1226 82.991 49.2317L83.0418 49.2082C88.1683 46.8358 93.3371 39.9695 88.8504 20.7307C88.7801 20.4295 88.9672 20.1287 89.268 20.0582C89.5706 19.9895 89.8688 20.1752 89.9396 20.4764C93.6265 36.2854 91.4039 46.5722 83.5112 50.2245L83.4608 50.2479C81.9748 50.9373 80.3358 51.2917 78.6976 51.2917V51.2912Z",fill:"black"}),(0,s.jsx)("path",{d:"M100.043 52.5748C111.369 52.5748 120.55 43.3806 120.55 32.0389C120.55 20.6972 111.369 11.5029 100.043 11.5029C88.7177 11.5029 79.5364 20.6972 79.5364 32.0389C79.5364 43.3806 88.7177 52.5748 100.043 52.5748Z",fill:"white"}),(0,s.jsx)("path",{d:"M100.043 53.1343C88.4272 53.1343 78.9773 43.6707 78.9773 32.0389C78.9773 20.407 88.4276 10.9434 100.043 10.9434C111.658 10.9434 121.109 20.407 121.109 32.0389C121.109 43.6707 111.659 53.1343 100.043 53.1343ZM100.043 12.0629C89.0439 12.0629 80.0952 21.0242 80.0952 32.0389C80.0952 43.0535 89.0439 52.0148 100.043 52.0148C111.042 52.0148 119.991 43.0535 119.991 32.0389C119.991 21.0242 111.043 12.0629 100.043 12.0629Z",fill:"black"}),(0,s.jsx)("path",{d:"M100.043 50.2184C109.988 50.2184 118.05 42.1452 118.05 32.1864C118.05 22.2275 109.988 14.1543 100.043 14.1543C90.0984 14.1543 82.0366 22.2275 82.0366 32.1864C82.0366 42.1452 90.0984 50.2184 100.043 50.2184Z",fill:"white"}),(0,s.jsx)("path",{d:"M100.043 50.7778C89.8055 50.7778 81.4771 42.4376 81.4771 32.1858C81.4771 21.934 89.8055 13.5938 100.043 13.5938C110.28 13.5938 118.609 21.934 118.609 32.1858C118.609 42.4376 110.28 50.7778 100.043 50.7778ZM100.043 14.7137C90.4222 14.7137 82.5954 22.5515 82.5954 32.1858C82.5954 41.82 90.4222 49.6578 100.043 49.6578C109.663 49.6578 117.49 41.82 117.49 32.1858C117.49 22.5515 109.663 14.7137 100.043 14.7137Z",fill:"black"}),(0,s.jsx)("path",{d:"M57.4683 150.198C57.4581 150.198 57.4475 150.198 57.4369 150.197C57.1285 150.179 56.8923 149.915 56.9095 149.607C56.9095 149.607 59.7944 97.6149 61.5591 65.7284C62.4416 49.7883 62.7672 43.8816 62.8632 42.1118C60.3217 42.2819 58.0788 41.3852 56.6313 39.5968C55.267 37.9111 54.8803 35.7164 55.597 33.7255C56.1071 32.3092 57.0856 31.3274 58.4283 30.8862C60.1611 30.3165 62.2629 30.7329 64.1957 32.0287C64.4523 32.2006 64.5209 32.5484 64.3488 32.8053C64.1767 33.0623 63.8303 33.1314 63.5733 32.9586C61.9523 31.8719 60.1598 31.4931 58.7773 31.9499C57.774 32.2799 57.0378 33.0251 56.649 34.1052C56.0664 35.7244 56.3844 37.5137 57.4997 38.8919C58.8216 40.524 60.9649 41.2691 63.3795 40.9333C63.4357 40.9263 63.4936 40.9263 63.5494 40.9364C64.0417 41.0197 64.0223 41.3826 63.99 41.9833L62.6756 65.7909C60.9105 97.6774 58.0261 149.669 58.0261 149.669C58.0093 149.967 57.7629 150.198 57.4683 150.198V150.198Z",fill:"black"}),(0,s.jsx)("path",{d:"M79.3913 31.0328C79.174 31.0328 78.967 30.9056 78.8768 30.6925C78.4525 29.6979 77.255 29.2567 76.2967 29.336C75.0483 29.4379 73.9808 30.2296 73.3053 30.8759C73.0819 31.0895 72.7289 31.0815 72.5148 30.8578C72.3015 30.6345 72.3099 30.2796 72.5329 30.0661C73.6889 28.9603 74.959 28.3219 76.2056 28.2201C77.815 28.0916 79.3386 28.9244 79.9053 30.253C80.0265 30.5375 79.8943 30.8666 79.6107 30.988C79.539 31.0186 79.4647 31.0328 79.3917 31.0328H79.3913Z",fill:"black"}),(0,s.jsx)("path",{d:"M77.1613 32.7355C77.3353 32.2231 77.1604 31.7001 76.7706 31.5674C76.3809 31.4347 75.9238 31.7424 75.7498 32.2548C75.5759 32.7672 75.7508 33.2902 76.1406 33.4229C76.5303 33.5557 76.9873 33.2479 77.1613 32.7355Z",fill:"black"}),(0,s.jsx)("path",{d:"M22.9982 150.5C22.985 150.5 22.9712 150.5 22.9575 150.499C22.6496 150.477 22.4178 150.209 22.4399 149.901C22.4793 149.352 26.3922 94.6184 28.6436 63.393C28.6657 63.0846 28.9408 62.8485 29.2417 62.8751C29.5496 62.8972 29.7809 63.1657 29.7588 63.474C27.5071 94.6991 23.5941 149.431 23.5552 149.981C23.534 150.275 23.2889 150.5 22.9982 150.5Z",fill:"black"}),(0,s.jsx)("path",{d:"M79.7085 150.07C79.4002 150.053 79.164 149.792 79.1808 149.483C79.5572 142.65 83.2999 74.2988 84.704 48.8888C84.7213 48.5804 84.9721 48.3501 85.2933 48.3607C85.6016 48.378 85.8378 48.642 85.8206 48.9508C84.4169 74.3604 80.6738 142.71 80.2974 149.545C80.2806 149.854 80.0164 150.087 79.7081 150.07H79.7085Z",fill:"black"}),(0,s.jsx)("path",{d:"M58.5451 37.0226C58.5243 37.0226 58.504 37.0217 58.4827 37.0195C58.1757 36.9854 57.9545 36.7085 57.9886 36.4015C58.1067 35.3316 58.8791 34.415 59.9099 34.1213C60.9234 33.8329 62.0984 34.1771 62.8376 34.9763C63.0473 35.2036 63.0336 35.5576 62.8066 35.7676C62.5797 35.9776 62.2262 35.9634 62.0165 35.7366C61.564 35.2461 60.8243 35.0255 60.2164 35.1979C59.6267 35.3658 59.168 35.9116 59.1003 36.5247C59.0684 36.8113 58.8265 37.0231 58.5451 37.0231V37.0226Z",fill:"black"}),(0,s.jsx)("path",{d:"M111.141 150.197C111.131 150.197 111.12 150.197 111.109 150.196C110.801 150.179 110.565 149.915 110.582 149.606L113.442 98.0456C113.459 97.7373 113.71 97.4998 114.031 97.5175C114.339 97.5348 114.575 97.7988 114.558 98.1076L111.699 149.668C111.682 149.966 111.435 150.197 111.141 150.197Z",fill:"black"}),(0,s.jsx)("path",{d:"M119.616 81.5581C119.616 81.5581 117.223 76.2096 116.628 74.8925L116.581 74.7888C114.878 71.0232 111.709 64.0138 112.85 58.4146C113.361 55.9009 115.081 53.5082 117.961 51.3015C119.324 50.2573 121.259 49.2202 123.011 48.5947C125.146 47.8323 126.525 47.8066 127.108 48.5176C127.437 48.9194 127.552 49.4125 127.441 49.9446C127.011 51.9939 123.054 54.4894 121.204 55.5562C122.782 56.6598 123.306 58.8213 123.084 60.7249C122.824 62.9453 121.84 64.4878 119.688 66.0481C119.437 66.2293 119.087 66.1731 118.907 65.9232C118.725 65.6729 118.782 65.3225 119.032 65.1413C120.926 63.768 121.751 62.493 121.973 60.5946C122.185 58.7805 121.605 56.6908 119.834 56.1135C119.618 56.0431 119.466 55.8499 119.449 55.624C119.432 55.3981 119.552 55.1837 119.754 55.0818C121.821 54.034 126.015 51.2966 126.347 49.7151C126.389 49.5135 126.358 49.3686 126.245 49.2295C125.85 48.7489 121.804 49.7674 118.64 52.1915C115.981 54.229 114.401 56.398 113.945 58.6387C112.877 63.8822 115.949 70.6768 117.599 74.3272L117.646 74.4309C118.242 75.7484 120.637 81.1 120.637 81.1L119.616 81.5577V81.5581Z",fill:"black"}),(0,s.jsx)("path",{d:"M133.925 112.557C133.713 112.557 133.51 112.435 133.416 112.228C132.348 109.868 131.294 107.544 130.248 105.239C126.549 97.0835 123.055 89.3804 119.405 81.0792C119.281 80.7965 119.409 80.4656 119.692 80.3411C119.974 80.2175 120.305 80.3451 120.429 80.6282C124.076 88.9232 127.569 96.6241 131.267 104.777C132.312 107.082 133.367 109.406 134.435 111.767C134.562 112.049 134.438 112.38 134.156 112.508C134.082 112.542 134.003 112.558 133.926 112.558L133.925 112.557Z",fill:"black"}),(0,s.jsx)("path",{d:"M134.391 96.9552C134.18 96.9552 133.978 96.8347 133.883 96.6296L125.928 79.3595C125.799 79.0787 125.921 78.7464 126.202 78.6166C126.481 78.4859 126.815 78.6095 126.944 78.8908L134.899 96.1609C135.028 96.4417 134.906 96.7745 134.625 96.9038C134.549 96.9388 134.47 96.9552 134.391 96.9552Z",fill:"black"}),(0,s.jsx)("path",{d:"M126.375 61.3641C126.262 61.3641 126.151 61.3579 126.042 61.3446C125.402 61.2675 124.877 60.9587 124.525 60.4515C123.715 59.2872 124.804 58.0388 125.162 57.6286C125.366 57.396 125.718 57.3725 125.951 57.5754C126.184 57.7792 126.208 58.1327 126.005 58.3657C125.132 59.3656 125.366 59.7014 125.443 59.8117C125.615 60.0594 125.848 60.1936 126.176 60.2331C127.464 60.3855 129.703 58.9922 130.881 57.9511C132.133 56.8453 133.949 54.3782 133.834 53.1798C133.813 52.9636 133.731 52.8281 133.559 52.7266C133.351 52.6039 132.985 52.4869 132.225 52.8892C131.953 53.0336 131.614 52.9291 131.47 52.6557C131.326 52.3824 131.43 52.0439 131.703 51.8991C132.631 51.4073 133.446 51.3612 134.125 51.7613C134.608 52.0448 134.892 52.4984 134.947 53.0726C135.135 55.0276 132.575 57.948 131.621 58.791C130.574 59.7156 128.21 61.3645 126.375 61.3645V61.3641Z",fill:"black"}),(0,s.jsx)("path",{d:"M124.346 58.785C124.191 58.785 124.041 58.7721 123.896 58.7442C123.301 58.6304 122.843 58.2804 122.572 57.7324C121.712 55.9909 123.877 54.3172 125.789 52.8402C126.381 52.3825 126.94 51.9506 127.392 51.5377C127.621 51.3299 127.974 51.3463 128.182 51.5749C128.39 51.8035 128.373 52.1579 128.145 52.3657C127.659 52.8092 127.082 53.2548 126.472 53.7262C124.979 54.8803 123.12 56.3165 123.574 57.2353C123.69 57.4697 123.854 57.5959 124.105 57.6438C125.24 57.8609 127.555 56.4335 128.79 55.3193C130.178 54.0664 132.338 51.7114 131.215 50.0146C130.251 48.5589 128.177 49.5774 127.772 49.7967C127.677 49.8481 127.429 50.0106 127.366 50.051C127.108 50.2193 126.761 50.1475 126.593 49.8879C126.424 49.6292 126.497 49.2823 126.756 49.1135C126.83 49.0652 127.128 48.8721 127.241 48.811C128.776 47.9825 130.983 47.6392 132.146 49.3957C133.323 51.1718 132.397 53.5711 129.538 56.1513C128.677 56.9288 126.197 58.7846 124.346 58.7846L124.346 58.785Z",fill:"black"}),(0,s.jsx)("path",{d:"M78.0025 44.3028H77.9963C77.0903 44.2997 76.1967 43.8004 75.7198 43.0304C75.2424 42.26 75.192 41.2362 75.5919 40.4224C75.7286 40.146 76.0626 40.0317 76.3404 40.1677C76.6174 40.3046 76.7315 40.6395 76.5948 40.9173C76.3612 41.3922 76.3904 41.9898 76.6696 42.4399C76.9483 42.8896 77.4703 43.1815 77.9994 43.1833H78.0029C78.5303 43.1833 79.0518 42.8944 79.3328 42.4474C79.4973 42.1852 79.8428 42.1076 80.1039 42.2711C80.3653 42.4355 80.444 42.781 80.2799 43.0433C79.7995 43.8093 78.9063 44.3032 78.0025 44.3032V44.3028Z",fill:"black"}),(0,s.jsx)("path",{d:"M73.2955 36.5176C73.1902 36.5176 73.0845 36.4879 72.9903 36.4263C72.7319 36.2571 72.6589 35.9102 72.8279 35.6515L73.092 35.2457C73.261 34.9865 73.6074 34.9134 73.8657 35.0817C74.1245 35.2505 74.1975 35.5974 74.0294 35.8566L73.7636 36.2637C73.6561 36.4281 73.4773 36.5176 73.2951 36.5176H73.2955Z",fill:"black"}),(0,s.jsx)("path",{d:"M75.0442 37.2776C74.9536 37.2776 74.8624 37.2559 74.777 37.2093C74.5059 37.0614 74.4059 36.7211 74.5536 36.4496L74.7788 36.0354C74.9266 35.7638 75.265 35.6641 75.5375 35.8107C75.8087 35.9587 75.9091 36.2985 75.7618 36.5705L75.5357 36.9856C75.434 37.1717 75.2424 37.2776 75.0442 37.2776Z",fill:"black"}),(0,s.jsx)("path",{d:"M96.6458 46.4222C96.5631 46.4222 96.4795 46.404 96.4003 46.3655C96.1229 46.2295 96.0079 45.8941 96.1437 45.6163L97.6788 42.4758C97.8151 42.198 98.1504 42.0837 98.4269 42.2188C98.7043 42.3549 98.8193 42.6902 98.6835 42.968L97.1484 46.1085C97.0511 46.307 96.8524 46.4222 96.6458 46.4222Z",fill:"black"}),(0,s.jsx)("path",{d:"M100.012 46.1527C99.9266 46.1527 99.8403 46.1332 99.7594 46.092C99.4838 45.952 99.3741 45.6149 99.5138 45.3393L100.633 43.134C100.773 42.8584 101.109 42.7472 101.385 42.8886C101.66 43.0285 101.77 43.3657 101.63 43.6412L100.511 45.8457C100.413 46.0402 100.216 46.1522 100.012 46.1522L100.012 46.1527Z",fill:"black"}),(0,s.jsx)("path",{d:"M90.7221 25.9218C90.4837 25.9218 90.2629 25.7685 90.1886 25.5284L89.7643 24.1657C89.6723 23.8706 89.8364 23.5565 90.1311 23.4644C90.4275 23.3713 90.7398 23.537 90.8314 23.8316L91.2556 25.1952C91.3477 25.4903 91.1831 25.8044 90.8885 25.8961C90.8332 25.9138 90.777 25.9218 90.7221 25.9218Z",fill:"black"}),(0,s.jsx)("path",{d:"M100.732 38.0663C100.598 38.0663 100.465 38.0654 100.331 38.0632C96.6351 38.0091 93.1628 37.2152 90.5536 35.8277C87.8263 34.3773 86.3407 32.4373 86.3708 30.3649C86.4009 28.292 87.9422 26.3959 90.7107 25.0261C93.3592 23.7148 96.8568 23.0259 100.548 23.0769C104.244 23.1309 107.716 23.9248 110.326 25.3123C113.053 26.7627 114.538 28.7027 114.508 30.7751C114.478 32.8475 112.937 34.7437 110.169 36.1139C107.616 37.3774 104.278 38.0663 100.732 38.0663ZM100.145 24.1937C96.7687 24.1937 93.6074 24.8414 91.2061 26.03C88.8327 27.2044 87.5126 28.7501 87.4892 30.3813C87.4657 32.0129 88.7398 33.5958 91.0778 34.8393C93.5335 36.1454 96.8258 36.8932 100.347 36.9441C103.875 36.9902 107.181 36.3447 109.674 35.1105C112.047 33.936 113.367 32.3904 113.39 30.7592C113.414 29.1276 112.14 27.5447 109.802 26.3011C107.346 24.9951 104.054 24.2473 100.533 24.1964C100.403 24.1946 100.274 24.1933 100.145 24.1933V24.1937Z",fill:"black"}),(0,s.jsx)("path",{d:"M105.728 31.6824C106.48 27.9276 104.569 24.3775 101.46 23.753C98.3504 23.1285 95.2202 25.6662 94.4682 29.421C93.7163 33.1758 95.6274 36.726 98.7368 37.3504C101.846 37.9749 104.976 35.4372 105.728 31.6824Z",fill:"black"}),(0,s.jsx)("path",{d:"M103.199 28.3228C103.309 27.7732 103.028 27.2532 102.571 27.1614C102.113 27.0695 101.653 27.4406 101.543 27.9902C101.433 28.5398 101.715 29.0598 102.172 29.1516C102.629 29.2435 103.089 28.8724 103.199 28.3228Z",fill:"white"}),(0,s.jsx)("path",{d:"M92.4811 25.2086C92.2316 25.2086 92.0042 25.0407 91.94 24.7873L91.6206 23.5331C91.5446 23.2336 91.7255 22.9288 92.0246 22.8522C92.3241 22.7764 92.6284 22.9576 92.7045 23.2567L93.0235 24.5104C93.1 24.8099 92.9195 25.1147 92.62 25.1913C92.574 25.2033 92.5271 25.2086 92.4815 25.2086H92.4811Z",fill:"black"}),(0,s.jsx)("path",{d:"M94.9395 24.5335C94.6679 24.5335 94.4295 24.335 94.3879 24.0577L94.1733 22.6511C94.1264 22.3459 94.3361 22.0597 94.6414 22.0132C94.9457 21.9671 95.2319 22.1767 95.2784 22.4819L95.493 23.8894C95.5394 24.1946 95.3297 24.4808 95.0245 24.5269C94.9961 24.5313 94.9678 24.5335 94.9395 24.5335Z",fill:"black"}),(0,s.jsx)("path",{d:"M97.3265 24.1211C97.035 24.1211 96.7894 23.8943 96.7691 23.5988L96.6775 22.2259C96.6572 21.9176 96.8903 21.6509 97.1982 21.63C97.5026 21.6106 97.7724 21.8427 97.7937 22.1515L97.8852 23.5239C97.9056 23.8327 97.6729 24.0994 97.3645 24.1202C97.3517 24.1211 97.3389 24.1211 97.3265 24.1211Z",fill:"black"}),(0,s.jsx)("path",{d:"M99.4292 23.8159C99.419 23.8159 99.4084 23.8159 99.3978 23.815C99.0895 23.7978 98.8537 23.5337 98.8705 23.2249L98.9399 21.957C98.9572 21.6487 99.2098 21.4201 99.5292 21.429C99.8375 21.4462 100.073 21.7103 100.057 22.0191L99.9871 23.287C99.9703 23.5851 99.7238 23.8159 99.4292 23.8159Z",fill:"black"}),(0,s.jsx)("path",{d:"M102.389 23.82C102.378 23.82 102.367 23.82 102.357 23.8191C102.048 23.8018 101.813 23.5369 101.831 23.2281L101.901 22.0094C101.919 21.7002 102.183 21.4592 102.491 21.4831C102.8 21.5008 103.035 21.7657 103.017 22.0745L102.947 23.2928C102.93 23.5905 102.683 23.8204 102.389 23.8204L102.389 23.82Z",fill:"black"}),(0,s.jsx)("path",{d:"M104.798 24.1846C104.763 24.1846 104.729 24.1815 104.694 24.1748C104.39 24.1177 104.19 23.8248 104.248 23.5214L104.526 22.0413C104.583 21.7374 104.877 21.534 105.178 21.5947C105.482 21.6519 105.681 21.9447 105.624 22.2482L105.346 23.7283C105.296 23.9972 105.061 24.1846 104.798 24.1846Z",fill:"black"}),(0,s.jsx)("path",{d:"M107.347 24.7773C107.287 24.7773 107.226 24.768 107.167 24.7472C106.874 24.6475 106.718 24.3286 106.818 24.0366L107.265 22.7297C107.365 22.4369 107.684 22.2805 107.975 22.3811C108.267 22.4808 108.423 22.7997 108.323 23.0917L107.876 24.3986C107.797 24.6311 107.58 24.7773 107.347 24.7773Z",fill:"black"}),(0,s.jsx)("path",{d:"M109.294 25.5843C109.219 25.5843 109.143 25.5692 109.07 25.5373C108.787 25.4133 108.658 25.0832 108.782 24.8002L109.351 23.4981C109.475 23.2155 109.804 23.0844 110.087 23.2097C110.37 23.3338 110.499 23.6634 110.375 23.9469L109.806 25.2489C109.715 25.4594 109.509 25.5843 109.294 25.5843Z",fill:"black"}),(0,s.jsx)("path",{d:"M111.162 26.5945C111.063 26.5945 110.962 26.5684 110.872 26.5126C110.608 26.3518 110.525 26.0076 110.686 25.7431L111.477 24.4433C111.638 24.1792 111.982 24.0955 112.246 24.2572C112.509 24.4185 112.593 24.7627 112.432 25.0267L111.64 26.3265C111.535 26.4993 111.351 26.595 111.163 26.595L111.162 26.5945Z",fill:"black"}),(0,s.jsx)("path",{d:"M128.606 64.0161C128.524 64.0161 128.443 64.013 128.364 64.0055C127.722 63.9483 127.188 63.6555 126.82 63.1593C126.149 62.2551 126.642 60.888 127.506 60.0888C127.732 59.8801 128.087 59.8926 128.297 60.1207C128.506 60.348 128.492 60.7019 128.265 60.9119C127.69 61.4427 127.499 62.1971 127.717 62.4917C127.897 62.734 128.134 62.8608 128.463 62.89C129.752 63.0047 131.951 61.5415 133.097 60.4645C134.314 59.3206 136.054 56.799 135.903 55.6051C135.875 55.3897 135.788 55.2568 135.614 55.1607C135.401 55.0451 135.032 54.9392 134.286 55.3636C134.018 55.5151 133.676 55.4225 133.524 55.1536C133.371 54.8852 133.465 54.5431 133.733 54.3903C134.645 53.8702 135.459 53.7984 136.151 54.1785C136.642 54.447 136.939 54.8918 137.012 55.4637C137.259 57.4117 134.79 60.4091 133.863 61.281C132.828 62.2534 130.454 64.0157 128.606 64.0157L128.606 64.0161Z",fill:"black"}),(0,s.jsx)("path",{d:"M130.844 66.5031C130.787 66.5031 130.73 66.5013 130.673 66.4978C130.046 66.4561 129.517 66.1828 129.147 65.707C128.47 64.8383 128.919 63.4937 129.744 62.6954C129.966 62.4801 130.32 62.4863 130.534 62.7087C130.749 62.9311 130.743 63.2855 130.521 63.5003C129.992 64.0125 129.819 64.7497 130.028 65.0181C130.205 65.2449 130.433 65.3597 130.746 65.3805C132.001 65.4656 134.082 63.9987 135.165 62.9328C136.315 61.8005 137.939 59.3267 137.766 58.1789C137.736 57.9773 137.652 57.8546 137.486 57.7686C137.283 57.6632 136.949 57.5679 136.408 57.9649C136.16 58.147 135.809 58.0934 135.626 57.8435C135.444 57.5936 135.498 57.2436 135.748 57.0607C136.708 56.3581 137.501 56.5167 137.999 56.7736C138.486 57.0257 138.788 57.4536 138.872 58.0118C139.156 59.8991 136.828 62.8646 135.948 63.7307C134.954 64.7093 132.648 66.5031 130.843 66.5031H130.844Z",fill:"black"}),(0,s.jsx)("path",{d:"M136.368 57.9076C136.939 57.489 137.298 57.5922 137.519 57.7065C137.704 57.8026 137.802 57.9448 137.836 58.1681C138.012 59.3368 136.374 61.8394 135.214 62.9819C134.197 63.9831 132.086 65.5372 130.743 65.45C130.408 65.4278 130.163 65.3042 129.974 65.061C129.727 64.7433 129.944 64.0093 130.418 63.5109C131.775 62.9288 133.109 61.8948 133.815 61.2307C134.384 60.6964 135.535 59.3581 136.276 57.9603C136.308 57.9462 136.339 57.9293 136.368 57.9076H136.368Z",fill:"white"}),(0,s.jsx)("path",{d:"M135.648 55.0994C135.842 55.2057 135.942 55.359 135.972 55.596C136.126 56.8112 134.373 59.3616 133.145 60.5152C132.415 61.2019 131.155 62.1416 129.987 62.6342C129.964 62.6413 129.943 62.651 129.921 62.6617C129.393 62.8774 128.885 62.9988 128.457 62.9589C128.108 62.9275 127.854 62.7923 127.662 62.5327C127.402 62.1823 127.666 61.3813 128.205 60.8741C129.547 60.3265 130.865 59.3652 131.575 58.7379C132.195 58.1899 133.496 56.7576 134.27 55.293C135.034 54.8633 135.423 54.9753 135.648 55.0989L135.648 55.0994Z",fill:"white"}),(0,s.jsx)("path",{d:"M132.193 52.8276C132.982 52.4094 133.371 52.5356 133.594 52.6672C133.785 52.7793 133.88 52.9357 133.903 53.1731C134.02 54.3923 132.189 56.8882 130.927 58.0033C129.821 58.9806 127.551 60.4696 126.167 60.3021C125.818 60.26 125.57 60.1169 125.385 59.8516C125.293 59.72 125.055 59.3718 125.906 58.3746C127.376 57.8053 128.866 56.6659 129.493 56.1001C130.744 54.9713 131.62 53.8793 132.111 52.8608C132.139 52.8519 132.167 52.8413 132.194 52.8271L132.193 52.8276Z",fill:"white"}),(0,s.jsx)("path",{d:"M134.451 120.607C134.336 120.607 134.22 120.572 134.12 120.499C133.871 120.315 133.818 119.965 134.001 119.716C134.869 118.533 135.369 117.074 135.41 115.607C135.419 115.297 135.695 115.049 135.985 115.063C136.293 115.071 136.537 115.329 136.528 115.638C136.482 117.331 135.904 119.015 134.902 120.38C134.792 120.529 134.623 120.608 134.451 120.608L134.451 120.607Z",fill:"black"}),(0,s.jsx)("path",{d:"M132.177 118.033C132.029 118.033 131.882 117.975 131.771 117.86C131.559 117.636 131.568 117.281 131.791 117.068C132.276 116.606 132.598 115.987 132.7 115.323C132.746 115.017 133.033 114.808 133.336 114.854C133.641 114.9 133.851 115.186 133.805 115.491C133.667 116.399 133.225 117.247 132.562 117.879C132.454 117.982 132.315 118.033 132.177 118.033Z",fill:"black"}),(0,s.jsx)("path",{d:"M60.5393 40.8818L62.8782 46.8386L63.375 41.4626L60.5393 40.8818Z",fill:"black"}),(0,s.jsx)("path",{d:"M133.207 84.2401C133.978 84.2401 134.604 83.5508 134.604 82.7006C134.604 81.8504 133.978 81.1611 133.207 81.1611C132.435 81.1611 131.809 81.8504 131.809 82.7006C131.809 83.5508 132.435 84.2401 133.207 84.2401Z",fill:"white"}),(0,s.jsx)("path",{d:"M136.002 90.8651C136.774 90.8651 137.4 90.1758 137.4 89.3256C137.4 88.4754 136.774 87.7861 136.002 87.7861C135.23 87.7861 134.604 88.4754 134.604 89.3256C134.604 90.1758 135.23 90.8651 136.002 90.8651Z",fill:"white"}),(0,s.jsx)("path",{d:"M131.215 50.0149C130.251 48.5591 128.177 49.5776 127.772 49.7969C127.693 49.8394 127.514 49.955 127.419 50.0175C127.321 50.4078 127.096 50.8127 126.788 51.2199C126.871 51.4454 126.925 51.6833 126.944 51.9247C127.101 51.794 127.254 51.6642 127.393 51.5375C127.621 51.3297 127.975 51.3461 128.182 51.5747C128.39 51.8033 128.373 52.1577 128.145 52.3655C127.659 52.809 127.082 53.2546 126.472 53.726C126.429 53.7592 125.996 54.1513 125.777 54.2682C124.468 55.3045 123.189 56.4554 123.574 57.2351C123.69 57.4695 123.854 57.5957 124.105 57.6436C125.24 57.8606 127.554 56.4333 128.79 55.3191C130.177 54.0662 132.338 51.7112 131.214 50.0144L131.215 50.0149Z",fill:"white"}),(0,s.jsx)("path",{d:"M57.1966 150.325C56.9608 150.325 56.7419 150.175 56.6649 149.938C50.7059 131.575 46.6156 109.929 45.4415 90.5528C45.4326 90.407 45.4808 90.2639 45.5759 90.1532C47.3884 88.0479 49.1195 86.4797 50.7939 84.9628C52.2892 83.6081 53.7075 82.3233 55.1488 80.7063C53.1669 78.0438 51.1116 75.5142 49.1208 73.0647C48.9633 72.8707 48.9421 72.5818 49.085 72.3767C51.707 68.62 54.5144 64.9137 57.2294 61.3293C57.4165 61.0834 57.7682 61.0324 58.0146 61.2194C58.2606 61.4063 58.3101 61.755 58.1239 62.0018L58.1208 62.0062C55.4956 65.4714 52.7847 69.0515 50.244 72.6727C52.26 75.1535 54.3251 77.7053 56.3172 80.4037C56.4729 80.6146 56.4618 80.9057 56.2893 81.1041C54.7011 82.9333 53.0966 84.3873 51.5442 85.7934C49.9414 87.2452 48.2856 88.7457 46.5713 90.7127C47.7578 109.94 51.8212 131.387 57.7284 149.592C57.8239 149.886 57.6629 150.202 57.3696 150.297C57.3121 150.316 57.2537 150.325 57.1966 150.325Z",fill:"black"}),(0,s.jsx)("path",{d:"M80.5606 150.121C80.4845 150.121 80.4075 150.105 80.3332 150.073C80.0514 149.946 79.9249 149.615 80.0505 149.333C87.4676 132.682 93.6823 111.588 97.1139 91.4223C95.6222 89.2622 94.1384 87.5783 92.7015 85.9484C91.3111 84.3704 89.8729 82.7388 88.4922 80.7328C88.3444 80.5179 88.3643 80.2295 88.54 80.0373C90.8249 77.5347 93.1563 75.1986 95.4196 72.9402C93.2824 69.0266 90.974 65.1418 88.739 61.3823C88.5811 61.1165 88.6683 60.7727 88.9332 60.6146C89.1987 60.4573 89.5415 60.5437 89.6999 60.8091C92.0101 64.6961 94.3994 68.7156 96.6021 72.7727C96.7206 72.9911 96.6812 73.2613 96.5056 73.4368C94.2592 75.6789 91.9388 77.9936 89.6681 80.4625C90.9271 82.2426 92.199 83.6855 93.5403 85.2072C95.0404 86.9093 96.5914 88.6698 98.1646 90.9766C98.2464 91.0962 98.2787 91.2429 98.2539 91.386C94.8148 111.708 88.5524 132.995 81.0716 149.79C80.9787 149.998 80.7747 150.121 80.5606 150.121V150.121Z",fill:"black"}),(0,s.jsx)("path",{d:"M79.1806 149.484C79.4978 143.721 82.2092 94.7492 83.8929 64.3008C78.6772 74.8898 66.1951 72.6135 62.7945 63.6416L62.6759 65.7907C60.9108 97.6771 58.0264 149.669 58.0264 149.669C58.0154 149.862 57.9079 150.025 57.7539 150.117L79.5681 150.043C79.3319 149.967 79.1664 149.743 79.1806 149.484Z",fill:"black"})]}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"clip0_17122_11411",children:(0,s.jsx)("rect",{width:"161",height:"150",fill:"white",transform:"translate(0.5 0.5)"})})})]}),nX=e=>(0,s.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,s.jsx)("g",{clipPath:"url(#clip0_7302_7183)",children:(0,s.jsx)("path",{d:"M4 3.5V1.5M8 3.5V1.5M3.5 5.5H8.5M2.5 10.5H9.5C10.0523 10.5 10.5 10.0523 10.5 9.5V3.5C10.5 2.94772 10.0523 2.5 9.5 2.5H2.5C1.94772 2.5 1.5 2.94772 1.5 3.5V9.5C1.5 10.0523 1.94772 10.5 2.5 10.5Z",stroke:"#1E293B",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"clip0_7302_7183",children:(0,s.jsx)("rect",{width:"12",height:"12",fill:"white"})})})]}),rX=e=>(0,s.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,s.jsx)("path",{d:"M6 18L18 6M6 6L18 18",stroke:"#475569",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),oX=({svgAttributes:e,pathAttributes:t})=>(0,s.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,s.jsx)("path",{d:"M14.25 5.25L13.5995 14.3569C13.5434 15.1418 12.8903 15.75 12.1033 15.75H5.89668C5.10972 15.75 4.45656 15.1418 4.40049 14.3569L3.75 5.25M7.5 8.25V12.75M10.5 8.25V12.75M11.25 5.25V3C11.25 2.58579 10.9142 2.25 10.5 2.25H7.5C7.08579 2.25 6.75 2.58579 6.75 3V5.25M3 5.25H15",stroke:t?.stroke||"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}),iX=e=>(0,s.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"presentation",...e,children:(0,s.jsxs)("g",{fill:"currentColor",fillRule:"evenodd",children:[(0,s.jsx)("circle",{cx:"5",cy:"12",r:"2"}),(0,s.jsx)("circle",{cx:"12",cy:"12",r:"2"}),(0,s.jsx)("circle",{cx:"19",cy:"12",r:"2"})]})}),aX=e=>(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,s.jsx)("g",{clipPath:"url(#clip0_7471_16789)",children:(0,s.jsx)("path",{d:"M9.9974 13.3327V9.99935M9.9974 6.66602H10.0057M18.3307 9.99935C18.3307 14.6017 14.5998 18.3327 9.9974 18.3327C5.39502 18.3327 1.66406 14.6017 1.66406 9.99935C1.66406 5.39698 5.39502 1.66602 9.9974 1.66602C14.5998 1.66602 18.3307 5.39698 18.3307 9.99935Z",stroke:"#046BD2",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"clip0_7471_16789",children:(0,s.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]}),sX=({filled:e,...t})=>e?(0,s.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,s.jsx)("g",{filter:"url(#filter0_d_7207_80194)",children:(0,s.jsxs)("g",{clipPath:"url(#clip0_7207_80194)",children:[(0,s.jsx)("rect",{x:"2",y:"1",width:"20",height:"20",rx:"10",fill:"#005AE0"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 6C12.5523 6 13 6.44772 13 7V10L16 10C16.5523 10 17 10.4477 17 11C17 11.5523 16.5523 12 16 12H13V15C13 15.5523 12.5523 16 12 16C11.4477 16 11 15.5523 11 15V12H8C7.44772 12 7 11.5523 7 11C7 10.4477 7.44772 10 8 10L11 10V7C11 6.44772 11.4477 6 12 6Z",fill:"white"})]})}),(0,s.jsxs)("defs",{children:[(0,s.jsxs)("filter",{id:"filter0_d_7207_80194",x:"0",y:"0",width:"24",height:"24",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,s.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,s.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,s.jsx)("feOffset",{dy:"1"}),(0,s.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,s.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0"}),(0,s.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_7207_80194"}),(0,s.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_7207_80194",result:"shape"})]}),(0,s.jsx)("clipPath",{id:"clip0_7207_80194",children:(0,s.jsx)("rect",{x:"2",y:"1",width:"20",height:"20",rx:"10",fill:"white"})})]})]}):(0,s.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,s.jsx)("path",{d:"M10.0013 4.1665V15.8332M4.16797 9.99984H15.8346",stroke:"white",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),lX=e=>(0,s.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,s.jsx)("circle",{cx:"4",cy:"4",r:"3"})});var cX="popstate";function uX(e={}){return function(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",l=null,c=u();function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:p.location,delta:t})}function f(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),dX(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:mX(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==c&&(c=0,a.replaceState({...a.state,idx:c},""));let p={get action(){return s},get location(){return e(o,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(cX,d),l=e,()=>{o.removeEventListener(cX,d),l=null}},createHref:e=>t(o,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=hX(p.location,e,t);n&&n(r,e),c=u()+1;let d=pX(r,c),f=p.createHref(r);try{a.pushState(d,"",f)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(f)}i&&l&&l({action:s,location:p.location,delta:1})},replace:function(e,t){s="REPLACE";let r=hX(p.location,e,t);n&&n(r,e),c=u();let o=pX(r,c),d=p.createHref(r);a.replaceState(o,"",d),i&&l&&l({action:s,location:p.location,delta:0})},go:e=>a.go(e)};return p}(function(e,t){let{pathname:n,search:r,hash:o}=e.location;return hX("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:mX(t)},null,e)}function dX(e,t){if(!1===e||null==e)throw new Error(t)}function fX(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function pX(e,t){return{usr:e.state,key:e.key,idx:t}}function hX(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?gX(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function mX({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function gX(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function yX(e,t,n="/"){return function(e,t,n,r){let o=MX(("string"==typeof t?gX(t):t).pathname||"/",n);if(null==o)return null;let i=vX(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=TX(o);a=EX(i[e],t,r)}return a}(e,t,n,!1)}function vX(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&a)return;dX(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let c=LX([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(dX(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),vX(e.children,t,u,c,a)),(null!=e.path||e.index)&&t.push({path:c,score:OX(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of bX(e.path))i(e,t,!0,n);else i(e,t)}),t}function bX(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=bX(r.join("/")),s=[];return s.push(...a.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}new WeakMap;var xX=/^:[\w-]+$/,wX=3,CX=2,_X=1,kX=10,SX=-2,jX=e=>"*"===e;function OX(e,t){let n=e.split("/"),r=n.length;return n.some(jX)&&(r+=SX),t&&(r+=CX),n.filter(e=>!jX(e)).reduce((e,t)=>e+(xX.test(t)?wX:""===t?_X:kX),r)}function EX(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let s=r[e],l=e===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=PX({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),d=s.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=PX({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:LX([i,u.pathname]),pathnameBase:FX(LX([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=LX([i,u.pathnameBase]))}return a}function PX(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){fX("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1),l=r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=s[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:i,pathnameBase:a,pattern:e}}function TX(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return fX(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function MX(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var AX=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function NX(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function DX(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function IX(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function RX(e,t,n,r=!1){let o;"string"==typeof e?o=gX(e):(o={...e},dX(!o.pathname||!o.pathname.includes("?"),DX("?","pathname","search",o)),dX(!o.pathname||!o.pathname.includes("#"),DX("#","pathname","hash",o)),dX(!o.search||!o.search.includes("#"),DX("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?gX(e):e;return r?(r=r.replace(/\/\/+/g,"/"),n=r.startsWith("/")?NX(r.substring(1),"/"):NX(r,t)):n=t,{pathname:n,search:BX(o),hash:zX(i)}}(o,i),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var LX=e=>e.join("/").replace(/\/\/+/g,"/"),FX=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),BX=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",zX=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",VX=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function HX(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function WX(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var $X="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function UX(e,t){let n=e;if("string"!=typeof n||!AX.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if($X)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=MX(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){fX(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Symbol("Uninstrumented"),Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var qX=["POST","PUT","PATCH","DELETE"],YX=(new Set(qX),["GET",...qX]);new Set(YX),Symbol("ResetLoaderData");var KX=n.createContext(null);KX.displayName="DataRouter";var ZX=n.createContext(null);ZX.displayName="DataRouterState";var GX=n.createContext(!1);var XX=n.createContext({isTransitioning:!1});XX.displayName="ViewTransition",n.createContext(new Map).displayName="Fetchers",n.createContext(null).displayName="Await";var JX=n.createContext(null);JX.displayName="Navigation";var QX=n.createContext(null);QX.displayName="Location";var eJ=n.createContext({outlet:null,matches:[],isDataRoute:!1});eJ.displayName="Route";var tJ=n.createContext(null);tJ.displayName="RouteError";var nJ="REACT_ROUTER_ERROR";function rJ(){return null!=n.useContext(QX)}function oJ(){return dX(rJ(),"useLocation() may be used only in the context of a <Router> component."),n.useContext(QX).location}var iJ="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function aJ(e){n.useContext(JX).static||n.useLayoutEffect(e)}function sJ(){let{isDataRoute:e}=n.useContext(eJ);return e?function(){let{router:e}=function(e){let t=n.useContext(KX);return dX(t,gJ(e)),t}("useNavigate"),t=yJ("useNavigate"),r=n.useRef(!1);aJ(()=>{r.current=!0});let o=n.useCallback(async(n,o={})=>{fX(r.current,iJ),r.current&&("number"==typeof n?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t]);return o}():function(){dX(rJ(),"useNavigate() may be used only in the context of a <Router> component.");let e=n.useContext(KX),{basename:t,navigator:r}=n.useContext(JX),{matches:o}=n.useContext(eJ),{pathname:i}=oJ(),a=JSON.stringify(IX(o)),s=n.useRef(!1);aJ(()=>{s.current=!0});let l=n.useCallback((n,o={})=>{if(fX(s.current,iJ),!s.current)return;if("number"==typeof n)return void r.go(n);let l=RX(n,JSON.parse(a),i,"path"===o.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:LX([t,l.pathname])),(o.replace?r.replace:r.push)(l,o.state,o)},[t,r,a,i,e]);return l}()}function lJ(e,{relative:t}={}){let{matches:r}=n.useContext(eJ),{pathname:o}=oJ(),i=JSON.stringify(IX(r));return n.useMemo(()=>RX(e,JSON.parse(i),o,"path"===t),[e,i,o,t])}function cJ(e,t,r,o,i){dX(rJ(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=n.useContext(JX),{matches:s}=n.useContext(eJ),l=s[s.length-1],c=l?l.params:{},u=l?l.pathname:"/",d=l?l.pathnameBase:"/",f=l&&l.route;{let e=f&&f.path||"";bJ(u,!f||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let p,h=oJ();if(t){let e="string"==typeof t?gX(t):t;dX("/"===d||e.pathname?.startsWith(d),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=h;let m=p.pathname||"/",g=m;if("/"!==d){let e=d.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let y=yX(e,{pathname:g});fX(f||null!=y,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),fX(null==y||void 0!==y[y.length-1].route.element||void 0!==y[y.length-1].route.Component||void 0!==y[y.length-1].route.lazy,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=function(e,t=[],r=null,o=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let i=e,a=r?.errors;if(null!=a){let e=i.findIndex(e=>e.route.id&&void 0!==a?.[e.route.id]);dX(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,l=-1;if(r)for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){s=!0,i=l>=0?i.slice(0,l+1):[i[0]];break}}}let c=r&&o?(e,t)=>{o(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:WX(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,o,u)=>{let d,f=!1,p=null,h=null;r&&(d=a&&o.route.id?a[o.route.id]:void 0,p=o.route.errorElement||dJ,s&&(l<0&&0===u?(bJ("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,h=null):l===u&&(f=!0,h=o.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,u+1)),g=()=>{let t;return t=d?p:f?h:o.route.Component?n.createElement(o.route.Component,null):o.route.element?o.route.element:e,n.createElement(mJ,{match:o,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===u)?n.createElement(fJ,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):g()},null)}(y&&y.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:LX([d,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:LX([d,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,r,o,i);return t&&v?n.createElement(QX.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},v):v}function uJ(){let e=function(){let e=n.useContext(tJ),t=function(e){let t=n.useContext(ZX);return dX(t,gJ(e)),t}("useRouteError"),r=yJ("useRouteError");return void 0!==e?e:t.errors?.[r]}(),t=HX(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},a={padding:"2px 4px",backgroundColor:o},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=n.createElement(n.Fragment,null,n.createElement("p",null,"💿 Hey developer 👋"),n.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",n.createElement("code",{style:a},"ErrorBoundary")," or"," ",n.createElement("code",{style:a},"errorElement")," prop on your route.")),n.createElement(n.Fragment,null,n.createElement("h2",null,"Unexpected Application Error!"),n.createElement("h3",{style:{fontStyle:"italic"}},t),r?n.createElement("pre",{style:i},r):null,s)}n.createContext(null);var dJ=n.createElement(uJ,null),fJ=class extends n.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${nJ}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new VX(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?n.createElement(eJ.Provider,{value:this.props.routeContext},n.createElement(tJ.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?n.createElement(hJ,{error:e},t):t}};fJ.contextType=GX;var pJ=new WeakMap;function hJ({children:e,error:t}){let{basename:r}=n.useContext(JX);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${nJ}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let o=pJ.get(t);if(o)throw o;let i=UX(e.location,r);if($X&&!pJ.get(t)){if(!i.isExternal&&!e.reloadDocument){const n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw pJ.set(t,n),n}window.location.href=i.absoluteURL||i.to}return n.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function mJ({routeContext:e,match:t,children:r}){let o=n.useContext(KX);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),n.createElement(eJ.Provider,{value:e},r)}function gJ(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yJ(e){let t=function(e){let t=n.useContext(eJ);return dX(t,gJ(e)),t}(e),r=t.matches[t.matches.length-1];return dX(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var vJ={};function bJ(e,t,n){t||vJ[e]||(vJ[e]=!0,fX(!1,n))}function xJ(e){dX(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function wJ({basename:e="/",children:t=null,location:r,navigationType:o="POP",navigator:i,static:a=!1,unstable_useTransitions:s}){dX(!rJ(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=n.useMemo(()=>({basename:l,navigator:i,static:a,unstable_useTransitions:s,future:{}}),[l,i,a,s]);"string"==typeof r&&(r=gX(r));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:h="default"}=r,m=n.useMemo(()=>{let e=MX(u,l);return null==e?null:{location:{pathname:e,search:d,hash:f,state:p,key:h},navigationType:o}},[l,u,d,f,p,h,o]);return fX(null!=m,`<Router basename="${l}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),null==m?null:n.createElement(JX.Provider,{value:c},n.createElement(QX.Provider,{children:t,value:m}))}function CJ({children:e,location:t}){return cJ(_J(e),t)}function _J(e,t=[]){let r=[];return n.Children.forEach(e,(e,o)=>{if(!n.isValidElement(e))return;let i=[...t,o];if(e.type===n.Fragment)return void r.push.apply(r,_J(e.props.children,i));dX(e.type===xJ,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),dX(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=_J(e.props.children,i)),r.push(a)}),r}r.useOptimistic,n.memo(function({routes:e,future:t,state:n,onError:r}){return cJ(e,void 0,n,r,t)}),n.Component;var kJ="get",SJ="application/x-www-form-urlencoded";function jJ(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var OJ=null,EJ=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function PJ(e){return null==e||EJ.has(e)?e:(fX(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${SJ}"`),null)}function TJ(e,t){if(!1===e||null==e)throw new Error(t)}function MJ(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function AJ(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter((e,t)=>a(e,t)||s(e,t)):"data"===i?t.filter((t,i)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function NJ(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o}).flat(1),[...new Set(r)];var r}function DJ(){let e=n.useContext(KX);return TJ(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function IJ(){let e=n.useContext(ZX);return TJ(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis,Symbol("SingleFetchRedirect");var RJ=n.createContext(void 0);function LJ(){let e=n.useContext(RJ);return TJ(e,"You must render this element inside a <HydratedRouter> element"),e}function FJ(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function BJ({page:e,...t}){let{router:r}=DJ(),o=n.useMemo(()=>yX(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?n.createElement(VJ,{page:e,matches:o,...t}):null}function zJ(e){let{manifest:t,routeModules:r}=LJ(),[o,i]=n.useState([]);return n.useEffect(()=>{let n=!1;return async function(e,t,n){return function(e,t){let n=new Set,r=new Set(t);return e.reduce((e,o)=>{if(t&&(null==(i=o)||"string"!=typeof i.page)&&"script"===o.as&&o.href&&r.has(o.href))return e;var i;let a=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(a)||(n.add(a),e.push({key:a,link:o})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(MJ).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,r).then(e=>{n||i(e)}),()=>{n=!0}},[e,t,r]),o}function VJ({page:e,matches:t,...r}){let o=oJ(),{future:i,manifest:a,routeModules:s}=LJ(),{basename:l}=DJ(),{loaderData:c,matches:u}=IJ(),d=n.useMemo(()=>AJ(e,t,u,a,o,"data"),[e,t,u,a,o]),f=n.useMemo(()=>AJ(e,t,u,a,o,"assets"),[e,t,u,a,o]),p=n.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let n=new Set,r=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in c&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?r=!0:n.add(e.route.id))}),0===n.size)return[];let u=function(e,t,n,r){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:"/"===o.pathname?o.pathname=`_root.${r}`:t&&"/"===MX(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}(e,l,i.unstable_trailingSlashAwareDataRequests,"data");return r&&n.size>0&&u.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[l,i.unstable_trailingSlashAwareDataRequests,c,o,a,d,t,e,s]),h=n.useMemo(()=>NJ(f,a),[f,a]),m=zJ(f);return n.createElement(n.Fragment,null,p.map(e=>n.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),h.map(e=>n.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),m.map(({key:e,link:t})=>n.createElement("link",{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}RJ.displayName="FrameworkContext";function HJ(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}n.Component;var WJ="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{WJ&&(window.__reactRouterVersion="7.13.0")}catch(Yd){}function $J({basename:e,children:t,unstable_useTransitions:r,window:o}){let i=n.useRef();null==i.current&&(i.current=uX({window:o,v5Compat:!0}));let a=i.current,[s,l]=n.useState({action:a.action,location:a.location}),c=n.useCallback(e=>{!1===r?l(e):n.startTransition(()=>l(e))},[r]);return n.useLayoutEffect(()=>a.listen(c),[a,c]),n.createElement(wJ,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a,unstable_useTransitions:r})}var UJ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qJ=n.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},h){let{basename:m,unstable_useTransitions:g}=n.useContext(JX),y="string"==typeof c&&UJ.test(c),v=UX(c,m),b=function(e,{relative:t}={}){dX(rJ(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=n.useContext(JX),{hash:i,pathname:a,search:s}=lJ(e,{relative:t}),l=a;return"/"!==r&&(l="/"===a?r:LX([r,a])),o.createHref({pathname:l,search:s,hash:i})}(c=v.to,{relative:o}),[x,w,C]=function(e,t){let r=n.useContext(RJ),[o,i]=n.useState(!1),[a,s]=n.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=n.useRef(null);n.useEffect(()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),n.useEffect(()=>{if(o){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[o]);let h=()=>{i(!0)},m=()=>{i(!1),s(!1)};return r?"intent"!==e?[a,p,{}]:[a,p,{onFocus:FJ(l,h),onBlur:FJ(c,m),onMouseEnter:FJ(u,h),onMouseLeave:FJ(d,m),onTouchStart:FJ(f,h)}]:[!1,p,{}]}(r,p),_=function(e,{target:t,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l,unstable_useTransitions:c}={}){let u=sJ(),d=oJ(),f=lJ(e,{relative:a});return n.useCallback(p=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(p,t)){p.preventDefault();let t=void 0!==r?r:mX(d)===mX(f),h=()=>u(e,{replace:t,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l});c?n.startTransition(()=>h()):h()}},[d,u,f,r,o,t,e,i,a,s,l,c])}(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:g}),k=n.createElement("a",{...p,...C,href:v.absoluteURL||b,onClick:v.isExternal||i?e:function(t){e&&e(t),t.defaultPrevented||_(t)},ref:HJ(h,w),target:l,"data-discover":y||"render"!==t?void 0:"true"});return x&&!y?n.createElement(n.Fragment,null,k,n.createElement(BJ,{page:b})):k});qJ.displayName="Link";var YJ=n.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:o=!1,style:i,to:a,viewTransition:s,children:l,...c},u){let d=lJ(a,{relative:c.relative}),f=oJ(),p=n.useContext(ZX),{navigator:h,basename:m}=n.useContext(JX),g=null!=p&&function(e,{relative:t}={}){let r=n.useContext(XX);dX(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=ZJ("useViewTransitionState"),i=lJ(e,{relative:t});if(!r.isTransitioning)return!1;let a=MX(r.currentLocation.pathname,o)||r.currentLocation.pathname,s=MX(r.nextLocation.pathname,o)||r.nextLocation.pathname;return null!=PX(i.pathname,s)||null!=PX(i.pathname,a)}(d)&&!0===s,y=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,v=f.pathname,b=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&m&&(b=MX(b,m)||b);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let w,C=v===y||!o&&v.startsWith(y)&&"/"===v.charAt(x),_=null!=b&&(b===y||!o&&b.startsWith(y)&&"/"===b.charAt(y.length)),k={isActive:C,isPending:_,isTransitioning:g},S=C?e:void 0;w="function"==typeof r?r(k):[r,C?"active":null,_?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let j="function"==typeof i?i(k):i;return n.createElement(qJ,{...c,"aria-current":S,className:w,ref:u,style:j,to:a,viewTransition:s},"function"==typeof l?l(k):l)});YJ.displayName="NavLink";var KJ=n.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:o,replace:i,state:a,method:s=kJ,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p,...h},m)=>{let{unstable_useTransitions:g}=n.useContext(JX),y=function(){let{router:e}=ZJ("useSubmit"),{basename:t}=n.useContext(JX),r=yJ("useRouteId"),o=e.fetch,i=e.navigate;return n.useCallback(async(e,n={})=>{let{action:a,method:s,encType:l,formData:c,body:u}=function(e,t){let n,r,o,i,a;if(jJ(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?MX(a,t):null,n=e.getAttribute("method")||kJ,o=PJ(e.getAttribute("enctype"))||SJ,i=new FormData(e)}else if(function(e){return jJ(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return jJ(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?MX(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||kJ,o=PJ(e.getAttribute("formenctype"))||PJ(a.getAttribute("enctype"))||SJ,i=new FormData(a,e),!function(){if(null===OJ)try{new FormData(document.createElement("form"),0),OJ=!1}catch(e){OJ=!0}return OJ}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(jJ(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=kJ,r=null,o=SJ,a=e}var s;return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}(e,t);if(!1===n.navigate){let e=n.fetcherKey||XJ();await o(e,r,n.action||a,{unstable_defaultShouldRevalidate:n.unstable_defaultShouldRevalidate,preventScrollReset:n.preventScrollReset,formData:c,body:u,formMethod:n.method||s,formEncType:n.encType||l,flushSync:n.flushSync})}else await i(n.action||a,{unstable_defaultShouldRevalidate:n.unstable_defaultShouldRevalidate,preventScrollReset:n.preventScrollReset,formData:c,body:u,formMethod:n.method||s,formEncType:n.encType||l,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[o,i,t,r])}(),v=function(e,{relative:t}={}){let{basename:r}=n.useContext(JX),o=n.useContext(eJ);dX(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),a={...lJ(e||".",{relative:t})},s=oJ();if(null==e){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();a.search=n?`?${n}`:""}}return e&&"."!==e||!i.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(a.pathname="/"===a.pathname?r:LX([r,a.pathname])),mX(a)}(l,{relative:u}),b="get"===s.toLowerCase()?"get":"post",x="string"==typeof l&&UJ.test(l);return n.createElement("form",{ref:m,method:b,action:v,onSubmit:o?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let o=e.nativeEvent.submitter,l=o?.getAttribute("formmethod")||s,h=()=>y(o||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p});g&&!1!==r?n.startTransition(()=>h()):h()},...h,"data-discover":x||"render"!==e?void 0:"true"})});function ZJ(e){let t=n.useContext(KX);return dX(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}KJ.displayName="Form";var GJ=0,XJ=()=>`__${String(++GJ)}__`;const JJ=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var QJ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const eQ=(0,n.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:s,...l},c)=>(0,n.createElement)("svg",{ref:c,...QJ,width:t,height:t,stroke:e,strokeWidth:o?24*Number(r)/Number(t):r,className:JJ("lucide",i),...l},[...s.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(a)?a:[a]])),tQ=(e,t)=>{const r=(0,n.forwardRef)(({className:r,...o},i)=>{return(0,n.createElement)(eQ,{ref:i,iconNode:t,className:JJ(`lucide-${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...o});var a});return r.displayName=`${e}`,r},nQ=tQ("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),rQ={"create-new":(0,a.__)("Create New","astra-addon"),"all-layouts":(0,a.__)("All Layouts","astra-addon"),header:(0,a.__)("Header","astra-addon"),footer:(0,a.__)("Footer","astra-addon"),hooks:(0,a.__)("Hooks","astra-addon"),content:(0,a.__)("Inside Post/Page","astra-addon"),single:(0,a.__)("Single Template","astra-addon"),archive:(0,a.__)("Archive Template","astra-addon"),"404-page":(0,a.__)("404 Page","astra-addon")},oQ=()=>{const{admin_url:e}=astra_theme_builder,t=new URLSearchParams(oJ().search),n=t.get("page"),r=t.get("path"),o=[{label:(0,a.__)("Dashboard","astra-addon"),href:e},{label:(0,a.__)("Site Builder","astra-addon")}];"theme-builder"===n&&o.push({label:rQ[r]||rQ["all-layouts"]});const l="font-medium text-base leading-6 tracking-normal hover:no-underline focus:outline-none focus:ring-0 focus:border-transparent transition-none";return(0,s.jsx)(jx,{size:"sm",children:(0,s.jsx)(jx.List,{className:"flex items-center gap-2",children:o.map((e,t)=>(0,s.jsxs)(i().Fragment,{children:[(0,s.jsx)(jx.Item,{children:e.href?(0,s.jsx)(jx.Link,{href:e.href,className:l,children:e.label}):(0,s.jsx)(jx.Link,{className:`${l} ${t===o.length-1?"font-medium text-base leading-6 tracking-normal hover:no-underline focus:outline-none focus:ring-0 focus:border-transparent transition-none":"hover:no-underline"}`,children:e.label})}),t<o.length-1&&(0,s.jsx)("span",{className:"text-slate-500 mt-1 p-2",children:(0,s.jsx)(nQ,{size:16})})]},t))})})},iQ=()=>(0,s.jsxs)(Yx,{className:"z-[9] h-[80px] shadow-sm ast-tb-header min-h-16",children:[(0,s.jsx)(Yx.Left,{gap:"xs",children:(0,s.jsx)(Yx.Item,{children:astra_theme_builder.logo_url?(0,s.jsx)("img",{src:astra_theme_builder.logo_url,alt:"Site Logo",className:"ast-tb-logo"}):(0,s.jsx)(eX,{})})}),(0,s.jsx)(Yx.Middle,{align:"left",children:(0,s.jsx)(Yx.Item,{children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"ast-tb-main-title font-semibold text-[24px] leading-[32px] tracking-[-0.006em] align-middle",children:astra_theme_builder.title}),(0,s.jsx)(oQ,{})]})})}),(0,s.jsxs)(Yx.Right,{children:[(0,s.jsx)(Yx.Item,{children:(0,s.jsx)(ve,{size:"md",type:"button",tag:"button",variant:"ghost",className:"mr-3 text-text-tertiary font-medium rounded-none text-base leading-[0.5] tracking-normal ast-tb-view pr-[20px]",onClick:()=>{window.location.href=astra_theme_builder.table_view_url},children:(0,a.__)("Switch to Table View","astra-addon")})}),(0,s.jsx)(Yx.Item,{children:(0,s.jsx)(rX,{className:"cursor-pointer",onClick:()=>{window.location.href=astra_theme_builder.admin_url}})})]})]}),aQ=({label:e,icon:t,layout:r,template:o})=>{const i=oJ(),[a,l]=(0,n.useState)(!1),[c,u]=(0,n.useState)(!1),d=new URLSearchParams(i.search),f=d.get("page"),p=d.get("path"),h="theme-builder"===f&&(r===p||o===p);(0,n.useEffect)(()=>{l(h)},[p,r,o,f]);const m=a?"ast-tb-sidebar-item-selected":"",g=(e,t,n)=>{if(e.preventDefault(),"theme-builder"!==f)return;let r="";"template"===t?"single"!==n&&"archive"!==n||(r=astra_theme_builder.new_custom_layout_base_url+"&type=template&template_type="+n):r=astra_theme_builder.new_custom_layout_base_url+"&type="+t,window.location.href=r};return(0,s.jsx)(Cx.Item,{children:(0,s.jsx)(qJ,{to:{search:`?page=theme-builder&path=${"template"===r?o:r}`},className:"ast-tb-link w-full block",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:(0,s.jsxs)("div",{className:`ast-tb-sidebar-item ${m} group pr-4 py-3 rounded-md hover:bg-[#F3F3F8] flex justify-between items-center`,children:[(0,s.jsxs)("div",{className:"ast-tb-sidebar-item-left flex items-center gap-3 ml-2 relative w-full",children:[(0,s.jsx)("span",{className:"ast-tb-sidebar-item-icon flex items-center justify-center group-hover:[color:#141338]",children:t}),(0,s.jsx)("span",{className:`ast-tb-sidebar-item-label text-text-secondary font-figtree font-normal text-base leading-6 tracking-normal ${"404 Page"===e||"Archive"===e?"ast-tb-sidebar-item-svg":""} group-hover:[color:#141338]`,children:e}),c&&(0,s.jsx)("div",{className:"absolute right-0 top-1/2 translate-x-[30%] -translate-y-1/2 flex",onClick:e=>g(e,r,o),children:(0,s.jsxs)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",strokeWidth:1.25,children:[(0,s.jsx)("path",{d:"M9.99984 18.8337C14.6022 18.8337 18.3332 15.1027 18.3332 10.5003C18.3332 5.89795 14.6022 2.16699 9.99984 2.16699C5.39746 2.16699 1.6665 5.89795 1.6665 10.5003C1.6665 15.1027 5.39746 18.8337 9.99984 18.8337Z",stroke:"#141338","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M10 7.16699V13.8337",stroke:"#141338","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M6.6665 10.5H13.3332",stroke:"#141338","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"})]})})]}),c&&(0,s.jsx)(gp,{className:"ast-tb-sidebar-item-new-layout-icon absolute right-[38px] group-hover:text-[#141338]",onClick:e=>g(e,r,o),children:(0,s.jsxs)("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M9.99984 18.8337C14.6022 18.8337 18.3332 15.1027 18.3332 10.5003C18.3332 5.89795 14.6022 2.16699 9.99984 2.16699C5.39746 2.16699 1.6665 5.89795 1.6665 10.5003C1.6665 15.1027 5.39746 18.8337 9.99984 18.8337Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M10 7.16699V13.8337",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M6.6665 10.5H13.3332",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})})})},sQ=tQ("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),lQ=tQ("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),cQ=({items:e})=>{const t=oJ(),[r,o]=(0,n.useState)(!1),i=new URLSearchParams(t.search),l=i.get("page"),c=i.get("path"),u="theme-builder"===l&&"all-layouts"===c||"theme-builder"===l&&null===c;(0,n.useEffect)(()=>{o(u)},[c]);const d=r?"ast-tb-sidebar-item-selected":"";return(0,s.jsxs)(Cx,{className:"ast-tb-sidebar h-auto w-[15rem] overflow-visible py-6 px-6",borderOn:!1,children:[(0,s.jsx)(Cx.Header,{children:(0,s.jsxs)(qJ,{to:{search:"?page=theme-builder&path=all-layouts"},className:`no-underline focus:outline-none focus:shadow-none focus:ring-0 ast-tb-sidebar-header items-center gap-2 pb-[18px] mt-[-5px] ast-tb-sidebar-item-selected ${d}`,children:[(0,s.jsx)(sQ,{className:"w-6 h-6 text-gray-600"}),(0,s.jsx)("h2",{className:"text-text-secondary font-figtree font-normal text-base leading-6 tracking-normal",children:(0,a.__)("All Layouts","astra-addon")})]})}),(0,s.jsxs)(Cx.Body,{children:[(0,s.jsx)("div",{className:"ast-tb-sidebar-subtitle",children:(0,s.jsx)("h3",{className:"text-text-tertiary font-normal text-sm leading-5 tracking-normal",children:(0,a.__)("Website Parts","astra")})}),e.map((e,t)=>(0,s.jsx)(aQ,{label:e.label,icon:e.icon,layout:e.layout,template:e.template},t)),!astra_theme_builder.white_labelled&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"ast-tb-help-divider"}),(0,s.jsxs)("div",{className:"group ast-tb-sidebar-help ast-tb-sidebar-item py-3 rounded-md hover:bg-[#F3F3F8] cursor-pointer flex items-center",onClick:()=>window.open(astra_theme_builder.astra_docs_page_url,"_blank"),children:[(0,s.jsx)(lQ,{strokeWidth:1.25,className:"w-5 h-5 mr-2 text-gray-400 group-hover:[stroke:#141338]"}),(0,s.jsx)("span",{className:"font-normal text-[16px] leading-[24px] text-text-secondary group-hover:[color:#141338]",children:(0,a.__)("Help","astra-addon")})]})]})]})]})},uQ=tQ("PanelTop",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]]),dQ=tQ("PanelBottom",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h18",key:"5xshup"}]]),fQ=tQ("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),pQ=tQ("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]),hQ=tQ("LayoutList",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]),mQ=tQ("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]),gQ=[{label:(0,a.__)("Header","astra-addon"),layout:"header",template:"",icon:(0,s.jsx)(uQ,{strokeWidth:1.25,className:"group-hover:stroke-[#141338]"})},{label:(0,a.__)("Footer","astra-addon"),layout:"footer",template:"",icon:(0,s.jsx)(dQ,{strokeWidth:1.25,className:"group-hover:stroke-[#141338]"})},{label:(0,a.__)("Hooks","astra-addon"),layout:"hooks",template:"",icon:(0,s.jsx)(fQ,{strokeWidth:1.25,className:"group-hover:stroke-[#141338]"})},{label:(0,a.__)("Inside Post/Page","astra-addon"),layout:"content",template:"",icon:(0,s.jsx)(pQ,{strokeWidth:1.25,className:"group-hover:stroke-[#141338]"})},{label:(0,a.__)("Single","astra-addon"),layout:"template",template:"single",icon:(0,s.jsx)(hQ,{strokeWidth:1.25,className:"group-hover:stroke-[#141338]"})},{label:(0,a.__)("Archive","astra-addon"),layout:"template",template:"archive",icon:(0,s.jsx)(mQ,{strokeWidth:1.25,className:"group-hover:stroke-[#141338]"})},{label:(0,a.__)("404 Page","astra-addon"),layout:"404-page",template:"",icon:(0,s.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-[#6F6B99] group-hover:text-[#141338]",children:[(0,s.jsx)("path",{d:"M15.8333 3H4.16667C3.24619 3 2.5 3.74619 2.5 4.66667V16.3333C2.5 17.2538 3.24619 18 4.16667 18H15.8333C16.7538 18 17.5 17.2538 17.5 16.3333V4.66667C17.5 3.74619 16.7538 3 15.8333 3Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M14.572 13.8327V12.5876H12.2689V12.0342L14.2953 6.88281H15.5526V11.7616H16.1955V12.5876H15.5526V13.8327H14.572ZM13.3431 11.7616H14.572V10.7362L14.6778 8.40055H14.5476L13.3431 11.7616Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M9.94548 13.8942C9.78 13.8942 9.59825 13.8698 9.40023 13.821C9.20492 13.7721 9.01774 13.6772 8.8387 13.5361C8.66238 13.3924 8.51725 13.1821 8.40332 12.9054C8.28939 12.6287 8.23242 12.2625 8.23242 11.8068V8.86898C8.23242 8.41054 8.29074 8.04568 8.40739 7.77441C8.52403 7.50043 8.67188 7.29563 8.85091 7.15999C9.02995 7.02165 9.21712 6.93077 9.41243 6.88737C9.61046 6.84397 9.78814 6.82227 9.94548 6.82227C10.0974 6.82227 10.2696 6.84261 10.4622 6.8833C10.6548 6.92399 10.8407 7.01215 11.0197 7.14779C11.1987 7.28071 11.3466 7.48416 11.4632 7.75814C11.5799 8.03212 11.6382 8.4024 11.6382 8.86898V11.8068C11.6382 12.2625 11.5785 12.6287 11.4591 12.9054C11.3425 13.1821 11.1933 13.3924 11.0116 13.5361C10.8325 13.6772 10.6467 13.7721 10.4541 13.821C10.2642 13.8698 10.0947 13.8942 9.94548 13.8942ZM9.94548 13.0723C10.1544 13.0723 10.3103 13.0072 10.4134 12.877C10.5165 12.7467 10.568 12.5379 10.568 12.2503V8.48649C10.568 8.18538 10.5165 7.96566 10.4134 7.82731C10.3103 7.68625 10.1544 7.61572 9.94548 7.61572C9.73117 7.61572 9.57113 7.68625 9.46533 7.82731C9.36225 7.96566 9.31071 8.18538 9.31071 8.48649V12.2503C9.31071 12.5379 9.36225 12.7467 9.46533 12.877C9.57113 13.0072 9.73117 13.0723 9.94548 13.0723Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M5.94564 13.8327V12.5876H3.64258V12.0342L5.66895 6.88281H6.92627V11.7616H7.56917V12.5876H6.92627V13.8327H5.94564ZM4.7168 11.7616H5.94564V10.7362L6.05143 8.40055H5.92122L4.7168 11.7616Z",fill:"currentColor"})]})}],yQ=window.wp.apiFetch;var vQ=o.n(yQ);const bQ=window.wp.components;var xQ=o(286),wQ=o.n(xQ);function CQ(e){return CQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CQ(e)}function _Q(e){var t=function(e){if("object"!=CQ(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=CQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==CQ(t)?t:t+""}function kQ(e,t,n){return(t=_Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SQ(Object(n),!0).forEach(function(t){kQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function OQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function EQ(e,t){if(e){if("string"==typeof e)return OQ(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?OQ(e,t):void 0}}function PQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||EQ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function TQ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var MQ=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function AQ(){return AQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AQ.apply(null,arguments)}function NQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_Q(r.key),r)}}function DQ(e,t){return DQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},DQ(e,t)}function IQ(e){return IQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},IQ(e)}function RQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(RQ=function(){return!!e})()}function LQ(e){return function(e){if(Array.isArray(e))return OQ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||EQ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var FQ=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),BQ=Math.abs,zQ=String.fromCharCode,VQ=Object.assign;function HQ(e){return e.trim()}function WQ(e,t,n){return e.replace(t,n)}function $Q(e,t){return e.indexOf(t)}function UQ(e,t){return 0|e.charCodeAt(t)}function qQ(e,t,n){return e.slice(t,n)}function YQ(e){return e.length}function KQ(e){return e.length}function ZQ(e,t){return t.push(e),e}var GQ=1,XQ=1,JQ=0,QQ=0,e0=0,t0="";function n0(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:GQ,column:XQ,length:a,return:""}}function r0(e,t){return VQ(n0("",null,null,"",null,null,0),e,{length:-e.length},t)}function o0(){return e0=QQ>0?UQ(t0,--QQ):0,XQ--,10===e0&&(XQ=1,GQ--),e0}function i0(){return e0=QQ<JQ?UQ(t0,QQ++):0,XQ++,10===e0&&(XQ=1,GQ++),e0}function a0(){return UQ(t0,QQ)}function s0(){return QQ}function l0(e,t){return qQ(t0,e,t)}function c0(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function u0(e){return GQ=XQ=1,JQ=YQ(t0=e),QQ=0,[]}function d0(e){return t0="",e}function f0(e){return HQ(l0(QQ-1,m0(91===e?e+2:40===e?e+1:e)))}function p0(e){for(;(e0=a0())&&e0<33;)i0();return c0(e)>2||c0(e0)>3?"":" "}function h0(e,t){for(;--t&&i0()&&!(e0<48||e0>102||e0>57&&e0<65||e0>70&&e0<97););return l0(e,s0()+(t<6&&32==a0()&&32==i0()))}function m0(e){for(;i0();)switch(e0){case e:return QQ;case 34:case 39:34!==e&&39!==e&&m0(e0);break;case 40:41===e&&m0(e);break;case 92:i0()}return QQ}function g0(e,t){for(;i0()&&e+e0!==57&&(e+e0!==84||47!==a0()););return"/*"+l0(t,QQ-1)+"*"+zQ(47===e?e:i0())}function y0(e){for(;!c0(a0());)i0();return l0(e,QQ)}var v0="-ms-",b0="-moz-",x0="-webkit-",w0="comm",C0="rule",_0="decl",k0="@keyframes";function S0(e,t){for(var n="",r=KQ(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function j0(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case _0:return e.return=e.return||e.value;case w0:return"";case k0:return e.return=e.value+"{"+S0(e.children,r)+"}";case C0:e.value=e.props.join(",")}return YQ(n=S0(e.children,r))?e.return=e.value+"{"+n+"}":""}function O0(e){return d0(E0("",null,null,null,[""],e=u0(e),0,[0],e))}function E0(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",x=o,w=i,C=r,_=b;g;)switch(h=v,v=i0()){case 40:if(108!=h&&58==UQ(_,d-1)){-1!=$Q(_+=WQ(f0(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:_+=f0(v);break;case 9:case 10:case 13:case 32:_+=p0(h);break;case 92:_+=h0(s0()-1,7);continue;case 47:switch(a0()){case 42:case 47:ZQ(T0(g0(i0(),s0()),t,n),l);break;default:_+="/"}break;case 123*m:s[c++]=YQ(_)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(_=WQ(_,/\f/g,"")),p>0&&YQ(_)-d&&ZQ(p>32?M0(_+";",r,n,d-1):M0(WQ(_," ","")+";",r,n,d-2),l);break;case 59:_+=";";default:if(ZQ(C=P0(_,t,n,c,u,o,s,b,x=[],w=[],d),i),123===v)if(0===u)E0(_,t,C,C,x,i,d,s,w);else switch(99===f&&110===UQ(_,3)?100:f){case 100:case 108:case 109:case 115:E0(e,C,C,r&&ZQ(P0(e,C,C,0,0,o,s,b,o,x=[],d),w),o,w,d,s,r?x:w);break;default:E0(_,C,C,C,[""],w,0,s,w)}}c=u=p=0,m=y=1,b=_="",d=a;break;case 58:d=1+YQ(_),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==o0())continue;switch(_+=zQ(v),v*m){case 38:y=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(YQ(_)-1)*y,y=1;break;case 64:45===a0()&&(_+=f0(i0())),f=a0(),u=d=YQ(b=_+=y0(s0())),v++;break;case 45:45===h&&2==YQ(_)&&(m=0)}}return i}function P0(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=0===o?i:[""],p=KQ(f),h=0,m=0,g=0;h<r;++h)for(var y=0,v=qQ(e,d+1,d=BQ(m=a[h])),b=e;y<p;++y)(b=HQ(m>0?f[y]+" "+v:WQ(v,/&\f/g,f[y])))&&(l[g++]=b);return n0(e,t,n,0===o?C0:s,l,c,u)}function T0(e,t,n){return n0(e,t,n,w0,zQ(e0),qQ(e,2,-2),0)}function M0(e,t,n,r){return n0(e,t,n,_0,qQ(e,0,r),qQ(e,r+1,-1),r)}var A0=function(e,t,n){for(var r=0,o=0;r=o,o=a0(),38===r&&12===o&&(t[n]=1),!c0(o);)i0();return l0(e,QQ)},N0=new WeakMap,D0=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||N0.get(n))&&!r){N0.set(e,!0);for(var o=[],i=function(e,t){return d0(function(e,t){var n=-1,r=44;do{switch(c0(r)){case 0:38===r&&12===a0()&&(t[n]=1),e[n]+=A0(QQ-1,t,n);break;case 2:e[n]+=f0(r);break;case 4:if(44===r){e[++n]=58===a0()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=zQ(r)}}while(r=i0());return e}(u0(e),t))}(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},I0=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function R0(e,t){switch(function(e,t){return 45^UQ(e,0)?(((t<<2^UQ(e,0))<<2^UQ(e,1))<<2^UQ(e,2))<<2^UQ(e,3):0}(e,t)){case 5103:return x0+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return x0+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return x0+e+b0+e+v0+e+e;case 6828:case 4268:return x0+e+v0+e+e;case 6165:return x0+e+v0+"flex-"+e+e;case 5187:return x0+e+WQ(e,/(\w+).+(:[^]+)/,x0+"box-$1$2"+v0+"flex-$1$2")+e;case 5443:return x0+e+v0+"flex-item-"+WQ(e,/flex-|-self/,"")+e;case 4675:return x0+e+v0+"flex-line-pack"+WQ(e,/align-content|flex-|-self/,"")+e;case 5548:return x0+e+v0+WQ(e,"shrink","negative")+e;case 5292:return x0+e+v0+WQ(e,"basis","preferred-size")+e;case 6060:return x0+"box-"+WQ(e,"-grow","")+x0+e+v0+WQ(e,"grow","positive")+e;case 4554:return x0+WQ(e,/([^-])(transform)/g,"$1"+x0+"$2")+e;case 6187:return WQ(WQ(WQ(e,/(zoom-|grab)/,x0+"$1"),/(image-set)/,x0+"$1"),e,"")+e;case 5495:case 3959:return WQ(e,/(image-set\([^]*)/,x0+"$1$`$1");case 4968:return WQ(WQ(e,/(.+:)(flex-)?(.*)/,x0+"box-pack:$3"+v0+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+x0+e+e;case 4095:case 3583:case 4068:case 2532:return WQ(e,/(.+)-inline(.+)/,x0+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(YQ(e)-1-t>6)switch(UQ(e,t+1)){case 109:if(45!==UQ(e,t+4))break;case 102:return WQ(e,/(.+:)(.+)-([^]+)/,"$1"+x0+"$2-$3$1"+b0+(108==UQ(e,t+3)?"$3":"$2-$3"))+e;case 115:return~$Q(e,"stretch")?R0(WQ(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==UQ(e,t+1))break;case 6444:switch(UQ(e,YQ(e)-3-(~$Q(e,"!important")&&10))){case 107:return WQ(e,":",":"+x0)+e;case 101:return WQ(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+x0+(45===UQ(e,14)?"inline-":"")+"box$3$1"+x0+"$2$3$1"+v0+"$2box$3")+e}break;case 5936:switch(UQ(e,t+11)){case 114:return x0+e+v0+WQ(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return x0+e+v0+WQ(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return x0+e+v0+WQ(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return x0+e+v0+e+e}return e}var L0=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case _0:e.return=R0(e.value,e.length);break;case k0:return S0([r0(e,{value:WQ(e.value,"@","@"+x0)})],r);case C0:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return S0([r0(e,{props:[WQ(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return S0([r0(e,{props:[WQ(t,/:(plac\w+)/,":"+x0+"input-$1")]}),r0(e,{props:[WQ(t,/:(plac\w+)/,":-moz-$1")]}),r0(e,{props:[WQ(t,/:(plac\w+)/,v0+"input-$1")]})],r)}return""})}}],F0=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||L0,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u,d,f=[j0,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(c=[D0,I0].concat(i,f),u=KQ(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,S0(O0(e?e+"{"+t.styles+"}":t.styles),p),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new FQ({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return h.sheet.hydrate(s),h},B0=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},z0={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function V0(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var H0=/[A-Z]|^ms/g,W0=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$0=function(e){return 45===e.charCodeAt(1)},U0=function(e){return null!=e&&"boolean"!=typeof e},q0=V0(function(e){return $0(e)?e:e.replace(H0,"-$&").toLowerCase()}),Y0=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(W0,function(e,t,n){return Z0={name:t,styles:n,next:Z0},t})}return 1===z0[e]||$0(e)||"number"!=typeof t||0===t?t:t+"px"};function K0(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Z0={name:o.name,styles:o.styles,next:Z0},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Z0={name:a.name,styles:a.styles,next:Z0},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=K0(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":U0(s)&&(r+=q0(i)+":"+Y0(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=K0(e,t,a);switch(i){case"animation":case"animationName":r+=q0(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var c=0;c<a.length;c++)U0(a[c])&&(r+=q0(i)+":"+Y0(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=Z0,l=n(e);return Z0=s,K0(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var Z0,G0=/label:\s*([^\s;{]+)\s*(;|$)/g;function X0(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Z0=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=K0(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=K0(n,t,e[a]),r&&(o+=i[a]);G0.lastIndex=0;for(var s,l="";null!==(s=G0.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Z0}}var J0,Q0,e1=!!n.useInsertionEffect&&n.useInsertionEffect,t1=e1||function(e){return e()},n1=(e1||n.useLayoutEffect,n.createContext("undefined"!=typeof HTMLElement?F0({key:"css"}):null)),r1=(n1.Provider,function(e){return(0,n.forwardRef)(function(t,r){var o=(0,n.useContext)(n1);return e(t,o,r)})}),o1=n.createContext({}),i1={}.hasOwnProperty,a1="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",s1=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return B0(t,n,r),t1(function(){return function(e,t,n){B0(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)}),null},l1=r1(function(e,t,r){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var i=e[a1],a=[o],s="";"string"==typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=X0(a,void 0,n.useContext(o1));s+=t.key+"-"+l.name;var c={};for(var u in e)i1.call(e,u)&&"css"!==u&&u!==a1&&(c[u]=e[u]);return c.className=s,r&&(c.ref=r),n.createElement(n.Fragment,null,n.createElement(s1,{cache:t,serialized:l,isStringTag:"string"==typeof i}),n.createElement(i,c))}),c1=l1,u1=(o(482),function(e,t){var r=arguments;if(null==t||!i1.call(t,"css"))return n.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=c1,i[1]=function(e,t){var n={};for(var r in t)i1.call(t,r)&&(n[r]=t[r]);return n[a1]=e,n}(e,t);for(var a=2;a<o;a++)i[a]=r[a];return n.createElement.apply(null,i)});function d1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return X0(t)}J0=u1||(u1={}),Q0||(Q0=J0.JSX||(J0.JSX={}));const f1=Math.min,p1=Math.max,h1=Math.round,m1=Math.floor,g1=e=>({x:e,y:e});function y1(){return"undefined"!=typeof window}function v1(e){return w1(e)?(e.nodeName||"").toLowerCase():"#document"}function b1(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function x1(e){var t;return null==(t=(w1(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function w1(e){return!!y1()&&(e instanceof Node||e instanceof b1(e).Node)}function C1(e){return!!y1()&&(e instanceof Element||e instanceof b1(e).Element)}function _1(e){return!!y1()&&(e instanceof HTMLElement||e instanceof b1(e).HTMLElement)}function k1(e){return!(!y1()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof b1(e).ShadowRoot)}const S1=new Set(["inline","contents"]);function j1(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=E1(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!S1.has(o)}const O1=new Set(["html","body","#document"]);function E1(e){return b1(e).getComputedStyle(e)}function P1(e){const t=function(e){if("html"===v1(e))return e;const t=e.assignedSlot||e.parentNode||k1(e)&&e.host||x1(e);return k1(t)?t.host:t}(e);return function(e){return O1.has(v1(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:_1(t)&&j1(t)?t:P1(t)}function T1(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=P1(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=b1(o);if(i){const e=M1(a);return t.concat(a,a.visualViewport||[],j1(o)?o:[],e&&n?T1(e):[])}return t.concat(o,T1(o,[],n))}function M1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function A1(e){return C1(e)?e:e.contextElement}function N1(e){const t=A1(e);if(!_1(t))return g1(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=E1(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_1(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=h1(n)!==i||h1(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?h1(n.width):n.width)/r,s=(i?h1(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const D1=g1(0);function I1(e){const t=b1(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:D1}function R1(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=A1(e);let a=g1(1);t&&(r?C1(r)&&(a=N1(r)):a=N1(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==b1(e))&&t}(i,n,r)?I1(i):g1(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=b1(i),t=r&&C1(r)?b1(r):r;let n=e,o=M1(n);for(;o&&r&&t!==n;){const e=N1(o),t=o.getBoundingClientRect(),r=E1(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=b1(o),o=M1(n)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:u,height:d,x:l,y:c})}function L1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var F1=n.useLayoutEffect,B1=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],z1=function(){};function V1(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function H1(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(V1(e,a)));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var W1=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===CQ(e)&&null!==e?[e]:[];var t},$1=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,jQ({},TQ(e,B1))},U1=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function q1(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Y1(e){return q1(e)?window.pageYOffset:e.scrollTop}function K1(e,t){q1(e)?window.scrollTo(0,t):e.scrollTop=t}function Z1(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:z1,o=Y1(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;K1(e,l),a<n?window.requestAnimationFrame(t):r(e)}()}function G1(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?K1(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&K1(e,Math.max(t.offsetTop-o,0))}function X1(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var J1=!1,Q1={get passive(){return J1=!0}},e2="undefined"!=typeof window?window:{};e2.addEventListener&&e2.removeEventListener&&(e2.addEventListener("p",z1,Q1),e2.removeEventListener("p",z1,!1));var t2=J1;function n2(e){return null!=e}function r2(e,t,n){return e?t:n}var o2=["children","innerProps"],i2=["children","innerProps"];var a2,s2=function(e){return"auto"===e?"bottom":e},l2=(0,n.createContext)(null),c2=function(e){var t=e.children,r=e.minMenuHeight,o=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,s=e.menuShouldScrollIntoView,l=e.theme,c=((0,n.useContext)(l2)||{}).setPortalPlacement,u=(0,n.useRef)(null),d=PQ((0,n.useState)(o),2),f=d[0],p=d[1],h=PQ((0,n.useState)(null),2),m=h[0],g=h[1],y=l.spacing.controlHeight;return F1(function(){var e=u.current;if(e){var t="fixed"===a,n=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),f=d.bottom,p=d.height,h=d.top,m=n.offsetParent.getBoundingClientRect().top,g=a?window.innerHeight:function(e){return q1(e)?window.innerHeight:e.clientHeight}(l),y=Y1(l),v=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),x=m-b,w=g-h,C=x+y,_=u-y-h,k=f-g+y+v,S=y+h-b,j=160;switch(o){case"auto":case"bottom":if(w>=p)return{placement:"bottom",maxHeight:t};if(_>=p&&!a)return i&&Z1(l,k,j),{placement:"bottom",maxHeight:t};if(!a&&_>=r||a&&w>=r)return i&&Z1(l,k,j),{placement:"bottom",maxHeight:a?w-v:_-v};if("auto"===o||a){var O=t,E=a?x:C;return E>=r&&(O=Math.min(E-v-s,t)),{placement:"top",maxHeight:O}}if("bottom"===o)return i&&K1(l,k),{placement:"bottom",maxHeight:t};break;case"top":if(x>=p)return{placement:"top",maxHeight:t};if(C>=p&&!a)return i&&Z1(l,S,j),{placement:"top",maxHeight:t};if(!a&&C>=r||a&&x>=r){var P=t;return(!a&&C>=r||a&&x>=r)&&(P=a?x-b:C-b),i&&Z1(l,S,j),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:o,menuEl:e,minHeight:r,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:y});p(n.maxHeight),g(n.placement),null==c||c(n.placement)}},[o,i,a,s,r,c,y]),t({ref:u,placerProps:jQ(jQ({},e),{},{placement:m||s2(i),maxHeight:f})})},u2=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return jQ({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},d2=u2,f2=u2,p2=["size"],h2=["innerProps","isRtl","size"],m2={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},g2=function(e){var t=e.size,n=TQ(e,p2);return u1("svg",AQ({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:m2},n))},y2=function(e){return u1(g2,AQ({size:20},e),u1("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},v2=function(e){return u1(g2,AQ({size:20},e),u1("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},b2=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return jQ({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},x2=b2,w2=b2,C2=function(){var e=d1.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(a2||(a2=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),_2=function(e){var t=e.delay,n=e.offset;return u1("span",{css:d1({animation:"".concat(C2," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},k2=["data"],S2=["innerRef","isDisabled","isHidden","inputClassName"],j2={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},O2={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":jQ({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},j2)},E2=function(e){return jQ({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},j2)},P2=function(e){var t=e.children,n=e.innerProps;return u1("div",n,t)},T2={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return u1("div",AQ({},U1(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||u1(y2,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return u1("div",AQ({ref:o},U1(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return u1("div",AQ({},U1(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||u1(v2,null))},DownChevron:v2,CrossIcon:y2,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return u1("div",AQ({},U1(e,"group",{group:!0}),s),u1(i,AQ({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),u1("div",null,t))},GroupHeading:function(e){var t=$1(e);t.data;var n=TQ(t,k2);return u1("div",AQ({},U1(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return u1("div",AQ({},U1(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return u1("span",AQ({},t,U1(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=$1(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=TQ(r,S2);return u1("div",AQ({},U1(e,"input",{"input-container":!0}),{"data-value":n||""}),u1("input",AQ({className:t({input:!0},s),ref:o,style:E2(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=TQ(e,h2);return u1("div",AQ({},U1(jQ(jQ({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),u1(_2,{delay:0,offset:n}),u1(_2,{delay:160,offset:!0}),u1(_2,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return u1("div",AQ({},U1(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return u1("div",AQ({},U1(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(t){var r=t.appendTo,o=t.children,i=t.controlElement,a=t.innerProps,s=t.menuPlacement,l=t.menuPosition,c=(0,n.useRef)(null),u=(0,n.useRef)(null),d=PQ((0,n.useState)(s2(s)),2),f=d[0],p=d[1],h=(0,n.useMemo)(function(){return{setPortalPlacement:p}},[]),m=PQ((0,n.useState)(null),2),g=m[0],y=m[1],v=(0,n.useCallback)(function(){if(i){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),t="fixed"===l?0:window.pageYOffset,n=e[f]+t;n===(null==g?void 0:g.offset)&&e.left===(null==g?void 0:g.rect.left)&&e.width===(null==g?void 0:g.rect.width)||y({offset:n,rect:e})}},[i,l,f,null==g?void 0:g.offset,null==g?void 0:g.rect.left,null==g?void 0:g.rect.width]);F1(function(){v()},[v]);var b=(0,n.useCallback)(function(){"function"==typeof u.current&&(u.current(),u.current=null),i&&c.current&&(u.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=A1(e),u=o||i?[...c?T1(c):[],...T1(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=x1(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-m1(d)+"px "+-m1(o.clientWidth-(u+f))+"px "+-m1(o.clientHeight-(d+p))+"px "+-m1(u)+"px",threshold:p1(0,f1(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||L1(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m=l?R1(e):null;return l&&function t(){const r=R1(e);m&&!L1(m,r)&&n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}(i,c.current,v,{elementResize:"ResizeObserver"in window}))},[i,v]);F1(function(){b()},[b]);var x=(0,n.useCallback)(function(e){c.current=e,b()},[b]);if(!r&&"fixed"!==l||!g)return null;var w=u1("div",AQ({ref:x},U1(jQ(jQ({},t),{},{offset:g.offset,position:l,rect:g.rect}),"menuPortal",{"menu-portal":!0}),a),o);return u1(l2.Provider,{value:h},r?(0,e.createPortal)(w,r):w)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=TQ(e,i2);return u1("div",AQ({},U1(jQ(jQ({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=TQ(e,o2);return u1("div",AQ({},U1(jQ(jQ({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return u1(l,{data:r,innerProps:jQ(jQ({},U1(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},u1(c,{data:r,innerProps:jQ({},U1(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),u1(u,{data:r,innerProps:jQ(jQ({},U1(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:P2,MultiValueLabel:P2,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return u1("div",AQ({role:"button"},n),t||u1(y2,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return u1("div",AQ({},U1(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return u1("div",AQ({},U1(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return u1("div",AQ({},U1(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return u1("div",AQ({},U1(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return u1("div",AQ({},U1(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},M2=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function A2(e,t){return e===t||!(!M2(e)||!M2(t))}function N2(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!A2(e[n],t[n]))return!1;return!0}for(var D2={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},I2=function(e){return u1("span",AQ({css:D2},e))},R2={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",f="".concat(l?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},L2=function(e){var t=e.ariaSelection,r=e.focusedOption,o=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,h=l.isMulti,m=l.isOptionDisabled,g=l.isSearchable,y=l.menuIsOpen,v=l.options,b=l.screenReaderStatus,x=l.tabSelectsValue,w=l.isLoading,C=l["aria-label"],_=l["aria-live"],k=(0,n.useMemo)(function(){return jQ(jQ({},R2),d||{})},[d]),S=(0,n.useMemo)(function(){var e,n="";if(t&&k.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?f(c):"",d=o||a||void 0,p=d?d.map(f):[],h=jQ({isDisabled:c&&m(c,s),label:u,labels:p},t);n=k.onChange(h)}return n},[t,k,m,s,f]),j=(0,n.useMemo)(function(){var e="",t=r||o,n=!!(r&&s&&s.includes(r));if(t&&k.onFocus){var a={focused:t,label:f(t),isDisabled:m(t,s),isSelected:n,options:i,context:t===r?"menu":"value",selectValue:s,isAppleDevice:u};e=k.onFocus(a)}return e},[r,o,f,m,k,i,s,u]),O=(0,n.useMemo)(function(){var e="";if(y&&v.length&&!w&&k.onFilter){var t=b({count:i.length});e=k.onFilter({inputValue:p,resultsMessage:t})}return e},[i,p,y,k,v,b,w]),E="initial-input-focus"===(null==t?void 0:t.action),P=(0,n.useMemo)(function(){var e="";if(k.guidance){var t=o?"value":y?"menu":"input";e=k.guidance({"aria-label":C,context:t,isDisabled:r&&m(r,s),isMulti:h,isSearchable:g,tabSelectsValue:x,isInitialFocus:E})}return e},[C,r,o,h,m,g,y,k,s,x,E]),T=u1(n.Fragment,null,u1("span",{id:"aria-selection"},S),u1("span",{id:"aria-focused"},j),u1("span",{id:"aria-results"},O),u1("span",{id:"aria-guidance"},P));return u1(n.Fragment,null,u1(I2,{id:c},E&&T),u1(I2,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!E&&T))},F2=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],B2=new RegExp("["+F2.map(function(e){return e.letters}).join("")+"]","g"),z2={},V2=0;V2<F2.length;V2++)for(var H2=F2[V2],W2=0;W2<H2.letters.length;W2++)z2[H2.letters[W2]]=H2.base;var $2=function(e){return e.replace(B2,function(e){return z2[e]})},U2=function(e,t){void 0===t&&(t=N2);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}($2),q2=function(e){return e.replace(/^\s+|\s+$/g,"")},Y2=function(e){return"".concat(e.label," ").concat(e.value)},K2=["innerRef"];function Z2(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=PQ(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=PQ(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(TQ(e,K2),"onExited","in","enter","exit","appear");return u1("input",AQ({ref:t},n,{css:d1({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var G2=["boxSizing","height","overflow","paddingRight","position"],X2={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function J2(e){e.cancelable&&e.preventDefault()}function Q2(e){e.stopPropagation()}function e5(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function t5(){return"ontouchstart"in window||navigator.maxTouchPoints}var n5=!("undefined"==typeof window||!window.document||!window.document.createElement),r5=0,o5={capture:!1,passive:!1},i5=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},a5={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function s5(e){var t=e.children,r=e.lockEnabled,o=e.captureEnabled,i=function(e){var t=e.isEnabled,r=e.onBottomArrive,o=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,s=(0,n.useRef)(!1),l=(0,n.useRef)(!1),c=(0,n.useRef)(0),u=(0,n.useRef)(null),d=(0,n.useCallback)(function(e,t){if(null!==u.current){var n=u.current,c=n.scrollTop,d=n.scrollHeight,f=n.clientHeight,p=u.current,h=t>0,m=d-f-c,g=!1;m>t&&s.current&&(o&&o(e),s.current=!1),h&&l.current&&(a&&a(e),l.current=!1),h&&t>m?(r&&!s.current&&r(e),p.scrollTop=d,g=!0,s.current=!0):!h&&-t>c&&(i&&!l.current&&i(e),p.scrollTop=0,g=!0,l.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[r,o,i,a]),f=(0,n.useCallback)(function(e){d(e,e.deltaY)},[d]),p=(0,n.useCallback)(function(e){c.current=e.changedTouches[0].clientY},[]),h=(0,n.useCallback)(function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)},[d]),m=(0,n.useCallback)(function(e){if(e){var t=!!t2&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}},[h,p,f]),g=(0,n.useCallback)(function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))},[h,p,f]);return(0,n.useEffect)(function(){if(t){var e=u.current;return m(e),function(){g(e)}}},[t,m,g]),function(e){u.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,r=e.accountForScrollbars,o=void 0===r||r,i=(0,n.useRef)({}),a=(0,n.useRef)(null),s=(0,n.useCallback)(function(e){if(n5){var t=document.body,n=t&&t.style;if(o&&G2.forEach(function(e){var t=n&&n[e];i.current[e]=t}),o&&r5<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(X2).forEach(function(e){var t=X2[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&t5()&&(t.addEventListener("touchmove",J2,o5),e&&(e.addEventListener("touchstart",e5,o5),e.addEventListener("touchmove",Q2,o5))),r5+=1}},[o]),l=(0,n.useCallback)(function(e){if(n5){var t=document.body,n=t&&t.style;r5=Math.max(r5-1,0),o&&r5<1&&G2.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&t5()&&(t.removeEventListener("touchmove",J2,o5),e&&(e.removeEventListener("touchstart",e5,o5),e.removeEventListener("touchmove",Q2,o5)))}},[o]);return(0,n.useEffect)(function(){if(t){var e=a.current;return s(e),function(){l(e)}}},[t,s,l]),function(e){a.current=e}}({isEnabled:r});return u1(n.Fragment,null,r&&u1("div",{onClick:i5,css:a5}),t(function(e){i(e),a(e)}))}var l5={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},c5=function(e){var t=e.name,n=e.onFocus;return u1("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:l5,value:"",onChange:function(){}})};function u5(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function d5(){return u5(/^Mac/i)}var f5={clearIndicator:w2,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return jQ({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:x2,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return jQ({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return jQ({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return jQ(jQ({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},O2),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return jQ({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:f2,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return jQ((kQ(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),kQ(n,"position","absolute"),kQ(n,"width","100%"),kQ(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return jQ({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return jQ({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return jQ({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return jQ({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:d2,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return jQ({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return jQ({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return jQ({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return jQ({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},p5={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},h5={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:X1(),captureMenuScroll:!X1(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=jQ({ignoreCase:!0,ignoreAccents:!0,stringify:Y2,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?q2(t):t,c=a?q2(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=U2(l),c=$2(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function m5(e,t,n,r){return{type:"option",data:t,isDisabled:_5(e,t,n),isSelected:k5(e,t,n),label:w5(e,t),value:C5(e,t),index:r}}function g5(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return m5(e,n,t,r)}).filter(function(t){return b5(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=m5(e,n,t,r);return b5(e,i)?i:void 0}).filter(n2)}function y5(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,LQ(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function v5(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,LQ(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function b5(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!j5(e)||!i)&&S5(e,{label:a,value:s,data:o},r)}var x5=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},w5=function(e,t){return e.getOptionLabel(t)},C5=function(e,t){return e.getOptionValue(t)};function _5(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function k5(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=C5(e,t);return n.some(function(t){return C5(e,t)===r})}function S5(e,t,n){return!e.filterOption||e.filterOption(t,n)}var j5=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},O5=1,E5=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DQ(e,t)}(i,e);var t,r,o=(t=i,r=RQ(),function(){var e,n=IQ(t);if(r){var o=IQ(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return function(e,t){if(t&&("object"==CQ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;n.name=i,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,r){var o=t.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=n.name,a=t.state.selectValue,s=o&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var c=t.getOptionValue(e);t.setValue(a.filter(function(e){return t.getOptionValue(e)!==c}),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});o?t.setValue([].concat(LQ(a),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),i=r.filter(function(e){return t.getOptionValue(e)!==o}),a=r2(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(r2(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),i=r2(e,o,o[0]||null);r&&t.onChange(i,{action:"pop-value",removedValue:r})},t.getFocusedOptionId=function(e){return x5(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return v5(g5(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return H1.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return w5(t.props,e)},t.getOptionValue=function(e){return C5(t.props,e)},t.getStyles=function(e,n){var r=t.props.unstyled,o=f5[e](n,r);o.boxSizing="border-box";var i=t.props.styles[e];return i?i(o,n):o},t.getClassNames=function(e,n){var r,o;return null===(r=(o=t.props.classNames)[e])||void 0===r?void 0:r.call(o,n)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,jQ(jQ({},T2),e.components);var e},t.buildCategorizedOptions=function(){return g5(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return y5(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:jQ({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,r=n.isMulti,o=n.menuIsOpen;t.focusInput(),o?(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout(function(){return t.focusInput()}))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&q1(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var o=Math.abs(r.clientX-t.initialTouchX),i=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=o>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return j5(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,f=n.openMenuOnFocus,p=t.state,h=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!h||f&&t.isOptionSelected(h,g))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!c){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++O5),t.state.selectValue=W1(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),r=t.buildFocusableOptions(),a=r.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=r[a],t.state.focusedOptionId=x5(n,r[a])}return t}return function(e,t,n){t&&NQ(e.prototype,t),n&&NQ(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(i,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&G1(this.menuListRef,this.focusedOptionRef),(d5()||u5(/^iPhone/i)||u5(/^iPad/i)||d5()&&navigator.maxTouchPoints>1)&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(G1(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(p5):jQ(jQ({},p5),this.props.theme):p5}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return _5(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return k5(this.props,e,t)}},{key:"filterOption",value:function(e,t){return S5(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,r=e.isSearchable,o=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),g=jQ(jQ(jQ({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?n.createElement(u,AQ({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},g)):n.createElement(Z2,AQ({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:z1,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:s,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),r=t.MultiValue,o=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,f=u.isDisabled,p=u.isMulti,h=u.inputValue,m=u.placeholder,g=this.state,y=g.selectValue,v=g.focusedValue,b=g.isFocused;if(!this.hasValue()||!d)return h?null:n.createElement(l,AQ({},c,{key:"placeholder",isDisabled:f,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return y.map(function(t,s){var l=t===v,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return n.createElement(r,AQ({},c,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:f,key:u,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var x=y[0];return n.createElement(s,AQ({},c,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return n.createElement(e,AQ({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;return e&&i?n.createElement(e,AQ({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,r=e.IndicatorSeparator;if(!t||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return n.createElement(r,AQ({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return n.createElement(e,AQ({},t,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),r=t.Group,o=t.GroupHeading,i=t.Menu,a=t.MenuList,s=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,m=p.inputValue,g=p.isLoading,y=p.loadingMessage,v=p.minMenuHeight,b=p.maxMenuHeight,x=p.menuIsOpen,w=p.menuPlacement,C=p.menuPosition,_=p.menuPortalTarget,k=p.menuShouldBlockScroll,S=p.menuShouldScrollIntoView,j=p.noOptionsMessage,O=p.onMenuScrollToTop,E=p.onMenuScrollToBottom;if(!x)return null;var P,T=function(t,r){var o=t.type,i=t.data,a=t.isDisabled,s=t.isSelected,l=t.label,c=t.value,p=f===i,h=a?void 0:function(){return e.onOptionHover(i)},m=a?void 0:function(){return e.selectOption(i)},g="".concat(e.getElementId("option"),"-").concat(r),y={id:g,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.state.isAppleDevice?void 0:s};return n.createElement(u,AQ({},d,{innerProps:y,data:i,isDisabled:a,isSelected:s,key:g,label:l,type:o,value:c,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map(function(t){if("group"===t.type){var i=t.data,a=t.options,s=t.index,l="".concat(e.getElementId("group"),"-").concat(s),c="".concat(l,"-heading");return n.createElement(r,AQ({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e,"".concat(s,"-").concat(e.index))}))}if("option"===t.type)return T(t,"".concat(t.index))});else if(g){var M=y({inputValue:m});if(null===M)return null;P=n.createElement(l,d,M)}else{var A=j({inputValue:m});if(null===A)return null;P=n.createElement(c,d,A)}var N={minMenuHeight:v,maxMenuHeight:b,menuPlacement:w,menuPosition:C,menuShouldScrollIntoView:S},D=n.createElement(c2,AQ({},d,N),function(t){var r=t.ref,o=t.placerProps,s=o.placement,l=o.maxHeight;return n.createElement(i,AQ({},d,N,{innerRef:r,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:s}),n.createElement(s5,{captureEnabled:h,onTopArrive:O,onBottomArrive:E,lockEnabled:k},function(t){return n.createElement(a,AQ({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:f}),P)}))});return _||"fixed"===C?n.createElement(s,AQ({},d,{appendTo:_,controlElement:this.controlRef,menuPlacement:w,menuPosition:C}),D):D}},{key:"renderFormField",value:function(){var e=this,t=this.props,r=t.delimiter,o=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return n.createElement(c5,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(r){var c=l.map(function(t){return e.getOptionValue(t)}).join(r);return n.createElement("input",{name:a,type:"hidden",value:c})}var u=l.length>0?l.map(function(t,r){return n.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:e.getOptionValue(t)})}):n.createElement("input",{name:a,type:"hidden",value:""});return n.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return n.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,r=t.ariaSelection,o=t.focusedOption,i=t.focusedValue,a=t.isFocused,s=t.selectValue,l=this.getFocusableOptions();return n.createElement(L2,AQ({},e,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,r=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,l=a.id,c=a.isDisabled,u=a.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return n.createElement(o,AQ({},f,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),n.createElement(t,AQ({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),n.createElement(i,AQ({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),n.createElement(r,AQ({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=W1(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var g=d?function(e,t){return y5(g5(e,t))}(e,h):[],y=d?v5(g5(e,h),"".concat(l,"-option")):[],v=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:b,focusedOptionId:x5(y,b),focusableOptionsWithIds:y,focusedValue:v,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,C=a&&s;return a&&!C&&(w={value:r2(p,h,h[0]||null),options:h,action:"initial-input-focus"},C=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),jQ(jQ(jQ({},m),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:C})}}]),i}(n.Component);E5.defaultProps=h5;var P5=(0,n.forwardRef)(function(e,t){var r=function(e){var t=e.defaultInputValue,r=void 0===t?"":t,o=e.defaultMenuIsOpen,i=void 0!==o&&o,a=e.defaultValue,s=void 0===a?null:a,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,h=e.value,m=TQ(e,MQ),g=PQ((0,n.useState)(void 0!==l?l:r),2),y=g[0],v=g[1],b=PQ((0,n.useState)(void 0!==c?c:i),2),x=b[0],w=b[1],C=PQ((0,n.useState)(void 0!==h?h:s),2),_=C[0],k=C[1],S=(0,n.useCallback)(function(e,t){"function"==typeof u&&u(e,t),k(e)},[u]),j=(0,n.useCallback)(function(e,t){var n;"function"==typeof d&&(n=d(e,t)),v(void 0!==n?n:e)},[d]),O=(0,n.useCallback)(function(){"function"==typeof p&&p(),w(!0)},[p]),E=(0,n.useCallback)(function(){"function"==typeof f&&f(),w(!1)},[f]),P=void 0!==l?l:y,T=void 0!==c?c:x,M=void 0!==h?h:_;return jQ(jQ({},m),{},{inputValue:P,menuIsOpen:T,onChange:S,onInputChange:j,onMenuClose:E,onMenuOpen:O,value:M})}(e);return n.createElement(E5,AQ({ref:t},r))}),T5=P5,M5=o(478);M5.domToReact,M5.htmlToDOM,M5.attributesToProps,M5.Element;const A5=M5,N5=JSON.parse("{\"Hy\":\"<svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'><mask id='mask0_48_586' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='1' y='2' width='21' height='20'><path fill-rule='evenodd' clip-rule='evenodd' d='M1.99023 12C1.99023 6.48 6.44826 2 11.9412 2C17.4341 2 21.8921 6.48 21.8921 12C21.8921 17.52 17.4341 22 11.9412 22C6.44826 22 1.99023 17.52 1.99023 12ZM12.9363 13H16.9167V11H12.9363V7H10.9461V11H6.96571V13H10.9461V17H12.9363V13Z' fill='white'/></mask><g mask='url(#mask0_48_586)'><rect width='23.8823' height='24' fill='#6B7280'/></g></svg>\",\"bH\":\"<svg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'><mask id='mask0_48_610' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='2' y='2' width='21' height='20'><path fill-rule='evenodd' clip-rule='evenodd' d='M2.87305 12C2.87305 6.48 7.33108 2 12.824 2C18.3169 2 22.775 6.48 22.775 12C22.775 17.52 18.3169 22 12.824 22C7.33108 22 2.87305 17.52 2.87305 12ZM7.84853 13H17.7995V11H7.84853V13Z' fill='white'/></mask><g mask='url(#mask0_48_610)'><rect x='0.882812' width='23.8823' height='24' fill='#6B7280'/></g></svg>\"}"),{__:D5}=wp.i18n,I5=e=>{const t=(0,n.useRef)(),r=A5(N5.Hy),o=A5(N5.bH),[i,a]=(0,n.useState)(e.specific),[l,c]=(0,n.useState)([]),[u,d]=(0,n.useState)({rule:e.value.rule,specific:e.value.specific}),[f,p]=(0,n.useState)(e.value.apply_on_child||!1);(0,n.useEffect)(()=>()=>{t.current?.abort()},[]),(0,n.useEffect)(()=>{void 0!==e.specific&&null!==e.specific&&(a(e.specific),d(t=>({...t,specific:e.specific})))},[e.specific]),(0,n.useEffect)(()=>{e.value&&void 0!==e.value.apply_on_child&&p(e.value.apply_on_child)},[e.value.apply_on_child]),u.rule.length=0===u.rule.length?1:u.rule.length;let h=astCustomLayout.displayRules;"template"===e.layout&&("single"===e.templateType?h=astCustomLayout.singleDisplayRules:"archive"===e.templateType&&(h=astCustomLayout.archiveDisplayRules));const m=Object.entries(h).map(([e,t])=>{let n=t.value;return(0,s.jsx)("optgroup",{label:t.label,className:`counts-${n.length}`,children:Object.entries(n).map(([e,t])=>{const n=u.rule.includes(e)?"disabled":"";return(0,s.jsxs)("option",{value:e,disabled:n,children:[" ",t," "]},e)})},e)}),g=()=>{const e=u.rule.concat("");d({...u,rule:e})},y=(()=>{let e;function n(...n){clearTimeout(e),e=setTimeout(()=>(e=>{let n="";"1"===astCustomLayout.checkPolylangActive&&(n="&pll_ajax_backend=1&pll_post_id="+document.querySelector(".metabox-base-form #post_ID").value);const r=[];if(""!==e&&1<e.length){t.current&&t.current?.abort(),t.current=new AbortController;const o={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:"action=astra_get_posts_by_query&q="+e+"&nonce="+astCustomLayout.ajax_nonce+n,signal:t.current?.signal};fetch(ajaxurl,o).then(e=>e.json()).then(e=>{Object.entries(e).forEach(([e,t])=>{const n=Object.entries(t.children).map(([e,t])=>({value:t.id,label:t.text}));let o={label:t.text,options:n};r.push(o)}),c(r)}).catch(e=>{"AbortError"!==e.name&&console.error("Error fetching data:",e)})}else c(r)})(...n),300)}return n.cancel=()=>{clearTimeout(e)},n})(),v=(t,n=!1,r=null)=>{"specifics"===u.rule[t]&&!1===n&&(u.specific=[],a([]));let o=u.rule.filter(e=>""!=e),i=u.specific.map(e=>e.value);const s=null!==r?r:f;let l={rule:o,specific:i,specificText:u.specific,apply_on_child:s};d({...u}),e.onChange(l)},b=1===u.rule.length||2===u.rule.length&&u.rule.includes("clflag")?"ast-disabled-close ":"";return(0,s.jsx)("div",{className:"ast-custom-layout-meta-wrap components-base-control__field",children:wQ()(u.rule.length,t=>(t=>{const n=("header"===e.layout||"footer"===e.layout)&&"specifics"===u.rule[t]&&i&&i.length>0;return(0,s.jsxs)("div",{className:"ast-display-rule",children:[("clflag"!==u.rule[t]||"clflag"===u.rule[t]&&1===u.rule.length)&&(0,s.jsxs)("div",{className:"ast-select-control",children:[(0,s.jsxs)("select",{className:"components-select-control__input ast-custom-select",value:void 0!==u.rule[t]&&null!==u.rule[t]?u.rule[t]:"",onChange:e=>((e,t)=>{let n=e.target.value;u.rule[t]=n,v(t)})(e,t),children:[(0,s.jsxs)("option",{value:"",children:[" ",D5("— Select —","astra-addon")]}),m]}),"specifics"==u.rule[t]&&(0,s.jsx)(T5,{value:i,options:l,onInputChange:e=>y(e),isMulti:!0,menuPortalTarget:document.body.querySelector(".components-modal__screen-overlay"),onChange:e=>((e,t)=>{a(e),u.specific=e,d({...u}),v(t,!0)})(e,t),isSearchable:!0,className:"ast-meta-select",classNamePrefix:"ast"}),n&&(0,s.jsx)("div",{className:"ast-apply-on-child-wrap",style:{marginTop:"15px",padding:"10px",backgroundColor:"#f0f0f1",borderRadius:"4px"},children:(0,s.jsx)(bQ.CheckboxControl,{label:D5("Apply on Child Pages/Posts","astra-addon"),checked:f,onChange:e=>{p(e),v(t,!0,e)}})})]}),("clflag"!==u.rule[t]||"clflag"===u.rule[t]&&1===u.rule.length)&&(0,s.jsxs)("div",{className:"ast-single-options",children:[(0,s.jsx)("span",{className:"ast-add-rule ast-option",onClick:g,children:r}),(0,s.jsx)("span",{className:b+"ast-cl-close target_rule-condition-delete ast-option",onClick:e=>(e=>{const t=u.rule.filter((t,n)=>n!==e);u.rule=t,v(e)})(t),children:o})]})]},"key-"+t)})(t))})},R5=e=>{const t=A5(N5.Hy),r=A5(N5.bH),[o,i]=(0,n.useState)(e.value),l=0===e.value.length?[""]:e.value,[c,u]=(0,n.useState)(l);c.length=0===c.length?1:c.length;const d=Object.entries(astCustomLayout.userRoles).map(([e,t])=>(0,s.jsx)("optgroup",{label:t.label,children:Object.entries(t.value).map(([e,t])=>{const n=c.includes(e)?"disabled":"";return(0,s.jsxs)("option",{value:e,disabled:n,children:[" ",t," "]},e)})},e)),f=()=>{const t=c.concat("all");let n=t.filter(e=>""!=e);const r=[...new Set(n)];u(t),i(r),e.onChange(r)},p=1===c.length||2===c.length&&c.includes("clflag")?"ast-disabled-close ":"";return(0,s.jsx)("div",{className:"ast-custom-layout-meta-wrap components-base-control__field",children:wQ()(c.length,n=>(n=>(0,s.jsxs)("div",{className:"ast-display-rule",children:[("clflag"!==c[n]||"clflag"===c[n]&&1===c.length)&&(0,s.jsx)("div",{className:"ast-select-control",children:(0,s.jsxs)("select",{className:"components-select-control__input ast-custom-select",value:void 0!==c[n]&&null!==c[n]?c[n]:"",onChange:t=>((t,n)=>{let r=t.target.value;c[n]=r;let o=c.filter(e=>""!=e);const a=[...new Set(o)];u(c),i({...a}),e.onChange(a)})(t,n),children:[(0,s.jsxs)("option",{value:"all",children:[" ",(0,a.__)("All","astra-addon")]}),d]})}),("clflag"!==c[n]||"clflag"===c[n]&&1===c.length)&&(0,s.jsxs)("div",{className:"ast-single-options",children:[(0,s.jsx)("span",{className:"ast-add-rule ast-option",onClick:f,children:t}),(0,s.jsx)("span",{className:p+"target_rule-condition-delete ast-option",onClick:t=>(t=>{const n=c.filter((e,n)=>n!==t);let r=n.filter(e=>""!=e);const o=[...new Set(r)];u(n),i(o),e.onChange(o)})(n),children:r})]})]},"key-"+n))(n))})},L5=e=>{const{isLoading:t,closeModal:n,whiteLabelledLogo:r,returnToPostLabel:o,returnToPostDescription:i,onReturnToPostClick:l}=e,c=o||(0,a.__)("Return To Post","astra-addon"),u=i||(0,a.__)("Make sure to update your post for changes to take effect.","astra-addon"),d=l||n,f=!0===t;return(0,s.jsxs)(bQ.Modal,{title:(0,a.__)("Display and User Conditions","astra-addon"),className:"ast-layout-settings-modal ast-display-user-conditions",shouldCloseOnClickOutside:!1,onRequestClose:n,icon:r(),children:[f?(0,s.jsx)("div",{className:"ast-display-condition-modal-spinner",children:(0,s.jsx)(bQ.Spinner,{})}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"ast-cl-settings-content",children:(0,s.jsx)("table",{className:"ast-advanced-hook-table widefat",children:(0,s.jsxs)("tbody",{children:["404-page"!==e.meta["ast-advanced-hook-layout"]&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("tr",{className:"ast-advanced-hook-row ast-target-rules-display",children:[(0,s.jsx)("td",{className:"ast-advanced-hook-row-heading",children:(0,s.jsxs)("label",{children:[" ",(0,a.__)("Display On","astra-addon")]})}),(0,s.jsx)("td",{className:"ast-advanced-hook-row-content",children:(0,s.jsx)(I5,{layout:void 0!==e.meta["ast-advanced-hook-layout"]&&""!==e.meta["ast-advanced-hook-layout"]?e.meta["ast-advanced-hook-layout"]:"0",templateType:void 0!==e.meta["ast-advanced-hook-template-type"]&&""!==e.meta["ast-advanced-hook-template-type"]?e.meta["ast-advanced-hook-template-type"]:"",value:e.meta["ast-advanced-hook-location"],specific:e.meta["ast-advanced-hook-location"].specificText,isDisplayRule:!0,onChange:t=>{if(-1===t.rule.indexOf("clflag"))t.rule.push("clflag");else if(0<t.rule.indexOf("clflag")){let e=t.rule.indexOf("clflag");t.rule.splice(e,1)}e.meta["ast-advanced-hook-location"]={rule:t.rule,specific:t.specific,specificText:t.specificText,apply_on_child:t.apply_on_child||!1},e.setMetaFieldValue(e.meta["ast-advanced-hook-location"],"ast-advanced-hook-location")}})})]}),(0,s.jsxs)("tr",{className:"ast-advanced-hook-row ast-target-rules-display",children:[(0,s.jsx)("td",{className:"ast-advanced-hook-row-heading",children:(0,s.jsxs)("label",{children:[" ",(0,a.__)("Do Not Display On","astra-addon")]})}),(0,s.jsx)("td",{className:"ast-advanced-hook-row-content",children:(0,s.jsx)(I5,{layout:void 0!==e.meta["ast-advanced-hook-layout"]&&""!==e.meta["ast-advanced-hook-layout"]?e.meta["ast-advanced-hook-layout"]:"0",templateType:void 0!==e.meta["ast-advanced-hook-template-type"]&&""!==e.meta["ast-advanced-hook-template-type"]?e.meta["ast-advanced-hook-template-type"]:"",value:e.meta["ast-advanced-hook-exclusion"],specific:e.meta["ast-advanced-hook-exclusion"].specificText,onChange:t=>{if(-1===t.rule.indexOf("clflag"))t.rule.push("clflag");else if(0<t.rule.indexOf("clflag")){let e=t.rule.indexOf("clflag");t.rule.splice(e,1)}e.meta["ast-advanced-hook-exclusion"]={rule:t.rule,specific:t.specific,specificText:t.specificText,apply_on_child:t.apply_on_child||!1},e.setMetaFieldValue(e.meta["ast-advanced-hook-exclusion"],"ast-advanced-hook-exclusion")}})})]})]}),(0,s.jsxs)("tr",{className:"ast-advanced-hook-row ast-target-rules-display",children:[(0,s.jsx)("td",{className:"ast-advanced-hook-row-heading",children:(0,s.jsxs)("label",{children:[" ",(0,a.__)("Display for Users","astra-addon")]})}),(0,s.jsx)("td",{className:"ast-advanced-hook-row-content",children:(0,s.jsx)(R5,{value:void 0!==e.meta["ast-advanced-hook-users"]&&""!==e.meta["ast-advanced-hook-users"]?e.meta["ast-advanced-hook-users"]:[],onChange:t=>{if(-1===t.indexOf("clflag"))t.push("clflag");else if(0<t.indexOf("clflag")){let e=t.indexOf("clflag");t.splice(e,1)}e.meta["ast-advanced-hook-users"]=[...t],e.setMetaFieldValue([...t],"ast-advanced-hook-users")}})})]})]})})})}),(0,s.jsx)("div",{className:"ast-cl-footer-container",children:(0,s.jsxs)("div",{className:"ast-button-container",children:[(0,s.jsxs)("span",{className:"ast-cl-popup-notice",children:[(0,s.jsx)("i",{className:"dashicons dashicons-warning"}),u]}),(0,s.jsx)("button",{disabled:f,className:"button button-default",onClick:d,children:c})]})})]})},F5=window.wp.element,B5=({options:e})=>{const t=(0,F5.useRef)(null),[n,r]=(0,F5.useState)(!1);return(0,F5.useEffect)(()=>{function e(e){t.current&&!t.current.contains(e.target)&&r(!1)}return n&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[t,n]),(0,s.jsxs)("div",{ref:t,className:"ast-tb-card-options",children:[n?(0,s.jsx)(gp,{className:"ast-tb-card-option-items right-2 rounded-[var(--radius-field)] border p-[6px] shado-lg gap-0",children:e.map((e,t)=>(0,s.jsx)("button",{className:"font-normal text-[12px] leading-[16px] tracking-[0] text-text-primary",onClick:e?.onClick?()=>e.onClick(r):void 0,children:e.label},t))}):null,(0,s.jsx)("button",{type:"button",className:"ast-tb-card-option-button",onClick:()=>r(!n),children:n?(0,s.jsx)(rX,{}):(0,s.jsx)(iX,{})})]})},z5=(0,n.createContext)(),V5=({children:e})=>{const[t,r]=(0,n.useState)([]),[o,i]=(0,n.useState)(!0),a=(0,n.useCallback)(()=>{fetch(astra_theme_builder.rest_url,{method:"GET",headers:{"X-WP-Nonce":astra_theme_builder.nonce}}).then(e=>{if(!e.ok)throw new Error("Network response was not ok");return e.json()}).then(e=>r(e)).catch(e=>{console.error("Fetch error:",e),window.location.href=astra_theme_builder.admin_url}).finally(()=>i(!1))},[]);return(0,n.useEffect)(a,[a]),(0,s.jsx)(z5.Provider,{value:{loading:o,layouts:t,fetchLayouts:a},children:e})},H5=({categories:e=!1}={})=>{let{loading:t,layouts:r,fetchLayouts:o,...i}=(0,n.useContext)(z5);return i.categories=(0,n.useMemo)(()=>!t&&e?r.reduce((e,t)=>{const n="template"===t.layout_value?t.template_type:t.layout_value;return e[n]=e[n]||[],e[n].push(t),e},{}):{},[r,e,t]),{loading:t,layouts:r,fetchLayouts:o,...i}},W5={"create-new":(0,a.__)("Start customizing every part of your website.","astra-addon"),"all-layouts":(0,a.__)("All Layouts","astra-addon"),header:(0,a.__)("Header","astra-addon"),footer:(0,a.__)("Footer","astra-addon"),single:(0,a.__)("Single Template","astra-addon"),archive:(0,a.__)("Archive Template","astra-addon"),hooks:(0,a.__)("Hooks","astra-addon"),content:(0,a.__)("Content","astra-addon"),"404-page":(0,a.__)("404 Page","astra-addon")},$5=()=>{const{loading:e,layouts:t}=H5(),n=new URLSearchParams(oJ().search),r=n.get("page"),o=n.get("path");let i="create-new";return"theme-builder"===r&&(i=Object.keys(W5).includes(o)?o:"all-layouts","all-layouts"!==i||e||!t||t.length||(i="create-new")),{layout:i,title:W5[i],isAll:"all-layouts"===i,isNew:"create-new"===i,isHeaderFooter:"header"===i||"footer"===i}},U5=function({ID:e,title:t,icon:r,layout:o,template:i,enabled:l,post_status:c,edit_post_link:u,post_link:d,setModalPostID:f}){const[p,h]=(0,n.useState)(!1),[m,g]=(0,n.useState)(!1),[y,v]=(0,n.useState)("yes"===l||""===l),[b,x]=(0,n.useState)(!1),{fetchLayouts:w}=H5(),{isNew:C,isAll:_}=$5();return(0,s.jsxs)("div",{className:"ast-tb-card-parent relative",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[p&&(C?(0,s.jsxs)(ve,{className:"ast-tb-card-hover-btn",onClick:()=>{let e=astra_theme_builder.new_custom_layout_base_url+"&type="+o;"template"===o&&(e+="&template_type="+i),window.location.href=e},children:[(0,s.jsxs)("svg",{width:"20",height:"15",viewBox:"0 -4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M8 3.83301V13.1663",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M3.3335 8.5H12.6668",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"})]}),(0,a.__)("Create Layout","astra-addon")]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(ve,{className:"ast-tb-card-hover-edit-btn rounded p-2",onClick:()=>window.open(u,"_self"),children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 -4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M8 13.333H14",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M11 2.33316C11.2652 2.06794 11.6249 1.91895 12 1.91895C12.1857 1.91895 12.3696 1.95553 12.5412 2.0266C12.7128 2.09767 12.8687 2.20184 13 2.33316C13.1313 2.46448 13.2355 2.62038 13.3066 2.79196C13.3776 2.96354 13.4142 3.14744 13.4142 3.33316C13.4142 3.51888 13.3776 3.70277 13.3066 3.87436C13.2355 4.04594 13.1313 4.20184 13 4.33316L4.66667 12.6665L2 13.3332L2.66667 10.6665L11 2.33316Z",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"})]}),(0,a.__)("Edit","astra-addon")]}),(0,s.jsx)(qJ,{to:{search:"?page=theme-builder&path="+("template"===o?`${i}&id=${e}`:`${o}&id=${e}`)},className:"ast-tb-link",children:(0,s.jsxs)(ve,{className:"ast-tb-card-hover-preview-btn text-text-primary p-2 button-sm border border-[#E6E6EF] rounded flex items-center gap-2",variant:"outline",children:[(0,s.jsxs)("svg",{width:"22",height:"18",viewBox:"1 -3 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M1.83301 7.99967C1.83301 7.99967 3.83301 3.33301 8.49967 3.33301C13.1663 3.33301 15.1663 7.99967 15.1663 7.99967C15.1663 7.99967 13.1663 12.6663 8.49967 12.6663C3.83301 12.6663 1.83301 7.99967 1.83301 7.99967Z",stroke:"#141338","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M8.5 10C9.60457 10 10.5 9.10457 10.5 8C10.5 6.89543 9.60457 6 8.5 6C7.39543 6 6.5 6.89543 6.5 8C6.5 9.10457 7.39543 10 8.5 10Z",stroke:"#141338","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"})]}),(0,a.__)("Quick View","astra-addon")]})})]})),(0,s.jsxs)("div",{className:"ast-tb-card min-w-[228px] max-w-[352px] rounded-md shadow-md bg-white",children:[(0,s.jsx)("div",{className:"flex justify-center items-center h-full "+(p?"ast-tb-card-icon-wrapper-hover":""),children:r}),(0,s.jsxs)("div",{className:"ast-tb-card-title-wrapper border-t border-[#e9e9e9] p-[10px]",children:[(0,s.jsxs)("h3",{className:r?"m-0 text-center text-text-primary font-semibold text-base leading-6":"ast-tb-card-title",children:[_&&(0,s.jsx)(lX,{fill:y&&"publish"===c?"#17B26A":"#94A3B8"}),t?(e=>e.length>20?e.substring(0,20)+"...":e)(t):(0,a.__)("(untitled)","astra-addon")]}),!!e&&(0,s.jsx)(B5,{options:[{label:y?(0,a.__)("Disable","astra-addon"):(0,a.__)("Enable","astra-addon"),onClick:()=>{const t=y?"no":"yes",n=new XMLHttpRequest,r=astra_theme_builder.quick_view.url+"?action=ast_advanced_hook_display_toggle&post_id="+e+"&enable="+t+"&nonce="+astra_theme_builder.quick_view.nonce;n.open("GET",r),n.send(),v(!y),w()}},{label:(0,a.__)("Preview","astra-addon"),onClick:()=>window.location.href=d},{label:m?(0,a.__)("Copied","astra-addon"):(0,a.__)("Copy Shortcode","astra-addon"),onClick:()=>{const t=document.createElement("input");t.setAttribute("value",`[astra_custom_layout id=${e}]`),document.body.appendChild(t),t.select(),document.execCommand("copy")&&(document.body.removeChild(t),g(!0),setTimeout(()=>{g(!1)},2e3))}},{label:(0,a.__)("Display Conditions","astra-addon"),onClick:t=>{f(e),t(!1)}},{label:b?(0,a.__)("Duplicating...","astra-addon"):(0,a.__)("Duplicate Layout","astra-addon"),onClick:t=>{b||((async()=>{x(!0);const t={method:"POST",headers:{"X-WP-Nonce":astra_theme_builder.nonce}};try{(await fetch(astra_theme_builder.rest_url+e+"/duplicate",t)).ok?w():console.error("Failed to duplicate layout")}catch(e){console.error("Error duplicating layout:",e)}finally{x(!1)}})(),t(!1))}}]})]})]})]})},q5=[{label:(0,a.__)("Header","astra-addon"),layout:"header",template:"",icon:(0,s.jsxs)("svg",{width:"270",height:"270",viewBox:"0 0 270 270",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M37 45.5C37 41.0817 40.5817 37.5 45 37.5H225C229.418 37.5 233 41.0817 233 45.5V69.5H37V45.5Z",fill:"#E6E6EF"}),(0,s.jsx)("circle",{cx:"53",cy:"53.5",r:"6",fill:"white"}),(0,s.jsx)("path",{d:"M119 53.5C119 52.9477 119.448 52.5 120 52.5H134C134.552 52.5 135 52.9477 135 53.5C135 54.0523 134.552 54.5 134 54.5H120C119.448 54.5 119 54.0523 119 53.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M141 53.5C141 52.9477 141.448 52.5 142 52.5H156C156.552 52.5 157 52.9477 157 53.5C157 54.0523 156.552 54.5 156 54.5H142C141.448 54.5 141 54.0523 141 53.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M163 53.5C163 52.9477 163.448 52.5 164 52.5H178C178.552 52.5 179 52.9477 179 53.5C179 54.0523 178.552 54.5 178 54.5H164C163.448 54.5 163 54.0523 163 53.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M185 53.5C185 52.9477 185.448 52.5 186 52.5H200C200.552 52.5 201 52.9477 201 53.5C201 54.0523 200.552 54.5 200 54.5H186C185.448 54.5 185 54.0523 185 53.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M207 53.5C207 52.9477 207.448 52.5 208 52.5H222C222.552 52.5 223 52.9477 223 53.5C223 54.0523 222.552 54.5 222 54.5H208C207.448 54.5 207 54.0523 207 53.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M45 38.5H225C228.866 38.5 232 41.634 232 45.5V225.5C232 229.366 228.866 232.5 225 232.5H45C41.134 232.5 38 229.366 38 225.5V45.5L38.0088 45.1396C38.1963 41.4411 41.2549 38.5 45 38.5Z",stroke:"#E6E6EF","stroke-width":"1.25"}),(0,s.jsx)("rect",{x:"37",y:"67.5",width:"196",height:"2",fill:"#E6E6EF"})]})},{label:(0,a.__)("Footer","astra-addon"),layout:"footer",template:"",icon:(0,s.jsxs)("svg",{width:"270",height:"270",viewBox:"0 0 270 270",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M37 225.5C37 229.918 40.5817 233.5 45 233.5H225C229.418 233.5 233 229.918 233 225.5V189.5H37V225.5Z",fill:"#E6E6EF"}),(0,s.jsx)("circle",{cx:"53",cy:"208.5",r:"6",fill:"white"}),(0,s.jsx)("path",{d:"M117 217.5C117 216.948 117.448 216.5 118 216.5H138C138.552 216.5 139 216.948 139 217.5C139 218.052 138.552 218.5 138 218.5H118C117.448 218.5 117 218.052 117 217.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M145 217.5C145 216.948 145.448 216.5 146 216.5H166C166.552 216.5 167 216.948 167 217.5C167 218.052 166.552 218.5 166 218.5H146C145.448 218.5 145 218.052 145 217.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M173 217.5C173 216.948 173.448 216.5 174 216.5H194C194.552 216.5 195 216.948 195 217.5C195 218.052 194.552 218.5 194 218.5H174C173.448 218.5 173 218.052 173 217.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M201 217.5C201 216.948 201.448 216.5 202 216.5H222C222.552 216.5 223 216.948 223 217.5C223 218.052 222.552 218.5 222 218.5H202C201.448 218.5 201 218.052 201 217.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M117 211.5C117 210.948 117.448 210.5 118 210.5H138C138.552 210.5 139 210.948 139 211.5C139 212.052 138.552 212.5 138 212.5H118C117.448 212.5 117 212.052 117 211.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M145 211.5C145 210.948 145.448 210.5 146 210.5H166C166.552 210.5 167 210.948 167 211.5C167 212.052 166.552 212.5 166 212.5H146C145.448 212.5 145 212.052 145 211.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M173 211.5C173 210.948 173.448 210.5 174 210.5H194C194.552 210.5 195 210.948 195 211.5C195 212.052 194.552 212.5 194 212.5H174C173.448 212.5 173 212.052 173 211.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M201 211.5C201 210.948 201.448 210.5 202 210.5H222C222.552 210.5 223 210.948 223 211.5C223 212.052 222.552 212.5 222 212.5H202C201.448 212.5 201 212.052 201 211.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M117 205.5C117 204.948 117.448 204.5 118 204.5H138C138.552 204.5 139 204.948 139 205.5C139 206.052 138.552 206.5 138 206.5H118C117.448 206.5 117 206.052 117 205.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M145 205.5C145 204.948 145.448 204.5 146 204.5H166C166.552 204.5 167 204.948 167 205.5C167 206.052 166.552 206.5 166 206.5H146C145.448 206.5 145 206.052 145 205.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M173 205.5C173 204.948 173.448 204.5 174 204.5H194C194.552 204.5 195 204.948 195 205.5C195 206.052 194.552 206.5 194 206.5H174C173.448 206.5 173 206.052 173 205.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M201 205.5C201 204.948 201.448 204.5 202 204.5H222C222.552 204.5 223 204.948 223 205.5C223 206.052 222.552 206.5 222 206.5H202C201.448 206.5 201 206.052 201 205.5Z",fill:"white"}),(0,s.jsx)("path",{d:"M45 38.5H225C228.866 38.5 232 41.634 232 45.5V225.5C232 229.366 228.866 232.5 225 232.5H45C41.134 232.5 38 229.366 38 225.5V45.5L38.0088 45.1396C38.1963 41.4411 41.2549 38.5 45 38.5Z",stroke:"#E6E6EF","stroke-width":"1.25"}),(0,s.jsx)("rect",{x:"37",y:"189.5",width:"196",height:"2",fill:"#E6E6EF"})]})},{label:(0,a.__)("Hooks","astra-addon"),layout:"hooks",template:"",icon:(0,s.jsxs)("svg",{width:"270",height:"270",viewBox:"0 0 270 270",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M67 133.5C67 135.709 68.7909 137.5 71 137.5H199C201.209 137.5 203 135.709 203 133.5V71.5C203 69.2909 201.209 67.5 199 67.5H71C68.7909 67.5 67 69.2909 67 71.5V133.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M147 110.5L155 102.5L147 94.5",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M123 94.5L115 102.5L123 110.5",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M140 86.5L130 118.5",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M67 146.5C67 147.052 67.4477 147.5 68 147.5H202C202.552 147.5 203 147.052 203 146.5C203 145.948 202.552 145.5 202 145.5H68C67.4477 145.5 67 145.948 67 146.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 154.5C67 155.052 67.4477 155.5 68 155.5H202C202.552 155.5 203 155.052 203 154.5C203 153.948 202.552 153.5 202 153.5H68C67.4477 153.5 67 153.948 67 154.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 162.5C67 163.052 67.4477 163.5 68 163.5H202C202.552 163.5 203 163.052 203 162.5C203 161.948 202.552 161.5 202 161.5H68C67.4477 161.5 67 161.948 67 162.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 170.5C67 171.052 67.4477 171.5 68 171.5H202C202.552 171.5 203 171.052 203 170.5C203 169.948 202.552 169.5 202 169.5H68C67.4477 169.5 67 169.948 67 170.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 178.5C67 179.052 67.4477 179.5 68 179.5H202C202.552 179.5 203 179.052 203 178.5C203 177.948 202.552 177.5 202 177.5H68C67.4477 177.5 67 177.948 67 178.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 186.5C67 187.052 67.4477 187.5 68 187.5H202C202.552 187.5 203 187.052 203 186.5C203 185.948 202.552 185.5 202 185.5H68C67.4477 185.5 67 185.948 67 186.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 194.5C67 195.052 67.4477 195.5 68 195.5H202C202.552 195.5 203 195.052 203 194.5C203 193.948 202.552 193.5 202 193.5H68C67.4477 193.5 67 193.948 67 194.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 202.5C67 203.052 67.4477 203.5 68 203.5H162C162.552 203.5 163 203.052 163 202.5C163 201.948 162.552 201.5 162 201.5H68C67.4477 201.5 67 201.948 67 202.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M45 38.5H225C228.866 38.5 232 41.634 232 45.5V225.5C232 229.366 228.866 232.5 225 232.5H45C41.134 232.5 38 229.366 38 225.5V45.5L38.0088 45.1396C38.1963 41.4411 41.2549 38.5 45 38.5Z",stroke:"#E6E6EF","stroke-width":"1.25"})]})},{label:(0,a.__)("Inside Post/Page","astra-addon"),layout:"content",template:"",icon:(0,s.jsxs)("svg",{width:"270",height:"270",viewBox:"0 0 270 270",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M67 133.5C67 135.709 68.7909 137.5 71 137.5H199C201.209 137.5 203 135.709 203 133.5V71.5C203 69.2909 201.209 67.5 199 67.5H71C68.7909 67.5 67 69.2909 67 71.5V133.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M147 110.5L155 102.5L147 94.5",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M123 94.5L115 102.5L123 110.5",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M140 86.5L130 118.5",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M67 146.5C67 147.052 67.4477 147.5 68 147.5H202C202.552 147.5 203 147.052 203 146.5C203 145.948 202.552 145.5 202 145.5H68C67.4477 145.5 67 145.948 67 146.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 154.5C67 155.052 67.4477 155.5 68 155.5H202C202.552 155.5 203 155.052 203 154.5C203 153.948 202.552 153.5 202 153.5H68C67.4477 153.5 67 153.948 67 154.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 162.5C67 163.052 67.4477 163.5 68 163.5H202C202.552 163.5 203 163.052 203 162.5C203 161.948 202.552 161.5 202 161.5H68C67.4477 161.5 67 161.948 67 162.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 170.5C67 171.052 67.4477 171.5 68 171.5H202C202.552 171.5 203 171.052 203 170.5C203 169.948 202.552 169.5 202 169.5H68C67.4477 169.5 67 169.948 67 170.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 178.5C67 179.052 67.4477 179.5 68 179.5H202C202.552 179.5 203 179.052 203 178.5C203 177.948 202.552 177.5 202 177.5H68C67.4477 177.5 67 177.948 67 178.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 186.5C67 187.052 67.4477 187.5 68 187.5H202C202.552 187.5 203 187.052 203 186.5C203 185.948 202.552 185.5 202 185.5H68C67.4477 185.5 67 185.948 67 186.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 194.5C67 195.052 67.4477 195.5 68 195.5H202C202.552 195.5 203 195.052 203 194.5C203 193.948 202.552 193.5 202 193.5H68C67.4477 193.5 67 193.948 67 194.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 202.5C67 203.052 67.4477 203.5 68 203.5H162C162.552 203.5 163 203.052 163 202.5C163 201.948 162.552 201.5 162 201.5H68C67.4477 201.5 67 201.948 67 202.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M45 38.5H225C228.866 38.5 232 41.634 232 45.5V225.5C232 229.366 228.866 232.5 225 232.5H45C41.134 232.5 38 229.366 38 225.5V45.5L38.0088 45.1396C38.1963 41.4411 41.2549 38.5 45 38.5Z",stroke:"#E6E6EF","stroke-width":"1.25"})]})},{label:(0,a.__)("Single","astra-addon"),layout:"template",template:"single",icon:(0,s.jsxs)("svg",{width:"270",height:"269",viewBox:"0 0 270 269",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M67 133C67 135.209 68.7909 137 71 137H199C201.209 137 203 135.209 203 133V87C203 84.7909 201.209 83 199 83H71C68.7909 83 67 84.7909 67 87V133Z",fill:"#E6E6EF"}),(0,s.jsx)("circle",{cx:"73",cy:"73",r:"6",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M85 70.5C85 71.0523 85.4477 71.5 86 71.5H100C100.552 71.5 101 71.0523 101 70.5C101 69.9477 100.552 69.5 100 69.5H86C85.4477 69.5 85 69.9477 85 70.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M85 75.5C85 76.0523 85.4477 76.5 86 76.5H120C120.552 76.5 121 76.0523 121 75.5C121 74.9477 120.552 74.5 120 74.5H86C85.4477 74.5 85 74.9477 85 75.5Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 146C67 146.552 67.4477 147 68 147H202C202.552 147 203 146.552 203 146C203 145.448 202.552 145 202 145H68C67.4477 145 67 145.448 67 146Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 154C67 154.552 67.4477 155 68 155H202C202.552 155 203 154.552 203 154C203 153.448 202.552 153 202 153H68C67.4477 153 67 153.448 67 154Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 162C67 162.552 67.4477 163 68 163H202C202.552 163 203 162.552 203 162C203 161.448 202.552 161 202 161H68C67.4477 161 67 161.448 67 162Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 170C67 170.552 67.4477 171 68 171H202C202.552 171 203 170.552 203 170C203 169.448 202.552 169 202 169H68C67.4477 169 67 169.448 67 170Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 178C67 178.552 67.4477 179 68 179H202C202.552 179 203 178.552 203 178C203 177.448 202.552 177 202 177H68C67.4477 177 67 177.448 67 178Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 186C67 186.552 67.4477 187 68 187H202C202.552 187 203 186.552 203 186C203 185.448 202.552 185 202 185H68C67.4477 185 67 185.448 67 186Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 194C67 194.552 67.4477 195 68 195H202C202.552 195 203 194.552 203 194C203 193.448 202.552 193 202 193H68C67.4477 193 67 193.448 67 194Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 202C67 202.552 67.4477 203 68 203H162C162.552 203 163 202.552 163 202C163 201.448 162.552 201 162 201H68C67.4477 201 67 201.448 67 202Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M45 38H225C228.866 38 232 41.134 232 45V225C232 228.866 228.866 232 225 232H45C41.134 232 38 228.866 38 225V45L38.0088 44.6396C38.1963 40.9411 41.2549 38 45 38Z",stroke:"#E6E6EF","stroke-width":"1.25"})]})},{label:(0,a.__)("Archive","astra-addon"),layout:"template",template:"archive",icon:(0,s.jsxs)("svg",{width:"270",height:"269",viewBox:"0 0 270 269",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M67 101C67 103.209 68.7909 105 71 105H125C127.209 105 129 103.209 129 101V71C129 68.7909 127.209 67 125 67H71C68.7909 67 67 68.7909 67 71V101Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 112C67 112.552 67.4477 113 68 113H128C128.552 113 129 112.552 129 112C129 111.448 128.552 111 128 111H68C67.4477 111 67 111.448 67 112Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 120C67 120.552 67.4477 121 68 121H128C128.552 121 129 120.552 129 120C129 119.448 128.552 119 128 119H68C67.4477 119 67 119.448 67 120Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 128C67 128.552 67.4477 129 68 129H108C108.552 129 109 128.552 109 128C109 127.448 108.552 127 108 127H68C67.4477 127 67 127.448 67 128Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 175C67 177.209 68.7909 179 71 179H125C127.209 179 129 177.209 129 175V145C129 142.791 127.209 141 125 141H71C68.7909 141 67 142.791 67 145V175Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 186C67 186.552 67.4477 187 68 187H128C128.552 187 129 186.552 129 186C129 185.448 128.552 185 128 185H68C67.4477 185 67 185.448 67 186Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 194C67 194.552 67.4477 195 68 195H128C128.552 195 129 194.552 129 194C129 193.448 128.552 193 128 193H68C67.4477 193 67 193.448 67 194Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M67 202C67 202.552 67.4477 203 68 203H108C108.552 203 109 202.552 109 202C109 201.448 108.552 201 108 201H68C67.4477 201 67 201.448 67 202Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M141 101C141 103.209 142.791 105 145 105H199C201.209 105 203 103.209 203 101V71C203 68.7909 201.209 67 199 67H145C142.791 67 141 68.7909 141 71V101Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M141 112C141 112.552 141.448 113 142 113H202C202.552 113 203 112.552 203 112C203 111.448 202.552 111 202 111H142C141.448 111 141 111.448 141 112Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M141 120C141 120.552 141.448 121 142 121H202C202.552 121 203 120.552 203 120C203 119.448 202.552 119 202 119H142C141.448 119 141 119.448 141 120Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M141 128C141 128.552 141.448 129 142 129H182C182.552 129 183 128.552 183 128C183 127.448 182.552 127 182 127H142C141.448 127 141 127.448 141 128Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M141 175C141 177.209 142.791 179 145 179H199C201.209 179 203 177.209 203 175V145C203 142.791 201.209 141 199 141H145C142.791 141 141 142.791 141 145V175Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M141 186C141 186.552 141.448 187 142 187H202C202.552 187 203 186.552 203 186C203 185.448 202.552 185 202 185H142C141.448 185 141 185.448 141 186Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M141 194C141 194.552 141.448 195 142 195H202C202.552 195 203 194.552 203 194C203 193.448 202.552 193 202 193H142C141.448 193 141 193.448 141 194Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M141 202C141 202.552 141.448 203 142 203H182C182.552 203 183 202.552 183 202C183 201.448 182.552 201 182 201H142C141.448 201 141 201.448 141 202Z",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M45 38H225C228.866 38 232 41.134 232 45V225C232 228.866 228.866 232 225 232H45C41.134 232 38 228.866 38 225V45L38.0088 44.6396C38.1963 40.9411 41.2549 38 45 38Z",stroke:"#E6E6EF","stroke-width":"1.25"})]})},{label:(0,a.__)("404 Page","astra-addon"),layout:"404-page",template:"",icon:(0,s.jsxs)("svg",{width:"270",height:"269",viewBox:"0 0 270 269",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"50",cy:"53",r:"3",fill:"#D2D3E2"}),(0,s.jsx)("circle",{cx:"60",cy:"53",r:"3",fill:"#D2D3E2"}),(0,s.jsx)("circle",{cx:"70",cy:"53",r:"3",fill:"#D2D3E2"}),(0,s.jsx)("path",{d:"M45 38H225C228.866 38 232 41.134 232 45V225C232 228.866 228.866 232 225 232H45C41.134 232 38 228.866 38 225V45L38.0088 44.6396C38.1963 40.9411 41.2549 38 45 38Z",stroke:"#E6E6EF","stroke-width":"1.25"}),(0,s.jsx)("rect",{x:"37",y:"67",width:"196",height:"2",fill:"#E6E6EF"}),(0,s.jsx)("path",{d:"M109.825 162V155.547H98.4091V153.81L109.825 137.182H112.059V153.455H117.413V155.547H112.059V162H109.825ZM101.21 153.455H109.825V140.834L101.21 153.455Z",fill:"#D2D3E2"}),(0,s.jsx)("path",{d:"M135 163.637C142.531 163.637 148.636 157.532 148.636 150.001C148.636 142.469 142.531 136.364 135 136.364C127.469 136.364 121.364 142.469 121.364 150.001C121.364 157.532 127.469 163.637 135 163.637Z",stroke:"#D2D3E2","stroke-width":"1.70455","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M135 144.546V150",stroke:"#D2D3E2","stroke-width":"1.70455","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M135 155.455H135.014",stroke:"#D2D3E2","stroke-width":"1.70455","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M164.553 162V155.547H153.136V153.81L164.553 137.182H166.786V153.455H172.14V155.547H166.786V162H164.553ZM155.937 153.455H164.553V140.834L155.937 153.455Z",fill:"#D2D3E2"})]})}],Y5=({setModalPostID:e})=>{const{categories:t,fetchLayouts:n}=H5({categories:!0}),r={header:(0,a.__)("Header","astra-addon"),footer:(0,a.__)("Footer","astra-addon"),hooks:(0,a.__)("Hooks","astra-addon"),content:(0,a.__)("Inside Post/Page","astra-addon"),single:(0,a.__)("Single Template","astra-addon"),archive:(0,a.__)("Archive Template","astra-addon"),"404-page":(0,a.__)("404 Page","astra-addon")};return Object.entries(r).map(([n,r])=>t?.[n]&&t[n].length>0&&(0,s.jsxs)("div",{className:"ast-tb-category-parent",children:[(0,s.jsx)("h2",{className:"font-semibold text-[18px] leading-[28px] text-text-primary",children:r}),(0,s.jsx)("div",{className:"ast-tb-canvas-content-row-flex",children:t?.[n]?.map((t,n)=>(0,s.jsx)(U5,{ID:t.ID,title:t.post_title,icon:q5.find(({layout:e})=>e===t.layout_value).icon,layout:t.layout_value,template:t.template_type,enabled:t.enabled,post_status:t.post_status,post_link:t.post_link,edit_post_link:t.edit_post_link,setModalPostID:e},n))})]},n))},K5=()=>{const e=new URLSearchParams(oJ().search),t=e.get("page"),n=e.get("path"),r=(0,a.__)("Create New","astra-addon");if("theme-builder"===t&&("all-layouts"===n||"create-new"===n||!n))return(0,s.jsx)(qJ,{to:{search:"?page=theme-builder&path=create-new"},className:"ast-tb-link",children:(0,s.jsx)(ve,{className:"ast-tb-btn ast-tb-btn-primary",icon:(0,s.jsx)(sX,{"aria-label":"icon",role:"img"}),iconPosition:"left",size:"md",tag:"button",type:"button",variant:"primary",children:r})});const o=astra_theme_builder.new_custom_layout_base_url+("single"===n||"archive"===n?`&type=template&template_type=${n}`:`&type=${n}`);return(0,s.jsx)(ve,{className:"ast-tb-btn ast-tb-btn-primary",icon:(0,s.jsx)(sX,{"aria-label":"icon",role:"img"}),iconPosition:"left",size:"md",tag:"button",type:"button",variant:"primary",onClick:()=>{window.location.href=o},children:r})},Z5=({type:e,position:t})=>(0,s.jsxs)(gp,{className:`ast-tb-empty ast-tb-empty-pos-${t}`,children:[(0,s.jsx)("div",{className:"ast-tb-empty-icon",children:(0,s.jsx)(tX,{})}),(0,s.jsxs)("div",{className:"ast-tb-empty-text",children:[(0,s.jsx)("h3",{className:"font-semibold text-[18px] leading-[28px] text-text-primary ",children:(0,a.__)("No Layouts Found","astra-addon")}),(0,s.jsx)("p",{className:"font-normal text-[14px] leading-[20px] text-text-secondary",children:`No templates found for ${e}. Want to create one?...`})]}),(0,s.jsx)("div",{className:"ast-tb-empty-btn",children:(0,s.jsx)(K5,{})})]});var G5=o(420),X5=o.n(G5);function J5(e){return J5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J5(e)}function Q5(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function e3(e){Q5(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===J5(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function t3(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function n3(e){Q5(1,arguments);var t=e3(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function r3(e){Q5(1,arguments);var t=e3(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=n3(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=n3(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}var o3={};function i3(){return o3}function a3(e,t){var n,r,o,i,a,s,l,c;Q5(1,arguments);var u=i3(),d=t3(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=e3(e),p=f.getUTCDay(),h=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-h),f.setUTCHours(0,0,0,0),f}function s3(e,t){var n,r,o,i,a,s,l,c;Q5(1,arguments);var u=e3(e),d=u.getUTCFullYear(),f=i3(),p=t3(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(l=f.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,p),h.setUTCHours(0,0,0,0);var m=a3(h,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var y=a3(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}function l3(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var c3={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return l3("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):l3(n+1,2)},d:function(e,t){return l3(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return l3(e.getUTCHours()%12||12,t.length)},H:function(e,t){return l3(e.getUTCHours(),t.length)},m:function(e,t){return l3(e.getUTCMinutes(),t.length)},s:function(e,t){return l3(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return l3(Math.floor(r*Math.pow(10,n-3)),t.length)}};const u3=c3;var d3={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return u3.y(e,t)},Y:function(e,t,n,r){var o=s3(e,r),i=o>0?o:1-o;return"YY"===t?l3(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):l3(i,t.length)},R:function(e,t){return l3(r3(e),t.length)},u:function(e,t){return l3(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return l3(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return l3(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return u3.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return l3(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){Q5(1,arguments);var n=e3(e),r=a3(n,t).getTime()-function(e,t){var n,r,o,i,a,s,l,c;Q5(1,arguments);var u=i3(),d=t3(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),f=s3(e,t),p=new Date(0);return p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0),a3(p,t)}(n,t).getTime();return Math.round(r/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):l3(o,t.length)},I:function(e,t,n){var r=function(e){Q5(1,arguments);var t=e3(e),n=n3(t).getTime()-function(e){Q5(1,arguments);var t=r3(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),n3(n)}(t).getTime();return Math.round(n/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):l3(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):u3.d(e,t)},D:function(e,t,n){var r=function(e){Q5(1,arguments);var t=e3(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):l3(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return l3(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return l3(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return l3(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return u3.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):u3.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):l3(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):l3(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):u3.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):u3.s(e,t)},S:function(e,t){return u3.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return p3(o);case"XXXX":case"XX":return h3(o);default:return h3(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return p3(o);case"xxxx":case"xx":return h3(o);default:return h3(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+f3(o,":");default:return"GMT"+h3(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+f3(o,":");default:return"GMT"+h3(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return l3(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return l3((r._originalDate||e).getTime(),t.length)}};function f3(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+l3(i,2)}function p3(e,t){return e%60==0?(e>0?"-":"+")+l3(Math.abs(e)/60,2):h3(e,t)}function h3(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+l3(Math.floor(o/60),2)+n+l3(o%60,2)}const m3=d3;var g3=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},y3=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const v3={p:y3,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return g3(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",g3(o,t)).replace("{{time}}",y3(i,t))}};var b3=["D","DD"],x3=["YY","YYYY"];function w3(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var C3={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function _3(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const k3={date:_3({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:_3({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:_3({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var S3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function j3(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const O3={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:j3({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:j3({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:j3({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:j3({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:j3({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function E3(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(l,function(e){return e.test(s)}):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(l,function(e){return e.test(s)});return a=e.valueCallback?e.valueCallback(c):c,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var P3,T3={ordinalNumber:(P3={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(P3.matchPattern);if(!n)return null;var r=n[0],o=e.match(P3.parsePattern);if(!o)return null;var i=P3.valueCallback?P3.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:E3({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:E3({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:E3({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:E3({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:E3({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const M3={code:"en-US",formatDistance:function(e,t,n){var r,o=C3[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:k3,formatRelative:function(e,t,n,r){return S3[e]},localize:O3,match:T3,options:{weekStartsOn:0,firstWeekContainsDate:1}};var A3=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,N3=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,D3=/^'([^]*?)'?$/,I3=/''/g,R3=/[a-zA-Z]/;function L3(e,t,n){var r,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,x;Q5(2,arguments);var w=String(t),C=i3(),_=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:C.locale)&&void 0!==r?r:M3,k=t3(null!==(i=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:C.firstWeekContainsDate)&&void 0!==a?a:null===(d=C.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=t3(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(y=n.locale)||void 0===y||null===(v=y.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:C.weekStartsOn)&&void 0!==h?h:null===(b=C.locale)||void 0===b||null===(x=b.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!_.localize)throw new RangeError("locale must contain localize property");if(!_.formatLong)throw new RangeError("locale must contain formatLong property");var j=e3(e);if(!function(e){if(Q5(1,arguments),!function(e){return Q5(1,arguments),e instanceof Date||"object"===J5(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=e3(e);return!isNaN(Number(t))}(j))throw new RangeError("Invalid time value");var O=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(j),E=function(e,t){return Q5(2,arguments),function(e,t){Q5(2,arguments);var n=e3(e).getTime(),r=t3(t);return new Date(n+r)}(e,-t3(t))}(j,O),P={firstWeekContainsDate:k,weekStartsOn:S,locale:_,_originalDate:j},T=w.match(N3).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,v3[t])(e,_.formatLong):e}).join("").match(A3).map(function(r){if("''"===r)return"'";var o,i,a=r[0];if("'"===a)return(i=(o=r).match(D3))?i[1].replace(I3,"'"):o;var s=m3[a];if(s)return null!=n&&n.useAdditionalWeekYearTokens||!function(e){return-1!==x3.indexOf(e)}(r)||w3(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==b3.indexOf(e)}(r)||w3(r,t,String(e)),s(E,r,_.localize,P);if(a.match(R3))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return r}).join("");return T}const F3=tQ("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),B3=({isOpen:e,onCancel:t,onDelete:n})=>e?(0,s.jsx)("div",{className:"ast-tb-modal-overlay",children:(0,s.jsx)("div",{className:"ast-tb-delete-modal",children:(0,s.jsxs)("div",{className:"ast-tb-delete-modal-content",children:[(0,s.jsx)(F3,{color:"#ec221f",strokeWidth:1.25}),(0,s.jsx)("h2",{className:"mt-4",children:(0,a.__)("Move to Trash","astra-addon")}),(0,s.jsx)("p",{children:(0,a.__)("Are you sure you want to move this item to Trash?","astra-addon")}),(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 ast-tb-delete-modal-options",children:[(0,s.jsx)(ve,{className:"w-[124px]",onClick:n,children:(0,a.__)("Move to Trash","astra-addon")}),(0,s.jsx)(ve,{className:"w-[124px]",variant:"ghost",onClick:t,children:(0,a.__)("Cancel","astra-addon")})]})]})})}):null,z3=({ID:e,post_title:t,author_name:r,author_image:o,post_modified:i,post_status:l,enabled:c,post_link:u,edit_post_link:d,onDelete:f,setModalPostID:p})=>{const[h,m]=(0,n.useState)(!1),[g,y]=(0,n.useState)(!1),[v,b]=(0,n.useState)(!1),[x,w]=(0,n.useState)("yes"===c||""===c),{layout:C}=$5(),{fetchLayouts:_}=H5(),[k,S]=(0,n.useState)(!1),j=()=>{S(!1)},O=(0,n.useRef)(null),[E,P]=(0,n.useState)(1),[T,M]=(0,n.useState)(0),[A,N]=(0,n.useState)(!0),[D,I]=(0,n.useState)(!1),R=(0,n.useRef)(null);return(0,n.useEffect)(()=>{const e=O.current.clientWidth/1200;P(e),M(O.current.clientHeight/e),R&&R.current&&(R.current.onload=()=>{(()=>{const e=R.current.contentDocument;if(e){const t=e.getElementById("wpadminbar"),n=e.querySelector(".site-header"),r=e.getElementById("colophon");e&&e.body&&(e.body.style.pointerEvents="none"),t&&t.remove(),r&&r.remove(),n&&n.remove()}})(),setTimeout(()=>{R&&R.current&&(N(!1),R.current.style.display="block")},800)})},[]),(0,s.jsxs)("div",{className:"ast-tb-layout-preview-card",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[h&&(0,s.jsxs)(ve,{className:"ast-tb-preview-card-hover-btn rounded p-2",onClick:()=>window.open(d,"_self"),children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M8 13.333H14",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"}),(0,s.jsx)("path",{d:"M11 2.33316C11.2652 2.06794 11.6249 1.91895 12 1.91895C12.1857 1.91895 12.3696 1.95553 12.5412 2.0266C12.7128 2.09767 12.8687 2.20184 13 2.33316C13.1313 2.46448 13.2355 2.62038 13.3066 2.79196C13.3776 2.96354 13.4142 3.14744 13.4142 3.33316C13.4142 3.51888 13.3776 3.70277 13.3066 3.87436C13.2355 4.04594 13.1313 4.20184 13 4.33316L4.66667 12.6665L2 13.3332L2.66667 10.6665L11 2.33316Z",stroke:"white","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"})]}),(0,a.__)("Edit","astra-addon")]}),(0,s.jsx)("div",{className:"ast-tb-layout-preview-body",children:(0,s.jsxs)("div",{ref:O,className:`ast-tb__preview-iframe ast-tb__preview-iframe__${C}`,children:[(0,s.jsx)(X5(),{color:"silver",loading:A,size:50,"aria-label":"Loading Spinner","data-testid":"loader",className:"ast-iframe-spinner"}),(0,s.jsx)("iframe",{title:"preview",src:u,ref:R,className:"ast-tb__preview-iframe__iframe",style:{transform:`scale(${E})`,height:T,width:1200,display:"none"}})]})}),(0,s.jsxs)("div",{className:"ast-tb-layout-preview-footer",children:[(0,s.jsxs)("div",{className:"ast-tb-preview-info",children:[(0,s.jsx)(lX,{fill:x&&"publish"===l?"#17B26A":"#94A3B8"}),(0,s.jsxs)("h3",{className:"text-text-primary text-sm not-italic font-medium",children:[t?(F=t,F.length>20?F.substring(0,20)+"...":F):"(untitled)",l&&"publish"!==l?` (${l})`:""]})]}),(0,s.jsxs)("div",{className:"ast-tb-preview-card-actions",children:[(0,s.jsxs)("div",{className:"ast-tb-preview-actions-author",children:[(0,s.jsx)("img",{className:"ast-tb-preview-actions-author-avatar",src:o||""}),(0,s.jsx)("span",{className:"ast-tb-preview-actions-author-name",children:r||""})]}),(0,s.jsxs)("div",{className:"ast-tb-preview-actions-date",children:[(0,s.jsx)(nX,{}),(0,s.jsx)("span",{className:"ast-tb-preview-actions-date-text",children:i?(L=i,L3(new Date(L),"MMMM d, yyyy")):""})]}),(0,s.jsxs)("button",{className:"ast-tb-preview-actions-btn",onClick:()=>{S(!0)},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[(0,s.jsx)(oX,{pathAttributes:{stroke:g?"#F87171":"#9CA3AF"}})," "]})]}),(0,s.jsx)(B5,{options:[{label:x?(0,a.__)("Disable","astra-addon"):(0,a.__)("Enable","astra-addon"),onClick:()=>{const t=x?"no":"yes",n=new XMLHttpRequest,r=astra_theme_builder.quick_view.url+"?action=ast_advanced_hook_display_toggle&post_id="+e+"&enable="+t+"&nonce="+astra_theme_builder.quick_view.nonce;n.open("GET",r),n.send(),w(!x),_()}},{label:(0,a.__)("Preview","astra-addon"),onClick:()=>window.location.href=u},{label:v?(0,a.__)("Copied","astra-addon"):(0,a.__)("Copy Shortcode","astra-addon"),onClick:()=>{const t=document.createElement("input");t.setAttribute("value",`[astra_custom_layout id=${e}]`),document.body.appendChild(t),t.select(),document.execCommand("copy")&&(document.body.removeChild(t),b(!0),setTimeout(()=>{b(!1)},2e3))}},{label:(0,a.__)("Display Conditions","astra-addon"),onClick:t=>{p(e),t(!1)}},{label:D?(0,a.__)("Duplicating...","astra-addon"):(0,a.__)("Duplicate Layout","astra-addon"),onClick:t=>{D||((async()=>{I(!0);const t={method:"POST",headers:{"X-WP-Nonce":astra_theme_builder.nonce}};try{(await fetch(astra_theme_builder.rest_url+e+"/duplicate",t)).ok?_():console.error("Failed to duplicate layout")}catch(e){console.error("Error duplicating layout:",e)}finally{I(!1)}})(),t(!1))}}]})]}),(0,s.jsx)(B3,{isOpen:k,onCancel:j,onDelete:()=>{var t={method:"DELETE",redirect:"follow",headers:{"X-WP-Nonce":astra_theme_builder.nonce}};fetch(astra_theme_builder.rest_url+e,t).then(e=>e.text()).then(e=>{f()}).catch(e=>{console.log(e),window.location.href=astra_theme_builder.admin_url}),j()}})]});var L,F};var V3=function(){return V3=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},V3.apply(this,arguments)},H3=function(e){var t=e.animate,r=void 0===t||t,o=e.animateBegin,i=e.backgroundColor,a=void 0===i?"#f5f6f7":i,s=e.backgroundOpacity,l=void 0===s?1:s,c=e.baseUrl,u=void 0===c?"":c,d=e.children,f=e.foregroundColor,p=void 0===f?"#eee":f,h=e.foregroundOpacity,m=void 0===h?1:h,g=e.gradientRatio,y=void 0===g?2:g,v=e.gradientDirection,b=void 0===v?"left-right":v,x=e.uniqueKey,w=e.interval,C=void 0===w?.25:w,_=e.rtl,k=void 0!==_&&_,S=e.speed,j=void 0===S?1.2:S,O=e.style,E=void 0===O?{}:O,P=e.title,T=void 0===P?"Loading...":P,M=e.beforeMask,A=void 0===M?null:M,N=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["animate","animateBegin","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","gradientDirection","uniqueKey","interval","rtl","speed","style","title","beforeMask"]),D=x||Math.random().toString(36).substring(6),I=D+"-diff",R=D+"-animated-diff",L=D+"-aria",F=k?{transform:"scaleX(-1)"}:null,B="0; "+C+"; 1",z=j+"s",V="top-bottom"===b?"rotate(90)":void 0;return(0,n.createElement)("svg",V3({"aria-labelledby":L,role:"img",style:V3(V3({},E),F)},N),T?(0,n.createElement)("title",{id:L},T):null,A&&(0,n.isValidElement)(A)?A:null,(0,n.createElement)("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+u+"#"+I+")",style:{fill:"url("+u+"#"+R+")"}}),(0,n.createElement)("defs",null,(0,n.createElement)("clipPath",{id:I},d),(0,n.createElement)("linearGradient",{id:R,gradientTransform:V},(0,n.createElement)("stop",{offset:"0%",stopColor:a,stopOpacity:l},r&&(0,n.createElement)("animate",{attributeName:"offset",values:-y+"; "+-y+"; 1",keyTimes:B,dur:z,repeatCount:"indefinite",begin:o})),(0,n.createElement)("stop",{offset:"50%",stopColor:p,stopOpacity:m},r&&(0,n.createElement)("animate",{attributeName:"offset",values:-y/2+"; "+-y/2+"; "+(1+y/2),keyTimes:B,dur:z,repeatCount:"indefinite",begin:o})),(0,n.createElement)("stop",{offset:"100%",stopColor:a,stopOpacity:l},r&&(0,n.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+y),keyTimes:B,dur:z,repeatCount:"indefinite",begin:o})))))},W3=function(e){return e.children?(0,n.createElement)(H3,V3({},e)):(0,n.createElement)($3,V3({},e))},$3=function(e){return(0,n.createElement)(W3,V3({viewBox:"0 0 476 124"},e),(0,n.createElement)("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),(0,n.createElement)("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),(0,n.createElement)("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),(0,n.createElement)("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),(0,n.createElement)("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),(0,n.createElement)("circle",{cx:"20",cy:"20",r:"20"}))};const U3=W3,q3=({numberOfItems:e})=>{const{isHeaderFooter:t}=$5(),n=Array(e).fill(),r=t?"ast-tb-layout-details-section-header-footer":"ast-tb-layout-details-section",o=t?172:358;return(0,s.jsx)("div",{className:`ast-tb-preview-skeleton-cards ${r}`,children:n.map((e,t)=>(0,s.jsxs)("div",{className:"ast-tb-preview-skeleton-cards-hf",children:[(0,s.jsxs)(U3,{speed:2,width:"100%",height:o,viewBox:"0 0 100 100",backgroundColor:"#e8e8e8",foregroundColor:"#f0f0f0",preserveAspectRatio:"none",children:[(0,s.jsx)("path",{d:"M 0 0 h 759 v 394 H 0 z"}),(0,s.jsx)("rect",{x:"20",y:"20",rx:"2",ry:"2",width:"719",height:"354"}),(0,s.jsx)("rect",{x:"20",y:"20",rx:"4",ry:"4",width:"719",height:"22"})]}),(0,s.jsxs)(U3,{speed:2,width:"100%",height:40,viewBox:"0 0 100 40",backgroundColor:"#e8e8e8",foregroundColor:"#f0f0f0",preserveAspectRatio:"none",children:[(0,s.jsx)("path",{d:"M 0 0 h 759 v 394 H 0 z"}),(0,s.jsx)("rect",{x:"20",y:"20",rx:"2",ry:"2",width:"719",height:"354"}),(0,s.jsx)("rect",{x:"20",y:"20",rx:"4",ry:"4",width:"719",height:"22"})]})]},"row-"+t))})},Y3=({layoutData:e,ID:t,setModalPostID:r})=>{const o=[],{loading:i}=H5(),{title:a,isHeaderFooter:l}=$5(),c=l?3:2;(0,n.useEffect)(()=>{if(t&&""!==t&&e.length>0){const n=t=>{t=parseInt(t);const n=e.findIndex(e=>e.ID===t);if(-1!==n){let e=n-c;e<0&&(e=0),e<o.length&&o[e].scrollIntoView({behavior:"smooth"})}};n(t)}},[e,t]);const u=()=>{window.location.reload()},d=l?"ast-tb-layout-details-section-header-footer":"ast-tb-layout-details-section";return i?(0,s.jsx)(q3,{numberOfItems:4}):(0,s.jsxs)("div",{className:`${d} ${e&&!i&&e.length<1?"ast-tb-layout-details-section-empty":""}`,children:[e&&!i&&e.length<1&&(0,s.jsx)(Z5,{type:a,position:l?"right":"center"}),e?.map((t,n)=>(0,s.jsx)("div",{className:"ast-tb-layout-details-preview-parent",children:n<e.length-c?(0,s.jsx)("div",{className:"ast-tb-layout-details-preview-parent",ref:e=>o[n]=e,children:(0,s.jsx)(z3,{...t,setModalPostID:r,onDelete:()=>u()})}):(0,s.jsx)(z3,{...t,setModalPostID:r,onDelete:()=>u()})},n))]})},K3=()=>(0,s.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,_minmax(250px,_1fr))] mt-7 ast-tb-canvas-content gap-[20px] w-full",children:q5.map((e,t)=>(0,s.jsx)(U5,{title:e.label,icon:e.icon,layout:e.layout,template:e.template},t))}),Z3=function(){const e=(0,n.useRef)(),t=new URLSearchParams(oJ().search),r=t.get("page"),o=t.get("id"),{categories:i}=H5({categories:!0}),{layout:l,isAll:c,isNew:u}=$5(),[d,f]=(0,n.useState)(0),[p,h]=(0,n.useState)({}),[m,g]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),b=()=>{g(!1),h({}),f(0),v(!1),e.current?.abort()};if((0,n.useEffect)(()=>(d>0&&(g(!0),e.current=new AbortController,async function(e,t=new AbortController){try{return(await vQ()({path:`/wp/v2/astra-advanced-hook/${e}`,signal:t?.signal})).meta}catch(e){if("AbortError"===e.name)return;throw console.error("Error fetching post meta:",e),e}}(d,e.current).then(e=>{h({meta:e,oldMeta:e})}).catch(console.error)),()=>{e.current?.abort()}),[d]),"theme-builder"!==r)return(0,s.jsx)("p",{children:(0,a.__)("404 Not Found!","astra-addon")});let x;return x=u?(0,s.jsx)(K3,{}):c?(0,s.jsx)(Y5,{setModalPostID:f}):(0,s.jsx)(Y3,{setModalPostID:f,layoutData:i?.[l]||[],ID:o??""}),(0,s.jsxs)(s.Fragment,{children:[x,m&&(0,s.jsx)(L5,{...p,closeModal:b,whiteLabelledLogo:()=>""===astra_theme_builder.logo_url?"":(0,s.jsx)("img",{src:astra_theme_builder.logo_url,alt:"Site Logo",className:"ast-custom-layout-popup-logo"}),returnToPostLabel:y?(0,a.__)("Saving","astra-addon"):(0,a.__)("Save","astra-addon"),returnToPostDescription:(0,a.__)("Please make sure to save any changes made to take effect.","astra-addon"),onReturnToPostClick:()=>{v(!0),async function(e,t,n=new AbortController){try{return(await vQ()({path:`/wp/v2/astra-advanced-hook/${e}`,method:"POST",data:{meta:t},signal:n?.signal})).meta}catch(e){if("AbortError"===e.name)return;throw console.error("Error updating post meta:",e),e}}(d,p.meta,e.current).then(()=>b()).catch(console.error)},setMetaFieldValue:(e,t)=>{h({meta:{[t]:e},...p})},isLoading:!p?.meta})]})},G3=({setShowInfobox:e,showNoticeFor:t})=>{const[r,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!document.cookie.includes("astTbNoticeDisplayed=true")){const e=new Date;e.setDate(e.getDate()+30),document.cookie=`astTbNoticeDisplayed=true; expires=${e.toUTCString()}`,o(!0)}},[]),r&&(0,s.jsxs)("div",{className:"ast-tb-info",children:[(0,s.jsxs)("div",{className:"ast-tb-info-icon",children:[(0,s.jsx)(aX,{})," "]}),(0,s.jsxs)("div",{className:"ast-tb-info-content",children:[(0,s.jsx)("h3",{children:(0,a.__)(`Need to install ${"spectra"===t?"Spectra Pro":"Ultimate Addons For Elementor"} to make better layouts with Site Builder`,"astra-addon")}),(0,s.jsxs)("div",{className:"ast-tb-info-content-actions",children:[(0,s.jsx)("button",{className:"ast-tb-info-content-actions-install",onClick:()=>{window.open("spectra"===t?astra_theme_builder.spectra_pro_url:astra_theme_builder.uae_pro_url)},children:(0,a.__)("Install Now","astra-addon")}),(0,s.jsx)("button",{className:"ast-tb-info-content-actions-dismiss",onClick:()=>e(!1),children:(0,a.__)("Dismiss","astra-addon")})]})]}),(0,s.jsxs)("div",{className:"ast-tb-info-close-icon",onClick:()=>e(!1),children:[(0,s.jsx)(rX,{style:{padding:"6px"}})," "]})]})},X3=({numberOfSections:e=2,numberOfItems:t=10})=>{const n=Array(t).fill();return Array(e).fill().map((e,t)=>(0,s.jsxs)("div",{className:"ast-tb-category-parent",children:[(0,s.jsx)(U3,{speed:2,width:295,height:80,viewBox:"0 0 200 36",backgroundColor:"#e8e8e8",foregroundColor:"#f0f0f0",children:(0,s.jsx)("rect",{x:"0",y:"0",rx:"4",ry:"4",width:"324",height:"56"})}),(0,s.jsx)("div",{className:"ast-tb-canvas-content-row-flex",children:(0,s.jsx)("div",{className:"ast-tb-canvas-content-row-flex ast-tb-skeleton-cards",children:n.map((e,t)=>(0,s.jsxs)("div",{className:"ast-tb-skeleton-card",children:[(0,s.jsxs)(U3,{speed:2,viewBox:"0 0 242 212",backgroundColor:"#e8e8e8",foregroundColor:"#f0f0f0",children:[(0,s.jsx)("rect",{x:"0",y:"0",rx:"5",ry:"5",width:"324",height:"304"}),(0,s.jsx)("rect",{x:"0",y:"0",rx:"4",ry:"4",width:"324",height:"56"}),(0,s.jsx)("rect",{x:"20",y:"19",rx:"2",ry:"2",width:"48",height:"18"}),(0,s.jsx)("rect",{x:"149",y:"24",rx:"2",ry:"2",width:"26",height:"8"}),(0,s.jsx)("rect",{x:"117",y:"24",rx:"2",ry:"2",width:"26",height:"8"}),(0,s.jsx)("rect",{x:"181",y:"24",rx:"2",ry:"2",width:"25",height:"8"}),(0,s.jsx)("rect",{x:"212",y:"24",rx:"2",ry:"2",width:"26",height:"8"}),(0,s.jsx)("rect",{x:"259",y:"24",rx:"2",ry:"2",width:"26",height:"8"})]}),(0,s.jsxs)(U3,{speed:2,viewBox:"0 0 242 35",backgroundColor:"#e8e8e8",foregroundColor:"#f0f0f0",children:[(0,s.jsx)("path",{d:"M 0 0 h 363.5 v 56 H 0 V 0 z"}),(0,s.jsx)("rect",{x:"20",y:"16",rx:"6",ry:"6",width:"112",height:"24"}),(0,s.jsx)("circle",{cx:"24",cy:"28",r:"3"}),(0,s.jsx)("path",{d:"M 0 1 h 363.5 v -2 H 0 v 2 z"})]})]},t))})})]},"row-"+t))},J3=()=>{const[e,t]=(0,n.useState)(!0),{loading:r}=H5(),{title:o,isAll:i,isNew:a}=$5();return(0,s.jsxs)("div",{className:"w-auto bg-background-secondary flex-grow relative overflow-y-auto p-[35px] ast-tb-canvas",children:[e&&""!==astra_theme_builder.show_notice_for&&(0,s.jsx)(G3,{setShowInfobox:t,showNoticeFor:astra_theme_builder.show_notice_for}),(0,s.jsxs)(gp,{className:"w-full justify-between items-center pb-3 border-b border-gray-300 ast-tb-canvas-header",gap:"none",children:[(0,s.jsx)("h2",{className:"font-semibold text-text-primary text-[20px] leading-[30px] tracking-[-0.005em] mt-4",children:o}),(0,s.jsx)(K5,{})]}),(0,s.jsxs)("div",{className:"ast-tb-canvas-content",children:[r&&(i||a)?(0,s.jsx)(X3,{numberOfSections:2,numberOfItems:10}):null,(0,s.jsx)(CJ,{children:(0,s.jsx)(xJ,{path:"*",element:(0,s.jsx)(Z3,{})})})]})]})},Q3=()=>((0,n.useEffect)(()=>{const e=document.querySelector("html.wp-toolbar");e&&(e.style.paddingTop=0)},[]),(0,s.jsx)($J,{children:(0,s.jsxs)("div",{className:"flex flex-col h-screen font-figtree ",children:[(0,s.jsx)(iQ,{}),(0,s.jsxs)(gp,{className:"overflow-hidden h-full",gap:"none",children:[(0,s.jsx)(cQ,{items:gQ}),(0,s.jsx)(V5,{children:(0,s.jsx)(J3,{})})]})]})})),e4=document.getElementById("ast-tb-app-root");e4&&t().render((0,s.jsx)(Q3,{}),e4)})()})();